/* Orynt design tokens — five brand colours: Ink, Paper, Teal, Cobalt, Sand. Semantic colours are separate and calm.
   Principle: UNCERTAIN is indigo (a state to work through), FAILED-AND-PROVEN is red, SETTLED is green. Never red for "unknown". */
:root {
  --font-display: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --font-ui: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* brand palette */
  --ink: #0f1b2d;
  --paper: #f6f4ee;
  --teal: #0e7c73;
  --cobalt: #2f5fd0;
  --sand: #e7e0cf;

  /* surfaces & text (light) */
  --bg: var(--paper);
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --surface-sunken: #efece3;
  --text: var(--ink);
  --text-2: #43506a;
  --text-3: #5d6a82;
  --line: #ddd8ca;
  --line-strong: #c4bea9;
  --focus: #1b55d9;

  --primary: var(--teal);
  --primary-hover: #0a655d;
  --primary-text: #ffffff;
  --link: #0a5d56;

  --ok: #17663f;
  --ok-bg: #e3f2ea;
  --ok-line: #a7d5b9;
  --warn: #7d5508;
  --warn-bg: #fbf0d6;
  --warn-line: #e6c97c;
  --danger: #a3301f;
  --danger-bg: #fbe6e1;
  --danger-line: #eba99d;
  --unknown: #3a47a8;
  --unknown-bg: #e8eafa;
  --unknown-line: #b4bbec;
  --info: var(--cobalt);
  --info-bg: #e6edfb;
  --info-line: #b3c6f1;
  --neutral: #4b5870;
  --neutral-bg: #ecebe4;
  --neutral-line: #d4d0c2;
  --sim: #6b3fa0;
  --sim-bg: #f0e8fa;
  --sim-line: #d1b9ec;

  /* spacing (4px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 112px;
  /* radii */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 16px;
  --r-pill: 999px;
  /* elevation */
  --shadow-1: 0 1px 2px rgba(15, 27, 45, 0.06), 0 1px 1px rgba(15, 27, 45, 0.04);
  --shadow-2: 0 6px 20px rgba(15, 27, 45, 0.08), 0 2px 6px rgba(15, 27, 45, 0.05);
  --shadow-3: 0 24px 60px rgba(15, 27, 45, 0.18);
  /* type scale */
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-base: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --t-3xl: clamp(2.5rem, 1.5rem + 4.4vw, 4.6rem);
  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 420ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220;
    --surface: #111d31;
    --surface-2: #0e192b;
    --surface-sunken: #0b1424;
    --text: #eaf0f6;
    --text-2: #b4c2d3;
    --text-3: #92a3b8;
    --line: #243450;
    --line-strong: #364866;
    --focus: #7aa2ff;
    --primary: #4fd1c0;
    --primary-hover: #74ddcf;
    --primary-text: #05221f;
    --link: #6fe0d1;
    --ok: #7ee0a8;
    --ok-bg: #0f2a1d;
    --ok-line: #24573c;
    --warn: #f0c768;
    --warn-bg: #2b2108;
    --warn-line: #5f4a14;
    --danger: #ff9b8a;
    --danger-bg: #301412;
    --danger-line: #6d2c25;
    --unknown: #a9b4ff;
    --unknown-bg: #1a2048;
    --unknown-line: #3a4690;
    --info: #86a8ff;
    --info-bg: #14223f;
    --info-line: #2c4580;
    --neutral: #a8b6c9;
    --neutral-bg: #17233a;
    --neutral-line: #2a3b58;
    --sim: #d0b3ff;
    --sim-bg: #261a3b;
    --sim-line: #4d3a73;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1220;
  --surface: #111d31;
  --surface-2: #0e192b;
  --surface-sunken: #0b1424;
  --text: #eaf0f6;
  --text-2: #b4c2d3;
  --text-3: #92a3b8;
  --line: #243450;
  --line-strong: #364866;
  --focus: #7aa2ff;
  --primary: #4fd1c0;
  --primary-hover: #74ddcf;
  --primary-text: #05221f;
  --link: #6fe0d1;
  --ok: #7ee0a8;
  --ok-bg: #0f2a1d;
  --ok-line: #24573c;
  --warn: #f0c768;
  --warn-bg: #2b2108;
  --warn-line: #5f4a14;
  --danger: #ff9b8a;
  --danger-bg: #301412;
  --danger-line: #6d2c25;
  --unknown: #a9b4ff;
  --unknown-bg: #1a2048;
  --unknown-line: #3a4690;
  --info: #86a8ff;
  --info-bg: #14223f;
  --info-line: #2c4580;
  --neutral: #a8b6c9;
  --neutral-bg: #17233a;
  --neutral-line: #2a3b58;
  --sim: #d0b3ff;
  --sim-bg: #261a3b;
  --sim-line: #4d3a73;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
