/* ============================================================================
 * opex-fonts.css — FONTS-SELFHOST-1 (2026-08-30)
 *
 * Replaces the render-blocking Google Fonts stylesheet that index.html used to
 * load. Audit finding T10: every page load sent the viewer's IP to Google
 * (fonts.googleapis.com for the CSS, fonts.gstatic.com for the files) and that
 * transfer appeared in no sharing table. Self-hosting removes the transfer
 * entirely rather than disclosing it, and drops two cross-origin round trips
 * from first paint.
 *
 * THESE ARE VARIABLE FONTS — verified, not assumed.
 * Google's css2 API returned the SAME .woff2 URL for Space Grotesk 400/500/600/
 * 700 and for JetBrains Mono 400/500, which is only correct if one file serves
 * every weight. Confirmed by parsing the WOFF2 table directory: both families
 * carry `fvar` (and `gvar`/`avar`/`STAT`). So each face below is declared once
 * with a WEIGHT RANGE — `font-weight: 400 700` — and the browser instantiates
 * the axis. Splitting these into four fixed-weight @font-face rules pointing at
 * one file would work but would download the same bytes under four names.
 *
 * The ranges are the ones the app actually asked Google for, unchanged:
 * Space Grotesk 400–700, JetBrains Mono 400–500. Widening them would start
 * rendering weights the design was never checked against.
 *
 * SUBSETS: latin + latin-ext only.
 * The Google stylesheet also served vietnamese, greek, cyrillic and cyrillic-ext.
 * None of them is reachable in an FMCG field app in Mumbai — but latin-ext is
 * NOT optional and must never be dropped as "unused": the rupee sign ₹ (U+20B9)
 * falls in its range (U+20AD–20C0), and this app prints ₹ everywhere. Losing it
 * would fall the whole currency column back to a system font. The unicode-range
 * values are copied verbatim from Google's own stylesheet.
 *
 * PRECACHE: `.woff2` matches the PWA globPatterns, so these four files join the
 * app-shell precache (+~84 KB on a ~4.7 MB shell). That is a feature — the app
 * is offline-first and a field user on a patchy connection now gets the real
 * typeface rather than a fallback.
 *
 * Regenerating: re-fetch from Google's css2 API with a modern browser UA (an
 * old UA gets .ttf instead of .woff2), take the latin + latin-ext URLs, and
 * update this file. Fonts are OFL — see public/third-party-notices.txt.
 * ==========================================================================*/

/* ── Space Grotesk (variable, wght 400–700) ──────────────────────────────── */

/* latin-ext — carries ₹ (U+20B9). Load-bearing, not decorative. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── JetBrains Mono (variable, wght 400–500) ─────────────────────────────── */

/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
