.legal-body {
  padding-bottom: 0;
  background: #fafaf8;
}

.legal-navbar {
  background: rgba(250, 250, 248, .94);
  backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(232, 230, 224, .72);
}

.legal-page {
  background: #fafaf8;
}

.legal-hero {
  padding: 140px 0 64px;
  background: #141412;
  color: #f8f8f6;
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .28;
}

.legal-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.legal-back {
  display: inline-flex;
  margin-bottom: 2.2rem;
  font-family: "Geist Mono", monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.48);
  transition: color .2s;
}

.legal-back:hover {
  color: #fff;
}

.legal-hero__title {
  max-width: 760px;
  margin-bottom: 1.2rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
  color: #f8f8f6;
}

.legal-hero__copy {
  max-width: 680px;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,.58);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.8;
}

.legal-hero__meta {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2rem;
  font-family: "Geist Mono", monospace;
  font-size: .72rem;
  color: rgba(255,255,255,.42);
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.legal-tabs__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .72rem 1.2rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  color: rgba(255,255,255,.62);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .9rem;
  font-weight: 700;
  transition: all .2s;
}

.legal-tabs__link:hover,
.legal-tabs__link.active {
  border-color: rgba(255,255,255,.28);
  background: #fff;
  color: #18171a;
}

.legal-content {
  padding: 72px 0 110px;
  overflow: visible;
}

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

.legal-toc {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1.2rem;
  border: 1px solid #e8e6e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.legal-toc__title {
  margin-bottom: .65rem;
  font-family: "Geist Mono", monospace;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #9e9a95;
}

.legal-toc a {
  padding: .48rem 0;
  color: #6b6760;
  font-size: .86rem;
  line-height: 1.35;
  transition: color .2s, transform .2s;
}

.legal-toc a:hover {
  color: #4338ca;
  transform: translateX(3px);
}

.legal-document {
  min-width: 0;
}

.legal-updated {
  display: inline-flex;
  margin-bottom: 1.5rem;
  padding: .48rem .78rem;
  border: 1px solid #e8e6e0;
  border-radius: 100px;
  background: #fff;
  color: #6b6760;
  font-family: "Geist Mono", monospace;
  font-size: .72rem;
}

.legal-callout {
  margin-bottom: 2.25rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid #e8e6e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.legal-callout strong {
  display: block;
  margin-bottom: .35rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1rem;
  color: #18171a;
}

.legal-callout p {
  margin: 0;
  color: #6b6760;
  font-size: .95rem;
  line-height: 1.75;
}

.legal-callout--info {
  border-color: rgba(67,56,202,.18);
  background: #eef2ff;
}

.legal-callout--danger {
  border-color: rgba(232,71,10,.2);
  background: #fff4ef;
}

.legal-callout--warning {
  border-color: rgba(245,158,11,.24);
  background: #fff8eb;
}

.legal-section {
  padding: 2.75rem 0;
  border-top: 1px solid #e8e6e0;
  scroll-margin-top: 110px;
  overflow: visible;
}

.legal-section:first-of-type {
  border-top: 0;
  padding-top: .5rem;
}

.legal-section__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .86rem;
  font-weight: 800;
}

.legal-section h2 {
  max-width: 760px;
  margin-bottom: 1rem;
  color: #18171a;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.65rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.legal-section h3 {
  margin-bottom: .35rem;
  color: #18171a;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.legal-section p,
.legal-section li {
  max-width: 830px;
  color: #6b6760;
  font-size: .98rem;
  line-height: 1.82;
}

.legal-section p + p {
  margin-top: .85rem;
}

.legal-section a {
  color: #4338ca;
  font-weight: 600;
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-section ul {
  display: flex;
  flex-direction: column;
  gap: .72rem;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  list-style: disc;
}

.legal-section li::marker {
  color: #4338ca;
}

.legal-table-wrap {
  max-width: 100%;
  margin-top: 1.25rem;
  overflow-x: auto;
  border: 1px solid #e8e6e0;
  border-radius: 18px;
  background: #fff;
}

.legal-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e8e6e0;
  text-align: left;
  vertical-align: top;
  font-size: .9rem;
  line-height: 1.55;
}

.legal-table th {
  background: #f5f4ef;
  color: #18171a;
  font-family: "Geist Mono", monospace;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 830px;
  margin-top: 1.25rem;
  padding: 1.5rem;
  border: 1px solid #e8e6e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.legal-contact p {
  margin: 0;
  font-size: .9rem;
}

@media (max-width: 1024px) {
  .legal-content__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .legal-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .legal-hero {
    padding: 108px 0 48px;
  }

  .legal-content {
    padding: 48px 0 76px;
  }

  .legal-tabs__link {
    width: 100%;
  }

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

  .legal-section {
    padding: 2.25rem 0;
  }

  .legal-contact {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-contact .btn {
    justify-content: center;
    width: 100%;
  }
}
