@import url('/assets/i18n-fonts.css?v=4');

/* Script-specific faces also cover native language names in the picker. */
html:lang(ja) body { font-family: "Noto Sans", "WHG Noto JP", sans-serif; }
html:lang(zh-Hans) body { font-family: "Noto Sans", "WHG Noto SC", sans-serif; }
html:lang(ar) body { font-family: "Noto Sans", "WHG Noto Arabic", sans-serif; line-height: 1.85; }
.language-picker [lang="ja"] { font-family: "WHG Noto JP", sans-serif; }
.language-picker [lang="zh-Hans"] { font-family: "WHG Noto SC", sans-serif; }
.language-picker [lang="ar"] { font-family: "WHG Noto Arabic", sans-serif; direction: rtl; unicode-bidi: isolate; }
.btn, .site-nav[data-enhanced] .menu-toggle, .swatch { font-family: inherit; }
.language-picker a { unicode-bidi: isolate; }

/* Avoid forced tracking/case rules in scripts which do not use Latin capitals. */
:is(html:lang(ja), html:lang(zh-Hans), html:lang(ar)) :is(h1,h2,h3,.label,.nav a,.motto,.facts dt,.glance dt,.naming th) {
  letter-spacing: normal;
  text-transform: none;
}
:is(html:lang(ja), html:lang(zh-Hans)) body { line-break: strict; }
:is(html:lang(ja), html:lang(zh-Hans)) :is(h1,h2) { line-height: 1.4; max-inline-size: 24em; }
html:lang(ar) :is(h1,h2,h3) { line-height: 1.5; }
html:lang(ar) :is(.mono,.facts dt,.glance dt) { font-family: inherit; }

/* Direction follows the document; logos and brand colour gradients stay intact. */
.hero .label span + span::before { margin-right: 0; margin-inline-end: .9em; }
.copy-block .count { margin-left: 0; margin-inline-start: .4rem; }
.swatch, .naming th, .naming td { text-align: start; }
.usage ul { padding-left: 0; padding-inline-start: 1.1rem; }
.prose ul { padding-left: 0; padding-inline-start: 1.2rem; }
.glance div { border-right: 0; border-inline-end: 1px solid var(--rule); margin: 0; }
[dir="rtl"] :is(a[href^="mailto:"],a[href^="https://"],code,.brand-name,.brand-row h3) {
  unicode-bidi: isolate;
}
[dir="rtl"] :is(a[href^="mailto:"],code,.brand-name) { direction: ltr; }
[dir="rtl"] .hero-feature a > span[aria-hidden="true"] { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .skip { left: auto; right: -999px; }
[dir="rtl"] .skip:focus { right: 1rem; }
@media (max-width:760px) {
  [dir="rtl"] .hero-feature .feature-mark { float: right; margin: 0 0 1rem 1.25rem; }
}
/* Long translations must shrink inside layout tracks instead of widening pages. */
.letter-card { grid-template-columns: auto minmax(0,1fr) auto; }
.language-picker, .hero-grid > *, .letter-card > * { min-inline-size: 0; }
@media (max-width:700px) { .letter-card { grid-template-columns: 1fr; } }
