/*
 * Product UI — one dark racing product.
 * Deliberately framework-free and embedded in the Go binary.
 *
 * EVERY VERSION OF THIS FILE IS STILL SERVED. The assets carry a year of
 * immutable cache, so a correction ships as site.vN+1.css and the older
 * numbers keep answering for the pages that already hold them. Never edit a
 * version in place: the browsers that have it will never ask again.
 *
 * Where the look came from, newest first:
 *
 * - v10 (2026-08-24, phase 3 of the end-user remediation plan): a dark
 *   graphite-navy ground with stepped surface layers and a separate token per
 *   state. This REVERSES the light-paper direction of v3 deliberately, and
 *   the reason is written out on :root below rather than left to be guessed.
 * - v3: self-hosted type (assets/fonts/, SIL OFL 1.1) — Barlow Condensed for
 *   display, Inter (variable) for body — so the identity no longer depends on
 *   Windows-only Bahnschrift. Still true.
 * - v3: de-framed. Structure comes from type, hairline rules and space; boxes
 *   are for the page focal (.hero), the personal highlight (.hot) and
 *   interactive affordances (buttons, inputs, link cards). Still true, and
 *   the dark ground leans on it harder — depth is a step in the surface, not
 *   another border.
 * - v3: font weights normalized to the loaded axis stops (500-800).
 *
 * v3 also introduced the light warm palette that v10 has now replaced. It is
 * recorded here because "why is this dark when the commit log says we
 * deliberately made it light" is a question somebody will ask.
 */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/barlowcondensed-500-latin.woff2) format("woff2");
}

/* Car studio: one calm object and a small set of tactile controls. */
.car-studio{margin:1.5rem 0 2rem;padding:clamp(.8rem,2vw,1.4rem);border:1px solid var(--line);border-radius:18px;background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.015));box-shadow:0 18px 50px rgba(0,0,0,.22)}
.car-studio-head{display:flex;align-items:end;justify-content:space-between;gap:1rem}.car-studio-head h2,.car-studio-head p{margin:.15rem 0}
.car-viewer{display:block;width:100%;height:clamp(300px,55vw,620px);margin:.75rem 0;border-radius:13px;background:radial-gradient(circle at 50% 65%,#25303a 0,#111820 44%,#090d12 100%);touch-action:none;cursor:grab}.car-viewer:active{cursor:grabbing}
.camera-presets{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.85rem}.camera-presets button.chip{min-height:40px;padding:.4rem .95rem;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--text);font-size:var(--t-fine);font-weight:600;box-shadow:none;cursor:pointer}.camera-presets button.chip:hover{border-color:var(--accent);color:var(--accent-bright);background:var(--surface-3)}.camera-presets button.chip.is-active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 18%,var(--surface-2));color:var(--accent-bright);font-weight:700}
.camera-tune{margin-top:1rem}.camera-tune summary{cursor:pointer;font-weight:700}.camera-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.8rem 1.2rem;margin-top:1rem}.camera-fields label{display:grid;grid-template-columns:1fr auto;gap:.3rem;font-size: var(--t-fine)}.camera-fields input{grid-column:1/-1;width:100%;accent-color:var(--accent)}
@media(max-width:640px){.car-studio-head{align-items:start;flex-direction:column}.car-viewer{height:340px}}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/barlowcondensed-600-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/barlowcondensed-700-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/barlowcondensed-800-latin.woff2) format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-var-latin.woff2) format("woff2");
}

:root {
  /* ONE DARK RACING PRODUCT (phase 3).
     ---------------------------------------------------------------------
     This reverses 397adbf6, which deliberately made the site light warm
     paper "(dark/amber/red gone)". The reason to reverse it is in the
     remediation plan: a pale palette made every product area look alike, and
     the Cave — the one dark surface — read as a different application
     embedded in this one. Approved 2026-08-24 rather than assumed.

     Graphite-navy, never pure black; ink is never pure white. Both extremes
     are what makes a dark interface feel like a terminal instead of a
     product, and pure white on near-black is the combination that glows.

     LAYERS are stepped so depth is readable rather than implied: page,
     surface, raised, selected, overlay. Each is a visible move from the one
     below it — if two layers need a border to be told apart, they are not
     two layers.
  */
  color-scheme: dark;
  --bg: #12151a;
  --bg-deep: #0d1015;
  --surface: #191d24;
  --surface-2: #1f242c;
  --surface-3: #262c35;
  --overlay: #2d343e;
  /* Kept as a name because the Cave and the workshop surfaces use it: a
     warmer raised panel, not a second theme. */
  --panel-warm: #221f1c;
  --line: #333b47;
  --line-soft: rgba(232, 236, 242, .10);
  --wash: rgba(232, 236, 242, .04);
  --wash-hover: rgba(232, 236, 242, .07);
  --text: #e8ecf2;
  --muted: #a4aebc;
  --faint: #97a2b1;

  /* IDENTITY and ACTION are separate tokens holding the same value today.
     They are separate because they answer different questions — "whose
     product is this" and "what should I press" — and the day one of them
     moves, nothing else has to. */
  --brand: #34c48f;
  --accent: #34c48f;
  --accent-bright: #52dba7;
  --accent-ink: #08130f;
  --link: #6fd7b0;

  /* STATE, each its own token, none of them the accent. A status that shares
     the brand colour cannot be read as a status. */
  --live: #ff9445;      /* timing, running now — orange, never the amber of a warning */
  --ok: #7bd85a;        /* success — visibly not the brand mint */
  --verify: #8ab4ff;    /* verified, re-simulated, proven */
  --warn: #f6b545;
  --bad: #ff7a6b;
  /* The rival has been three colours in one afternoon, which is the honest
     record of a small palette: purple belongs to the fastest lap of the field
     (see below), and a rose sat close enough to --bad that "Rival" and
     "Failed" read alike in a row of pills. Cyan is the one hue nothing else
     in here claims. */
  --rival: #5fd0e8;     /* the person you are measured against */
  --record: #ffd479;    /* trophies, bests, permanent things */
  /* PURPLE IS NOT A SPARE COLOUR HERE. In racing it means one thing —
     fastest of all — and `.purple` marks exactly that, on three boards. It
     held the same value as --rival, so the person you are chasing and the
     fastest lap of the field looked identical; --rival moved rather than
     this, because this one's meaning came with the sport. */
  --purple: #c792ea;
  /* The Cave's warmth, inside the shared system rather than a theme of its
     own — the thing that made it look like another product. */
  --warm: #f0a35e;

  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px rgba(0, 0, 0, .45);
  --shadow-small: 0 1px 3px rgba(0, 0, 0, .45), 0 6px 16px rgba(0, 0, 0, .35);
  --r: 16px;
  --r-s: 10px;
  --shell: 76rem;

  /* TYPE. The micro step was 0.72rem — 11.5px, below what anybody should be
     asked to read, and it was carrying real content. The scale starts at
     0.8rem (12.8px) now and every step is a visible jump from the last. */
  --t-micro: 0.8rem;   /* 12.8px */
  --t-fine: 0.9rem;    /* 14.4px */
  --t-body: 1.05rem;   /* 16.8px — reading size, not the browser's minimum */
  --t-lead: 1.2rem;
  --t-sub: 1.35rem;
  --t-head: 1.9rem;
  --display: "Barlow Condensed", "Bahnschrift Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(65rem 32rem at 50% -14%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}

::selection { color: var(--accent-ink); background: var(--accent); }
a { color: var(--link); text-decoration: none; }
p a:hover, td a:hover, li a:hover { text-decoration: underline; text-underline-offset: .16em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }
.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: .6rem;
  transform: translateY(-180%);
  padding: .65rem 1rem;
  border-radius: 8px;
  color: var(--accent-ink);
  background: var(--accent-bright);
  font-weight: 800;
}
.skip:focus { transform: none; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Shell */

/* THE FOOTER GOES AT THE BOTTOM OF THE PAGE, not wherever the content
   happened to run out (2026-08-26).

   `main.shell` had a min-height of 40vh and nothing else held the page open,
   so a short surface — a sparse Cave pane, an empty state, a between-round
   Home — put the footer in the middle of the window with hundreds of pixels
   of nothing under it. Measured on /me#cars at 1440x900: footer bottom at
   517px, and 383px of dead space below it. It did not read as a footer. It
   read as an accidental divider that content had stopped above.

   A column that fills the viewport fixes it without anything becoming fixed
   or sticky — deliberately. A pinned bar at the bottom would collide with
   the mobile Race/Cave/Workshop nav, which is already fixed there and
   already reserves its own space through body padding. This footer still
   scrolls with the document; it simply stops floating when there is little
   to scroll.

   dvh before vh for the browsers that have it: on a phone, 100vh is the
   address-bar-collapsed height, which overshoots and reintroduces the scroll
   this is meant to remove. box-sizing is border-box globally, so the mobile
   nav padding on body comes out of the 100dvh rather than adding to it. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main.shell { flex: 1 0 auto; }
.site-footer { flex: 0 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.shell-row {
  min-height: 4.65rem;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 1.4rem;
}
.brand {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  min-width: max-content;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* `--accent-ink` is the colour of text ON the accent — near-black, so it
   reads on a green button. Used as a HOVER colour on the dark header it
   turned the wordmark black, which is very nearly the header's own
   background: the product's name disappeared when you pointed at it. */
.brand:hover { color: var(--accent); }
.brand-mark {
  width: 30px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  grid-template-rows: repeat(3,1fr);
  transform: skewX(-10deg);
  border: 1px solid var(--line);
}
.brand-mark span:nth-child(1) { grid-area: 1/1/2/3; background: var(--accent); }
.brand-mark span:nth-child(2) { grid-area: 1/3/3/5; background: var(--text); }
.brand-mark span:nth-child(3) { grid-area: 2/1/4/3; background: var(--text); }
.brand-mark span:nth-child(4) { grid-area: 3/3/4/5; background: var(--accent); }
.brand-name { font-size: var(--t-body); }

.global-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: .18rem;
  min-width: 0;
}
.global-nav a {
  position: relative;
  min-height: 2.75rem;
  padding: .62rem .72rem;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: var(--t-fine);
  font-weight: 700;
  white-space: nowrap;
}
.global-nav a:hover { color: var(--text); background: var(--wash); }
.global-nav a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.global-nav a.on::after {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: -.96rem;
  height: 3px;
  background: var(--accent);
}
.i {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  vertical-align: -.16em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-nav { min-width: max-content; display: flex; align-items: center; gap: .72rem; }
.account-link { color: var(--text); font-size: var(--t-fine); font-weight: 700; }
.status-dot {
  width: .5rem;
  height: .5rem;
  display: inline-block;
  margin-right: .38rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.section-shell {
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    var(--surface-2);
}
/* Tabs — the one in-section navigation. Underline active marker,
   generous touch targets, horizontal scroll instead of wrapping. */
.tabs {
  display: flex;
  gap: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative;
  flex: none;
  padding: .82rem .95rem;
  color: var(--muted);
  font-size: var(--t-fine);
  font-weight: 700;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent); }
.tabs a.on::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}
/* In-page tabs (W-B3): the same vocabulary as the section tab bar, one
   step down in weight, with a rule under it so it reads as belonging to
   the page rather than to the shell. */
