/* $SUPERVISED: one static page. System fonts, no external resources.
   Palette from the mascot (Painter's style sheet): navy #0F1B37, coral #FD6F55, cream #FDEFE0.
   Coral is never used for small text: text in "red ink" uses --coral-ink (about 5:1 on cream). */

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  --paper: #FDEFE0;
  --sheet: #FFF9F2;
  --ink: #0F1B37;
  --coral: #FD6F55;
  --coral-ink: #B5361F;
  --coral-soft: #FEB4A1;
  --cream: #FEF4EB;
  --muted: #4A5068;
  --rule: rgba(15, 27, 55, .075);
  --margin-line: rgba(253, 111, 85, .55);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(18px, 4.5vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ledger paper: ruled lines and a coral margin line just left of the content column */
body {
  --mx: max(8px, calc((100% - var(--wrap)) / 2 - 24px));
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent calc(var(--mx) - 1px), var(--margin-line) calc(var(--mx) - 1px), var(--margin-line) calc(var(--mx) + 1px), transparent calc(var(--mx) + 1px)),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  text-wrap: balance;
}
button { font: inherit; color: inherit; }
kbd { font-family: var(--mono); }

:focus-visible {
  outline: 3px solid var(--coral-ink);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--muted); }
html:not(.js) .js-only { display: none; }

.skip {
  position: absolute;
  z-index: 100;
  left: 12px;
  top: -80px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font: 700 .95rem/1 var(--mono);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- shared pieces ---------- */

.form-no {
  display: inline-block;
  padding: 7px 10px 6px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--sheet);
  font: 700 .78rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.btn {
  --bg: var(--sheet);
  --fg: var(--ink);
  --shadow: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 20px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 4px 4px 0 var(--shadow);
  font: 700 1rem/1.1 var(--mono);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
}
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.btn:focus-visible { outline-offset: 5px; }
.btn--ink { --bg: var(--ink); --fg: var(--paper); }
.btn--coral { --bg: var(--coral); }
.btn--paper { --bg: var(--paper); --shadow: rgba(253, 239, 224, .35); border-color: var(--paper); }
.btn--small { min-height: 40px; padding: 7px 14px; font-size: .9rem; box-shadow: 3px 3px 0 var(--shadow); }
.btn--big { min-height: 58px; padding: 14px 26px; font-size: 1.1rem; }
.btn .ico { width: 22px; height: 22px; flex: none; }

.ico { stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 2px solid currentColor;
  border-radius: 6px;
  font-size: .8rem;
  line-height: 1;
}
.no-shortcut .kbd { display: none; }

/* rubber stamps: UI elements, always readable text, never colour alone */
.stamp {
  --c: var(--ink);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px 5px;
  border: 3px solid var(--c);
  border-radius: 8px;
  outline: 1.5px solid var(--c);
  outline-offset: 2px;
  color: var(--c);
  font: 800 1rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-8deg);
  cursor: url("img/kursor.svg") 16 30, auto;
  user-select: none;
}
.stamp small {
  margin-top: 5px;
  font-size: .56em;
  letter-spacing: .14em;
}
.stamp--rejected { --c: var(--coral-ink); }

.stamp--drop { animation: stamp-drop .5s both; }
.stamp--drop::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 2px solid var(--c);
  border-radius: 14px;
  opacity: 0;
  animation: ink-ring .5s ease-out .26s;
  pointer-events: none;
}
@keyframes stamp-drop {
  0% { opacity: 0; transform: translateY(-130px) scale(2.1) rotate(-24deg); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
  55% { opacity: 1; transform: translateY(0) scale(.9) rotate(-10deg); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(-11deg); }
}
@keyframes ink-ring {
  from { opacity: .55; transform: scale(.85); }
  to { opacity: 0; transform: scale(1.25); }
}

/* ---------- hero ---------- */

.hero, .section, .foot { overflow-x: clip; }
.hero { padding-block: clamp(28px, 6vw, 80px) clamp(44px, 7vw, 96px); }

.hero__grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 .8rem/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.kicker__bars {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--coral-ink), var(--coral-ink)) 2px 0 / 4px 100% no-repeat,
    linear-gradient(var(--coral-ink), var(--coral-ink)) 8px 0 / 4px 100% no-repeat;
}

