/* =============================================================================
   switchback docs — design system
   Direction: "instrument panel, live circuit." Graphite housing, signal-vermilion
   lamp. Kin to aimock by mechanism (nameplate mono, lamp accent, family banner,
   identical page architecture) — not by copying aimock's neon-green palette.
   Rationale lives in /DESIGN.md at the repo root.

   Served from the site ROOT. Every asset path here is root-absolute.
   ========================================================================== */

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Tokens ──────────────────────────────────────────────────────────────────
   Every token below has a documented role. Nothing here is declared and unused,
   and nothing outside this block hard-codes a colour — see /DESIGN.md.

   Colour is authored in OKLCH (perceptually even ramps, and the P3 headroom in
   the accent block below), and every neutral round-trips EXACTLY to the sRGB hex
   in its comment — those hexes are the CopilotKit house spine, measured off
   aimock.copilotkit.dev, byte-identical there and on www.copilotkit.dev.

   Contrast figures are measured, not estimated: canvas-rasterised OKLCH against
   the named background, WCAG 2.x relative luminance. AA normal text = 4.5:1.
   ========================================================================== */
:root {
  /* ---- Neutral spine: ONE cool blue-violet ramp, hue 285 ± 1 --------------
     Four background steps in a FIXED stacking order, each ~2-3 L-points apart.
     Depth comes from these steps plus 1px borders — never from shadows at rest.
     Note the order: a code block is LIGHTER than the page it sits on. That is
     the house's two-tone lift (page -> block -> header), and it is the opposite
     of the "sunken well" this file used to draw. */
  --bg-deep: oklch(14.73% 0.0107 285); /* #0a0a0f  page                       */
  --bg-card: oklch(20.45% 0.0185 285); /* #16161f  cards, code HEADER, inline  */
  --bg-card-hover: oklch(23.2% 0.023 285); /* #1c1c28  table-row hover         */
  --bg-surface: oklch(18.1% 0.014 285); /* #111118  sidebar, code BODY, footer */

  /* ---- Rules: exactly two. At-rest, and hover/table-header. -------------- */
  --line: oklch(29.2% 0.029 285); /* #2a2a3a  every 1px border at rest        */
  --line-strong: oklch(35.8% 0.038 285); /* #3a3a50  hover borders, th rules  */

  /* ---- Ink: exactly three. Measured on --bg-deep / surface / card. -------
     THREE inks is the house ceiling. Body copy is deliberately the MIDDLE
     tier, not the brightest — that quiet default is what lets the accent and
     the headings actually point at something.
     DEVIATION, held on purpose: aimock's dim tier is #555570, which measures
     2.75:1 on the page and 2.50:1 on a card — it fails AA at every size it is
     used at. switchback's dim tier is lifted to 62% L so the smallest mono
     label still clears 4.5:1 on the LIGHTEST surface it can land on. Do not
     "correct" this back toward aimock. */
  --ink: oklch(93.33% 0.0107 286); /* #e8e8f0  headings, emphasis  16.2:1     */
  --ink-2: oklch(63.5% 0.036 285); /* #8888a0  ALL body copy        5.7:1     */
  --ink-3: oklch(62% 0.042 285); /* #83839f  mono labels, meta     5.4 / 4.9:1 */

  /* ---- THE ACCENT. switchback's product hue: #f52ae1, oklch(68.06% .2852 333)
     Chosen as the exact OKLCH complement of aimock's #00ff88 (333 = 152.5+180.5)
     — kin to aimock encoded as literal hue opposition. It clears every other
     product hue and every semantic hue in the family by >=30 degrees, and it is
     the ONLY thing a sibling site is supposed to change.
       accent      5.9:1 on page / 5.6:1 on surface / 5.4:1 on card
       on-accent   near-black label on a filled accent button, 5.9:1 — a filled
                   accent button NEVER takes a white label
       accent-hi   link hover / focus ring, 12.4:1
       accent-dim  filled-button hover fill only (same hue, -9 L) */
  --accent: oklch(68.06% 0.2852 333); /* #f52ae1                             */
  --accent-hi: oklch(86.13% 0.1119 333); /* #feb6f1  hover, focus ring       */
  --accent-dim: oklch(58.95% 0.2609 333); /* #ce0bbd  primary-button hover    */
  --on-accent: var(--bg-deep); /* label ON a filled accent surface           */
  --accent-glow: oklch(68.06% 0.2852 333 / 0.14); /* active nav/TOC fill      */
  --accent-glow-strong: oklch(68.06% 0.2852 333 / 0.3); /* button hover shadow */
  --accent-glow-soft: oklch(68.06% 0.2852 333 / 0.06); /* page horizon wash   */

  /* ---- The LIVE lamp — a SEMANTIC signal, never the brand. ---------------
     Vermilion means "this leg is carrying traffic right now". It survives from
     the old palette on purpose, but it is now scoped to exactly two places:
     `.tag-live` and the route panel's served candidate. If you find yourself
     reaching for it for a link, a button or a brand mark, you want --accent. */
  --live: oklch(72% 0.175 40); /* #fd7747  live/serving          7.4:1       */
  --live-wash: oklch(72% 0.175 40 / 0.14); /* lamp halo                      */
  --live-wash-soft: oklch(72% 0.175 40 / 0.05); /* lamp halo, exhaled        */
  --live-edge: oklch(72% 0.175 40 / 0.5); /* 1px tint on a live pill           */

  /* ---- Semantics — one hue per meaning, all >=30 degrees off the accent and
     off each other, so a callout is never mistaken for a link.
     `-edge` is the 1px border tint, `-wash` the ~10% fill. Values follow the
     house semantic set (warning/error/blue); `--jade` is switchback's own
     "yes/ok" green, which the house leaves to each product. */
  --jade: oklch(80% 0.12 168); /* affirmative / yes             10.5:1       */
  --jade-wash: oklch(80% 0.12 168 / 0.1);
  --jade-edge: oklch(80% 0.12 168 / 0.45);
  --amber: oklch(80.2% 0.171 73.3); /* #ffaa00  caution          9.9:1       */
  --amber-wash: oklch(80.2% 0.171 73.3 / 0.1);
  --amber-edge: oklch(80.2% 0.171 73.3 / 0.45);
  --amber-edge-soft: oklch(80.2% 0.171 73.3 / 0.24); /* inner divider        */
  --rose: oklch(66.9% 0.221 15.6); /* #ff4466  danger            5.6:1       */
  --rose-wash: oklch(66.9% 0.221 15.6 / 0.11);
  --rose-edge: oklch(66.9% 0.221 15.6 / 0.5);
  --azure: oklch(64.5% 0.19 260.7); /* #4488ff  informational    5.6:1       */
  --azure-wash: oklch(64.5% 0.19 260.7 / 0.1);
  --azure-edge: oklch(64.5% 0.19 260.7 / 0.45);

  /* ---- Syntax — hand-tagged spans. No colour is INVENTED for syntax: every
     class reuses a token above, so re-pointing --accent re-tints the strings.
     Measured on --bg-surface (the code-block body), all >= 4.5:1. */
  --syn-kw: oklch(65.6% 0.219 301); /* #aa66ff  keyword           5.4:1      */
  --syn-fn: oklch(64.5% 0.19 260.7); /* #4488ff  function         5.6:1      */
  --syn-str: oklch(80% 0.14 152.5); /* string                    10.6:1      */
  --syn-num: oklch(80.2% 0.171 73.3); /* #ffaa00  number/type      9.9:1     */
  --syn-key: oklch(64.5% 0.19 260.7); /* JSON key                 5.6:1      */
  --syn-type: oklch(80.2% 0.171 73.3); /* type name                9.9:1     */
  --syn-cm: oklch(60% 0.03 285); /* comment (italic)              4.7:1      */

  /* ---- Chrome that is not a flat surface --------------------------------- */
  --nav-bg: oklch(14.73% 0.0107 285 / 0.92); /* translucent nav, blurred     */
  --scrim: oklch(10% 0.01 285 / 0.62); /* mobile drawer backdrop            */
  --shadow-panel: 0 1.5rem 3rem oklch(8% 0.01 285 / 0.45); /* hero panel     */
  --shadow-drawer: 1.5rem 0 3rem oklch(8% 0.01 285 / 0.6); /* open drawer    */
  --shadow-card: 0 0.5rem 1.875rem oklch(8% 0.01 285 / 0.3); /* card :hover  */
  --shadow-btn: 0 0.25rem 1.25rem var(--accent-glow-strong); /* btn :hover   */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");

  /* ---- Families ----------------------------------------------------------
     Instrument Sans is the family's sans — the single highest-impact
     brand-recognition change on this site, which shipped Archivo. There is no
     separate display face: the landing hero and an 11.2px label are the same
     typeface, and display character comes from weight 700 plus tight tracking.
     Ligatures AND contextual alternates are forced OFF in mono, so `->` and
     `=>` stay two glyphs. That is a deliberate house signature, not an
     oversight — it keeps a code sample byte-legible.
     NOTE: the <link> that fetches these lives in each page's <head>, which this
     file does not own. Until that request names Instrument Sans, these pages
     fall back to -apple-system / system-ui. */
  --font-sans: "Instrument Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  --mono-features: "liga" 0, "calt" 0;

  /* ---- Type scale — fixed rem, VIEWPORT-INVARIANT on documentation --------
     No clamp() and no responsive step-downs on doc pages: the scale is
     byte-identical at 375px and 1440px, so the 4px spacing grid and the 3:1
     heading asymmetry hold their relationships at every width. Only the
     landing page, a display surface, is allowed to interpolate.
     THREE content heading tiers is the hard ceiling (h1/h2/h3). --fs-label is
     a fourth tier only in the sense that it is not a heading at all: it is
     mono, uppercase and tracked, and it is told apart by family and case
     rather than by size.
     Total dynamic range is 36 / 11.2 = 3.2x. Keeping it that narrow is why
     hierarchy has to be carried by position, weight, colour and rules. */
  --fs-label: 0.7rem; /* 11.2  mono caps: labels, lang tags, th, badges      */
  --fs-micro: 0.78rem; /* 12.48 dense UI: TOC, pills, meta                   */
  --fs-code: 0.8rem; /* 12.8  CODE BLOCKS + inline code + footer brand       */
  --fs-meta: 0.85rem; /* 13.6  sidebar links, footer links                   */
  --fs-sm: 0.875rem; /* 14    tables, callouts, buttons, card titles         */
  --fs-body: 1rem; /* 16    body copy                                        */
  --fs-lead: 1.1rem; /* 17.6  lede paragraph                                 */
  --fs-h3: 1.15rem; /* 18.4  h3            (h2 -> h3 = 1.30x)               */
  --fs-h2: 1.5rem; /* 24    h2             (h1 -> h2 = 1.50x)               */
  --fs-h1: 2.25rem; /* 36    h1             (h1 -> body = 2.25x)             */
  /* Landing only — a display surface earns fluid type. 36 -> 72 and 28 -> 44. */
  --fs-display: clamp(2.25rem, 1.1rem + 4.2vw, 4.5rem);
  --fs-display-2: clamp(1.75rem, 1.15rem + 2.2vw, 2.75rem);

  /* ---- Leading — one value per role, no 0.05 near-misses -----------------
     Note the inversion from ordinary practice: code and prose get the MOST
     leading in the system and headings the least. That is what makes a wall
     of 12.8px monospace readable. */
  --lh-display: 1.08; /* hero h1                                            */
  --lh-display-2: 1.1; /* landing section h2                                */
  --lh-h1: 1.15; /* doc h1                                                  */
  --lh-heading: 1.3; /* h2, h3, h4, card titles                             */
  --lh-ui: 1.4; /* TOC and other dense chrome                               */
  --lh-list: 1.6; /* list items, table cells, document default              */
  --lh-prose: 1.7; /* paragraphs and ledes                                  */
  --lh-code: 1.75; /* code blocks                                           */

  /* ---- Tracking — five named values, and nothing else --------------------
     Small mono caps previously carried five different trackings (0.06 / 0.08 /
     0.092 / 0.10 / 0.12em) across three sizes for ONE visual category. There
     are now two label trackings: in-content labels, and nav group labels. */
  --ls-display: -0.03em; /* hero h1                                         */
  --ls-h1: -0.02em; /* doc h1, landing section h2                           */
  --ls-brand: 0.01em; /* wordmark and the family banner                     */
  --ls-label: 0.08em; /* every in-content mono caps label                    */
  --ls-label-wide: 0.12em; /* sidebar + TOC group labels                    */

  /* ---- Space: base unit 0.25rem = 4px -----------------------------------
     Eight structural steps, and every one of them is a multiple of 4. Token
     numbers ARE the step in 4px units, so --sp-12 is 48px: if a value cannot
     be named here it does not belong in the file.
     The two that carry the most weight: --sp-5 is the code-block padding, and
     --sp-12 is the space ABOVE an h2 (three times the space below it). */
  --sp-1: 0.25rem; /*   4  hairline gaps, badge padding                      */
  --sp-2: 0.5rem; /*    8  tight inner gaps, h2 padding-bottom               */
  --sp-3: 0.75rem; /*   12  h3 margin-bottom, table cell h-padding           */
  --sp-4: 1rem; /*      16  paragraph rhythm, h1/h2 margin-bottom            */
  --sp-5: 1.25rem; /*   20  CODE BLOCK PADDING, sidebar h-padding            */
  --sp-6: 1.5rem; /*    24  card padding, grid gap, list indent              */
  --sp-8: 2rem; /*      32  h3 margin-top, lede margin-bottom, nav gutter    */
  --sp-12: 3rem; /*     48  H2 MARGIN-TOP, doc column v-padding              */
  --sp-16: 4rem; /*     64  doc column h-padding, hero top                   */
  --sp-18: 4.5rem; /*   72  landing section rhythm — the standard            */
  --sp-24: 6rem; /*     96  reserved for a deliberate breath                 */

  /* ---- Shape: five radii, and every rounded thing picks one --------------
     4 lang tags / inline code / TOC links · 6 small utility controls and
     sidebar links · 8 buttons and callouts · 12 CARDS AND CODE BLOCKS ·
     100 pills only. */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-full: 100px;

  /* ---- Measure + structure ----------------------------------------------
     --shell-max bounds the whole page shell (nav, docs layout, footer) and was
     three separate 96rem literals. --content-max is the house doc column: 960px
     with 64px of inner padding leaves an ~832px text column, and --measure then
     caps prose narrower than that so code and tables get the extra width. */
  --shell-max: 96rem; /* 1536  nav / layout / footer shell bound             */
  --measure: 70ch; /*          prose measure cap                            */
  --content-max: 60rem; /* 960  doc column (aimock's value; was 864)        */
  --sidebar-w: 16.25rem; /* 260                                             */
  --toc-w: 13.75rem; /* 220                                                 */
  --drawer-w: 19rem; /* 304  off-canvas sidebar on a phone                   */
  --nav-h: 4.375rem; /* 70   house nav height (was 56)                      */

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 320ms;
  --dur-4: 620ms;
  /* Ambient tier — slow, looping, never blocking. Distinct from the four
     interaction durations above so nobody "optimises" a 2.8s breath to 320ms. */
  --dur-amb-1: 2800ms; /* served-lamp breath                                */
  --dur-amb-2: 3400ms; /* standby blink                                     */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Semantic z-index scale — never arbitrary values */
  --z-raised: 10;
  --z-sidebar: 40;
  --z-nav: 60;
  --z-scrim: 70;
  --z-drawer: 80;
  --z-tooltip: 100;
  --z-grain: 9999; /* film grain sits above everything, catches no clicks */
}

