/* planaco tokens. Brand anchors (navy #0c2a52, gold #e6b94d / #f5d97a, paper #f0f6fc) are kept
   as found; every other colour is derived from them in OKLCH. Light leads, dark is the alternate. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-latin-700.woff2") format("woff2"); }
/* Fallbacks matched to Plex so the swap moves nothing. Ascent 1025 and descent 275 per 1000 units are read
   from the hhea tables of the woff2 files in fonts/; the sans runs 2.2% wider than Arial (measured in Chrome
   on the hero sentence), so its overrides are divided by 1.022. Plex Mono and the system monos share a 600 advance. */
@font-face { font-family: "Plex Sans Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 102.2%; ascent-override: 100.3%; descent-override: 26.9%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Fallback"; src: local("Menlo"), local("Courier New"); ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }

:root {
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-2xl: 1.953rem;
  --text-display-s: clamp(2.25rem, 4vw + 0.5rem, 3.75rem); --text-display: clamp(2.75rem, 5vw + 1rem, 5.25rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.5rem); --text-title: clamp(1.25rem, 0.75vw + 0.875rem, 1.625rem); --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.375rem);
  /* the two figures set past the display size: the headline's live number, then the plan's odds */
  --text-figure: clamp(3.25rem, 7vw + 1rem, 7.5rem); --text-odds: clamp(4rem, 5.5vw + 1rem, 6.25rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms;
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
  --nav-height: 64px; --control-height: 48px; --touch: 44px;
  --z-sticky: 200; --z-toast: 500;

  --font-display: "IBM Plex Sans", "Plex Sans Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Plex Sans Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Plex Mono Fallback", ui-monospace, monospace;
  /* the outlier has one role: the wordmark */
  --font-outlier: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --display-weight: 600; --tracking-display: -0.025em;
  --radius-card: 6px; --radius-input: 6px;

  /* light: the identity */
  color-scheme: light dark;
  --color-paper: #f0f6fc;
  --color-paper-2: oklch(93.2% 0.02 250);
  --color-paper-3: oklch(89% 0.03 252);
  --color-ink: #0c2a52;
  --color-ink-2: oklch(38% 0.075 257);
  --color-muted: oklch(46% 0.06 255);
  --color-rule: oklch(85% 0.032 252);
  --color-rule-strong: oklch(56% 0.06 255);
  /* gold has one job: the headline's number (its bar in the chart) and the one action */
  --color-accent: #e6b94d;
  --color-accent-2: oklch(84% 0.135 88);
  --color-accent-ink: #0c2a52;
  --color-accent-edge: oklch(50% 0.105 80);
  --color-focus: #0c2a52;
  --color-risk: oklch(53% 0.17 33);
  --chart-bar: oklch(55% 0.095 257);
  --chart-median: var(--color-accent);
  --chart-median-edge: var(--color-accent-edge);
}

:root[data-theme="light"] { color-scheme: light; }

/* dark: the same system re-derived; elevation is lighter, the bars sit between canvas and ink */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-paper: oklch(18.5% 0.042 258);
  --color-paper-2: oklch(25% 0.052 258);
  --color-paper-3: oklch(31% 0.06 258);
  --color-ink: #f0f6fc;
  --color-ink-2: oklch(87% 0.025 250);
  --color-muted: oklch(74% 0.04 252);
  --color-rule: oklch(34% 0.055 257);
  --color-rule-strong: oklch(62% 0.055 255);
  --color-accent: #f5d97a;
  --color-accent-2: oklch(92% 0.1 95);
  --color-accent-edge: #f5d97a;
  --color-focus: #f5d97a;
  --color-risk: oklch(72% 0.15 35);
  --chart-bar: oklch(60% 0.1 257);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-paper: oklch(18.5% 0.042 258);
    --color-paper-2: oklch(25% 0.052 258);
    --color-paper-3: oklch(31% 0.06 258);
    --color-ink: #f0f6fc;
    --color-ink-2: oklch(87% 0.025 250);
    --color-muted: oklch(74% 0.04 252);
    --color-rule: oklch(34% 0.055 257);
    --color-rule-strong: oklch(62% 0.055 255);
    --color-accent: #f5d97a;
    --color-accent-2: oklch(92% 0.1 95);
    --color-accent-edge: #f5d97a;
    --color-focus: #f5d97a;
    --color-risk: oklch(72% 0.15 35);
    --chart-bar: oklch(60% 0.1 257);
  }
}
