.legal-hero-shell {
  padding-bottom: 76px;
}

.legal-hero {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 12px;
  text-align: center;
}

.legal-hero h1 {
  max-width: 900px;
  margin: 16px auto 0;
  color: var(--hero-text);
  font-size: clamp(2.35rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

.legal-hero p {
  width: min(700px, 100%);
  margin: 22px auto 0;
  color: var(--hero-soft);
  font-size: 1rem;
  line-height: 1.8;
}

.legal-hero span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--hero-soft);
  font-size: 0.86rem;
  font-weight: 650;
}

.legal-site-root .menu-close {
  position: relative;
}

.legal-site-root .menu-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.legal-site-root .menu-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.legal-main {
  padding-top: 48px;
  gap: 0;
}

.legal-tabs {
  position: sticky;
  top: 86px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(760px, 100%);
  margin: 0 auto 32px;
  padding: 6px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: rgba(245, 245, 247, 0.84);
  backdrop-filter: blur(16px);
}

.legal-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  color: #333333;
  font-size: 0.86rem;
  font-weight: 600;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.legal-tabs a:hover,
.legal-tabs a:focus-visible {
  color: var(--green-deep);
  background: #ffffff;
}

.legal-tabs a:active {
  transform: translateY(1px);
}

.legal-card {
  scroll-margin-top: 142px;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 56px 0 58px;
  border: 0;
  border-top: 1px solid #e0e0e0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.legal-tabs + .legal-card {
  border-top: 0;
  padding-top: 18px;
}

.legal-card > p {
  margin: 0;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-card h2 {
  margin: 10px 0 28px;
  color: #1d1d1f;
  font-size: clamp(1.95rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
}

.legal-copy {
  display: block;
}

.legal-copy h3 {
  margin: 30px 0 8px;
  color: #1d1d1f;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.22px;
}

.legal-copy h3:first-child {
  margin-top: 0;
}

.legal-copy p {
  margin: 0;
  max-width: 680px;
  color: #333333;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: -0.22px;
}

@media (max-width: 900px) {
  .legal-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .legal-hero-shell {
    padding-bottom: 48px;
  }

  .legal-hero {
    width: min(100% - 24px, 980px);
    padding: 46px 0 8px;
    text-align: left;
  }

  .legal-main {
    padding-top: 36px;
  }

  .legal-tabs {
    position: static;
    width: min(100% - 24px, 760px);
    border-radius: 18px;
  }

  .legal-tabs a {
    flex: 1 1 auto;
    min-width: 132px;
  }

  .legal-card {
    width: min(100% - 28px, 760px);
    padding: 38px 0 40px;
  }

  .legal-tabs + .legal-card {
    padding-top: 10px;
  }

  .legal-card h2 {
    font-size: 1.95rem;
  }

  .legal-copy p {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.72;
  }
}
