/* wft — The Wood Family Charitable Trust's own theme, adapted from
   rastrillo's "day" scaffold (structure stays in tokens.css; this file
   is colour, type and shape). Edited deliberately, 2026-10-01, to match
   the Trust's original site: warm paper and forest green in light,
   extending the original site's own "dark band" look (forest green
   background, gold text and buttons) into a full dark mode, rather
   than inventing a second palette. Registered in vendored_test.go's
   vendoredIsMine so the pin test leaves it alone.

   Honesty note: the day theme ships with every token pair's measured
   WCAG contrast ratio documented above the tokens. Those numbers are
   this theme's own build, now wrong for an edited palette, and are not
   restated here with invented precision — every substitution below is
   a light-text-on-dark-background or dark-text-on-light-background
   pair chosen by eye for a wide margin, not a recomputed one. Recompute
   before leaning on an exact ratio.

   ── One block, both schemes ───────────────────────────────────────────
   Every token is declared once, as light-dark(<light>, <dark>), under a
   single :root that sets color-scheme: light dark. The two rules at the
   bottom are the whole toggle: setting color-scheme on :root[data-theme=…]
   re-resolves every light-dark() in the file at once. brand.css adds a
   second, narrower version of that same toggle scoped to data-theme on
   any element (not just :root), which is how the homepage's dark band
   gets the dark palette locally without the whole page switching. */

:root {
  color-scheme: light dark;

  /* Type: tokens.css reads --rst-font for the whole UI. Headings get
     the Trust's serif (Newsreader) and the wordmark gets Bricolage
     Grotesque, both layered on top in brand.css — this is the body/UI
     face only. */
  --rst-font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  /* Shape: the Trust's original 10px card radius, slightly firmer than
     day's default. */
  --rst-radius: 10px;
  --rst-radius-sm: 8px;
  --rst-radius-pill: 999px;

  /* Surfaces and lines — warm paper in light; a deep forest green in
     dark, the same green the original site reserved for one "dark
     band" section, used here as the whole dark scheme. */
  --rst-bg: light-dark(#f7f3ea, #13200d);
  --rst-surface: light-dark(#fffdf8, #1b2b15);
  --rst-surface-2: light-dark(#efe8d8, #223420);
  --rst-line: light-dark(#ddd3bf, #30452b);
  /* #a89c7e measured 2.46:1 against --rst-bg/--rst-surface, short of
     WCAG 1.4.11's 3:1 non-text-contrast floor for a control border —
     darkened to #857a5c (3.84:1 / 4.19:1), same warm-olive hue, still
     clearly lighter than --rst-text. Dark mode's #6e8362 already
     passes at 4.10:1 and is untouched. */
  --rst-line-strong: light-dark(#857a5c, #6e8362);

  --rst-header-rule: color-mix(in oklab, var(--rst-accent) 18%, var(--rst-line));

  /* Text */
  --rst-text: light-dark(#1c2a20, #f4efe3);
  --rst-text-muted: light-dark(#4f5a4e, #cfd6c6);
  /* #6b7468 measured 4.39:1 against --rst-bg and 3.98:1 against
     --rst-surface-2 (field hints render on both), short of 4.5:1 AA —
     darkened to #5c6558 (5.48:1 / 4.98:1), same muted-sage hue. Dark
     mode's #aab79e already passes at 6.31-8.04:1 and is untouched. */
  --rst-text-faint: light-dark(#5c6558, #aab79e);

  /* Accent — forest green in light (the original site's --green);
     gold in dark (the original's --gold-on-dark, already its answer
     for text and buttons on a dark green background). */
  --rst-accent: light-dark(#2e5a22, #e8bd4a);
  --rst-accent-strong: light-dark(#1f3a18, #f2cd66);
  --rst-accent-soft: light-dark(#f3e3b3, #2c2410);
  --rst-on-accent: light-dark(#ffffff, #1f3a18);

  /* Status tones — kept in the brand's own green/gold/red family
     rather than day's blue-led set. */
  --rst-tone-neutral-fg: light-dark(#4f5a4e, #cfd6c6);
  --rst-tone-neutral-bg: light-dark(#efe8d8, #28381f);
  --rst-tone-positive-fg: light-dark(#1f3a18, #8fcb77);
  --rst-tone-positive-bg: light-dark(#dce9d3, #16260f);
  --rst-tone-warning-fg: light-dark(#7a5a0a, #e8bd4a);
  --rst-tone-warning-bg: light-dark(#f3e3b3, #332a10);
  --rst-tone-negative-fg: light-dark(#8a2e2e, #e8a3a3);
  --rst-tone-negative-bg: light-dark(#f0dcdc, #3a1e1e);

  /* Depth */
  --rst-shadow-pop: 0 8px 24px light-dark(rgba(31, 58, 24, 0.18), rgba(0, 0, 0, 0.5));
  --rst-shadow-knob: 0 1px 2px rgba(0, 0, 0, 0.25);
  --rst-shadow-lift: 0 1px 2px rgba(31, 58, 24, 0.1);
  --rst-overlay: light-dark(rgba(28, 42, 32, 0.45), rgba(0, 0, 0, 0.6));
}

/* The whole page-level toggle. brand.css adds the same pair scoped to
   any element, for the homepage's dark band. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
