/* =========================================================
   WEBSTING LEGAL PAGES
   Shared by /privacy/ and /terms/
   Build: 20260804-1
   ========================================================= */

.legal-page {
  --legal-purple: 176, 144, 255;
  --legal-teal: 45, 212, 191;
  --legal-blue: 91, 167, 255;
  --legal-gold: 245, 196, 94;
}

.legal-main {
  overflow: clip;
}

.legal-hero {
  position: relative;
  isolation: isolate;
  min-height: 560px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.legal-hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}

.legal-hero-copy {
  max-width: 790px;
}

.legal-hero h1 {
  max-width: 790px;
}

.legal-hero .hero-text {
  max-width: 750px;
}

.legal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.6rem;
}

.legal-meta-row span {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  padding: .62rem .82rem;
  border: 1px solid rgba(176, 144, 255, .2);
  border-radius: 999px;
  background: rgba(176, 144, 255, .075);
  color: rgba(255, 255, 255, .72);
  font-size: .78rem;
  line-height: 1.2;
}

.legal-meta-row strong {
  color: rgba(255, 255, 255, .92);
}

.legal-hero-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(176, 144, 255, .22), transparent 38%),
    radial-gradient(circle at 88% 88%, rgba(45, 212, 191, .13), transparent 44%),
    rgba(255, 255, 255, .045);
}

.legal-hero-card::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -75px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(176, 144, 255, .14);
  border-radius: 50%;
}

.legal-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(45, 212, 191, .26);
  border-radius: 22px;
  background: rgba(45, 212, 191, .08);
  box-shadow: inset 0 0 28px rgba(45, 212, 191, .08);
}

.legal-icon svg {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: rgb(var(--legal-teal));
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-card-label {
  margin: 0 0 .55rem;
  color: rgb(var(--legal-teal));
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-hero-card h2 {
  margin: 0 0 .8rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.legal-hero-card > p:not(.legal-card-label) {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, .7);
  line-height: 1.75;
}

.legal-card-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 1.25rem;
  color: rgb(var(--legal-teal));
  font-weight: 750;
  text-decoration: none;
}

.legal-card-link:hover,
.legal-card-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: .24em;
}

.legal-document-section {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  background:
    linear-gradient(180deg, transparent, rgba(45, 212, 191, .025) 35%, transparent),
    transparent;
}

.legal-document-layout {
  display: grid;
  grid-template-columns: minmax(220px, 275px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.75rem);
  align-items: start;
}

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

.legal-toc {
  position: sticky;
  top: 7.5rem;
  max-height: calc(100vh - 9rem);
  padding: 1.15rem;
  overflow: auto;
  background: rgba(255, 255, 255, .035);
}

