/*
 * Design tokens: the only place colours and font stacks are defined
 * (harness/check-css.mjs rejects them anywhere else). Rationale in DESIGN.md.
 * Contrast (WCAG): every text colour ≥ 4.5:1 on its background, all themes.
 */

@font-face {
  font-family: "Archivo";
  src: url(/assets/fonts/archivo-var.4c98b9d490.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Warm off-white, ink, Cyprus-sea blue for links, a touch of copper. */
  --color-bg: #f7f6f3;
  --color-surface: #ffffff;
  --color-soft: #eceae5;
  --color-ink: #16181d;
  --color-muted: #565b62;
  --color-line: #e0ded8;
  --color-accent: #0b5a9c;
  --color-copper: #9a4b1a;
  --color-selection: #cfe2f5;

  --font-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Type scale (fluid). */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2.2vw, 3.1rem);
  --step-4: clamp(2.5rem, 1.7rem + 3.6vw, 4.6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  --measure: 62ch;
  --width: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 10px;
  --radius-pill: 999px;
  --hairline: 1px;
  --nav-height: 3.75rem;
  /* Shared column lines (desktop): a number column, then three equal columns. */
  --col-num: 4rem;
  --col-gap: var(--space-5);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
}

/* Phones: a narrower number column leaves more room for the text. */
@media (max-width: 39.99rem) {
  :root {
    --col-num: 2.75rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #101317;
    --color-surface: #171b21;
    --color-soft: #1f242b;
    --color-ink: #ececea;
    --color-muted: #a0a6ad;
    --color-line: #2a3038;
    --color-accent: #7db7ee;
    --color-copper: #e2955f;
    --color-selection: #1f4566;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}