/* Display-P3 panels hold ~10% more chroma at hue 333. The sRGB value above
   stays the fallback, and every contrast figure in this file was measured
   against the sRGB fallback — so P3 only ever makes the accent MORE saturated,
   never less legible. */
@media (color-gamut: p3) {
  :root {
    --accent: oklch(68% 0.3314 333);
  }
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-list);
  background: var(--bg-deep);
  color: var(--ink-2);
  /* Faint horizon glow — the housing catching light from the lamp. */
  background-image: radial-gradient(
    120% 60% at 50% -10%,
    var(--accent-glow-soft) 0%,
    transparent 62%
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100dvh;
}

/* Film grain — house signature, static, 3%, never animated. Fixed so it does
   not scroll, pointer-events:none so it is invisible to input, and printed
   backgrounds are suppressed in the print block at the end of this file. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: var(--grain);
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-feature-settings: var(--mono-features);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
  transition: color var(--dur-1) linear;
}
a:hover {
  color: var(--accent-hi);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-8) 0;
}

::selection {
  background: var(--accent-glow);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: var(--sp-2);
  z-index: var(--z-tooltip);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-card-hover);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  transform: translateY(-160%);
}
.skip-link:focus-visible {
  transform: none;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ─── Family banner — the provenance credential. Every page carries it. ───── */
