/* 全站字体：MiSans（小米，免费商用），已按网站用字裁剪 */
@font-face { font-family: "MiSans"; src: url("fonts/reference/misans-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("fonts/reference/misans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("fonts/reference/misans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("fonts/reference/misans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("fonts/reference/misans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* 标题：思源宋体（Google/Adobe，OFL）；数字与英文：IBM Plex Mono（OFL）。同样按用字裁剪 */
@font-face { font-family: "NHJ Serif"; src: url("fonts/reference/serif-500.woff2") format("woff2"); font-weight: 100 550; font-display: swap; }
@font-face { font-family: "NHJ Serif"; src: url("fonts/reference/serif-600.woff2") format("woff2"); font-weight: 551 900; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/reference/plexmono-400.woff2") format("woff2"); font-weight: 100 450; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/reference/plexmono-500.woff2") format("woff2"); font-weight: 451 900; font-display: swap; }
/* 英文版：标题 Newsreader，正文 Instrument Sans（均为 OFL）。只在英文页面用到时才会下载 */
@font-face { font-family: "NHJ Latin Serif"; src: url("fonts/reference/newsreader-500.woff2") format("woff2"); font-weight: 100 550; font-display: swap; }
@font-face { font-family: "NHJ Latin Serif"; src: url("fonts/reference/newsreader-600.woff2") format("woff2"); font-weight: 551 900; font-display: swap; }
@font-face { font-family: "NHJ Latin Sans"; src: url("fonts/reference/instrument-sans-400.woff2") format("woff2"); font-weight: 100 450; font-display: swap; }
@font-face { font-family: "NHJ Latin Sans"; src: url("fonts/reference/instrument-sans-500.woff2") format("woff2"); font-weight: 451 550; font-display: swap; }
@font-face { font-family: "NHJ Latin Sans"; src: url("fonts/reference/instrument-sans-600.woff2") format("woff2"); font-weight: 551 900; font-display: swap; }


/* Font roles from 官网第三版. Geometry and all page styles remain unchanged. */
@layer sg-brand-fonts {
  html { --sg-display: "NHJ Serif", "Songti SC", "SimSun", serif; --sg-sans: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif; --sg-mono: "Plex Mono", "MiSans", monospace; }
  html[lang="en"] { --sg-display: "NHJ Latin Serif", "NHJ Serif", Georgia, serif; --sg-sans: "NHJ Latin Sans", "MiSans", "Helvetica Neue", Arial, sans-serif; }
  html, body, body *, body *::before, body *::after { font-family: var(--sg-sans) !important; font-synthesis: none !important; }
  body { font-weight: 400; }
  body :is(h1,h2,h3,[role="heading"],[data-type-role="heading"]),
  body :is(h1,h2,h3,[role="heading"],[data-type-role="heading"]) * { font-family: var(--sg-display) !important; font-weight: 600 !important; }
  html[lang="en"] body :is(h1,h2,h3,[role="heading"],[data-type-role="heading"]),
  html[lang="en"] body :is(h1,h2,h3,[role="heading"],[data-type-role="heading"]) * { font-weight: 500 !important; }
  body :is(.num,.num b,.num span) { font-family: var(--sg-mono) !important; }
  body .num small { font-family: var(--sg-sans) !important; }
  body :is(.foot-word,.mg-en,.ab-year b,[data-type-role="mask"]), body [data-type-role="mask"] *,
  body .sg-title-ghost::before, body .sg-title-ghost::after { font-family: var(--sg-sans) !important; font-weight: 500 !important; }
}

/* Complete the title font so 听 shares the same glyph metrics as its neighbours. */
@font-face { font-family: "NHJ Serif"; src: url("fonts/reference/serif-500-supplement.woff2") format("woff2"); font-weight: 100 550; font-display: swap; unicode-range: U+542C; }
@font-face { font-family: "NHJ Serif"; src: url("fonts/reference/serif-600-supplement.woff2") format("woff2"); font-weight: 551 900; font-display: swap; unicode-range: U+542C; }
