/* Self-hosted type under the SIL Open Font License (see /assets/fonts/FONT-LICENSES.txt).
   Source Serif 4 sets the wordmark, headings and figures; Hanken Grotesk sets reading, labels and navigation. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/source-serif.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/hanken-grotesk.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --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;

  /* A 13/15px interface, a 16px reading voice, and serif headings no larger than they need to be. */
  --text-xs: 0.8125rem; --text-sm: 0.9375rem; --text-md: 1rem; --text-read: 1rem; --text-lg: 1.1875rem; --text-xl: 1.375rem; --text-2xl: 1.75rem;
  --text-display: clamp(2.375rem, 2.6vw + 1rem, 3.75rem);
  --text-section: clamp(1.75rem, 1.4vw + 1rem, 2.5rem);
  --text-lead: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;

  --container: 1200px; --narrow: 46rem; --gutter: 56px; --gap-columns: 32px; --section-gap-s: 80px; --section-gap: 112px;
  --band: clamp(96px, 8vw, 128px); --tile-pad: 24px; --tile-gap: 8px;
  --measure: 36rem;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100;

  /* White paper and the brand's deep green (#07412C, from the founder's wings). The green carries the header,
     the opening band and the footer, marks the measured value in every chart, and nothing else. */
  --color-brand: oklch(33.4% 0.068 163); --color-brand-2: oklch(37% 0.067 163); --color-brand-3: oklch(41% 0.065 163); --color-brand-rule: oklch(45% 0.058 163);
  --color-paper: oklch(100% 0 0);
  --color-paper-2: oklch(97.4% 0.007 163);
  --color-paper-3: oklch(94.6% 0.011 163);
  --color-ink: oklch(33.4% 0.068 163);
  --color-ink-2: oklch(40% 0.062 163);
  --color-muted: oklch(47% 0.05 163);
  --color-faint: oklch(64% 0.04 163);
  --color-rule: oklch(90.5% 0.018 163);
  --color-dot: oklch(70% 0.035 163);
  --color-accent: oklch(33.4% 0.068 163);
  --color-accent-soft: oklch(33.4% 0.068 163 / 0.08);
  --color-accent-ink: oklch(100% 0 0);
  --color-focus: oklch(40% 0.08 163);
  --color-button: var(--color-brand); --color-button-ink: oklch(100% 0 0);
  --color-error: oklch(52% 0.19 27);
  /* Charts: the measured or chosen value in green, context in a quiet grey-green, labels in ink. */
  --color-chart: oklch(45% 0.085 163);
  --color-chart-context: oklch(80% 0.035 163);
  --color-chart-band: oklch(45% 0.085 163 / 0.12);

  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-outlier: var(--font-display);

  --radius-card: 4px; --radius-pill: var(--radius-card); --rule-hair: 1px; --shadow-card: none;
  --tracking-display: -0.015em;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-brand: oklch(30% 0.06 163); --color-brand-2: oklch(33.5% 0.06 163); --color-brand-3: oklch(37% 0.058 163); --color-brand-rule: oklch(41% 0.052 163);
    --color-paper: oklch(25% 0.055 163);
    --color-paper-2: oklch(28.5% 0.056 163);
    --color-paper-3: oklch(32% 0.056 163);
    --color-ink: oklch(96.5% 0.006 163);
    --color-ink-2: oklch(88% 0.012 163);
    --color-muted: oklch(75% 0.018 163);
    --color-faint: oklch(58% 0.022 163);
    --color-rule: oklch(31% 0.03 163);
    --color-dot: oklch(52% 0.025 163);
    --color-accent: oklch(82% 0.09 160);
    --color-accent-soft: oklch(82% 0.09 160 / 0.12);
    --color-accent-ink: oklch(25% 0.055 163);
    --color-focus: oklch(82% 0.09 160);
    --color-button: oklch(96.5% 0.006 163); --color-button-ink: oklch(25% 0.055 163);
    --color-chart: oklch(78% 0.1 160);
    --color-chart-context: oklch(48% 0.02 163);
    --color-chart-band: oklch(78% 0.1 160 / 0.14);
  }
}

/* A deep green surface with white type. Components inside read the same tokens, so they need no variants. */
.green {
  --color-paper: var(--color-brand);
  --color-paper-2: var(--color-brand-2);
  --color-paper-3: var(--color-brand-3);
  --color-ink: oklch(100% 0 0);
  --color-ink-2: oklch(95% 0.018 163);
  --color-muted: oklch(89% 0.045 163);
  --color-faint: oklch(74% 0.06 163);
  --color-rule: var(--color-brand-rule);
  --color-dot: oklch(70% 0.024 150);
  --color-accent: oklch(100% 0 0);
  --color-accent-soft: oklch(100% 0 0 / 0.12);
  --color-accent-ink: var(--color-brand);
  --color-focus: oklch(100% 0 0);
  --color-button: oklch(100% 0 0); --color-button-ink: var(--color-brand);
  --color-chart: oklch(88% 0.08 160);
  --color-chart-context: oklch(58% 0.04 160);
  background: var(--color-paper);
  color: var(--color-ink);
}
