/* darrell.sg — self-hosted web fonts (2026-10-19)
   ─────────────────────────────────────────────────────────────────────────────
   The same OFL faces Google Fonts served before, now from /fonts/ on this server, so the first paint never
   waits on Google's font servers (blocked in mainland China, where the old render-blocking links left the page
   dark). Loaded BEFORE site.css on index, booking and 404; the zh pages inherit the link from i18n_build.mjs
   and add fonts-zh.css (generated by make_zh_fonts.mjs) for the Chinese headings.

   Files are Google's own latin + latin-ext slices, byte for byte (css2 API, Chrome user agent), and the
   unicode-range values are Google's, so a slice downloads only when the page uses one of its glyphs.
   Inter and JetBrains Mono are variable fonts: one file per slice covers every weight the CSS uses.
   Every page preloads the two Instrument Serif latin faces (its title / the hero name). The zh pages need the
   italic too: Chrome loads it for the line metrics of italic elements even when their words are Chinese. */

/* ── Instrument Serif: display (regular + italic) ── */
/* latin */
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-400-latin.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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-400-italic-latin.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;
}
/* latin-ext */
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Inter: body (variable, 300–600 as before) ── */
/* latin */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/inter-var-latin.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;
}
/* latin-ext */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── JetBrains Mono: labels and data (variable, 400–500 as before) ── */
/* latin */
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-var-latin.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;
}
/* latin-ext */
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Noto Serif SC: only 中文 赖政豪 (the hero / footer name and the "EN · 中文" stat), ~3 KB ──
   Google's text= subset of exactly these five glyphs; one variable file serves both weights. Two
   single-weight faces (not one 400–500 range) on purpose: fonts-zh.css adds a 400 face for the whole
   Chinese page, and only faces with identical weight descriptors are merged into one family set. */
@font-face {
  font-family: "Noto Serif SC"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/noto-serif-sc-name.woff2") format("woff2");
  unicode-range: U+4E2D, U+653F, U+6587, U+8C6A, U+8D56;
}
@font-face {
  font-family: "Noto Serif SC"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/noto-serif-sc-name.woff2") format("woff2");
  unicode-range: U+4E2D, U+653F, U+6587, U+8C6A, U+8D56;
}
