/* extensionsly design tokens — lifted verbatim from the design prototypes (OKLCH).
   Light is the base; dark is applied by [data-theme="dark"] (theme.js toggle) AND by
   prefers-color-scheme so dark works with zero JS. --accent-h is the per-product reskin lever. */
:root {
  --bg: oklch(0.985 0.006 240);
  --surface: #ffffff;
  --surface-2: oklch(0.975 0.008 240);
  --text: oklch(0.28 0.03 255);
  --muted: oklch(0.52 0.025 255);
  --border: oklch(0.9 0.012 245);
  --accent-h: 250;
  --accent: oklch(0.55 0.15 var(--accent-h));
  --accent-strong: oklch(0.48 0.16 var(--accent-h));
  --accent-fg: #fff;
  --accent-tint: oklch(0.965 0.03 var(--accent-h));
  --good: oklch(0.6 0.12 165);
  --bad: oklch(0.58 0.17 25);
  --warn: oklch(0.62 0.15 55);
  --shadow: 0 1px 2px oklch(0.5 0.05 255 / 0.06), 0 8px 24px oklch(0.5 0.05 255 / 0.06);
  --container: 1160px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

/* Dark palette, shared by the explicit toggle and the OS preference. */
:root[data-theme="dark"] {
  --bg: oklch(0.19 0.025 255);
  --surface: oklch(0.235 0.028 255);
  --surface-2: oklch(0.27 0.03 255);
  --text: oklch(0.95 0.012 240);
  --muted: oklch(0.72 0.02 245);
  --border: oklch(0.34 0.03 255);
  --accent: oklch(0.72 0.13 var(--accent-h));
  --accent-strong: oklch(0.78 0.12 var(--accent-h));
  --accent-fg: oklch(0.16 0.02 255);
  --accent-tint: oklch(0.29 0.05 var(--accent-h));
  --good: oklch(0.75 0.12 165);
  --bad: oklch(0.72 0.15 25);
  --warn: oklch(0.78 0.13 65);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px oklch(0 0 0 / 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.19 0.025 255);
    --surface: oklch(0.235 0.028 255);
    --surface-2: oklch(0.27 0.03 255);
    --text: oklch(0.95 0.012 240);
    --muted: oklch(0.72 0.02 245);
    --border: oklch(0.34 0.03 255);
    --accent: oklch(0.72 0.13 var(--accent-h));
    --accent-strong: oklch(0.78 0.12 var(--accent-h));
    --accent-fg: oklch(0.16 0.02 255);
    --accent-tint: oklch(0.29 0.05 var(--accent-h));
    --good: oklch(0.75 0.12 165);
    --bad: oklch(0.72 0.15 25);
    --warn: oklch(0.78 0.13 65);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px oklch(0 0 0 / 0.35);
  }
}