.hero__title {
  margin-top: 16px;
  /* one line at every width: sized for the widest likely system serif (about 7.8 em for 11 glyphs) */
  font-size: min(9.45rem, calc((100vw - 2 * var(--gutter)) / 7.8));
  line-height: .9;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.hero__profile {
  margin-top: 22px;
  max-width: 36ch;
  font-size: clamp(1.1rem, 2.3vw, 1.42rem);
  line-height: 1.45;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__desk {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  padding-bottom: 14px;
}
.hero__mascot {
  position: relative;
  z-index: 1;
  width: 66%;
  margin-inline: auto;
  transform-origin: 50% 100%;
  animation: breathe 3.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.018, .978); }
}
.desk__top {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 12px;
  border-radius: 8px;
  background: var(--ink);
}
.desk__pile {
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 27%;
}
.desk__stamp {
  position: absolute;
  right: 3%;
  bottom: 14px;
  width: 17%;
  transform-origin: 50% 100%;
  animation: stamp-idle 6s var(--ease) infinite;
}
@keyframes stamp-idle {
  0%, 82%, 100% { transform: none; }
  86% { transform: translateY(-14px) rotate(-6deg); }
  90% { transform: translateY(2px) scale(1.04, .94); }
  94% { transform: none; }
}

@media (min-width: 900px) {
  /* the wordmark runs across the full width, deck text and the mascot's desk sit under it */
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "kicker kicker" "title title" "profile desk" "links desk";
    grid-template-rows: auto auto auto 1fr;
    column-gap: 64px;
    row-gap: 0;
    align-items: start;
  }
  .hero__copy { display: contents; }
  .kicker { grid-area: kicker; justify-self: start; }
  .hero__title { grid-area: title; }
  .hero__profile { grid-area: profile; margin-top: 48px; font-size: clamp(1.2rem, 1.9vw, 1.55rem); }
  .hero__links { grid-area: links; }
  .hero__desk { grid-area: desk; justify-self: end; width: min(100%, 440px); margin-top: 28px; }
  .hero__mascot { width: 70%; }
}

/* ---------- sections ---------- */

.section {
  position: relative;
  padding-block: clamp(60px, 10vw, 132px);
}
/* ledger "totals" double rule between sections */
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  transform: translateX(-50%);
  border-top: 5px double var(--ink);
}

.sec-head {
  display: grid;
  justify-items: start;
  gap: 16px;
  margin-bottom: clamp(28px, 4.5vw, 48px);
}
.sec-head h2 {
  font-size: clamp(2.35rem, 8.6vw, 4.8rem);
  line-height: .95;
  letter-spacing: -.04em;
}
.lede {
  max-width: 56ch;
  font-size: clamp(1.06rem, 2vw, 1.25rem);
  line-height: 1.5;
}

/* ---------- game ---------- */

.game {
  display: grid;
  gap: 26px;
}

.folders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.folder {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-height: 78px;
  margin-top: 18px;
  padding: 14px 14px 12px;
  border: 3px solid var(--ink);
  border-radius: 0 12px 12px 12px;
  background: var(--sheet);
}
.folder::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -20px;
  width: 48%;
  height: 23px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: inherit;
}
.folder--rejected { background: var(--coral); }
.folder__tab {
  position: relative;
  font: 700 .8rem/1.1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.folder__count {
  position: relative;
  font: 700 2.4rem/.9 var(--serif);
  font-variant-numeric: tabular-nums;
}
.folder.is-bump { animation: bump .55s var(--ease); }
@keyframes bump {
  0% { transform: none; }
  30% { transform: translateY(6px) scale(1.05, .92); }
  62% { transform: translateY(-3px) scale(.98, 1.03); }
  100% { transform: none; }
}

.game__desk { min-height: 360px; }

.start {
  display: grid;
  justify-items: start;
  gap: 22px;
}
.inbox {
  position: relative;
  width: min(100%, 560px);
  height: 200px;
}
.inbox span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 172px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 27px, var(--margin-line) 27px 29px, transparent 29px),
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(15, 27, 55, .13) 25px 27px) 0 34px / 100% calc(100% - 52px) no-repeat,
    var(--sheet);
}
.inbox span:nth-child(1) { transform: translate(10px, 18px) rotate(3deg); }
.inbox span:nth-child(2) { transform: translate(-6px, 12px) rotate(-2.4deg); }
.inbox span:nth-child(3) { transform: translate(4px, 6px) rotate(1.2deg); }
.inbox span:last-child {
  transform: none;
  box-shadow: 6px 6px 0 var(--ink);
  animation: nudge 4.5s ease-in-out infinite;
}
@keyframes nudge {
  0%, 84%, 100% { transform: none; }
  88% { transform: translateY(-6px) rotate(-1.2deg); }
  92% { transform: translateY(0) rotate(.6deg); }
}
.start__count {
  font: 700 .9rem/1.3 var(--mono);
  letter-spacing: .04em;
}

