/* lib/tokens.css: THE colour tokens of every page (site style, one source; CLAUDE.md §6 "Site style: one
   source"). Every HTML page under site/public and every page site/stocks/render.js draws links this file
   first; no page carries a :root block of its own, and no page CSS, render code or canvas code writes a hex
   or rgba value for a covered element (site/test/style.test.mjs fails on one). A new colour is added here,
   named for its job, then used; never defined locally "for now".

   The Assets store serves this file directly (/lib/* is negated in both workers' run_worker_first), so a
   worker error cannot take the colours down with it. No build step: the values below are the values.

   Two files still hold COPIES of some values and are lockstep-tested against this one:
     site/public/lib/shade.js   SHADE_TEXT_COLORS (--text2, --regime-risk-on, --regime-risk-off) and
                                ROW_BACKGROUNDS (--bg2): the shading maths needs numbers, not var() names
     signal-card/theme.mjs      the X signal-card renderer (no browser, no CSS): CLAUDE.md §6 */
:root {
  /* ── brand neutrals: page → card → button fill; 1px subtle / 1px emphasis; bright / secondary / AA muted ── */
  --bg: #08090b;
  --bg2: #11131a;
  --bg3: #181b24;
  --border: #1f2330;
  --border2: #2a2f3d;
  --text: #e8ecf5;
  --text2: #a8b0c0;
  --text3: #7a8395;          /* AA on --bg (5.22:1), --bg2 (4.87:1) and --bg3 (4.51:1); never darker */
  --accent: #c9d3e8;
  /* ── band colours (single saturation) and their deep outer-band variants ── */
  --red: #c44848;
  --amber: #c89545;
  --green: #5a9a48;
  --green-deep: #2a6b3a;
  --gray-mid: #484f58;
  --red-deep: #8b1f1f;
  --blue-muted: #4a6a8a;     /* reserved for the ghost-deck top accent */
  --orange: #e8842a;         /* the "today · live" intraday marker: distinct from --amber (band) and --green (close) */
  --orange-deep: #a8551a;    /* deeper edge for the live dot + connector */

  /* ── Regime → colour map (audit H1). The same regime word or mark renders at three sizes, so the map
     has three tiers: a small body-size WORD needs AA contrast the deep band colours cannot reach, while
     the large label and the filled swatch carry the deeper / saturated variants. Every consumer reads
     exactly one --regime-* variable, so the regime → colour decision lives here and nowhere else.
       --regime-*      WORD    home .mcur-badge, the history readout, .regime-name, .b-* (body size → AA ≥ 4.5:1 on --bg and --bg2)
       --regime-lg-*   LABEL   home .regime-label (large text → 3:1 floor; keeps the deep RISK-ON green)
       --regime-sw-*   SWATCH  decorative blocks and the chart's band fills (deep / saturated band variants)
     RISK-OFF / RISK-ON WORD colours are lightened off --red / --green-deep, which miss 4.5:1 at body size
     (measured on --bg2: --red 3.86, --green-deep 2.88). Path 1: presentation of the published regime WORD
     only, never band edges, counts, weights or thresholds. ── */
  --regime-risk-off:    #d05d5d;          /* AA word: lighter than --red (#c44848 = 3.86:1 on --bg2) */
  --regime-mildly-off:  var(--amber);     /* AA word: 6.93:1 on --bg2 */
  --regime-neutral:     var(--text2);     /* AA word: 8.51:1 on --bg2 */
  --regime-mildly-on:   var(--green);     /* AA word: 5.43:1 on --bg2 */
  --regime-risk-on:     #6db85a;          /* AA word: lighter than --green-deep (#2a6b3a = 2.88:1 on --bg2) */
  --regime-lg-risk-off:    var(--red);
  --regime-lg-mildly-off:  var(--amber);
  --regime-lg-neutral:     var(--text2);
  --regime-lg-mildly-on:   var(--green);
  --regime-lg-risk-on:     #307641;       /* lightened off --green-deep to clear the 3:1 large-text floor on --bg2 (3.35:1) */
  --regime-sw-risk-off:    var(--red-deep);
  --regime-sw-mildly-off:  var(--amber);
  --regime-sw-neutral:     var(--gray-mid);
  --regime-sw-mildly-on:   var(--green);
  --regime-sw-risk-on:     var(--green-deep);

  /* ── the repeated elements, named for the job (one token each, every page) ── */
  --section-dot: var(--amber);            /* the 4px dot before every section label */
  --zero-line: var(--text3);              /* the dashed 0% line of the range chart, the chart's zero axis */
  --marker: var(--green);                 /* the latest-close diamond on the history chart and its legend key */
  --marker-edge: var(--green-deep);       /* the diamond's 1px edge */
  /* ── the history chart's own lines (canvas reads them through getComputedStyle; alpha is applied in code) ── */
  --chart-overlay: #a78bfa;               /* the QQQ / SPY price overlay: a muted violet, distinct from every regime colour */
  --chart-overlay-text: #b9c0e2;          /* the active overlay chip's text */
  --chart-ema: #22d3ee;                   /* the 21-day EMA trend line: cyan */
  --chart-ema-text: #a5e9f7;              /* the active EMA chip's text */
  --chart-select: #7a8ec4;                /* the drag-to-zoom selection box */
  --chart-band-label: var(--text2);       /* the five regime names painted in the plot (BAND_LABEL_OPACITY keeps them at AA) */
}
