/* Self-hosted web fonts (2 Nov 2026). Replaces the Google Fonts links: the faces now
   come from our own static host, Latin subset only, and the three the first paint
   needs (Plex Sans 400 and 600, Plex Mono 500) are preloaded in each page's <head>.

   font-display: swap is kept. The "... Fallback" faces are local Arial / Courier New /
   Times New Roman scaled to the web face's metrics (size-adjust from the average
   advance width of English text, ascent/descent/line-gap from the web face's hhea), so
   if a face does arrive after first paint the swap changes no word widths or line
   heights. Each font stack lists the fallback right after its web face.

   The static host is a cross-origin S3 bucket: browsers fetch fonts with CORS, so the
   bucket must answer with Access-Control-Allow-Origin for the app's origin or every
   face here is refused (the fallbacks then carry the page). Licences: OFL, in
   static/fonts. */

/* IBM Plex Sans: 400, 500, 600, 700 */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400.77bc02670657.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500.f7016cd446d2.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600.196e3cbc5fee.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-700.c277d7b83f8a.woff2") format("woff2"); }

/* IBM Plex Mono: 400, 500, 600 */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400.79936b18df9f.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500.b1c8a895f5fd.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-600.5a2ce7798732.woff2") format("woff2"); }

/* Source Serif 4 (the loan agreement document): 400, 600, 700, italic 400.
   Not preloaded: only the agreement pages use it, and no request is made for a face
   no element on the page uses. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/source-serif-4-latin-400.95bbd98f2b3c.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/source-serif-4-latin-400-italic.fa10869cc45e.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-600.beb0c8d8bee8.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-serif-4-latin-700.45959eeff97f.woff2") format("woff2"); }

/* Metric-matched fallbacks (Helvetica and Liberation Sans share Arial's widths;
   Liberation Mono shares Courier New's; Liberation Serif shares Times New Roman's). */
@font-face { font-family: "Plex Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 101.02%; ascent-override: 101.46%; descent-override: 27.22%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono");
  size-adjust: 99.98%; ascent-override: 102.52%; descent-override: 27.50%; line-gap-override: 0%; }
@font-face { font-family: "Source Serif Fallback";
  src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif");
  size-adjust: 118.49%; ascent-override: 87.43%; descent-override: 28.27%; line-gap-override: 0%; }