.stack { position: relative; }
.stack::before,
.stack::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--sheet);
  visibility: hidden;
}
.stack::before { transform: translate(9px, 10px) rotate(2deg); }
.stack::after { transform: translate(-5px, 13px) rotate(-1.6deg); }
.stack--1::before,
.stack--2::before,
.stack--2::after { visibility: visible; }

.draft {
  position: relative;
  z-index: 1;
  padding: 18px 18px 26px 46px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--sheet);
  box-shadow: 6px 6px 0 var(--ink);
}
.draft:focus-visible { outline-offset: 6px; }
.draft::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  border-left: 2px solid var(--margin-line);
}
.draft.is-entering { animation: card-in .45s var(--ease) both; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(34px) rotate(1.5deg); }
  to { opacity: 1; transform: none; }
}
.draft.is-hit { animation: thud .34s linear .26s; }
@keyframes thud {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  20% { translate: -4px 3px; rotate: -.8deg; }
  45% { translate: 3px -1px; rotate: .5deg; }
  70% { translate: -1px 1px; rotate: -.2deg; }
}
.draft.is-flying { z-index: 5; pointer-events: none; }

.draft__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.draft__id {
  font: 700 .85rem/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.draft__progress {
  font: 600 .85rem/1.2 var(--mono);
  color: var(--muted);
}
.draft__text {
  min-height: calc(1.75em * 5);
  font: 500 clamp(1rem, 2.6vw, 1.1rem)/1.75 var(--mono);
  white-space: pre-line;
  overflow-wrap: anywhere;
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(1.75em - 1px), rgba(15, 27, 55, .14) calc(1.75em - 1px) 1.75em);
}

.stamp--big {
  position: absolute;
  z-index: 2;
  top: -22px;
  right: 10px;
  padding: 8px 14px 7px;
  font-size: clamp(1.2rem, 4.4vw, 1.65rem);
  transform: rotate(-11deg);
  background: rgba(255, 249, 242, .6);
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.btn--choice { min-height: 60px; font-size: 1.08rem; }
.btn--reject { --bg: var(--coral); }

.verdict {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 30px;
}
.verdict.is-new > * { animation: rise-in .4s var(--ease) both; }
.verdict.is-new > :nth-child(1) { animation-delay: .32s; }
.verdict.is-new > :nth-child(2) { animation-delay: .38s; }
.verdict.is-new > :nth-child(3) { animation-delay: .44s; }
.verdict.is-new > :nth-child(4) { animation-delay: .5s; }
.verdict.is-leaving { opacity: 0; transition: opacity .2s; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.verdict__match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sheet);
  font: 700 .92rem/1.2 var(--mono);
}
.verdict__match .ico { width: 20px; height: 20px; }
.is-miss .verdict__match { background: var(--coral); }
.verdict__calls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font: 600 .9rem/1.5 var(--mono);
  color: var(--muted);
}
.verdict__reason {
  margin: 0;
  max-width: 54ch;
  padding-left: 16px;
  border-left: 4px solid var(--ink);
  font: 500 clamp(1.12rem, 2.4vw, 1.3rem)/1.4 var(--serif);
}

.result {
  padding: clamp(24px, 4.5vw, 44px);
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--sheet);
  box-shadow: 6px 6px 0 var(--ink);
}
.result.is-new { animation: card-in .5s var(--ease) both; }
.result__text {
  max-width: 26ch;
  font: 700 clamp(1.5rem, 4.6vw, 2.5rem)/1.15 var(--serif);
  letter-spacing: -.02em;
}
.result__text:focus-visible { outline-offset: 8px; }
.result__score {
  display: inline-block;
  font-size: 2.1em;
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--coral-ink);
}
.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

