/* Seat Zero's colour tokens, light and dark, in one place (plan/60 A2).
   Every page links this file before its own styles: board.html, runs.html
   and, through each small page's shell, access.css. The pairs that carry
   text or a control's edge are pinned by tests/test_tokens.py to WCAG 2.2
   AA (4.5:1 text, 3:1 control boundaries and focus rings), both themes.
   Designer drawings (docs/PARTITION_VIEWS.md) use these names, never their
   own surface colours, so a drawing follows the theme.

   Controls: --control (a button's fill, one step off the panel),
   --control-ink, --control-border (3:1 against the panel and the page),
   --primary / --primary-ink (the one main action), --focus (the
   :focus-visible ring). The rest: the dataviz reference palette (plan/07
   §4), the board's felt and shield, plan/31's AI-view bands. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --felt: #efeee8;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6b6a65;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.12);
  --accent: #1f6ac4;
  --control: #eeede8;
  --control-ink: #0b0b0b;
  --control-border: #7c7a74;
  --primary: #1f6ac4;
  --primary-ink: #ffffff;
  --focus: #1f6ac4;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  /* plan/63: three more categorical slots (the dataviz reference palette,
     validate_palette.js passes light and dark), fixed order, never cycled */
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --critical: #d03b3b;
  --track: #e1e0d9;
  --shield: #6b5a3a;
  --shield-ink: #fff;
  /* plan/31: one band per source of what the AI view shows */
  --see: #2a78d6;
  --fill: #c27a00;
  --net: #7a4cc2;
  --real: #898781;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --felt: #23231f;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #9a9890;
    --grid: #2c2c2a;
    --axis: #383835;
    --ring: rgba(255, 255, 255, 0.14);
    --accent: #3987e5;
    --control: #2a2a28;
    --control-ink: #ffffff;
    --control-border: #77756f;
    --primary: #1f66bd;
    --primary-ink: #ffffff;
    --focus: #3987e5;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --good-text: #0ca30c;
    --critical: #ef6060;
    --track: #2c2c2a;
    --shield: #8a7650;
    --see: #3987e5;
    --fill: #e0a030;
    --net: #a383e0;
  }
}
/* the same as the block above (tests/test_tokens.py checks they agree) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --felt: #23231f;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #9a9890;
  --grid: #2c2c2a;
  --axis: #383835;
  --ring: rgba(255, 255, 255, 0.14);
  --accent: #3987e5;
  --control: #2a2a28;
  --control-ink: #ffffff;
  --control-border: #77756f;
  --primary: #1f66bd;
  --primary-ink: #ffffff;
  --focus: #3987e5;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --good-text: #0ca30c;
  --critical: #ef6060;
  --track: #2c2c2a;
  --shield: #8a7650;
  --see: #3987e5;
  --fill: #e0a030;
  --net: #a383e0;
}

/* Controls everyone shares: a visible fill and edge, and a focus ring
   wherever the keyboard lands (plan/60 A2). Pages add size and layout. */
.btn, .pill, .views button {
  background: var(--control);
  color: var(--control-ink);
  border: 1px solid var(--control-border);
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pill.on, .views button.on { border-color: var(--accent); color: var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
input, select, textarea { border-color: var(--control-border); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { border-radius: 4px; }
