.legal-page {
  background: var(--section-alt);
}

.legal-shell {
  padding-top: 5.5rem;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1rem 2.5rem;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(15, 26, 46, 0.98) 0%, rgba(15, 26, 46, 0.92) 100%);
}

.legal-hero::after {
  content: "";
  position: absolute;
  inset: auto -5% -35% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 198, 218, 0.16), transparent 68%);
  pointer-events: none;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(38, 198, 218, 0.16);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-hero h1 {
  margin: 1rem 0 0;
  color: var(--hero-fg);
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 860px;
}

.legal-updated {
  margin-top: 0.75rem;
  color: var(--hero-muted);
  font-size: 0.92rem;
}

.legal-content {
  padding: 2rem 1rem 5rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.legal-summary {
  position: sticky;
  top: 6.5rem;
}

.legal-summary-card {
  padding: 1.25rem;
  border-radius: 1.2rem;
  background: #fff;
  border: 1px solid rgba(15, 26, 46, 0.08);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.75rem;
}

.legal-summary-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.legal-summary-card a,
.legal-print {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  color: var(--navy);
  background: rgba(15, 26, 46, 0.04);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.legal-summary-card a:hover,
.legal-print:hover {
  background: rgba(38, 198, 218, 0.12);
}

.legal-sections {
  display: grid;
  gap: 1.5rem;
}

.legal-card {
  padding: 2.25rem;
  border: 1px solid rgba(15, 26, 46, 0.08);
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.8;
  white-space: normal;
}

.legal-anchor-label {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-card strong,
.legal-card b {
  color: var(--navy);
}

.legal-card a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(38, 198, 218, 0.45);
  text-underline-offset: 0.18em;
}

.legal-card a:hover {
  color: var(--accent);
}

.legal-card br + br {
  content: "";
  display: block;
  margin-top: 0.9rem;
}

.legal-card h2,
.legal-card h3,
.legal-card h4 {
  color: var(--navy);
}

.legal-back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.legal-back-top:hover {
  background: var(--accent-dark);
}

@media print {
  .header,
  .footer,
  .lgpd-banner,
  .legal-summary,
  .legal-back-top,
  .whatsapp-float {
    display: none !important;
  }

  .legal-shell,
  .legal-content,
  .legal-card {
    padding: 0;
    box-shadow: none;
    border: 0;
    background: #fff;
  }

  .legal-layout {
    display: block;
  }
}

@media (max-width: 577px) {
  .legal-hero {
    padding-top: 4rem;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-summary {
    position: static;
  }

  .legal-card {
    padding: 1.25rem;
    border-radius: 1rem;
  }
}