@media (min-width: 960px) {
  .game { grid-template-columns: minmax(0, 760px) 250px; justify-content: space-between; gap: 48px; align-items: start; }
  .folders { order: 2; grid-template-columns: 1fr; gap: 30px; padding-top: 4px; }
  .folder { min-height: 96px; }
  .game__desk { order: 1; }
}

/* ---------- the route of a post (conveyor) ---------- */

.belt {
  --p: 1;
  --n: 4;
  --row: max(96px, 6rem);
  --pic: 64px;
  position: relative;
  container-type: inline-size;
}
.belt[data-steps="2"] { --n: 2; }
.belt[data-steps="3"] { --n: 3; }
.belt[data-steps="4"] { --n: 4; }
.belt[data-steps="5"] { --n: 5; }
.belt[data-steps="6"] { --n: 6; }
.belt[data-steps="7"] { --n: 7; }
.belt[data-steps="8"] { --n: 8; }
.belt.belt--io { --p: 0; }
.belt.belt--io.is-running { animation: belt-run 4.4s cubic-bezier(.45, .05, .35, 1) .15s both; }
@keyframes belt-run {
  from { --p: 0; }
  to { --p: 1; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .belt {
      animation: belt-run linear both;
      animation-timeline: view();
      animation-range: cover 18% cover 58%;
    }
  }
}

.belt__stations {
  display: grid;
  grid-auto-rows: var(--row);
  margin: 0;
  padding: 0 0 0 62px;
  list-style: none;
}
.station {
  --i: 0;
  --c: calc(var(--i) / (var(--n) - 1));
  --a: clamp(0, (var(--p) - var(--c) - .02) * 30, 1);
  --near: clamp(0, 1 - max(var(--c) - var(--p), var(--p) - var(--c)) * 9, 1);
  position: relative;
  display: grid;
  grid-template-columns: var(--pic) minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
}
.station:nth-child(2) { --i: 1; }
.station:nth-child(3) { --i: 2; }
.station:nth-child(4) { --i: 3; }
.station:nth-child(5) { --i: 4; }
.station:nth-child(6) { --i: 5; }
.station:nth-child(7) { --i: 6; }
.station:nth-child(8) { --i: 7; }
.station:last-child { --c: .94; }

.pic {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--paper);
}
.sprite {
  --sx: 0%;
  --sy: 0%;
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 400%;
  max-width: none;
  translate: var(--sx) var(--sy);
}
.sprite--dispatch { --sx: 0%; --sy: 0%; }
.sprite--scout { --sx: -25%; --sy: 0%; }
.sprite--scribe { --sx: -50%; --sy: 0%; }
.sprite--painter { --sx: -75%; --sy: 0%; }
.sprite--auditor { --sx: 0%; --sy: -25%; }
.sprite--treasurer { --sx: -25%; --sy: -25%; }
.sprite--operator { --sx: -50%; --sy: -25%; }
.sprite--host { --sx: -75%; --sy: -25%; }
/* rows 3-4 of the sprite hold the same faces with closed eyes */
@keyframes blink {
  0% { translate: var(--sx) var(--sy); }
  50% { translate: var(--sx) calc(var(--sy) - 50%); }
  100% { translate: var(--sx) var(--sy); }
}
@keyframes idle-blink {
  0% { translate: var(--sx) var(--sy); }
  96% { translate: var(--sx) calc(var(--sy) - 50%); }
  99% { translate: var(--sx) var(--sy); }
}