.page-tabs {
  display: flex;
  gap: .3rem;
  margin: 1.1rem 0 1.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a {
  position: relative;
  flex: none;
  padding: .6rem .8rem;
  color: var(--muted);
  font-size: var(--t-fine);
  font-weight: 700;
  white-space: nowrap;
}
.page-tabs a:hover { color: var(--text); text-decoration: none; }
.page-tabs a.on { color: var(--accent); }
.page-tabs a.on::after {
  content: "";
  position: absolute;
  left: .5rem;
  right: .5rem;
  bottom: -1px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

.kicker {
  margin: 0 0 .18rem;
  color: var(--accent);
  font-size: var(--t-micro);
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.25;
  text-transform: uppercase;
}

main.shell { min-height: 40vh; padding-block: 1.4rem 3rem; }

/* Type */
h1, .display {
  max-width: 30ch;
  margin: .25rem 0 .6rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-stretch: condensed;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1;
  text-wrap: balance;
}
h1 .tag { transform: translateY(-.18em); }
h2 {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin: 1.7rem 0 .6rem;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.2;
}
/* No hairline under every h2 (phase 3). It was a decorative rule applied to
   EVERY heading on the site, which made a separator mean nothing — a line
   that always appears cannot say "these two things are separate". Separators
   are now drawn where information structure requires one. */
h2 .i { color: var(--accent); }
h2 a { margin-left: .2rem; color: var(--muted); font-family: var(--body); font-size: var(--t-fine); font-weight: 500; }
h2.display { display: block; }
.kicker + h2 { margin-top: 0; }
h3 { font-family: var(--display); letter-spacing: .01em; }
.lead {
  max-width: 54rem;
  margin-top: -.15rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.17rem);
  line-height: 1.5;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.display { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.display code { padding: 0; background: none; color: var(--accent-bright); font: inherit; }
.narrow { max-width: 55rem; }

/* Spacing utilities (the templates carry no inline styles) */
.tight { margin-block: .25rem; }
.mt-s { margin-top: .8rem; }
.pos-big { font-size: var(--t-head); }

/*
 * Surfaces. The default section is OPEN: type, hairlines, and space do
 * the framing. Only three things earn a surface — the page focal
 * (.hero), the personal highlight (.hot), and link cards (a hover
 * affordance, kept as a whisper of background rather than an outline).
 */
.panel, .card, .row-main, .dash > *, .grid2 > *, .metric { min-width: 0; }
.panel {
  position: relative;
  /* So components inside can ask how much room they have. See .hero-object. */
  container: panel / inline-size;
  margin: 1.1rem 0;
  /* A PANEL IS A SURFACE (2026-08-17). This rendered as nothing — no
     background, no border, no shadow — so every section was a bare heading
     stacked on the page, which is precisely the "still slightly old HTML, not
     app-like" report: the markup said dashboard, the pixels said document.
     `.hot` and `.hero` carry their own treatments and override this. */
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1.05rem, 2.2vw, 1.5rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.panel h2:first-child { margin-top: 0; }
.panel.hot {
  padding: clamp(1.1rem, 2.2vw, 1.5rem) clamp(1.15rem, 2.3vw, 1.7rem);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 78%);
}
.card {
  display: block;
  margin: .45rem 0;
  padding: .7rem .85rem;
  overflow-wrap: anywhere;
  color: inherit;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  background: var(--surface);
  /* Two shadow layers, a contact one and a soft ambient one. On the dark
     ground they do less work than the surface step does — which is why the
     layer tokens are stepped rather than borrowed from one another. */
  box-shadow: var(--shadow-small);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
a.card:hover, .artifact-card:has(.card-main:hover) {
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow-small);
}
a.card { position: relative; padding-right: 1.9rem; }
a.card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .85rem;
  width: .42rem;
  height: .42rem;
  border-right: 2px solid var(--muted);
  border-top: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
  transition: right .16s ease, border-color .16s ease;
}
a.card:hover::after { right: .6rem; border-color: var(--accent); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .72rem .45rem;
  color: inherit;
  border-bottom: 1px solid var(--line-soft);
}
a.row:hover { color: inherit; text-decoration: none; background: var(--wash); }
.row .grow { min-width: 0; flex: 1; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.row-main { overflow-wrap: anywhere; }
.row-side { flex: 0 0 auto; text-align: right; }
.row-side .countdown { display: block; color: var(--accent-bright); font-weight: 800; font-variant-numeric: tabular-nums; }
.dim { opacity: .72; }

/* ── ACTIONS ──────────────────────────────────────────────────────────────
   The SHAPE is one rule, so every tier is the same object; the COLOUR is what
   ranks them. Splitting these apart is the fix for a real bug: the geometry
   used to live inside the primary rule, so a destructive or disabled button —
   excluded from it by definition — came out smaller than the button beside
   it, which reads as a different kind of thing rather than a different rank.

   Five tiers, and a view uses at most one primary:
     primary      the thing to do here
     secondary    the other thing you might do
     tertiary     available, not being suggested (.text-button)
     destructive  cannot be undone by pressing it again (.danger)
     disabled     not available now, and stops inviting the press */
.btn, .btn2, .primary-action, button:not(.text-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 46px;
  padding: .68rem 1.18rem;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.15;
}
.btn, .primary-action, button:not(.text-button):not(.secondary):not(.btn2):not(.danger):not(.step-chip):not(.chip):not(:disabled) {
  border-color: var(--accent-bright);
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  box-shadow: 0 7px 22px color-mix(in srgb, var(--accent) 22%, transparent);
}
.primary-action { min-height: 50px; padding-inline: 1.42rem; }
.btn:hover, .primary-action:hover, button:not(.text-button):not(.secondary):not(.btn2):not(.danger):not(.step-chip):not(.chip):not(:disabled):hover {
  color: var(--accent-ink);
  filter: brightness(1.07);
  text-decoration: none;
}
.btn2, button.secondary {
  min-height: 44px;
  padding: .58rem 1rem;
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-2);
  box-shadow: none;
  font-weight: 600;
}
.btn2:hover, button.secondary:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
/* A button that fills its column — the sign-in alternatives read as equals
   when they are the same width, and as a main path plus an afterthought when
   they are not. */
.btn2.wide, button.wide { display: flex; width: 100%; }
/* The "or" between two ways of signing in: a word on a rule, so the two are
   plainly alternatives rather than steps. */
.or {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.1rem 0;
  font-size: var(--t-body);
}
.or::before, .or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line-soft);
}
/* THE THIRD TIER. It was --muted at fine size, which on a row of buttons
   read as the disabled one rather than the quiet one — the two states a
   tertiary action must never be confused with. Link colour and an underline
   on hover say "this does something" without competing with the primary. */
.text-button, form.inline .text-button {
  padding: .2rem .25rem;
  min-height: 32px;
  border: 0;
  color: var(--link);
  background: none;
  box-shadow: none;
  cursor: pointer;
  font-size: var(--t-fine);
  font-weight: 600;
}
.text-button:hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: .18em; }
.text-button:disabled { color: var(--faint); background: none; text-decoration: none; }
.btn[aria-disabled="true"], button:disabled, .btn2:disabled, button.secondary:disabled {
  border-color: var(--line);
  color: var(--faint);
  background: var(--surface-2);
  box-shadow: none;
  filter: none;
  cursor: not-allowed;
}
.btn[aria-disabled="true"]:hover, button:disabled:hover { filter: none; color: var(--faint); }
/* DESTRUCTIVE. Same shape as a primary action so it is plainly the button,
   different colour so it is plainly not the ordinary one. Never the default:
   the markup has to ask for it. */
.btn.danger, button.danger {
  border-color: var(--bad);
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 14%, transparent);
  box-shadow: none;
}
.btn.danger:hover, button.danger:hover {
  color: var(--accent-ink);
  background: var(--bad);
  filter: none;
}
form.inline { display: inline; }
.form-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.inline-form { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .45rem 0; }
.action-reason { max-width: 46rem; margin: .48rem 0 .9rem; color: var(--muted); font-size: var(--t-body); }
.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.section-heading-row h2 { flex: 1 1 auto; margin-bottom: .55rem; }
.sort-links { display: flex; flex: 0 0 auto; align-items: center; gap: .42rem; color: var(--muted); font-size: var(--t-fine); }
.artifact-proof { display: flex; flex-wrap: wrap; gap: .35rem .85rem; margin-top: .72rem; color: var(--muted); font-size: var(--t-fine); }
.artifact-proof strong { color: var(--text); font-family: var(--mono); }
/* Dashboard and hero */
.dash { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 1.1rem; }
.rail .card { margin: .48rem 0; }
.rail h2 { margin-top: 1.25rem; }
.rail h2:first-child { margin-top: 0; }
.hero {
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.1rem, 2.4vw, 1.7rem) clamp(1.2rem, 2.6vw, 1.9rem);
  border-radius: var(--r);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(34rem 17rem at 92% 5%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.trackshape {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -1.5rem;
  width: clamp(10rem, 25vw, 18rem);
  transform: translateY(-50%) rotate(-6deg);
  color: color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
}
.trackshape svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 15px color-mix(in srgb, var(--accent) 22%, transparent)); }
.countline { color: var(--muted); }
.count { color: var(--accent-bright); font: 800 1.2em var(--display); font-variant-numeric: tabular-nums; }
.steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.steps .card { margin: 0; padding: .35rem 0; border: 0; background: none; }
.steps a.card:hover { transform: none; background: none; }
.steps a.card:hover strong { color: var(--accent-bright); }
.steps .n {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-grid;
  place-items: center;
  margin-bottom: .4rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 50%;
  color: var(--accent-bright);
  font: 800 1rem var(--display);
}
.grid2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.grid2 .card { margin: 0; }

/* Timing and data */
.tablewrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  /* Scroll cues (design review): edge shadows appear only when there
     is more table to scroll to — the local-attached covers hide them
     at the ends. */
  background:
    linear-gradient(90deg, var(--bg) 30%, transparent) left/28px 100% no-repeat local,
    linear-gradient(-90deg, var(--bg) 30%, transparent) right/28px 100% no-repeat local,
    linear-gradient(90deg, var(--line), transparent) left/12px 100% no-repeat scroll,
    linear-gradient(-90deg, var(--line), transparent) right/12px 100% no-repeat scroll;
}
.tablewrap:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
/* Numeric/timing columns read right-aligned everywhere (review): the
   .t data cells and any header marked .num. */
td.t, th.num { text-align: right; }
/* Column priority: .sm-hide columns yield on small screens instead of
   forcing eight columns through a horizontal scroller. */
