.legal-page {
  min-height: 100vh;
  background: var(--tone-light);
  color: var(--ink);
}

.legal-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--tone-light);
}

.legal-header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  color: var(--ink-strong);
  text-decoration: none;
}

.legal-seal {
  width: 34px;
  height: 27px;
  flex: 0 0 auto;
  color: var(--accent-press);
}

.legal-wordmark,
.legal-back {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1.45;
  text-transform: uppercase;
}

.legal-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 300ms var(--ease), text-decoration-color 300ms var(--ease);
}

.legal-back:hover,
.legal-back:focus-visible {
  color: var(--ink-strong);
  text-decoration-color: currentColor;
}

.legal-main {
  padding-block: clamp(72px, 10vw, 128px);
}

.legal-document {
  max-width: 680px;
  margin-inline: auto;
}

.legal-kicker,
.legal-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
}

.legal-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-press);
  letter-spacing: 0.35em;
}

.legal-kicker::before {
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  content: "";
}

.legal-title {
  max-width: 12ch;
  margin-top: 28px;
  color: var(--ink-strong);
}

.legal-updated {
  margin-top: 20px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.legal-document > .legal-copy:first-of-type {
  margin-top: clamp(40px, 6vw, 64px);
  color: var(--ink-strong);
  font-size: clamp(18px, 1rem + 0.35vw, 21px);
  line-height: 1.7;
}

.legal-section-title {
  margin-top: clamp(44px, 7vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1.45;
  text-transform: uppercase;
}

.legal-copy {
  margin-top: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal-copy a {
  color: var(--accent-press);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.legal-not-found {
  display: grid;
  min-height: calc(100vh - 77px);
  place-items: center;
  padding-block: 64px;
}

.legal-not-found-card {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.legal-not-found-label {
  color: var(--accent-press);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35em;
  line-height: 1.45;
  text-transform: uppercase;
}

.legal-not-found-title {
  max-width: 13ch;
  margin: 28px auto 0;
  color: var(--ink-strong);
}

.legal-not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 44px;
}

.legal-btn-ghost,
.legal-support-link {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.45;
  text-transform: uppercase;
}

.legal-btn-ghost {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--ink-strong);
  text-decoration: none;
  transition: border-color 300ms var(--ease), color 300ms var(--ease);
}

.legal-btn-ghost:hover,
.legal-btn-ghost:focus-visible {
  border-color: var(--accent-press);
  color: var(--accent-press);
}

.legal-support-link {
  color: var(--accent-press);
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

@media (max-width: 599px) {
  .legal-header-inner {
    min-height: 68px;
  }

  .legal-wordmark {
    display: none;
  }

  .legal-main {
    padding-block: 64px 88px;
  }

  .legal-not-found {
    min-height: calc(100vh - 69px);
  }

  .legal-not-found-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-btn-ghost,
  .legal-support-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-back,
  .legal-btn-ghost {
    transition: none;
  }
}
