:root {
  --legal-bg: #030712;
  --legal-surface: rgba(12, 22, 38, 0.82);
  --legal-surface-soft: rgba(255, 255, 255, 0.035);
  --legal-line: rgba(148, 163, 184, 0.16);
  --legal-muted: #94a3b8;
  --legal-text: #cbd5e1;
  --legal-cyan: #67e8f9;
  --legal-green: #6ee7b7;
}

html {
  scroll-padding-top: 7rem;
}

.legal-page {
  min-height: 100vh;
  background: var(--legal-bg);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.7rem 1rem;
  color: #020617;
  font-size: 0.85rem;
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #34d399);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.78);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 3rem, 80rem);
  min-height: 4.75rem;
  margin-inline: auto;
}

.legal-logo img {
  width: auto;
  height: 2.35rem;
}

.legal-nav,
.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legal-nav a,
.legal-home-link {
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
}

.legal-nav a:hover,
.legal-home-link:hover,
.legal-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.legal-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-home-link svg {
  width: 1rem;
  height: 1rem;
}

.legal-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 0.85rem;
  background: rgba(34, 211, 238, 0.08);
  padding: 0.65rem 0.9rem;
  color: #a5f3fc;
  font-size: 0.8rem;
  font-weight: 700;
}

.legal-contact-link:hover {
  border-color: rgba(103, 232, 249, 0.46);
  background: rgba(34, 211, 238, 0.14);
  transform: translateY(-1px);
}

.legal-contact-link svg {
  width: 1rem;
  height: 1rem;
}

.legal-menu-button {
  display: none;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  color: #fff;
}

.legal-menu-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.legal-mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1.5rem 1rem;
}

.legal-mobile-menu.is-open {
  display: grid;
}

.legal-mobile-menu a {
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: #cbd5e1;
  font-size: 0.88rem;
}

.legal-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.legal-hero::after {
  content: "";
  position: absolute;
  top: -17rem;
  left: 58%;
  z-index: -1;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  background: conic-gradient(from 120deg, rgba(34, 211, 238, 0.18), rgba(52, 211, 153, 0.12), transparent 60%);
  filter: blur(18px);
}

.legal-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4rem;
  width: min(100% - 3rem, 80rem);
  margin-inline: auto;
  padding-block: clamp(4.5rem, 9vw, 7.5rem) clamp(3.5rem, 7vw, 5.5rem);
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--legal-cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.legal-eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
}

.legal-hero h1 {
  max-width: 50rem;
  margin-top: 1.2rem;
  color: #fff;
  font-size: clamp(2.8rem, 7vw, 5.25rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.legal-hero-copy {
  max-width: 43rem;
  margin-top: 1.65rem;
  color: #aebbcf;
  font-size: clamp(1rem, 2vw, 1.17rem);
  line-height: 1.8;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.5rem 0.75rem;
  color: #aebbcf;
  font-size: 0.74rem;
}

.legal-meta svg {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--legal-green);
}

.legal-hero-mark {
  display: grid;
  place-items: center;
  width: 9rem;
  height: 9rem;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 2.2rem;
  background: linear-gradient(145deg, rgba(103, 232, 249, 0.1), rgba(255, 255, 255, 0.025));
  color: var(--legal-cyan);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 28px 70px rgba(0, 0, 0, 0.25);
  transform: rotate(3deg);
}

.legal-hero-mark svg {
  width: 4rem;
  height: 4rem;
  transform: rotate(-3deg);
}

.legal-layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  width: min(100% - 3rem, 76rem);
  margin-inline: auto;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.legal-toc {
  position: sticky;
  top: 7rem;
  align-self: start;
}

.legal-toc-label {
  margin-bottom: 1rem;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.legal-toc nav {
  display: grid;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.legal-toc a {
  position: relative;
  padding: 0.55rem 0 0.55rem 1rem;
  color: #7d8ba1;
  font-size: 0.78rem;
  line-height: 1.4;
}

.legal-toc a::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  bottom: 0.45rem;
  left: -1px;
  width: 2px;
  border-radius: 1rem;
  background: transparent;
}

.legal-toc a:hover,
.legal-toc a.is-active {
  color: #e2e8f0;
}

.legal-toc a.is-active::before {
  background: linear-gradient(#22d3ee, #34d399);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.36);
}

.legal-toc-note {
  margin-top: 1.5rem;
  border: 1px solid rgba(103, 232, 249, 0.13);
  border-radius: 1rem;
  background: rgba(34, 211, 238, 0.04);
  padding: 0.9rem;
  color: #7d8ba1;
  font-size: 0.72rem;
  line-height: 1.6;
}

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

.legal-intro {
  margin-bottom: 1rem;
  border: 1px solid rgba(103, 232, 249, 0.15);
  border-radius: 1.4rem;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.065), rgba(255, 255, 255, 0.025));
  padding: clamp(1.3rem, 3vw, 1.8rem);
  color: #d7e0ec;
  font-size: 1rem;
  line-height: 1.8;
}

.legal-intro a,
.legal-section a,
.legal-contact-card a {
  color: #a5f3fc;
  text-decoration: underline;
  text-decoration-color: rgba(103, 232, 249, 0.35);
  text-underline-offset: 0.2em;
}

.legal-section {
  position: relative;
  margin-top: 1rem;
  border: 1px solid var(--legal-line);
  border-radius: 1.4rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  padding: clamp(1.35rem, 4vw, 2.25rem);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.legal-section::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: -1px;
  width: 2px;
  height: 2.5rem;
  border-radius: 999px;
  background: linear-gradient(#22d3ee, #34d399);
  opacity: 0.7;
}

.legal-section h2 {
  margin: 0 0 1rem;
  color: #f8fafc;
  font-size: clamp(1.18rem, 2.4vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.legal-section h2 .section-number {
  display: block;
  margin-bottom: 0.4rem;
  color: #4fd1e7;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-section p,
.legal-section li {
  color: var(--legal-text);
  font-size: 0.94rem;
  line-height: 1.85;
}

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

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  counter-reset: legal-item;
}

.legal-section li {
  position: relative;
  padding-left: 1.8rem;
}

.legal-section li::before {
  position: absolute;
  top: 0.52rem;
  left: 0.1rem;
  display: grid;
  place-items: center;
  width: 0.92rem;
  height: 0.92rem;
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 50%;
  color: var(--legal-cyan);
  font-size: 0.56rem;
  line-height: 1;
}

.legal-section ul li::before {
  content: "";
  background: radial-gradient(circle, var(--legal-cyan) 0 25%, transparent 30%);
}

.legal-section ol li {
  counter-increment: legal-item;
}

.legal-section ol li::before {
  content: counter(legal-item);
  top: 0.46rem;
}

.legal-contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-top: 1.15rem;
  border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: 1rem;
  background: rgba(52, 211, 153, 0.045);
  padding: 1rem;
}

.legal-contact-card svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--legal-green);
}

.legal-contact-card strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #e2e8f0;
  font-size: 0.82rem;
}