.family-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-brand);
  color: var(--ink-3);
}
.family-banner .fb-mark {
  color: var(--ink);
  font-weight: 600;
}
.family-banner .fb-mark::before {
  content: "◤";
  color: var(--accent);
  margin-right: 0.4em;
  /* em, not a scale step: this is a decorative glyph sized to its own label. */
  font-size: 0.9em;
}
.family-banner a {
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-strong);
}
.family-banner a:hover {
  color: var(--accent-hi);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.family-banner .fb-status {
  margin-left: auto;
  color: var(--amber);
}

/* ─── Top nav ─────────────────────────────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  /* Solid base — a browser without backdrop-filter gets an opaque nav, not
     a see-through one. Transparency is only earned inside the @supports
     block below, where the blur is actually there to back it up. */
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top-nav {
    background: var(--nav-bg);
    /* saturate() is load-bearing, not decorative: it stops the accent going
       muddy where it scrolls under the bar. House values are 20px / 1.4. */
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
  }
}
.nav-inner {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  justify-content: space-between;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-brand);
  color: var(--ink);
}
.nav-brand:hover {
  color: var(--ink);
  text-decoration: none;
}
.nav-brand .lamp {
  width: var(--sp-2);
  height: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  flex: none;
  transform: translateY(-0.05rem);
}
.nav-brand .nav-sub {
  font-size: var(--fs-label);
  font-weight: 400;
  color: var(--ink-3);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-3);
  /* WCAG 2.5.8 Target Size (Minimum), AA: 24x24 CSS px. An inline link's hit
     area is exactly its line box, which at 13.6px mono measured 18px tall —
     Quickstart 84x18, Configuration 109x18, CLI 25x18, all under the floor and
     all on the landing page's only navigation. inline-flex plus a 24px floor
     gives each link a real box; the glyphs do not move, because the extra 6px
     is split above and below the centred line. */
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--accent);
}
.nav-links .gh-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  transition:
    border-color var(--dur-2) linear,
    background var(--dur-2) linear,
    color var(--dur-2) linear;
}
.nav-links .gh-link:hover {
  border-color: var(--line-strong);
  background: var(--bg-card);
  color: var(--ink);
}

/* Mobile drawer toggle */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative; /* anchors the enlarged touch target below           */
  width: 2rem; /* a 32px hit target, not a spacing step                     */
  height: 2rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  /* The hamburger glyph, not text: sized to the 2rem button, leading collapsed
     so the glyph centres. Not a type-scale step. */
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
/* 32x32 already clears WCAG 2.5.8's 24px floor, so the failure here is comfort,
   not conformance: it is the primary control on a phone and sits under the 44px
   usually targeted for one. The VISUAL box deliberately stays 32px — this bar
   is sticky and runs on a budget of 16% of a 667px viewport (measured 14.6%),
   and a 44px button spends 12px more of that on every doc page for the whole
   scroll. So the TOUCH target grows instead, on a transparent overlay that
   costs no layout. It extends 6px per side: into the 24px shell gutter on the
   left, and into 6px of the 12px .nav-left gap on the right, so it cannot take
   a tap that belongs to the wordmark. */
.sidebar-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -50%);
}
.sidebar-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* ─── Docs layout ─────────────────────────────────────────────────────────── */
/* The shell has no gutter of its own: the sidebar runs to the viewport edge
   and carries the surface fill, exactly as it does on aimock, and the content
   column centres itself in whatever is left after the sidebar and the TOC. */
.docs-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.sidebar {
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  flex: none;
  width: var(--sidebar-w);
  height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-6) var(--sp-5);
  /* A distinct surface, one step up from the page. The sidebar used to be
     transparent, which is why the docs shell read flatter than aimock's. */
  background: var(--bg-surface);
  border-right: 1px solid var(--line);
  z-index: var(--z-sidebar);
  scrollbar-width: thin;
}
.sidebar-section {
  margin-bottom: var(--sp-6);
}
.sidebar-section h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-label-wide);
  color: var(--ink-3);
  margin: 0 0 var(--sp-2) var(--sp-3);
}
.sidebar-section a {
  display: block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  color: var(--ink-3);
  transition:
    color var(--dur-1) linear,
    background var(--dur-1) linear;
}
.sidebar-section a:hover {
  color: var(--ink);
  background: var(--bg-card);
  text-decoration: none;
}
.sidebar-section a.active {
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: inset 2px 0 0 var(--accent);
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: var(--scrim);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-scrim.open {
  display: block;
}

/* ─── Content column ──────────────────────────────────────────────────────── */
.docs-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--content-max);
  /* 48/64 — the doc column had 32px of inner padding inside an 864px column,
     so text sat twice as close to its own edges in a narrower measure. This is
     the single biggest contributor to the docs reading denser than aimock. */
  padding: var(--sp-12) var(--sp-16) var(--sp-16);
  margin-inline: auto;
}
.docs-content > * + * {
  margin-top: var(--sp-4);
}

