.language-picker { position: relative; flex: none; }
.language-picker summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 48px;
  min-height: 44px;
  padding-inline: 8px;
  cursor: pointer;
  list-style: none;
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after {
  content: '';
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  width: 5px;
  height: 5px;
  transform: translateY(-2px) rotate(45deg);
}
.language-picker[open] summary::after { transform: translateY(1px) rotate(225deg); }
.language-picker img {
  flex: none;
  width: 24px;
  height: 16px;
  object-fit: contain;
}
.language-picker ul {
  position: absolute;
  z-index: 35;
  inset: 100% 0 auto auto;
  min-width: 190px;
  max-height: calc(100dvh - 105px);
  overflow-y: auto;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--mid);
  box-shadow: 0 8px 16px #1e2d481a;
}
.language-picker .language-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.language-picker .language-choice:hover,
.language-picker .language-choice[aria-current] { background: var(--light); }
.language-picker .language-choice[aria-current] { font-weight: 700; }
.language-picker summary:focus-visible,
.language-picker .language-choice:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Long translations must not enlarge the mobile grid's minimum width. */
html:is([lang="de"], [lang="es-ES"], [lang="es-MX"], [lang="ru"], [lang="ja"]) :is(main, .site-footer) {
  overflow-wrap: anywhere;
}
html[lang="de"] :is(main, .site-footer) { hyphens: auto; }
html:is([lang="de"], [lang="es-ES"], [lang="es-MX"], [lang="ru"], [lang="ja"]) .home-hero {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 600px) {
  .header-inner:has(.language-picker) { gap: 8px; }
}
@media (max-width: 900px) {
  .about-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-split .group-panel img {
    max-width: min(100%, 350px);
  }
  html:is([lang="de"], [lang="es-ES"], [lang="es-MX"], [lang="ru"], [lang="ja"]) .subnav-group {
    min-width: 0;
    max-width: 100%;
  }
  html:is([lang="de"], [lang="es-ES"], [lang="es-MX"], [lang="ru"], [lang="ja"]) .subnav-group .sub {
    white-space: normal;
  }
}
