/* Shared language-directory styling, including the existing homepages. */
html body .nav-lang-menu {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body .footer-languages {
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
}
html body .footer-languages a { overflow-wrap: anywhere; }

/* Phase-one localized landing pages; other site layouts stay untouched. */
html body.locale-home {
  margin: 0;
  font-family: var(--font-body), "Noto Sans", sans-serif;
}
html body.locale-home :is(h1, h2, h3) {
  text-transform: none;
  line-height: 1.2;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
html body.locale-home .hero h1 { font-size: clamp(34px, 4.3vw, 62px); }
html body.locale-home .hero p.lede { max-width: 38em; }
html body.locale-home .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
html body.locale-home .hero-grid > * { min-width: 0; }
html body.locale-home .locale-app-note,
html body.locale-home figcaption { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
html body.locale-home .locale-screens { margin: 0; }
html body.locale-home .locale-screens figcaption { text-align: center; margin-top: 12px; }
html body.locale-home .locale-section { padding-block: 30px; scroll-margin-top: 100px; }
html body.locale-home .locale-section h2 { font-size: clamp(28px, 3vw, 42px); margin: 0; }
html body.locale-home .locale-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
html body.locale-home .locale-feature,
html body.locale-home .locale-panel { padding: 28px; border: 1px solid var(--border); background: var(--surface); }
html body.locale-home .locale-feature h3 { margin: 10px 0 0; font-size: 23px; }
html body.locale-home .locale-feature p { margin-top: 12px; }
html body.locale-home .feature-number { font-size: 13px; font-weight: 700; color: var(--accent); }
html body.locale-home .locale-resources { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 22px 32px; }
html body.locale-home .resource-link { display: block; padding: 12px 18px; border: 1px solid var(--border); background: var(--surface); max-width: 100%; overflow-wrap: anywhere; }
html body.locale-home .locale-translation-note { font-size: 14px; }
html body.locale-home .footer-languages { display: grid; gap: 12px 18px; margin-top: 20px; }
html body.locale-home .nav-controls { margin-inline-start: auto; margin-inline-end: 0; }
html body.locale-home .site-header .nav-links { margin-inline-start: auto; margin-inline-end: 0; }
html body.locale-home .nav-lang-menu { left: auto; right: auto; inset-inline-end: 0; }
html[dir="rtl"] body.locale-home .phone-stack { direction: ltr; }
html[dir="rtl"] body.locale-home .hero :is(h1, p),
html[dir="rtl"] body.locale-home .locale-section { text-align: start; }
html[dir="rtl"] body.locale-home .nav-lang-menu a { text-align: start; }
html[dir="rtl"] body.locale-home .feature-number { unicode-bidi: isolate; }
/* Native script fallback fonts avoid Latin display-font spacing and clipping. */
html:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) body.locale-home :is(h1, h2, h3) {
  font-family: system-ui, sans-serif;
  letter-spacing: normal;
  line-height: 1.4;
}
@media (max-width: 940px) {
  html body.locale-home .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 600px) {
  html body.locale-home .locale-features { grid-template-columns: minmax(0, 1fr); }
  html body.locale-home .locale-feature, html body.locale-home .locale-panel { padding: 22px; }
  html body.locale-home .hero h1 { font-size: 34px; }
  html body.locale-home .hero { padding-bottom: 24px; }
  html body.locale-home .wrap { padding-inline: 18px; }
  html body.locale-home .site-header .nav { gap: 10px; }
  html body.locale-home .site-header .brand { font-size: 15px; gap: 8px; }
  html body.locale-home .site-header .brand img { width: 28px; height: 28px; }
  html body.locale-home .site-header .nav-controls { gap: 8px; }
  html body.locale-home .site-header .nav-pill { display: none; }
  html body.locale-home .site-header .nav-lang { display: block; }
  html body.locale-home .site-header .nav-lang > summary { height: 36px; padding-inline: 10px; font-size: 11px; }
  html body.locale-home .site-header .nav-lang-menu {
    position: fixed;
    top: 85px;
    inset-inline: 16px;
    width: auto;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body.locale-home .site-header .btn { max-width: 110px; padding: 9px 10px; font-size: 11px; line-height: 1.3; }
}
@media (max-width: 359px) {
  html body.locale-home .site-header .brand { font-size: 13px; }
  html body.locale-home .site-header .btn { max-width: 90px; }
  html body.locale-home .site-header .nav { padding-inline: 10px; gap: 6px; }
  html body.locale-home .site-header .nav-controls { gap: 6px; }
}
