/* Layout: a blueprint drawing set you can operate. Full-bleed factory floor you light with the pointer, two doors (use it, build it), a pinned stage for the 7-scene journey, and panels the visitor drives. Single dark look by choice (user palette). Amber is reserved for the spec, the machine and the seal. */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }
:root {
  --bg: #0B1220;
  --bg-2: #0F1A2E;
  --paper: #123a63;
  --blue-deep: #1E3A8A;
  --blue: #3B82F6;
  --blue-soft: #8FB8FF;
  --ink: #E6EEF9;
  --ink-dim: #9FB2CC;
  --rule: #23324d;
  --spec: #FBBF24;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --nav-h: 56px;
  color-scheme: dark;
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
/* The sticky nav sits inside that padding band, so focusing one of its links scrolled the page by about 400 px (smooth) and raced with the Install jump. The negative margin takes the nav's own controls out of the band; every other focus target keeps the offset. */
nav.top a, nav.top button { scroll-margin-top: calc(-1 * (var(--nav-h) + 16px)); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--blue-soft); }
a:focus-visible, button:focus-visible, summary:focus-visible, pre:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 2px; }
button { font: inherit; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1240px; margin: 0 auto; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }

/* Skip link: off screen until it has focus (the one allowed hide of design 3), then over the nav. */
.skip { position: absolute; left: 16px; top: -100px; z-index: 40; padding: 10px 16px; border-radius: 3px; background: var(--ink); color: var(--bg); font: 600 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }
/* The programmatic focus target of the skip link needs no ring. */
main:focus { outline: none; }
/* Shared visually hidden text (design 3): only clipped away, never display:none. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }

nav.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
nav.top .wrap { min-height: var(--nav-h); display: flex; align-items: center; gap: 8px 20px; }
.brand { font: 600 20px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 10px; padding: 8px 5px; margin-left: -5px; } /* a usable target when only the 14px square shows */
.brand i { width: 14px; height: 14px; background: var(--spec); display: block; }
.links { display: flex; gap: 20px; margin-left: auto; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.links a { font: 500 16px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); text-decoration: none; white-space: nowrap; padding-block: 8px; }
.links a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 13px 20px 12px; border-radius: 3px; border: 1px solid var(--blue); background: var(--blue); color: #06101f; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--blue-soft); border-color: var(--blue-soft); }
.btn.ghost { background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.amber-btn { background: var(--spec); border-color: var(--spec); color: #1a1200; }
.btn.small { padding: 9px 12px 8px; font-size: 15px; }

section { padding-block: 72px; border-top: 1px solid var(--rule); }
.eyebrow { font: 600 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: clamp(42px, 6.4vw, 80px); line-height: .98; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; }
h3 { font-size: 24px; line-height: 1.1; }
p { margin: 0; }
.lede { color: var(--ink-dim); font-size: 18px; max-width: 58ch; }
.head { display: grid; gap: 12px; margin-bottom: 36px; }
.amber { color: var(--spec); }
.strip { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 12px/1 var(--mono); color: var(--ink-dim); }
.hint { font: 12px/1.4 var(--mono); color: var(--ink-dim); }

/* Hero: the words on clean navy at the left, the floor at the right as a silent looping movie, so no figure sits behind text. */
[hidden] { display: none !important; }
.hero { position: relative; border-top: 0; padding-block: 0; background: var(--bg); }
.hero-art, .hero-art video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { left: 46%; width: 54%; }
.hero-art video { object-fit: cover; object-position: 60% 50%; display: block; }
.hero-shade { background: linear-gradient(90deg, var(--bg) 0, var(--bg) 46%, transparent 62%); pointer-events: none; }
.hero .wrap { position: relative; padding-block: 104px 96px; display: grid; gap: 22px; justify-items: start; pointer-events: none; }
.hero .wrap > * { pointer-events: auto; }
.hero h1 { font-size: clamp(38px, 5.6vw, 72px); max-width: min(100%, 540px, 44vw); }
.hero .lede { color: var(--ink); max-width: 46ch; }
.motto { display: block; max-width: 17ch; }
.h1-sub { display: block; margin-top: 18px; font: 500 18px/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--blue-soft); }
.astext { margin-top: 24px; }
.astext summary { cursor: pointer; font: 12px/1.4 var(--mono); color: var(--ink-dim); padding-block: 4px; } /* a 24 px target */
.astext ol { display: grid; gap: 10px; margin-top: 14px; padding-left: 20px; max-width: 70ch; color: var(--ink-dim); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* Pause control (home.md F-2): a dark disc at the clip's bottom right corner, above the shade, never over the text. */
.pause { position: absolute; z-index: 2; right: 16px; bottom: 16px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent); background: color-mix(in srgb, var(--bg) 85%, transparent); cursor: pointer; }
.pause:hover { background: var(--bg); border-color: var(--ink); }
.pause svg { width: 16px; height: 16px; fill: var(--ink); }

/* Two doors */
.doors { border-top: 0; padding-block: 0; background: var(--bg-2); border-bottom: 1px solid var(--rule); }
.doors .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.door { display: grid; gap: 14px; align-content: start; padding: 32px 32px 36px 0; min-width: 0; }
.door + .door { padding-left: 32px; border-left: 1px solid var(--rule); }
.door:last-child { padding-right: 0; }
.door p { color: var(--ink-dim); max-width: 52ch; }
.door .n { font: 600 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }

.code { display: flex; align-items: stretch; background: #070d18; border: 1px solid var(--rule); border-radius: 4px; min-width: 0; }
.code pre { margin: 0; padding: 14px 16px; font: 14px/1.5 var(--mono); color: var(--ink); overflow-x: auto; flex: 1; min-width: 0; white-space: pre; }
/* The door commands are short, so they wrap and the whole command always shows; the long install line scrolls. */
.doors .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
/* min-width fits "Selected", the longest label, so Copy, Copied and Selected never move the code line. */
.code button { min-width: 6.5em; font: 600 15px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--bg-2); border: 0; border-left: 1px solid var(--rule); padding: 0 16px; cursor: pointer; border-radius: 0 4px 4px 0; }
.code button:hover { background: var(--blue-deep); }
/* From 901 to 1100 px a door column is about 250 px: Copy goes under the line so the command wraps to one or two rows, not three (UX F-6). */
@media (min-width: 901px) and (max-width: 1100px) {
  .doors .code { flex-direction: column; }
  .doors .code button { border-left: 0; border-top: 1px solid var(--rule); min-height: 36px; border-radius: 0 0 4px 4px; }
}

.gains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.gain { display: grid; gap: 10px; align-content: start; border-top: 2px solid var(--blue); padding-top: 16px; }
.gain p { color: var(--ink-dim); }
/* each gain is shown, not told: a close crop of the scene art (230% zoom), or the three model sizes */
.pic { position: relative; overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 4px; background: var(--paper); box-shadow: 0 0 0 1px var(--rule); }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
/* The 230% crops of design 3.1: offsets are (100% - 230%) x the mock's position, the top as a share of the 16:10 box for a 4:3 picture. */
.pic img.crop { position: absolute; width: 230%; height: auto; max-width: none; object-fit: fill; }
.crop-review { left: -105.3%; top: -65.12%; }
.crop-seal { left: -89.7%; top: -80.96%; }
.pic.models { overflow: visible; display: grid; align-content: center; gap: 8px; padding: 14px; background: var(--bg-2); }
.pic.models span { font: 500 12px/1 var(--mono); padding: 8px 10px; border-radius: 3px; border: 1px solid var(--blue); background: color-mix(in srgb, var(--blue) 22%, transparent); width: var(--w); min-width: max-content; }
.w34 { --w: 34%; }
.w62 { --w: 62%; }
.w92 { --w: 92%; }
/* 680 px shows "open-software-factory" of the install line at 1280 (UX F-5); the line scrolls for the rest. */
.hero .code { max-width: min(100%, 680px, 54vw); }

/* Journey */
@property --cx { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --cy { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --rx { syntax: "<percentage>"; inherits: false; initial-value: 80%; }
@property --ry { syntax: "<percentage>"; inherits: false; initial-value: 80%; }
@property --a { syntax: "<number>"; inherits: false; initial-value: 0; }
/* The static layout is the base: scripts off, or a viewport 600 px tall or less (home.md F-15). The pinned stage is #how[data-enhanced] at 601 px tall and up, the same break as the matchMedia in app.js. */
.journey { display: grid; gap: 32px; }
.stage { display: grid; gap: 12px; }
.rail { display: flex; gap: 6px; }
.rail a { flex: 1; min-width: 0; font: 600 13px/1 var(--display); letter-spacing: .1em; color: var(--ink-dim); text-decoration: none; border-top: 3px solid var(--rule); padding: 9px 0 6px; }
.rail a[data-passed] { border-color: var(--blue); }
.rail a[aria-current="step"] { border-color: var(--ink); color: var(--ink); }
.rail a:hover { color: var(--ink); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.chapter { display: grid; gap: 14px; align-content: start; }
.slot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 4px; box-shadow: 0 0 0 1px var(--rule); }
.card { display: grid; gap: 12px; max-width: 44ch; min-width: 0; justify-items: start; }
.card .num { font: 600 14px/1 var(--display); letter-spacing: .14em; color: var(--blue); text-transform: uppercase; }
.card h3 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; }
.approve-row { display: grid; gap: 12px; justify-items: start; padding-top: 6px; }
.approve-row [aria-disabled="true"] { cursor: default; }
.who-card { min-height: 66px; border: 1px solid var(--rule); border-radius: 4px; background: var(--bg-2); padding: 12px 14px; display: grid; gap: 4px; align-content: center; }
.who-name { font: 600 18px/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.who-text { color: var(--ink-dim); font-size: 14px; line-height: 1.45; }
@media (min-width: 901px) {
  .journey { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; }
  .stage { grid-column: 1 / -1; }
  .chapters { grid-column: 2; }
}
/* Landscape phone or short window: picture and title side by side, the picture sized by the free height so both show at once. */
@media (max-height: 600px) {
  .journey { grid-template-columns: minmax(0, 1fr); }
  .stage, .chapters { grid-column: auto; }
  .chapter { grid-template-columns: min(100%, calc((100vh - var(--nav-h) - 48px) * 4 / 3)) minmax(0, 1fr); align-items: center; gap: 24px; }
}
/* Enhanced journey: a pinned stage of seven crossfading layers beside (or, at 900 px and under, above) the chapters. */
.frame { position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; border-radius: 4px; background: var(--paper); box-shadow: 0 0 0 1px var(--rule), 0 30px 60px -30px #000; }
.layer { position: absolute; inset: 0; opacity: 0; }
.art { position: absolute; inset: 0; will-change: transform; }
.art .slot, .art .slot img, .unfit, .dim { position: absolute; inset: 0; width: 100%; height: 100%; }
.art .slot img { border-radius: 0; box-shadow: none; object-fit: cover; }
/* the grey "not fitted yet" copy of an amber part: it fades out when the agent fits the part */
.unfit { background-size: cover; background-position: center; transition: opacity .7s .3s; }
.unfit[data-state="fitted"] { opacity: 0; }
/* the work light: everything but the acting agent goes dim */
.dim { pointer-events: none; background: radial-gradient(ellipse var(--rx) var(--ry) at var(--cx) var(--cy), transparent 0 60%, rgba(6, 11, 24, var(--a)) 100%); transition: --cx .7s, --cy .7s, --rx .7s, --ry .7s, --a .7s; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.overlay g { opacity: 0; transition: opacity .3s; }
.overlay g.on { opacity: 1; }
.overlay .ring { fill: none; stroke: var(--blue); stroke-width: 3; opacity: 0; transition: opacity .4s; }
.overlay .ring.on { opacity: 1; }
.overlay .spec-solid { fill: none; stroke: var(--spec); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; opacity: .9; }
.overlay, .tags { z-index: 3; } /* above the art, inside the layer */
.tags { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; transform: translateY(-50%); font: 600 clamp(12px, 1.05vw, 14px)/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: color-mix(in srgb, var(--bg) 84%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent); padding: 5px 7px 4px; border-radius: 2px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .45s, background .2s; cursor: pointer; }
/* A fade, not a clip wipe: a clip-path in mid-transition lets clicks fall through to the picture. A label not yet shown takes no pointer, but keeps its place in the tab order. */
/* A transparent extension: the hit box is at least 24 by 24 px, the drawn size is unchanged (home.md F-3). */
.tag::after { content: ""; position: absolute; inset: -4px 0; } /* vertical only: a sideways overflow would count as clipped text in the layout check, and a label is wider than 24 px */
.tag:hover, .tag[aria-pressed="true"] { background: var(--blue-deep); border-color: var(--blue-soft); }
.tag.l { transform: translate(-100%, -50%); }
.tag.t { transform: translate(-50%, -100%); }
.tag.on { opacity: 1; pointer-events: auto; }
.tag.act { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.tag.spec-tag { color: #1a1200; background: var(--spec); border-color: var(--spec); }
@media (min-height: 601px) {
  #how[data-enhanced] .stage { grid-column: 1; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + 20px); align-self: start; }
  #how[data-enhanced] .chapters { grid-column: 2; gap: 0; }
  /* The whole stage (frame, rail, who-card) stays inside the viewport: the frame gives up width, not the card, when the window is short. */
  #how[data-enhanced] .frame { width: min(100%, calc((100vh - var(--nav-h) - 220px) * 4 / 3)); justify-self: start; }
  #how[data-enhanced] .chapter { display: flex; align-items: flex-start; padding-top: 22vh; }
  #how[data-enhanced] .card { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + 22vh); }
}
@media (min-height: 601px) and (max-width: 900px) {
  #how[data-enhanced] .journey { gap: 0; }
  #how[data-enhanced] .stage, #how[data-enhanced] .chapters { grid-column: 1; }
  #how[data-enhanced] .stage { z-index: 5; background: var(--bg); padding-bottom: 10px; top: calc(env(safe-area-inset-top, 0px) + var(--nav-h)); }
  #how[data-enhanced] .who-card { min-height: 64px; align-content: start; }
  #how[data-enhanced] .card { top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + var(--stage-h, 440px) + 12px); } /* under the pinned picture */
  #how[data-enhanced] .chapter { padding-top: 8vh; }
}
@keyframes stamp { 0% { transform: translate(-50%, -100%) scale(2.2); opacity: 0; } 60% { transform: translate(-50%, -100%) scale(.92); opacity: 1; } 100% { transform: translate(-50%, -100%) scale(1); } }
.tag.stamped { animation: stamp .5s cubic-bezier(.2,.7,.2,1); }

/* Operable panels: triage desk and roster */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: start; }
.picks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* Scripts off: the five requests are plain text. Once the triage section is enhanced, each holds a button. */
.picks li { border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; line-height: 1.35; }
#triage[data-enhanced] .picks li { border: 0; padding: 0; }
.pick { width: 100%; text-align: left; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; cursor: pointer; font-size: 16px; line-height: 1.35; display: flex; gap: 12px; align-items: baseline; }
.pick::before { content: ">"; font-family: var(--mono); color: var(--blue); }
.pick:hover { border-color: var(--blue); }
.pick[aria-pressed="true"] { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.panel { border: 1px solid var(--rule); border-radius: 4px; background: var(--bg-2); padding: 24px; display: grid; gap: 16px; min-width: 0; }
.panel .path { font: 600 34px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.panel p { color: var(--ink-dim); }
#triage-answer { display: grid; gap: 16px; }
.lineup { display: flex; flex-wrap: wrap; gap: 8px; }
/* Called and not called differ by a tick or a strike, not by colour alone (home.md F-4); the words are in the .vh text. */
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); padding: 8px 10px; border-radius: 3px; border: 1px solid var(--rule); color: var(--ink-dim); text-decoration: line-through; }
.chip.yes { color: var(--ink); border-color: var(--blue); background: color-mix(in srgb, var(--blue) 18%, transparent); text-decoration: none; }
.chip.yes::before { content: ""; width: 4px; height: 8px; margin-bottom: 3px; border: solid var(--blue-soft); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.why { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--ink-dim); }
.why b { color: var(--ink); font-weight: 500; }

.beats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; counter-reset: beat; }
.beats li { counter-increment: beat; display: grid; gap: 8px; align-content: start; padding: 22px 16px 0 0; border-top: 2px solid var(--rule); position: relative; min-width: 0; }
.beats li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue); }
.beats li:last-child::before { background: var(--spec); border-color: var(--spec); }
.beats b { font: 600 20px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.beats b::before { content: counter(beat, decimal-leading-zero) " "; color: var(--blue); }
.beats span { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.runnote { margin-top: 32px; color: var(--ink-dim); max-width: 78ch; border-left: 2px solid var(--blue); padding-left: 16px; }

.team-grid { display: grid; gap: 32px; align-items: start; }
#team[data-enhanced] .team-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
/* The generated list (make_roster.py): every agent shown with scripts off, one at a time once the buttons exist. */
ul.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.roster li { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.roster li + li { border-top: 1px solid var(--rule); padding-top: 20px; }
#team[data-enhanced] .roster li { border: 0; padding: 0; }
.roster li > * { max-width: 100%; }
.roster a { overflow-wrap: anywhere; }
.excerpt { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 var(--mono); color: var(--ink); background: #070d18; border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; }
.names { display: flex; flex-wrap: wrap; gap: 8px; }
.name { font: 600 18px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 11px 13px 10px; cursor: pointer; }
.name:hover { border-color: var(--blue); }
.name[aria-pressed="true"] { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 18%, transparent); }
.name.plus { border-style: dashed; border-color: var(--blue-soft); color: var(--blue-soft); }
/* a dot shows the model each agent runs on: ring = Haiku, blue = Sonnet, white = Opus */
[data-m]:not([data-m=""])::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; box-sizing: border-box; border: 2px solid var(--blue-soft); }
[data-m="s"]::before { background: var(--blue); border-color: var(--blue); }
[data-m="o"]::before { background: var(--ink); border-color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 12px/1 var(--mono); color: var(--ink-dim); }
.panel dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.panel dt { font: 12px/1.9 var(--mono); color: var(--ink-dim); text-transform: uppercase; }
.panel dd { margin: 0; color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; max-width: 920px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px; padding-block: 24px; border-top: 1px solid var(--rule); }
.steps > li::before { content: counter(step); font: 600 40px/1 var(--display); color: var(--blue); }
.steps .body { display: grid; gap: 10px; min-width: 0; }
.steps p { color: var(--ink-dim); max-width: 66ch; }

.proof { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.movie { aspect-ratio: 16 / 9; max-width: 100%; background: linear-gradient(135deg, var(--bg-2), var(--blue-deep)); border: 1px solid var(--rule); border-radius: 4px; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--ink); text-decoration: none; }
.movie .play { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; margin: 0 auto 14px; }
.movie .play::after { content: ""; border-left: 22px solid var(--ink); border-block: 14px solid transparent; margin-left: 6px; }
.movie-body { display: grid; justify-items: center; }
.movie b { font: 600 22px/1.2 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.movie .ext { width: 16px; height: 16px; margin-top: 8px; fill: var(--ink-dim); }
/* The link is the whole panel, so hover and keyboard focus ring it like a control (UX U-6). */
.movie:hover, .movie:focus-visible { border-color: var(--blue-soft); }
.movie:hover .play, .movie:focus-visible .play { border-color: var(--blue-soft); }
.movie:hover .ext, .movie:focus-visible .ext { fill: var(--blue-soft); }
.stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
/* Three stats: one column beside the movie, three across once the proof stacks, one again on phones (no empty cell, UX F-7). */
@media (min-width: 601px) and (max-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat b { display: block; font: 600 64px/1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-dim); }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover span, a.stat:focus-visible span { color: var(--blue-soft); text-decoration: underline; }

/* Closing invitation */
.join { background: var(--blue-deep); border-top: 0; }
.join .wrap { display: grid; gap: 28px; }
.join h2 { font-size: clamp(34px, 5vw, 60px); max-width: 22ch; }
.join .eyebrow { color: var(--ink); }
.join h2 a { color: inherit; }
.join .lede { color: var(--ink); }
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: way; }
/* The 1 to 4 are drawn, not typed, so the page holds no bare number the claims check cannot source. */
.way b::before { counter-increment: way; content: counter(way) ". "; }
.way { display: grid; gap: 8px; align-content: start; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 4px; padding: 20px; text-decoration: none; color: var(--ink); min-width: 0; }
.way:hover { border-color: var(--ink); }
.way b { font: 600 22px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.way span { color: color-mix(in srgb, var(--ink) 78%, transparent); font-size: 14px; line-height: 1.5; }

.faq { display: grid; max-width: 880px; }
.faq details { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding-block: 18px; font: 600 22px/1.2 var(--display); letter-spacing: .02em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--blue); font-family: var(--mono); font-weight: 400; }
.faq details[open] > summary::after { content: "-"; }
.faq .more > summary { color: var(--ink-dim); }
.faq p { color: var(--ink-dim); padding-bottom: 20px; max-width: 70ch; }

footer .wrap { padding-block: 32px 48px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font: 13px/1.4 var(--mono); color: var(--ink-dim); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer nav a { padding-block: 4px; }

/* A deliberate departure from the mock, which keeps four columns to 900 px: below about 1000 px a four-column gain is too narrow for the longest bar label (12 px floor), and .pic.models is overflow: visible, so the label would spill. Two columns from 1000 px down. */
@media (max-width: 1000px) {
  .gains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  section { padding-block: 52px; }
  /* narrow screens: the words on top, the floor in a band under them */
  .hero-art { left: 0; top: auto; width: 100%; height: 260px; }
  .hero-shade { background: linear-gradient(180deg, var(--bg) 0, var(--bg) calc(100% - 260px), transparent 100%); }
  .hero .wrap { padding-block: 56px 276px; }
  .pause { bottom: 12px; right: max(12px, env(safe-area-inset-right, 0px)); }
  .hero h1, .hero .code { max-width: 100%; }
  .doors .wrap, .proof, .desk, #team[data-enhanced] .team-grid { grid-template-columns: minmax(0, 1fr); }
  .door, .door + .door { padding: 32px 0; border-left: 0; }
  .door + .door { border-top: 1px solid var(--rule); }
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beats { grid-template-columns: minmax(0, 1fr); }
  .beats li { padding: 0 0 22px 28px; border-top: 0; border-left: 2px solid var(--rule); }
  .beats li::before { top: 2px; left: -7px; }
  .links a.hide-s { display: none; }
}
@media (max-width: 520px) {
  .gains, .ways { grid-template-columns: minmax(0, 1fr); }
  .steps > li { grid-template-columns: 36px minmax(0, 1fr); }
  .steps > li::before { font-size: 30px; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag, .dim, .unfit, .overlay .ring { transition: none; }
  .tag.stamped { animation: none; }
}
