/* Shared language menu and script-aware layout. Loaded after each page's own CSS. */
.language-menu{position:relative;flex:none;color:var(--text);font:inherit;margin:0;border:0;overflow:visible;background:transparent;border-radius:0}
.language-menu summary::after{display:none}
.language-menu summary{display:flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:7px 9px;border:1px solid var(--outline,var(--ghost-line));border-radius:12px;cursor:pointer;list-style:none;font:inherit;font-size:.82rem;font-weight:600;line-height:1.4;white-space:nowrap}
.language-menu summary::-webkit-details-marker{display:none}
.language-menu summary:hover,.language-menu summary:focus-visible{background:var(--surface,var(--bg));outline:2px solid var(--violet);outline-offset:2px}
.language-menu summary svg{display:block;flex:none;width:20px;height:20px}
.language-options{position:absolute;z-index:1100;inset-block-start:calc(100% + 10px);inset-inline-end:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:310px;max-width:calc(100vw - 32px);max-height:min(65vh,440px);overflow:auto;padding:8px;gap:2px;background:var(--surface,var(--bg));border:1px solid var(--outline,var(--ghost-line));border-radius:16px;box-shadow:0 12px 35px #0003;text-align:start}
/* Align every name to the same column edge, including names written right to left. */
.language-options a{display:flex;align-items:center;justify-content:left;min-height:44px;padding:9px 12px;border-radius:9px;color:var(--text) !important;text-decoration:none;font-size:.9rem !important;font-weight:500;white-space:normal !important;line-height:1.4}
.language-options a:hover,.language-options a:focus-visible{background:var(--bg);outline:2px solid var(--violet);outline-offset:-2px;text-decoration:none}
.language-options a[aria-current]{color:var(--violet-light) !important;background:var(--bg);font-weight:700}
/* Breadcrumbs are navigation too; only the site header belongs above page content. */
nav.crumbs{position:static;z-index:auto;background:transparent}
body>.language-menu{position:absolute;inset-block-start:20px;inset-inline-end:20px;z-index:20}
.nav-inner,.nav-links{min-width:0}
.nav-links{flex:1;justify-content:flex-end}
.nav-scroll{min-width:0;overflow-x:auto}
@media(max-width:1100px){.language-name{display:none}.nav-inner{gap:14px}.nav-links{gap:12px}.brand .brand-name{display:none}}
@media(max-width:480px){.nav-inner{gap:8px}.nav-links{gap:7px}.nav-cta{padding:8px 11px!important;font-size:.8rem!important}.language-menu summary{padding:6px}.language-options{position:fixed;inset-block-start:68px;inset-inline:16px;width:auto;max-width:none}.nav-scroll{gap:16px!important}}
@media(max-width:600px){.hero>.sub{padding-inline:20px}.hero>h1{padding-inline:12px}}
/* CJK and Indic text needs its own metrics; decorative Latin faces do not cover it. */
html:lang(ja){font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif}
html:lang(ko){font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif}
html:lang(zh-Hans){font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
html:lang(zh-Hant){font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Microsoft JhengHei",sans-serif}
html:lang(hi){font-family:-apple-system,BlinkMacSystemFont,"Noto Sans Devanagari","Kohinoor Devanagari",sans-serif}
html:lang(ar){font-family:-apple-system,BlinkMacSystemFont,"Geeza Pro","Noto Sans Arabic",Tahoma,sans-serif}
html:is(:lang(ja),:lang(ko),:lang(zh),:lang(hi),:lang(ar)) body{font-family:inherit}
html:is(:lang(ja),:lang(ko),:lang(zh),:lang(hi),:lang(ar)) :is(h1,h2,h3,.sec-label,.eyebrow){font-family:inherit;letter-spacing:normal;text-transform:none;line-height:1.4}
html:lang(ko) :is(h1,h2,h3,p){word-break:keep-all;overflow-wrap:anywhere}
html:lang(hi) :is(h1,h2,h3,p){line-height:1.65}
html[dir=rtl] :is(.store-btn .lines,.ba-card,.card,.mode-card,.plan,.guide-body){text-align:start}
html[dir=rtl] :is(ul,ol){padding-inline-start:1.5em;padding-inline-end:0}
html[dir=rtl] .setup li{padding-inline-start:62px;padding-inline-end:22px}
html[dir=rtl] .setup li::before{left:auto;right:18px}
html[dir=rtl] blockquote{border-left-width:1px;border-right:3px solid var(--violet-light)}
/* A keyboard's physical grid and technical syntax are never mirrored. */
html[dir=rtl] :is(.mock-keys,.krow,.mode-keys,pre,code){direction:ltr;unicode-bidi:isolate}
html[dir=rtl] :is(.mock-field,.cc-excerpt,.ba-text){text-align:start;unicode-bidi:plaintext}
html[dir=rtl] .mock-pills{direction:ltr}
html[dir=rtl] .mock-bar{direction:ltr}
html[dir=rtl] :is(.for-label,.hero-mode,.hero-langs){direction:rtl}
html:not(:lang(en)) :is(h1,h2,h3,p,a,summary){overflow-wrap:break-word}
html:not(:lang(en)) .mock-field{line-height:1.65}
@media(prefers-reduced-motion:reduce){.language-menu *{scroll-behavior:auto}}
