/* Self-hosted web fonts of laolong.pro (no third-party font requests).
 *
 * Files: /assets/fonts/*.woff2, from the official Google Fonts builds packaged
 * by Fontsource (@fontsource-variable/inter@5.3.0, Inter 4 wght axis only;
 * @fontsource-variable/noto-sans-devanagari@5.3.0, wght axis only). Both fonts
 * are SIL Open Font License 1.1 — see fonts/Inter-OFL.txt and
 * fonts/NotoSansDevanagari-OFL.txt.
 *
 * Families
 *   "LL Sans"             Inter, variable 100–900: Latin, Latin-ext, Cyrillic (ru/uk), Vietnamese,
 *                         Greek (el; monotonic, so the polytonic greek-ext file is not shipped).
 *   "LL Devanagari"       Noto Sans Devanagari, variable 100–900: Hindi.
 *   "LL Devanagari Name"  5 KB subset with only the word "हिन्दी" (language menu on
 *                         non-Hindi pages, so they never fetch the 121 KB Devanagari file).
 *   "LL Czech Name"       2 KB Inter subset with only "Č" and "š" (the menu item "Čeština" on
 *                         non-Czech pages, so they never fetch the 85 KB latin-ext file).
 *   "LL Romanian Name"    2 KB Inter subset with only "ă" (the menu item "Română" on non-Romanian
 *                         pages, so they never fetch the Vietnamese file that wins U+0103).
 *   "LL Greek Name"       3 KB Inter Greek subset with only the letters of "Ελληνικά" (the menu
 *                         item on non-Greek pages, so they never fetch the 19 KB Greek file).
 *   Chinese (zh), Arabic (ar), Thai (th): no web font at all — those pages and their menu items
 *                         ("简体中文", "العربية", "ไทย") use the system fonts of the script (site.css:
 *                         --font-cjk / --font-arabic / --font-thai, :lang() stacks); Latin and digits
 *                         stay Inter. Turkish (tr) is Inter latin + latin-ext (ğ, ı, ş, İ).
 *   "LL Sans Fallback"    local Arial scaled to Inter's metrics: less layout shift while
 *                         the web font swaps in (font-display: swap).
 *
 * Suggested stacks
 *   --sans: "LL Sans", "LL Devanagari", "LL Sans Fallback", system-ui, -apple-system,
 *           "Segoe UI", Roboto, Arial, sans-serif;
 *   .langs a[lang="hi"] { font-family: "LL Devanagari Name", "LL Sans", sans-serif; }
 *   Do not put "LL Devanagari" ahead of "LL Devanagari Name" on the menu item.
 *
 * Numbers: Inter has tabular figures. --font-num uses
 *   font-feature-settings: "tnum" 1;  (or font-variant-numeric: tabular-nums)
 * so prices, PnL and table columns keep equal digit widths. "zero" 1 adds a slashed
 * zero and "cv11" 1 a single-storey a, if ever wanted; "ss01" gives open digits.
 *
 * Unicode ranges: the browser downloads a file only when the page has a character in
 * its range. Where ranges overlap, the face declared LAST wins, so the order below is
 * deliberate: latin-ext first, then vietnamese (Vietnamese pages skip the 85 KB
 * latin-ext file), cyrillic, and latin last.
 *
 * Weights: Inter latin 48 KB, cyrillic 19 KB, vietnamese 10 KB, latin-ext 85 KB (only on
 * demand), Greek 19 KB (Greek pages only), Devanagari 121 KB (Hindi pages only).
 */

/* Inter — Latin Extended (on demand only) */
@font-face {
  font-family: "LL Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2-variations"),
       url("fonts/inter-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-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — Vietnamese (after latin-ext on purpose) */
@font-face {
  font-family: "LL Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-vietnamese.woff2") format("woff2-variations"),
       url("fonts/inter-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
                 U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Inter — Cyrillic (Russian, Ukrainian: і ї є ґ, №) */
@font-face {
  font-family: "LL Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cyrillic.woff2") format("woff2-variations"),
       url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Inter — Greek (Greek pages; monotonic Modern Greek fits in this range) */
@font-face {
  font-family: "LL Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-greek.woff2") format("woff2-variations"),
       url("fonts/inter-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* Inter — Latin (every page; preloaded) */
@font-face {
  font-family: "LL Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2-variations"),
       url("fonts/inter-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;
}

/* Noto Sans Devanagari — Hindi pages */
@font-face {
  font-family: "LL Devanagari";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/noto-sans-devanagari.woff2") format("woff2-variations"),
       url("fonts/noto-sans-devanagari.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839,
                 U+A8E0-A8FF, U+11B00-11B09;
}

/* "हिन्दी" only — the language menu item on non-Hindi pages */
@font-face {
  font-family: "LL Devanagari Name";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/noto-sans-devanagari-name.woff2") format("woff2-variations"),
       url("fonts/noto-sans-devanagari-name.woff2") format("woff2");
  unicode-range: U+0926, U+0928, U+0939, U+093F, U+0940, U+094D;
}

/* "Č" and "š" of "Čeština" only (Inter latin-ext subset, 2 KB) — the language menu item
   on non-Czech pages, so they never fetch the 85 KB latin-ext file */
@font-face {
  font-family: "LL Czech Name";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cs-name.woff2") format("woff2-variations"),
       url("fonts/inter-cs-name.woff2") format("woff2");
  unicode-range: U+010C, U+0161;
}

/* "ă" of "Română" only (Inter subset, 2 KB) — the language menu item on non-Romanian pages */
@font-face {
  font-family: "LL Romanian Name";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-ro-name.woff2") format("woff2-variations"),
       url("fonts/inter-ro-name.woff2") format("woff2");
  unicode-range: U+0103;
}

/* "Ελληνικά" only (Inter Greek subset, 3 KB) — the language menu item on non-Greek pages */
@font-face {
  font-family: "LL Greek Name";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-el-name.woff2") format("woff2-variations"),
       url("fonts/inter-el-name.woff2") format("woff2");
  unicode-range: U+0395, U+03AC, U+03B7, U+03B9-03BB, U+03BD;
}

/* Metric-matched fallback (Inter 4 vs Arial), shown until "LL Sans" arrives.
   Checked in Chromium at 20px: Inter 548.8x24.0 px vs adjusted Arial-metric 548.1x24.0 px. */
@font-face {
  font-family: "LL Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");  /* all Arial-metric */
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}
