/* VECTOR: the two passport families, served from this origin.
 *
 * They used to arrive from a CDN stylesheet under `font-display: swap`, which
 * re-laid every line of the panel the moment they landed. Two things fix that
 * and both have to be here:
 *
 *   font-display: optional  the browser gets about 100ms to have the file; past
 *                           that it keeps the fallback for this page view and
 *                           never swaps mid-read. No late reflow is possible.
 *   the fallback faces      an unadjusted fallback would make that page view a
 *                           different width and a different line height. Each
 *                           one below is scaled to the real metrics of the
 *                           family it stands in for, so the two read the same.
 *
 * The files are cached for a year and immutable, because `optional` only ever
 * uses a font that is already on disk. The name carries family, subset and
 * weight and is the cache key: replacing a subset means a new name, never the
 * same name with new bytes.
 * Weight 400 only, as the CDN shipped: 500 and 600 stay synthesised, exactly
 * what every screen renders today.
 */

/* ---------- Space Grotesk ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/space-grotesk-latin-400.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: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/space-grotesk-latin-ext-400.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: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/space-grotesk-vietnamese-400.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* ---------- IBM Plex Mono ---------- */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/ibm-plex-mono-latin-400.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/ibm-plex-mono-latin-ext-400.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/ibm-plex-mono-vietnamese-400.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/ibm-plex-mono-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/ibm-plex-mono-cyrillic-ext-400.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---------- the metric-matched stand-ins ----------
 *
 * Numbers, and where each one comes from. Space Grotesk and IBM Plex Mono were
 * measured from the files in /assets/fonts: 1000 units to the em, ascent 984
 * and descent 292 for the first, 1025 and 275 for the second, line gap zero in
 * both. Average character width is the advance of each letter weighted by how
 * often English uses it: 0.49071 em for Space Grotesk, 0.60000 em for the mono.
 * The anchors are the published metrics of the system faces: Arial 913 units of
 * 2048 (0.44580 em), Courier New 1229 of 2048 (0.60010 em).
 *
 *   size-adjust       = the family's average width / the anchor's
 *   ascent-override   = the family's ascent, divided by that size-adjust
 *   descent-override  = the same for its descent
 *
 * The mono pair lands at 99.98%, which is the check on the method: two faces
 * that are both exactly six tenths of an em wide should need no adjustment.
 */
@font-face {
  font-family: 'Space Grotesk Fallback';
  /* Roboto stands in on Android, where no Arial exists; it is within two units
     of Arial's average width, so it rides the same numbers. */
  src: local('Arial'), local('Helvetica'), local('Roboto');
  size-adjust: 110.07%;
  ascent-override: 89.39%;
  descent-override: 26.53%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'IBM Plex Mono Fallback';
  src: local('Courier New'), local('DejaVu Sans Mono');
  size-adjust: 99.98%;
  ascent-override: 102.52%;
  descent-override: 27.50%;
  line-gap-override: 0%;
}