/* Prose measure — body copy capped at 70ch; code, tables and diagrams run wide */
.docs-content p,
.docs-content li,
.docs-content blockquote,
.docs-content .lead {
  max-width: var(--measure);
}

.docs-content h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: var(--sp-4);
}
.docs-content h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: normal;
  color: var(--ink);
  text-wrap: balance;
  /* 48 above / 16 below — a 3:1 asymmetry, plus the 1px rule. This is what
     binds an h2 to its own content instead of floating it between two blocks,
     and it is the most transferable number in the house style. */
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + var(--sp-4));
}
.docs-content h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: normal;
  color: var(--ink);
  text-wrap: balance;
  /* 32 above / 12 below — the same 3:1 relationship, one tier down. */
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  scroll-margin-top: calc(var(--nav-h) + var(--sp-4));
}
/* Two pages ship an h4. The house caps content headings at three tiers, so
   this is deliberately NOT a fourth size step — it shares body size and takes
   its rank from weight and ink alone. Do not add a size here. */
.docs-content h4 {
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: normal;
  color: var(--ink);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
  scroll-margin-top: calc(var(--nav-h) + var(--sp-4));
}
.docs-content h2 + * {
  margin-top: var(--sp-4);
}
.docs-content h3 + * {
  margin-top: var(--sp-3);
}
.docs-content h4 + * {
  margin-top: var(--sp-2);
}
/* The lede gets a full 32px before the first real block. */
.docs-content .lead + * {
  margin-top: var(--sp-8);
}

.docs-content p {
  color: var(--ink-2);
  line-height: var(--lh-prose);
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.docs-content .lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-prose);
  color: var(--ink-2);
  margin-top: var(--sp-4);
}
.docs-content strong {
  color: var(--ink);
  font-weight: 600;
}
.docs-content em {
  font-style: italic;
}

.docs-content ul,
.docs-content ol {
  padding-left: var(--sp-6);
  color: var(--ink-2);
  line-height: var(--lh-list);
}
.docs-content li + li {
  margin-top: var(--sp-1);
}
.docs-content li::marker {
  color: var(--ink-3);
}
.docs-content ul ul,
.docs-content ol ol,
.docs-content ul ol,
.docs-content ol ul {
  margin-top: var(--sp-1);
}

.docs-content blockquote {
  padding: var(--sp-1) 0 var(--sp-1) var(--sp-4);
  border-left: 1px solid var(--line-strong);
  color: var(--ink-3);
}

.docs-content :not(pre) > code {
  /* A rem step, never an em: an em here compounded against every differently
     sized parent and manufactured 12.04 / 13.76px sizes nobody chose. */
  font-size: var(--fs-code);
  background: var(--bg-card);
  color: var(--ink);
  padding: var(--sp-1) var(--sp-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow-wrap: break-word;
}
.docs-content a > code {
  color: var(--accent);
}

kbd {
  display: inline-block;
  padding: var(--sp-1) var(--sp-1);
  font-size: var(--fs-code);
  background: var(--bg-card-hover);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  color: var(--ink);
}

/* ─── Code blocks ─────────────────────────────────────────────────────────── */
.code-block {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  /* 12px, the house card radius — this was 8px, the only rounded thing on the
     site that disagreed with the cards it sits between. */
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: var(--sp-4);
}
.code-block-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--ink-3);
}
.code-block-header .lang-tag {
  margin-left: auto;
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
}
.code-block pre {
  padding: var(--sp-5);
  /* Code WRAPS. It does not scroll.
     This is the fix for an absolute ban: text that overflows its container.
     The old rule was `overflow-x: scroll` plus a right-edge fade, and the
     measured result was 34px of the hero panel clipped at 1440 and 239px at
     375 — "# loopback unless you say otherw" — with no scrollbar rasterised on
     macOS, because overlay scrollbars fade out while idle. Technically
     scrollable is not the same as reachable, and nobody horizontally scrolls a
     panel that shows no track.
     The longest line in these docs is 287 columns. In a 341px column at 12.8px
     mono that is a ~2,200px scroll surface, so scrolling was never the right
     treatment for this content; wrapping is the only one under which no
     character is unreachable at any width.
     `overflow-x: auto` stays as a net for anything wrapping genuinely cannot
     break, and `overflow-wrap: break-word` breaks a single 300-character token
     rather than letting it escape the panel. */
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-size: var(--fs-code);
  line-height: var(--lh-code);
  tab-size: 2;
}
.code-block pre code {
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: inherit;
  overflow-wrap: inherit;
}
/* Header-less code blocks still need room for the copy button */
.code-block > pre:first-child {
  padding-right: var(--sp-12);
}

/* Copy affordance — injected by /docs.js */
.copy-btn {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: var(--z-raised);
  padding: var(--sp-1) var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-card-hover);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity var(--dur-2) linear,
    color var(--dur-2) linear,
    border-color var(--dur-2) linear;
}
.code-block:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}
.copy-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.copy-btn[data-state="done"] {
  opacity: 1;
  color: var(--jade);
  border-color: var(--jade);
}
.copy-btn[data-state="fail"] {
  opacity: 1;
  color: var(--rose);
  border-color: var(--rose);
}

/* Syntax spans — writers tag by hand: <span class="str">"…"</span> */
.code-block .kw {
  color: var(--syn-kw);
}
.code-block .fn {
  color: var(--syn-fn);
}
.code-block .str {
  color: var(--syn-str);
}
.code-block .num {
  color: var(--syn-num);
}
.code-block .cm {
  color: var(--syn-cm);
  font-style: italic;
}
.code-block .op {
  color: var(--ink-2);
}
.code-block .key {
  color: var(--syn-key);
}
.code-block .type {
  color: var(--syn-type);
}
.code-block .prop {
  color: var(--rose);
}

/* ─── Tabbed commands ─────────────────────────────────────────────────────── */
.code-tabs {
  margin-top: var(--sp-4);
}
.code-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.code-tab-bar button {
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition:
    color var(--dur-1) linear,
    border-color var(--dur-1) linear;
}
.code-tab-bar button:hover {
  color: var(--ink);
}
.code-tab-bar button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  cursor: default;
}
.code-tabs > [data-tab] {
  display: none;
}
.code-tabs > [data-tab].active {
  display: block;
}
/* No-JS / pre-hydration fallback: show the first panel rather than nothing */
.code-tabs:not([data-ready]) > [data-tab]:first-of-type {
  display: block;
}
.code-tabs > [data-tab] > .code-block:first-child {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
}