.legal-toc-title {
  margin: 0 0 .75rem;
  color: rgba(255, 255, 255, .94);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legal-toc ol {
  display: grid;
  gap: .2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc a {
  display: block;
  padding: .55rem .65rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, .62);
  font-size: .82rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  background: rgba(176, 144, 255, .1);
  color: rgba(255, 255, 255, .96);
}

.legal-document {
  min-width: 0;
  padding: clamp(1.35rem, 4vw, 3.25rem);
  background:
    radial-gradient(circle at 90% 2%, rgba(45, 212, 191, .08), transparent 26%),
    rgba(255, 255, 255, .035);
}

.legal-intro {
  margin-bottom: 2.2rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.legal-intro > p:last-child {
  max-width: 850px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .7);
  line-height: 1.75;
}

.legal-section {
  scroll-margin-top: 8rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.legal-section:last-of-type {
  border-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, .97);
  font-size: clamp(1.28rem, 2.2vw, 1.8rem);
  line-height: 1.25;
}

.legal-section h3 {
  margin: 1.35rem 0 .55rem;
  color: rgba(255, 255, 255, .9);
  font-size: 1rem;
  line-height: 1.45;
}

.legal-section p,
.legal-section li,
.legal-address {
  color: rgba(255, 255, 255, .69);
  font-size: .96rem;
  line-height: 1.82;
}

.legal-section p {
  margin: 0 0 1rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  display: grid;
  gap: .55rem;
  margin: .85rem 0 1.15rem;
  padding-left: 1.25rem;
}

.legal-section li::marker {
  color: rgb(var(--legal-teal));
}

.legal-section strong {
  color: rgba(255, 255, 255, .91);
}

.legal-section a,
.legal-document-footer a {
  color: rgb(var(--legal-teal));
  text-underline-offset: .22em;
}

.legal-note {
  margin: 1.35rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(245, 196, 94, .22);
  border-left: 3px solid rgb(var(--legal-gold));
  border-radius: 14px;
  background: rgba(245, 196, 94, .055);
}

.legal-note strong {
  display: block;
  margin-bottom: .3rem;
  color: rgb(var(--legal-gold));
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-note p {
  margin: 0;
}

.legal-address {
  margin: .75rem 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(176, 144, 255, .16);
  border-radius: 14px;
  background: rgba(176, 144, 255, .05);
  font-style: normal;
}

.legal-document-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: space-between;
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.legal-document-footer a {
  padding: .58rem .75rem;
  border: 1px solid rgba(45, 212, 191, .16);
  border-radius: 999px;
  background: rgba(45, 212, 191, .045);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
}

.legal-document-footer a:hover,
.legal-document-footer a:focus-visible {
  background: rgba(45, 212, 191, .1);
}

html[data-theme="light"] .legal-meta-row span,
html[data-theme="light"] .legal-hero-card > p:not(.legal-card-label),
html[data-theme="light"] .legal-intro > p:last-child,
html[data-theme="light"] .legal-section p,
html[data-theme="light"] .legal-section li,
html[data-theme="light"] .legal-address {
  color: rgba(15, 20, 35, .72);
}

html[data-theme="light"] .legal-meta-row strong,
html[data-theme="light"] .legal-hero-card h2,
html[data-theme="light"] .legal-toc-title,
html[data-theme="light"] .legal-section h2,
html[data-theme="light"] .legal-section h3,
html[data-theme="light"] .legal-section strong {
  color: rgba(10, 14, 26, .94);
}

html[data-theme="light"] .legal-meta-row span,
html[data-theme="light"] .legal-hero-card,
html[data-theme="light"] .legal-toc,
html[data-theme="light"] .legal-document,
html[data-theme="light"] .legal-address {
  background-color: rgba(255, 255, 255, .76);
}

html[data-theme="light"] .legal-toc a {
  color: rgba(15, 20, 35, .68);
}

html[data-theme="light"] .legal-toc a:hover,
html[data-theme="light"] .legal-toc a:focus-visible {
  color: rgba(10, 14, 26, .96);
}

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

  .legal-hero-card {
    max-width: 700px;
  }

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

  .legal-toc {
    position: static;
    max-height: none;
  }

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

@media (max-width: 700px) {
  .legal-hero {
    min-height: auto;
    padding-top: .5rem;
  }

  .legal-hero-layout {
    gap: 1.5rem;
  }

  .legal-meta-row {
    align-items: stretch;
  }

  .legal-meta-row span {
    width: 100%;
    border-radius: 12px;
  }

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

  .legal-document {
    border-radius: 20px;
  }

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

  .legal-document-footer {
    justify-content: flex-start;
  }
}

@media print {
  .site-header,
  .mobile-site-nav,
  .site-footer,
  .legal-hero-card,
  .legal-sidebar,
  .legal-document-footer,
  .hero-background,
  .theme-toggle,
  .nav-toggle {
    display: none !important;
  }

  .legal-hero,
  .legal-document-section,
  .legal-document {
    min-height: 0;
    padding: 0;
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  .legal-hero-layout,
  .legal-document-layout {
    display: block;
  }

  .legal-hero-copy,
  .legal-document {
    max-width: none;
  }

  .legal-section {
    break-inside: avoid;
  }

  .legal-section h2,
  .legal-section h3,
  .legal-section p,
  .legal-section li,
  .legal-address,
  .legal-meta-row span,
  .legal-meta-row strong {
    color: #111 !important;
  }
}
