:where(a, button, [role='button'], summary, input, select, textarea):focus-visible {
  outline: 3px solid rgba(75, 56, 255, 0.34);
  outline-offset: 3px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 24px;
  padding: 3px;
  border: 1px solid var(--border, #e6e8f0);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px -20px rgba(7, 27, 58, 0.5);
  flex: none;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--navy-70, #33415c);
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.lang-switch a:hover {
  color: var(--navy, #071b3a);
  background: var(--lavender-bg, #f5f3ff);
}

.lang-switch a[aria-current='page'] {
  color: #fff;
  background: var(--navy, #071b3a);
}

.lang-switch a:focus-visible {
  outline: 3px solid rgba(75, 56, 255, 0.28);
  outline-offset: 2px;
}

.lang-switch.is-loading a {
  pointer-events: none;
}

.lang-switch.is-loading a[aria-current='page'] {
  animation: lang-switch-pulse 700ms ease-in-out infinite alternate;
}

.lang-switch-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes lang-switch-pulse {
  to { opacity: 0.58; }
}

@keyframes language-view-out {
  to { opacity: 0.72; }
}

@keyframes language-view-in {
  from { opacity: 0.72; }
}

::view-transition-old(root) {
  animation: 110ms ease-out both language-view-out;
}

::view-transition-new(root) {
  animation: 170ms ease-out both language-view-in;
}

.wrap > .lang-switch {
  margin: -18px 0 28px;
}

@media (max-width: 900px) {
  .lang-switch {
    margin-left: auto;
    margin-right: 4px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: clip;
  }

  /* Keep the fixed mobile menu tied to the viewport, even when page content has wide internals. */
  .nav {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width: 400px) {
  .lang-switch {
    gap: 1px;
    padding: 2px;
  }

  .lang-switch a {
    min-width: 27px;
    height: 27px;
    padding: 0 5px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch,
  .lang-switch a,
  .lang-switch.is-loading a[aria-current='page'],
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
    transition: none;
  }
}
