/* ============================================================
   Self-hosted fonts — F-008
   Real families: Newsreader (variable weight, serif), DM Sans (sans),
   DM Mono (mono). All latin-subset woff2, OFL-licensed, served same-origin
   from /assets/fonts/ (no fonts.googleapis.com / fonts.gstatic.com request).
   Acquired via Fontsource (see package.json devDependencies); the woff2
   files themselves are committed under src/assets/fonts/.
   ============================================================ */

/* --- Newsreader: variable weight axis (200–800), roman + italic --- */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
}

/* --- DM Sans: 400 / 500 --- */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-500-normal.woff2") format("woff2");
}

/* --- DM Mono: 400 / 500 --- */
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-latin-500-normal.woff2") format("woff2");
}

/* ============================================================
   Metric-tuned fallback faces — minimize layout shift during swap.
   Overrides computed with the fontaine/next-font formula from Capsize
   metrics: size-adjust = (web.xWidthAvg/web.uem) / (fallback.xWidthAvg/uem);
   ascent/descent/line-gap overrides normalized by (web.uem * size-adjust).
   Applied to serif (headings/editorial) and sans (body) — the type where
   reflow actually matters. Mono is small/inline; it keeps its system stack.
   ============================================================ */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 96.12%;
  ascent-override: 76.47%;
  descent-override: 27.57%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "DM Sans Fallback";
  src: local("Arial");
  size-adjust: 104.53%;
  ascent-override: 94.90%;
  descent-override: 29.66%;
  line-gap-override: 0%;
}
