/* ============================================================================
 * 本地字体（fonts.css）—— 2026-10-25
 * ----------------------------------------------------------------------------
 * 🔴 这个文件解决的是一个"纸面设计完整、实际承载为零"的问题。
 *
 * 历史情况：
 *   ① theme.css 早就设计好了各套皮肤的四级字体 token（--font-display / -ui /
 *      -num / -mono），每套皮肤都想用不同字体，注释写着"字体文件已在 fonts.css
 *      全量本地化，无外网依赖"；
 *   ② style.css 里原生的 3 条 @font-face 却全是 `src: local('Orbitron'), local('Arial')`
 *      —— **只查本机装没装，没有任何字体文件**；
 *   ③ 实际情况：public/fonts/ 与 fonts.css 从来不存在，head.php 在 10-19 因为
 *      "必然 404 死链"把引用删掉了。
 *   结果：绝大多数访客机器上没装 Orbitron / Rajdhani / Manrope，
 *   所谓"科技感字体"全部回退成 Arial —— 六套皮肤的字体差异**一点也没生效**。
 *
 * 本文件把这件事真正落地。
 *
 * ---- 体积策略（这是中文字体站必须讲清的部分）----
 * 全套 17 个 woff2 共约 448KB，但**任何一个访问者都不会全部下载**：
 *   · 每条 @font-face 都带 unicode-range，只声明拉丁字符区间。
 *     中文字符不在区间内，所以**不会为了渲染中文而下载这些字体的字形数据**。
 *   · @font-face 是惰性加载的：只有当前皮肤实际用到的那 2~3 个字族才会被请求。
 *     neon=Orbitron+Rajdhani+JetBrains Mono ≈ 67KB
 *     light=Lora+Inter+IBM Plex Mono ≈ 110KB
 *     都远低于业界建议的 200KB 上限。
 *
 *   ⚠️ 一个实测发现，别被它误导：
 *     Chromium 会为 font-family 列表里**第一个候选字族**做一次**度量探测**，
 *     哪怕页面上一个拉丁字符都没有 —— 这会下载该字族（Orbitron 仅 12KB）。
 *     这与 unicode-range 无关，是浏览器为了确定行高/基线提前取的 metrics。
 *     对照实验（_preview/_font_cjk_only.html，加 #cjkfirst 切到"中文优先"）：
 *       拉丁字体在前  → 纯中文页面仍请求 orbitron-var.woff2（12KB）
 *       中文系统字体在前 → 纯中文页面 **零 woff2 请求**
 *     结论：不是 unicode-range 失效。真实业务页面必然含数字、IP、英文标识，
 *     这部分开销本来就要付，因此不做特殊优化（也没有干净的 CSS 手段能规避）。
 *
 * ---- 为什么不用 CDN / Google Fonts ----
 * 部署环境是国内服务器，fonts.googleapis.com 不可达。字体必须同域自托管，
 * 否则就是"等 30 秒超时再回退"的 FOIT，比没有字体更糟。
 *
 * ---- 许可 ----
 * 全部为 SIL Open Font License 1.1（可免费商用、可再分发）。
 * 来源：Fontsource（https://fontsource.org，Google Fonts 的 npm 分发镜像）。
 * 逐字体的版权与许可见同目录 OFL-NOTICE.txt。
 *
 * ---- 加载策略 ----
 * font-display: swap —— 先用回退字体渲染，字体到了再替换。
 * 全部同域、单文件 12~48KB，正常网络下 FOUT 窗口极短；
 * 用 block 反而会在弱网下白屏 3 秒，不可接受。
 * ========================================================================== */

/* ---------------------------------------------------------------------------
 * 通用拉丁字符区间（与 Google Fonts 的 latin 子集一致）
 * 显式列出 2000-206F（通用标点）与 20AC（€）、2122（™），
 * 避免中文全角标点混入 —— 全角标点走系统字体才对味。
 * ------------------------------------------------------------------------- */
/* 下方每条重复引用，CSS 没有变量化的 unicode-range 语法，只能逐条写 */

/* ===========================================================================
 * 1. neon 皮肤 —— 赛博朋克
 *    Orbitron（几何科幻标题）× Rajdhani（窄体正文）× JetBrains Mono（数据）
 * ========================================================================= */

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400 900;            /* 可变字体：一个字重轴覆盖全档 */
    font-display: swap;
    src: url('../fonts/orbitron-var.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: 'Rajdhani';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/rajdhani-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: 'Rajdhani';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/rajdhani-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: 'Rajdhani';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/rajdhani-700.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;
}

/* JetBrains Mono 被 neon / aurora / scenery 三套共用：
 * neon 当主 mono，scenery 当数字（监控台必须列对齐），aurora 当备用 —— 声明一次即可。 */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-var.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;
}

/* ===========================================================================
 * 2. IBM Plex 家族（2026-10-28 起无皮肤使用，声明保留）
 *    原属已下线的 graphite 皮肤。IBM Plex 是同一设计师的 superfamily，
 *    结构 DNA 一致。@font-face 是惰性加载的 —— 没有皮肤引用就不会发请求，
 *    留着零成本，也方便以后再加工业向皮肤。
 * ========================================================================= */

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/plex-sans-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: 500 700;            /* 500/600/700 共用同一文件稍重，靠浏览器插值 */
    font-display: swap;
    src: url('../fonts/plex-sans-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 Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/plex-mono-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: 500 700;
    font-display: swap;
    src: url('../fonts/plex-mono-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;
}

/* ===========================================================================
 * 3. light / scenery 共用衬线 —— 白纸纸墨 & 山水画卷
 *    Lora（衬线标题）× Inter（light 正文）/ Manrope（scenery 正文）
 *    中文标题回退宋体栈（见 theme.css 的 --font-cjk-serif），
 *    拉丁与中文都是衬线，中英混排才不会一半衬线一半黑体。
 * ========================================================================= */

@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/lora-var.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: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-var.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;
}

/* ===========================================================================
 * 4. Manrope —— 原属已下线的 ocean 皮肤，现由 scenery 用作正文字体
 *    几何无衬线，开口大、呼吸感强，与本皮肤「留白」的气质同源。
 * ========================================================================= */

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/manrope-var.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;
}

/* ===========================================================================
 * 5. aurora 皮肤 —— 玻璃极光
 *    Outfit（圆润几何）× Fira Code（编程连字，等宽里最有"代码感"的）
 *    Fira Code 的 => >= != 会渲染成真正的箭头/符号，日志页辨识度更高。
 * ========================================================================= */

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/outfit-var.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: 'Fira Code';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/fira-code-var.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;
}

/* ===========================================================================
 * 6. sunset 皮肤 —— 暖阳复古
 *    Nunito（圆角终端）× Space Mono（打字机感的等宽，复古味最正）
 * ========================================================================= */

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('../fonts/nunito-var.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: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/space-mono-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: 'Space Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/space-mono-700.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;
}
