/* The SnapArchive walkthrough's scenes, drawn in stage pixels (1280 x 800).
   Window chrome, meters and buttons come from walkthrough.css. */

.mono,
.mono-label {
  font-family: var(--font-mono);
}

.mono-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- 1. the export ---------- */

.explorer {
  width: 880px;
}

.explorer-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 440px;
}

.folders {
  margin: 0;
  padding: 14px;
  border-right: 1px solid var(--rule);
  list-style: none;

  li {
    display: flex;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
  }

  span {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink-3);
  }

  .is-on {
    background: var(--paper-2);
    font-weight: 600;
  }
}

.files {
  margin: 0;
  padding: 14px 20px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 17px;

  li {
    padding: 5px 0;
    border-bottom: 1px solid var(--rule);
  }
}

.index-bar {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}

/* ---------- 2. who sent what ---------- */

.tiers {
  position: absolute;
  top: 50px;
  left: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  width: 1180px;
}

.tier {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--shade);

  h3 {
    font-size: 28px;
    font-stretch: 75%;
    font-weight: 600;
  }
}

.tier-num {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.tier-pill {
  justify-self: start;
  padding: 4px 12px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 15px;
}

.header-read,
.snap-log {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--screen);
  color: var(--screen-ink);
  font-size: 17px;

  .mono-label {
    margin-bottom: 6px;
    color: var(--screen-dim);
  }

  .big {
    font-size: 24px;
    color: var(--screen-hi);
  }
}

.snap-log .is-match {
  margin-inline: -6px;
  padding-inline: 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--screen-hi) 22%, transparent);
  color: var(--screen-hi);
}

.sorted-total {
  position: absolute;
  top: 560px;
  left: 50px;
  width: 1180px;
  font-size: 24px;

  .meter {
    height: 18px;
  }
}

.big-number {
  font-size: 56px;
  font-stretch: 70%;
  font-weight: 600;
  vertical-align: -6px;
}

/* ---------- 3. the sorter ---------- */

.sorter {
  position: absolute;
  inset: 0;
}

.media {
  position: absolute;
  top: 60px;
  left: 90px;
  width: 382px;
  height: 680px;
}

.snap {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 18px;
  opacity: 0;
  box-shadow: 10px 10px 0 var(--shade);

  &:first-child {
    opacity: 1;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.fav-star {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 54px;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 2px 6px rgb(0 0 0 / 0.4);
}

.side {
  position: absolute;
  top: 60px;
  left: 540px;
  width: 660px;

  .meter {
    margin: 12px 0 18px;
  }
}

.side-title {
  font-size: 38px;
  font-stretch: 72%;
  font-weight: 600;
}

.suggest {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;

  li {
    display: grid;
    grid-template-columns: 44px 150px 1fr 120px;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: var(--line) solid var(--rule);
    border-radius: 12px;
    background: var(--paper);
  }

  kbd {
    font-size: 20px;
  }

  .who {
    font-size: 21px;
    font-weight: 600;
  }

  .why {
    color: var(--ink-2);
    font-size: 16px;
  }

  .score {
    height: 8px;
    border-radius: 4px;
    background:
      linear-gradient(var(--accent), var(--accent)) 0 0 / var(--score) 100%
        no-repeat,
      var(--paper-2);
  }

  li:nth-child(1) .score {
    --score: 92%;
  }
  li:nth-child(2) .score {
    --score: 61%;
  }
  li:nth-child(3) .score {
    --score: 44%;
  }
  li:nth-child(4) .score {
    --score: 23%;
  }
  li:nth-child(5) .score {
    --score: 12%;
  }

  .is-hit {
    border-color: var(--accent-ink);
    background: var(--accent-ink);
    color: var(--on-accent);

    .why {
      color: inherit;
    }
  }
}

.keys {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);

  .is-hit {
    color: var(--accent-ink);
    font-weight: 600;
  }
}

.saved {
  position: absolute;
  top: 690px;
  left: 540px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--ok);
  color: var(--paper);
  font-weight: 600;
}

/* ---------- 4. the archive ---------- */

.viewer {
  position: absolute;
  inset: 30px 300px 30px 40px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--shade);
}

.viewer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid var(--rule);
}

.viewer-name {
  margin-right: 18px;
  font-size: 24px;
  font-stretch: 75%;
  font-weight: 600;
}

.viewer-tab {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--ink-2);

  &.is-on {
    background: var(--ink);
    color: var(--paper);
  }
}

.viewer-body {
  height: 678px;
}

.stream {
  position: relative;
  overflow: hidden;
}

.sticky-month,
.month {
  padding: 12px 20px 8px;
  font-size: 22px;
  font-stretch: 78%;
  font-weight: 600;
}