table { width: 100%; border-collapse: collapse; }
td, th { padding: .58rem .68rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
th {
  color: var(--faint);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
tbody tr:hover td, table tr:hover td { background: var(--wash); }
.t { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gap { color: var(--muted); }
.gap .bar {
  display: block;
  width: calc(var(--w) * 1%);
  min-width: 2px;
  height: 3px;
  margin-top: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg,var(--accent),transparent);
}
.purple { color: var(--purple); font-weight: 700; }
.green { color: var(--ok); }
.up { color: var(--ok); font-size: var(--t-fine); }
.down { color: var(--bad); font-size: var(--t-fine); }
.p1 { color: var(--accent-bright); font-weight: 800; }
tr.you td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
tr.you td:first-child { box-shadow: inset 3px 0 var(--accent); }
a.ghost { text-decoration: none; }
@keyframes rowflash { 0% { background: color-mix(in srgb, var(--accent) 25%, transparent); } 100% { background: transparent; } }
tr.moved td { animation: rowflash 2.5s ease-out 1; }

/* Metrics read like a timing strip, not a row of boxes. */
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem 1.4rem; }
.metric {
  padding: .2rem 0 .2rem .85rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.metric strong { display: block; margin: .12rem 0; font: 800 1.5rem/1.1 var(--display); overflow-wrap: anywhere; }
.metric .label { color: var(--faint); font-size: var(--t-micro); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; margin-left: .4rem; padding: .2rem 0 1.15rem 1.5rem; border-left: 1px solid var(--line); }
.timeline li::before {
  content: "";
  position: absolute;
  left: -.31rem;
  top: .47rem;
  width: .58rem;
  height: .58rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.journey { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; margin: .75rem 0; }

/* Forms, status and disclosures */
input[type="text"], input[type="password"], input[type="url"], input[type="number"],
input[type="datetime-local"], input[type="date"], input[type="email"], textarea, select {
  width: 100%;
  min-height: 44px;
  padding: .58rem .72rem;
  /* The boundary carries the control: --faint against every surface layer is
     the reason the palette test holds --faint to the same bar as body text. */
  border: 1px solid var(--faint);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}
textarea { min-height: 7rem; resize: vertical; }
select { width: auto; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled, textarea:disabled, select:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: var(--wash);
  cursor: not-allowed;
}
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { min-width: 1.2rem; min-height: 1.2rem; accent-color: var(--accent); }
label { color: var(--muted); font-size: var(--t-fine); font-weight: 500; }
label > input, label > textarea, label > select { margin-top: .25rem; }
fieldset { margin: 1.2rem 0; padding: .8rem 0 0; border: 0; border-top: 1px solid var(--line-soft); }
legend { padding-inline: 0 .6rem; color: var(--text); font-family: var(--display); font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
.choice-card {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .48rem .6rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}
.choice-card:has(input:checked) { color: var(--text); border-color: color-mix(in srgb, var(--accent) 42%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.notice {
  margin: .9rem 0;
  padding: .75rem 1rem .75rem 1.1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
/* A LONG FORM SHOWN ONE STEP AT A TIME (site.v10.js `form[data-steps]`).
   The fieldsets are ordinary fieldsets — with scripting off they are all on
   the page and none of this applies, which is the point. */
.steps { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none;
  padding: 0; margin: 0 0 1rem; counter-reset: step }
.steps li { counter-increment: step }
.steps button { background: transparent; border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: .3rem .8rem;
  font-size: var(--t-micro); font-weight: 600 }
.steps button::before { content: counter(step) ". " }
.steps li.done button { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent) }
.steps li.now button { color: var(--bg); background: var(--accent); border-color: var(--accent) }
.step-actions { margin-top: 1rem }
/* `hidden` LOSES to any rule that sets display, and both `button` and
   `.form-actions` set one — so hiding the Back button and the submit row on
   the wrong step silently did nothing. Found by looking at step one and
   seeing every control on it. */
form[data-steps] [hidden] { display: none !important }
form[data-steps] fieldset { border: 0; padding: 0; margin: 0; min-width: 0 }

/* The browser's own validation message, kept in the page. The native bubble
   says the right thing and then disappears the moment you look away, which
   is exactly when you want to read it. */
.field-error { display: block; margin-top: .3rem; color: var(--bad);
  font-size: var(--t-micro); font-weight: 600 }
[aria-invalid="true"] { border-color: var(--bad) }

/* The one line a card says about a thing before anybody opens it. Bounded to
   three lines so a long guide excerpt cannot make one card twice the height
   of the ones beside it. */
.card-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; font-size: var(--t-fine) }

/* A CAR'S OWN PHOTOGRAPH. The aspect ratio is fixed by the capture, and the
   box is sized from it so nothing on the page moves when the image arrives —
   the heading under it was jumping down by the height of the picture. */
/* A BAND, not a screen. 16:9 across a 1440 page is about 800px tall, which
   put the car's own name and its tabs below the fold — a hero that fills the
   first screen and leaves no room for what it is a picture OF. The aspect
   ratio still reserves the space so nothing moves when it loads; the cap
   decides how much of the screen it may take. */
.car-poster { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  max-height: 40vh; object-fit: cover; border-radius: var(--r); margin-bottom: 1rem }
/* Every card's art occupies the same block, so a grid of cars where only
   some may be photographed still reads as a grid. */
.car-card-art { display: block; aspect-ratio: 16 / 9; margin-bottom: .6rem;
  border-radius: calc(var(--r) - 2px); overflow: hidden }
.car-card-art img { display: block; width: 100%; height: 100%; object-fit: cover }
.car-card-art-drawn { display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink) 4%, transparent) }
.car-card-art-drawn svg { width: 60%; height: auto; opacity: .38 }

/* WHERE A MEASUREMENT SITS INSIDE ITS BAND. The numbers come from the
   physics suite, which is the only thing that knows them; this draws them.

   aria-hidden, deliberately: the value, the band and the verdict are all
   already text in the same cell, so a screen reader announcing the bar would
   be repeating what it just read in a form it cannot use. */
.band-bar { display: block; position: relative; height: .35rem; margin-top: .4rem;
  max-width: 12rem; border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 22%, transparent) }
.band-bar-out { background: color-mix(in srgb, var(--warn) 22%, transparent) }
.band-mark { position: absolute; top: 50%; width: .5rem; height: .5rem;
  margin-left: -.25rem; transform: translateY(-50%); border-radius: 50%;
  background: var(--ok) }
.band-bar-out .band-mark { background: var(--warn) }
@media (forced-colors: active) {
  /* The palette is gone, so the bar carries nothing. Give it an outline so it
     is still a scale with a mark on it rather than two invisible boxes. */
  .band-bar { border: 1px solid CanvasText }
  .band-mark { background: CanvasText }
}

/* SIDE-BY-SIDE COMPARISON (/compare). The label column stays put while the
   car columns scroll, because a value with no row label beside it is not a
   comparison — it is a number. Everything else is the shared table. */
/* `th scope="row"` is the right element for a row label — it is what tells a
   screen reader which car each value belongs to — but the shared `th` style is
   an uppercase micro COLUMN header, and "TURN-IN RESPONSE" set in that is a
   label you read twice. The semantics stay, the look goes back to prose. */
.compare-table th[scope="row"] { position: sticky; left: 0; background: var(--panel);
  text-align: left; font-weight: 600; min-width: 11rem;
  text-transform: none; letter-spacing: 0; font-size: var(--t-body); color: var(--ink) }
.compare-table td { vertical-align: top; min-width: 9rem }
.compare-table td .status { margin-top: .25rem }
.compare-table .band { font-size: var(--t-micro); margin-top: .2rem }
.compare-group th { background: color-mix(in srgb, var(--ink) 6%, transparent);
  text-align: left; letter-spacing: .02em; text-transform: uppercase;
  font-size: var(--t-micro) }
.compare-pick fieldset { border: 1px solid var(--line); border-radius: var(--r);
  padding: .75rem 1rem }
.compare-pick .pick { display: block; padding: .35rem 0 }

/* The confirm step site.v9.js builds for <form data-confirm>. It is styled
   here rather than inline so it inherits the dialog treatment above and the
   theme like everything else. */
.confirm-dialog { max-width: 34rem; }
.confirm-dialog p:first-child { margin-top: 0; }

.notice.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.notice.error { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.notice.success { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
/* AN EMPTY STATE IS A STATE, NOT AN ABSENCE (phase 11, 2026-08-25).
   Outside review: "between-round Home is one modest panel surrounded by
   enormous empty space", and the same shape carries every other empty state
   on the site — this primitive is used in twenty templates.

   It was a small dashed box floating in a large void, which reads as the page
   having failed to load rather than as a real state somebody is in. Three
   changes, none of which invents anything:

   - ROOM. It occupies the space rather than floating in it, so a page with
     one thing on it looks composed rather than unfinished.
   - A MARK, optional, supplied by the page: a circuit outline, a car
     silhouette, a wrench. We already own those as inline glyphs, so this is
     the product's own material rather than decoration bought in for the
     occasion. Pages that have nothing apt pass nothing and lose nothing.
   - A GROUND that fades rather than a flat wash inside a dashed rectangle.
     The dashes said "placeholder"; a real state is not a placeholder. */
.empty-state {
  position: relative;
  overflow: hidden;
  padding: clamp(2.2rem, 5vw, 3.4rem) clamp(1.2rem, 4vw, 2.4rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    var(--wash);
}
.empty-state h2 { margin-top: 0; justify-content: center; }
.empty-state .form-actions { justify-content: center; margin-top: 1.1rem; }
.empty-state > strong { font-size: var(--t-lead); display: block; }
.empty-state p { max-width: 34rem; margin-inline: auto; }

/* The mark sits BEHIND the words and never competes with them: large, low,
   and clipped by the box so it reads as material rather than as an icon
   somebody centred. aria-hidden at the call site — it says nothing the text
   does not. */
.empty-state .empty-mark {
  position: absolute;
  /* Mostly BELOW the box, so what shows is the top of the shape rising from
     the bottom edge — a watermark rather than an icon that happens to be
     cropped. Pushed further than the first attempt, which left a wrench
     bisected behind the button and read as a mistake. */
  inset: auto 0 -42% 0;
  margin: auto;
  width: min(22rem, 58%);
  opacity: .06;
  pointer-events: none;
  color: var(--accent);
}
.empty-state .empty-mark svg { width: 100%; height: auto; display: block; }
.empty-state > *:not(.empty-mark) { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  /* Nothing moves. Said explicitly because an empty state is exactly where a
     spinner or a pulse tends to get added, and there is nothing loading. */
}
@media (forced-colors: active) {
  .empty-state { border: 1px solid CanvasText; background: Canvas; }
  .empty-state .empty-mark { display: none; }
}
details { border-radius: 0; }
details.advanced { margin: 1rem 0; border-top: 1px solid var(--line-soft); background: none; }
details.advanced > summary, details > summary {
  padding: .6rem .15rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}
details.advanced > summary:hover { color: var(--text); }
details.advanced[open] > summary { color: var(--text); border-bottom: 1px solid var(--line-soft); }
details.advanced > :not(summary) { margin-inline: .72rem; }
code, .code {
  max-width: 100%;
  padding: .1rem .36rem;
  overflow-wrap: anywhere;
  border-radius: 5px;
  color: var(--text);
  background: var(--wash);
  font-family: var(--mono);
  /* em, not a step: inline code shrinks against the text around it, so it
     stays proportionate at every size on the scale. */
  font-size: .9em;
}
pre {
  max-width: 100%;
  padding: .9rem;
  overflow-x: auto;
  border-radius: var(--r-s);
  background: var(--surface-3);
}
.secret { display: block; padding: .7rem; overflow-wrap: anywhere; user-select: all; }
.tag {
  display: inline-block;
  max-width: 100%;
  padding: .2rem .58rem; /* ~25px tall: WCAG 24px minimum target */
  border: 1px solid var(--faint);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--t-micro);
  line-height: 1.45;
  vertical-align: middle;
  white-space: normal;
}
a.tag:hover { color: var(--text); border-color: var(--faint); text-decoration: none; }
.tag.sel, .tag-official { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); font-weight: 700; }
.tag-verified, .tag.success { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-deep); }
.footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.footer-line nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-line nav a { color: var(--muted); font-size: var(--t-fine); }
.footer-line nav a:hover { color: var(--text); }

@media (min-width: 58rem) {
  .dash { grid-template-columns: minmax(0,2fr) minmax(17rem,1fr); }
  .dash .span2 { grid-column: 1 / -1; }
  .dash > .rail { border-left: 1px solid var(--line-soft); padding-left: 1.15rem; }
}

@media (max-width: 70rem) {
  .shell-row { gap: .65rem; }
  .global-nav a { padding-inline: .55rem; }
  .global-nav .i { display: none; }
}

/* THE WORDMARK GIVES WAY TO THE MARK, and only where it has to.

   The signed-out header gained a route to the game (2026-08-26) because the
   deep pages in the sitemap carry none of their own. On a phone that left
   four things competing for 345 useful pixels, and the loser was the brand:
   it ellipsised to "CO...", which reads as a bug rather than as a logo.

   The mark alone is still the brand, and the link still says the product name
   to a screen reader through its aria-label. Scoped to `.has-get`, so a
   signed-in header — which carries no such button — keeps its wordmark, and
   to phone widths, so it returns the moment there is room. */
@media (max-width: 30rem) {
  .site-header.has-get .brand-name { display: none; }
}

@media (max-width: 50rem) {
  .sm-hide { display: none; }
  .shell { width: min(100% - 1.4rem,var(--shell)); }
  /* No blur on the static mobile header: backdrop-filter makes an
     ancestor the containing block for fixed descendants, which pinned
     the bottom tab bar to the header instead of the viewport. */
  .site-header { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .toolbar { top: 0; }
  .shell-row { min-height: auto; grid-template-columns: minmax(0,1fr) auto; padding-block: .65rem; }
  .brand { min-width: 0; overflow: hidden; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-nav { grid-column: 2; grid-row: 1; }
  .account-link { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Persistent bottom tab bar (design review #3): the app's primary
     navigation stays reachable while scrolling, thumb-first. */
  body { padding-bottom: calc(3.9rem + env(safe-area-inset-bottom)); }
  .global-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: grid;
    /* One column per destination, whatever the shell renders. It was pinned
       at four while three were rendered, so a quarter of the bar was blank on
       the surface phone visitors see most. */
    grid-auto-flow: column;
    grid-auto-columns: minmax(0,1fr);
    width: 100%;
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .55);
    padding: .3rem .35rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .global-nav a {
    min-width: 0;
    min-height: 48px;
    padding: .34rem .18rem;
    flex-direction: column;
    justify-content: center;
    gap: .15rem;
    font-size: var(--t-micro);
    line-height: 1.08;
    text-align: center;
    white-space: normal;
  }
  .global-nav .i { display: block; font-size: var(--t-body); }
  .global-nav a.on::after { display: none; }
  .site-footer { margin-bottom: 0; }
  .section-shell { overflow: hidden; }
  /* Chips that wrap naturally — a 3-column grid left an orphan row. */
  main.shell { padding-block: 1.25rem 3rem; }
  h1, .display { font-size: clamp(1.65rem,7vw,2.3rem); }
  .hero { padding: 1.35rem 1rem; }
  .trackshape { right: -4rem; opacity: .55; }
  .steps, .grid2, .metric-grid, .journey { grid-template-columns: minmax(0,1fr); }
  .choice-grid { grid-template-columns: minmax(0,1fr); }
  .row-link { align-items: flex-start; }
  .row-side { max-width: 34%; }
  .inline-form { display: grid !important; grid-template-columns: minmax(0,1fr); align-items: stretch; }
  .section-heading-row { align-items: flex-start; flex-direction: column; gap: 0; }
}

@media (max-width: 27rem) {
  .shell { width: min(100% - 1rem,var(--shell)); }
  .brand-mark { width: 25px; height: 19px; }
  .account-nav .text-button, .status-dot { display: none; }
  .account-login { padding-inline: .72rem; font-size: var(--t-fine); }
  .global-nav a { font-size: var(--t-micro); }
  .panel.hot { padding: 1rem .78rem; }
  td, th { padding-inline: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .brand-mark span, .hero::before { forced-color-adjust: none; }
  .panel, .card, .metric, .hero { border: 1px solid CanvasText; }
}

/* ==================================================================
 * v4 over v3: the garage and the car stat-sheet pages (CP1/CP2).
 * Same palette, same de-framed structure; new vocabulary for measured
 * numbers: the sheet table, verdict marks, provenance line, car cards.
 * ================================================================== */

.lede {
  max-width: 62ch;
  margin: .2rem 0 1.4rem;
  color: var(--muted);
  font-size: var(--t-body);
}

/* --- the garage index --- */
.car-grid { margin-top: 1.1rem; }
.car-card { padding: .95rem 1.05rem 1.05rem; }
.car-card .car-name {
  display: block;
  margin: .05rem 0 .5rem;
  font: 700 1.6rem/1.1 var(--display);
  letter-spacing: .01em;
}
.car-card .metric-grid { margin: .35rem 0 .55rem; }
.car-card > .muted:last-child { margin: .3rem 0 0; font-size: var(--t-fine); }

/* --- the stat sheet --- */
.statsheet th { white-space: nowrap; }
.statsheet td { vertical-align: top; }
.statsheet td:first-child { min-width: 12rem; }
.stat-metric {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: .01em;
}
.stat-value {
  /* No nowrap: with fixed shared columns, a long annotated value must
     wrap inside its own column, never overflow into the band's. */
  font: 600 1.12rem/1.3 var(--display);
  letter-spacing: .015em;
}

/* --- provenance: quiet, but always there --- */
.provenance-line {
  margin-top: 2rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--t-fine);
}
.provenance-line code { font-size: var(--t-fine); }

/* --- the hub garage row --- */
.garage-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .5rem;
  margin: .6rem 0;
}

/* --- character pages: facts as reading material, not tag soup --- */
.facts {
  max-width: 58ch;
  margin: .4rem 0 0;
  padding-left: 1.1rem;
}
.facts li { margin: .35rem 0; }

/* --- actually aligned numbers, everywhere numbers sit in columns --- */
table { font-variant-numeric: tabular-nums; }
/* Fixed, identical column widths so every section's Measured column sits
   on the same vertical line — per-table auto-sizing looked "almost
   aligned", which is worse than not trying. */
.statsheet { table-layout: fixed; width: 100%; }
.statsheet th:nth-child(1) { width: 40%; }
.statsheet th:nth-child(2) { width: 21%; }
.statsheet th:nth-child(3) { width: 39%; }
.statsheet th:nth-child(2), .statsheet td.stat-value { text-align: right; }
.statsheet td.stat-value { padding-right: 1.2rem; }
.metric strong { font-variant-numeric: tabular-nums; }

/* --- browse: an app surface, not a search page ------------------------
   Content first; one sticky toolbar with type chips, a live filter box,
   and a segmented sort. Chips are pills with a quiet count badge. */
.toolbar {
  /* Sticks below the sticky site header (which is 4.65rem + 3px top
     border); the mobile block resets this to 0 where the header goes
     static. */
  position: sticky; top: calc(4.65rem + 3px); z-index: 5;
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin: 1rem 0 .4rem; padding: .55rem 0;
  background: linear-gradient(var(--bg) 88%, transparent);
}
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  padding: .34rem .85rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: var(--t-fine); font-weight: 650;
  text-decoration: none; white-space: nowrap;
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { font-size: var(--t-micro); font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.sel .n { color: color-mix(in srgb, var(--surface) 80%, transparent); }
.chip-rows { display: grid; gap: .3rem; margin: 0 0 .4rem; }
.chip-row { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.chip-row-label {
  flex: none; width: 3.2rem; color: var(--faint);
  font-size: var(--t-micro); font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.filterbox { flex: 1 1 11rem; min-width: 9rem; margin: 0; }
.filterbox input {
  width: 100%; margin: 0; padding: .42rem 1rem;
  border-radius: 999px; border: 1px solid var(--faint); background: var(--surface);
  font-size: var(--t-fine);
}
.seg {
  flex: none; display: inline-flex; padding: 3px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.seg a {
  padding: .26rem .8rem; border-radius: 999px;
  color: var(--muted); font-size: var(--t-fine); font-weight: 650; text-decoration: none;
}
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { background: var(--accent); color: var(--accent-ink); }
.browse-count { margin: .3rem 0 1rem; font-size: var(--t-fine); }

/* Numbered how-to inside a panel (login's where-the-code-comes-from). */

/* --- cross-document view transitions (design review #7) -------------
   Same-origin navigations crossfade instead of flashing white; the
   sticky header and bottom tab bar hold still. Browsers without the
   API, and reduced-motion users, keep instant navigation. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; }
}
.site-header { view-transition-name: site-header; }
@media (max-width: 50rem) {
  .global-nav { view-transition-name: bottom-tabs; }
}

/* Car silhouettes: stroked line art, same language as track outlines. */
.car-sil {
  display: block;
  width: 9.5rem;
  max-width: 60%;
  height: auto;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .5;
}
.car-card { position: relative; }
/* The corner mark was the whole art on a card until the cards grew a block
   of their own (2026-08-25); it now only applies where a silhouette is still
   used outside one. */
.car-card .car-card-art .car-sil { position: static; width: auto; opacity: 1; }
.car-card .car-sil { position: absolute; top: .9rem; right: 1rem; width: 7.5rem; opacity: .35; }
.car-hero-sil { float: right; margin: .4rem 0 0 1.5rem; }
.car-hero-sil .car-sil { width: 13rem; opacity: .45; }
@media (max-width: 50rem) { .car-hero-sil { float: none; margin: 0; } }

/* Track cards: the outline is the identity. */
.trackshape-card { height: 5.2rem; margin-bottom: .3rem; color: var(--accent); opacity: .8; }
.trackshape-card svg { height: 100%; width: auto; max-width: 100%; }

/* Workshop picking (W3): the card is content + one action. */
.card-main { display: block; color: inherit; }
.card-main:hover { text-decoration: none; }
.pick-form { margin: .55rem 0 0; }
.pick-btn { font-size: var(--t-fine); padding: .35rem .8rem; }
.artifact-card.picked { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: linear-gradient(145deg, var(--surface), var(--surface-2)); }

/* cmd-K jump palette (P2): one input, instant response. */
#palette {
  width: min(34rem, calc(100vw - 2rem));
  margin: 12vh auto auto;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
#palette::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
#palette-q {
  width: 100%;
  padding: .7rem .9rem;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 10px 10px 0 0;
  background: transparent;
  font-size: var(--t-body);
}
#palette-q:focus-visible { outline: none; }
#palette-list { margin: .3rem 0 0; padding: 0; list-style: none; max-height: 21rem; overflow-y: auto; }
#palette-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .9rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
#palette-list li.sel { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
#palette-list .kind {
  color: var(--faint);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* --- visual pass (P5): interactive means it moves, static lies flat --- */
a.card, .artifact-card {
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
@media (prefers-reduced-motion: reduce) {
  a.card, .artifact-card { transition: none; }
}
/* Plain informational cards (findings, rejections, notices) are surfaces
   rather than controls: no shadow-on-hover promise they cannot keep. */
div.card:not(.artifact-card) { background: var(--surface-2); }

/* The palette's visible face: a shortcut nobody can see is a feature
   nobody has (founder). Click opens it; the kbd hint teaches Ctrl-K. */
#palette-open {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--t-fine);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#palette-open:hover { color: var(--text); border-color: var(--accent); }
#palette-open kbd {
  padding: .05rem .38rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--faint);
  font: 600 .68rem var(--body);
}
@media (max-width: 50rem) {
  .shell-row { grid-template-columns: minmax(0,1fr) auto auto; }
  #palette-open { grid-column: 2; padding: .42rem .55rem; }
  .palette-open-label, #palette-open kbd { display: none; }
  .account-nav { grid-column: 3; }
}
.cave-room{position:relative;overflow:hidden;padding:clamp(1.4rem,4vw,2.5rem);border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));border-radius:1.1rem;color:var(--text);background:radial-gradient(circle at 82% 8%,color-mix(in srgb, var(--warm) 22%, transparent),transparent 34%),linear-gradient(145deg,var(--surface-2),var(--surface));box-shadow:0 1.2rem 3rem rgba(0,0,0,.22)}
.cave-room h2{font-size:clamp(1.8rem,5vw,3rem);margin:.25rem 0 .5rem;max-width:18ch}.cave-glow{position:absolute;width:12rem;height:12rem;right:-5rem;top:-6rem;border-radius:50%;background:color-mix(in srgb, var(--warm) 25%, transparent);filter:blur(2rem);pointer-events:none}.cave-build{color:var(--warm)}.cave-actions{display:flex;flex-wrap:wrap;gap:.65rem;margin:1.3rem 0}.cave-actions button[disabled]{opacity:.58;cursor:not-allowed}.cave-change{margin-top:1rem;border-top:1px solid var(--line-soft);padding-top:.8rem}.cave-pickers{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.8rem;margin-top:.8rem}.cave-pickers label{display:grid;gap:.35rem;font-weight:700}.cave-pickers select{width:100%}.cave-connection{margin:.8rem 0 0;font-size: var(--t-fine)}
/* The Cave's ink overrides are GONE (phase 3). They existed because the Cave
   room and the visitor door were the only dark panels on a light-paper site,
   so every site-wide rule that set the light theme's dark `--text` landed
   there as black-on-black — a whole category of bug that had to be listed and
   patched. One ground means one set of rules: the Cave is a raised surface
   with a warm accent now, not a theme of its own, and nothing has to be told
   which ink it is allowed to use. */
/* WHAT IS LEFT OF THE CAVE'S OWN RULES (2026-08-24).

   The block that stood here overrode ink on every heading, label, muted span
   and link inside the Cave, because the Cave was the one dark panel on a
   light-paper site and every element rule set the page's dark ink into it.
   The paragraph above says one ground means one set of rules — and these
   rules were the contradiction of it, setting exactly what the elements now
   inherit anyway.

   Two survive, and only because they are about the Cave rather than about its
   darkness: the kicker is warm wherever a Cave surface is rendered, including
   the friend-visit page that is not inside the Cave section, and the select
   needs the raised control ground rather than the page's. */
.cave-room .kicker,.cave-visit .kicker{color:var(--warm)}
.cave-room select{color:var(--text);background:var(--surface-2)}
.cave-visit{margin-top:clamp(1rem,6vh,4rem);padding:clamp(1.5rem,5vw,3.2rem);border-radius:1.2rem;color:var(--text);background:radial-gradient(circle at 80% 10%,color-mix(in srgb, var(--warm) 24%, transparent),transparent 35%),linear-gradient(150deg,var(--surface-2),var(--bg-deep));box-shadow:0 1.4rem 4rem rgba(0,0,0,.25)}.display-small{font-family:var(--display);font-size:clamp(1.5rem,5vw,2.5rem);font-weight:800}
.cave-workbench{padding:clamp(1.2rem,3vw,2rem);border:1px solid var(--line);border-radius:1rem;background:linear-gradient(160deg,color-mix(in srgb, var(--warm) 10%, transparent),transparent 45%)}.cave-workbench h2{margin:.2rem 0 1rem}.workbench-chat{display:grid;gap:.55rem;margin:0 0 1rem}.workbench-turn{padding:.65rem .8rem;border-left:3px solid var(--line);background:var(--surface-2)}.workbench-turn p{margin:.12rem 0}.workbench-turn span{display:inline-block;min-width:5.7rem;color:var(--muted);font-size: var(--t-fine);font-weight:700;text-transform:uppercase;letter-spacing:.04em}.workbench-proposal{margin-top:1rem;padding:1rem;border-radius:.75rem;background:var(--surface)}.workbench-actions{display:flex;flex-wrap:wrap;gap:.5rem}.workbench-actions button{margin:0}

/* The force-feedback library (2026-08-18). A row per profile: what it is on
   the left, what you can do with it on the right, and the one that is live in
   the game marked rather than described. Founder asked for a set they can
   "copy/edit/arrange and select" — select, open and vary are real actions on
   real routes; ordering is not built and is deliberately not implied. */
.ffb-list{display:grid;gap:.5rem;margin:.9rem 0 1.6rem}
.ffb-row{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;justify-content:space-between;
  padding:.7rem .9rem;border:1px solid var(--line-soft);border-radius:var(--r-s);background:var(--surface)}
.ffb-row.on{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));
  box-shadow:inset 3px 0 var(--accent)}
.ffb-id{display:grid;gap:.15rem;min-width:0}
.ffb-id .muted{font-size: var(--t-fine)}
.ffb-on{color:var(--accent);font-weight:700}
.ffb-do{display:flex;flex-wrap:wrap;gap:.4rem}
.ffb-do form{margin:0}

/* What you can make, when you have not made anything yet. Cards rather than a
   list because each one is a different KIND of thing, and a person picking
   their first is choosing a craft, not an item. */

/* The wheel panel (2026-08-20). A label, the control, its value, and one line
   saying what it does — in that order, because the number is meaningless
   without the sentence and the sentence is noise once you know it. The value
   is a real <output> so it reads aloud with the slider it belongs to. */
.wheel-panel{margin:1rem 0 .4rem}
.wheel-row{display:grid;grid-template-columns:11rem 1fr 3.5rem;gap:.4rem .8rem;align-items:center;
  padding:.55rem 0;border-bottom:1px solid var(--line-soft)}
.wheel-row label{margin:0;font-weight:600}
/* A drawn control rather than the browser's. The rail carries its own fill
   from --val (Chrome has no progress pseudo-element for a range, so a
   gradient is the only way both engines show the same thing), and the thumb
   is a solid accent disc with a surface-coloured ring so it stays legible
   wherever it sits on the rail. */
.wheel-row input[type=range]{-webkit-appearance:none;appearance:none;width:100%;margin:0;
  height:1.5rem;background:transparent;position:relative;z-index:1;cursor:pointer}
.wheel-row input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:3px;
  background:linear-gradient(to right,var(--accent) calc(var(--val,0)*100%),var(--line) 0)}
.wheel-row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;
  width:17px;height:17px;margin-top:-6px;border-radius:50%;background:var(--accent);
  border:2px solid var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.5)}