.station__pic {
  width: var(--pic);
  border: 3px solid var(--ink);
  border-radius: 14px;
  scale: calc(1 + .1 * var(--near));
  rotate: calc(var(--near) * -4deg);
}
.station__pic--human img { width: 100%; padding: 6%; }
.station__pic--tray { background: var(--sheet); }
.station__pic--tray svg { width: 100%; padding: 8%; }
.station__text { display: grid; gap: 4px; }
.station__no {
  font: 700 .74rem/1 var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
}
.station__label { font: 700 1.02rem/1.3 var(--mono); overflow-wrap: anywhere; hyphens: auto; }
.station__done {
  position: absolute;
  left: calc(var(--pic) - 14px);
  top: calc(50% - var(--pic) / 2 - 10px);
  width: 26px;
  height: 26px;
  opacity: var(--a);
  scale: calc(1.7 - .7 * var(--a));
}
.station__done circle { fill: var(--ink); }
.station__done path { fill: none; stroke: var(--paper); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.belt__track {
  position: absolute;
  left: 20px;
  top: calc(var(--row) / 2);
  width: 18px;
  height: calc(var(--row) * (var(--n) - 1));
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--sheet);
}
.belt__rollers {
  position: absolute;
  inset: -60px 0;
  background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(15, 27, 55, .38) 9px 12px);
  translate: 0 calc(var(--p) * 60px - 30px);
}
.belt__sheet {
  position: absolute;
  left: 13px;
  top: calc(var(--row) / 2 - 20px);
  width: 32px;
  height: 40px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: var(--sheet);
  box-shadow: 3px 3px 0 var(--ink);
  translate: 0 calc(var(--p) * var(--row) * (var(--n) - 1));
  rotate: calc(4deg - var(--p) * 8deg);
}
.belt__lines {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 6px;
  height: 16px;
  background: repeating-linear-gradient(180deg, var(--ink) 0 2.5px, transparent 2.5px 6px);
  opacity: .55;
  clip-path: inset(0 calc((1 - clamp(0, (var(--p) - .06) * 5, 1)) * 100%) 0 0);
}
.belt__mark {
  --i: 0;
  --c: calc(var(--i) / (var(--n) - 1));
  --a: clamp(0, (var(--p) - var(--c) - .01) * 30, 1);
  position: absolute;
  width: 15px;
  height: 9px;
  border: 2.5px solid var(--coral-ink);
  border-radius: 2px;
  opacity: var(--a);
  scale: calc(1.9 - .9 * var(--a));
}
.belt__mark[data-step="1"] { --i: 1; }
.belt__mark[data-step="2"] { --i: 2; }
.belt__mark[data-step="3"] { --i: 3; }
.belt__mark[data-step="4"] { --i: 4; }
.belt__mark[data-step="5"] { --i: 5; }
.belt__mark[data-step="6"] { --i: 6; }
.belt__mark[data-step="7"] { --i: 7; }
.belt__mark:nth-child(2) { left: 3px; bottom: 4px; rotate: -12deg; }
.belt__mark:nth-child(3) { right: 3px; bottom: 6px; rotate: 10deg; border-color: var(--ink); }
.belt__mark:nth-child(4) { left: 8px; top: 3px; rotate: 6deg; }

@media (min-width: 760px) {
  .belt { --pic: min(104px, calc(100cqi / var(--n) - 24px)); }
  .belt__stations {
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
    grid-auto-rows: auto;
    padding: 0;
  }
  .station {
    grid-template-columns: 1fr;
    grid-template-rows: var(--pic) 78px auto;
    justify-items: center;
    text-align: center;
    padding-inline: 8px;
  }
  .station__text { grid-row: 3; justify-items: center; }
  .station__label { font-size: clamp(.95rem, 1.5vw, 1.08rem); }
  .station__done { left: calc(50% + var(--pic) / 2 - 16px); top: -10px; width: 30px; height: 30px; }
  .belt__track {
    left: calc(50% / var(--n));
    right: calc(50% / var(--n));
    top: calc(var(--pic) + 52px);
    width: auto;
    height: 18px;
  }
  .belt__rollers {
    inset: 0 -80px;
    background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(15, 27, 55, .38) 10px 13px);
    translate: calc(var(--p) * 80px - 40px) 0;
  }
  .belt__sheet {
    left: calc(50cqi / var(--n) - 17px);
    top: calc(var(--pic) + 52px - 42px);
    width: 34px;
    height: 42px;
    translate: calc(var(--p) * (100cqi - 100cqi / var(--n))) 0;
  }
}

/* ---------- staff directory ---------- */

