/* GENERATED by tools/build_tokens.py from tokens.json — do not edit.
 *
 * Edit tokens.json and re-run the generator. A test compares this file
 * against a fresh build and fails on any difference, so a hand-edit
 * here does not quietly become the value the product ships.
 *
 * Every ratio named in tokens.json was computed by tools/contrast.py
 * from these hex values with the WCAG 2.x formula. Target: WCAG 2.2 AA.
 */

:root {
  /* the palette, theme-independent. Components use the semantic
     tokens below, never these — that indirection is what lets the two
     themes diverge without touching a component. */
  --colour-ink: #16130f;
  --colour-ink-raised: #211c17;
  --colour-ink-overlay: #2c2620;
  --colour-linen: #f4f0e6;
  --colour-linen-raised: #ffffff;
  --colour-linen-sunken: #e8e2d4;
  --colour-madder: #9c3a2a;
  --colour-madder-deep: #7a2a1d;
  --colour-madder-light: #d9705a;
  --colour-weld: #c1892b;
  --colour-weld-text: #8a5e1b;
  --colour-weld-light: #dfa94a;
  --colour-woad: #2c4257;
  --colour-woad-light: #7fa3c4;
  --colour-slate: #5c5348;
  --colour-slate-light: #a89d90;
  --colour-border-light: #847a69;
  --colour-border-dark: #807466;
  --colour-hair-light: #ded8c9;
  --colour-hair-dark: #302a23;
  --colour-alert-light: #e9dacf;
  --colour-alert-dark: #39241c;

  /* the three OFL faces, self-hosted (see fonts/LICENSES.md) */
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-data: "IBM Plex Mono", "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* the named type scale (brand §11). A rule sets `font: var(--type-x)`,
     so no component can choose a size that is not in the scale. */
  --type-display: 400 44px/1.0 "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --type-display-tracking: -0.005em;
  --type-title: 400 26px/1.15 "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --type-title-tracking: 0;
  --type-speech: 400 18px/1.5 "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --type-speech-tracking: 0;
  --type-speech-own: 400 17px/1.45 "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --type-speech-own-tracking: 0;
  --type-body: 400 15px/1.55 "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --type-body-tracking: 0;
  --type-label: 500 13px/1.45 "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --type-label-tracking: 0;
  --type-caption: 400 12px/1.5 "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --type-caption-tracking: 0;
  --type-data: 400 12.5px/1.55 "IBM Plex Mono", "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --type-data-tracking: 0;
  --type-data-small: 400 11.5px/1.5 "IBM Plex Mono", "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --type-data-small-tracking: 0;
  --type-eyebrow: 500 11px/1.2 "IBM Plex Mono", "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --type-eyebrow-tracking: 0.12em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;
  --space-6: 30px;
  --space-7: 44px;

  --radius-sm: 4px;
  --radius-md: 6px;

  --target-min: 24px;
  --target-comfortable: 44px;

  --measure-prose: 62ch;
  --measure-form: 34ch;

  --breakpoint-sm: 480px;
  --breakpoint-md: 720px;
  --breakpoint-lg: 1000px;
  --breakpoint-xl: 1280px;

  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;

  --easing-standard: cubic-bezier(0.2, 0, 0.38, 1);
  --easing-entrance: cubic-bezier(0, 0, 0.38, 0.9);
  --easing-exit: cubic-bezier(0.2, 0, 1, 0.9);

  --layer-base: 0;
  --layer-sticky: 10;
  --layer-masthead: 20;
  --layer-overlay: 100;
  --layer-dialog: 110;

  --figures-tabular: tabular-nums;

  /* the mark, so a caller can lay it out without reading the
     generator that draws it */
  --mark-min-feature: 3.75;
  --mark-clear-space: 4;
  --mark-default-fill: #d9705a;

  --chart-1: #9c3a2a;
  --chart-2: #3c5a78;
  --chart-3: #8a5e1b;
  --chart-4: #4a6141;
  --chart-5: #5c5348;
  --chart-6: #6e4560;
}

