/* 31-language typography and navigation; no flags, cookies or runtime translation. */
.header-inner { position: relative; gap: clamp(12px, 1.8vw, 26px); }
.header-inner .brand { flex: 0 1 290px; min-width: 0; }
.brand span { overflow-wrap: anywhere; line-height: 1.1; letter-spacing: .025em; }
.brand svg { flex-shrink: 0; }
.desktop-nav { margin-left: 0; margin-inline-start: auto; gap: 18px; }
.desktop-nav a { letter-spacing: .025em; }
.header-actions { flex-shrink: 0; gap: 12px; }
.header-actions .button { max-width: 230px; text-align: center; white-space: normal; }
.language-selector { color: var(--ivory); }
.language-selector > summary { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 1px solid rgba(245,240,230,.35); border-radius: 4px; font-size: .8rem; font-weight: 700; list-style: none; white-space: nowrap; }
.language-selector > summary::-webkit-details-marker { display: none; }
.language-selector[open] > summary, .language-selector > summary:hover { background: var(--ivory); color: var(--ink); }
.language-panel { position: absolute; z-index: 80; inset-block-start: calc(100% - 4px); inset-inline-end: 0; width: min(780px, 92vw); max-height: min(720px, calc(100dvh - 100px)); overflow: auto; padding: 25px; border: 1px solid rgba(185,167,223,.4); border-radius: 6px; background: var(--ink); color: var(--ivory); box-shadow: 0 24px 70px #0007; text-align: start; }
.language-heading { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; font-weight: 700; }
.language-count { padding: 2px 9px; color: var(--ink); background: var(--lavender); font-size: .8rem; border-radius: 20px; }
.language-note { margin: 8px 0 19px; font-size: .84rem; color: #c9c7d1; line-height: 1.6; }
.language-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; direction: ltr; }
.language-grid a { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: 3px; text-decoration: none; font-family: var(--body); font-size: .9rem; line-height: 1.4; text-align: start; }
.language-grid a:hover, .language-grid a:focus-visible { background: #ffffff14; }
.language-grid a[aria-current] { background: var(--orange); color: var(--ink); font-weight: 700; }
h1,h2,h3 { overflow-wrap: anywhere; }
.button { max-width: 100%; white-space: normal; text-align: center; }
.button svg { flex-shrink: 0; }
.eyebrow::before { flex-shrink: 0; }
.footer-top > div, .footer-links, .story-copy, .media-heading > *, .modes > * { min-width: 0; }
.footer-top { flex-wrap: wrap; }
.footer-links { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 100%; }
.footer-links a { overflow-wrap: anywhere; }
.prose th, .prose td { text-align: start; }
html:not([lang="en"]) .hero h1 { font-size: clamp(3.4rem, 7.2vw, 7.4rem); line-height: 1.06; letter-spacing: -.025em; }
html:not([lang="en"]) h2, html:not([lang="en"]) h3 { line-height: 1.1; }
html:is([lang^="zh"],[lang="ja"],[lang="ko"],[lang="th"],[lang="ar"]) { --display: "Segoe UI", "Microsoft YaHei", "Yu Gothic", "Malgun Gothic", Tahoma, Arial, sans-serif; }
html:is([lang^="zh"],[lang="ja"],[lang="ko"],[lang="th"],[lang="ar"]) .hero h1 { font-size: clamp(2.8rem,5.8vw,6.1rem); line-height: 1.25; }
html:is([lang^="zh"],[lang="ja"],[lang="ko"],[lang="th"],[lang="ar"]) h2, html:is([lang^="zh"],[lang="ja"],[lang="ko"],[lang="th"],[lang="ar"]) h3 { line-height: 1.3; letter-spacing: 0; }
html:is([lang^="zh"],[lang="ja"],[lang="ko"],[lang="th"],[lang="ar"]) .page-hero h1 { line-height: 1.3; }
html:is([lang="ar"],[lang="th"]) .eyebrow, html:is([lang="ar"],[lang="th"]) .brand span, html:is([lang="ar"],[lang="th"]) .hero-meta { letter-spacing: 0; }
html[lang="ar"] { --body: Tahoma, "Segoe UI", Arial, sans-serif; }
html[lang="ar"] .hero-shade { background: linear-gradient(270deg,rgba(7,9,16,.94),rgba(7,9,16,.55) 50%,rgba(7,9,16,.2)),linear-gradient(0deg,rgba(7,9,16,.9),transparent 50%); }
[dir="rtl"] .header-actions { margin-left: 0; }
[dir="rtl"] .prose ul,[dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.5em; }
[dir="rtl"] .text-link > svg,[dir="rtl"] .button > svg { transform: scaleX(-1); }
[dir="rtl"] .toc { text-align: right; }
@media (max-width: 1100px) {
 .desktop-nav,.header-actions .button { display: none; }
 .header-actions { margin-inline-start: auto; }
 .menu-toggle { display: grid; }
 .header-inner .brand { flex-basis: auto; max-width: 65%; }
}
@media (max-width: 800px) {
 .footer-top { flex-direction: column; }
 .footer-links { width: 100%; gap: 12px 24px; }
 .language-panel { position: fixed; inset: 78px 12px auto; width: auto; max-height: calc(100dvh - 90px); padding: 18px; }
 .language-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .language-grid a { padding: 10px 8px; font-size: .85rem; }
 .header-actions { margin-left: 0; margin-inline-start: auto; gap: 8px; }
 .header-inner { gap: 10px; }
 .header-inner .brand { max-width: calc(100% - 140px); gap: 8px; }
 .header-inner .brand span { font-size: 1rem; }
 .header-inner .brand small { font-size: .5rem; letter-spacing: .07em; line-height: 1.3; }
 .header-inner .brand svg { width: 27px; height: 32px; }
 .language-selector > summary { padding: 8px; gap: 5px; }
 .language-selector > summary > span:last-child { display: none; }
 html:not([lang="en"]) .hero h1 { font-size: clamp(3.1rem,10vw,5.3rem); line-height: 1.1; }
 html:is([lang^="zh"],[lang="ja"],[lang="ko"],[lang="th"],[lang="ar"]) .hero h1 { font-size: clamp(2.5rem,9.5vw,4.5rem); line-height: 1.3; }
 html:not([lang="en"]) .page-hero h1 { font-size: clamp(2.5rem,10vw,4.5rem); line-height: 1.15; }
}
@media print { .language-selector { display: none; } }