.wheel-row input[type=range]::-moz-range-track{height:5px;border-radius:3px;background:var(--line)}
.wheel-row input[type=range]::-moz-range-progress{height:5px;border-radius:3px;background:var(--accent)}
.wheel-row input[type=range]::-moz-range-thumb{width:15px;height:15px;border-radius:50%;
  background:var(--accent);border:2px solid var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.5)}
.wheel-row input[type=range]:focus-visible{outline:none}
.wheel-row input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 35%,transparent)}
.wheel-row input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 35%,transparent)}
/* Where a control ships, as a mark on its own track — a tick a person can
   aim for, instead of a sentence saying "at the default" that disappears the
   moment they move it, which is exactly when they want to see where they
   came from. --mark is 0..1; the track is inset by half a thumb at each end
   so the tick lines up with where the thumb actually sits. */
/* The default marker: a caret UNDER the rail, pointing at it.
   It was a 2px full-height bar across the track, which read as a letter I
   sitting in the middle of the slider — and before that it was drawn behind
   the control's own opaque track, invisible. Under the rail it never fights
   the thumb, never needs to out-paint anything, and is unmistakably a mark
   rather than a character. */
.track{position:relative;display:block;--thumb:16px;padding:.1rem 0 .6rem}
.track-mark{position:absolute;bottom:.05rem;z-index:2;
  left:calc(var(--thumb)/2 + var(--mark) * (100% - var(--thumb)));
  transform:translateX(-50%);width:0;height:0;pointer-events:none;
  border-left:5px solid transparent;border-right:5px solid transparent;
  border-bottom:6px solid var(--accent)}
