/* Design tokens: "Interlocking". Light is the default; dark follows the system unless data-theme overrides. */
@font-face {
  font-family: "iA Quattro";
  src: url("/assets/fonts/iAWriterQuattroS-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "iA Quattro";
  src: url("/assets/fonts/iAWriterQuattroS-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "iA Mono";
  src: url("/assets/fonts/iAWriterMonoS-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #eef1f0;
  --surface: #fafbfa;
  --surface-2: #e3e8e6;
  --line: #c2cbc8;
  --line-strong: #6f7e7b;
  --ink: #17211f;
  --ink-2: #52615e;
  --action: #0f3b36;
  --on-action: #f4faf8;
  --focus: #005fcc;
  --go: #17683a;
  --caution: #8a5300;
  --info: #1f46b0;
  --stop: #a3231b;

  --font-ui: "iA Quattro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "iA Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --t-xs: 0.8125rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.125rem;
  --t-xl: 1.4rem;
  --t-2xl: 1.9rem;
  --t-ver: 2.6rem;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4.5rem;

  --r-1: 4px;
  --r-2: 10px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1413;
    --surface: #141d1b;
    --surface-2: #1c2826;
    --line: #2c3a37;
    --line-strong: #7d8e8a;
    --ink: #e6eeec;
    --ink-2: #a3b2ae;
    --action: #bfe8de;
    --on-action: #0b1a17;
    --focus: #7fb2ff;
    --go: #5bd08a;
    --caution: #f0b84a;
    --info: #9db8ff;
    --stop: #ff9a90;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1413;
  --surface: #141d1b;
  --surface-2: #1c2826;
  --line: #2c3a37;
  --line-strong: #7d8e8a;
  --ink: #e6eeec;
  --ink-2: #a3b2ae;
  --action: #bfe8de;
  --on-action: #0b1a17;
  --focus: #7fb2ff;
  --go: #5bd08a;
  --caution: #f0b84a;
  --info: #9db8ff;
  --stop: #ff9a90;
}
