/* Self-hosted webfonts.
 *
 * Why this file exists:
 *  - Pages used to pull Inter + Material Symbols from fonts.googleapis.com.
 *    That cross-origin round-trip blocked first paint on slow networks, and
 *    because Material Symbols is a ligature font served with font-display:swap,
 *    the icon *names* ("emoji_events", "arrow_forward", "lock") painted as
 *    ordinary text first — the garbled, mis-aligned content seen while a page
 *    was still loading.
 *  - Both fonts are now served from this origin. The icon font is subsetted to
 *    the icon names the templates actually use (see scripts/build_icon_subset.py),
 *    so it is ~15 KB instead of ~3.8 MB, and font-display:block means a blank
 *    glyph is shown instead of a word while it loads.
 *  - A full-icon fallback family is declared second in the stack: if a future
 *    template uses an icon that is not in the subset, the glyph still resolves
 *    (only that page pays for the large file).
 */

/* Inter — variable 100..900 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-var.woff2') format('woff2');
}

/* Material Symbols — subsetted to the icons in use */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('/static/fonts/material-symbols-subset.woff2') format('woff2');
}

/* Material Symbols — complete set, only fetched when a glyph is missing above */
@font-face {
  font-family: 'Material Symbols Outlined Full';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('/static/fonts/material-symbols-outlined.woff2') format('woff2');
}

/* Canonical icon class rules. Declared early in <head> so page-level overrides
   still win; without them the ligature names render as text on any page whose
   template forgets to set the family itself. */
.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp {
  font-family: 'Material Symbols Outlined', 'Material Symbols Outlined Full', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}
