/*
 * Self-hosted Roboto (latin subset, variable font) — replaces the
 * fonts.googleapis.com CDN enqueue for GDPR/privacy + perf (no third-party
 * request, no render-blocking external CSS).
 *
 * Source: Google Fonts Roboto v51 variable woff2, latin subset only. The
 * theme uses weights 300/400/500; the single variable file covers the full
 * 100-900 range, so one @font-face with a weight range serves all of them.
 *
 * The `?v=` on the src is load-bearing: assets/.htaccess serves this
 * directory with `immutable` for a year, so the URL must change when the
 * file does. Bump it when the woff2 is replaced.
 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('roboto-latin-variable.woff2?v=51') 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;
}

/*
 * Metric-matched Arial fallback.
 *
 * `font-display: swap` paints in the fallback face and then repaints in
 * Roboto. Without matched metrics that repaint also RESHAPES the line boxes,
 * so the whole page shifts — the visible part of the "flash". These overrides
 * make Arial occupy the same space as Roboto, so the swap changes letterforms
 * only and layout stays still.
 *
 * Values are measured from the two font files, not estimated:
 *   size-adjust      = Roboto avg advance / Arial avg advance (0.56065/0.57771)
 *   ascent-override  = Roboto hhea.ascent (1900/2048) / size-adjust
 *   descent-override = Roboto hhea.descent (500/2048) / size-adjust
 * Roboto's hhea.lineGap is 0, hence the explicit 0% (the default is `normal`,
 * which would let Arial's own 67-unit gap through).
 *
 * Use by naming it in the stack AFTER Roboto:
 *   font-family: 'Roboto', 'Roboto Fallback', Arial, sans-serif;
 */
@font-face {
  font-family: 'Roboto Fallback';
  font-style: normal;
  font-weight: 100 900;
  src: local('Arial');
  size-adjust: 97.05%;
  ascent-override: 95.60%;
  descent-override: 25.16%;
  line-gap-override: 0%;
}
