/* The one token set of Alma's screens (B6, T1, 31/10/2026). Every colour the stylesheets give their --ki-*, --series-*, --brand-* and
   --paper-* names is written here and only here; those names are aliases of these tokens, so a palette (T5) or a theme change is
   one edit in one file. Loaded first by every page. The values are today's: nothing on screen changes.

   Meaning colours, in dark (the default), light and paper (the printed and slide surfaces):
   --theme-up / --theme-down        a change for the better, for the worse
   --theme-actual                   what happened (the realised figure, the bars)
   --theme-forecast                 what is forecast or referred to (the reference line, the projection)
   --theme-target                   a target
   --theme-neutral                  neither good nor bad
   --theme-ai / --theme-ai-bg       what Alma's AI wrote (the « IA » mark)
   --theme-series-1 to 8            the series of a chart, in order: readable on light, dark and paper, and apart from
                                    the meaning colours and from each other (the client palette's save check, `Palette` in
                                    harness/settings/kinds.py). 3, 5, 7 and 8 moved on 31/10 to pass it (were #F59E0B, #B11E2F,
                                    #6366F1, #38BDF8).
   The workshop page keeps its own green and gold (--theme-workshop-*). */

:root[data-theme="dark"], :root {
  --theme-bg: #0A111D;  /* --ki-bg */
  --theme-card: #111B2C;  /* --ki-card */
  --theme-pop: #162338;  /* --ki-pop */
  --theme-soft: #1A2639;  /* --ki-soft */
  --theme-track: #1C2940;  /* --ki-track */
  --theme-hover: #1A2639;  /* --ki-hover */
  --theme-sel: #1D2D49;  /* --ki-sel */
  --theme-sel-line: #34507C;  /* --ki-sel-line */
  --theme-field: #0D1626;  /* --ki-field */
  --theme-field-line: #5E7090;  /* --ki-field-line */
  --theme-line: #22304A;  /* --ki-line */
  --theme-scrim: rgba(3, 7, 14, 0.66);  /* --ki-scrim */
  --theme-shade: rgba(0, 0, 0, 0.22);  /* --ki-shade */
  --theme-shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.28);  /* --ki-shadow */
  --theme-shadow-s: 0 1px 3px rgba(0,0,0,.3);
  --theme-shadow-pop: 0 8px 28px rgba(0,0,0,.36);
  --theme-shadow-modal: 0 20px 60px rgba(0,0,0,.5);
  --theme-shadow-side: -10px 0 34px rgba(0,0,0,.36);
  --theme-text: #EEF2F8;  /* --ki-text */
  --theme-body: #C9D2E0;  /* --ki-body */
  --theme-muted: #8C9AB0;  /* --ki-muted */
  --theme-ink: #E7ECF4;  /* --ki-ink */
  --theme-down: #EC6B7B;  /* --ki-red */
  --theme-actual: #2AA7B8;  /* --ki-teal */
  --theme-forecast: #E0AE45;  /* --ki-gold */
  --theme-up: #3DB57F;  /* --ki-green */
  --theme-neutral: #8EA0BF;  /* --ki-slate */
  --theme-blue: #6FA0E8;  /* --ki-blue */
  --theme-violet: #A99BF0;  /* --ki-violet */
  --theme-btn: #B11E2F;  /* --ki-btn */
  --theme-on-btn: #FFFFFF;  /* --ki-on-btn */
  --theme-btn-hover: #C8384A;  /* --ki-btn-hover */
  --theme-pick: #2C4A7A;  /* --ki-pick */
  --theme-on-pick: #FFFFFF;  /* --ki-on-pick */
  --theme-ok-bg: #143124;  /* --ki-ok-bg */
  --theme-ok-fg: #7FDCAE;  /* --ki-ok-fg */
  --theme-warn-bg: #3A2A12;  /* --ki-warn-bg */
  --theme-warn-fg: #F0C060;  /* --ki-warn-fg */
  --theme-bad-bg: #3A1A22;  /* --ki-bad-bg */
  --theme-bad-fg: #F4A0AB;  /* --ki-bad-fg */
  --theme-ai-bg: #3A3216;  /* --ki-ai-bg */
  --theme-ai: #E9C46A;  /* --ki-ai-fg */
  --theme-nav: linear-gradient(180deg, #0B1424 0%, #0E1A2E 100%);  /* --ki-nav */
  --theme-panel: linear-gradient(135deg, #0E1A2E 0%, #15253D 60%, #1A3047 100%);  /* --ki-panel */
  --theme-brand-emerald-glow: rgba(42, 167, 184, 0.14);  /* --brand-emerald-glow */
  --theme-brand-gold: #D4AF37;  /* --brand-gold */
  --theme-target: var(--theme-ink);
}

:root[data-theme="light"] {
  --theme-bg: #ECEFF4;  /* --ki-bg */
  --theme-card: #FAFBFC;  /* --ki-card */
  --theme-pop: #FFFFFF;  /* --ki-pop */
  --theme-soft: #E8ECF2;  /* --ki-soft */
  --theme-track: #EDF1F7;  /* --ki-track */
  --theme-hover: #F1F4F8;  /* --ki-hover */
  --theme-sel: #E8EEF8;  /* --ki-sel */
  --theme-sel-line: #C9D7EC;  /* --ki-sel-line */
  --theme-field: #FFFFFF;  /* --ki-field */
  --theme-field-line: #7A8699;  /* --ki-field-line */
  --theme-line: #DDE2EA;  /* --ki-line */
  --theme-scrim: rgba(14, 23, 38, 0.45);  /* --ki-scrim */
  --theme-shade: rgba(14, 23, 38, 0.06);  /* --ki-shade */
  --theme-shadow: 0 1px 2px rgba(14,23,38,.05), 0 4px 14px rgba(14,23,38,.06);  /* --ki-shadow */
  --theme-shadow-s: 0 1px 3px rgba(14,23,38,.14);
  --theme-shadow-pop: 0 8px 28px rgba(14,23,38,.18);
  --theme-shadow-modal: 0 20px 60px rgba(14,23,38,.28);
  --theme-shadow-side: -10px 0 34px rgba(14,23,38,.2);
  --theme-text: #0E1726;  /* --ki-text */
  --theme-body: #334155;  /* --ki-body */
  --theme-muted: #5C687B;  /* --ki-muted */
  --theme-ink: #0E1726;  /* --ki-ink */
  --theme-down: #B11E2F;  /* --ki-red */
  --theme-actual: #0D7080;  /* --ki-teal */
  --theme-forecast: #B07A0C;  /* --ki-gold */
  --theme-up: #17744B;  /* --ki-green */
  --theme-neutral: #3B4A63;  /* --ki-slate */
  --theme-blue: #2F5D9E;  /* --ki-blue */
  --theme-violet: #6A5BC4;  /* --ki-violet */
  --theme-btn: #0E1726;  /* --ki-btn */
  --theme-on-btn: #FFFFFF;  /* --ki-on-btn */
  --theme-btn-hover: #1C2A42;  /* --ki-btn-hover */
  --theme-pick: #0E1726;  /* --ki-pick */
  --theme-on-pick: #FFFFFF;  /* --ki-on-pick */
  --theme-ok-bg: #E3F3EB;  /* --ki-ok-bg */
  --theme-ok-fg: #17704A;  /* --ki-ok-fg */
  --theme-warn-bg: #FBF0E2;  /* --ki-warn-bg */
  --theme-warn-fg: #8A5200;  /* --ki-warn-fg */
  --theme-bad-bg: #FBEAEC;  /* --ki-bad-bg */
  --theme-bad-fg: #8E1626;  /* --ki-bad-fg */
  --theme-ai-bg: #F3E8CF;  /* --ki-ai-bg */
  --theme-ai: #8A5F0A;  /* --ki-ai-fg */
  --theme-nav: linear-gradient(180deg, #0E1726 0%, #101C30 100%);  /* --ki-nav */
  --theme-panel: linear-gradient(135deg, #0E1726 0%, #16263F 60%, #1B3247 100%);  /* --ki-panel */
  --theme-brand-emerald-glow: rgba(13, 112, 128, 0.15);  /* --brand-emerald-glow */
  --theme-brand-gold: #B8891A;  /* --brand-gold */
}

/* The same in both themes: the series, and the paper of prints and slides. */
:root {
  --theme-paper: #FFFFFF;  /* --paper */
  --theme-paper-ink: #1D2B36;  /* --paper-ink */
  --theme-paper-muted: #5F6B76;  /* --paper-muted */
  --theme-paper-line: #E1E5EA;  /* --paper-line */
  --theme-paper-edge: #C9CFD5;  /* --paper-edge */
  --theme-paper-tint: #F5F7F9;  /* --paper-tint */
  --theme-paper-grid: #E9ECEF;  /* --paper-grid */
  --theme-paper-neutral: #A3AAB1;  /* --paper-neutral */
  --theme-paper-accent: #2F6690;  /* --paper-accent */
  --theme-paper-actual: #0D7080;  /* --paper-teal */
  --theme-paper-up: #17744B;  /* --paper-green */
  --theme-paper-forecast: #B07A0C;  /* --paper-gold */
  --theme-paper-navy: #0E1726;  /* --paper-navy */
  --theme-paper-bar: #0B1424;  /* --paper-bar */
  --theme-paper-bar-ink: #E7ECF4;  /* --paper-bar-ink */
  --theme-paper-bar-muted: #8C9AB0;  /* --paper-bar-muted */
  --theme-paper-ai-bg: #F6E7C8;  /* --paper-ia-bg */
  --theme-paper-ai: #8A5F0A;  /* --paper-ia-fg */
  --theme-paper-down: #B11E2F;  /* --paper-err */
  --theme-paper-hover: #F5F7F9;  /* --paper-hover */
  --theme-paper-bar-btn: rgba(255, 255, 255, 0.08);  /* --paper-bar-btn */
  --theme-paper-bar-btn-line: rgba(255, 255, 255, 0.14);  /* --paper-bar-btn-line */
  --theme-series-1: #2563EB;  /* --series-1 */
  --theme-series-2: #0D9488;  /* --series-2 */
  --theme-series-3: #D87800;  /* --series-3 */
  --theme-series-4: #8B5CF6;  /* --series-4 */
  --theme-series-5: #845490;  /* --series-5 */
  --theme-series-6: #EC4899;  /* --series-6 */
  --theme-series-7: #7060E8;  /* --series-7 */
  --theme-series-8: #0098D0;  /* --series-8 */
  --theme-paper-target: var(--theme-paper-ink);
}

/* One list for shape and size (S6, 11/11/2026), the same in both themes. Corners: a sheet writes `var(--theme-r-*)`, never a size.
   Lifts: `--theme-shadow` is a card's; `-s` a small lift (a thumb, a chip), `-pop` a menu or a popover, `-modal` a dialog or a
   slide, `-side` a drawer coming from the right; they are defined with the theme's colours above. No text on a screen is smaller
   than `--theme-fs-min`; the « IA » mark is a mark, not a text, and has its own size. The notice's three tones (#740) are mixed here. */
:root {
  --theme-r-xs: 4px;
  --theme-r-s: 6px;
  --theme-r-m: 8px;
  --theme-r-l: 10px;
  --theme-r-xl: 14px;
  --theme-r-pill: 999px;
  --theme-fs-min: 11px;
  --theme-ai-fs: 9.5px;
  --theme-tone-ok-line: color-mix(in srgb, var(--theme-up) 30%, transparent);
  --theme-tone-ok-band: color-mix(in srgb, var(--theme-up) 9%, var(--theme-card));
  --theme-tone-ask-line: color-mix(in srgb, var(--theme-forecast) 35%, transparent);
  --theme-tone-ask-band: color-mix(in srgb, var(--theme-forecast) 11%, var(--theme-card));
  --theme-tone-bad-line: color-mix(in srgb, var(--theme-down) 30%, transparent);
  --theme-tone-bad-band: color-mix(in srgb, var(--theme-down) 8%, var(--theme-card));
}

/* The workshop page (/analytics/workshop): its own green and gold. */
:root[data-theme="dark"], :root {
  --theme-workshop-brand-emerald: #007A53;  /* --brand-emerald */
  --theme-workshop-brand-emerald-light: #10B981;  /* --brand-emerald-light */
  --theme-workshop-brand-emerald-glow: rgba(16, 185, 129, 0.15);  /* --brand-emerald-glow */
}

:root[data-theme="light"] {
  --theme-workshop-brand-emerald: #007A53;  /* --brand-emerald */
  --theme-workshop-brand-emerald-light: #065F46;  /* --brand-emerald-light */
  --theme-workshop-brand-emerald-glow: rgba(0, 122, 83, 0.08);  /* --brand-emerald-glow */
}