/* light — the default, and the complete set. The dark blocks below
   redefine ONLY what changes, so no colour has its single definition
   inside a media query. */
:root, ::backdrop {
  --bg: #f4f0e6;
  --surface: #ffffff;
  --sunken: #e8e2d4;
  --text: #16130f;
  --text-muted: #5c5348;
  --accent: #9c3a2a;
  --on-accent: #f4f0e6;
  --link: #7a2a1d;
  --data: #2c4257;
  --flagged: #8a5e1b;
  --decayed: #5c5348;
  --border: #847a69;
  --hair: #ded8c9;
  --alert: #e9dacf;
  --scrim: #16130f73;
  --focus: #2c4257;
  --standing-stable: #9c3a2a;
  --standing-corroborated: #9c3a2a;
  --standing-provisional: #5c5348;
  --standing-hypothesis: #5c5348;
  --kind-contested: #8a5e1b;
  --kind-superseded: #5c5348;
  --kind-erased: #5c5348;
  --depth-current: #9c3a2a;
  --depth-past: #ded8c9;
  --elevation-raised: 0px 1px 2px 0px #16130f1a;
  --elevation-overlay: 0px 8px 24px 0px #16130f2e;
  color-scheme: light;
}

/* dark, twice over — see this file's generator for why. First: the
   system preference, honoured by default, unless the person has
   explicitly chosen light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]), ::backdrop {
    --bg: #16130f;
    --surface: #211c17;
    --sunken: #2c2620;
    --text: #f4f0e6;
    --text-muted: #a89d90;
    --accent: #d9705a;
    --on-accent: #16130f;
    --link: #d9705a;
    --data: #7fa3c4;
    --flagged: #dfa94a;
    --decayed: #a89d90;
    --border: #807466;
    --hair: #302a23;
    --alert: #39241c;
    --scrim: #000000a6;
    --focus: #dfa94a;
    --standing-stable: #d9705a;
    --standing-corroborated: #d9705a;
    --standing-provisional: #a89d90;
    --standing-hypothesis: #a89d90;
    --kind-contested: #dfa94a;
    --kind-superseded: #a89d90;
    --kind-erased: #a89d90;
    --depth-current: #d9705a;
    --depth-past: #5c5348;
    --elevation-raised: none;
    --elevation-overlay: none;
    --chart-1: #de7a63;
    --chart-2: #84a9cc;
    --chart-3: #dfa94a;
    --chart-4: #8fb57f;
    --chart-5: #b0a697;
    --chart-6: #c08fb0;
    color-scheme: dark;
  }
}

/* Second: the explicit override, which must win in both directions —
   including for somebody whose system says light. */
:root[data-theme="dark"], :root[data-theme="dark"] ::backdrop {
  --bg: #16130f;
  --surface: #211c17;
  --sunken: #2c2620;
  --text: #f4f0e6;
  --text-muted: #a89d90;
  --accent: #d9705a;
  --on-accent: #16130f;
  --link: #d9705a;
  --data: #7fa3c4;
  --flagged: #dfa94a;
  --decayed: #a89d90;
  --border: #807466;
  --hair: #302a23;
  --alert: #39241c;
  --scrim: #000000a6;
  --focus: #dfa94a;
  --standing-stable: #d9705a;
  --standing-corroborated: #d9705a;
  --standing-provisional: #a89d90;
  --standing-hypothesis: #a89d90;
  --kind-contested: #dfa94a;
  --kind-superseded: #a89d90;
  --kind-erased: #a89d90;
  --depth-current: #d9705a;
  --depth-past: #5c5348;
  --elevation-raised: none;
  --elevation-overlay: none;
  --chart-1: #de7a63;
  --chart-2: #84a9cc;
  --chart-3: #dfa94a;
  --chart-4: #8fb57f;
  --chart-5: #b0a697;
  --chart-6: #c08fb0;
  color-scheme: dark;
}
