/* Token contract. Every colour, font, radius and chart series on a page reads one of these variables.
   Pages and chart code hold no literal colours (scripts/check fails on one).
   The values here are Arc Forge: the Knot values of the Arc Forge Design System (tokens.json), except dark --accent
   (#e7364b, not #e5243b) and dark --on-accent (dark ink): the Knot red reads at 4.17:1 as small text on the dark
   card, and Web Content Accessibility Guidelines (WCAG), level AA, needs 4.5:1; white on the lighter red is 4.18:1. Arc Forge is
   the fallback theme: a page shows it when no other theme is chosen, and before the runtime starts.
   kit/themes.js holds the other themes as token sets with the same names (scripts/sync-themes writes it).

   Per mode:  --bg-accent (page)  --card (surface)  --text  --text-strong  --muted
              --border  --border-strong  --ring  --accent (the one key thing)  --accent-subtle  --on-accent
              --accent-2 (second family)  --accent-2-subtle  --series-1 … --series-5  --shadow-md  --shadow-lg
   Shape:     --radius-sm  --radius-md  --radius-lg  --radius-full  --font-body  --font-display  --font-mono
   Derived:   --seq-1 … --seq-3 (heatmap scale)   Fixed in every theme: --key-* (diagram colour key) */
:root{
  --bg-accent:#f2f2f5;--card:#ffffff;--text:#3a3a42;--text-strong:#18181b;--muted:#68676f;
  --border:#e2e2e8;--border-strong:#ccccd4;--accent:#c41e30;--accent-subtle:rgba(196,30,48,.08);--ring:#c41e30;--on-accent:#ffffff;
  --accent-2:#5a626e;--accent-2-subtle:rgba(90,98,110,.08);
  --series-1:#c41e30;--series-2:#5a626e;--series-3:#18181b;--series-4:#8a6d3b;--series-5:#3f6f8f;
  --shadow-md:0 4px 12px rgba(0,0,0,.06);--shadow-lg:0 12px 28px rgba(0,0,0,.08);
  --radius-sm:6px;--radius-md:10px;--radius-lg:14px;--radius-full:9999px;
  --font-body:"Geist",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;--font-display:var(--font-body);
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg-accent:#0d0d0f;--card:#111113;--text:#c6c6cb;--text-strong:#f5f5f7;--muted:#8a8a94;
  --border:#202026;--border-strong:#303038;--accent:#e7364b;--accent-subtle:rgba(229,36,59,.12);--ring:#e5243b;--on-accent:#0d0d0f;
  --accent-2:#b8bdc4;--accent-2-subtle:rgba(184,189,196,.1);
  --series-1:#ef4e61;--series-2:#b8bdc4;--series-3:#f5f5f7;--series-4:#d9b26a;--series-5:#7fb3d5;
  --shadow-md:0 4px 16px rgba(0,0,0,.5);--shadow-lg:0 12px 32px rgba(0,0,0,.6);color-scheme:dark}}
:root[data-theme="dark"]{
  --bg-accent:#0d0d0f;--card:#111113;--text:#c6c6cb;--text-strong:#f5f5f7;--muted:#8a8a94;
  --border:#202026;--border-strong:#303038;--accent:#e7364b;--accent-subtle:rgba(229,36,59,.12);--ring:#e5243b;--on-accent:#0d0d0f;
  --accent-2:#b8bdc4;--accent-2-subtle:rgba(184,189,196,.1);
  --series-1:#ef4e61;--series-2:#b8bdc4;--series-3:#f5f5f7;--series-4:#d9b26a;--series-5:#7fb3d5;
  --shadow-md:0 4px 16px rgba(0,0,0,.5);--shadow-lg:0 12px 32px rgba(0,0,0,.6);color-scheme:dark}

*,*::before,*::after{box-sizing:border-box}
body{background:var(--bg-accent);color:var(--text)}

/* Chart scale (heatmaps): from the card colour to the accent. */
:root{--seq-1:color-mix(in srgb,var(--accent) 6%,var(--card));--seq-2:color-mix(in srgb,var(--accent) 45%,var(--card));--seq-3:var(--accent)}

/* Diagram colour key (arcforgelabs/themes docs/diagram-colour-key.md). One colour, one meaning, every page and every theme. */
:root{--key-stock:oklch(0.55 0.12 150);--key-conf:oklch(0.52 0.12 240);--key-exp:oklch(0.70 0.15 90);--key-ours:oklch(0.64 0.17 50);--key-risk:oklch(0.55 0.22 25);--key-outside:oklch(0.60 0.01 60)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--key-stock:oklch(0.74 0.13 150);--key-conf:oklch(0.72 0.12 240);--key-exp:oklch(0.86 0.15 95);--key-ours:oklch(0.76 0.16 55);--key-risk:oklch(0.68 0.21 22);--key-outside:oklch(0.70 0.01 60)}}
:root[data-theme="dark"]{--key-stock:oklch(0.74 0.13 150);--key-conf:oklch(0.72 0.12 240);--key-exp:oklch(0.86 0.15 95);--key-ours:oklch(0.76 0.16 55);--key-risk:oklch(0.68 0.21 22);--key-outside:oklch(0.70 0.01 60)}
