/*
 * Self-hosted webfonts (dev-003 T1). No CDN, no third-party requests.
 *
 * Sources (all SIL Open Font License 1.1):
 *   IBM Plex Sans / Mono / Sans Arabic / Sans Thai - https://github.com/IBM/plex
 *     redistributed via the @fontsource packages (jsDelivr, pinned 5.3.0).
 *   Noto Sans SC - https://github.com/google/fonts/tree/main/ofl/notosanssc
 *     subset to the characters this site actually renders (1,343 code points drawn
 *     from scripts/import/data/*.json + the theme templates + the dev-012 legal
 *     copy), variable wght 400-600.
 *
 * Size budget (dev-003 master §三.2): Latin <= 60 KB/weight, Arabic <= 90 KB,
 * Chinese subset <= 500 KB. Measured sizes are recorded in
 * docs/testing/dev-003/font-budget.txt.
 */

/* --- Latin + Cyrillic: IBM Plex Sans --- */

@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-latin-400.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;
}

@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-latin-600.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;
}

@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-cyrillic-400.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-cyrillic-600.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* --- Data and identifiers: IBM Plex Mono --- */

@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-400.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;
}

@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-600.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;
}

/* --- Arabic (RTL) --- */

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-arabic-arabic-400.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-arabic-arabic-600.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* --- Thai --- */

@font-face {
	font-family: "IBM Plex Sans Thai";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-thai-thai-400.woff2") format("woff2");
	unicode-range: U+0E01-0E3A, U+0E3F-0E5B;
}

@font-face {
	font-family: "IBM Plex Sans Thai";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/ibm-plex-sans-thai-thai-600.woff2") format("woff2");
	unicode-range: U+0E01-0E3A, U+0E3F-0E5B;
}

/* --- Chinese: Noto Sans SC (subset, variable 400-600) --- */

@font-face {
	font-family: "Noto Sans SC";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	/* Bump the ?v= query whenever the subset bytes change: the file keeps its
	 * name (dev-012 rebuilt it 1,266 -> 1,343 code points) and a plain URL would
	 * let a returning visitor keep the old, incomplete font from cache. */
	src: url("../fonts/noto-sans-sc-subset.woff2?v=0.4.1") format("woff2-variations");
	unicode-range: U+2E80-2EFF, U+3000-303F, U+3100-312F, U+31C0-31EF, U+3200-32FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