/* ─── Callouts ────────────────────────────────────────────────────────────── */
.callout {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-card);
  font-size: var(--fs-sm);
  line-height: var(--lh-list);
}
.callout > * + * {
  margin-top: var(--sp-2);
}
.callout p,
.callout li {
  max-width: none;
  color: var(--ink-2);
}
.callout-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}
.callout-title::before {
  font-family: var(--font-mono);
  font-weight: 700;
}
.callout-note {
  border-color: var(--azure-edge);
  background: var(--azure-wash);
}
.callout-note .callout-title {
  color: var(--azure);
}
.callout-note .callout-title::before {
  content: "i";
}
.callout-warning {
  border-color: var(--amber-edge);
  background: var(--amber-wash);
}
.callout-warning .callout-title {
  color: var(--amber);
}
.callout-warning .callout-title::before {
  content: "!";
}
.callout-danger {
  border-color: var(--rose-edge);
  background: var(--rose-wash);
}
.callout-danger .callout-title {
  color: var(--rose);
}
.callout-danger .callout-title::before {
  content: "×";
}

/* ─── Tables ──────────────────────────────────────────────────────────────── */
.table-scroll {
  margin-top: var(--sp-4);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  /* A thin track is a SECONDARY cue only. It was described here as the only
     affordance, and that was measured to be false on the platforms most of
     these readers are on: macOS and iOS draw overlay scrollbars that render
     nothing at rest, so a table with six columns off to the right presented a
     clean 1px border and read as a complete three-column table. The fade on
     .table-frame below is what actually carries the message. */
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
/* A wrapper that overflows is made focusable by /docs.js so it can be scrolled
   from the keyboard, which means it takes the house focus ring. The ring comes
   from the one global :focus-visible rule; the only thing overridden here is
   its rounding, which that rule sets to --r-sm and the table carries --r-md. */
.table-scroll:focus-visible {
  border-radius: var(--r-md);
}

/* Trailing-edge cue — the signal that a table continues past its right edge.
   The frame is injected by /docs.js around any .table-scroll it finds, and
   `data-overflow` / `data-at-end` on the frame are kept in sync there.

   It hangs off the FRAME, not off .table-scroll, and that is the whole trick:
   an absolutely positioned box inside a scroll container is part of that
   container's scrollable content, so a .table-scroll::after would sit at the
   visible edge only at scrollLeft 0 and then slide out of view the moment the
   reader starts scrolling — exactly when the cue is most needed. The frame
   does not scroll, so a cue anchored to it stays pinned at every position.
   The same reasoning, and the same measurements, that put the old code-block
   fade on .code-block rather than on its `pre` (PR #3).

   WHERE it is painted is the other half, and it is the half this rule got
   wrong twice. The cue now lights a RAIL: the wrapper's own right border,
   widened from 1px to --table-rail. A border sits OUTSIDE the scrollport — the
   scrollport is the padding box — so a cell can never paint there, the rail
   never scrolls, and nothing the reader is trying to read is ever underneath
   it. Both earlier versions instead washed a gradient across live cells:

     - Fading to --bg-deep sampled at 1 to 2 units of 255 against the untouched
       table, i.e. invisible. At 375px the clipped column boundary usually lands
       in cell whitespace, so there were no edge glyphs to dissolve either and
       it produced no cue whatsoever.
     - Inverting it to fade to --line did read — 33 to 42 units of 255 — but a
       wash over live cells costs contrast, and this comment used to claim the
       cost was "roughly the last 4px" of 14px body text. Measured on the built
       site that was false in both numbers. On /providers/ at 375px the muted
       11.2px `th` ink (--ink-3, a clear 5.4:1 unfaded) fell below 4.5:1 across
       the outer 16px, bottoming out at 3.7:1 measuring the ink against the
       faded background — and at 1.0:1 once the band is composited over the
       glyph as well, which is what actually renders: the last column of a
       scrolled header was erased, not dimmed. 11.2px is not large text, so
       4.5:1 is the floor that applies and the band broke it. The code and its
       own documentation disagreed, and the documentation was the flattering
       one, which is why it survived review.

   Off the content that trade disappears — a cue that covers no glyphs cannot
   take anyone's contrast — so the rail is free to be as strong as it needs to
   be, and it lights to --line-strong rather than --line. What changes with
   scroll position is only its COLOUR: it settles back to the border's own
   --line at the true end. The rail's WIDTH is fixed for as long as the table
   overflows, deliberately — a width that moved with scroll position would
   re-narrow the very scrollport /docs.js measures overflow against and shift
   the table sideways under the reader's hands.

   Not a background-image on .table-scroll, in either the flat or the two-layer
   local/scroll "scrolling shadows" form: backgrounds paint BEHIND content, so
   they still darken the surface the glyphs sit on — the same 4.5:1 failure by a
   longer route. Not mask-composite either: support is uneven and both failure
   modes are bad, a cue silently absent or one welded permanently over the last
   column.

   Gated on real, measured overflow, as before: on a table that fits, a lit
   rail down one side only would be an unexplained heavy edge. */
.table-frame {
  position: relative;
  /* The margin moves up to the frame — the cue spans the frame's box, and a
     margin left on the child would collapse through and stretch it. */
  margin-top: var(--sp-4);
  /* One number for the rail. The wrapper's border reserves the strip and the
     gradient lights it, so the two must not be free to drift apart. */
  --table-rail: 6px;
}
.table-frame > .table-scroll {
  margin-top: 0;
}
.table-frame[data-overflow="true"] > .table-scroll {
  border-right-width: var(--table-rail);
}
.table-frame[data-overflow="true"]::after {
  content: "";
  position: absolute;
  /* Exactly the rail: inset by the wrapper's 1px top and bottom borders, and
     flush right, so the lit end IS the table's right edge. */
  top: 1px;
  right: 0;
  bottom: 1px;
  width: var(--table-rail);
  z-index: 1; /* local stacking, per DESIGN.md §4d */
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: linear-gradient(to left, var(--line-strong), transparent);
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--dur-2) linear;
}
.table-frame[data-overflow="true"][data-at-end="true"]::after {
  opacity: 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.data-table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  /* No fill: the header earns its separation from a 2px rule, uppercase and
     tracking. A filled header row plus a tinted body is two devices doing one
     job, and it made the tables read heavier than the house's. */
  border-bottom: 2px solid var(--line-strong);
  white-space: nowrap;
}
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover td {
  background: var(--bg-card-hover);
}
.data-table code {
  white-space: nowrap;
}
.data-table .col-key,
.data-table td.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  color: var(--ink);
}
.data-table .yes {
  color: var(--jade);
  font-weight: 600;
}
.data-table .no {
  color: var(--ink-3);
}
.data-table .partial {
  color: var(--amber);
}

/* ─── Parameter / config reference list ───────────────────────────────────── */
.params {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.param {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
}
.param-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
}
.param-name {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.param-type {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--azure);
}
.param-req,
.param-opt {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-xs);
  border: 1px solid currentColor;
}
.param-req {
  color: var(--accent);
}
.param-opt {
  color: var(--ink-3);
}
.param-default {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-3);
}
.param-desc {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  max-width: var(--measure);
}
.param-desc > * + * {
  margin-top: var(--sp-2);
}
.param-desc p {
  font-size: inherit;
}

