/* Roboto, self-hosted — what index.html used to pull from fonts.googleapis.com.
 *
 * Three reasons it moved here, and the first is the one that forced it:
 *
 *   1. The service worker blocked it. service-worker.published.js ends onFetch with
 *      `fetch(event.request)` for anything uncached, so every request the page makes is re-issued
 *      through the Fetch API — which connect-src governs, and style-src/font-src do not. Google
 *      Fonts was named only in the latter two, so the stylesheet was permitted by the document and
 *      then refused by our own service worker, reported as a violation of "the document's Content
 *      Security Policy" for a request the document never made.
 *   2. An installed PWA had no fonts offline. A third-party origin cannot be in the service worker's
 *      asset manifest, so Roboto was the one asset that never got cached and the app fell back to
 *      system fonts the moment it lost the network.
 *   3. Four sources left the CSP — fonts.googleapis.com from style-src and connect-src,
 *      fonts.gstatic.com from font-src and connect-src. The policy is now entirely first-party
 *      except for the API origin in connect-src.
 *
 * ONE FILE PER SUBSET, NOT PER WEIGHT. Roboto v51 is a variable font: Google serves the same woff2
 * for weights 300, 400, 500 and 700 — byte-identical, verified by hash — and the browser instances
 * the weight axis from it. So `font-weight: 300 700` is a *range*, and it covers every weight in
 * between, including any MudBlazor asks for that the old four-weight link did not cover. Adding a
 * weight needs no new file.
 *
 * THE unicode-range LINES ARE LOAD-BEARING, and latin-ext is not optional. Serbian Latin's č ć š ž đ
 * are all in Latin Extended-A (U+0100-017F), which lives in latin-ext and not in latin — drop that
 * file and every diacritic on the page renders from a fallback font at a visibly different weight.
 * The ranges also keep this cheap: a browser downloads a subset only when the page actually contains
 * a character from it, so a page of Latin text never fetches the Cyrillic file.
 *
 * Cyrillic is here because Serbia writes in both scripts and nothing stops a salon from typing a
 * customer's name in Cyrillic. It costs nothing until one does.
 *
 * The ranges are Google's own, copied verbatim from the CSS the browser used to be served. To
 * refresh the files, re-request that CSS with a modern browser User-Agent (an old one is answered
 * with .ttf instead of .woff2) and take the URLs out of it.
 */

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300 700;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/roboto-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300 700;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/roboto-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: 'Roboto';
    font-style: normal;
    font-weight: 300 700;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/roboto-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;
}
