/* REQ-005 FR-011 — self-hosted open-source font stack, applied at prototype
   scale. This is a PREVIEW OVERLAY, not the Foundation change: it re-points
   the two type tokens for the prototype package only. The Foundation itself
   (docs/design/tokens/tokens.json → tokens.css, v0.11.0) is generated and
   version-gated, and REQ-005 §C 迁移范围清单 schedules that edit to the
   implementation wave together with the LAW-02/LAW-07 anchor update. Do not
   read this file as the Foundation having moved.

   What it fixes. The Foundation stack is
       --font-family-ui: Arial, "PingFang SC", "Microsoft YaHei", sans-serif
   Every name in it is proprietary, and `Arial` carries no CJK, so each Han
   glyph walks the list and lands on whatever the platform has — which is why
   the pages could show a Hei face in one place and a Song face in another.
   proto.css already documents the second half of the same bug: a bare
   `monospace` generic on <code>/<kbd>/<samp>/<pre> let 26 of those elements
   compute to `monospace` and drop their Chinese onto fontconfig's last resort.

   Both holes close the same way — name one permissively-licensed face first,
   so every glyph the page renders is decided by that face and nothing falls
   through to a platform default. The proprietary names stay in the list, but
   only ever as a terminal fallback that cannot be reached while the webfont
   loads, exactly as FR-011 requires (专有字体只允许作为永不承重的末端兜底).

   --font-family-mono is deliberately NOT touched. It is Latin-only by design,
   and proto.css already composes it as `--ux-mono-cjk`, so digits and Latin
   keep a real mono while Chinese resolves through --font-family-ui to Noto.
   That composition is what gives the page one CJK face. */

@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/NotoSansSC-subset-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/NotoSansSC-subset-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/NotoSansSC-subset-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Ordered so the licensed face is reached first and Arial only ever renders
   if the webfont is both missing and still covering the glyph. */
:root {
  --font-family-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-family-display: "Noto Sans SC", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Numerals that must line up. Noto Sans SC ships tabular figures, so the
   digit columns get alignment from the font itself rather than from a
   different family — the AC-012 route the REQ prefers over swapping the whole
   stack to a CJK mono. */
.ux-num,
.ux-table .ux-num,
.ux-mono { font-variant-numeric: tabular-nums; }