/* ─── Tags / status pills ─────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  background: var(--bg-card);
  white-space: nowrap;
}
.tag-live {
  color: var(--live);
  border-color: var(--live-edge);
  background: var(--live-wash);
}
.tag-ok {
  color: var(--jade);
  border-color: var(--jade-edge);
  background: var(--jade-wash);
}
.tag-warn {
  color: var(--amber);
  border-color: var(--amber-edge);
  background: var(--amber-wash);
}
.tag-danger {
  color: var(--rose);
  border-color: var(--rose-edge);
  background: var(--rose-wash);
}

/* ─── Navigational tiles (hub pages only — use sparingly) ─────────────────── */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  list-style: none;
  padding: 0;
}
.link-grid li {
  margin: 0;
  max-width: none;
}
.link-card {
  display: block;
  height: 100%;
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition:
    border-color var(--dur-3) linear,
    background var(--dur-3) linear,
    transform var(--dur-3) var(--ease-out-expo),
    box-shadow var(--dur-3) linear;
}
/* Docs cards lift 2px on hover, never at rest. Nothing in this system is
   elevated until you point at it. */
.link-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}
.link-card .link-card-title {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}
.link-card .link-card-desc {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  line-height: var(--lh-list);
  color: var(--ink-3);
}

/* ─── On-this-page TOC ────────────────────────────────────────────────────── */
.page-toc {
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  flex: none;
  width: var(--toc-w);
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  /* The right padding is load-bearing now that the shell has no gutter of its
     own: without it the active link's fill runs off the viewport edge. */
  padding: var(--sp-12) var(--sp-6) var(--sp-8) var(--sp-4);
  font-size: var(--fs-micro);
}
.page-toc-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-label-wide);
  color: var(--ink-3);
  margin: 0 0 var(--sp-2) var(--sp-2);
}
.page-toc a {
  display: block;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-xs);
  color: var(--ink-3);
  line-height: var(--lh-ui);
  transition:
    color var(--dur-1) linear,
    background var(--dur-1) linear;
}
.page-toc a:hover {
  color: var(--ink);
  background: var(--bg-card);
  text-decoration: none;
}
.page-toc a.active {
  color: var(--accent);
  background: var(--accent-glow);
}
.page-toc a.toc-h3 {
  padding-left: var(--sp-5);
}

/* ─── Prev / next footer nav ───────────────────────────────────────────────── */
.page-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-16);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}
.page-nav a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition:
    border-color var(--dur-2) linear,
    background var(--dur-2) linear;
}
.page-nav a:hover {
  border-color: var(--line-strong);
  background: var(--bg-card);
  text-decoration: none;
}
.page-nav .page-nav-next {
  text-align: right;
}
.page-nav .page-nav-dir {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
}
.page-nav .page-nav-label {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}
.page-nav a:hover .page-nav-label {
  color: var(--accent-hi);
}

/* ─── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-surface);
  margin-top: var(--sp-16);
}
.site-footer .footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}
.footer-left {
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  color: var(--ink-3);
}
.footer-left .lamp-dot {
  color: var(--accent);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  list-style: none;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--ink-3);
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* =============================================================================
   LANDING PAGE (brand register) — scoped to .landing
   ========================================================================== */
.landing {
  max-width: 70rem; /* 1120 — the house landing container                    */
  margin: 0 auto;
  padding: 0 var(--sp-8); /* 32 — the house gutter                          */
}

.landing .hero {
  /* 64/48, not aimock's 120/48: that 120 exists to clear a FIXED nav, and this
     nav is in-flow and sticky, so it already occupies its own space. */
  padding: var(--sp-16) 0 var(--sp-12);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--sp-12);
  align-items: start;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-status .lamp-live {
  width: var(--sp-2);
  height: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--amber);
  flex: none;
}

.hero h1 {
  margin-top: var(--sp-4);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 .h1-live {
  color: var(--accent);
}
.hero .hero-sub {
  margin-top: var(--sp-4);
  max-width: 48ch;
  font-size: var(--fs-lead);
  line-height: var(--lh-list);
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero .hero-cmd {
  margin-top: var(--sp-6);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition:
    background var(--dur-2) linear,
    border-color var(--dur-2) linear,
    color var(--dur-2) linear;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-dim);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
  text-decoration: none;
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--bg-card);
  color: var(--ink);
  text-decoration: none;
}

/* ─── The route panel — the landing's central image ───────────────────────── */
.route-panel {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.rp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--ink-3);
}
.rp-head .rp-endpoint {
  color: var(--ink);
}
.rp-head .rp-illustrative {
  margin-left: auto;
  color: var(--ink-3);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}
.rp-body {
  padding: var(--sp-4) var(--sp-4) var(--sp-6);
}
.rp-caption {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
}
.rp-body > .rp-caption ~ .rp-caption {
  margin-top: var(--sp-6);
}
.rp-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-2);
}
.rp-gate .rp-gate-name {
  color: var(--ink);
}
.rp-gate .rp-gate-verdict {
  margin-left: auto;
  color: var(--jade);
}

.rp-chain {
  list-style: none;
  margin-top: var(--sp-4);
  padding-left: var(--sp-2);
  border-left: 1px solid var(--line-strong);
}
.rp-cand {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-2);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  max-width: none;
}
.rp-cand + .rp-cand {
  border-top: 1px solid var(--line);
}
.rp-cand::before {
  content: "";
  position: absolute;
  /* Centred ON the rail: the li's left edge sits 8px right of the rail, so a
     8px dot pulled 12px left puts its centre exactly on the 1px line.
     `top` is optical centring against the first line's cap-height, NOT a
     spacing step — it is the one length in this file off the 4px grid. */
  left: calc(-1 * var(--sp-3));
  top: 0.875rem;
  width: var(--sp-2);
  height: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--bg-surface);
  border: 1.5px solid var(--line-strong);
}
.rp-cand .rp-name {
  color: var(--ink);
}
.rp-cand .rp-dialect {
  color: var(--ink-3);
}
.rp-cand .rp-verdict {
  margin-left: auto;
  white-space: nowrap;
}
.rp-cand[data-state="failed"] .rp-verdict {
  color: var(--rose);
}
.rp-cand[data-state="failed"]::before {
  border-color: var(--rose);
}
.rp-cand[data-state="failed"] .rp-name {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}
.rp-cand[data-state="served"] .rp-verdict {
  color: var(--live);
}
.rp-cand[data-state="served"]::before {
  border-color: var(--live);
  background: var(--live);
  box-shadow: 0 0 0 0.28rem var(--live-wash);
}
.rp-cand[data-state="standby"] .rp-verdict {
  color: var(--ink-3);
}
.rp-cand[data-state="standby"] .rp-name {
  color: var(--ink-3);
}
.rp-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--ink-3);
}
.rp-foot b {
  color: var(--ink-2);
  font-weight: 500;
}

/* ─── Landing sections ────────────────────────────────────────────────────── */
/* 72/72, and NO separator rule. aimock puts a border-top on zero of its eight
   content sections; this had one on five of five, which is a hairline doing the
   job that air is supposed to do — and it is why the page read like a settings
   screen. Deleting them takes the inter-section gap from 96px to 144px.
   The h2's own bottom border stays: a heading rule and a section divider are
   different things, and only the second one is the problem. */
