:root {
  --bg: #f0e9e0;
  --paper: #faf8f4;
  --ink: #15161a;
  --ink-2: #4b4d55;
  --dim: #6b6c72;
  --line: #d9d4cb;
  --accent: #ff5a1f;
  --accent-ink: #d9430d;
  --warn: #c8321f;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Space Grotesk", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--mono); font-size: 12px; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* phones zoom the whole page out to fit anything that pokes out sideways, even when body hides it;
   clipping at main stops that, and clip (unlike hidden) keeps the sticky scenes inside working */
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.accent { color: var(--accent); }
.eyebrow { font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--ink-2); text-transform: uppercase; }
.eyebrow.dim { color: var(--dim); font-weight: 500; }
section { scroll-margin-top: 0; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; transition: opacity .7s ease, visibility .7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { width: min(360px, 80vw); display: grid; gap: 10px; }
.loader-num { font-family: var(--display); font-size: 88px; font-weight: 700; line-height: .9; }
.loader-num small { font-size: 28px; color: var(--accent); }
.loader-bar { height: 3px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.loader-msg { color: var(--dim); font-size: 11px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px clamp(16px, 3vw, 40px);
  background: linear-gradient(var(--bg) 40%, rgba(240, 233, 224, 0));
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.mark { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; }
.nav nav { display: flex; gap: 4px; background: rgba(250, 248, 244, .8); border: 1px solid var(--line); border-radius: 999px; padding: 4px; backdrop-filter: blur(10px); }
.nav nav a { padding: 7px 14px; border-radius: 999px; font-size: 11px; font-weight: 500; transition: background .2s, color .2s; }
.nav nav a:hover, .nav nav a.on { background: var(--ink); color: #fff; }
.nav-status { font-size: 10px; letter-spacing: .12em; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.nav-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 90, 31, .18); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 90, 31, 0); } }

/* ---------- teardown ---------- */
.teardown { height: 720vh; position: relative; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#frames { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.callouts { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.callout {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  background: rgba(250, 248, 244, .92); border: 1px solid var(--line); padding: 6px 9px; font-size: 10px;
  letter-spacing: .06em; opacity: 0; transition: opacity .35s, transform .35s;
  box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .3);
}
.callout b { display: block; font-size: 10.5px; letter-spacing: .1em; }
.callout span { color: var(--accent-ink); }
.callout.on { opacity: 1; }
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(255, 90, 31, 0), rgba(255, 90, 31, .05), rgba(255, 90, 31, 0));
  animation: scan 6s linear infinite;
}
@keyframes scan { from { transform: translateY(-120px); } to { transform: translateY(100vh); } }

