/*
 * Self-hosted webfonts.
 *
 * These were six families in one render-blocking request to fonts.googleapis.com, which then
 * fetched the files from a second origin, fonts.gstatic.com — two connections to warm and two
 * round trips before any text could take its real shape. Same-origin removes both, and it is
 * what makes preloading possible at all: the file URLs Google serves are generated per
 * user-agent, so there was nothing stable to point a preload at.
 *
 * Latin subsets only, matching what the css2 request already resolved to for these locales.
 *
 * font-display: swap everywhere, deliberately — the same value the Google request carried.
 * Text in a fallback face is readable; text held invisible is not. The one place that reasoning
 * inverts is the icon font at the foot of this file, which uses display: block because its
 * fallback renders ligature names as words.
 *
 * Files come from @fontsource (jsDelivr), which repackages the Google Fonts originals. All six
 * families are SIL Open Font License.
 */

@font-face {
	font-family: 'Nunito';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/fonts/nunito-latin-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Nunito';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/assets/fonts/nunito-latin-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Nunito';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/assets/fonts/nunito-latin-700.woff2') format('woff2');
}

@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/fonts/source-sans-3-latin-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/assets/fonts/source-sans-3-latin-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/assets/fonts/source-sans-3-latin-700.woff2') format('woff2');
}

@font-face {
	font-family: 'DM Serif Display';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/fonts/dm-serif-display-latin-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/fonts/cormorant-garamond-latin-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/assets/fonts/cormorant-garamond-latin-500.woff2') format('woff2');
}

@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/assets/fonts/cormorant-garamond-latin-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/fonts/instrument-sans-latin-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/assets/fonts/instrument-sans-latin-500.woff2') format('woff2');
}

@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/assets/fonts/instrument-sans-latin-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/assets/fonts/instrument-sans-latin-700.woff2') format('woff2');
}

@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/fonts/jetbrains-mono-latin-400.woff2') format('woff2');
}

@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/assets/fonts/jetbrains-mono-latin-500.woff2') format('woff2');
}

/*
 * The icon font, subset to the glyphs the app uses — see fonts/material-symbols-subset.json
 * and scripts/buildIconSubset.js. Regenerate the woff2 after changing that list.
 *
 * font-display: block, NOT the swap above. A fallback face has no ligatures, so during a swap
 * period every icon span renders its own ligature name as words ("location_on", "tune"). block
 * paints nothing until the font arrives, which is the right trade for an icon.
 */
@font-face {
	font-family: 'Material Symbols Outlined';
	font-style: normal;
	font-weight: 100 700;
	font-display: block;
	/*
	 * Versioned, unlike the faces above. Those are immutable third-party releases at a stable
	 * URL; this one is generated, so its BYTES change at the same path every time an icon is
	 * added. A cached copy would be a font missing the new glyph - which renders as the ligature
	 * name, the failure the whole subset guard exists to prevent. The query must match the
	 * preload in index.html exactly or the preload is discarded and the font is fetched twice.
	 */
	src: url('/assets/fonts/material-symbols-subset.woff2?v=52a2e93b9e3849db') format('woff2');
}

/* Carried over verbatim from the stylesheet css2 used to serve. */
.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	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';
	-webkit-font-smoothing: antialiased;
}
