/* ==============================================================================
   FONTS — the site's two webfonts, for titles only.

   Since 13 October 2026 the identity of the site is the poster of the
   «Enyesque popular» (ADR-034): titles lettered by hand in capitals, like
   a marker on card. Patrick Hand SC is the free font closest to that
   lettering that stays upright and readable at every size (the poster has
   no slant, which rules out Permanent Marker and Caveat Brush): one
   weight, Latin subset, 28 KB of woff2.

   The same afternoon Juan found the bold system stack of his closed list
   of "serious" headings ugly, so those five wear Source Serif 4, a serif
   made for reading on screen (ADR-034, note of the 13th): one weight,
   SemiBold, Latin subset, 20 KB. These two are the only exceptions to
   "system stacks, zero bytes downloaded"; both are served from
   static/fonts like everything else because the CSP only allows font-src
   'self'. Body text stays on the system stack in tokens.css.
   ============================================================================== */

/* font-display: swap shows the title in the system stack straight away
   and repaints it once the file arrives, so a slow connection never waits
   on a font to read the page. The unicode-range is the Latin subset the
   file was cut to (pyftsubset, the same ranges Google Fonts uses for
   "latin"): a character outside it falls back to the system stack instead
   of making the browser fetch a file that cannot draw it. */
@font-face {
  font-family: 'Patrick Hand SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/patrick-hand-sc/patrick-hand-sc-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;
}

/* This sheet is linked right after tokens.css, so this :root wins the tie
   with the one there and the system stack stays only as the fallback. The
   fallback keeps the same order tokens.css has, so a title drawn before
   the font arrives looks exactly like the old site did. */
:root {
  --font-title: 'Patrick Hand SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Source Serif 4 is a variable font upstream (weight and optical size);
   the file here is one static instance cut from it with fonttools, weight
   600 at optical size 20, the "subhead" design that holds up both at the
   hero's 44 px and at the 16 px of the timeline's month markers. 600
   rather than 700: at 1440 px the bold one wraps the hero claim onto three
   lines and its strokes clot next to the sans body, while the semibold
   keeps two lines and the same colour as the body's own bold. Same Latin
   ranges as above. */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/source-serif-4/source-serif-4-latin-600.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;
}

/* What the serious headings show while the file is on its way. Georgia
   Bold, the serif that Mac, iPhone and Windows all have, is about 14 %
   wider than Source Serif 4 SemiBold, so unadjusted it wrapped the hero
   claim onto a third line and the whole page jumped up by one line (35 px
   at 390, 50 px at 1440) when the font arrived. size-adjust shrinks it to
   the same width (measured over three real titles: 838 against 953 px at
   40 px) and the overrides give it Source Serif's own ascent and descent
   (1036 and 335 per 1000), divided by that 88 % because they apply after
   the scaling. Where Georgia is not installed this face is skipped and
   the rest of the stack in tokens.css takes over. */
@font-face {
  font-family: 'Source Serif 4 Fallback';
  font-style: normal;
  font-weight: 600;
  src: local('Georgia Bold'), local('Georgia-Bold');
  size-adjust: 88%;
  ascent-override: 117.7%;
  descent-override: 38.1%;
  line-gap-override: 0%;
}
