/*
 * Self-hosted web fonts. Loaded by a same-origin <link> in index.html.
 *
 * WHY THIS FILE EXISTS. Until 2026-09-09 index.html carried two
 * `preconnect`s to the two Google Fonts hosts plus a Google Fonts
 * stylesheet (a `preload`/onload swap and a <noscript> copy). A
 * `preconnect` does DNS + TCP + TLS on every page load — it hands the
 * visitor's IP and the SNI hostname to a third party before any policy can
 * intervene, and it emits no request event a Playwright recorder would see.
 * The deployed CSP (`public/_headers`) is `style-src 'self' 'unsafe-inline'`
 * and `font-src 'self' data:`, so on the hosted build the Google stylesheet
 * and its font files were blocked ANYWAY: the page shipped the connection
 * cost with none of the typography. Self-hosting removes the third party and
 * makes the three families actually render under that CSP.
 *
 * PROVENANCE AND BYTES: see PROVENANCE.md beside this file. All three
 * families are SIL OFL 1.1; the licence texts are committed here as
 * OFL-Fraunces.txt, OFL-Inter.txt and OFL-JetBrainsMono.txt, which the OFL
 * requires to travel with the font binaries.
 *
 * The two Google host names are deliberately not spelled out in this file
 * either: it ships to dist/ verbatim, and `src/fontSelfHosting.test.ts`
 * scans built output with a blunt whole-file string search.
 *
 * The original variable Fraunces faces are retained unchanged, although
 * current body text and headings use Inter. Inter remains the upstream
 * VARIABLE woff2 file, with a weight range for the UI's different weights.
 * Historical Fraunces axis measurements remain in PROVENANCE.md; they do
 * not describe the current heading design.
 *
 * JetBrains Mono is the exception, deliberately: its only axis is `wght`,
 * the replaced request pinned three discrete weights (400/500/600), and the
 * upstream release ships no variable woff2 — only a variable .ttf that we
 * would have to re-compress ourselves. Three official static woff2 files at
 * exactly those weights lose nothing and keep every shipped byte identical
 * to an upstream release artifact.
 *
 * The `src` descriptors say plain `format('woff2')`, not the legacy
 * `format('woff2-variations')`: the variable behaviour comes from the file
 * plus the `font-weight` RANGE, and every browser that supports variable
 * fonts at all supports it that way. That the axes really survive was
 * MEASURED, not assumed: see PROVENANCE.md, "Axis liveness".
 *
 * `font-display: swap` keeps first paint on the system fallback stacks in
 * `src/style.css`, which is the behaviour the old async-swap comment in
 * index.html was protecting.
 */

/* Fraunces 1.000 — display serif. Axes: opsz 9..144, wght 100..900,
   SOFT 0..100, WONK 0..1. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Fraunces-Variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Fraunces-Italic-Variable.woff2') format('woff2');
}

/* Inter 4.1 — UI body face. Axes: wght 100..900, opsz 14..32.
   No italic face is shipped: the replaced Google request asked for
   `Inter:wght@400;500;600;700` with no `ital` axis, so italic body text was
   already being synthesised by the browser and still is. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}

/* JetBrains Mono 2.304 — code and wordmark face, at the three weights the
   replaced request pinned. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
}