.landing section {
  padding: var(--sp-18) 0;
}
.landing section > h2,
.landing .closing > h2 {
  font-size: var(--fs-display-2);
  font-weight: 700;
  line-height: var(--lh-display-2);
  letter-spacing: var(--ls-h1);
  color: var(--ink);
  text-wrap: balance;
  max-width: 34ch;
}
.landing section > .section-sub {
  margin-top: var(--sp-4);
  max-width: 62ch;
  font-size: var(--fs-body);
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Capability rows — a nameplate list, not a card grid */
.cap-list {
  margin-top: var(--sp-8);
  list-style: none;
  border-top: 1px solid var(--line);
}
.cap-list > li {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: var(--sp-3) var(--sp-6);
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.cap-list .cap-name {
  /* Sans, not mono, and one step ABOVE body: this is a real h3 in the shipping
     markup, and a heading smaller than the paragraph it labels is why this
     section used to read as an undifferentiated slab. */
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ink);
  line-height: var(--lh-heading);
}
.cap-list .cap-name::before {
  content: "";
  display: inline-block;
  width: var(--sp-2);
  height: var(--sp-2);
  margin-right: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--accent);
  vertical-align: 0.12em;
}
.cap-list .cap-body {
  font-size: var(--fs-body);
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.cap-list .cap-body code {
  font-size: var(--fs-code);
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--sp-1) var(--sp-1);
  white-space: nowrap;
}

/* Compact variant for narrow columns: label stacks over body, no outer rules */
.cap-list.compact {
  margin-top: 0;
  border-top: 0;
}
.cap-list.compact > li {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
}
.cap-list.compact > li:first-child {
  padding-top: 0;
}
.cap-list.compact > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.cap-list.compact .cap-body {
  font-size: var(--fs-sm);
}

/* Two-up: config in, behavior out */
/* Two explicit tracks, not auto-fit: auto-fit resolved to `572px 572px 0px` at
   1440 — a declared third column of zero width that described no intent. */
.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-8);
  margin-top: var(--sp-6);
  align-items: start;
}
.two-up .two-up-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}
.two-up .code-block {
  margin-top: 0;
}

/* A closing line under a section's main content */
.landing .section-note {
  margin-top: var(--sp-6);
  max-width: 66ch;
  color: var(--ink-2);
}

/* Dialect strip */
.dialect-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
  list-style: none;
}
.dialect-strip li {
  max-width: none;
}
.dialect-strip .dialect {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-2);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.dialect-strip .dialect b {
  color: var(--ink);
  font-weight: 600;
}

/* Honest-posture plate — one bordered notice, not a grid of look-alike cards */
.status-plate {
  margin-top: var(--sp-6);
  border: 1px solid var(--amber-edge);
  border-radius: var(--r-md);
  background: var(--amber-wash);
  overflow: hidden;
}
.status-plate > div {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: var(--sp-3) var(--sp-6);
  padding: var(--sp-6);
}
.status-plate > div + div {
  border-top: 1px solid var(--amber-edge-soft);
}
.status-plate dt {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--amber);
  line-height: var(--lh-heading);
}
.status-plate dd {
  font-size: var(--fs-sm);
  line-height: var(--lh-list);
  color: var(--ink-2);
  max-width: 62ch;
}

/* Closing */
/* The tail decelerates: the closing pair compresses to 48/48 so the page slows
   down and stops rather than ending on the same beat as everything else. */
.landing .closing {
  padding: var(--sp-12) 0;
}
/* The page's final call to action used to be styled with BODY tokens: 24px,
   grey ink, 1.65 leading — the smallest, dimmest, loosest heading on the page,
   with a 15.6px gap splitting one sentence into two apparent paragraphs. It now
   takes the section-h2 treatment above and only overrides its measure. */
.landing .closing > h2 {
  max-width: 30ch;
}
.landing .closing .hero-actions {
  margin-top: var(--sp-6);
}

/* =============================================================================
   Motion — landing arrival only. Content is visible by default; the animation
   enhances it, never gates it (no class-triggered reveal, no JS dependency).
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.6rem);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes lamp-breathe {
    0%,
    100% {
      box-shadow: 0 0 0 0.28rem var(--live-wash);
    }
    50% {
      box-shadow: 0 0 0 0.55rem var(--live-wash-soft);
    }
  }
  @keyframes standby-blink {
    0%,
    72%,
    100% {
      opacity: 1;
    }
    80% {
      opacity: 0.45;
    }
  }

  .landing .hero-status {
    animation: rise var(--dur-4) var(--ease-out-quint) both;
  }
  .landing .hero h1 {
    animation: rise var(--dur-4) var(--ease-out-quint) 60ms both;
  }
  .landing .hero .hero-sub {
    animation: rise var(--dur-4) var(--ease-out-quint) 120ms both;
  }
  .landing .hero .hero-cmd,
  .landing .hero .hero-actions {
    animation: rise var(--dur-4) var(--ease-out-quint) 180ms both;
  }
  .landing .route-panel {
    animation: rise var(--dur-4) var(--ease-out-expo) 240ms both;
  }
  /* The live lamp breathes — the one signature motion moment on the page. */
  .rp-cand[data-state="served"]::before {
    animation: lamp-breathe var(--dur-amb-1) var(--ease-out-quint) 1.2s infinite;
  }
  .hero-status .lamp-live {
    animation: standby-blink var(--dur-amb-2) linear 1s infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================================
   Responsive — structural, not fluid-typographic
   ========================================================================== */

/* Drop the TOC before the sidebar; the content column keeps its measure. */
@media (max-width: 1180px) {
  .page-toc {
    display: none;
  }
}

@media (max-width: 1080px) {
  .landing .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-8);
    padding-top: var(--sp-12);
  }
  .hero .hero-sub {
    max-width: 56ch;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 14.5rem;
  }
  .docs-content {
    padding: var(--sp-8) var(--sp-6) var(--sp-12);
  }
  .cap-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-2);
  }
  /* The two explicit tracks stack here. auto-fit used to do this implicitly,
     but it also declared a phantom zero-width third column at 1440. */
  .two-up {
    grid-template-columns: minmax(0, 1fr);
  }
  .status-plate > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Off-canvas drawer */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-flex;
  }
  .docs-layout {
    padding: 0;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-drawer);
    width: min(var(--drawer-w), 86vw);
    height: 100dvh;
    padding: var(--sp-6) var(--sp-4);
    background: var(--bg-surface);
    border-right: 1px solid var(--line-strong);
    transform: translateX(-102%);
    visibility: hidden;
    transition:
      transform var(--dur-3) var(--ease-out-expo),
      visibility var(--dur-3) step-end;
  }
  .sidebar.open {
    transform: none;
    visibility: visible;
    box-shadow: var(--shadow-drawer);
    transition:
      transform var(--dur-3) var(--ease-out-expo),
      visibility 0s;
  }
  .docs-content {
    padding: var(--sp-6) var(--sp-4) var(--sp-12);
    max-width: none;
  }
  .landing {
    padding: 0 var(--sp-4);
  }
  .family-banner {
    padding: var(--sp-2) var(--sp-4);
  }
  .family-banner .fb-status {
    margin-left: 0;
    flex-basis: 100%;
  }
  .nav-inner {
    padding: 0 var(--sp-4);
  }
  .site-footer .footer-inner {
    padding: var(--sp-6) var(--sp-4);
  }
  .rp-cand .rp-verdict {
    margin-left: 0;
    flex-basis: 100%;
  }
  .rp-head .rp-illustrative {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* Below this the nav stops fitting on one line. It WRAPS rather than hiding
   anything, because hiding was a dead end: at 375px the landing used to show
   only the wordmark and GitHub — the section links were display:none, and the
   landing, unlike the doc pages, ships no drawer toggle to recover them. So a
   phone visitor had no route into the docs except two hero CTAs.
   The tagline `self-hosted LLM router` was hidden here too, and it is the
   clearest plain-language statement on the page — exactly the sentence a phone
   visitor needs, and the one that was being dropped.
   Both stay now, and the bar grows to fit them. Growth is confined to this
   breakpoint, so the sticky-offset arithmetic above 620px is untouched. */
@media (max-width: 620px) {
  .top-nav {
    height: auto;
    min-height: var(--nav-h);
    padding: var(--sp-2) 0;
  }
  .nav-inner {
    flex-wrap: wrap;
    row-gap: var(--sp-2);
  }
  .nav-brand {
    flex-wrap: wrap;
  }
  .nav-brand .nav-sub {
    font-size: var(--fs-label);
  }
  /* A tighter column gap here is what keeps all four links on ONE wrapped row
     at 375px instead of three: the bar is sticky, so every extra row is a
     permanent tax on a 667px viewport. */
  .nav-links {
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-3);
  }
  /* A doc page ships a drawer, and the drawer holds the whole sidebar — every
     section link and more. So there the nav keeps its section links OUT of the
     bar and stays one row tall, which matters because the bar is sticky and a
     three-row sticky bar costs 16% of a 667px viewport for the whole scroll.
     The LANDING has no drawer, so it keeps them and wraps. This is the one
     place the two page types legitimately differ, and :has() lets the
     stylesheet tell them apart without the markup carrying a flag.
     Where :has() is unsupported the links simply stay visible and the bar
     wraps — the fallback is the safe direction, not a dead end. */
  body:has(.docs-layout) .nav-links a:not(.gh-link) {
    display: none;
  }
}

