/* ═══════════════════════════════════════════════════════════════
   阙外字体策略 v3 — 性能优化版
   ────────────────────────────────────────────────────────────
   策略: 系统字体优先 + 按需加载 + unicode-range 分片
   目标: FCP < 0.3s · LCP < 1.5s · CLS < 0.05

   字体栈:
   - Serif: Source Han Serif SC (标题) — Google Fonts + unicode-range
   - Sans:  Geist Sans → Inter → PingFang SC (正文/UI)
   - Mono:  Geist Mono → JetBrains Mono (代码/数据)

   加载策略:
   1. 系统字体立即渲染 (font-display: swap)
   2. 中文字体按需加载 (unicode-range 分片)
   3. 拉丁字符优先 (subset 仅 ~15KB WOFF2)
   4. 预连接 CDN 减少 DNS 查询
   ═══════════════════════════════════════════════════════════ */

/* ═══ Geist Sans (UI/正文) — 拉丁子集优先 ═══ */
/* 仅加载 400/500/600 三种字重 (全局铁律) */
@font-face {
  font-family: 'Geist Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/npm/@fontsource/geist-sans@5/files/geist-sans-latin-400-normal.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: 'Geist Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/npm/@fontsource/geist-sans@5/files/geist-sans-latin-500-normal.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: 'Geist Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/npm/@fontsource/geist-sans@5/files/geist-sans-latin-600-normal.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;
}

/* ═══ Source Han Serif SC (中文标题) — Google Fonts 分片加载 ═══ */
/* Google Fonts 自动处理 unicode-range 分片 + 子集化
   策略: 仅加载 400/600 两种字重 · display=swap · text 参数预加载高频字 */
@font-face {
  font-family: 'Source Han Serif SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600&display=swap);
  /* Noto Serif SC = Source Han Serif SC 的开源等价 (同字体,不同名字) */
}

/* ═══ Geist Mono (代码/数据) ═══ */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/npm/@fontsource/geist-mono@5/files/geist-mono-latin-400-normal.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;
}

/* ═══ 系统字体后备 (零网络开销) ═══ */
/* PingFang SC — macOS/iOS 原生
   Microsoft YaHei — Windows 原生
   system-ui — 使用操作系统默认 UI 字体 */
