/* Design tokens: the single source of colour, type and space (docs/design.md).
   AGENTS.md rule 12: no colour literal, font stack or spacing scale exists anywhere
   else. tests/test_theme.py reads this file, computes the contrast of every pairing
   the pages render, and checks the colour-vision separation of the sentiment trio. */

/* One family, self-hosted (static/fonts/README.md). The Latin Extended subset only
   downloads when a page contains a character from it (scraped names, diacritics). */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched stand-in while the font loads, so the swap does not move the layout
   (measured against arial.ttf; static/fonts/README.md says how to recompute). */
@font-face {
  font-family: "Schibsted Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 103.95%;
  ascent-override: 93.94%;
  descent-override: 24.8%;
  line-gap-override: 0%;
}

:root {
  /* Colour. OKLCH is the design source (docs/design.md §3); hex is what ships, because
     older Android WebViews do not read oklch(). `mark` only ever sits behind text. */
  --ground: #F5F4F1;
  --sheet: #FFFFFF;
  --ink: #14171D;
  --ink-2: #43484F;
  --ink-3: #50565D;
  --rule: #D5D4D0;
  --mark: #FFEA54;
  --pos: #09A02B;
  --neg: #B8300A;
  --neu: #868686;
  /* The word cloud's colours: they tell words apart and mean nothing (the sixth is --ink). */
  --cw-1: #1F5FBF;
  --cw-2: #0E7490;
  --cw-3: #6D4AC4;
  --cw-4: #B0237A;
  --cw-5: #9A5B00;

  --font: "Schibsted Grotesk", "Schibsted Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Space: a 4 px unit (docs/design.md §5). */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s6: 24px;
  --s8: 32px;
  --s12: 48px;
  --s16: 64px;
  --s24: 96px;
  --s32: 128px;

  --pad: clamp(16px, 4vw, 48px);
  --wrap: 1152px;
  --gutter: 24px;
  --measure: 34em;
  --lead-measure: 30em;
  --control: 48px;
  --sidebar: 264px;
}

/* A wide screen gets a wider column, not wider text: the measure stays where it is. */
@media (min-width: 1500px) {
  :root { --wrap: 1320px; }
}
