/* All colours and sizes as variables (SPEC §9.2, CODING-RULES §4.5). Themes redefine variables only. */
:root {
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-size: 14px;
  --font-size-small: 12px;
  --font-size-large: 18px;
  --line-height: 1.4;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --border-width: 1px;
  --focus-width: 2px;
  --row-height: 14px;
  --topbar-height: 44px;
  --content-max-width: 1280px;

  --color-background: #ffffff;
  --color-surface: #f6f7f9;
  --color-surface-strong: #eceef2;
  --color-text: #1b1f24;
  --color-text-muted: #545c66;
  --color-border: #c8cdd4;
  --color-border-strong: #8a929c;
  --color-accent: #1a5fb4;
  --color-accent-text: #ffffff;
  --color-link: #1a55a0;
  --color-focus: #e66100;
  --color-positive: #1d6b33;
  --color-positive-surface: #e3f3e7;
  --color-negative: #a51d2d;
  --color-negative-surface: #fbe4e6;
  --color-warning: #7a4d00;
  --color-warning-surface: #fff1d6;
  --color-lesson: #e8f0fb;
  --color-lesson-accent: #1a5fb4;
  --color-substituted: #f3eafb;
  --color-substituted-accent: #6a2f9e;
  --color-moved-accent: #8a5a00;
  --color-cancelled: #f1f1f1;
  --color-cancelled-accent: #6b6b6b;
  --color-problem-accent: #a51d2d;
  --color-hatch: rgba(84, 92, 102, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-background: #15181c;
    --color-surface: #1d2126;
    --color-surface-strong: #262b31;
    --color-text: #e8eaed;
    --color-text-muted: #a9b0b8;
    --color-border: #3a4048;
    --color-border-strong: #69717b;
    --color-accent: #6ea8fe;
    --color-accent-text: #0d1117;
    --color-link: #8ab8ff;
    --color-focus: #ffa348;
    --color-positive: #7bd88f;
    --color-positive-surface: #183222;
    --color-negative: #ff8a94;
    --color-negative-surface: #3a1a1e;
    --color-warning: #ffcf70;
    --color-warning-surface: #3a2c10;
    --color-lesson: #1c2a3d;
    --color-lesson-accent: #6ea8fe;
    --color-substituted: #2a2039;
    --color-substituted-accent: #c69cf0;
    --color-moved-accent: #ffcf70;
    --color-cancelled: #24272b;
    --color-cancelled-accent: #8b9096;
    --color-problem-accent: #ff8a94;
    --color-hatch: rgba(169, 176, 184, 0.18);
  }
}

:root[data-theme="dark"] {
  --color-background: #15181c;
  --color-surface: #1d2126;
  --color-surface-strong: #262b31;
  --color-text: #e8eaed;
  --color-text-muted: #a9b0b8;
  --color-border: #3a4048;
  --color-border-strong: #69717b;
  --color-accent: #6ea8fe;
  --color-accent-text: #0d1117;
  --color-link: #8ab8ff;
  --color-focus: #ffa348;
  --color-positive: #7bd88f;
  --color-positive-surface: #183222;
  --color-negative: #ff8a94;
  --color-negative-surface: #3a1a1e;
  --color-warning: #ffcf70;
  --color-warning-surface: #3a2c10;
  --color-lesson: #1c2a3d;
  --color-lesson-accent: #6ea8fe;
  --color-substituted: #2a2039;
  --color-substituted-accent: #c69cf0;
  --color-moved-accent: #ffcf70;
  --color-cancelled: #24272b;
  --color-cancelled-accent: #8b9096;
  --color-problem-accent: #ff8a94;
  --color-hatch: rgba(169, 176, 184, 0.18);
}
