/* IBM Plex, served from this domain instead of fetched from Google.
 *
 * The theme used to enqueue a stylesheet from fonts.googleapis.com, which sends
 * every visitor's IP address to Google before they have agreed to anything - the
 * precise practice a German court ruled against in 2022, and an odd look for a
 * company that sells on keeping data in the EU. These are the same SIL OFL
 * typefaces the product embeds, subsetted to Latin + Latin Extended so
 * Hungarian, Polish, Czech and Turkish names still render. OFL.txt travels with
 * them, as the license requires.
 *
 * Same typefaces the app ships (program/frontend/public/fonts/); the app keeps
 * whole files, the site cuts them up. Keep the MASTERS in step, not these.
 *
 * font-display: swap - text appears immediately in the fallback and reflows once
 * the file lands, which beats a blank screen on a cold start.
 *
 * WHY EVERY FACE CARRIES A unicode-range
 * A cold visit used to pull 123 KB of typefaces, 60% of the whole page, and
 * most of those bytes were never drawn. unicode-range is how a browser is told
 * what is inside a file BEFORE fetching it: it fetches a face only once a
 * character on the page falls in its range. So the split costs nothing when the
 * glyphs are not needed and loses nothing when they are.
 *
 *   -ext   Latin Extended-A, the accents in Hungarian, Polish, Czech and
 *          Turkish names. Never fetched on an English page; fetched the moment
 *          somebody's name needs it, which is the promise we did not want to
 *          trade away.
 *   700    exists for one word: "Aptus", the wordmark, hard-coded in three
 *          templates. Its range is the five letters of that word. Any other
 *          bold text falls through to a synthesised bold of the 600 weight
 *          rather than to a missing glyph - visible if you look for it, and
 *          never broken.
 *   mono 600  is the numbered badges and the ~ verdicts in the animations.
 *          Printable ASCII minus the lowercase letters, which is where a
 *          monospace face keeps most of its weight, plus plus-minus and times.
 *
 * One glyph is worth knowing about: the not-equals sign in the reconciliation
 * animation is NOT in these masters and never was, so it has always come from
 * whatever fallback the visitor's machine offers. Widening a range here will
 * not pull it in; only a different master would.
 *
 * The ranges below are the source of truth: tools/build-assets.mjs reads them
 * out of this file and subsets each master to exactly what its face declares,
 * so a range edited here changes the shipped file on the next build.
 */

/* ---- IBM Plex Sans ------------------------------------------------------ */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('plex-sans-400.woff2?v=2c9117c5') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('plex-sans-400-ext.woff2?v=70c53d70') format('woff2');
  unicode-range: U+0100-017F;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('plex-sans-500.woff2?v=87c45500') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('plex-sans-500-ext.woff2?v=ccc093de') format('woff2');
  unicode-range: U+0100-017F;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('plex-sans-600.woff2?v=0926505c') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('plex-sans-600-ext.woff2?v=8f392c46') format('woff2');
  unicode-range: U+0100-017F;
}

/* The wordmark, and nothing else. See the note at the top. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('plex-sans-700.woff2?v=186ba78e') format('woff2');
  unicode-range: U+0041, U+0070, U+0073, U+0074, U+0075;
}

/* ---- IBM Plex Mono ------------------------------------------------------ */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('plex-mono-400.woff2?v=40876938') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('plex-mono-400-ext.woff2?v=c648f27d') format('woff2');
  unicode-range: U+0100-017F;
}

/* Declared for completeness; no rule on the site asks for a medium monospace,
   so no visitor has ever fetched it. Kept at the full Latin range because the
   day something does ask for it, it should just work. */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('plex-mono-500.woff2?v=3042d546') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('plex-mono-500-ext.woff2?v=d6b8fb05') format('woff2');
  unicode-range: U+0100-017F;
}

/* Badges and verdicts: digits, capitals, arithmetic. See the note at the top. */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('plex-mono-600.woff2?v=06150e99') format('woff2');
  unicode-range: U+0020-0060, U+007B-007E, U+00B1, U+00D7;
}