.sticky-month {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.stream-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  padding: 0 20px 10px;

  img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
  }
}

.friends {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  padding: 24px;
}

.friend {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px;
  border: var(--line) solid var(--rule);
  border-radius: 14px;

  p {
    font-size: 22px;
    font-weight: 600;
  }

  small {
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 14px;
  }

  &.is-hidden-card {
    border-style: dashed;
    color: var(--ink-3);
  }
}

.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 6px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--birch);
  font-size: 24px;
  font-weight: 600;
}

.star {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  color: var(--ink-3);

  &.is-on {
    color: var(--accent);
  }
}

.lightbox-mock {
  position: absolute;
  inset: 60px 0 0;
  display: flex;
  gap: 30px;
  padding: 24px 40px;
  background: #0b0d10;
  color: #f1f3f5;
}

.lb-photo {
  position: relative;
  width: 352px;
  height: 626px;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.caption-bar {
  position: absolute;
  top: 58%;
  inset-inline: 0;
  padding: 8px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 24px;
  text-align: center;
}

.sticker {
  position: absolute;
  top: 70px;
  right: 34px;
  width: 92px;
  height: 92px;
  rotate: 12deg;

  path {
    fill: #ffd43b;
    stroke: #fff;
    stroke-width: 6;
    stroke-linejoin: round;
  }
}

.lb-side {
  display: grid;
  align-content: start;
  gap: 16px;
  max-width: 360px;
  padding-top: 20px;

  .muted {
    color: #aab2bb;
  }
}

.lb-date {
  font-family: var(--font-mono);
  font-size: 16px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;

  .switch {
    position: relative;
    width: 54px;
    height: 30px;
    border-radius: 15px;
    background: var(--accent);
    transition: background-color 0.2s;
  }

  .switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 27px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.2s;
  }

  &.is-off .switch {
    background: #5f6670;
  }

  &.is-off .switch::after {
    left: 3px;
  }
}

/* ---------- 5. fixing the export ---------- */

.fixes {
  position: absolute;
  top: 60px;
  left: 90px;
  width: 860px;
}

.fix {
  padding: 26px 30px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--shade);

  h3 {
    margin-bottom: 18px;
    font-size: 32px;
    font-stretch: 75%;
    font-weight: 600;
  }
}

.clips {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
}

.clip {
  width: 150px;
  margin: 0;

  img {
    width: 150px;
    height: 220px;
    object-fit: cover;
    border: 2px solid var(--ink);
    border-radius: 10px;
  }

  figcaption {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 16px;
    text-align: center;
  }
}

.joined {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 600;
  color: var(--ok);
}

.link-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  margin-bottom: 24px;
}

.tree-col {
  padding: 14px;
  border: var(--line) solid var(--rule);
  border-radius: 10px;

  .mono {
    margin-top: 6px;
    font-size: 17px;
  }
}

.bytes {
  position: relative;
  padding: 18px 14px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  text-align: center;
  font-weight: 600;

  /* both names lead to the same bytes */
  &::before,
  &::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40px;
    border-top: 2px dashed var(--accent);
  }

  &::before {
    right: 100%;
  }

  &::after {
    left: 100%;
  }
}

.erase-box {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin-bottom: 14px;
  padding: 20px;
  border: 2px solid var(--danger);
  border-radius: 12px;
}

.erase-title {
  font-size: 24px;
  font-weight: 600;
}

.type-label {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.type-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  border: var(--line) solid var(--ink);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: 0.08em;
}

.caret {
  width: 2px;
  height: 28px;
  margin-left: 2px;
  background: var(--ink);
}

.erase-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- 6. runs anywhere ---------- */

.usb {
  display: flex;
  align-items: center;
  rotate: -8deg;
}

.usb-plug {
  width: 70px;
  height: 56px;
  border: 2px solid var(--ink);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background:
    linear-gradient(var(--ink), var(--ink)) 18px 14px / 12px 8px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 18px 34px / 12px 8px no-repeat,
    var(--paper-2);
}

.usb-body {
  display: grid;
  place-items: center;
  width: 210px;
  height: 92px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.1em;
}

.usb-window {
  width: 600px;
}

.usb-files {
  margin: 0;
  padding: 14px 20px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 18px;

  li {
    padding: 5px 0;
  }

  span {
    margin-left: 14px;
    color: var(--accent-ink);
    font-family: var(--font-sans);
    font-size: 16px;
  }
}

.address {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
}

.end-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 760px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--shade);

  div {
    padding: 18px 20px;
    border-left: 1px solid var(--rule);
  }

  div:first-child {
    border-left: 0;
  }

  strong {
    display: block;
    font-size: 40px;
    font-stretch: 70%;
    font-weight: 600;
    line-height: 1.05;
  }

  span {
    color: var(--ink-2);
  }
}
