/* Locale font stacks — SF first; system fallbacks for scripts SF files may not cover */

html[lang="zh-Hans"],
html[lang="zh"] {
  --font-sans:
    "SF UI Text",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei UI",
    "Noto Sans SC",
    sans-serif;
  --font-display:
    "SF UI Display",
    "SF UI Text",
    "PingFang SC",
    "Microsoft YaHei UI",
    sans-serif;
}

html[lang="fa"] {
  --font-sans:
    "SF UI Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Tahoma",
    "Noto Sans Arabic",
    "Arial",
    sans-serif;
  --font-display: var(--font-sans);
}

html[lang="tg"],
html[lang="ru"],
html[lang="uk"],
html[lang="be"] {
  --font-sans:
    "SF UI Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    sans-serif;
}

html[lang="tr"] {
  --font-sans:
    "SF UI Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    sans-serif;
}

html[lang="en"] {
  --font-sans:
    "SF UI Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  --font-display:
    "SF UI Display",
    "SF UI Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* Ensure locale stacks apply to all UI text (incl. Aa+) */
html[lang] body,
html[lang] button,
html[lang] input,
html[lang] select,
html[lang] textarea {
  font-family: var(--font-sans);
}

/* Headings = SF UI Text (Display only for logo — see fonts-sf.css) */
html[lang] .page-title,
html[lang] .page-title--hero,
html[lang] h1,
html[lang] h2,
html[lang] h3,
html[lang] .section-title {
  font-family: var(--font-sans);
}

html[lang] .logo-text {
  font-family: var(--font-display);
}
