/* Self-hosted webfonts (2026-09-25). Until then these came from
 * fonts.googleapis.com / fonts.gstatic.com, which hands Google every
 * visitor's IP and page URL before any consent choice. Files are the
 * @fontsource-variable 5.3.0 builds of the same OFL-1.1 faces Google serves
 * (licenses alongside). Family names match tailwind.config.mjs and
 * tokens/typography.css, so nothing else changed. */

/* hanken-grotesk-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* hanken-grotesk-vietnamese-wght-normal */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-vietnamese-wght-normal.woff2) format('woff2-variations');
  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;
}

/* hanken-grotesk-latin-ext-wght-normal */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-latin-ext-wght-normal.woff2) format('woff2-variations');
  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;
}

/* hanken-grotesk-latin-wght-normal */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

/* hanken-grotesk-cyrillic-ext-wght-italic */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-cyrillic-ext-wght-italic.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* hanken-grotesk-vietnamese-wght-italic */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-vietnamese-wght-italic.woff2) format('woff2-variations');
  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;
}

/* hanken-grotesk-latin-ext-wght-italic */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-latin-ext-wght-italic.woff2) format('woff2-variations');
  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;
}

/* hanken-grotesk-latin-wght-italic */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(./files/hanken-grotesk-latin-wght-italic.woff2) format('woff2-variations');
  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;
}

/* ---------------------------------------------------------------------------
 * Oswald (2026-10-03): the headline face, per Blake ("an impact font").
 * @fontsource-variable/oswald 5.3.0, OFL-1.1 (OFL-Oswald.txt). Normal only;
 * Oswald has no italic. Chosen over Anton (no Cyrillic) and Sofia Sans
 * (Bulgarian-style Cyrillic, wrong for the ru/uk pages).
 * ------------------------------------------------------------------------- */
/* oswald-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url(./files/oswald-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* oswald-cyrillic-wght-normal */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url(./files/oswald-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* oswald-vietnamese-wght-normal */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url(./files/oswald-vietnamese-wght-normal.woff2) format('woff2-variations');
  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;
}

/* oswald-latin-ext-wght-normal */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url(./files/oswald-latin-ext-wght-normal.woff2) format('woff2-variations');
  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;
}

/* oswald-latin-wght-normal */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url(./files/oswald-latin-wght-normal.woff2) format('woff2-variations');
  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 fallback for Oswald, so a headline painted before the
 * webfont arrives occupies the same width and height and does not reflow when
 * it swaps. Measured 2026-10-03 against Oswald 700: Arial Bold set at 85.15%
 * matches its advance widths; the overrides are Oswald's ascent (1.19em) and
 * descent (0.29em) divided by that factor. --font-display lists this face
 * right after Oswald. */
@font-face {
  font-family: 'Oswald Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold');
  font-weight: 600 700;
  size-adjust: 85.15%;
  ascent-override: 139.75%;
  descent-override: 34.06%;
  line-gap-override: 0%;
}

/* Metric-matched fallbacks for the body faces (2026-10-03). Lighthouse
 * measured CLS 0.141-0.173 on mobile on every page tested, all of it "Web font
 * loaded": the fixed cookie banner (Hanken Grotesk) and the /consult/ card
 * (Hanken + Newsreader) re-wrapped when the webfont swapped in. Helvetica Neue
 * and plain Georgia are not width-matched, so lines broke differently.
 *
 * Measured with fontTools against the woff2 files here, each variable face
 * instanced at the weight shown: size-adjust is the ratio of mean advance
 * widths over site copy (cookie banner, intake notice, language-access line);
 * the overrides are the face's typo ascent/descent (USE_TYPO_METRICS is set)
 * divided by that ratio. The same method gives 85.29% for Oswald above
 * (measured 85.15%), so it agrees to 0.2%. Arial exists on macOS and
 * Windows; where local() does not find it (most Android), these faces are
 * skipped and the Android faces below take over. (The Newsreader / Georgia
 * pair went with Newsreader on 2026-10-07.) */
@font-face {
  font-family: 'Hanken Grotesk Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans');
  font-weight: 100 500;
  size-adjust: 100.24%;
  ascent-override: 99.76%;
  descent-override: 30.23%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Hanken Grotesk Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold');
  font-weight: 600 900;
  size-adjust: 94.11%;
  ascent-override: 106.25%;
  descent-override: 32.20%;
  line-gap-override: 0%;
}
/* Android fallbacks (2026-10-04). Android does not ship Arial, so
 * every face above is skipped there and text fell through to an unadjusted
 * Roboto / Noto Serif: the CLS fix above did nothing on most phones. These are
 * the same idea tuned to Android's system faces, listed second in each stack,
 * so a device with Arial never reaches them.
 *
 * Measured in Chromium: rendered width of ~6,000 characters of site copy
 * (practice, about, blog) in the webfont over the same text in Roboto / Noto
 * Serif (the Google Fonts builds, same design and advances as Android's), and
 * headline text for Oswald. The same browser measurement against Liberation
 * Sans reproduces the Arial faces above to within 1% (100.61 / 95.00 / 84.62
 * against 100.24 / 94.11 / 85.15). Overrides are the webfont's typo
 * ascent/descent divided by size-adjust, as above. The bold faces end with the
 * family name because Android 12+ ships Roboto as one variable file that may
 * answer only to local('Roboto'). */
@font-face {
  font-family: 'Hanken Grotesk Fallback Android';
  src: local('Roboto'), local('Roboto-Regular'), local('Roboto Regular');
  font-weight: 100 500;
  size-adjust: 101.04%;
  ascent-override: 98.97%;
  descent-override: 29.99%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Hanken Grotesk Fallback Android';
  src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto');
  font-weight: 600 900;
  size-adjust: 101.09%;
  ascent-override: 98.92%;
  descent-override: 29.97%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Oswald Fallback Android';
  src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto');
  font-weight: 600 700;
  size-adjust: 90.48%;
  ascent-override: 131.85%;
  descent-override: 31.94%;
  line-gap-override: 0%;
}
