/* ================= language switcher ================= */
.lang { position: relative; margin-left: auto; }
.nav-inner .nav-actions { margin-left: 0; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--text); font-weight: 800; font-size: 13px; letter-spacing: 0.04em; transition: background 0.2s, border-color 0.2s; }
.lang-btn:hover, .lang-btn[aria-expanded='true'] { background: var(--panel-2); border-color: rgba(255, 255, 255, 0.25); }
.lang-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; opacity: 0.85; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 200px; list-style: none; padding: 6px; border-radius: 16px; background: #0f1226; border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9); animation: pop 0.2s ease-out; }
.lang-menu[hidden] { display: none; }
.lang-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; color: #d6daf2; text-align: left; transition: background 0.15s; }
.lang-menu button b { width: 26px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.lang-menu button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.lang-menu button.on { background: rgba(139, 92, 246, 0.18); color: #fff; }
.lang-menu button.on b { color: var(--cyan); }

.foot-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.foot-langs button { color: var(--dim); font-size: 13px; font-weight: 600; transition: color 0.2s; }
.foot-langs button:hover, .foot-langs button.on { color: var(--text); }

@media (max-width: 820px) {
  .lang-btn { height: 40px; padding: 0 10px; }
  .lang-btn span { font-size: 12px; }
}
@media (max-width: 420px) {
  .lang-btn svg { display: none; }
  .nav-inner { gap: 8px; }
}

/* never allow sideways scrolling: decorative glows/grids overflow the viewport on purpose */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.hero-title .nowrap { white-space: nowrap; }
.hero-title .nowrap { white-space: nowrap; }
@media (max-width: 820px) {
  .lang { position: static; }
  .lang-menu { right: 16px; top: calc(100% + 6px); min-width: 210px; }
}
