.i18n-switch { margin-top: 12px; font-size: .85rem; line-height: 1.8; }
.i18n-switch a, .i18n-switch span { color: inherit; }
.i18n-switch [aria-current] { font-weight: 700; }

/* Native details keeps the language links usable before JavaScript loads. */
.language-picker {
  position: relative;
  flex: 0 0 auto;
  margin-inline-start: 12px;
  color: var(--ink, #3D2B1F);
  font-family: system-ui, sans-serif;
  line-height: 1.4;
}
.language-picker summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  list-style: none;
  cursor: pointer;
  color: inherit;
  transition: background-color .15s, color .15s;
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:hover,
.language-picker[open] summary {
  color: var(--pink-accessible, #B83280);
  background: rgba(193, 59, 136, .08);
}
.language-picker summary:focus-visible,
.language-options a:focus-visible,
.language-suggestion a:focus-visible,
.language-suggestion button:focus-visible {
  outline: 3px solid var(--purple-deep, #7950A0);
  outline-offset: 3px;
}
.language-picker summary svg { width: 20px; height: 20px; }
.language-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 2;
  width: 192px;
  padding: 6px;
  border: 1px solid rgba(121, 80, 160, .16);
  border-radius: 16px;
  background: var(--cream, #FFF8F0);
  box-shadow: 0 8px 24px rgba(61, 43, 31, .12);
}
.language-options a,
.language-options span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink, #3D2B1F);
  text-decoration: none;
}
.language-options a:hover,
.language-options [aria-current="page"] {
  color: var(--purple-deep, #7950A0);
  background: rgba(121, 80, 160, .08);
  text-decoration: none;
}
.language-options [aria-current="page"] { font-weight: 650; }
.language-options svg { width: 16px; height: 16px; }

/* Align to the primary navigation, including the article pages' static bars. */
.nav-inner, body > nav:not(#nav) { position: relative; }
body > nav > .back { margin-inline-start: auto; }
.language-suggestion {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: calc(100vw - 48px);
  padding: 6px 6px 6px 16px;
  border: 1px solid rgba(121, 80, 160, .16);
  border-radius: 16px;
  background: var(--cream, #FFF8F0);
  box-shadow: 0 8px 24px rgba(61, 43, 31, .12);
  font-family: system-ui, sans-serif;
  font-size: .94rem;
}
.language-suggestion a {
  padding-block: 10px;
  color: var(--purple-deep, #7950A0);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.language-suggestion button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-inline-start: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink, #3D2B1F);
  font-size: 1.35rem;
  cursor: pointer;
}
.language-suggestion button:hover { background: rgba(121, 80, 160, .08); }
@media (prefers-reduced-motion: reduce) {
  .language-picker summary { transition: none; }
}
