/* Compact, always-visible language links; the current page is the source of truth. */
.language-switch { display: inline-flex; flex: 0 0 auto; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: .75rem; background: var(--panel); }
.language-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 36px; border-radius: .5rem; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none; }
.language-switch a[aria-current] { background: #00d2ff; color: #070f1e; }
.language-switch a:hover { color: var(--ink); background: var(--hover-surface); }
.language-switch a[aria-current]:hover { background: #00d2ff; color: #070f1e; }
.language-switch a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.header-controls { flex-shrink: 0; }
@media (max-width: 639px) {
    .header-controls { gap: .375rem; }
    .brand-link { gap: .375rem; }
    .brand-link .brand-wordmark { width: 6rem; }
    .brand-link .brand-symbol { width: 2.25rem; height: 2.25rem; }
    .brand-link > div > span { max-width: 8rem; white-space: normal; font-size: 7px; }
    .brand-link > div > div { gap: .25rem; }
}
@media (max-width: 359px) {
    .brand-link .brand-wordmark { width: 4.5rem; }
    .brand-link .brand-symbol { width: 1.75rem; height: 1.75rem; }
    .brand-link > div > div > span { display: none; }
    .brand-link > div > span { max-width: 5rem; font-size: 6px; }
    .language-switch { padding: 2px; gap: 0; }
    .language-switch a { min-width: 28px; min-height: 38px; }
}
/* A translated desktop header needs room for both language and theme controls. */
@media (min-width: 1280px) {
    #main-header .brand-link .brand-wordmark { width: 7rem; }
    #main-header .brand-link .brand-symbol { width: 2.5rem; height: 2.5rem; }
    #main-header .brand-link > div > span { max-width: 10.5rem; white-space: normal; font-size: 7px; }
}
#main-header nav.language-switch a::after { content: none; }
@media (min-width: 360px) and (max-width: 399px) {
    .brand-link .brand-wordmark { width: 5rem; }
    .brand-link .brand-symbol { width: 2rem; height: 2rem; }
}
