/* tokens.css — GENERATED by theme/build-tokens.mjs. Do not hand-edit.
 *
 * Mode: auto → paired
 * 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.
 */

/* PAIRED — Daylight (daylight) at rest, Operator (operator) when the OS asks for dark.
 *
 * The pairing is APP CONFIG (theme.config.json), not a theme property —
 * neither document knows about the other. Which pole each belongs in is
 * COMPUTED from WCAG relative luminance of surfaces.bg; no theme carries a
 * `type` field and the schema forbids adding one.
 *
 * Zero JS. prefers-color-scheme is the browser telling the page what the
 * OS already decided; no script has to ask.
 */
:root {
  color-scheme: light 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: #FAFAFA;
  /* Canvas 2 — First elevation step above the ground — panels, cards, sidebars. */
  --surface: #F4F4F5;
  /* Canvas 3 — The middle rung of the elevation ladder — computed, not stored. · derived:
     mix(surface, surface-lift, .5) */
  --surface-high: #ECECEE;
  /* Canvas 4 — Top of the elevation ladder — the highest a surface sits. */
  --surface-lift: #E4E4E7;
  /* Terminal — The terminal's own canvas, and the chrome around it. */
  --terminal: #F0F0F5;
  /* Border — Normal line weight — rules and dividers. */
  --border: #D4D4D8;
  /* 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: #878793;
  /* Field — The well a text field or search box is sunk into. */
  --input: #FFFFFF;
  /* Selected — The ground behind a selected row or chosen list item. */
  --highlight: #DBE7F1;
  /* 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: #18181B;

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

  /* ── Semantics ───────────────────────────────────────────────── */
  /* Success — Additions, passing state. */
  --success: #178640;
  /* Success Bright — Louder sibling of Success, floored so it never renders quieter. */
  --success-bright: #0F6B32;
  /* Warning — In-flight, uncommitted state. */
  --warning: #F59E0B;
  /* Error — Deletions, failure. */
  --error: #E81414;
  /* Error Bright — Louder sibling of Error, floored so it never renders quieter. */
  --error-bright: #B30F0F;
  /* Gold — A third semantic voice — not info. ANSI slots 3 and 6. */
  --gold: #A16207;

  /* ── 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: #18181B;
  /* Strong — The loudest step in the text ramp. */
  --text-bright: #09090B;
  /* Secondary — Quieter than Body, still fully readable. */
  --text-secondary: #52525B;
  /* 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: #63636B;
  /* Code — Inline code and monospace runs inside prose. */
  --text-code: #3A5A50;
  /* Selection — The caret and the wash behind selected text — the ink, not the ground. */
  --text-selection: #6CB4EE;
  /* Placeholder — Ghost text in an empty field. */
  --text-placeholder: #63636B;

  /* ── 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: #FAFAFA;
  /* derived: mix(scrim, on-scrim, .62) */
  --on-scrim-quiet: #A4A4A5;
  /* derived: mix(scrim, on-scrim, .42) */
  --on-scrim-quietest: #777779;
  /* 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: #6CB4EE;
  /* SITE-DERIVED: as above. */
  --secondary-on-scrim: #B99EDC;

  /* ── 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: #09090B;
  /* inkOn() */
  --ink-on-secondary: #FAFAFA;
  /* inkOn() */
  --ink-on-success: #FBFBFB;
  /* inkOn() */
  --ink-on-warning: #09090B;
  /* inkOn() */
  --ink-on-error: #FCFCFC;

  /* ── 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: Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1B23;
    --surface: #26272E;
    --surface-high: #31323F;
    --surface-lift: #3B3D4F;
    --terminal: #131319;
    --border: #2B2C32;
    --border-bright: #D8D8D8;
    --input: #31323F;
    --highlight: #C0FAFA;
    --scrim: #1A1B23;
    --accent: #18FFFB;
    --accent-bright: #C1FFFE;
    --accent-dim: #0E5E5C;
    --secondary: #C88DFF;
    --secondary-bright: #E1C0FF;
    --link: #18FFFB;
    --success: #A2DA2C;
    --success-bright: #B4EA5E;
    --warning: #FECA3C;
    --error: #FF564F;
    --error-bright: #FFAFAB;
    --gold: #F6AE23;
    --text-primary: #F2F2F2;
    --text-bright: #FFFFFF;
    --text-secondary: #D8D8D8;
    --text-muted: #969AAD;
    --text-code: #CCE3DA;
    --text-selection: #18FFFB;
    --text-placeholder: #969AAD;
    --text-on-scrim: #FFFFFF;
    --on-scrim-quiet: #A8A8AB;
    --on-scrim-quietest: #7A7B7F;
    --accent-on-scrim: #18FFFB;
    --secondary-on-scrim: #CC95FF;
    --ink-on-accent: #1A1B23;
    --ink-on-secondary: #1A1B23;
    --ink-on-success: #1A1B23;
    --ink-on-warning: #1A1B23;
    --ink-on-error: #1A1B23;
    --font-display: Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-body: Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, 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; }
}