.track-legend{display:flex;align-items:center;gap:.45rem;margin-top:.2rem}
.track-key{display:inline-block;width:0;height:0;
  border-left:5px solid transparent;border-right:5px solid transparent;
  border-bottom:6px solid var(--accent)}
.wheel-row input[type=number]{width:6rem}
.wheel-value{font-variant-numeric:tabular-nums;text-align:right;color:var(--text);font-weight:600}
.wheel-help{grid-column:1/-1;margin:0;font-size: var(--t-fine)}
.wheel-check{display:flex;gap:.5rem;align-items:baseline;font-weight:600}
@media (max-width:32rem){
  .wheel-row{grid-template-columns:1fr 3.5rem}
  .wheel-row .track{grid-column:1/-1}
}

/* The thesis on a live week. Set apart from the round's own facts by a rule
   rather than a box: the hero already has enough panels in it, and this is the
   one sentence a first-time visitor should read. */
.thesis{margin:1.1rem 0 0;padding-top:.9rem;border-top:1px solid var(--line-soft);max-width:44ch}
.thesis-line{font-family:var(--display);font-size:clamp(1.25rem,2.6vw,1.5rem);font-weight:600;line-height:1.2;
  margin:0 0 .5rem;text-wrap:balance}
.thesis p{margin:0 0 .5rem}
.thesis p:last-child{margin-bottom:0}

/* One measured number, in the hero, about this week's car. Set as evidence
   rather than as a headline: the label is quiet, the number is not, and the
   band beside it is the whole point — a number with nothing to compare it to
   is marketing. */
.proof{margin:.9rem 0 0}
.proof a{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:.15rem .55rem;
  text-decoration:none;color:inherit;padding:.45rem .7rem;border:1px solid var(--line-soft);
  border-radius:var(--r-s);background:var(--surface)}
.proof a:hover{border-color:var(--accent)}
.proof-label{font-size:var(--t-fine);color:var(--muted)}
.proof-value{font-family:var(--display);font-size:var(--t-lead);letter-spacing:.01em;
  font-variant-numeric:tabular-nums}
.proof-band{font-size:var(--t-fine);color:var(--muted);flex-basis:100%}

/* The board's own announcement: empty until something moves, then one quiet
   line. A live region that shouts is a live region people turn off. */
.board-live:empty{display:none}
.board-live{color:var(--accent);font-weight:600}

/* What has happened here. A timing screen's message log, not a social feed:
   one line each, verb in the middle, age on the right, no avatars and no
   per-row icons. The age is never hidden — a quiet week says so. */
.activity{list-style:none;margin:.4rem 0 0;padding:0;display:grid;gap:.1rem}
.act{display:grid;grid-template-columns:minmax(6rem,auto) 1fr auto;gap:.2rem .7rem;
  align-items:baseline;padding:.42rem .2rem;border-bottom:1px solid var(--line-soft);
  font-size:var(--t-fine)}
