html[data-locale] { overflow-x: hidden; }

.home-page,
.legal-page { overflow-x: clip; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.locale-picker {
  position: relative;
}

.locale-picker summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
}

.locale-picker summary::-webkit-details-marker { display: none; }
.locale-picker summary:hover { border-color: var(--line-strong); }
.locale-picker summary:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
.locale-globe { font-size: 15px; line-height: 1; filter: saturate(.8); }

.locale-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.locale-menu a {
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.locale-menu a:hover,
.locale-menu a:focus-visible,
.locale-menu a[aria-current="true"] {
  background: var(--surface-soft);
  color: var(--text);
}

.translation-notice {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.legal-page .document h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 960px) {
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 620px) {
  html[data-locale] .hero-copy { min-width: 0; width: 100%; }
  html[data-locale] .hero h1 { max-width: 100%; }
  html[data-locale="de"] .hero h1 { font-size: clamp(40px, 11vw, 54px); hyphens: auto; overflow-wrap: anywhere; }
  .brand-copy strong { max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .locale-picker summary { min-width: 68px; justify-content: center; padding: 0 9px; }
  .theme-switch-label,
  .theme-switch [data-theme-label] { display: none; }
  .theme-switch { width: 48px; min-width: 48px; justify-content: center; overflow: hidden; padding: 7px 5px; }
  .legal-page .document h1 { font-size: clamp(38px, 11vw, 52px); letter-spacing: -.045em; }
}
