.legal-page {
  min-height: 100svh;
  padding-top: var(--nav-height);
  color: var(--color-text);
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 132, 64, 0.08), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(2, 92, 151, 0.08), transparent 36%),
    linear-gradient(180deg, #f7fbfa 0%, #ffffff 48%, #f4f8f7 100%);
}

.legal-hero {
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(1.6rem, 4vw, 3rem);
}

.legal-hero__kicker {
  margin: 0 0 0.8rem;
  color: var(--color-secondary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-hero__title {
  max-width: 880px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.15rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.legal-hero__summary {
  max-width: 760px;
  margin: clamp(1rem, 2vw, 1.45rem) 0 0;
  color: rgba(17, 17, 17, 0.62);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.75;
}

.legal-shell {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.6rem);
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1.25rem);
  display: grid;
  gap: 1rem;
}

.legal-index,
.legal-contact-card,
.legal-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(7, 30, 46, 0.075);
  box-shadow:
    0 18px 55px rgba(7, 30, 46, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.legal-index {
  display: grid;
  gap: 0.24rem;
  padding: 0.75rem;
  border-radius: 18px;
}

.legal-index__label {
  padding: 0.45rem 0.58rem 0.65rem;
  color: rgba(17, 17, 17, 0.48);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-index a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0.58rem 0.68rem;
  color: rgba(17, 17, 17, 0.58);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  border-radius: 12px;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.legal-index a:hover,
.legal-index a[aria-current="page"] {
  color: var(--color-secondary);
  background: rgba(0, 132, 64, 0.085);
}

.legal-index a:hover {
  transform: translateX(2px);
}

.legal-contact-card {
  display: grid;
  gap: 0.38rem;
  padding: 1rem;
  border-radius: 18px;
}

.legal-contact-card span {
  color: rgba(17, 17, 17, 0.45);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-contact-card a {
  color: rgba(17, 17, 17, 0.68);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

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

.legal-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3.5vw, 3.4rem);
  border-radius: clamp(20px, 2.4vw, 30px);
}

.legal-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 92px;
  height: 92px;
  content: "";
  background: linear-gradient(135deg, transparent 0 50%, rgba(0, 132, 64, 0.13) 50% 100%);
  pointer-events: none;
}

.legal-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.legal-content__section + .legal-content__section,
.legal-content-from-editor h2,
.legal-content-from-editor h3 {
  margin-top: clamp(1.6rem, 3vw, 2.25rem);
}

.legal-content h2,
.legal-content-from-editor h2 {
  margin-bottom: 0.65rem;
  color: var(--color-text);
  font-size: clamp(1.12rem, 1.8vw, 1.48rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.legal-content h3,
.legal-content-from-editor h3 {
  margin-bottom: 0.55rem;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.legal-content p,
.legal-content li,
.legal-content-from-editor p,
.legal-content-from-editor li {
  color: rgba(17, 17, 17, 0.68);
  font-size: clamp(0.93rem, 1.1vw, 1rem);
  line-height: 1.78;
}

.legal-content p + p,
.legal-content-from-editor p + p {
  margin-top: 0.7rem;
}

.legal-content ul,
.legal-content-from-editor ul,
.legal-content-from-editor ol {
  display: grid;
  gap: 0.42rem;
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
  list-style: disc;
}

.legal-content-from-editor ol {
  list-style: decimal;
}

.legal-content li::marker,
.legal-content-from-editor li::marker {
  color: var(--color-secondary);
}

.legal-details {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
}

.legal-details div {
  display: grid;
  grid-template-columns: minmax(118px, 0.38fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.68rem 0.78rem;
  background: rgba(0, 132, 64, 0.045);
  border: 1px solid rgba(0, 132, 64, 0.09);
  border-radius: 12px;
}

.legal-details dt {
  color: rgba(17, 17, 17, 0.46);
  font-size: 0.78rem;
  font-weight: 800;
}

.legal-details dd {
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

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

  .legal-sidebar {
    position: static;
  }

  .legal-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-index__label {
    grid-column: 1 / -1;
  }
}

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

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

  .legal-details div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
