/*
 * Colour tokens, light and dark. GENERATED by scripts/build-theme-css.mjs:
 * edit TOKENS there and rerun it, never this file.
 *
 *   --c-bg-rgb         page background
 *   --c-bg-glow-rgb    soft light at the top of the page
 *   --c-s1-rgb         cards, panels, inputs
 *   --c-s2-rgb         raised panels
 *   --c-s3-rgb         tinted panels
 *   --c-s4-rgb         accent panels
 *   --c-ink-rgb        overlay tints, hover washes, grid lines
 *   --c-slate-rgb      hairlines and dividers
 *   --c-sink-rgb       inset fields
 *   --c-shadow-k       shadow strength multiplier
 *   --c-text           body text and headings
 *   --c-text-2         strong secondary text
 *   --c-text-3         secondary text
 *   --c-muted          muted text: meta, captions
 *   --c-subtle         smallest print
 *   --c-on-brand       text on bright brand fills
 *   --c-green-rgb      green tint
 *   --c-red-rgb        red tint
 *   --c-orange-rgb     orange tint
 *   --c-blue-rgb       blue tint
 *   --c-gold-rgb       gold tint
 *   --c-green          green fill behind dark text
 *   --c-red            red fill
 *   --c-orange         orange fill
 *   --c-blue           blue fill
 *   --c-gold           gold fill
 *   --c-green-text     green text
 *   --c-green-text-2   text on green-tinted panels
 *   --c-red-text       red text
 *   --c-orange-text    orange text
 *   --c-orange-text-2  text on orange-tinted panels
 *   --c-blue-text      blue text
 *   --c-blue-text-2    text on blue-tinted panels
 *   --c-gold-text      gold text
 *   --c-gold-text-2    text on gold-tinted panels
 *   --c-green-line     green borders and strokes
 *   --c-red-line       red borders and strokes
 *   --c-orange-line    orange borders and strokes
 *   --c-blue-line      blue borders and strokes
 *   --c-gold-line      gold borders and strokes
 *   --c-line           card and panel borders (decorative)
 *   --c-control-line   form field borders (3:1, WCAG 1.4.11)
 *   --c-focus          keyboard focus ring
 *   --c-chart-darken   chart line darkening
 */

:root {
  color-scheme: light dark;
  --c-bg-rgb: 245 247 251;
  --c-bg-glow-rgb: 223 232 246;
  --c-s1-rgb: 255 255 255;
  --c-s2-rgb: 248 250 252;
  --c-s3-rgb: 239 244 250;
  --c-s4-rgb: 224 234 247;
  --c-ink-rgb: 15 23 42;
  --c-slate-rgb: 100 116 139;
  --c-sink-rgb: 226 232 240;
  --c-shadow-k: .35;
  --c-text: #0f172a;
  --c-text-2: #1e293b;
  --c-text-3: #334155;
  --c-muted: #475569;
  --c-subtle: #56657a;
  --c-on-brand: #021014;
  --c-green-rgb: 5 150 105;
  --c-red-rgb: 225 29 72;
  --c-orange-rgb: 217 119 6;
  --c-blue-rgb: 2 132 199;
  --c-gold-rgb: 202 138 4;
  --c-green: #38d98a;
  --c-red: #ff4d6d;
  --c-orange: #ff9f1c;
  --c-blue: #5cc8ff;
  --c-gold: #f6c453;
  --c-green-text: #047857;
  --c-green-text-2: #065f46;
  --c-red-text: #be123c;
  --c-orange-text: #b45309;
  --c-orange-text-2: #92400e;
  --c-blue-text: #0369a1;
  --c-blue-text-2: #075985;
  --c-gold-text: #a16207;
  --c-gold-text-2: #854d0e;
  --c-green-line: #059669;
  --c-red-line: #e11d48;
  --c-orange-line: #d97706;
  --c-blue-line: #0284c7;
  --c-gold-line: #ca8a04;
  --c-line: #d5dce6;
  --c-control-line: #7b8798;
  --c-focus: #047857;
  --c-chart-darken: 38%;
}

:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --c-bg-rgb: 9 12 19;
    --c-bg-glow-rgb: 23 32 51;
    --c-s1-rgb: 11 15 24;
    --c-s2-rgb: 16 22 35;
    --c-s3-rgb: 21 31 49;
    --c-s4-rgb: 31 54 82;
    --c-ink-rgb: 255 255 255;
    --c-slate-rgb: 148 163 184;
    --c-sink-rgb: 0 0 0;
    --c-shadow-k: 1;
    --c-text: #e8ecf2;
    --c-text-2: #dde2ea;
    --c-text-3: #c5ceda;
    --c-muted: #9ca3af;
    --c-subtle: #8d98a8;
    --c-on-brand: #021014;
    --c-green-rgb: 56 217 138;
    --c-red-rgb: 255 77 109;
    --c-orange-rgb: 255 159 28;
    --c-blue-rgb: 92 200 255;
    --c-gold-rgb: 246 196 83;
    --c-green: #38d98a;
    --c-red: #ff4d6d;
    --c-orange: #ff9f1c;
    --c-blue: #5cc8ff;
    --c-gold: #f6c453;
    --c-green-text: #38d98a;
    --c-green-text-2: #d1fae5;
    --c-red-text: #ff7890;
    --c-orange-text: #ff9f1c;
    --c-orange-text-2: #ffe3bb;
    --c-blue-text: #5cc8ff;
    --c-blue-text-2: #cfeeff;
    --c-gold-text: #f6c453;
    --c-gold-text-2: #fde68a;
    --c-green-line: #38d98a;
    --c-red-line: #ff4d6d;
    --c-orange-line: #ff9f1c;
    --c-blue-line: #5cc8ff;
    --c-gold-line: #f6c453;
    --c-line: rgba(148, 163, 184, .22);
    --c-control-line: #677386;
    --c-focus: #38d98a;
    --c-chart-darken: 0%;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --c-bg-rgb: 9 12 19;
  --c-bg-glow-rgb: 23 32 51;
  --c-s1-rgb: 11 15 24;
  --c-s2-rgb: 16 22 35;
  --c-s3-rgb: 21 31 49;
  --c-s4-rgb: 31 54 82;
  --c-ink-rgb: 255 255 255;
  --c-slate-rgb: 148 163 184;
  --c-sink-rgb: 0 0 0;
  --c-shadow-k: 1;
  --c-text: #e8ecf2;
  --c-text-2: #dde2ea;
  --c-text-3: #c5ceda;
  --c-muted: #9ca3af;
  --c-subtle: #8d98a8;
  --c-on-brand: #021014;
  --c-green-rgb: 56 217 138;
  --c-red-rgb: 255 77 109;
  --c-orange-rgb: 255 159 28;
  --c-blue-rgb: 92 200 255;
  --c-gold-rgb: 246 196 83;
  --c-green: #38d98a;
  --c-red: #ff4d6d;
  --c-orange: #ff9f1c;
  --c-blue: #5cc8ff;
  --c-gold: #f6c453;
  --c-green-text: #38d98a;
  --c-green-text-2: #d1fae5;
  --c-red-text: #ff7890;
  --c-orange-text: #ff9f1c;
  --c-orange-text-2: #ffe3bb;
  --c-blue-text: #5cc8ff;
  --c-blue-text-2: #cfeeff;
  --c-gold-text: #f6c453;
  --c-gold-text-2: #fde68a;
  --c-green-line: #38d98a;
  --c-red-line: #ff4d6d;
  --c-orange-line: #ff9f1c;
  --c-blue-line: #5cc8ff;
  --c-gold-line: #f6c453;
  --c-line: rgba(148, 163, 184, .22);
  --c-control-line: #677386;
  --c-focus: #38d98a;
  --c-chart-darken: 0%;
}

/* While the footer switch changes theme, nothing animates its colour: a page full of
   staggered transitions reads as a flicker. */
.im-theme-switching *,
.im-theme-switching *::before,
.im-theme-switching *::after {
  transition: none !important;
}
