/* Design tokens. The only file that may contain colour literals and font families (spec 17 section 8). */
:root {
  --bg-canvas: #f4f5f6; --bg-surface: #ffffff; --bg-raised: #fbfbfc; --bg-hover: #f0f2f3; --bg-selected: #e8f0ee;
  --text-primary: #1b2428; --text-secondary: #4b585e; --text-muted: #56636a;
  --border-subtle: #e3e7e8; --border-strong: #c9d1d3;
  --action-primary: #1d6a55; --action-primary-hover: #15513f; --action-on: #ffffff;
  --status-success: #1f7a4f; --status-success-bg: #e2f3ea;
  --status-warning: #7a5000; --status-warning-bg: #fcf0d6;
  --status-danger: #a73a2b; --status-danger-bg: #fbe5e1;
  --status-info: #2b5f8a; --status-info-bg: #e3eef7;
  --focus-ring: #2b7ab0;
  --nav-bg: #14262d; --nav-text: #d2e0e3; --nav-active: #1f3b45; --nav-on: #ffffff; --nav-line: #2a424b;
  --scrim: rgba(10, 18, 22, 0.55);
  --qr-dark: #000000; --qr-light: #ffffff; /* the QR code stays dark on light in both themes so phones can read it */
  --shadow-overlay: 0 8px 28px rgba(10, 18, 22, 0.22);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  --fs-12: 12px; --fs-14: 14px; --fs-15: 15px; --fs-16: 16px; --fs-20: 20px; --fs-24: 24px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --r-sm: 4px; --r-md: 8px;
  --row: 40px; --row-compact: 32px; --row-roomy: 48px;
  --target: 32px;
  --gutter: 28px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --bg-canvas: #0e1417; --bg-surface: #141c20; --bg-raised: #182126; --bg-hover: #1c272c; --bg-selected: #1a2f2b;
    --text-primary: #e6eded; --text-secondary: #a7b6b9; --text-muted: #8a9b9f;
    --border-subtle: #232f34; --border-strong: #33444a;
    --action-primary: #4fb393; --action-primary-hover: #6cc7a9; --action-on: #08201a;
    --status-success: #6fd0a0; --status-success-bg: #163227; --status-warning: #e3b04e; --status-warning-bg: #33280f;
    --status-danger: #f08a79; --status-danger-bg: #38201c; --status-info: #7db7e6; --status-info-bg: #15293a;
    --focus-ring: #5aa9e0; --nav-bg: #0b1519; --nav-active: #15262d; --nav-line: #22343b;
    --scrim: rgba(0, 0, 0, 0.6); --shadow-overlay: 0 8px 28px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] { color-scheme: dark;
  --bg-canvas: #0e1417; --bg-surface: #141c20; --bg-raised: #182126; --bg-hover: #1c272c; --bg-selected: #1a2f2b;
  --text-primary: #e6eded; --text-secondary: #a7b6b9; --text-muted: #8a9b9f;
  --border-subtle: #232f34; --border-strong: #33444a;
  --action-primary: #4fb393; --action-primary-hover: #6cc7a9; --action-on: #08201a;
  --status-success: #6fd0a0; --status-success-bg: #163227; --status-warning: #e3b04e; --status-warning-bg: #33280f;
  --status-danger: #f08a79; --status-danger-bg: #38201c; --status-info: #7db7e6; --status-info-bg: #15293a;
  --focus-ring: #5aa9e0; --nav-bg: #0b1519; --nav-active: #15262d; --nav-line: #22343b;
  --scrim: rgba(0, 0, 0, 0.6); --shadow-overlay: 0 8px 28px rgba(0, 0, 0, 0.5);
}
@media (max-width: 639px) { :root { --row: var(--row-roomy); --target: 44px; --gutter: 16px; } }
