/* gentree-tokens.css — the ONLY place CHROME colour is declared.

   Not the only place colour appears at all — pages legitimately carry raw
   hex for their own content (controller.html and flow-editor.html each have
   over a hundred occurrences, for their own canvases/graphs/config UI, none
   of it chrome). What this file owns exclusively is the toolbar/picker
   palette: --bg/--surface/--border/--text/--muted/--dim and the accent pair,
   consumed only by gentree-chrome.css and the pages' own chrome wrapper.
   tests/test_tokens.py's test_page_declares_no_colour_tokens_inline enforces
   that no page re-declares any of THESE specific custom properties inline —
   it does not, and is not meant to, forbid a page's own unrelated hex.

   Structural tokens are shared by every page; the accent varies per page,
   selected by <body data-gt-theme="…">. Before this, each page redefined
   5-9 tokens inline, which is how four pages ended up rendering the same
   violet and --bg acquired eight near-identical spellings. */

:root {
  /* Tells the engine every page here is dark, so it paints NATIVE widget
     chrome from its dark theme instead of the OS light one: <select> popup
     menus and their arrows, scrollbars, the default focus ring,
     input[type=search]'s clear button, input[type=range]'s track,
     input[type=number]'s spinners, and any unstyled <button>. Nothing in
     CSS reaches inside those — before this line, gallery's thumb-size
     slider and the picker's size slider both measured a literal
     rgb(255,255,255) track in Chromium AND Firefox, and search.html's
     <select> popups opened white. Declared once here, so all 14 pages get
     it; tests/test_tokens.py::test_tokens_declare_dark_color_scheme pins it. */
  color-scheme: dark;

  --bg:        #06060f;
  --surface:   #0f0f16;
  --surface2:  #15151d;
  --border:    #22222c;
  --border2:   #33333f;
  --text:      #d0d0d0;
  --muted:     #8a8a94;
  --dim:       #6a6a74;
  --green:     #4ade80;
  --red:       #f87171;
  --amber:     #fbbf24;
  --blue:      #60a5fa;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Fallback accent for a page that declares no theme. */
  --accent:  #7dd3fc;
  --accent2: #0e7490;
}

/* ── Accent map (spec §6.1) ───────────────────────────────────────────────
   Every value clears WCAG AA (4.5:1) against --bg; tests/test_tokens.py
   enforces that. Today's #7c3aed measured 3.5:1 and is not used. */
[data-gt-theme="splatviz"]         { --accent: #22d3ee; --accent2: #0e7490; }
[data-gt-theme="p5viz"]            { --accent: #c084fc; --accent2: #7e22ce; }
[data-gt-theme="mesh3d"]           { --accent: #fbbf24; --accent2: #b45309; }
[data-gt-theme="timeline"]         { --accent: #4ade80; --accent2: #15803d; }
[data-gt-theme="gallery"]          { --accent: #fb7185; --accent2: #be123c; }
[data-gt-theme="controller"]       { --accent: #a78bfa; --accent2: #6d28d9; }
[data-gt-theme="orch_ui"]          { --accent: #4e9eff; --accent2: #1d4ed8; }
[data-gt-theme="meta-editor"]      { --accent: #818cf8; --accent2: #4338ca; }
[data-gt-theme="flow-editor"]      { --accent: #e879f9; --accent2: #a21caf; }
[data-gt-theme="help"]             { --accent: #94a3b8; --accent2: #475569; }
[data-gt-theme="shape-glb"]        { --accent: #2dd4bf; --accent2: #0f766e; }
[data-gt-theme="audio"]            { --accent: #fb923c; --accent2: #c2410c; }
[data-gt-theme="audio_controller"] { --accent: #a3e635; --accent2: #4d7c0f; }
[data-gt-theme="search"]           { --accent: #f472b6; --accent2: #9d174d; }
