.legal-page { background: linear-gradient(180deg, #faf9ff 0, #fff 31rem); }

.legal-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 77% 22%, rgba(211, 183, 255, 0.3), transparent 24%),
    radial-gradient(circle at 17% 104%, rgba(142, 82, 225, 0.24), transparent 34%),
    linear-gradient(115deg, #1c0c4d 0%, #321076 54%, #5722b7 100%);
}

.legal-hero-terms {
  background:
    radial-gradient(circle at 81% 28%, rgba(216, 191, 255, 0.31), transparent 24%),
    radial-gradient(circle at 18% 108%, rgba(139, 76, 225, 0.26), transparent 34%),
    linear-gradient(115deg, #190b48 0%, #2e0f70 54%, #5020ad 100%);
}

.legal-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.72) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.legal-hero-orbit {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.legal-orbit-one {
  top: -316px;
  right: 9%;
  width: 550px;
  height: 550px;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.035), 0 0 0 76px rgba(255, 255, 255, 0.018);
}

.legal-orbit-two {
  bottom: -200px;
  left: -92px;
  width: 340px;
  height: 340px;
  box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.03);
}

.legal-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 302px;
  padding-top: 52px;
  padding-bottom: 54px;
}

.legal-hero-icon {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 23px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.legal-hero-icon .lucide { width: 42px; height: 42px; stroke-width: 1.8; }
.legal-hero .eyebrow { margin-bottom: 7px; color: #e1d1ff; }
.legal-hero h1 { max-width: none; margin-bottom: 12px; color: #fff; font-size: clamp(2.9rem, 5vw, 4.1rem); }
.legal-hero h1 span { color: inherit; }
.legal-hero h1 + p { max-width: 650px; margin: 0; color: rgba(255, 255, 255, 0.9); font-size: var(--text-body-large); font-weight: 700; line-height: 1.55; }

.legal-content { padding: 62px 0 80px; }

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 800px);
  gap: clamp(42px, 7vw, 105px);
  align-items: start;
  justify-content: center;
}

.legal-toc {
  position: sticky;
  top: 116px;
  padding: 18px 0 19px 18px;
  border-left: 2px solid #ded3f4;
}

.legal-toc-label {
  margin: 0 0 9px;
  color: #4a1ca5;
  font-size: var(--text-caption);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-toc a {
  display: block;
  padding: 5px 0;
  color: #57516f;
  font-size: var(--text-caption);
  font-weight: 800;
  line-height: 1.4;
  transition: color 0.16s ease, transform 0.16s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible { color: #5520bb; transform: translateX(2px); }

.legal-document {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid #e7e0f6;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(45, 19, 108, 0.075);
}

.legal-document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 25px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9e2f7;
  color: #625b76;
  font-size: var(--text-caption);
  font-weight: 800;
}

.legal-document-meta > span { display: inline-flex; gap: 8px; align-items: center; }
.legal-document-meta .lucide { width: 17px; height: 17px; color: #5b25bc; stroke-width: 2.15; }
.legal-document-meta a { color: #5020ad; font-weight: 900; }
.legal-document-meta a:hover { color: #35117c; }

.legal-callout {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 27px 0 34px;
  padding: 20px;
  border: 1px solid #ded2f7;
  border-radius: 14px;
  color: #39265f;
  background: linear-gradient(130deg, #f4efff, #fbfaff);
}

.legal-callout-warm { border-color: #e6d8fb; background: linear-gradient(130deg, #f7f1ff, #fffaff); }
.legal-callout > .lucide { width: 28px; height: 28px; margin-top: 1px; color: #5b24ba; stroke-width: 2; }
.legal-callout p { margin: 0; color: #50456a; font-size: var(--text-body); font-weight: 700; line-height: 1.58; }
.legal-callout strong { color: #482099; font-weight: 900; }

.legal-document section { scroll-margin-top: 122px; }
.legal-document section + section { margin-top: 34px; }
.legal-document h2 { margin-bottom: 12px; color: #4c1cab; font-size: clamp(1.5rem, 2.3vw, 1.9rem); font-weight: 900; line-height: 1.2; }
.legal-document h3 { margin: 21px 0 7px; color: #32275a; font-size: var(--heading-card); font-weight: 900; line-height: 1.28; }
.legal-document p,
.legal-document li { color: #504b65; font-size: var(--text-body); font-weight: 650; line-height: 1.68; }
.legal-document p { margin-bottom: 14px; }
.legal-document p:last-child { margin-bottom: 0; }
.legal-document ul { margin: 12px 0 15px; padding-left: 24px; }
.legal-document li { padding-left: 4px; }
.legal-document li + li { margin-top: 7px; }
.legal-document li::marker { color: #5b26bc; }
.legal-document a { color: #4e1eab; font-weight: 900; text-decoration: underline; text-decoration-color: rgba(78, 30, 171, 0.32); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.legal-document a:hover { color: #301070; text-decoration-color: currentColor; }
.external-link-indicator { font-size: 0.95em; }
.legal-document address { margin: 15px 0 0; color: #514a68; font-size: var(--text-body); font-style: normal; font-weight: 700; line-height: 1.68; }
.legal-document address strong { color: #32255b; font-weight: 900; }

.legal-page .legal-links a[aria-current="page"] { color: #e0caff; }
.legal-page .legal-toc a:focus-visible,
.legal-page .legal-document a:focus-visible,
.legal-page .legal-document-meta a:focus-visible { outline: 3px solid rgba(92, 37, 190, 0.34); outline-offset: 3px; border-radius: 3px; }

@media (max-width: 910px) {
  .legal-hero-inner { min-height: 270px; }
  .legal-layout { grid-template-columns: minmax(0, 800px); gap: 23px; }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 0 0 20px; border-bottom: 1px solid #e1d7f3; border-left: 0; }
  .legal-toc-label { width: 100%; margin-bottom: 0; }
  .legal-toc a { padding: 0; }
}

@media (max-width: 640px) {
  .legal-hero-inner { grid-template-columns: 58px minmax(0, 1fr); gap: 16px; min-height: 235px; padding-top: 42px; padding-bottom: 42px; }
  .legal-hero-icon { width: 55px; height: 55px; border-radius: 16px; }
  .legal-hero-icon .lucide { width: 31px; height: 31px; }
  .legal-hero h1 { margin-bottom: 9px; font-size: clamp(2.45rem, 10.4vw, 3.3rem); }
  .legal-hero h1 + p { font-size: var(--text-body); line-height: 1.5; }
  .legal-content { padding: 38px 0 54px; }
  .legal-toc { gap: 7px 13px; padding-bottom: 17px; }
  .legal-toc a { font-size: 0.8125rem; }
  .legal-document { padding: 24px 20px; border-radius: 16px; }
  .legal-document-meta { align-items: flex-start; padding-bottom: 17px; }
  .legal-callout { grid-template-columns: 31px minmax(0, 1fr); gap: 11px; margin: 23px 0 29px; padding: 17px; }
  .legal-callout > .lucide { width: 25px; height: 25px; }
  .legal-document section + section { margin-top: 29px; }
  .legal-document h2 { font-size: 1.42rem; }
  .legal-document h3 { font-size: 1.125rem; }
  .legal-document p,
  .legal-document li { font-size: var(--text-body); line-height: 1.62; }
}
