/* ==========================================================================
   JetBrains Mono — code monospace (pair A)
   Variable WOFF2 (wght axis only), latin, roman only — italic is intentionally
   not loaded since the syntax-tinting scheme never requests it; doing so
   would force the browser to synthesise an oblique.
   ========================================================================== */

/* Real-face metric overrides pinned to JetBrains Mono's own hhea (ascent
   1020, descent 300, line-gap 0, UPM 1000). Mono fonts don't drift today
   (natural 1.32em strut sits below our 1.6em line-height) but the same
   defensive move that fixed the Safari serif drift is worth carrying here
   for parity and forward-safety. */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
    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;
    ascent-override: 102%;
    descent-override: 30%;
    line-gap-override: 0%;
}

/* Metric-matched fallback face. Chains SF Mono → Menlo → Courier so the
   override binds to whichever system mono is present, instead of falling
   through the stack to an un-overridden SF Mono on systems missing Courier.
   Override values are tuned to Courier (fontaine's bundled metrics table);
   SF Mono and Menlo are close enough that the residual layout shift is sub-
   pixel at body size. Regenerate with `npm run metrics` in scripts/. */
@font-face {
    font-family: 'JetBrains Mono Fallback';
    src: local('SF Mono'), local('Menlo'), local('Courier');
    size-adjust: 100%;
    ascent-override: 102%;
    descent-override: 30%;
    line-gap-override: 0%;
}

/* SF Mono / Consolas no longer needed in this stack — the Fallback face
   above already binds to SF Mono via local(). */
:root {
    --font-mono: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace;
}

.simulate-fout {
    --font-mono: 'JetBrains Mono Fallback', 'Courier New', monospace;
}
