/* RouterIP.cc language switcher (header dropdown + footer list) */
.lang-switch{position:relative;order:3}
.lang-switch>summary{list-style:none;display:inline-flex;align-items:center;gap:.35rem;cursor:pointer;color:#e2e8f0;border:1px solid rgba(226,232,240,.35);border-radius:9px;padding:.38rem .6rem;font-size:.9rem;font-weight:600;line-height:1;user-select:none;white-space:nowrap}
.lang-switch>summary::-webkit-details-marker{display:none}
.lang-switch>summary:hover,.lang-switch[open]>summary{background:#ffffff14}
.lang-switch>summary svg{flex:none}
.lang-switch .ls-caret{transition:transform .15s}
.lang-switch[open] .ls-caret{transform:rotate(180deg)}
.lang-switch .ls-panel{position:absolute;top:calc(100% + .5rem);right:0;z-index:1000;width:min(22rem,calc(100vw - 2rem));max-height:min(70vh,26rem);overflow-y:auto;background:var(--card,#fff);color:var(--text,#0b1526);border:1px solid var(--border,#e2e8f0);border-radius:12px;box-shadow:0 18px 40px rgba(11,21,38,.25);padding:.5rem}
.lang-switch .ls-title{margin:.25rem .5rem .5rem;font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted,#64748b)}
.lang-switch ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:2px}
.lang-switch li a{display:block;padding:.55rem .65rem;border-radius:8px;color:var(--text,#0b1526)!important;text-decoration:none;font-size:.95rem}
.lang-switch li a:hover,.lang-switch li a:focus-visible{background:var(--accent-soft,#ecfeff)}
.lang-switch li a[aria-current=page]{background:var(--accent,#0891b2);color:#fff!important;font-weight:600}
[dir=rtl] .lang-switch .ls-panel{right:auto;left:0}
.header-inner>.lang-switch{order:3;margin-left:.5rem}
@media(max-width:760px){
  .header-inner>.lang-switch{margin-left:auto}
  .header-inner>.lang-switch~.nav-toggle{margin-left:.5rem}
  .lang-switch .ls-label{display:none}
  .header-inner{position:relative}
  .lang-switch{position:static}
  .lang-switch .ls-panel,[dir=rtl] .lang-switch .ls-panel{top:calc(100% + .25rem);left:.75rem;right:.75rem;width:auto;max-height:70vh}
  .lang-switch li a{padding:.7rem .65rem}
  [dir=rtl] .header-inner>.lang-switch{margin-left:0;margin-right:auto}
}
.lang-list{columns:2;column-gap:1rem}
.lang-list li{break-inside:avoid}
html[dir=rtl] .skip-link{left:auto;right:-9999px}
html[dir=rtl] .skip-link:focus{right:0}
html[dir=rtl],html[dir=rtl] body{overflow-x:hidden}
/* v4: footer language switch (replaces the long footer list) */
.lang-switch-footer{display:inline-block;position:relative;order:0;margin-top:.25rem}
.lang-switch-footer>summary{color:inherit;border-color:currentColor}
.lang-switch-footer .ls-panel{top:auto;bottom:calc(100% + .5rem);left:0;right:auto}
[dir=rtl] .lang-switch-footer .ls-panel{left:auto;right:0}
.footer-lang{margin-top:1.25rem}
@media(max-width:760px){
  .lang-switch.lang-switch-footer{position:relative}
  .lang-switch-footer .ls-label{display:inline}
  .lang-switch-footer .ls-panel,[dir=rtl] .lang-switch-footer .ls-panel{top:auto;bottom:calc(100% + .25rem);left:0;right:auto;width:min(20rem,calc(100vw - 2rem))}
  [dir=rtl] .lang-switch-footer .ls-panel{left:auto;right:0}
}
