/* Design tokens: the one sheet shared by the public site, the slideshow, the owner UI and the demo (T1).
   public/tokens.css is a byte copy for the demo's <link> (src/styles/tokens.test.ts keeps them equal).
   Colours are semantic (--c-*); the stage set is the slideshow's dark island and does not change with the theme.
   Dark theme (T6): prefers-color-scheme on the public pages only. A page that must stay light (owner UI, demo) sets
   <html data-theme="light">. */
:root {
  color-scheme: light;

  /* Page and surfaces */
  --c-bg: #f7f9fc;
  --c-surface: #fff;
  --c-surface-2: #fafbfd;
  --c-surface-hover: #f0f5fb;
  --c-fill: #e3e8ef;
  --c-fill-2: #e9eef5;

  /* Text */
  --c-text: #111;
  --c-text-2: #333;
  --c-muted: #595959;
  --c-faint: #999;
  --c-heading: #1f3864;
  --c-link: #2e75b6;

  /* Accent (the decks' blue) */
  --c-accent: #2e75b6;
  --c-accent-hover: #225d94;
  --c-accent-ink: #fff;
  --c-accent-soft: #deebf7;
  --c-accent-soft-hover: #cfe0f3;

  /* Lines */
  --c-line: #cfd8e3;
  --c-field-line: var(--c-line);

  /* Header band */
  --c-brand: #1f3864;
  --c-brand-hover: #2a4a84;
  --c-on-brand: #fff;
  --c-on-brand-muted: #cfe2f3;

  /* Status */
  --c-warn-soft: #fde9d9;
  --c-warn-ink: #8a3b00;
  --c-danger: #a40000;
  --c-danger-fill: #b03a2e;
  --c-ok-ink: #38761d;
  --c-data-cut: #c55a11;
  --c-shadow: rgba(31, 56, 100, 0.12);

  /* Stage: slideshow and live strip, dark in both themes */
  --c-stage: #000;
  --c-stage-paper: #fff;
  --c-panel: #1b1f27;
  --c-stage-text: #eceff4;
  --c-stage-muted: #9aa3b2;
  --c-stage-line: #2c3140;
  --c-stage-control: #262b36;
  --c-stage-control-line: #3a4152;
  --c-stage-control-hover: #333a48;
  --c-stage-hover: #2a3040;
  --c-stage-cur-ink: #dbe7f5;
  --c-stage-warn: #d4a017;
  --c-stage-ok: #3fb950;
  --c-stage-danger: #e5534b;

  /* Spacing, radius */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 10px;
  --radius-pill: 999px;

  /* Type */
  --font-text:
    Carlito, Calibri, 'Carlito Fallback', 'Carlito Fallback Roboto', 'Segoe UI', system-ui,
    sans-serif;
  --fs-h1: 34px;
  --fs-h2: 24px;
  --fs-sub: 19px;
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-caption: 14px;
}

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

    --c-bg: #131a24;
    --c-surface: #1b2431;
    --c-surface-2: #1b2431;
    --c-surface-hover: #223047;
    --c-fill: #2a3546;
    --c-fill-2: #222c3a;

    --c-text: #e7ecf3;
    --c-text-2: #ccd4df;
    --c-muted: #a2adbd;
    --c-faint: #8591a3;
    --c-heading: #bcd5f2;
    --c-link: #84b8ec;

    --c-accent: #2e75b6;
    --c-accent-hover: #225d94;
    --c-accent-ink: #fff;
    --c-accent-soft: #1e3352;
    --c-accent-soft-hover: #26406a;

    --c-line: #334155;
    --c-field-line: #6b7c95;

    --c-brand: #172a4a;
    --c-brand-hover: #24406e;
    --c-on-brand: #fff;
    --c-on-brand-muted: #cfe2f3;

    --c-warn-soft: #43301f;
    --c-warn-ink: #f5c39b;
    --c-danger: #ff8f87;
    --c-shadow: rgba(0, 0, 0, 0.35);
  }
}
