/* Self-hosted Inter + Space Grotesk (latin). Google's stylesheet was being swallowed and DROPPED by
   LiteSpeed CSS optimization (the optimized bundle had zero face rules), so logged-out visitors silently
   got system fonts. Self-hosting makes this unstrippable and removes two third-party preconnects.

   2026-09-15: collapsed from SEVEN face rules to two. The seven files on disk are only TWO unique files:
   inter-400/500/600/700 are byte-identical (md5 260c81a4759b), and space-grotesk-500/600/700 are
   byte-identical (md5 87c506d88b9f). They are VARIABLE fonts, so a single file serves every weight, which
   is why rendered widths still differ per weight. The old CSS made every browser download the same Inter
   file four times and the same Space Grotesk file three times: 259,888 bytes where 70,544 does the job,
   and that was 75% of a typical page's transferred weight. The six duplicate files are deliberately left
   on disk so any cached copy of the old stylesheet still resolves. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://calculateyourgrade.com/wp-content/uploads/gradelab/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://calculateyourgrade.com/wp-content/uploads/gradelab/fonts/space-grotesk-500.woff2') format('woff2');
}

/* 2.38.24: metric-matched fallbacks. With font-display:swap the page first paints in a fallback font and repaints
   when Inter / Space Grotesk arrive. The old fallback (system-ui) set text at a different width, so the swap changed
   the size of the intro paragraph and Chrome logged a second, later "largest paint" (mobile lab LCP 2.6 s). These
   faces are Arial and its metric twins (Liberation Sans, Arimo) scaled to the real font files' average advance and
   vertical metrics (fontTools, a representative English sample), so text keeps its line breaks through the swap.
   Regular faces serve weights up to 550, bold faces 551 and up. Where none of these fonts is installed the rule is
   skipped and the stack falls through to system-ui exactly as before. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
  font-weight: 100 550;
  size-adjust: 105.81%; ascent-override: 91.56%; descent-override: 22.80%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold'), local('Arimo-Bold');
  font-weight: 551 900;
  size-adjust: 100.92%; ascent-override: 95.99%; descent-override: 23.90%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
  font-weight: 100 550;
  size-adjust: 107.75%; ascent-override: 91.33%; descent-override: 27.10%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold'), local('Arimo-Bold');
  font-weight: 551 900;
  size-adjust: 100.60%; ascent-override: 97.82%; descent-override: 29.03%; line-gap-override: 0%;
}
/* Android has no Arial: the same idea against Roboto, used only when the Arial-based faces above find no local font. */
@font-face {
  font-family: 'Inter Fallback R';
  src: local('Roboto'), local('Roboto-Regular');
  font-weight: 100 550;
  size-adjust: 106.70%; ascent-override: 90.79%; descent-override: 22.61%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback R';
  src: local('Roboto Bold'), local('Roboto-Bold');
  font-weight: 551 900;
  size-adjust: 107.76%; ascent-override: 89.90%; descent-override: 22.38%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Space Grotesk Fallback R';
  src: local('Roboto'), local('Roboto-Regular');
  font-weight: 100 550;
  size-adjust: 108.66%; ascent-override: 90.56%; descent-override: 26.87%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Space Grotesk Fallback R';
  src: local('Roboto Bold'), local('Roboto-Bold');
  font-weight: 551 900;
  size-adjust: 107.41%; ascent-override: 91.61%; descent-override: 27.19%; line-gap-override: 0%;
}