.team {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.team > li { display: grid; }

.badge {
  --lift: 0px;
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 26px 16px 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: 5px 5px 0 var(--ink);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift));
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.badge::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 40px;
  height: 9px;
  transform: translateX(-50%);
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
}
@media (hover: hover) {
  .badge:hover { --lift: -5px; box-shadow: 8px 10px 0 var(--ink); }
}
.badge__no {
  position: absolute;
  top: 8px;
  right: 12px;
  font: 700 .72rem/1 var(--mono);
  letter-spacing: .12em;
  color: var(--muted);
}
.badge__photo { position: relative; display: block; }
.badge__pic {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 10px;
}
.badge .sprite { animation: idle-blink 7s steps(1, end) infinite; }
.team > li:nth-child(2) .sprite { animation-duration: 8.2s; animation-delay: -2.1s; }
.team > li:nth-child(3) .sprite { animation-duration: 6.4s; animation-delay: -4.6s; }
.team > li:nth-child(4) .sprite { animation-duration: 9.1s; animation-delay: -1.3s; }
.team > li:nth-child(5) .sprite { animation-duration: 7.6s; animation-delay: -5.2s; }
.team > li:nth-child(6) .sprite { animation-duration: 8.8s; animation-delay: -3.4s; }
.team > li:nth-child(7) .sprite { animation-duration: 6.9s; animation-delay: -6.1s; }
.badge:hover .sprite { animation: blink .32s steps(1, end) 2; }
/* Host is on hold: eyes stay closed, photo greyed, and a readable "on hold" stamp (text, not colour alone) */
.badge--hold .sprite,
.badge--hold:hover .sprite { animation: none; filter: grayscale(1); opacity: .72; }
.badge--hold { border-style: dashed; background: var(--paper); box-shadow: none; }
.stamp--hold {
  --c: var(--coral-ink);
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 1;
  padding: 5px 8px 4px;
  font-size: .78rem;
  letter-spacing: .1em;
  background: var(--sheet);
  transform: translate(-50%, -50%) rotate(-12deg);
}
.badge--human { background: var(--coral); }
.badge--human .badge__no { color: var(--ink); }
.badge__pic--human { background: var(--sheet); }
.badge__pic--human img { width: 100%; padding: 8%; }
.badge__text { display: grid; gap: 8px; }
.badge__name {
  font-size: clamp(1.4rem, 3.4vw, 1.75rem);
  letter-spacing: -.02em;
}
.badge__role {
  font-size: .98rem;
  line-height: 1.45;
}

@media (min-width: 720px) {
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
  .badge {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 34px 20px 22px;
  }
  .badge__pic,
  .badge__photo { width: min(100%, 150px); }
  .badge__photo .badge__pic { width: 100%; }
}

/* ---------- board + pause ---------- */

.duo__grid {
  display: grid;
  gap: clamp(56px, 8vw, 88px);
}
@media (min-width: 960px) {
  .duo__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}

