/*
 * Self-hosted webfonts — replaces the render-blocking fonts.googleapis.com
 * stylesheet, which cost ~1230ms: the browser had to resolve and connect to
 * googleapis.com, parse the CSS it returned, and only then discover the font
 * files on a second host, gstatic.com. Serving both from this origin collapses
 * that chain and drops two third-party connections.
 *
 * DM Sans and JetBrains Mono are VARIABLE fonts: one file per subset covers
 * every weight, which is why they carry a `font-weight` range rather than one
 * face per weight. Asking the CSS2 API for `wght@400;500;600;700` returns four
 * @font-face blocks all pointing at that same file — declaring them separately
 * would make a page using 400 and 700 fetch identical bytes under two URLs.
 * Instrument Serif is static and ships weight 400 only; Google serves no other,
 * so blocks that set 500/600 on --font-heading get a synthesised bold. That was
 * equally true of the old Google stylesheet — nothing regressed here.
 *
 * The unicode-range declarations keep this cheap: a subset is fetched only when
 * the page actually uses a character from it, so a purely English page never
 * downloads latin-ext. Both ranges are identical across the three families,
 * exactly as Google serves them.
 *
 * font-display: swap matches the previous `&display=swap` — text paints
 * immediately in the fallback and re-renders once the webfont arrives.
 *
 * dm-sans-latin.woff2 and instrument-serif-latin.woff2 are additionally
 * preloaded by Theme::preloadResources(). Renaming either means updating that
 * list too, or the preload silently 404s.
 *
 * To regenerate: re-fetch the URL below with a modern browser User-Agent (an
 * old one yields woff instead of woff2), drop the woff2 files in ../fonts/ and
 * rewrite the blocks. Keep only the latin and latin-ext subsets.
 *
 *   https://fonts.googleapis.com/css2?family=DM+Sans:wght@100..1000&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@100..800&display=swap
 */

/* DM Sans — body copy (--font-primary), variable 100-1000 */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(../fonts/dm-sans-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; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(../fonts/dm-sans-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; }

/* Instrument Serif — headings (--font-heading), static 400 + italic */
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-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; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-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; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-italic-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; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-italic-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; }

/* JetBrains Mono — code and metadata (--font-mono), variable 100-800 */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; 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; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; 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; }