.act:last-child{border-bottom:0}
.act-who{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.act-verb{color:var(--muted)}
.act-when{color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
/* The one thing worth colouring: somebody went faster than they had. */
@media (max-width:34rem){
  .act{grid-template-columns:1fr auto}
  .act-verb{grid-column:1/-1}
}

/* The week's photograph. Wide, cropped, and never taller than a third of the
   viewport — it is the reason to look, not the whole page. aspect-ratio holds
   the space before it loads so nothing under it jumps. */
.hero-shot{margin:1rem 0 0;border-radius:var(--r-s);overflow:hidden;border:1px solid var(--line-soft)}
.hero-shot img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;
  max-height:34vh;background:var(--surface-2)}

/* Current feel: three layers, each naming its source. A list rather than
   cards — these are one thing seen in parts, and boxing them would make them
   look like three things to choose between. */
.feel-layers{list-style:none;margin:.6rem 0 0;padding:0;display:grid;gap:1px;
  background:var(--line-soft);border:1px solid var(--line-soft);border-radius:var(--r-s);overflow:hidden}
.feel-layers li{display:grid;grid-template-columns:9rem 1fr auto;gap:.3rem .9rem;
  align-items:baseline;padding:.55rem .8rem;background:var(--surface)}
.feel-layer{font-family:var(--display);font-weight:600;letter-spacing:.01em}
.feel-source{min-width:0;overflow-wrap:anywhere}
.feel-note{color:var(--muted);font-size:var(--t-fine);white-space:nowrap}
@media (max-width:34rem){
  .feel-layers li{grid-template-columns:1fr auto}
  .feel-source{grid-column:1/-1}
}
/* The group a control belongs to, in the driver's terms rather than the
   order the settings struct happens to be written in. */
.wheel-group{font-family:var(--display);font-size:var(--t-fine);font-weight:600;
  letter-spacing:.08em;text-transform:uppercase;color:var(--muted);
  margin:1rem 0 .2rem;padding-top:.6rem;border-top:1px solid var(--line-soft)}
.wheel-panel .wheel-group:first-child{margin-top:.2rem;padding-top:0;border-top:0}

/* Which domain a Workbench request is about. Two choices, side by side, and
   the chosen one visibly holds — a mode that constrains the server must be
   legible before the sentence is typed, not after it lands somewhere. */
.wb-mode{display:flex;flex-wrap:wrap;gap:.5rem;border:0;padding:0;margin:0 0 .8rem}
.wb-mode label{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;
  padding:.35rem .7rem;border:1px solid var(--line);border-radius:999px;cursor:pointer}
.wb-mode label:has(input:checked){border-color:var(--accent);
  background:color-mix(in srgb,var(--accent) 12%,transparent)}
.wb-mode input{margin:0;accent-color:var(--accent)}

/* Save state: what happened to the thing you just did.
   It IS the shared status primitive — two spellings of one component, because
   static markup names its variant with a class and a JavaScript-driven one
   sets a data attribute. Phase 2 built this locally and said so; folding it in
   here is what phase 3 owed it. The colour never carries the meaning alone:
   the word is always there too. */
.save-state:empty{display:none}
/* A/B beside the change it judges, not at the foot of the section. */
.workbench-trial-inline{margin-top:.8rem;padding-top:.7rem;border-top:1px dashed var(--line)}

/* ── Phase 3: the rest of the ground rules ─────────────────────────────── */

/* Selection, focus and forced colors on the new ground. A focus ring tuned
   for paper disappears on graphite, and forced-colors mode must keep working
   for people who rely on it — their colours win, ours get out of the way. */
::selection { color: var(--accent-ink); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
/* FORCED COLORS. The viewer's palette wins and ours gets out of the way —
   which means anything that was carrying meaning in colour alone stops
   carrying it, and has to say the same thing another way.
   Captured by `tools/uicheck/sweep.sh`, which is how the two below were
   found: the disabled button was indistinguishable from the live ones, and
   every status dot disappeared, leaving eight identical pills. */
@media (forced-colors: active) {
  .btn, .btn2, button, .card, .tag, .chip { border: 1px solid ButtonBorder; }
  .track-mark, .track-key { background: CanvasText; forced-color-adjust: none; }
  .save-state[data-state] { color: CanvasText; }
  /* The system's own word for "you cannot press this". */
  .btn[aria-disabled="true"], button:disabled {
    color: GrayText;
    border-color: GrayText;
  }
  /* currentColor is thrown away here, so the dot has to be painted. Without
     it every status is a pill with a word in it and nothing else. */
  .status::before, .save-state::before {
    background: CanvasText;
    forced-color-adjust: none;
  }
  /* The one action that cannot be undone keeps a mark of its own, since its
     colour is gone. */
  .btn.danger, button.danger { border-style: dashed; border-width: 2px; }
}

/* Form controls belong to the dark ground rather than to the browser's idea
   of a light one. */
input, textarea, select {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}
input::placeholder, textarea::placeholder { color: var(--faint); }

/* STEPPED LAYERS, stated once so a page can ask for depth by name instead of
   inventing a shade. Each is a visible move from the one below it. */
.layer-surface { background: var(--surface); }
.layer-raised  { background: var(--surface-2); }
.layer-selected{ background: var(--surface-3); }
.layer-overlay { background: var(--overlay); }

/* STATUS, one primitive for every editable surface and every record. The
   colour is never the accent: a status that shares the brand colour cannot be
   read as a status, and the word carries the meaning anyway for anyone who
   does not see the colour.

   The remediation plan lists twelve MEANINGS. They are not twelve classes —
   minting a name per meaning would leave most of them unused, which is how a
   vocabulary rots. Each maps to a tone, and the WORD in the pill is what
   separates two meanings that share one:

     live, running now ......... status-live
     active in game, synced .... status-ok   ("In your game")
     saved, verified ........... status-ok / status-verified
     selected .................. tag.sel, which is a filter, not a state
     dirty ..................... status-warn ("Not saved yet")
     saving, held, offline ..... status-quiet
     warning ................... status-warn
     failed .................... status-bad

   A second spelling exists for the JavaScript-driven one: a static status
   names its variant with a class, and the save note sets data-state. The
   never-used aliases (`status-saved`, `status-dirty`, `status-failed`,
   `poster.tall`, `is-disabled`, `section-kicker`) were removed in phase 10:
   vocabulary nobody speaks is vocabulary that rots. */
.status,.save-state{display:inline-flex;align-items:center;gap:.35rem;font-size:var(--t-micro);
  font-weight:600;letter-spacing:.02em;padding:.15rem .5rem;border-radius:999px;
  border:1px solid transparent;white-space:nowrap}
.status::before,.save-state::before{content:"";width:.45rem;height:.45rem;border-radius:50%;background:currentColor}
.status-live{color:var(--live);border-color:color-mix(in srgb,var(--live) 40%,transparent);
  background:color-mix(in srgb,var(--live) 12%,transparent)}
.status-ok,.save-state[data-state="saved"]{color:var(--ok);border-color:color-mix(in srgb,var(--ok) 40%,transparent);
  background:color-mix(in srgb,var(--ok) 12%,transparent)}
.status-verified{color:var(--verify);border-color:color-mix(in srgb,var(--verify) 40%,transparent);
  background:color-mix(in srgb,var(--verify) 12%,transparent)}
.status-warn,.save-state[data-state="dirty"]{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 40%,transparent);
  background:color-mix(in srgb,var(--warn) 12%,transparent)}
.status-bad,.save-state[data-state="error"]{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,transparent);
  background:color-mix(in srgb,var(--bad) 12%,transparent)}
.status-rival{color:var(--rival);border-color:color-mix(in srgb,var(--rival) 40%,transparent);
  background:color-mix(in srgb,var(--rival) 12%,transparent)}
.status-record{color:var(--record);border-color:color-mix(in srgb,var(--record) 40%,transparent);
  background:color-mix(in srgb,var(--record) 12%,transparent)}
.status-quiet,.save-state[data-state="saving"]{color:var(--muted);border-color:var(--line)}

/* OVERFLOW CUES. A row of tabs or chips that scrolls with no sign it scrolls
   is a row that is simply missing its last items to most people. */
/* A SCROLLBAR ONLY WHERE IT HELPS. This set `thin` on all three, and
   `scrollbar-width` is the standard property — so it overrode the
   `::-webkit-scrollbar { display: none }` the tab strip declares 1300 lines
   above, and every phone got a grey bar under its local navigation. The strip
   already HAS its overflow cue: the fade mask below, which is the designed
   signal and does not take a row of pixels.

   A wide data table keeps its scrollbar, because there the bar is also the
   handle somebody drags. */
.tablewrap{scrollbar-width:thin}
.tabs,.chips{scrollbar-width:none}
.tabs,.chips{
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 2.5rem),transparent 100%);
  mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 2.5rem),transparent 100%)}
@media (min-width:60rem){.tabs,.chips{-webkit-mask-image:none;mask-image:none}}

/* MOTION, for changes of state and nothing else. Reduced motion removes the
   movement and keeps the meaning. */
@keyframes rise { from { opacity:0; transform: translateY(.3rem) } to { opacity:1; transform:none } }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important }
}

/* ══ Phase 3: shared primitives ═══════════════════════════════════════════
   Everything below is a component the pages COMPOSE. A page phase that needs
   a new look changes a primitive here or adds one here; it does not invent a
   local variant, because a local variant is how the product ended up with one
   card standing in for ten different objects.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Page families ────────────────────────────────────────────────────────
   Race, Cave and Workshop have to be tellable apart at a glance without
   becoming three products. One token moves: --family. Global navigation, the
   action colour and every status keep their meaning everywhere; only the
   band, the kicker and the family shell's own texture follow the area.
   The Cave's warmth is THIS, rather than the inverted theme it used to be. */
:root { --family: var(--accent); --family-soft: color-mix(in srgb, var(--accent) 12%, transparent); }
[data-section="cave"] { --family: var(--warm); --family-soft: color-mix(in srgb, var(--warm) 12%, transparent); }
[data-section="workshop"] { --family: var(--verify); --family-soft: color-mix(in srgb, var(--verify) 12%, transparent); }
.section-shell {
  background:
    linear-gradient(105deg, var(--family-soft), transparent 42%),
    var(--surface-2);
}
.kicker { color: var(--family); }
/* The workshop's texture: a faint drafting grid, because the workshop is
   where things get measured. The Cave gets a warm pool of light instead. */

/* ── Heroes ───────────────────────────────────────────────────────────────
   Three, because pages open in three different ways: with a thing you can
   look at, with a decision to take, or with numbers. One hero class doing all
   three is what produced the wide empty banner. */
/* IT ASKS ITS OWN WIDTH, not the window's. A viewport media query is the
   wrong question for a component that can sit in a full-width page or in one
   column of a dashboard: at 1440px with a rail beside it this hero is 50rem
   wide, stayed in two columns, and its 16:9 media sized its width from the
   row height — 872px inside an 799px panel, clipped by the panel's own
   overflow. A container query asks what the component can actually see. */
.hero-object { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1rem, 2.4vw, 2rem); align-items: center; }
.hero-object .poster { margin: 0; }
/* Stacked, the object leads — which is what an object-first hero means. */
.hero-object > .poster { order: -1; }
@container panel (min-width: 58rem) {
  .hero-object { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .hero-object > .poster { order: 0; }
}
.hero-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem 1.6rem; }
.hero-data .metric { border-left: 2px solid var(--family); padding-left: .7rem; }

/* ── Object cards ─────────────────────────────────────────────────────────
   A car is not a guide is not a record. Same skeleton, so the product stays
   one product; a family stripe and a label, so the eye can sort a mixed list
   without reading it. The stripe is decoration — the label above it is the
   part a screen reader gets. */
.obj { position: relative; overflow: hidden; }
.obj::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--obj-color, var(--line)); }
.obj-car { --obj-color: var(--accent); }
.obj-track { --obj-color: var(--verify); }
.obj-setup { --obj-color: var(--warm); }
.obj-feel { --obj-color: var(--rival); }
.obj-guide { --obj-color: var(--link); }
.obj-driver { --obj-color: var(--muted); }
.obj-cast { --obj-color: var(--live); }
.obj-event { --obj-color: var(--live); }
.obj-league { --obj-color: var(--verify); }
.obj-record { --obj-color: var(--record); }
.obj-kind { color: var(--obj-color, var(--muted)); font-size: var(--t-micro); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.obj-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.obj-title { font-family: var(--display); font-size: var(--t-lead); font-weight: 700; }
.obj-facts { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .35rem; color: var(--muted); font-size: var(--t-fine); }
.obj-facts strong { color: var(--text); font-family: var(--mono); font-weight: 600; }

/* ── Boards ───────────────────────────────────────────────────────────────
   Racing information, not a generic table: position reads first, movement is
   a direction rather than a signed number to decode, the gap is monospaced so
   the column is a shape, and YOU are findable without searching for yourself. */
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board td, .board th { padding: .5rem .6rem; border-bottom: 1px solid var(--line-soft); }
.board .pos { width: 3.2rem; font-family: var(--display); font-size: var(--t-lead); font-weight: 800; text-align: right; }
.board .gap { font-family: var(--mono); text-align: right; white-space: nowrap; }
.board tr.leader .pos { color: var(--record); }
.board tr.record td { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--record) 30%, transparent); }
.board .move { display: inline-flex; align-items: center; gap: .18rem; font-size: var(--t-micro); font-weight: 700; }
.board .move.up { color: var(--ok); }
.board .move.down { color: var(--bad); }
.board .move.same { color: var(--faint); }
.board .move::before { content: "\2192"; }
.board .move.up::before { content: "\2191"; }
.board .move.down::before { content: "\2193"; }
/* A row that just changed. The colour fades; the new number stays. */
@keyframes board-change { from { background: color-mix(in srgb, var(--live) 26%, transparent); } to { background: transparent; } }
.board tr.changed { animation: board-change 1.6s ease-out both; }
@media (prefers-reduced-motion: reduce) { .board tr.changed { animation: none; box-shadow: inset 3px 0 0 var(--live); } }

/* ── Media ────────────────────────────────────────────────────────────────
   Every poster reserves its space before the image arrives, so nothing on the
   page jumps when it does. Heavy media — a 3D viewer, a replay — is never
   started for you: the still is the page, the button is the choice. */
.poster { position: relative; overflow: hidden; margin: .6rem 0; border-radius: var(--r-s); background: var(--surface-2); aspect-ratio: 16 / 9; }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.poster.wide { aspect-ratio: 21 / 9; }
.poster figcaption { position: absolute; inset: auto 0 0; padding: .4rem .6rem; color: var(--text); background: color-mix(in srgb, var(--bg-deep) 72%, transparent); font-size: var(--t-fine); }
.poster.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--wash-hover) 50%, transparent 80%);
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .poster.is-loading::after { animation: none; } }
.media-activate { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .5rem; padding: 1rem; text-align: center; background: color-mix(in srgb, var(--bg-deep) 62%, transparent); }
.media-activate .muted { max-width: 24rem; }

/* ── The states a page can be in ──────────────────────────────────────────
   Five, and they are not the same thing: nothing yet, not available to you,
   still arriving, no connection, and finished. Saying "empty" for all five is
   how "this is broken" became the reasonable reading. */
