/* The language control stays outside the collapsible navigation. */
.topbar .brand { flex-shrink: 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-switcher { position: relative; color: #5f6e7f; font-size: 13px; line-height: 1.5; }
.language-summary { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 8px; border-radius: 3px; cursor: pointer; list-style: none; white-space: nowrap; }
.language-summary::-webkit-details-marker { display: none; }
.language-summary::marker { content: ""; }
.language-summary:hover, .language-switcher[open] .language-summary { color: #245da7; background: #e1edfc; }
.language-summary:focus-visible, .language-option:focus-visible { outline: 2px solid #245da7; outline-offset: 3px; }
.language-icon, .language-chevron, .language-check { display: block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.language-icon { width: 18px; height: 18px; }
.language-chevron { width: 12px; height: 12px; }
.language-switcher[open] .language-chevron { transform: rotate(180deg); }
.language-short { display: none; }
.language-options { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: max-content; min-width: 176px; max-width: min(280px, calc(100vw - 28px)); max-height: min(320px, calc(100dvh - 100px)); margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #c9def6; border-radius: 4px; background: #f8fbff; list-style: none; }
.language-option { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 10px 12px; border-radius: 2px; color: #334155; text-decoration: none; overflow-wrap: anywhere; }
.language-option:hover { background: #eaf2fe; color: #245da7; }
.language-option[aria-current="true"] { color: #245da7; background: #e4efff; font-weight: 600; }
.language-check { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .topbar .nav { gap: 12px; }
  .nav-actions { margin-left: auto; }
  .nav-actions .menu-toggle { display: block; min-width: 44px; min-height: 44px; font: inherit; font-size: 13px; }
  .topbar .nav-links { display: none; position: absolute; left: 14px; right: 14px; top: calc(100% - 1px); flex-direction: column; align-items: stretch; margin-left: 0; padding: 9px; border: 1px solid var(--lx-line); border-radius: 3px; background: #eef6ff; box-shadow: 0 12px 25px rgba(53, 96, 148, .1); }
  .topbar .nav-links.open { display: flex; }
  .topbar .nav-links a { display: flex; align-items: center; min-height: 44px; text-align: left; }
  .topbar .nav-links a.active { box-shadow: inset 2px 0 0 var(--lx-blue); }
  .language-full { display: none; }
  .language-short { display: inline; }
}

@media (max-width: 380px) {
  .topbar .nav { gap: 8px; }
  .nav-actions { gap: 4px; }
  .topbar .brand { gap: 6px; font-size: 16px; }
  .topbar .brand-icon { width: 25px; height: 25px; }
  .language-summary { gap: 5px; padding: 0 5px; }
}