.ledger {
  position: relative;
  padding: clamp(22px, 4vw, 36px);
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--sheet);
  box-shadow: 6px 6px 0 var(--ink);
}
.ledger .sec-head { margin-bottom: 18px; }
.ledger .sec-head h2 { font-size: clamp(2.1rem, 7vw, 3.4rem); }
.ledger__updated {
  font: 600 .85rem/1.2 var(--mono);
  color: var(--muted);
}
.rows { margin: 0; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 13px 0 12px;
  border-bottom: 1.5px dashed rgba(15, 27, 55, .4);
}
.row dt {
  font: 700 .92rem/1.2 var(--mono);
  letter-spacing: .05em;
}
.row dd {
  margin: 0;
  font: 700 clamp(1.7rem, 5vw, 2.2rem)/1 var(--serif);
  font-variant-numeric: tabular-nums;
}
.row--stop { border-bottom: 5px double var(--ink); }
.row--stop dd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.lamp {
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--sheet);
}
.row--stop.is-on .lamp { background: var(--coral); animation: lamp 1.4s steps(1, end) infinite; }
@keyframes lamp {
  0% { background: var(--coral); }
  50% { background: var(--sheet); }
}
.row--addr { grid-template-columns: 1fr; gap: 10px; }
.row--addr dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font: inherit;
}
.addr {
  padding: 6px 9px;
  border: 1.5px solid rgba(15, 27, 55, .3);
  border-radius: 6px;
  background: var(--paper);
  font: 600 .86rem/1.4 var(--mono);
  word-break: break-all;
}
.btn--copy.is-done { --bg: var(--coral); }
.btn--link .ico { width: 16px; height: 16px; }
.ledger__note {
  margin-top: 12px;
  font: 600 .88rem/1.4 var(--mono);
  color: var(--coral-ink);
}
.ledger__note:empty { display: none; }
.stamp--stop {
  position: absolute;
  z-index: 3;
  top: -20px;
  right: -8px;
  padding: 8px 16px 6px;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  letter-spacing: .08em;
  background: var(--sheet);
  pointer-events: none;
  transform: rotate(-13deg);
}
.stamp--stop.is-waiting { opacity: 0; }
.stamp--stop.stamp--drop { animation-name: stop-drop; }
@keyframes stop-drop {
  0% { opacity: 0; transform: translateY(-130px) scale(2.1) rotate(-26deg); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
  55% { opacity: 1; transform: translateY(0) scale(.9) rotate(-12deg); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(-13deg); }
}
.notice {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 2px solid var(--coral-ink);
  border-radius: 8px;
  color: var(--coral-ink);
  font: 700 .95rem/1.4 var(--mono);
}
.unavailable {
  display: grid;
  justify-items: start;
  gap: 18px;
  padding: 8px 0 6px;
}
.unavailable .stamp { font-size: 1.3rem; }

.pause {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
.pause .sec-head { justify-items: center; margin-bottom: 6px; }
.pause .sec-head h2 { font-size: clamp(2.1rem, 7vw, 3.4rem); }

.pause-toy {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 6px;
  border: 0;
  border-radius: 24px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pause-toy:focus-visible { outline: none; }
.pause-toy:focus-visible .pause-toy__face { outline: 4px solid var(--coral-ink); outline-offset: 7px; }
.pause-toy__face {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(190px, 56vw, 250px);
  aspect-ratio: 1;
  border: 6px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
  transition: transform .2s var(--ease);
}
/* the only highlight: a short glint top-left, like the button on the mascot's head */
.pause-toy__face::before,
.pause-toy__face::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: var(--coral-soft);
}
.pause-toy__face::before { left: 17%; top: 20%; width: 17%; height: 7%; transform: rotate(-42deg); }
.pause-toy__face::after { left: 13%; top: 32%; width: 5.5%; height: 5.5%; }
.pause-toy__bars,
.pause-toy__play {
  grid-area: 1 / 1;
  width: 74%;
  fill: var(--cream);
  stroke: var(--ink);
  stroke-width: 4.5;
  stroke-linejoin: round;
  transition: opacity .2s, transform .3s var(--ease);
}
.pause-toy__play { opacity: 0; transform: scale(.4) rotate(-90deg); }
.pause-toy[aria-pressed="true"] .pause-toy__bars { opacity: 0; transform: scale(.4) rotate(90deg); }
.pause-toy[aria-pressed="true"] .pause-toy__play { opacity: 1; transform: none; }
.pause-toy:active .pause-toy__face { transform: translateY(8px) scale(1.03, .92); }
@media (hover: hover) {
  .pause-toy:hover .pause-toy__face { transform: translateY(-4px); }
  .pause-toy:hover:active .pause-toy__face { transform: translateY(8px) scale(1.03, .92); }
}
.pause-toy__shadow {
  width: 62%;
  height: 16px;
  margin-top: 10px;
  border-radius: 50%;
  background: rgba(15, 27, 55, .2);
}
.pause-toy__label {
  margin-top: 14px;
  font: 700 clamp(1.7rem, 5vw, 2.2rem)/1 var(--serif);
  letter-spacing: -.02em;
}
.pause__status {
  max-width: 40ch;
  min-height: 3em;
  font: 600 1rem/1.5 var(--mono);
}
.pause__count { font: 700 .9rem/1.3 var(--mono); color: var(--muted); }
.pause__note { font-size: .92rem; color: var(--muted); }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: 700 .9rem/1.2 var(--mono);
  cursor: pointer;
}
.switch__track {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--sheet);
  transition: background-color .2s;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform .2s var(--ease);
}
.switch[aria-pressed="true"] .switch__track { background: var(--coral); }
.switch[aria-pressed="true"] .switch__track::after { transform: translateX(18px); }
@media (forced-colors: active) {
  .switch__track, .switch__track::after { forced-color-adjust: none; }
  .switch__track { border-color: ButtonText; background: Canvas; }
  .switch__track::after { background: ButtonText; }
  .switch[aria-pressed="true"] .switch__track { background: Highlight; border-color: Highlight; }
  .switch[aria-pressed="true"] .switch__track::after { background: HighlightText; }
}