.state { padding: 1.6rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--r); text-align: center; background: var(--wash); }
.state strong { display: block; font-family: var(--display); font-size: var(--t-lead); }
.state p { max-width: 34rem; margin-inline: auto; color: var(--muted); }
.state-unavailable { border-style: solid; }
.state-offline { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.state-complete { border-style: solid; border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.state-loading strong::after { content: "\2026"; }

/* ── Feedback: one system for copy, save, install, publish and errors ──────
   Inline where the thing happened, so the answer is next to the question. The
   toast is only for actions whose result would otherwise be off screen. */
.toasts { position: fixed; z-index: 40; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; max-width: min(26rem, calc(100vw - 2rem)); }
.toast {
  display: flex;
  align-items: start;
  gap: .5rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-s);
  background: var(--overlay);
  box-shadow: var(--shadow);
  animation: rise .18s ease-out both;
}
.toast.error { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ── Confirmation ─────────────────────────────────────────────────────────
   For destroying, revoking and finalising — the three that cannot be undone
   by pressing the thing again. */
dialog.confirm { max-width: min(32rem, calc(100vw - 2rem)); padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); background: var(--overlay); box-shadow: var(--shadow); }
dialog.confirm::backdrop { background: color-mix(in srgb, var(--bg-deep) 72%, transparent); }
dialog.confirm h2 { margin-top: 0; }
dialog.confirm .form-actions { margin-top: 1rem; }

/* ── Bringing a file in ───────────────────────────────────────────────────
   The zone, what you picked, how far it got, and what went wrong — the four
   parts an upload needs before it can be honest about failing. */
.dropzone { display: grid; gap: .4rem; place-items: center; padding: 1.6rem 1rem; border: 2px dashed var(--line); border-radius: var(--r); background: var(--wash); text-align: center; }
.dropzone.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dropzone.is-bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.file-summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.file-summary .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-summary .size { color: var(--muted); font-family: var(--mono); font-size: var(--t-fine); }
progress { width: 100%; height: .5rem; border: 0; border-radius: 999px; background: var(--surface-3); accent-color: var(--accent); }
progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-3); }
progress::-webkit-progress-value { border-radius: 999px; background: var(--accent); }

/* ── Filters ──────────────────────────────────────────────────────────────
   A filter chip is a toggle, and it says so in the accessibility tree
   (aria-pressed) as well as in the paint. Each one is also a real link, so
   filtering works with no JavaScript at all. */
.chips a, .chips button { display: inline-flex; align-items: center; gap: .3rem; min-height: 32px; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: var(--t-fine); white-space: nowrap; }
.chips a:hover, .chips button:hover { color: var(--text); border-color: var(--faint); text-decoration: none; }
.chips [aria-pressed="true"], .chips a.on { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); font-weight: 700; }
.chips [aria-pressed="true"]::after, .chips a.on::after { content: "\00d7"; font-weight: 700; opacity: .75; }

/* ── The brand mark ───────────────────────────────────────────────────────
   Four flag squares built from CSS grid — no asset to load, lose, or version.
   It leans into motion the way the product does, and it stands still for
   anybody who asked their machine to stop moving things. */
.brand-mark { transition: transform .2s ease; }
.brand:hover .brand-mark { transform: skewX(-9deg); }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-mark { transform: none; } }

/* The lab's own layer swatches. It is the one place the layers appear next to
   each other, and comparing them is the whole point. */
.layers-demo { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.layers-demo span { padding: 1.1rem 1.4rem; border-radius: var(--r-s); font-size: var(--t-fine); font-weight: 600; }

/* A live thing moves. The dot breathes so "live" is not just another coloured
   word, and it stops for anybody who asked their machine to stop moving. */
@keyframes live-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.status-live::before { animation: live-pulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .status-live::before { animation: none; } }
#palette-list .none { padding: .5rem .7rem; color: var(--muted); }

/* ── Home's opening (phase 4) ─────────────────────────────────────────────
   The hero composes `hero-object` rather than carrying a layout of its own.
   What is here is only what that primitive cannot know: which half is copy,
   and what to do when there is no photograph. */
.hero.hero-object { align-items: center; }
.hero-copy > :first-child { margin-top: 0; }
.hero-copy > :last-child { margin-bottom: 0; }
/* The media keeps its own 16:9 and fills the width it is given. It must NOT
   stretch to the row: an aspect-ratio box told to match a tall neighbour
   computes its width from that height and overflows. */
.hero-media { align-self: start; width: 100%; margin: 0; }

/* NO PHOTOGRAPH IS THE ORDINARY CASE. Most combinations have no cleared
   image and never will — a car nobody licensed to us cannot be shown — so
   this is a composition, not the gap where one should have been. The track's
   own shape is the most honest thing available: it is the lap. */
.poster-outline {
  display: grid;
  /* STRETCH, not centre. A centred grid item has no definite height, so the
     `height: 100%` below resolved to auto and a square track drew itself at
     its natural size straight out of the bottom of the plate. Stretching the
     row gives the SVG a box to fit, and its own viewBox does the rest. */
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  justify-items: center;
  /* Room at the foot for the caption, which is positioned over the plate. */
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 2.6rem;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    linear-gradient(160deg, var(--surface-2), var(--bg-deep));
}
/* A track outline is whatever shape the track is — square, long, or a
   hairpin — inside a 16:9 plate. Bounding it on width alone let a squarish
   circuit run out of the bottom of its own frame. */
.poster-outline .shape {
  width: min(22rem, 100%);
  height: 100%;
  min-height: 0;
  color: var(--accent-bright);
}
.poster-outline .shape svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 34%, transparent));
}
.poster-outline figcaption { background: none; color: var(--muted); text-align: center; }

/* The promise, at the size a promise is read at. */
.thesis-sentence { max-width: 44ch; }

@media (max-width: 55rem) {
  /* The visual goes UNDER the copy on a phone, because the combination and
     the one action are what the first viewport is for. */
  .hero.hero-object { display: block; }
  .hero-media { margin-top: 1.1rem; }
}

/* Home's board is the primitive plus the one thing only this board has: a
   movement column the page fills in from what you last saw.
   The gap BAR is not redefined here — `.gap .bar` above already draws it, and
   a second definition of the same thing is how a shared primitive quietly
   becomes two. */
.board .delta { width: 1.6rem; padding-right: 0; text-align: right; }

/* ── The board on a phone (phase 4) ───────────────────────────────────────
   A table wider than the screen inside a scrolling wrapper still pushed the
   PAGE sideways at 320 and 360 — the whole document scrolled, which is the
   one thing that must never happen. (It predates this phase; the viewport
   sweep found it.)

   Squeezing is not the answer: with `table-layout: fixed` and every column
   sharing the width, the driver's name got 42 pixels. Columns YIELD instead,
   in the order a timing screen would give them up — the movement arrow, the
   absolute time, and the ghost link go, and position, who, and the gap stay,
   because "P3, you, plus two tenths" is the story a board tells. */
@media (max-width: 30rem) {
  .xs-hide { display: none; }
  .board { table-layout: fixed; width: 100%; }
  .board .pos { width: 2.4rem; }
  .board .gap { width: 4.8rem; }
  .board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* The comeback recap: facts on one line each, with room between them, rather
   than bullets — a bulleted list of things that happened while you were away
   reads as a list of chores. */
.recap { gap: .3rem 1.4rem; font-size: var(--t-body); }
.recap > span { position: relative; padding-left: .9rem; }
.recap > span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ── The Cave's opening (phase 4) ─────────────────────────────────────────
   The atmosphere stays; comprehension stops depending on it. */
.cave-job { max-width: 52ch; margin: .2rem 0 .9rem; }
.cave-now { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: .2rem 0 1rem; }
.cave-connection { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; margin-top: 1rem; }
.cave-offline-note { font-size: var(--t-fine); }

/* The track behind the room. Decorative — the car and track are named in the
   heading, so nothing here carries meaning of its own. */
.cave-shape {
  position: absolute;
  z-index: 0;
  /* BEHIND THE ROOM, NOT BESIDE IT (2026-08-25). The note here used to say
     the shape must stay inside the panel so it did not read as "a stray
     rounded rectangle rather than a circuit". It read as one anyway, and for
     a reason no positioning fixes: THE TEST OVAL'S OUTLINE IS A ROUNDED
     RECTANGLE. Nordwald is an oval, so its silhouette is a stadium, and a
     stadium at 42% floating in clear space beside the text is unambiguously
     a UI element that nobody drew on purpose.
     A silhouette only reads as a map when it is behind something. Large, very
     low, overlapping the text and clipped by the panel edge, it becomes
     texture — and a circuit with a distinctive shape still reads as itself. */
  /* BLED OFF THE EDGE, not parked in the clear space beside the text. The
     first attempt kept it whole and inside the panel, which is precisely what
     made it read as an element somebody drew: a complete shape, isolated,
     with air around it. Cropped by the panel and overlapping the copy at a
     tenth of an opacity it becomes texture — and a circuit with a real shape
     still reads as itself. */
  right: -14%;
  top: 50%;
  width: clamp(18rem, 62%, 34rem);
  color: var(--warm);
  opacity: .09;
  transform: translateY(-50%);
  pointer-events: none;
}
.cave-shape svg { display: block; width: 100%; height: auto; }
/* A NAME DOES NOT BREAK IN HALF. The heading is three spans — car, "at",
   track — and the line broke inside "Clubman 420", leaving "420" under
   "at Nordwald". Each name stays whole; the line breaks between them. */
.cave-room h2 [data-cave-car],
.cave-room h2 [data-cave-track] { white-space: nowrap; }
@media (forced-colors: active) { .cave-shape { display: none; } }
.cave-room > :not(.cave-glow):not(.cave-shape) { position: relative; z-index: 1; }
@media (max-width: 46rem) { .cave-shape { display: none; } }

/* ── Workshop (phase 5) ───────────────────────────────────────────────────
   The situational row sits above the type chips because it answers the
   question people arrive with — "what is there for the race I am about to
   drive" — before the one the catalogue answers. */
.chips.situational { margin: 0 0 .7rem; }
.chips.situational .chip { border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); }
.chips.situational .chip .n { color: var(--accent); }
/* A card's track shape: small, quiet, and decorative — the combination is
   named in words directly above it. */
/* A CARD WITH NOTHING BUT WORDS (phase 11, 2026-08-26). A Workshop card whose
   artifact has no track has no shape to show, and the grid stretches it to
   match a neighbour that does — measured at 1440, about 150px of empty card
   below "not yet driven". An outside review said the cards "often contain only
   text", and this is the shape of that.

   The mark is the type's own glyph and the treatment is .empty-state's: large,
   low, clipped by the box so it reads as material rather than as an icon
   somebody centred, and behind the words at five percent. It says nothing the
   kicker does not, so it is aria-hidden at the call site and gone entirely
   under forced colors. */
/* Scoped to the artifact card, and the link is stretched to fill it: the mark
   anchors to the bottom of whatever contains it, and an unstretched link ends
   where its text does — which left the mark floating in the middle of the card
   with the void still under it. */
/* And the cards stop being stretched to each other. A grid row makes every
   card as tall as the tallest, so a card with no shape to show was given the
   height of one that has and then left to fill it with nothing — the 150px
   was never the card's content, it was the row. Sizing to content removes the
   void outright; the mark is for what is still short. */