/* --lift is the scroll fade's upward slide (app.js); the card is a size container so the title can fit its width */
.hero-copy {
  position: absolute; left: clamp(16px, 4vw, 64px); top: 50%; transform: translateY(calc(-46% - var(--lift, 0px)));
  width: clamp(300px, 26vw, 420px); z-index: 4; transition: opacity .4s, transform .4s; container-type: inline-size;
}
.hero-side {
  position: absolute; right: clamp(16px, 4vw, 64px); top: 50%; transform: translateY(-50%); z-index: 4;
  width: min(240px, 17vw); display: grid; gap: 14px; transition: opacity .4s;
}
.side-stat { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-stat span { font-size: 9px; letter-spacing: .14em; color: var(--dim); }
.side-stat b { font-family: var(--display); font-size: clamp(22px, 2vw, 32px); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cta {
  margin-top: 6px; display: inline-flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 12px 14px; font-weight: 700; font-size: 11px; letter-spacing: .06em;
  transition: background .2s;
}
.cta i { font-style: normal; color: var(--accent); }
.cta:hover { background: var(--accent); }
.cta:hover i { color: #fff; }
.phone-only { display: none !important; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 700; font-size: 11px; white-space: nowrap; }
.chip b { color: var(--accent); }
.chip.ghost { background: transparent; font-weight: 500; }
.x { color: var(--dim); }
/* "Superintelligence" is ~7.9em wide and cannot wrap: 12.4cqi keeps it inside the card */
.hero-copy h1 {
  font-family: var(--display); font-weight: 700; font-size: min(clamp(34px, 3.1vw, 54px), 12.4cqi);
  line-height: .9; letter-spacing: -.035em; margin: 0;
}
.slash { color: var(--accent); }
.kicker { font-size: 10px; letter-spacing: .75em; color: var(--ink-2); margin: 16px 0 22px; text-wrap: balance; }
.lede { font-size: 13px; line-height: 1.65; color: var(--ink-2); max-width: 400px; margin: 0 0 28px; }
.hero-stats { display: flex; gap: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.hero-stats div { display: grid; gap: 4px; }
.hero-stats span { font-size: 9px; letter-spacing: .14em; color: var(--dim); }
.hero-stats b { font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }

.chapters { position: absolute; left: clamp(16px, 4vw, 64px); top: 50%; transform: translateY(-50%); width: min(300px, 19vw); z-index: 4; }
.chapter { position: absolute; top: 0; left: 0; transform: translateY(-50%); opacity: 0; transition: opacity .45s, transform .45s; pointer-events: none; }
.chapter.on { opacity: 1; }
.chapter h2 { font-family: var(--display); font-size: clamp(26px, 2.4vw, 40px); line-height: .98; letter-spacing: -.02em; margin: 12px 0 14px; }
.chapter p { font-size: 13px; line-height: 1.65; color: var(--ink-2); margin: 0; }
.chapter .eyebrow { color: var(--accent-ink); }
.chapter-link { display: inline-block; margin-top: 16px; font-weight: 700; font-size: 11px; letter-spacing: .06em; border-bottom: 1.5px solid var(--accent); padding-bottom: 3px; pointer-events: auto; }
.chapter.on { pointer-events: auto; }

.hud {
  position: absolute; left: clamp(16px, 4vw, 64px); right: clamp(16px, 4vw, 64px); bottom: 28px; z-index: 4;
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; font-size: 10px; letter-spacing: .12em;
}
.hud-left, .hud-right { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.hud b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hud-track { height: 2px; background: var(--line); position: relative; }
.hud-track i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.ticks { position: absolute; inset: -4px 0; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%); opacity: .9; }
.scroll-hint {
  position: absolute; left: clamp(16px, 4vw, 64px); bottom: 64px; z-index: 4;
  font-size: 10px; letter-spacing: .16em; color: var(--ink-2); display: flex; align-items: center; gap: 10px; transition: opacity .4s;
}
.scroll-hint span { width: 18px; height: 28px; border: 1.5px solid var(--ink-2); border-radius: 10px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 6px; margin-left: -1px; background: var(--accent); border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
.corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--ink); z-index: 4; pointer-events: none; }
.corner.tl { left: 14px; top: 74px; border-right: 0; border-bottom: 0; }
.corner.tr { right: 14px; top: 74px; border-left: 0; border-bottom: 0; }
.corner.bl { left: 14px; bottom: 14px; border-right: 0; border-top: 0; }
.corner.br { right: 14px; bottom: 14px; border-left: 0; border-top: 0; }

/* ---------- evolution ---------- */
.evolution { height: 520vh; position: relative; background: var(--bg); }
.evo-sticky { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 72px); align-items: center; padding: 90px clamp(16px, 4vw, 64px) 40px; }
.evo-stage { height: 100%; display: grid; place-items: center; }
.evo-frame { position: relative; width: min(100%, calc(100svh - 150px)); aspect-ratio: 1; border: 1px solid var(--line); background: #f1ede6; overflow: hidden; }
.evo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); transform: scale(1.04); }
.evo-frame img.on { opacity: 1; transform: scale(1); }
.evo-badge { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; align-items: center; background: var(--ink); color: #fff; padding: 6px 10px; font-size: 10px; letter-spacing: .1em; z-index: 2; }
.evo-badge b { color: var(--accent); font-weight: 700; }
.evo-title { font-family: var(--display); font-size: clamp(32px, 4vw, 60px); line-height: .98; letter-spacing: -.025em; margin: 12px 0 24px; }
.evo-title em { font-style: normal; color: var(--accent); }
.evo-list { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.evo-list li { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--dim); transition: color .3s, padding .3s; cursor: pointer; }
.evo-list li b { font-family: var(--display); font-size: 18px; font-weight: 700; }
.evo-list li q { font-size: 11px; quotes: none; }
.evo-list li.on { color: var(--ink); padding-left: 8px; }
.evo-list li.on span:first-child { color: var(--accent); }
/* throughput carries its unit, so it gets the widest cell */
.evo-metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.6fr); border: 1px solid var(--line); background: var(--paper); }
.evo-metrics div { padding: 12px; display: grid; gap: 5px; border-right: 1px solid var(--line); }
.evo-metrics div:last-child { border-right: 0; }
.evo-metrics span { font-size: 9px; letter-spacing: .14em; color: var(--dim); }
.evo-metrics b { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.evo-chart { margin-top: 14px; border: 1px solid var(--line); background: var(--paper); padding: 10px 12px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
#scale-chart { width: 100%; display: block; margin-top: 8px; }

/* ---------- systems ---------- */
.systems, .specs { max-width: 1320px; margin: 0 auto; padding: 140px clamp(16px, 4vw, 48px) 40px; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-family: var(--display); font-size: clamp(36px, 5vw, 76px); line-height: .95; letter-spacing: -.03em; margin: 12px 0 14px; }
.section-head p { font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sys { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.sys-img { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }
.sys-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.sys:hover .sys-img img { transform: scale(1.06); }
.sys-body { padding: 20px; display: grid; gap: 8px; }
.sys-body .eyebrow { color: var(--accent-ink); }
.sys h3 { font-family: var(--display); font-size: 24px; margin: 0; letter-spacing: -.01em; }
.sys p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--ink-2); }
.sys dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 10px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11px; }
.sys dt { color: var(--dim); }
.sys dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- specs ---------- */
.spec-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); align-content: start; }
.spec div { background: var(--paper); padding: 18px; }
.spec span { display: block; font-size: 9.5px; letter-spacing: .12em; color: var(--dim); margin-bottom: 8px; }
.spec b { font-family: var(--display); font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.spec b.accent { color: var(--accent); }
.spec b.bad { color: var(--warn); }
.console { background: var(--ink); color: #e9e6e0; padding: 20px; display: grid; gap: 14px; align-content: start; }
.console .eyebrow { color: #a7a39b; }
.console b { font-family: var(--display); font-size: 20px; color: var(--accent); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), #3a3b41 var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 3px; background: #3a3b41; }
input[type=range]::-moz-range-progress { height: 3px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 22px; margin-top: -9.5px; background: var(--accent); border: 0; border-radius: 2px; }
input[type=range]::-moz-range-thumb { width: 14px; height: 22px; background: var(--accent); border: 0; border-radius: 2px; }
.warn { background: var(--warn); color: #fff; font-weight: 700; font-size: 10px; letter-spacing: .1em; padding: 8px 10px; opacity: 0; transition: opacity .3s; }
.warn.on { opacity: 1; animation: blink .6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.log { height: 168px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 11px; line-height: 1.55; color: #bdb9b1; }
.log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: in .35s ease-out; }
.log em { font-style: normal; color: var(--accent); }
.log .t { color: #77746e; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- outro ---------- */
.outro { max-width: 1320px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px) 120px; text-align: center; }
.outro img { width: min(1100px, 100%); margin: 0 auto 40px; border-radius: 6px; box-shadow: 0 40px 80px -40px rgba(10, 20, 40, .5); }
.outro .big { font-family: var(--display); font-size: clamp(40px, 7vw, 104px); line-height: .95; letter-spacing: -.03em; font-weight: 700; margin: 0 0 24px; }
.outro .fine { max-width: 520px; margin: 0 auto; color: var(--dim); font-size: 11px; line-height: 1.6; }

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.sys.reveal:nth-child(2) { transition-delay: .1s; }
.sys.reveal:nth-child(3) { transition-delay: .2s; }


/* ---------- crew mode ---------- */
.crew { max-width: 1440px; margin: 0 auto; padding: 140px clamp(16px, 4vw, 48px) 60px; }
.crew-head { display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 40px; align-items: end; margin-bottom: 28px; }
.crew-head h2 { font-family: var(--display); font-size: clamp(40px, 5.6vw, 88px); line-height: .92; letter-spacing: -.035em; margin: 12px 0 0; }
.crew-head p { font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 0; }
.proto { display: inline-block; white-space: nowrap; line-height: 1.2; font-style: normal; margin-left: 10px; padding: 3px 7px; border: 1px solid var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 9px; }
/* an eyebrow that carries the pill drops it to its own line whole, flush left */
.eyebrow:has(> .proto) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.eyebrow > .proto { margin-left: 0; }

.crew-stage { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: stretch; }
.crew-machine { container: machine / inline-size; position: relative; align-self: start; min-width: 0; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.crew-machine img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(120% 110% at 58% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(120% 110% at 58% 50%, #000 62%, transparent 100%); }
.hotspots { position: absolute; inset: 0; }
/* the pin, not the whole button, sits on its part and the tag hangs off to one side (--r: the pin's radius) */
.hotspot {
  --r: 11px; position: absolute; transform: translate(calc(-1 * var(--r)), -50%); border: 0; padding: 0; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px; font: inherit; color: var(--ink);
}
.hotspot .pin { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 90, 31, .22); flex: none; }
.hotspot .pin::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2s infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.hotspot .tag { background: rgba(250, 248, 244, .95); border: 1px solid var(--line); padding: 5px 8px; font-size: 10px; letter-spacing: .08em; white-space: nowrap; text-align: left; box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .35); transition: background .2s, color .2s; }
.hotspot .tag b { display: block; font-size: 10.5px; }
.hotspot .tag span { color: var(--accent-ink); }
.hotspot.left { flex-direction: row-reverse; transform: translate(calc(var(--r) - 100%), -50%); }
.hotspot:hover .tag, .hotspot.on .tag { background: var(--ink); color: #fff; border-color: var(--ink); }
.hotspot:hover .tag span, .hotspot.on .tag span { color: var(--accent); }
.hotspot.on .pin { background: var(--ink); }
/* the tags sit at fixed points of the picture: on a narrower picture they drop the desk line, on a phone they go */
@container machine (max-width: 780px) {
  .hotspot { gap: 6px; }
  .hotspot .tag { padding: 4px 6px; }
  .hotspot .tag span { display: none; }
}
@container machine (max-width: 540px) {
  .hotspot { --r: 6px; }
  .hotspot .tag { display: none; }
  .hotspot .pin { width: 12px; height: 12px; box-shadow: 0 0 0 3px rgba(255, 90, 31, .22); }
  .hotspot .pin::after { inset: -5px; }
}

.role-card { background: var(--paper); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.role-card h3 { font-family: var(--display); font-size: 30px; margin: 4px 0 0; letter-spacing: -.02em; }
.role-card .sub { color: var(--accent-ink); }
.role-card p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--ink-2); }
.seats { display: grid; gap: 6px; }
.seat-bar { display: flex; height: 8px; background: var(--line); overflow: hidden; }
.seat-bar i { display: block; height: 100%; }
.seat-bar .a { background: var(--ink); }
.seat-bar .r { background: #a5532a; }
.seat-nums { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .06em; color: var(--ink-2); }
.seat-nums b { color: var(--ink); }
.counts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 11px; }
.counts li { display: flex; gap: 8px; }
.counts li::before { content: "→"; color: var(--accent); }
.roster { display: grid; gap: 0; border-top: 1px solid var(--line); }
.member { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px; color: #fff; }
.member small { display: block; color: var(--dim); font-size: 10px; margin-top: 2px; }
.status { font-size: 9px; letter-spacing: .1em; padding: 3px 6px; border-radius: 999px; font-weight: 700; }
.status.active { background: rgba(21, 22, 26, .08); color: var(--ink); }
.status.rusting { background: rgba(165, 83, 42, .14); color: #8a4119; }
.role-card .cta { margin-top: auto; border: 0; cursor: pointer; font-family: inherit; }

.crew-totals { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--paper); margin-top: 18px; }
.crew-totals div { padding: 16px 18px; border-right: 1px solid var(--line); display: grid; gap: 6px; }
.crew-totals div:last-child { border-right: 0; }
.crew-totals span { font-size: 9.5px; letter-spacing: .12em; color: var(--dim); }
.crew-totals b { font-family: var(--display); font-size: 28px; font-variant-numeric: tabular-nums; }

.manifest { margin-top: 18px; border: 1px solid var(--line); background: var(--paper); padding: 18px; position: relative; }
.legend { display: flex; gap: 16px; font-size: 10px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i, .cell { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.c-active { background: var(--ink); }
.c-rust { background: repeating-linear-gradient(45deg, #a5532a 0 3px, #c4703f 3px 6px); }
.c-open { background: transparent; box-shadow: inset 0 0 0 1px #b9b2a6; }
.grid214 { display: grid; grid-template-columns: repeat(auto-fill, minmax(20px, 1fr)); gap: 5px; margin-top: 14px; }
.cell { width: 100%; height: auto; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; transition: transform .15s, outline-color .15s; outline: 2px solid transparent; outline-offset: 1px; }
.cell:hover { transform: scale(1.25); }
.cell.dim { opacity: .18; }
.cell.hl { outline-color: var(--accent); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; font-size: 10.5px; line-height: 1.5; white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity .15s; z-index: 5; }
.tip b { color: var(--accent); }

.rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 18px; }
.rules div { background: var(--paper); padding: 20px; }
.rules b { color: var(--accent); font-size: 11px; }
.rules h3 { font-family: var(--display); font-size: 19px; margin: 8px 0 6px; }
.rules p { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-2); }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(21, 22, 26, .45); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.apply { position: relative; width: min(460px, 100%); background: var(--paper); border: 1px solid var(--line); padding: 26px; display: grid; gap: 12px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); }
.apply[hidden] { display: none; }
.apply h3 { font-family: var(--display); font-size: 28px; margin: 0; letter-spacing: -.02em; }
.apply label { display: grid; gap: 6px; font-size: 10px; letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; }
.apply input, .apply select, .apply textarea { font: 13px var(--mono); color: var(--ink); background: #fff; border: 1px solid var(--line); padding: 10px; text-transform: none; letter-spacing: 0; border-radius: 0; }
.apply input:focus, .apply select:focus, .apply textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.apply .cta { border: 0; cursor: pointer; font-family: inherit; }
.apply .note { margin: 0; font-size: 10px; color: var(--dim); }
.apply p { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); margin: 0; }
.x-close { position: absolute; right: 12px; top: 10px; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink-2); }

@media (max-width: 1000px) {
  .crew-head, .crew-stage { grid-template-columns: 1fr; }
  .crew-head { gap: 14px; }
  .crew-totals, .rules { grid-template-columns: repeat(2, 1fr); }
  .crew-totals div:nth-child(2) { border-right: 0; }
  .crew-totals div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .legend { flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
}

/* ---------- scene mode: frosted panels so copy stays readable over the station ---------- */
body.scene .hero-copy, body.scene .hero-side, body.scene .chapter, body.scene .callout, body.scene .hud {
  background: rgba(250, 248, 244, .78); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 20px 50px -30px rgba(10, 20, 40, .45);
}
body.scene .hero-copy { padding: 26px 26px 22px; border-radius: 4px; }
body.scene .hero-side { padding: 18px 18px 18px; border-radius: 4px; }
body.scene .chapter { padding: 22px; border-radius: 4px; }
body.scene .hud { padding: 10px 16px; border-radius: 4px; }
body.scene .scroll-hint { background: rgba(250, 248, 244, .78); backdrop-filter: blur(10px); padding: 8px 12px; border-radius: 999px; }
body.scene.over-scene .nav { background: linear-gradient(rgba(21, 22, 26, .35), rgba(21, 22, 26, 0)); }
body.scene.over-scene .nav .brand, body.scene.over-scene .nav-status { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
body.scene .corner { border-color: #fff; }
body.scene .scan { display: none; }
body.scene .hero-copy h1 { font-size: min(clamp(32px, 2.8vw, 50px), 12.4cqi); }


/* ---------- join the crew console ---------- */
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta { background: var(--accent); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .04em; padding: 9px 14px; border-radius: 999px; box-shadow: 0 6px 20px -8px rgba(255, 90, 31, .7); transition: transform .15s; }
.nav-cta:hover { transform: translateY(-1px); }
.join { max-width: 1440px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px) 60px; }
.jc { border: 1px solid var(--line); background: var(--paper); }
.jc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.jc-tabs button { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 16px 18px; text-align: left; background: none; border: 0; border-right: 1px solid var(--line); cursor: pointer; color: var(--dim); transition: background .2s, color .2s; }
.jc-tabs button:last-child { border-right: 0; }
.jc-tabs button b { color: var(--line); margin-right: 8px; }
.jc-tabs button.on { background: var(--ink); color: #fff; }
.jc-tabs button.on b { color: var(--accent); }
.jc-pane { padding: clamp(18px, 2.4vw, 32px); }
.jc-pane[hidden] { display: none; }
.jc .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; border: 1px solid var(--line); background: #fff; transition: border-color .3s, background .3s; }
.step .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 1.5px solid var(--ink); }
.step.done { border-color: var(--accent); background: #fffaf6; }
.step.done .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.done .num::before { content: "✓"; }
.step.done .num { font-size: 0; }
.step.done .num::before { font-size: 15px; }
.step h3 { font-family: var(--display); font-size: 20px; margin: 4px 0 4px; }
.step p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.step-out { margin-top: 10px; font-size: 12px; }
.step-out .ok { color: #1f7a3f; font-weight: 700; }
.step-out .bad { color: var(--warn); font-weight: 700; }
.btn-step { font: inherit; font-size: 11px; font-weight: 700; padding: 10px 14px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; white-space: nowrap; }
.btn-step:disabled { background: transparent; color: var(--dim); border-color: var(--line); cursor: default; }
/* the field keeps room for its whole placeholder; on narrow phones the button drops under it */
.x-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; max-width: 420px; }
.x-row input { flex: 1 1 10.5em; font: 13px var(--mono); padding: 10px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.x-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.desks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.desks button { font: inherit; font-size: 11px; font-weight: 700; padding: 9px 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; border-radius: 999px; transition: all .2s; }
.desks button small { display: block; font-weight: 500; color: var(--dim); font-size: 9.5px; margin-top: 2px; }
.desks button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.desks button.on small { color: var(--accent); }
.seat-ready { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; background: var(--ink); color: #fff; }
.seat-ready[hidden] { display: none; }
.seat-ready .eyebrow { color: var(--accent); }
.seat-ready h3 { font-family: var(--display); font-size: 24px; margin: 6px 0 4px; }
.seat-ready p { margin: 0; font-size: 12px; color: #bdb9b1; }
.seat-ready .cta { border: 0; cursor: pointer; font-family: inherit; background: var(--accent); }

.q-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.link-btn { font: inherit; font-size: 11px; font-weight: 700; background: none; border: 0; color: var(--accent-ink); cursor: pointer; }
.drafts { display: grid; gap: 10px; }
.draft { border: 1px solid var(--line); background: #fff; padding: 14px; display: grid; gap: 10px; animation: in .35s ease-out; }
.draft p { margin: 0; font-size: 12.5px; line-height: 1.6; white-space: pre-line; }
.draft .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: var(--dim); letter-spacing: .06em; }
.draft button { font: inherit; font-size: 11px; font-weight: 700; padding: 7px 12px; border: 1.5px solid var(--ink); background: #fff; cursor: pointer; }
.draft button:disabled { border-color: var(--line); color: var(--dim); cursor: default; }
.queue { container: queue / inline-size; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qi { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); cursor: grab; transition: box-shadow .2s, opacity .2s; }
.qi.dragging { opacity: .4; }
.qi.over { box-shadow: 0 -3px 0 var(--accent) inset; }
.qi .grip { color: var(--dim); font-size: 14px; text-align: center; }
.qi p { margin: 0; font-size: 11.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qi .acts { display: flex; gap: 4px; }
.qi .acts button { font: inherit; font-size: 11px; width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.qi.top { border-color: var(--accent); background: #fffaf6; }
.qi .post { width: auto !important; padding: 0 10px; background: var(--accent) !important; color: #fff; border-color: var(--accent) !important; font-weight: 700; }
.qi.posted { opacity: .55; cursor: default; }
.qi.posted .post { background: #1f7a3f !important; border-color: #1f7a3f !important; }
/* a narrow queue puts the buttons under the draft, so the text keeps its width */
@container queue (max-width: 380px) {
  .qi { grid-template-columns: 22px minmax(0, 1fr); row-gap: 8px; }
  .qi .acts { grid-column: 1 / -1; justify-content: flex-end; }
}
.q-empty { font-size: 12px; color: var(--dim); padding: 18px; border: 1px dashed var(--line); text-align: center; }
.q-empty[hidden] { display: none; }
.streak { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ink-2); }
.streak b { color: var(--accent-ink); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); width: max-content; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 12px 16px; font-size: 12px; font-weight: 700; opacity: 0; transition: all .3s; z-index: 95; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--accent); }

.pay-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.me-card { background: var(--ink); color: #fff; padding: 18px; display: grid; gap: 10px; margin-bottom: 16px; }
.me-card .eyebrow { color: var(--accent); }
.me-card .big { font-family: var(--display); font-size: 40px; line-height: 1; }
.me-card .big small { font-size: 14px; color: #a7a39b; }
.me-card .kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 11px; color: #bdb9b1; }
.me-card .kv b { color: #fff; text-align: right; }
.controls { display: grid; gap: 10px; }
.controls b { font-family: var(--display); font-size: 20px; color: var(--accent-ink); }
.controls input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p, 20%), var(--line) var(--p, 20%)); }
.curves { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.curves button { font: inherit; font-size: 11px; font-weight: 700; padding: 10px 6px; border: 0; border-right: 1px solid var(--line); background: #fff; cursor: pointer; }
.curves button:last-child { border-right: 0; }
.curves button.on { background: var(--ink); color: #fff; }
.curve-note { font-size: 11.5px; line-height: 1.6; color: var(--ink-2); margin: 0; min-height: 74px; }
#pay-chart { width: 100%; display: block; background: #fff; border: 1px solid var(--line); }
.pay-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; background: #fff; }
.pay-stats div { padding: 12px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.pay-stats div:last-child { border-right: 0; }
.pay-stats span { font-size: 9px; letter-spacing: .12em; color: var(--dim); }
.pay-stats b { font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; }
.lb { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.lb .lr { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.lb .lr span:first-child { color: var(--dim); }
.lb .lr em { font-style: normal; color: var(--dim); font-size: 10.5px; }
.lb .lr b { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.lb .lr.me { background: #fffaf6; box-shadow: inset 3px 0 0 var(--accent); padding-left: 6px; }
.scoring { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 24px; }
.scoring div { background: #fff; padding: 14px 16px; display: grid; gap: 4px; }
.scoring b { font-family: var(--display); font-size: 22px; color: var(--accent-ink); }
.scoring span { font-size: 11px; color: var(--ink-2); }
@media (max-width: 1000px) {
  .nav-cta { padding: 8px 12px; font-size: 10.5px; }
  .nav-status { display: none; }
  .jc-tabs button { padding: 12px 10px; font-size: 11px; }
  .step { grid-template-columns: 34px minmax(0, 1fr); }
  .step .btn-step#btn-wallet { grid-column: 2; justify-self: start; }
  .q-grid, .pay-grid { grid-template-columns: 1fr; }
  .lb { grid-template-columns: 1fr; }
  .pay-stats, .scoring { grid-template-columns: repeat(2, 1fr); }
  .pay-stats div:nth-child(2) { border-right: 0; }
  .pay-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .seat-ready { flex-direction: column; align-items: flex-start; }
}
/* the narrowest phones: tighter console padding and smaller step numbers leave the fields their width */
@media (max-width: 400px) {
  .jc-pane { padding: 14px; }
  .step { padding: 14px; gap: 12px; grid-template-columns: 28px minmax(0, 1fr); }
  .step .num { width: 28px; height: 28px; }
}


/* ---------- console timeline ---------- */
.timeline { container: timeline / inline-size; border: 1px solid var(--line); background: #fff; padding: 14px; margin-bottom: 16px; transition: border-color .3s, background .3s; }
.timeline b { color: var(--ink); white-space: nowrap; }
.timeline .row > :first-child { text-wrap: balance; }
.timeline .row > :last-child { text-align: right; }
/* one equal column per day, labels centred under their circles; each day draws the track to the next circle */
.tl { --d: 28px; list-style: none; margin: 6px 0 10px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tl li { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; font-size: 9px; letter-spacing: .08em; color: var(--dim); text-align: center; }
.tl li:not(:last-child)::after { content: ""; position: absolute; top: calc(var(--d) / 2 - 1px); left: calc(50% + var(--d) / 2); width: calc(100% - var(--d)); height: 2px; background: var(--line); }
.tl i { width: var(--d); height: var(--d); border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; background: #fff; border: 2px solid var(--line); color: var(--dim); }
.tl .n-done i { background: #1f7a3f; border-color: #1f7a3f; color: #fff; }
.tl .n-miss i { background: #fff; border-color: var(--warn); color: var(--warn); }
.tl .n-pending i { border-color: var(--accent); color: var(--accent); animation: pulse-o 1.4s infinite; }
.tl .n-future i { border-style: dashed; }
@keyframes pulse-o { 50% { box-shadow: 0 0 0 6px rgba(255, 90, 31, .18); } }
/* narrow timelines: smaller circles and labels, and below that at most six days so the labels keep apart */
@container timeline (max-width: 300px) {
  .tl { --d: 24px; }
  .tl li { font-size: 8.5px; letter-spacing: .06em; }
  .tl i { font-size: 11px; }
}
@container timeline (max-width: 272px) {
  .tl li:nth-last-child(n+7) { display: none; }
}
.tl-msg { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.tl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: var(--ink-2); }
.tl-foot b { font-variant-numeric: tabular-nums; }
.timeline.t-safe { border-color: #1f7a3f; background: #f3faf5; }
.timeline.t-safe .tl-msg { color: #1f7a3f; }
.timeline.t-warn { border-color: #e0a21b; background: #fffaf0; }
.timeline.t-warn .tl-msg { color: #a06d00; }
.timeline.t-last { border-color: var(--accent); background: #fff4ee; }
.timeline.t-last .tl-msg { color: var(--accent-ink); }
.timeline.t-out { border-color: var(--warn); background: #fdf1ef; }
.timeline.t-out .tl-msg { color: var(--warn); }
@media (max-width: 1000px) {
}


.tl .n-joker i { background: #fff6e0; border-color: #e0a21b; color: #a06d00; }
.tl-note { margin: -4px 0 10px; font-size: 11.5px; color: #a06d00; }
/* the button drops under the text when the two can't share a line */
.joker { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; padding: 9px 10px; margin-bottom: 10px; background: #fffaf0; border: 1px dashed #e0a21b; font-size: 11px; color: var(--ink-2); }
.joker > span { flex: 1 1 17em; }
.joker b { color: #a06d00; letter-spacing: .1em; margin-right: 6px; }
.joker button { font: inherit; font-size: 11px; font-weight: 700; padding: 7px 10px; border: 1.5px solid #a06d00; background: #fff; color: #a06d00; cursor: pointer; white-space: nowrap; }
.joker button:hover { background: #a06d00; color: #fff; }


/* ---------- nav over dark explainer scenes ---------- */
.nav.on-dark { background: linear-gradient(rgba(21, 22, 26, .92) 30%, rgba(21, 22, 26, 0)); }
.nav.on-dark .brand, .nav.on-dark .nav-status { color: #f0e9e0; }
.nav.on-dark nav { background: rgba(21, 22, 26, .6); border-color: rgba(255, 255, 255, .14); }
.nav.on-dark nav a { color: #d9d4cb; }
.nav.on-dark nav a.on, .nav.on-dark nav a:hover { background: #f0e9e0; color: var(--ink); }

/* ---------- explainer chapter rail ---------- */
.rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.rail.on { opacity: 1; }
.rail a { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: .14em; font-weight: 700; color: var(--dim); }
/* the labels sit over the section text, so at rest only the ticks take the pointer (a taller hit box around the
   2px line); hovering one wakes the whole rail and its labels, on a backing of their own */
.rail i { width: 14px; height: 2px; padding: 5px 0; background: var(--line); background-clip: content-box; box-sizing: content-box; transition: width .25s, background .25s; }
.rail.on i, .rail.on:hover { pointer-events: auto; }
.rail span { opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; padding: 3px 7px; margin: -3px 0; border-radius: 3px; background: rgba(240, 233, 224, .94); box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .35); }
.rail.on:hover span, .rail.on:focus-within span { opacity: 1; transform: none; }
.rail a.cur { color: var(--accent-ink); }
.rail a.cur i { width: 24px; background: var(--accent); background-clip: content-box; }
@media (max-width: 1100px) { .rail { display: none; } }
body:has(.nav.on-dark) .rail a { color: #a7a39b; }
body:has(.nav.on-dark) .rail span { background: rgba(21, 22, 26, .94); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav nav { display: none; }
  body.scene.over-scene .nav .brand, body.scene.over-scene .nav-status { color: var(--ink); text-shadow: none; }
  /* one column: text scrolls right under the logo and the button, so the bar is a frosted band, not a fade */
  .nav, body.scene.over-scene .nav {
    padding-block: 12px; background: rgba(240, 233, 224, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(21, 22, 26, .07);
  }
  .nav.on-dark { background: rgba(21, 22, 26, .92); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
  .evo-info { container: evo-info / inline-size; }
  .evo-title { font-size: 28px; margin: 6px 0 12px; }
  .evo-list li { padding: 6px 0; }
  .evo-list li q, .evo-chart { display: none; }
  .evo-metrics div { padding: 10px 8px; gap: 4px; }
  .evo-metrics b { font-size: 15px; }
  .sys-grid, .spec-wrap { grid-template-columns: 1fr; }
  .spec { grid-template-columns: repeat(2, 1fr); }
}
/* evolution, portrait: one column, the frame takes the height the info leaves (the stage is a size container).
   Its row is never taller than the column is wide, so on tall screens frame and info centre as one group */
@media (max-width: 1000px) and (orientation: portrait) {
  .evo-sticky {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, calc(100vw - 2 * clamp(16px, 4vw, 64px))) auto;
    align-content: center; align-items: stretch; padding-top: 70px; padding-bottom: 24px; gap: 14px;
  }
  .evo-stage { container-type: size; }
  .evo-frame { width: min(100cqw, 100cqh); }
}
/* short portrait screens: a one-line title and tighter rows keep the frame a fair size */
@media (max-width: 1000px) and (orientation: portrait) and (max-height: 700px) {
  .evo-sticky { padding-top: 66px; padding-bottom: 16px; gap: 12px; }
  .evo-title { font-size: min(28px, 7.5cqi); margin: 4px 0 10px; }
  .evo-list { margin-bottom: 12px; }
  .evo-list li { padding: 4px 0; }
  .evo-list li b { font-size: 15px; }
  .evo-metrics div { padding: 8px; gap: 3px; }
  .evo-metrics b { font-size: 14px; }
}
/* evolution, landscape: frame and info side by side, the frame as tall as the screen allows */
@media (max-width: 1000px) and (orientation: landscape) {
  .evo-sticky { grid-template-columns: auto minmax(0, 1fr); padding-top: 66px; padding-bottom: 14px; gap: clamp(20px, 4vw, 40px); }
  .evo-frame { width: min(calc(100svh - 80px), 42vw); }
  .evo-title { font-size: min(32px, 7.5cqi); margin: 4px 0 10px; }
  .evo-list { margin-bottom: 12px; }
  .evo-list li { padding: 5px 0; }
  .evo-list li b { font-size: 16px; }
}
/* short landscape (a phone with its browser bars showing): no eyebrow, tighter rows and metrics */
@media (max-width: 1000px) and (orientation: landscape) and (max-height: 380px) {
  .evo-sticky { padding-top: 62px; padding-bottom: 10px; }
  .evo-frame { width: min(calc(100svh - 72px), 42vw); }
  .evo-info > .eyebrow { display: none; }
  .evo-title { font-size: min(26px, 7.5cqi); margin: 0 0 8px; }
  .evo-list { margin-bottom: 8px; }
  .evo-list li { padding: 3px 0; }
  .evo-list li b { font-size: 15px; }
  .evo-metrics div { padding: 6px; gap: 2px; }
  .evo-metrics b { font-size: 14px; }
}
/* the stage quotes come back wherever the info column has room for them */
@container evo-info (min-width: 420px) {
  .evo-list li q { display: block; }
}
/* short laptop screens (1280x720): the scaling chart goes, so the info column ends on screen */
@media (max-height: 760px) {
  .evo-chart { display: none; }
}
/* teardown without room for the two desktop columns (narrow or portrait): one copy card that carries the stats,
   compact chapter cards and HUD */
@media (max-width: 1000px), (orientation: portrait) {
  .hero-copy .lede, .kicker { display: none; }
  .hero-side { display: none; }
  .phone-only { display: flex !important; }
  /* clears the title's descenders, which hang below its .9 line box */
  .hero-stats { gap: 18px; margin-top: 14px; }
  .hero-stats b { font-size: 18px; }
  body.scene .hero-copy { padding: 16px; }
  .chapter { background: rgba(250, 248, 244, .9); padding: 14px; border: 1px solid var(--line); }
  .chapter h2 { font-size: 26px; margin: 8px 0; }
  .chapter p { font-size: 12px; }
  .scroll-hint { display: none; }
  .hud-track { display: none; }
  .hud { grid-template-columns: auto auto; justify-content: space-between; }
  .hud-left span { white-space: nowrap; }
  .callout { font-size: 9px; padding: 4px 6px; }
  .callout b { font-size: 9px; }
}
/* the smallest phones: tighter HUD tracking so "LIVE · ASSEMBLY 100%" and the frame count share one line */
@media (max-width: 370px) {
  .hud { letter-spacing: .06em; }
  .hud-left, .hud-right { gap: 8px; }
}
/* portrait: the scene sits at the top (app.js computeFit switches on the same query), the cards along the bottom */
@media (orientation: portrait) {
  .hero-copy, .chapters { top: auto; bottom: 90px; width: auto; right: clamp(16px, 4vw, 64px); }
  .hero-copy { transform: translateY(calc(-1 * var(--lift, 0px))); }
  .chapters { transform: none; }
  .chapter { top: auto; bottom: 0; right: 0; transform: none; }
}
/* short portrait screens: the chips go, so the card leaves the dog in view */
@media (orientation: portrait) and (max-height: 600px) {
  .chip-row { display: none; }
}
/* landscape phones and small windows: the scene fills the screen and the copy is a narrow column left of the
   machine, centred between the top bar and the HUD */
@media (max-width: 1000px) and (orientation: landscape) {
  .hero-copy, .chapters { top: calc(50% - 4px); width: max(220px, 29vw); }
  .hero-copy { transform: translateY(calc(-50% - var(--lift, 0px))); }
  .chip-row { margin-bottom: 14px; }
  .hero-stats { gap: 12px; }
  body.scene .chapter { padding: 16px; }
  .chapter h2 { font-size: 22px; margin: 6px 0; }
  .chapter p { font-size: 11px; line-height: 1.5; }
  .chapter-link { margin-top: 12px; }
}
/* small landscape screens: no chips, and the stats take two rows */
@media (max-width: 799px) and (orientation: landscape) {
  .chip-row { display: none; }
  .hero-stats { flex-wrap: wrap; row-gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scan { display: none; }
  html { scroll-behavior: auto; }
}

/* links to the Crew Page */
.section-head .cta { margin-top: 18px; display: inline-flex; gap: 10px; }
.inline-link { color: var(--accent-ink); border-bottom: 1px solid currentColor; }

/* footer: contract address and legal links */
.outro .ca-line { margin-top: 14px; word-break: break-all; }
.outro .ca-line code { font: 500 11px var(--mono); color: var(--ink); }
.outro .link-btn { font: 700 11px var(--mono); background: none; border: 0; padding: 0 0 0 4px; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }
.outro .legal-links { margin-top: 10px; }
.outro .legal-links a { color: inherit; text-decoration: underline; }
