/*
 * The two families, served from our own host.
 *
 * Until this file the page fetched Newsreader and DM Mono render-blocking from
 * fonts.googleapis.com, which put a third-party origin on the critical path of every
 * first paint and would have forced fonts.googleapis.com and fonts.gstatic.com into the
 * Content-Security-Policy that PR 9 is going to write. The argument is the one
 * scripts/vendor.js makes about the OCR libraries: nothing the page loads should come
 * from anywhere but us.
 *
 * What ships, and what deliberately does not:
 *
 * - Newsreader as ONE file per subset. It is a wght-variable font (the woff2 carries
 *   fvar/gvar/avar/HVAR/STAT), and Google serves the identical file for 400, 500 and
 *   600, so a single @font-face with `font-weight: 400 500` covers every weight the app
 *   actually asks for. index.html used to request the `opsz` axis as well; nothing in
 *   public/css sets font-optical-sizing or font-variation-settings, and asking for that
 *   axis more than doubles the latin file (132,000 B against 58,084 B), so it is gone.
 * - Newsreader italic is not here. There is no font-style declaration anywhere in
 *   public/css and no italic in public/js — the prototype italicised the ❦, the shipped
 *   wordmark does not — so the 24,340 B italic file would be downloaded to be unused.
 * - Weight 600 is not here either. The only font-weight:600 rules are .btn and .fb-btn,
 *   and neither sets a font-family, so both take --font-ui (the system stack).
 * - latin and latin-ext, no vietnamese. Scanning the name, producer, region and country
 *   of all 55,521 catalog wines: 16 rows need a latin-ext character ("Sisi Yellow Muscat
 *   Stajerska", "Gasper Salpa White"), none needs vietnamese, and none falls outside the
 *   two. unicode-range means the latin-ext files are fetched only when one of those 16
 *   is on screen, so the typical page load is the three latin files: 87,892 B of the
 *   143,304 B committed.
 *
 * `font-display: swap` everywhere: the fallback stacks in tokens.css (Georgia for the
 * display face, ui-monospace for the mono) are close enough in metrics that showing text
 * immediately beats holding a blank paragraph for a font that is already on the disk of
 * anyone who has visited before.
 *
 * The ❦ (U+2766) in the wordmark is in no subset of either family and never was; it
 * renders from a system fallback here exactly as it did from Google's files.
 *
 * The files are Google's own unmodified builds. SIL OFL 1.1 asks that the licence travel
 * with them: public/fonts/OFL-newsreader.txt and public/fonts/OFL-dmmono.txt, copied from
 * the iOS client, which has shipped the same two families beside the same two texts.
 */

/* ---- Newsreader — the display face, variable across the weights we use ---- */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-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: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-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;
}

/* ---- DM Mono — two static files, because this family is not variable ------ */

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-mono-400-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 Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-mono-400-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: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-mono-500-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 Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-mono-500-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;
}