.legal-contact-card p {
  font-size: 0.82rem;
}

.legal-update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 1.5rem;
  color: #64748b;
  font-size: 0.74rem;
}

.legal-update a {
  color: #94a3b8;
}

.legal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #02050c;
}

.legal-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  width: min(100% - 3rem, 80rem);
  margin-inline: auto;
  padding-block: 2.5rem;
}

.legal-footer-brand img {
  width: auto;
  height: 2rem;
  opacity: 0.86;
}

.legal-footer-brand p {
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1.1rem;
}

.legal-footer-links a {
  color: #94a3b8;
  font-size: 0.76rem;
}

.legal-footer-links a:hover {
  color: #a5f3fc;
}

@media (max-width: 900px) {
  .legal-nav,
  .legal-header-actions .legal-home-link,
  .legal-header-actions .legal-contact-link {
    display: none;
  }

  .legal-menu-button {
    display: grid;
  }

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

  .legal-hero-mark {
    display: none;
  }

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

  .legal-toc {
    position: static;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.025);
    padding: 1.15rem;
  }

  .legal-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    gap: 0.15rem 0.75rem;
  }

  .legal-toc a {
    border-left: 1px solid rgba(148, 163, 184, 0.18);
  }

  .legal-toc a::before {
    left: -1px;
  }

  .legal-toc-note {
    display: none;
  }
}

@media (max-width: 600px) {
  .legal-header-inner,
  .legal-hero-inner,
  .legal-layout,
  .legal-footer-inner {
    width: min(100% - 2rem, 80rem);
  }

  .legal-header-inner {
    min-height: 4.25rem;
  }

  .legal-logo img {
    height: 2rem;
  }

  .legal-hero-inner {
    padding-block: 3.8rem 3rem;
  }

  .legal-hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
  }

  .legal-layout {
    gap: 1.5rem;
    padding-block: 2rem 3.5rem;
  }

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

  .legal-section {
    border-radius: 1.15rem;
  }

  .legal-update,
  .legal-footer-inner {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

@media print {
  .page-loader,
  .reading-progress,
  .legal-header,
  .legal-toc,
  .legal-footer {
    display: none !important;
  }

  .legal-page,
  body::before {
    background: #fff !important;
  }

  .legal-hero {
    border-bottom: 1px solid #d7dee8;
  }

  .legal-hero::before,
  .legal-hero::after,
  .legal-hero-mark {
    display: none;
  }

  .legal-hero-inner,
  .legal-layout {
    display: block;
    width: 100%;
    padding: 2rem 0;
  }

  .legal-hero h1,
  .legal-section h2 {
    color: #0f172a;
  }

  .legal-eyebrow,
  .legal-hero-copy,
  .legal-section p,
  .legal-section li,
  .legal-intro {
    color: #334155;
  }

  .legal-section,
  .legal-intro {
    break-inside: avoid;
    border-color: #d7dee8;
    background: #fff;
    box-shadow: none;
  }
}
