/* locale.css — loaded LAST on every localized page. Cascade depends on
   html[lang="…"] (0,1,1) outspecifying :root (0,1,0). Do not rewrite as :root{}. */

/* ---- IBM Plex Mono: self-hosted (mono/code font for all localized pages) ---- */
/* Declared here so localized pages (which omit Google Fonts) get the self-hosted face.
   On the EN page, Google Fonts is loaded LATER in source order with the same family name,
   so Google wins there — no EN download triggered, no redundant face. */
@font-face{ font-family:"IBM Plex Mono"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/ibm-plex-mono-400.subset.woff2") format("woff2"); }
@font-face{ font-family:"IBM Plex Mono"; font-style:normal; font-weight:500; font-display:swap;
  src:url("/fonts/ibm-plex-mono-500.subset.woff2") format("woff2"); }
@font-face{ font-family:"IBM Plex Mono"; font-style:normal; font-weight:600; font-display:swap;
  src:url("/fonts/ibm-plex-mono-600.subset.woff2") format("woff2"); }

/* ---- Korean: Pretendard (primary subset + unicode-range supplement) ---- */
/* One face per weight = the page-tightened subset (Task 8). NO overlapping "full"
   supplement: same family+weight, a later wider-range face wins the cascade and
   would defeat the subset. The subset file itself carries exactly the glyphs the
   page uses, so no unicode-range gating is needed. */
@font-face{ font-family:"Pretendard"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/pretendard-400.subset.woff2") format("woff2"); }
@font-face{ font-family:"Pretendard"; font-weight:500; font-display:swap;
  src:url("/fonts/pretendard-500.subset.woff2") format("woff2"); }
@font-face{ font-family:"Pretendard"; font-weight:600; font-display:swap;
  src:url("/fonts/pretendard-600.subset.woff2") format("woff2"); }
@font-face{ font-family:"Pretendard"; font-weight:700; font-display:swap;
  src:url("/fonts/pretendard-700.subset.woff2") format("woff2"); }

/* ---- Simplified Chinese: Noto Sans SC (self-hosted subset, Phase 2) ---- */
/* CJK is glyph-heavy: ship a page-tightened subset per weight (Task 12 re-tightens over the
   full zh-CN surface). Same family+weight, no overlapping wider-range face (would defeat the
   subset). --mono stays the self-hosted IBM Plex Mono declared above. */
@font-face{ font-family:"Noto Sans SC"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/noto-sans-sc-400.subset.woff2") format("woff2"); }
@font-face{ font-family:"Noto Sans SC"; font-weight:500; font-display:swap;
  src:url("/fonts/noto-sans-sc-500.subset.woff2") format("woff2"); }
@font-face{ font-family:"Noto Sans SC"; font-weight:600; font-display:swap;
  src:url("/fonts/noto-sans-sc-600.subset.woff2") format("woff2"); }
@font-face{ font-family:"Noto Sans SC"; font-weight:700; font-display:swap;
  src:url("/fonts/noto-sans-sc-700.subset.woff2") format("woff2"); }

/* ---- Traditional Chinese: Noto Sans TC (self-hosted subset, Phase 3) ---- */
/* Page-tightened subset per weight (Task 12 re-tightens over the full zh-TW surface). */
@font-face{ font-family:"Noto Sans TC"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/noto-sans-tc-400.subset.woff2") format("woff2"); }
@font-face{ font-family:"Noto Sans TC"; font-weight:500; font-display:swap;
  src:url("/fonts/noto-sans-tc-500.subset.woff2") format("woff2"); }
@font-face{ font-family:"Noto Sans TC"; font-weight:600; font-display:swap;
  src:url("/fonts/noto-sans-tc-600.subset.woff2") format("woff2"); }
@font-face{ font-family:"Noto Sans TC"; font-weight:700; font-display:swap;
  src:url("/fonts/noto-sans-tc-700.subset.woff2") format("woff2"); }

/* ---- Font + reading-density overrides by language ---- */
html[lang="ko"]      { --sans:"Pretendard", system-ui, sans-serif; }
html[lang="zh-Hans"] { --sans:"Noto Sans SC", system-ui, sans-serif; }
html[lang="zh-Hant"] { --sans:"Noto Sans TC", system-ui, sans-serif; }

html[lang="ko"] body { line-height:1.72; }
html[lang="zh-Hans"] body,
html[lang="zh-Hant"] body { line-height:1.75; letter-spacing:.01em; }

/* ---- Static switcher ---- */
.loc-switch{ display:inline-flex; gap:10px; align-items:center; font-size:13px; }
footer .loc-switch{ justify-content:center; margin-top:14px; }
.loc-switch a{ color:var(--ink-muted); text-decoration:none; }
.loc-switch a[aria-current="true"]{ color:var(--ink); font-weight:600; }
.loc-switch a:hover{ text-decoration:underline; text-underline-offset:2px; }
