.language-switch{display:inline-flex;align-items:center;flex-shrink:0}
.language-switch[hidden],.language-switch select{display:none}
.language-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;min-width:88px;height:44px;margin:0;padding:0 16px;border:1px solid var(--control-border);border-radius:10px;background:var(--control-surface);color:var(--control-foreground);font-family:inherit;font-size:1rem;font-weight:600;line-height:1.6;letter-spacing:normal;cursor:pointer}
:root[data-theme=dark] .language-trigger{border:0;padding-inline:17px}
.language-arrow{display:block;flex:0 0 12px;width:12px;height:12px;background:url('../img/language-chevron-24488495fdcf.svg') center/contain no-repeat;transform:rotate(90deg)}
.language-trigger:hover{background:color-mix(in srgb,var(--accent) 12%,var(--control-surface) 88%);color:var(--control-foreground);border-color:var(--control-border)}
.language-trigger:active{background:color-mix(in srgb,var(--accent) 12%,var(--control-surface) 88%);color:var(--control-foreground)}
.language-trigger:focus-visible{outline:3px solid var(--focus-ring,var(--focus));outline-offset:3px}
.language-options{position:fixed;z-index:1000;box-sizing:border-box;padding:4px;border:1px solid var(--control-border);border-radius:10px;background:var(--control-surface);color:var(--control-foreground);overflow-y:auto;box-shadow:0 8px 24px #0002}
.language-options[hidden]{display:none}
:root[data-theme=dark] .language-options{border:0;padding:5px}
.language-option{display:block;box-sizing:border-box;width:100%;min-height:44px;padding:8px 12px;border:0;border-radius:6px;background:transparent;color:var(--control-foreground);font:inherit;text-align:left;cursor:pointer}
.language-option[aria-selected=true]{background:color-mix(in srgb,var(--control-border) 35%,var(--control-surface) 65%)}
.language-option:hover,.language-option:active{background:color-mix(in srgb,var(--accent) 12%,var(--control-surface) 88%);color:var(--control-foreground)}
.language-option:focus-visible{outline:2px solid var(--control-foreground);outline-offset:-2px}
@media(max-width:820px){.language-trigger{font-size:20px;font-weight:600}}
.mobile-scroll .language-trigger{font-size:20px;font-weight:600}
.nav-tools{gap:12px}
.mobile-theme{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.mobile-menu-footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
@media(min-width:821px){#global-controls>.mobile-menu-footer{flex-wrap:nowrap}}
@media(max-width:820px){.mobile-menu-footer{justify-content:space-between}}
/* AXIA Framework V3.5: global appearance/social controls only. */
:root{--control-surface:#f8fafc;--control-foreground:#111827;--control-border:#d1d5db}
:root[data-theme=dark]{--control-surface:#fff}
.theme-switch,.theme-shell{background:var(--control-surface);border:1px solid var(--control-border);padding:3px;width:52px;height:52px;box-sizing:border-box}
:root[data-theme=dark] .theme-switch,:root[data-theme=dark] .theme-shell{background:var(--control-surface);border:0;padding:4px}
.theme-toggle,#theme-toggle{background:transparent;color:var(--control-foreground);border:1px solid transparent;border-radius:50%;width:44px;height:44px;box-sizing:border-box}
.theme-toggle:hover,#theme-toggle:hover,:root[data-theme=dark] .theme-toggle:hover,#theme-toggle:hover:not(:active){background:color-mix(in srgb,var(--accent) 12%,var(--control-surface) 88%);border-color:var(--accent);color:var(--control-foreground)}
.theme-toggle:active,#theme-toggle:active,:root[data-theme=dark] .theme-toggle:active{background:color-mix(in srgb,var(--accent) 12%,var(--control-surface) 88%);border-color:var(--accent);color:var(--control-foreground)}
.theme-toggle:focus-visible,#theme-toggle:focus-visible{outline:3px solid var(--focus-ring,var(--focus));outline-offset:3px}
.nav-tools>.social-link:not(:hover):not(:active):not(:focus-visible){color:var(--control-foreground)}
@media(max-width:820px){.theme-switch{width:auto;height:auto;padding:min(3px,.6944vw)}:root[data-theme=dark] .theme-switch{padding:calc(min(3px,.6944vw) + 1px)}}
/* Allow localized diagram labels to wrap within the existing editorial grid. */
.hero>*,.network-graphic>*{min-width:0}
.network-graphic{grid-template-columns:repeat(2,minmax(0,1fr))}
.network-graphic span{overflow-wrap:anywhere}

/* Keep navigation text and controls centered; the underline does not consume layout height. */
@media(min-width:821px){
.desktop-nav .nav-pages a{position:relative;border-bottom:0;min-height:44px}
.desktop-nav .nav-pages a::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:transparent;pointer-events:none}
.desktop-nav .nav-pages a:hover::after{background:var(--text-heading)}
.desktop-nav .nav-pages a[aria-current]::after,.desktop-nav .nav-pages a:active::after{background:var(--accent)}
}
