/* =============================================================================
 * burst.vars.css - design tokens only: colours, type, spacing, the dark
 * palette and the per-site brand colour. No element styles, so any page can
 * load it, including the DEX, which keeps its own stylesheets.
 * burst.tokens.css (base element styles) builds on these.
 * ========================================================================== */
:root {
  /* Neutrals: slightly blue-biased so they sit with the brand, not against it */
  --ground:      #F3F6F8;
  --surface:     #FFFFFF;
  --surface-2:   #E9EEF3;
  --line:        #DCE4EC;
  --line-strong: #A9BBC9;
  --ink:         #0B131A;
  --ink-2:       #47606F;
  --ink-3:       #536C7B;   /* 4.7:1 on --surface-2, 5.5:1 on white (was #6E8798, 3.2-3.8:1) */

  /* Semantic state - deliberately separate from --brand so "healthy" never
     reads as "branded". Used by the analytics tables. */
  --good: #127956;
  --warn: #8A5A00;
  --bad:  #B62A22;

  /* Brand families. --brand is chosen by data-site below. */
  /* From the tailwind.config that flare90 shipped with the v3 play CDN.
     Text uses a darkened pink so it clears AA on white; solid fills keep the
     original #E22074 because white text sits on them. */
  --flare-pink:    #C2185F;
  --flare-pink-bg: #E22074;
  --flare-magenta: #C0168A;
  --burst-gold:    #FFB300;
  --burst-violet:  #764ABC;
  --blue:    #1B6FA8;   /* 5.4:1 on white  - Remnara #4085b8 / Provn #6ea8ff, tuned to pass AA */
  --crimson: #BE0F47;   /* 6.3:1 on white  - Flare crimson */

  --shadow-sm: 0 1px 2px rgba(11,19,26,.06);
  --shadow-md: 0 4px 12px rgba(11,19,26,.08);
  --shadow-lg: 0 12px 32px rgba(11,19,26,.12);

  --radius:    .375rem;
  --radius-lg: .5rem;

  --font-sans: Inter, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
}

/* =============================================================================
 * THEMING - three states, which is the part the old system got wrong.
 *
 * Before: dark was a `dark-mode` class that JavaScript put on <body>. With JS
 * disabled or slow the page was always light, `prefers-color-scheme` was
 * ignored, and there was no way to say "follow my system" once you had ever
 * clicked the toggle.
 *
 * Now the real three states:
 *   no attribute            -> follow the OS (the default, and what most
 *                              visitors get, so it has to be right)
 *   data-theme="light"      -> explicit light, beats a dark OS
 *   data-theme="dark"       -> explicit dark,  beats a light OS
 *
 * `color-scheme` is set too so form controls, scrollbars and the canvas the
 * browser paints before our CSS lands all match. body.dark-mode is kept as a
 * shim so the per-page CSS still being migrated keeps working.
 * ========================================================================== */

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

/* Dark palette, declared once and applied to all three dark paths. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --ground:      #0B0F14;
  --surface:     #121A23;
  --surface-2:   #18222D;
  --line:        #223040;
  --line-strong: #33485C;
  --ink:         #E7EFF6;
  --ink-2:       #A3B6C6;
  --ink-3:       #778DA1;   /* 4.7:1 on --surface-2 (was #6F869A, 4.25:1) */

  --good: #4ECFA0;
  --warn: #F0B24A;
  --bad:  #FF6257;

  --flare-pink:    #FF5C9D;
  --flare-pink-bg: #E22074;
  --flare-magenta: #E44FB0;
  --burst-gold:    #FFC845;
  --burst-violet:  #A88BE0;
  --blue:    #5FB3E8;   /* 7.5:1 on --surface */
  --crimson: #FF5A86;   /* 5.8:1 on --surface */

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --ground:      #0B0F14;
  --surface:     #121A23;
  --surface-2:   #18222D;
  --line:        #223040;
  --line-strong: #33485C;
  --ink:         #E7EFF6;
  --ink-2:       #A3B6C6;
  --ink-3:       #778DA1;   /* 4.7:1 on --surface-2 (was #6F869A, 4.25:1) */

  --good: #4ECFA0;
  --warn: #F0B24A;
  --bad:  #FF6257;

  --flare-pink:    #FF5C9D;
  --flare-pink-bg: #E22074;
  --flare-magenta: #E44FB0;
  --burst-gold:    #FFC845;
  --burst-violet:  #A88BE0;
  --blue:    #5FB3E8;   /* 7.5:1 on --surface */
  --crimson: #FF5A86;   /* 5.8:1 on --surface */

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}
/* Legacy shim: page CSS not yet migrated still writes `body.dark-mode ...` */
body.dark-mode {
  --ground:      #0B0F14;
  --surface:     #121A23;
  --surface-2:   #18222D;
  --line:        #223040;
  --line-strong: #33485C;
  --ink:         #E7EFF6;
  --ink-2:       #A3B6C6;
  --ink-3:       #778DA1;   /* 4.7:1 on --surface-2 (was #6F869A, 4.25:1) */

  --good: #4ECFA0;
  --warn: #F0B24A;
  --bad:  #FF6257;

  --flare-pink:    #FF5C9D;
  --flare-pink-bg: #E22074;
  --flare-magenta: #E44FB0;
  --burst-gold:    #FFC845;
  --burst-violet:  #A88BE0;
  --blue:    #5FB3E8;   /* 7.5:1 on --surface */
  --crimson: #FF5A86;   /* 5.8:1 on --surface */

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}

/* --- Site identity: the ONLY thing that differs between the two sites ------ */
html[data-site="burstlabs"]  { --brand: var(--blue);    --brand-alt: var(--crimson); }
html[data-site="burstnodes"] { --brand: var(--crimson); --brand-alt: var(--blue); }
html:not([data-site])        { --brand: var(--blue);    --brand-alt: var(--crimson); }
