/* ============================================================================
   ROGUE AI — WEBFONT DELIVERY
   TDR-111 conformant: self-hosted OFL variable fonts, woff2 only, explicit
   font-display, metric-adjusted fallbacks. No third-party CDN in the export.

   The export does not depend on fonts.googleapis.com. If the woff2 files under
   assets/fonts/ are absent, the metric-adjusted fallback faces below take over
   and the layout does not reflow — it degrades to the system stack at the same
   measure. See FONTS-README.md for the exact Fontsource files to drop in and
   the recorded licences.

   Load order:  fonts.css  ->  tokens.css  ->  components.css
   ============================================================================ */

@layer tokens {

/* -------------------------------------------------------- Inter, variable -- */
/* Inter — SIL Open Font License 1.1. Subset: latin + latin-ext.
   Variable weight axis 100–900; the system uses 400/500/600/700. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-variable.woff2") format("woff2-variations"),
       url("../assets/fonts/inter-latin-variable.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;
}

/* ------------------------------------------------ JetBrains Mono, variable -- */
/* JetBrains Mono — SIL Open Font License 1.1. Subset: latin.
   Used for code, identifiers, reference numbers and provenance lines. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-latin-variable.woff2") format("woff2-variations"),
       url("../assets/fonts/jetbrains-mono-latin-variable.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;
}

/* ------------------------------------------------- metric-adjusted fallbacks -
   Provenance: the four override values below are the published Fontsource /
   next-font metric-override figures for these two families, NOT figures
   measured in this project. They are here so a missing woff2 does not reflow
   the page. Verify with a reflow test before rollout: render a 60-character
   line at --text-doc-body with the woff2 blocked, and confirm the line box
   height and the line-break position are unchanged.

   This is the one axis in this system carrying values we did not compute
   ourselves. It is recorded in review/DEVIATIONS.md as D-06 rather than
   presented as measured.                                                     */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
  size-adjust: 107%;
}
@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Courier New");
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
  size-adjust: 96%;
}

/* --------------------------------------------------------------- reference --
   Preload only the face that renders the LCP element, and only with
   crossorigin. Put this in the document head, not in CSS:

   <link rel="preload" href="assets/fonts/inter-latin-variable.woff2"
         as="font" type="font/woff2" crossorigin>

   Do NOT preload JetBrains Mono: it never carries an LCP element in this
   system — it is used for captions, code and identifiers.                    */

} /* @layer tokens */
