/* ============================================================
   Theme tokens — the validated reference palette, both modes.
   Chart marks use series blue; status colors are reserved for
   state and always paired with a text label (never color alone).
   Dark mode: OS preference by default, user toggle wins both ways.
   ============================================================ */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --series: #2a78d6;          /* categorical slot 1 (validated) */
  --series-wash: rgba(42, 120, 214, 0.1);
  --accent-ink: #ffffff;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.05), 0 8px 24px rgba(11, 11, 11, 0.06);

  /* The two type stacks, and they are not theme-dependent — they sit here
     because every surface should reach them by name rather than respelling
     a font list.

     BOTH lead with ASG CTO, and that is safe precisely because base.css
     declares it with a `unicode-range` covering only the Bengali block: it
     can never draw a Latin letter, so English falls straight through to
     system-ui / ui-monospace and reads exactly as it did. Leading with it
     everywhere is what puts Bengali in the brand face in ALL of it —
     including the monospace surfaces, where merchant Bengali really does
     land (`.rte-source` is the HTML source view for a product description).

     A new rule that needs a font must use one of these. Respelling a stack
     is how a surface quietly opts out of the Bengali face. */
  --sans: 'ASG CTO', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'ASG CTO', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --series: #3987e5;
    --series-wash: rgba(57, 135, 229, 0.12);
    --good-text: #0ca30c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --series: #3987e5;
  --series-wash: rgba(57, 135, 229, 0.12);
  --good-text: #0ca30c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}
