/* Language switcher and CJK typography (system font stacks; Latin still uses self-hosted Archivo / IBM Plex Mono). */
.lang-switch{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;
  gap:2px 0;padding:8px 0 0;font:12px/1.4 var(--mono);color:var(--ink-2);
}
.lang-switch a{
  text-decoration:none;text-underline-offset:3px;padding:4px 8px;border-radius:0;
  color:var(--ink-2);
}
.lang-switch a+a{border-left:1px solid var(--line)}
.lang-switch a[aria-current="page"]{color:var(--ink);font-weight:600}
@media (hover:hover) and (pointer:fine){
  .lang-switch a:hover{color:var(--accent);text-decoration:underline}
}
.footer-links .lang-switch{
  justify-content:flex-start;padding:0;display:inline-flex;
}
.footer-links .lang-switch a{padding:0 8px;color:inherit}
@media (max-width:720px){
  .lang-switch{justify-content:flex-start;padding-top:6px}
}

html[lang="zh-Hant-TW"]{
  --sans:"Archivo","Source Han Sans TC","Noto Sans CJK TC","PingFang TC","Microsoft JhengHei","Heiti TC",sans-serif;
  --mono:"IBM Plex Mono","Source Han Mono TC","Noto Sans Mono CJK TC","PingFang TC","Microsoft JhengHei",ui-monospace,monospace;
}
html[lang="zh-Hans-CN"]{
  --sans:"Archivo","Source Han Sans SC","Noto Sans CJK SC","PingFang SC","Microsoft YaHei","Heiti SC",sans-serif;
  --mono:"IBM Plex Mono","Source Han Mono SC","Noto Sans Mono CJK SC","PingFang SC","Microsoft YaHei",ui-monospace,monospace;
}
html[lang="ja"]{
  --sans:"Archivo","Source Han Sans","Noto Sans CJK JP","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic","YuGothic","Meiryo",sans-serif;
  --mono:"IBM Plex Mono","Source Han Mono","Noto Sans Mono CJK JP","Hiragino Sans","Yu Gothic",ui-monospace,monospace;
}
html[lang="zh-Hant-TW"] body,
html[lang="zh-Hans-CN"] body,
html[lang="ja"] body{
  line-height:1.7;
}
html[lang="zh-Hant-TW"] h1,
html[lang="zh-Hant-TW"] h2,
html[lang="zh-Hans-CN"] h1,
html[lang="zh-Hans-CN"] h2,
html[lang="ja"] h1,
html[lang="ja"] h2{
  letter-spacing:-0.02em;line-height:1.28;word-break:keep-all;
}
