/* Self-hosted fonts (2026-10-28). Montserrat is one variable file for every weight, Latin only; Lora is
   the 400 italic the pages use. Both are the Fontsource builds, unmodified (SIL Open Font License 1.1,
   see assets/fonts/OFL-*.txt). Caveat (2026-10-31) is the back-cover letter's handwriting on the
   thank-you page: the variable file the story engine prints the letter with (googlefonts/caveat 2.000,
   weights 400 to 700), cut to the same Latin range with fontTools and saved as WOFF (zlib; no WOFF2
   encoder was at hand), downloaded only where a letter card shows. A file's name carries the first 8 hex
   of its SHA-256, so the files can be cached for a year: a new file gets a new name, and this sheet and
   the pages' preload line change.

   While a font downloads, text shows in a local font resized to take the same room (size-adjust and the
   ascent, descent and line gap overrides), so the swap does not move the page. Arial on iPhone, Mac and
   Windows; Roboto on Android; Georgia and Noto Serif for Lora. Values: the Capsize metrics
   (@capsizecss/metrics 4.3.0), computed as Next.js does: size-adjust is the ratio of the average Latin
   character widths, the overrides are the font's own metrics divided by it. Bold text gets the bold
   local face with its own values. tests/foundations/images/fonts.test.mjs recomputes every number.

   Font stacks to use:
     'Montserrat', 'Montserrat Fallback', 'Montserrat Fallback Roboto', system-ui, sans-serif
     'Lora', 'Lora Fallback', 'Lora Fallback Noto', Georgia, serif */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin-wght.06b16db7.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;
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/lora-latin-400-italic.723cc14f.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;
}

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/caveat-latin-wght.3e0029a6.woff') format('woff');
  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;
}

/* Montserrat while it loads: Arial (iPhone, Mac, Windows) */
@font-face {
  font-family: 'Montserrat Fallback';
  font-style: normal;
  font-weight: 100 549;
  src: local('Arial'), local('ArialMT');
  size-adjust: 112.83%;
  ascent-override: 85.79%;
  descent-override: 22.25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Montserrat Fallback';
  font-style: normal;
  font-weight: 550 900;
  src: local('Arial Bold'), local('Arial-BoldMT');
  size-adjust: 110.42%;
  ascent-override: 87.66%;
  descent-override: 22.73%;
  line-gap-override: 0%;
}

/* Montserrat while it loads: Roboto (Android, which has no Arial) */
@font-face {
  font-family: 'Montserrat Fallback Roboto';
  font-style: normal;
  font-weight: 100 549;
  src: local('Roboto'), local('Roboto-Regular'), local('Roboto Regular');
  size-adjust: 113.08%;
  ascent-override: 85.60%;
  descent-override: 22.20%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Montserrat Fallback Roboto';
  font-style: normal;
  font-weight: 550 900;
  src: local('Roboto Bold'), local('Roboto-Bold');
  size-adjust: 117.22%;
  ascent-override: 82.58%;
  descent-override: 21.41%;
  line-gap-override: 0%;
}

/* Lora italic while it loads: Georgia italic, then Noto Serif italic (Android) */
@font-face {
  font-family: 'Lora Fallback';
  font-style: italic;
  font-weight: 400;
  src: local('Georgia Italic'), local('Georgia-Italic');
  size-adjust: 100.09%;
  ascent-override: 100.51%;
  descent-override: 27.38%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Lora Fallback Noto';
  font-style: italic;
  font-weight: 400;
  src: local('Noto Serif Italic'), local('NotoSerif-Italic');
  size-adjust: 97.01%;
  ascent-override: 103.70%;
  descent-override: 28.24%;
  line-gap-override: 0%;
}
