body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 60px);
  border-bottom: 0;
  box-shadow: inset 0 -1px rgba(23, 23, 20, 0.18);
}

.legal-main {
  flex: 1;
}

.legal-links {
  position: static;
  align-self: center;
  display: flex;
  gap: 14px;
  margin: 0 auto 18px;
  opacity: 0.42;
  transition: opacity 0.2s;
}

.legal-links:hover,
.legal-links:focus-within {
  opacity: 1;
}

.legal-links a {
  color: var(--ink);
  font: 500 8px "DM Mono", monospace;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  border-color: currentColor;
}

@media (max-width: 620px) {
  .legal-links { margin-bottom: 8px; }
}

.legal-main h1 {
  max-width: 100%;
  font-size: clamp(28px, 7.2vw, 64px);
  line-height: 1;
  white-space: nowrap;
}

.language-switch {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(23, 23, 20, 0.35);
  font: 500 9px "DM Mono", monospace;
  letter-spacing: 0.08em;
}

.language-switch a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.4;
}

.language-switch a:hover,
.language-switch a:focus-visible,
.language-switch a[aria-current="page"] {
  opacity: 1;
}

.translation-note {
  max-width: 620px;
  margin: 0 0 42px;
  color: rgba(23, 23, 20, 0.58);
  font: 400 10px/1.6 "DM Mono", monospace;
}

@media (max-width: 540px) {
  .legal-header { height: 72px; }
  .language-switch {
    top: 70px;
    padding: 5px 8px;
    background: var(--paper);
  }
}

@media (max-height: 600px) {
  .legal-header { height: 55px; }
}
