/*
 * IBM Plex, self-hosted (design-interfaccia.html §4).
 *
 * Self-hosted is not a preference: the desktop shell (Tauri) runs the same UI
 * with no guarantee of internet, and a bench that loses its typography when
 * the line drops is a bench that looks broken. There is therefore NO reference
 * to a font CDN anywhere in this application, and no `local()` source either —
 * a machine with a differently-versioned IBM Plex installed must still render
 * exactly what CI screenshotted.
 *
 * The faces are the "complete" woff2 builds from the @ibm/plex-* npm packages
 * (Sans 1.1.0, Mono 2.5.0, Serif 2.0.0), copied verbatim into
 * app/assets/fonts/ under the SIL Open Font License 1.1 (IBMPlex-OFL.txt in
 * the same directory). Complete rather than the per-script split subsets on
 * purpose: the Italian copy of this application uses characters that the
 * Latin1 subset does not carry (≥, ✓, arrows, superscript digits all live in
 * the "Pi" subset), and a shell that silently falls back to a system font for
 * a single glyph is worse than 60 kB.
 *
 * Only the faces the design system actually names are shipped. Adding a weight
 * here means adding ~60 kB to every cold load, so it needs a reason in
 * docs/piani/design-interfaccia.html first.
 *
 * The url() values are bare filenames because Propshaft resolves them against
 * the asset load path (app/assets/fonts is a load-path root) and rewrites them
 * to digested paths — see Propshaft::Compiler::CssAssetUrls. Do not turn them
 * into absolute /assets/... paths: that would defeat fingerprinting.
 *
 * font-display: swap — the shell must be readable while 440 kB of fonts land;
 * the design has no layout that depends on the exact metrics.
 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/IBMPlexSans-Regular-90cc55e6.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/IBMPlexSans-Medium-9fb7ea15.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/IBMPlexSans-SemiBold-5326bafa.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/IBMPlexMono-Regular-537ab494.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/IBMPlexMono-Medium-98c318fa.woff2") format("woff2");
}

/* 700 exists for exactly one thing: the letter inside the CLP diamond, which
   is 8px tall and needs every bit of weight it can get (principio-dettaglio
   R9 freezes that geometry, so the weight is frozen with it). */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/IBMPlexMono-Bold-dc3e5105.woff2") format("woff2");
}

/* Serif is page titles and the wordmark only ("una famiglia sola, tre voci"),
   so one weight covers it. */
@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/IBMPlexSerif-SemiBold-aba2b329.woff2") format("woff2");
}
