@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
/* Overpass Mono (Highway Gothic lineage): signage figures for times and check ids, kin to the hanging bench signs. */
@font-face { font-family: "Overpass Mono"; src: url("fonts/overpass-mono.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

/* Palette lifted from comp A: the pegboard wall (ground), bench paper (panel), and one identity colour per
   character. Agent colours mean "who acted", so they are the only colour on the page besides ink. */
:root {
  --ground: #E6E4E0; --panel: #F6F5F2; --panel-2: #EDEBE7; --ink: #20232A; --ink-2: #484C55; --ink-3: #5E626B;
  --rule: #D3D0CA; --focus: #2453A6;
  --surveyor: #1C6A5F; --surveyor-bg: #D3E8E2;
  --builder: #994612; --builder-bg: #F5DAC5;
  --inspector: #5B4796; --inspector-bg: #E2DCF2;
  --reviewer: #4A6510; --reviewer-bg: #E0EAC6;
  --navigator: #2350A0; --navigator-bg: #D5E1F5;
  --scout: #484C55; --scout-bg: #E4E1DC;
  --owner: #20232A; --owner-bg: #E4E1DC;
  --sign: #E8DEC8; /* the hanging bench-sign paper in comp A */
  --shadow: 0 1px 2px rgb(60 52 40 / .08), 0 10px 24px -14px rgb(60 52 40 / .32);
  --r: 10px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1A1C20; --panel: #23262B; --panel-2: #2A2D33; --ink: #ECEAE6; --ink-2: #C3C1BC; --ink-3: #A6A49F;
    --rule: #3A3D44; --focus: #8FB1EE;
    --surveyor: #7FCBBE; --surveyor-bg: #1F3A36;
    --builder: #F0A673; --builder-bg: #45301F;
    --inspector: #B9A9EA; --inspector-bg: #332C4A;
    --reviewer: #B5D16B; --reviewer-bg: #303A1C;
    --navigator: #8FB1EE; --navigator-bg: #22314B;
    --scout: #C3C1BC; --scout-bg: #33363C;
    --owner: #ECEAE6; --owner-bg: #3A3D44;
    --sign: #3B352B;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.55 "Archivo", system-ui, sans-serif; font-stretch: 100%; }
::selection { background: var(--builder-bg); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
h1, h2, h3 { font-stretch: 112%; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; font-weight: 800; }
.lede { color: var(--ink-2); max-width: 62ch; margin: 14px 0 0; text-wrap: pretty; }
.mono { font-family: "Overpass Mono", ui-monospace, monospace; font-size: .84em; font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--panel); padding: 12px 16px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* top bar */
.top { display: flex; align-items: center; gap: 28px; height: 64px; }
.mark { font-weight: 800; font-stretch: 118%; font-size: 21px; letter-spacing: -0.02em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.top nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

/* hero = the line */
.hero { padding-block: 32px 72px; }
.hero h1 { font-size: clamp(32px, 3.9vw, 54px); line-height: 1.04; font-weight: 820; max-width: 34ch; }
.hero .lede { font-size: 19px; }
.ctas { display: flex; align-items: center; gap: 22px; margin-top: 24px; flex-wrap: wrap; }
.btn { appearance: none; border: 0; background: var(--ink); color: var(--panel); font: 600 16px/1 "Archivo", sans-serif;
  padding: 14px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; white-space: nowrap; transition: transform 160ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; }
.textlink { font-weight: 600; }

.line { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.agent { position: relative; }
.agent figure { margin: 0; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--panel-2); aspect-ratio: 5 / 4; }
.agent figure img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
p, dd, .rules li { text-wrap: pretty; }
.agent h3 { font-size: 20px; line-height: 1.3; font-weight: 750; margin: 14px 0 4px; display: flex; align-items: center; gap: 8px; }
.agent h3 .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.agent p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
/* hand-off arrow between benches */
.agent + .agent::before { content: ""; position: absolute; left: -15px; top: calc(20% + 2px); width: 9px; height: 9px;
  border-top: 2.5px solid var(--ink-3); border-right: 2.5px solid var(--ink-3); transform: rotate(45deg); }
.line-note { margin: 24px 0 0; font-size: 15px; color: var(--ink-3); max-width: 70ch; }

/* run */
section.band { padding-block: 80px; }
.run { background: var(--panel); border-block: 1px solid var(--rule); }
.run-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rounds { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.round { background: var(--panel-2); border-radius: var(--r); padding: 16px 18px; }
.round b { display: block; font-stretch: 112%; font-size: 17px; }
.verdict { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.round .verdict { margin: 6px 0 8px; }
.verdict.hold { background: var(--builder-bg); color: var(--builder); }
.verdict.pass { background: var(--surveyor-bg); color: var(--surveyor); }
.round p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.run-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; margin-top: 40px; align-items: start; }
.stage { position: sticky; top: 24px; }
.stage figure { margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 5 / 4; background: var(--c-bg, var(--panel-2)); box-shadow: var(--shadow); position: relative; }
.stage figure img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: opacity 200ms var(--ease-out), filter 200ms var(--ease-out); }
.stage figure.swap img { opacity: 0; filter: blur(3px); }
/* Scout and owner are not bench agents: a quiet card, not a portrait-sized shout */
.stage figure[data-mode="quiet"] { background: var(--panel-2); box-shadow: none; outline: 1px solid var(--rule); outline-offset: -1px; aspect-ratio: auto; height: 72px; }
.stage .mono-tile { position: absolute; inset: 0; display: flex; align-items: center; padding: 12px 22px; font-weight: 650; font-size: 17px; color: var(--ink-3); }
/* The last frame is the shipped proof */
.stage figure[data-mode="proof"] { background: var(--ink); }
.stage-proof { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px 26px; color: var(--panel); }
.stage-proof .k { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--surveyor-bg); color: var(--surveyor); }
.stage-proof b { font-size: clamp(20px, 2.2vw, 28px); font-stretch: 108%; font-weight: 750; letter-spacing: -0.01em; overflow-wrap: anywhere; line-height: 1.15; }
.stage-proof .for { font-size: 15px; color: color-mix(in srgb, var(--panel) 74%, transparent); }
.stage-link { margin-top: 16px; }
.stage .who { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; }
.stage .who b { font-size: 22px; font-stretch: 112%; color: var(--c); }
.stage .who span { color: var(--ink-3); }
.stage .what { font-size: 20px; line-height: 1.4; margin: 8px 0 0; min-height: 4.2em; text-wrap: pretty; }
.stage .count { color: var(--ink-3); font-size: 14px; margin: 10px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before, .steps .fill { content: ""; position: absolute; left: 83px; top: 16px; bottom: 16px; width: 2px; background: var(--rule); }
.steps .fill { background: var(--ink-3); transform-origin: top; transform: scaleY(var(--p, 0)); transition: transform 600ms var(--ease-out); }
.step button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 66px 36px 1fr; width: 100%;
  padding: 12px 12px 12px 0; border-radius: 8px; align-items: start; transition: background-color 160ms ease, opacity 220ms ease; }
.step button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.step .t { text-align: right; color: var(--ink-3); padding-top: 3px; }
.step .dot { justify-self: center; margin-top: 6px; width: 13px; height: 13px; border-radius: 4px; background: var(--panel); border: 2px solid var(--c); position: relative; z-index: 1;
  transition: background-color 200ms ease, transform 220ms var(--ease-out); }
.step .body { min-width: 0; }
.step .agent-name { font-weight: 700; color: var(--c); font-size: 14px; margin-right: 6px; }
.step .tag { font-size: 12px; padding: 2px 12px; margin-right: 6px; vertical-align: 1px; }
.step .txt { display: block; color: var(--ink); font-size: 15.5px; line-height: 1.45; }
/* Steps that have not happened yet in the replay: muted ink, still AA readable (opacity dimming failed contrast) */
.steps.playing .step:not(.done):not(.on) :is(.txt, .agent-name) { color: var(--ink-3); }
.steps.playing .step:not(.done):not(.on) .tag { background: transparent; color: var(--ink-3); outline: 1px solid var(--rule); }
.step.done .dot, .step.on .dot { background: var(--c); }
.step.on button { background: var(--c-bg); }
.step.on .dot { transform: scale(1.2); }
@media (hover: hover) and (pointer: fine) { .step button:hover { background: var(--panel-2); } .step.on button:hover { background: var(--c-bg); } }
.run-end { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.run-end { flex-direction: column; align-items: flex-start; }
.run-end p { margin: 0; color: var(--ink-2); font-size: 15px; }
.run-end .passed-title { color: var(--ink); font-weight: 700; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--surveyor-bg); color: var(--surveyor); }
.split { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; max-width: 70ch; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Section heads below the hero hang like the bench signs in comp A: a paper plaque on two strings */
h2.sign { display: inline-block; position: relative; margin-top: 22px; padding: 12px 22px 14px; border-radius: 6px;
  background: var(--sign); box-shadow: var(--shadow); font-size: clamp(28px, 3vw, 40px); }
h2.sign::before, h2.sign::after { content: ""; position: absolute; bottom: 100%; width: 2px; height: 22px; background: var(--ink-3); }
h2.sign::before { left: 22%; } h2.sign::after { right: 22%; }

/* decide */
.decide-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; margin-top: 44px; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; align-content: start; }
.rules li { font-size: 16.5px; color: var(--ink-2); max-width: 56ch; }
.rules li b { display: block; color: var(--ink); font-size: 22px; font-stretch: 108%; line-height: 1.25; font-weight: 720; margin-bottom: 4px; text-wrap: balance; }
.checks { background: var(--panel); border-radius: var(--r); padding: 26px 28px; box-shadow: var(--shadow); align-self: start; }
.checks h3 { font-size: 20px; font-weight: 750; }
.checks p.sub { margin: 6px 0 18px; font-size: 14.5px; color: var(--ink-3); }
.checks dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; font-size: 14.5px; }
.checks dt { font-weight: 700; color: var(--ink); line-height: 1.3; }
.checks dt code { font-family: "Overpass Mono", ui-monospace, monospace; font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.checks dd { margin: 3px 0 0; color: var(--ink-2); line-height: 1.4; }

/* shipped */
.tally { display: flex; flex-wrap: wrap; gap: 8px 44px; margin: 34px 0 0; padding: 0; list-style: none; }
.tally li { display: flex; align-items: baseline; gap: 10px; }
.tally b { font-size: 52px; font-weight: 800; font-stretch: 78%; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tally span { color: var(--ink-2); }
.proofs { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.proof a { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; background: var(--panel); border-radius: var(--r); padding: 18px 20px; text-decoration: none;
  box-shadow: var(--shadow); transition: transform 200ms var(--ease-out); }
.proof a:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .proof a:hover { transform: translateY(-2px); } .proof a:hover .kind span { text-decoration: underline; } }
.proof .co { font-weight: 750; font-size: 19px; font-stretch: 108%; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.proof .co small { font-size: 13px; font-weight: 600; color: var(--ink-3); font-stretch: 100%; white-space: nowrap; }
.proof .role { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; line-height: 1.4; }
.proof .kind { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.proof .kind b { color: var(--ink); font-weight: 650; white-space: nowrap; }
.proof .kind span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proof.feature a { background: var(--ink); color: var(--panel); }
.proof.feature .role, .proof.feature .kind, .proof.feature .co small { color: color-mix(in srgb, var(--panel) 76%, transparent); }
.proof.feature .kind b { color: var(--panel); }
.replied { font-size: 12px; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: var(--surveyor-bg); color: var(--surveyor); vertical-align: 2px; font-stretch: 100%; }
.own { margin-top: 60px; display: grid; grid-template-columns: max-content 1fr; gap: 12px 48px; align-items: baseline; }
.own h3 { font-size: 22px; font-weight: 750; }
.own ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 48px; }
.own li a { font-weight: 700; font-size: 18px; }
.own li span { display: block; color: var(--ink-2); font-size: 15px; }

footer { padding: 36px 0 52px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; }
.err { padding: 16px 18px; border-radius: var(--r); background: var(--builder-bg); color: var(--builder); margin: 8px 0 0; font-weight: 600; }

/* phone */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .top nav { display: none; }
  .hero { padding-block: 16px 52px; }
  .hero .lede { font-size: 17.5px; }
  .line { grid-template-columns: 1fr; gap: 26px; margin-top: 34px; }
  .agent { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: center; }
  .agent h3 { margin-top: 0; font-size: 19px; }
  .step button { scroll-margin-top: 200px; } /* the sticky stage is up to about 180px tall on phones (proof frame) */
  .agent p { font-size: 14.5px; }
  .agent + .agent::before { left: 58px; top: -19px; transform: rotate(135deg); }
  section.band { padding-block: 56px; }
  .rounds { grid-template-columns: 1fr; gap: 10px; }
  .run-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .stage { top: 0; z-index: 2; background: var(--panel); padding: 12px 0; display: grid; grid-template-columns: 84px 1fr; gap: 0 14px; align-items: center; border-bottom: 1px solid var(--rule); }
  .stage figure { grid-row: span 2; aspect-ratio: 1; border-radius: 8px; box-shadow: none; }
  .stage .mono-tile { padding: 12px; font-size: 13px; }
  .stage figure[data-mode="quiet"] { aspect-ratio: 1; height: auto; }
  .stage-proof { padding: 12px; justify-content: center; }
  .stage-proof b, .stage-proof .for { display: none; }
  .stage-proof .k { align-self: center; background: none; color: var(--panel); padding: 0; font-size: 13px; }
  .stage-link { grid-column: 2; margin-top: 8px; min-height: 40px; padding: 10px 16px; font-size: 15px; justify-self: start; }
  .stage .who { margin-top: 0; } .stage .who b { font-size: 17px; }
  .stage .what { font-size: 14.5px; min-height: 0; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .stage .count { display: none; }
  .steps::before, .steps .fill { left: 63px; }
  .step button { grid-template-columns: 46px 36px 1fr; }
  .decide-grid { grid-template-columns: 1fr; gap: 40px; }
  .rules li b { font-size: 19px; }
  .checks { padding: 22px 18px; }
  .checks dl { grid-template-columns: 1fr; gap: 14px; }
  .tally { gap: 14px 28px; } .tally b { font-size: 42px; }
  .own { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; }
}