/* ---------- footer ---------- */

.foot {
  padding-block: clamp(56px, 9vw, 110px);
  background: var(--ink);
  color: var(--paper);
}
.foot__grid {
  display: grid;
  gap: 28px;
}
.foot__head { display: grid; justify-items: start; align-content: start; gap: 16px; }
.foot h2 { font-size: clamp(2.1rem, 7vw, 3.6rem); letter-spacing: -.035em; }
.form-no--inv { background: transparent; border-color: var(--paper); color: var(--paper); }
.foot__text {
  display: grid;
  gap: 16px;
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.foot__wallet { font: 600 .95rem/1.55 var(--mono); }
#foot-wallet { word-break: break-all; }
.foot__explorer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--coral-soft);
  font: 700 .95rem/1.2 var(--mono);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.foot__explorer a:focus-visible { outline-color: var(--coral-soft); outline-offset: 2px; }
.foot__explorer .ico { width: 18px; height: 18px; }
.foot__privacy {
  padding-top: 18px;
  border-top: 1.5px dashed rgba(253, 239, 224, .4);
  font: 600 .88rem/1.4 var(--mono);
  color: var(--coral-soft);
}
@media (min-width: 960px) {
  .foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 56px; }
  .foot__privacy { grid-column: 2; }
}

/* ---------- freeze (the pause button) ---------- */

.freezable { transition: filter .45s ease; }
body { transition: background-color .45s ease; }
html.is-paused body {
  --margin-line: rgba(120, 120, 120, .5);
  --rule: rgba(40, 40, 40, .07);
  background-color: #F1F1F1;
}
html.is-paused .freezable { filter: grayscale(1); }
html.is-paused .freezable,
html.is-paused .freezable *,
html.is-paused .freezable *::before,
html.is-paused .freezable *::after { animation-play-state: paused !important; }
/* section reveals keep working, otherwise unrevealed content would stay invisible while paused */
html.is-paused .reveal { animation-play-state: running !important; }

.freeze-bar {
  position: fixed;
  z-index: 60;
  top: 12px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 30px rgba(15, 27, 55, .25);
  transform: translateX(-50%);
}
.freeze-bar[hidden] { display: none; }
.freeze-bar .stamp { --c: var(--coral-soft); font-size: 1.05rem; transform: rotate(-6deg); }
.freeze-bar :focus-visible { outline-color: var(--coral-soft); }
.freeze-bar .btn { --fg: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .freeze-bar:not([hidden]) { animation: bar-in .35s var(--ease); }
}
@keyframes bar-in {
  from { opacity: 0; transform: translate(-50%, -24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Konami toast ---------- */

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100% - 28px, 440px);
  padding: 18px 20px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: 6px 6px 0 var(--ink);
  opacity: 0;
  transform: translate(-50%, 24px);
  transition: opacity .25s, transform .35s var(--ease);
}
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast .stamp { flex: none; font-size: 1rem; }
.toast__text { font: 700 1rem/1.4 var(--mono); }

/* ---------- 404 ---------- */

.nf {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
}
.nf__main {
  display: grid;
  justify-items: start;
  gap: 22px;
  padding-block: 60px;
}
.nf__main h1 { font-size: clamp(3rem, 12vw, 6rem); letter-spacing: -.045em; }
.nf__main .stamp { font-size: 1.4rem; }

/* ---------- scroll reveals (only where scroll-driven animations exist) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes reveal {
  from { opacity: 0; translate: 0 30px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .belt { animation: none !important; --p: 1; }
  .badge { transform: none !important; }
  .badge .sprite { animation: none !important; }
}

/* ---------- print ---------- */

@media print {
  body { background: none; }
  .skip, .freeze-bar, .toast, .pause, .belt__track, .belt__sheet, .hero__links { display: none !important; }
  .reveal { animation: none !important; opacity: 1 !important; }
  .foot { background: none; color: var(--ink); }
  .badge, .ledger, .draft, .result { box-shadow: none; }
}