.browse-grid { align-items: start; }
.artifact-card { display: flex; flex-direction: column; overflow: hidden; }
.artifact-card .card-main { position: relative; flex: 1 1 auto; }
.artifact-card .card-main > *:not(.card-mark) { position: relative; }
.card-mark {
  position: absolute;
  inset: auto 0 -34% 0;
  margin: auto;
  width: min(10rem, 46%);
  opacity: .05;
  pointer-events: none;
  color: var(--accent);
}
.card-mark svg { width: 100%; height: auto; display: block; }
@media (forced-colors: active) { .card-mark { display: none; } }
.card-shape { width: 4.6rem; margin: .45rem 0 0; color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card-shape svg { display: block; width: 100%; height: auto; }

/* The owner's own area on a shared page: outside the reader's panes, and
   marked as somebody's rather than everybody's. */
.owner-area { border-left: 3px solid color-mix(in srgb, var(--warm) 55%, transparent); }
.owner-area > .kicker { color: var(--warm); }

/* Which way a value went, next to the value itself. Not a colour alone: the
   arrow carries it, and the title says it in words. */
.delta-mark { font-size: .7em; vertical-align: .12em; }
.delta-mark.up { color: var(--warn); }
.delta-mark.down { color: var(--verify); }

/* The car stage: the canvas and the ask that sits over it until somebody
   takes it. `media-activate` positions against this. */
.car-stage { position: relative; }
.car-stage .car-viewer { margin: 0; }

/* A person, with a face. The helmet is decorative — the name is always beside
   it — so it never carries meaning on its own. */
.person-head { display: flex; align-items: center; gap: .9rem; }
.person-head h1 { margin: 0; }
.helmet-mark { display: block; width: 3.2rem; height: 3.2rem; flex: 0 0 auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.helmet-mark.small { width: 1.7rem; height: 1.7rem; }
.helmet-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 0; }
.helmet-row .helmet-mark { width: 2.4rem; height: 2.4rem; }

/* ── Event cards (phase 7) ────────────────────────────────────────────────
   A race is a circuit, a state and somebody who is holding it. The card said
   all three in muted text of the same weight. */
.event-card { position: relative; overflow: hidden; }
.event-shape {
  position: absolute;
  z-index: 0;
  /* Behind the copy AND clear of the countdown on the right, which it was
     drawing straight through. */
  right: 42%;
  top: 50%;
  width: 5.5rem;
  color: color-mix(in srgb, var(--accent) 16%, transparent);
  transform: translateY(-50%);
  pointer-events: none;
}
@media (max-width: 46rem) { .event-shape { display: none; } }
.event-shape svg { display: block; width: 100%; height: auto; }
.event-card .row-main, .event-card .row-side { position: relative; z-index: 1; }
.event-host { display: flex; align-items: center; gap: .45rem; margin: .4rem 0 0; }
.event-host .helmet-mark { width: 1.5rem; height: 1.5rem; }
.join-shape { max-width: 20rem; margin: 1rem 0; }

/* Download: the steps and the one integrity fact. */
.install-steps { margin: .8rem 0; padding-left: 1.2rem; color: var(--muted); }
.install-steps li { margin: .3rem 0; }
.checksum { display: block; overflow-wrap: anywhere; font-size: var(--t-fine); }
.download-shot { max-width: 46rem; margin: 1.4rem 0; }

/* ── Touch targets (phase 9) ──────────────────────────────────────────────
   WCAG 2.2 asks for 24x24 CSS pixels, and exempts a link sitting INSIDE a
   sentence, whose size is constrained by the line-height around it. Measured
   at 320px, three kinds of target were standalone and short: the footer's
   links (22px), a page's own action links like "Host a race" (22px), and the
   driver names in board and standings rows (20px) — each the only thing in
   its cell, so the inline exception does not cover them.

   Padding, not font size: the type scale is settled and these must not grow. */
.site-footer a,
.sort-links a,
.section-heading-row .sort-links a {
  display: inline-block;
  padding-block: .18rem;
  min-height: 24px;
}
table td a, .board td a {
  display: inline-block;
  padding-block: .12rem;
  min-height: 24px;
}

/* A pane wrapper is a grouping, not a layout: the sections inside keep the
   spacing they had when they were siblings. */
.pane { display: contents; }
.pane[hidden] { display: none; }

/* NO FLASH OF EVERY PANE (2026-08-25). The server renders them all visible,
   because with no scripting every pane has to be reachable; the tab script
   then hides all but one. Right promise, wrong order — the browser painted
   the whole page and then collapsed it.
   `data-js` is set by an inline script in the head, before the body is
   parsed, so this applies before the first paint. A browser with no
   scripting never sets it and never hides anything, which is the promise
   intact. A deep link to a later pane still corrects in the script, and
   corrects a small page rather than a large one. */
/* Hidden only UNTIL THE PANES HAVE DECIDED, and that qualifier is the whole
   rule (fixed 2026-08-26). Written without it, this hid every secondary
   section on the page for as long as JavaScript was enabled — and nothing
   could ever put them back, because it does not depend on [hidden] and the
   pane script speaks only [hidden]. Overview is the one Cave pane built from
   sections that are not secondary, so Overview was the one pane that worked
   and every other one was an empty page under a highlighted tab.

   What it is FOR is the flash: without JS the page is one long document and
   must stay that way, so the server sends every section visible. A tabbed
   page would therefore paint the whole document and then collapse it. This
   holds them back for that moment and no longer — site.v13.js stamps
   data-panes-ready as soon as the tabs are wired, unconditionally, including
   on a page whose bar was dropped for having too few live tabs. */
html[data-js]:not([data-panes-ready]) [data-pane-secondary] { display: none; }

/* An upload that says how far it got. */
.upload-state { margin: .6rem 0 .2rem; color: var(--muted); font-size: var(--t-fine); }
form > progress { margin-bottom: .6rem; }

/* DOWNLOAD FUNNEL (v18, 2026-08-26).
   One visible promise, one real file, one real route into the client. The old
   page stacked a narrow file card, a detached screenshot and a second set of
   decorative numbered cards. This hero keeps the decision and the evidence
   together; the only numbered component below it is the actual ZIP-to-race
   journey. */
.download-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(22rem, .96fr);
  gap: clamp(1rem, 2.5vw, 2.2rem);
  align-items: stretch;
  margin: .35rem 0 clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + .35rem);
  background:
    radial-gradient(38rem 22rem at 3% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 72%),
    linear-gradient(145deg, var(--surface-2), var(--bg-deep));
  box-shadow: var(--shadow);
}
.download-offer {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(1.35rem, 4vw, 3.3rem);
}
.download-hero.no-shot { grid-template-columns: minmax(0, 1fr); }
.download-hero.no-shot .download-offer { max-width: 64rem; }
.download-offer h1 { max-width: 18ch; font-size: clamp(2.45rem, 5vw, 4.6rem); }
.download-offer .lead { max-width: 40rem; }
.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1.25rem 0;
}
.download-meta span {
  padding: .34rem .62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-3) 82%, transparent);
  font-size: var(--t-fine);
  font-weight: 700;
}
.download-meta span:last-child { text-transform: capitalize; }
.download-destination {
  margin: 1.2rem 0;
  padding: .9rem 1rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.download-destination.is-ended { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.download-destination strong { display: block; color: var(--text); font: 800 clamp(1.25rem, 2.3vw, 1.75rem) var(--display); }
.download-destination p:last-child { margin: .25rem 0 0; color: var(--muted); }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.35rem; }
.download-actions code { overflow-wrap: anywhere; }
.download-warning {
  max-width: 42rem;
  margin: 1rem 0 0;
  padding: .68rem .8rem;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  border-radius: var(--r-s);
  color: var(--text);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  font-size: var(--t-fine);
}
.download-warning strong { color: var(--warn); }
.download-footnote { max-width: 43rem; margin: .9rem 0 0; color: var(--muted); font-size: var(--t-fine); }
.download-hero .download-shot {
  max-width: none;
  min-height: 100%;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background: var(--bg-deep);
}
.download-hero .download-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--bg-deep), transparent 28%);
  opacity: .72;
}
.download-hero .download-shot img { min-height: 100%; object-position: 56% 50%; }
.download-hero .download-shot figcaption { z-index: 1; }

.download-next { margin: 0 0 clamp(2rem, 5vw, 3.5rem); }
.download-next > h2 { margin-top: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.download-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.1rem 0 1.3rem;
  padding: 0;
  list-style: none;
  counter-reset: download-step;
}
.download-steps li {
  position: relative;
  min-height: 11rem;
  padding: 1.15rem 1rem 1rem 4.3rem;
  counter-increment: download-step;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-small);
}
.download-steps li::before {
  content: counter(download-step);
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 50%;
  color: var(--accent-bright);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font: 800 1.15rem var(--display);
}
.download-steps strong { display: block; margin-bottom: .4rem; color: var(--text); font: 800 1.2rem var(--display); }
.download-steps span { color: var(--muted); line-height: 1.55; }
.download-steps code { overflow-wrap: anywhere; }
.download-handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--r);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.download-handoff h2 { margin: 0; }
.download-handoff p:last-child { max-width: 55rem; margin: .35rem 0 0; color: var(--muted); }
.download-handoff .btn2 { flex: 0 0 auto; }
.download-details { max-width: 55rem; }
.download-details > h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
.download-details .checksum { overflow-wrap: anywhere; word-break: break-all; }

@media (max-width: 55rem) {
  .download-hero { grid-template-columns: minmax(0, 1fr); }
  .download-offer { padding-bottom: 1.4rem; }
  .download-hero .download-shot { order: -1; min-height: 15rem; aspect-ratio: 16 / 8; }
  .download-hero .download-shot::after { background: linear-gradient(0deg, var(--bg-deep), transparent 42%); }
  .download-steps { grid-template-columns: minmax(0, 1fr); }
  .download-steps li { min-height: 0; }
  .download-handoff { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 30rem) {
  .download-hero { margin-inline: -.2rem; }
  .download-offer { padding: 1.15rem .95rem 1.25rem; }
  .download-offer h1 { font-size: clamp(2.2rem, 13vw, 3.3rem); }
  .download-actions { align-items: stretch; flex-direction: column; }
  .download-actions .btn { width: 100%; }
  .download-steps li { padding-left: 3.9rem; }
}

/* The website stays present while the installed game opens, runs, and exits.
   This is deliberately a compact instrument panel rather than a toast: it
   can remain for a full drive, exposes recovery, and becomes the return door. */
.game-handoff {
  position: fixed;
  z-index: 80;
  right: clamp(.75rem, 2vw, 1.5rem);
  bottom: clamp(.75rem, 2vw, 1.5rem);
  width: min(32rem, calc(100vw - 1.5rem));
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
  border-radius: var(--r);
  background: color-mix(in srgb, var(--surface-2) 94%, transparent);
  box-shadow: 0 18px 60px #000a;
  backdrop-filter: blur(16px);
}
.game-handoff[hidden] { display: none; }
.game-handoff[data-state="connected"] { border-color: color-mix(in srgb, var(--green) 66%, var(--line)); }
.game-handoff[data-state="returned"] {
  border-color: color-mix(in srgb, var(--accent-bright) 66%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface-2)), var(--surface-2));
}
.game-handoff-mark {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bg-deep);
  background: var(--accent-bright);
}
.game-handoff-mark .i { width: 1.35rem; height: 1.35rem; }
.game-handoff strong { display: block; font: 800 1.3rem var(--display); }
.game-handoff p { margin: .18rem 0 0; color: var(--muted); line-height: 1.4; }
.game-handoff-actions { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; margin-top: .75rem; }
.game-handoff-actions .btn,
.game-handoff-actions .btn2 { min-height: 2.4rem; padding: .45rem .75rem; }
.game-handoff-close {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.6rem;
}
.home-driver-snapshot {
  display: grid;
  gap: .2rem;
  margin: 1rem 0 .2rem;
  padding: .85rem 1rem;
  border-left: 3px solid var(--accent-bright);
  border-radius: 0 var(--r-small) var(--r-small) 0;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
}
.home-driver-snapshot strong { color: var(--text); font: 800 1.35rem var(--display); }
.home-driver-snapshot span { color: var(--muted); }
.home-driver-snapshot .home-return-note { margin-top: .3rem; color: var(--text); }
.feel-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 1rem 0 1.5rem;
}
.feel-path a {
  display: flex;
  gap: .6rem;
  align-items: center;
  min-height: 3.2rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-small);
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.feel-path a:hover { border-color: var(--accent); }
.feel-path strong { color: var(--accent-bright); font: 800 1.25rem var(--display); }
.feel-path span { line-height: 1.2; }
@media (max-width: 48rem) {
  .game-handoff { bottom: calc(4.7rem + env(safe-area-inset-bottom)); }
  .feel-path { grid-template-columns: minmax(0, 1fr); }
}

/* Event result: what happened, and the cast's lines (item 13). */
.moments { margin: .5rem 0 1rem; padding-left: 1.2rem; }
.moments li { margin: .15rem 0; }
.cast-lines { display: grid; gap: .6rem; margin: .5rem 0 1rem; }
.cast-line { margin: 0; padding: .6rem .9rem; border-left: 3px solid var(--family); background: var(--paper-2, transparent); }
.cast-line p { margin: 0 0 .25rem; font-style: italic; }
.cast-line footer { color: var(--muted); font-size: .9em; }
