/* tokens.css — GENERATED by theme/build-tokens.mjs. Do not hand-edit.
 *
 * Mode: stage → single
 * Source: theme/*.ColorTheme.json, vendored byte-identical from dbo-contracts
 *         and gated by scripts/sync-themes.mjs. Derived through
 *         theme/vendor/derive.mjs — the contract's own maths, not a copy.
 * Regenerate: npm run tokens
 *
 * Two tokens are lifted here rather than taken at rest, both for WCAG 2.1 AA
 * (EN 301 549 / BFSG — a launch blocker, not a preference): --text-muted is
 * floored at 4.5:1 for body copy, --border-bright at 3:1 for the focus ring
 * (1.4.11). Both are no-ops on a document that already passes; across the 13
 * vendored documents exactly one value moves. The documents themselves stay
 * byte-identical to upstream.
 */

/* SINGLE — this site wears Stage (stage) and nothing else.
 * Zero JS: no picker, no media query, no runtime derivation. The page is
 * correctly themed before a single byte of script has run, which is what
 * an agent reading the rendered HTML and a visitor with JS off both get.
 */
:root {
  color-scheme: dark;

  /* House constants — not theme data; identical under every theme. */
  /* design.md: default tracking is tighter than the framework default — loose reads
     decorative, tight reads confident */
  --tracking-tight: -0.011em;
  /* the line length long-form copy is set to; editorial register, not full-bleed text */
  --measure: 68ch;
  --radius: 8px;
  --radius-lg: 14px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  /* design.md: under 200ms, ease-out, done */
  --motion-duration: 160ms;
  --motion-ease: cubic-bezier(0, 0, 0.2, 1);

  /* ── Surfaces ──────────────────────────────────────────────────
       The elevation ladder. `surface-high` is the derived rung-3 midpoint of surface and
       surface-lift; nothing is drawn on surface-lift itself.
     */
  /* Canvas — The ground everything else sits on. */
  --bg: #080C12;
  /* Canvas 2 — First elevation step above the ground — panels, cards, sidebars. */
  --surface: #0A0F18;
  /* Canvas 3 — The middle rung of the elevation ladder — computed, not stored. · derived:
     mix(surface, surface-lift, .5) */
  --surface-high: #0B121F;
  /* Canvas 4 — Top of the elevation ladder — the highest a surface sits. */
  --surface-lift: #0B1525;
  /* Terminal — The terminal's own canvas, and the chrome around it. */
  --terminal: #070B10;
  /* Border — Normal line weight — rules and dividers. */
  --border: #0B182A;
  /* Border Focus — Emphasised line weight — focus rings, active edges, and a widget's own
     perimeter. · SITE-DERIVED floor: this token is the widget perimeter AND the focus ring,
     and WCAG 2.1 1.4.11 sets 3:1 for both. Lifted against the ground it is worst on. A
     no-op on all 13 documents today (dbo-contracts#7 fixed them at rest) — it is here so a
     pasted or future theme cannot reintroduce an EN 301 549 / BFSG defect. */
  --border-bright: #40679A;
  /* Field — The well a text field or search box is sunk into. */
  --input: #0B121F;
  /* Selected — The ground behind a selected row or chosen list item. */
  --highlight: #0E213D;
  /* Scrim — The wash laid over content this theme does not own — video, a photo, a foreign
     surface. · derived: the theme's own darkest token, so a light theme does not scrim with
     its page colour */
  --scrim: #080C12;

  /* ── Accents ─────────────────────────────────────────────────── */
  /* Primary — The colour the product is about — where the eye goes. */
  --accent: #2A7FFF;
  /* Primary Bright — Louder sibling of Primary. */
  --accent-bright: #5C9EFF;
  /* Primary Dim — Recessive accent, clamped to a 1.8–3.2:1 contrast band — framing and
     rules, never louder than body text. */
  --accent-dim: #3A6090;
  /* Secondary — The second voice. */
  --secondary: #E8622A;
  /* Secondary Bright — Louder sibling of Secondary. */
  --secondary-bright: #FF8A55;
  /* Link — Web draws a hyperlink in this. Absent means Primary. · derived: falls back to
     accent — no document on disk stores one yet */
  --link: #2A7FFF;

  /* ── Semantics ───────────────────────────────────────────────── */
  /* Success — Additions, passing state. */
  --success: #3D9E6A;
  /* Success Bright — Louder sibling of Success, floored so it never renders quieter. */
  --success-bright: #57C489;
  /* Warning — In-flight, uncommitted state. */
  --warning: #E8B84D;
  /* Error — Deletions, failure. */
  --error: #CC3333;
  /* Error Bright — Louder sibling of Error, floored so it never renders quieter. */
  --error-bright: #E85555;
  /* Gold — A third semantic voice — not info. ANSI slots 3 and 6. */
  --gold: #C8A23C;

  /* ── Text ──────────────────────────────────────────────────────
       Ink tiers. `text-muted` is the one that fails silently, so it is the one with a
       floor.
     */
  /* Body — Body text — the ink most content is set in. */
  --text-primary: #8AB8E0;
  /* Strong — The loudest step in the text ramp. */
  --text-bright: #CCDCF0;
  /* Secondary — Quieter than Body, still fully readable. */
  --text-secondary: #759CC4;
  /* Muted — The quietest readable step — verify contrast with maths, not by eye. ·
     SITE-DERIVED band: floored at 4.5:1 (WCAG 2.1 AA body copy / BFSG), capped at the
     primary tier so "muted" stays muted. Moves exactly one of 13 documents. */
  --text-muted: #6087B3;
  /* Code — Inline code and monospace runs inside prose. */
  --text-code: #8AB8E0;
  /* Selection — The caret and the wash behind selected text — the ink, not the ground. */
  --text-selection: #2A7FFF;
  /* Placeholder — Ghost text in an empty field. */
  --text-placeholder: #6087B3;

  /* ── Over a scrim ──────────────────────────────────────────────
       A card or a headline over media the site does not own — the pattern
       @copperdesign/lazy-video-backgrounds makes a house default. The contract derives the
       TYPE colour; the accent drawn there was measured failing on 6 of 10 themes and is
       lifted here.
     */
  /* On Scrim — Body ink for type sitting on a Scrim rather than on Canvas. */
  --text-on-scrim: #CCDCF0;
  /* derived: mix(scrim, on-scrim, .62) */
  --on-scrim-quiet: #828D9C;
  /* derived: mix(scrim, on-scrim, .42) */
  --on-scrim-quietest: #5A636F;
  /* SITE-DERIVED: `onScrim()`, floored at the 3:1 WCAG 1.4.11 non-text bar against the
     worst pixel a 72%-opacity card can present over white footage. */
  --accent-on-scrim: #5D9EFF;
  /* SITE-DERIVED: as above. */
  --secondary-on-scrim: #EC8052;

  /* ── Ink on a filled ground ────────────────────────────────────
       For type drawn ON one of the fills above — a CTA button, a release-note pill, a
       badge. Never store one of these; the fill is fixed by meaning, so the author has no
       lever to reach the floor with.
     */
  /* inkOn(): 4.5:1 against the fill */
  --ink-on-accent: #080C12;
  /* inkOn() */
  --ink-on-secondary: #080C12;
  /* inkOn() */
  --ink-on-success: #080C12;
  /* inkOn() */
  --ink-on-warning: #080C12;
  /* inkOn() */
  --ink-on-error: #F0F0F0;

  /* ── Typography ────────────────────────────────────────────────
       The theme NAMES families; it ships no font files. A target that has not bundled the
       face falls back — bundling one is a licensing act, and a separate decision.
     */
  --font-display: "EB Garamond", Georgia, serif;
  --font-body: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, 'SF Mono', SFMono-Regular, monospace;
}

/* prefers-reduced-motion — honoured once, here, so every consumer of the
 * motion tokens inherits it instead of each stylesheet remembering to.
 * design.md treats this as part of the AA floor, not a nicety.
 */
@media (prefers-reduced-motion: reduce) {
  :root { --motion-duration: 0.01ms; }
}
