/* © 2026 William C. Chesher. All Rights Reserved.
   fonts - glitch's webfonts, SELF-HOSTED (operator, 2026-09-19: "lets host our own fonts" /
   "we already do in teenyverse")

   The same rule the web app keeps in web/src/lib/styles/fonts.css: local woff2, latin subset,
   font-display: swap, and NO request to fonts.googleapis.com. On this service the reason is
   sharper than privacy -- thirty phones on a school access point were fetching a stylesheet
   and four font files from a third party at the start of every lesson, and a room does not
   get to depend on Google's CDN being reachable through the district filter. The glyphs now
   ship in static/fonts/ and load same-origin.

   Faces: Archivo Black (the word "blam"), Barlow (body; 400 and 600 on the phone and the
   projector, 500 and 700 on the teacher surface), JetBrains Mono (data), Montserrat (the
   teacher surface's headings and labels), Poppins (the dive figures on Results only), Anton
   (the Earth & Space skin's display face, fetched only by a room wearing that skin). A face
   is fetched only when a page uses it, so the phone never pays for Montserrat or Poppins.
   Latin subset only: the room's copy is English, and latin-ext would double the bytes for
   accents nobody types into a stem. Licences: static/fonts/LICENSES.md. */

@font-face { font-family: "Archivo Black"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/archivo-black-400-n-latin.woff2) format("woff2"); }

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/barlow-400-n-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/barlow-500-n-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/barlow-600-n-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/barlow-700-n-latin.woff2) format("woff2"); }

/* variable: one file carries 100-800 */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-var-n-latin.woff2) format("woff2"); }

/* variable: one file carries 100-900 */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/montserrat-var-n-latin.woff2) format("woff2"); }

/* the Earth & Space skin's display face (themes.py "earthspace") */
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/anton-400-n-latin.woff2) format("woff2"); }

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/poppins-400-latin.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/poppins-600-latin.woff2) format("woff2"); }

/* NO VISIBLE FONT SWAP: the fix sfhsbta.com landed after getting it wrong twice (its fonts.css
   carries the history). swap alone re-lays the page out when a face arrives; optional alone draws a
   whole page view in the fallback when a face misses its window. So: swap, the body face and the
   room's display face are preloaded in the head (app.py page()), and the fallback is these
   metric-matched faces, which put a line of Arial in the SAME box the webfont will occupy, so the
   swap moves nothing. Without them the fallback was system-ui -- San Francisco on a Mac, Segoe on
   Windows, Roboto on a phone -- a different width on every device in the room.
   size-adjust is matched on advance width over a representative sentence (x-height matching still
   rewraps) and the ascent/descent overrides are divided by it. The regular Barlow and Archivo Black
   faces are sfhsbta.com's browser-calibrated values (the files are byte-identical); bold is matched
   against Arial Bold, since the phone and the projector set most of their words at 700-800 and a
   regular face synthesised to bold runs wide. Liberation Sans is Arial's metric clone on Linux and
   Chromebooks: naming only Arial binds to nothing there and the adjustment silently does nothing.
   No mono fallback on purpose: ui-monospace already sits within half a percent of JetBrains Mono. */
@font-face { font-family: "Barlow Fallback"; font-weight: 100 500; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 94.20%; ascent-override: 106.15%; descent-override: 21.23%; line-gap-override: 0%; }
@font-face { font-family: "Barlow Fallback"; font-weight: 600 900; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 92.50%; ascent-override: 108.11%; descent-override: 21.62%; line-gap-override: 0%; }
@font-face { font-family: "Archivo Black Fallback"; font-weight: 100 500; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 122.26%; ascent-override: 71.82%; descent-override: 17.18%; line-gap-override: 0%; }
@font-face { font-family: "Archivo Black Fallback"; font-weight: 600 900; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 115.77%; ascent-override: 75.84%; descent-override: 18.14%; line-gap-override: 0%; }
@font-face { font-family: "Anton Fallback"; font-weight: 100 900; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 90.21%; ascent-override: 130.39%; descent-override: 36.48%; line-gap-override: 0%; }
@font-face { font-family: "Poppins Fallback"; font-weight: 100 500; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 110.56%; ascent-override: 94.97%; descent-override: 31.66%; line-gap-override: 9.05%; }
@font-face { font-family: "Poppins Fallback"; font-weight: 600 900; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 105.62%; ascent-override: 99.42%; descent-override: 33.14%; line-gap-override: 9.47%; }
