/* Spark web UI — design tokens (Almanac direction, second palette revision)
 *
 * Revision 1: the original blush/plum/raspberry read too pink → parchment,
 * espresso, spruce/indigo/gold.
 * Revision 2 (this one): the parchment read too yellow and the teal/indigo
 * chart story too cool. The ground is now a cream with a brown cast (OKLCH
 * hue ~68° instead of ~90°), the dark ground a richer espresso (~55°), and
 * the chart trio is warm-led: burnt sienna carries the outcome marks, ochre
 * gold keeps the milestones, and the relationship marks wear a deep forest
 * green — the one non-warm hue, kept because an all-warm trio cannot clear
 * the CVD checks (orange↔gold collapses under deuteranopia).
 *
 * Light is the base; dark overrides live under BOTH the OS media query
 * (guarded so an explicit light choice wins) and the data-theme toggle.
 * Charts read these tokens at render time via getComputedStyle — change
 * them here and every chart follows.
 *
 * Chart series colors are validated with the dataviz palette checker
 * (all-pairs, both modes) against the paper surfaces below:
 *   light  #af2f02 #1f6b41 #9f7a23  on #f6eee6
 *          → CVD worst-pair ΔE 8.4 (deutan) · normal floor 16.2 · ≥3:1
 *   dark   #cb3904 #307a4f #b18d2a  on #251c16
 *          → CVD worst-pair ΔE 9.2 (deutan) · normal floor 18.0 · ≥3:1
 */

:root {
  color-scheme: light;

  /* ground */
  --paper: #f6eee6;          /* page + chart surface (warm cream) */
  --paper-raised: #faf5ef;   /* cards, tooltip */

  /* ink */
  --ink: #30271f;            /* primary text (espresso) */
  --ink-2: #6e6055;          /* secondary text */
  --ink-3: #978878;          /* muted: axis text, deemphasized marks */

  /* rules */
  --hairline: #e6dacf;       /* gridlines, dividers */
  --rule: #cbbbaa;           /* baselines, axis lines */

  /* data series (validated) */
  --series-1: #af2f02;       /* burnt sienna — your futures (curve, hists, eoh) */
  --accent-ink: #af2f02;     /* sienna as running text (landing accents); lifted in dark for AA */
  --series-2: #1f6b41;       /* forest green — relationships (funnel, dates) */
  --series-3: #9f7a23;       /* ochre gold — milestones (exclusive, engagement) */
  --series-1-wash: rgba(175, 47, 2, 0.10);
  --series-3-wash: rgba(159, 122, 35, 0.10);

  /* type */
  --serif: "Iowan Old Style", "Palatino Nova", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow: 0 2px 10px rgba(48, 39, 31, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #251c16;
    --paper-raised: #322821;
    --ink: #f1eae2;
    --ink-2: #b3a597;
    --ink-3: #8f8072;
    --hairline: #3c322a;
    --rule: #584a40;
    --series-1: #cb3904;
    --accent-ink: #e65f24;
    --series-2: #307a4f;
    --series-3: #b18d2a;
    --series-1-wash: rgba(203, 57, 4, 0.13);
    --series-3-wash: rgba(177, 141, 42, 0.13);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #251c16;
  --paper-raised: #322821;
  --ink: #f1eae2;
  --ink-2: #b3a597;
  --ink-3: #8f8072;
  --hairline: #3c322a;
  --rule: #584a40;
  --series-1: #cb3904;
  --accent-ink: #e65f24;
  --series-2: #307a4f;
  --series-3: #b18d2a;
  --series-1-wash: rgba(203, 57, 4, 0.13);
  --series-3-wash: rgba(177, 141, 42, 0.13);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