@media (max-width: 460px) {
  .page-nav {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-nav .page-nav-next {
    text-align: left;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .rp-gate .rp-gate-verdict {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* ─── Print ───────────────────────────────────────────────────────────────────
   This block used to be two declarations — `body { background: #fff; color:
   #111 }` — and nothing else. Because every other colour on the page comes from
   a token tuned for a near-black background, flipping the page to white left
   six token classes below the 4.5:1 floor. Measured on white, before:

     --live, which every link used   2.66:1      --ink-3   2.67:1
     --jade                          1.78:1      --amber   1.56:1
     --azure                         2.02:1      --ink-4   3.95:1

   plus every heading and every <strong>, which kept #e8e8f0 and printed at
   1.14:1 — white on white. A printed page of invisible headings is worse than
   shipping no print stylesheet at all.

   The fix is a real light token set rather than a patch on one rule: re-point
   the tokens, and every rule in the file inherits the light theme for free.
   Fixed rather than deleted because printing a routing table or a config
   reference is a real use of these pages, and switchback claimed working print
   styles as an advantage over the house standard — the claim should be true.

   Every pair is measured against white and reported in the PR body. The floor
   across the whole block is 6.7:1.
   ========================================================================== */
@media print {
  :root {
    /* Surfaces collapse to paper. Depth in print comes from rules, not fills:
       a filled code block wastes toner and prints as grey mud. */
    --bg-deep: #fff;
    --bg-surface: #fff;
    --bg-card: #fff;
    --bg-card-hover: #fff;
    --line: #b8b8c2;
    --line-strong: #7c7c88;

    /* Ink inverts: 19.8 / 16.9 / 11.2 : 1 on white. */
    --ink: #0a0a0f;
    --ink-2: #1c1c28;
    --ink-3: #3a3a4a;

    /* The accent darkens to hold the brand hue at 8.4:1 instead of 2.7:1. */
    --accent: oklch(45% 0.2 333);
    --accent-hi: oklch(45% 0.2 333);
    --accent-dim: oklch(45% 0.2 333);
    --on-accent: #fff;
    --accent-glow: transparent;
    --accent-glow-strong: transparent;
    --accent-glow-soft: transparent;

    /* Semantics keep their hue and lose their tint: 6.7 - 8.4 : 1 on white. */
    --live: oklch(45% 0.17 32);
    --live-wash: transparent;
    --live-wash-soft: transparent;
    --live-edge: var(--line-strong);
    --jade: oklch(45% 0.12 168);
    --jade-wash: transparent;
    --jade-edge: var(--line-strong);
    --amber: oklch(45% 0.12 73);
    --amber-wash: transparent;
    --amber-edge: var(--line-strong);
    --amber-edge-soft: var(--line);
    --rose: oklch(45% 0.18 15);
    --rose-wash: transparent;
    --rose-edge: var(--line-strong);
    --azure: oklch(45% 0.15 260);
    --azure-wash: transparent;
    --azure-edge: var(--line-strong);

    /* Syntax darkens rather than flattening to black, so colour still carries
       meaning on paper: 7.6 - 8.3 : 1. */
    --syn-kw: oklch(45% 0.2 301);
    --syn-fn: oklch(45% 0.17 260);
    --syn-str: oklch(42% 0.13 152);
    --syn-num: oklch(45% 0.12 73);
    --syn-key: oklch(45% 0.17 260);
    --syn-type: oklch(45% 0.12 73);
    --syn-cm: #4a4a5a;

    /* No shadows, no grain, no translucency on paper. */
    --shadow-panel: none;
    --shadow-drawer: none;
    --shadow-card: none;
    --shadow-btn: none;
    --nav-bg: #fff;
    --scrim: transparent;
    --grain: none;
  }

  /* Chrome that cannot be navigated on paper. */
  .top-nav,
  .sidebar,
  .sidebar-toggle,
  .sidebar-scrim,
  .page-toc,
  .copy-btn,
  .page-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: var(--ink-2);
    /* The horizon wash is a screen treatment; on paper it is a grey haze. */
    background-image: none;
  }
  body::before {
    display: none; /* film grain */
  }

  .docs-content {
    max-width: none;
    padding: 0;
    margin-inline: 0;
  }

  /* A link is only legible as a link on paper if it is underlined. */
  .docs-content a {
    text-decoration: underline;
  }

  /* Outline, never fill: a solid accent block is a toner sink. */
  .btn-primary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
  }

  /* Nothing scrolls on paper, so a "there is more to the right" cue is just a
     heavy edge on one side — and on paper the columns are all there. The rail
     reset needs the same specificity as the rule that widened it. */
  .table-frame::after {
    display: none;
  }
  .table-scroll {
    overflow: visible;
  }
  .table-frame[data-overflow="true"] > .table-scroll {
    border-right-width: 1px;
  }

  /* Do not split a code sample, a callout or a table row across a page break,
     and never leave a heading stranded at the foot of a page. */
  .code-block,
  .callout,
  .status-plate,
  .route-panel,
  .data-table tr {
    break-inside: avoid;
  }
  .docs-content h1,
  .docs-content h2,
  .docs-content h3 {
    break-after: avoid;
  }
}
