/* ============================================================
   SuperMafun TYPE TOKENS — the single source of truth for type.
   COR-20261203-07 fix batch (2026-12-03), from the font forensic
   audit §5.1 (~/workspace/supermafun-font-audit-2026-12-03/REPORT.md).
   Every stylesheet consumes these variables; no sheet may declare
   a rival family, size, weight or tracking value of its own.
   CJK strategy (decided): named per-language system stacks are the
   deliberate design — no full CJK webfont. Kaiti survives ONLY as
   the six door words' display accent (--font-kaiti).
   ============================================================ */
:root{
  /* — Families — */
  --font-display:"Newsreader","AR PL KaitiM GB",serif;
  --font-body:"Newsreader","AR PL KaitiM GB",serif;
  --font-serif:var(--font-body); /* alias: legacy var(--font-serif) references resolve here */
  --font-sans:var(--font-body);  /* alias: legacy var(--font-sans) references resolve here */
  --font-mark:"Cormorant Garamond WM","Newsreader","Hiragino Mincho ProN","Yu Mincho","Noto Serif CJK JP","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",serif; /* WM subset is Latin-only (9 glyphs): CJK name glyphs (e.g. 山崎) shape from the named faces after Newsreader, never an unnamed generic */
  --font-kaiti:"AR PL KaitiM GB","Kaiti TC","Kaiti SC","KaiTi","Newsreader","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",serif;
  --font-cjk-hans:"AR PL KaitiM GB","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",serif;
  --font-cjk-hant:"PingFang TC","Hiragino Sans CNS","Microsoft JhengHei","Noto Sans CJK TC",serif;
  --font-ja:"Hiragino Mincho ProN","Yu Mincho","Noto Serif CJK JP",serif;
  --font-ko:"Apple SD Gothic Neo","Noto Sans CJK KR",sans-serif;

  /* — The ladder (R-4): the only sizes on the site — */
  --type-display:64px;   --type-display-phone:40px;
  --type-h2:40px;        --type-h2-phone:30px;
  --type-h3:28px;        --type-h3-phone:24px;
  --type-lead:20px;      --type-lead-phone:18px;
  --type-body:17px;      --type-body-phone:16px;
  --type-caption:13.5px;
  --type-eyebrow:12.5px;
  --type-floor:12px;     /* nothing renders below this outside legal/artwork classes */

  /* — Weights: four only. 550/560/650/750 are banned (faux-axis drift). — */
  --w-body:400; --w-emph:500; --w-head:600; --w-strong:700;

  /* — Tracking: one eyebrow value family-wide; display near-zero; negative banned — */
  --ls-display:0.01em; --ls-h2:0.02em; --ls-h3:0.015em;
  --ls-eyebrow:0.15em; --ls-sign:0.04em;
}
/* Per-language routing: on a CJK edition the two main tokens themselves
   resolve to that language's named stack, so every var(--font-display) /
   var(--font-body) consumer shapes from the deliberate design — Kaiti
   first where it exists, then the named platform faces. Latin display
   faces (Newsreader / Cormorant WM) still lead on Latin editions. */
:root:lang(zh-Hans){--font-display:var(--font-cjk-hans);--font-body:var(--font-cjk-hans)}
:root:lang(zh-Hant){--font-display:var(--font-cjk-hant);--font-body:var(--font-cjk-hant)}
:root:lang(ja){--font-display:var(--font-ja);--font-body:var(--font-ja)}
:root:lang(ko){--font-display:var(--font-ko);--font-body:var(--font-ko)}
/* The ladder steps down in exactly one place: at phone width the five
   stepped tokens resolve to their phone values, so a component names
   var(--type-h2) once and can never drift between breakpoints. */
@media (max-width:760px){
  :root{
    --type-display:var(--type-display-phone);
    --type-h2:var(--type-h2-phone);
    --type-h3:var(--type-h3-phone);
    --type-lead:var(--type-lead-phone);
    --type-body:var(--type-body-phone);
  }
}
