.terms-page {
  position: relative;
  z-index: 1;
}

.terms-hero {
  padding: 180px 0 96px;
  overflow: hidden;
  position: relative;
}

.terms-hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  inset-inline-end: -130px;
  top: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(195, 255, 0, 0.2), transparent 66%);
  pointer-events: none;
}

.terms-hero-inner {
  max-width: 980px;
  position: relative;
}

.terms-kicker,
.terms-sidebar-label {
  color: var(--cyan, #c3ff00);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.terms-hero h1 {
  max-width: 820px;
  margin: 20px 0 22px;
  font-size: clamp(3rem, 7vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.terms-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted, #cbd5e1);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.8;
}

.terms-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  color: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terms-scroll-link svg {
  width: 18px;
  height: 18px;
  color: var(--cyan, #c3ff00);
}

.terms-shell {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 820px);
  justify-content: space-between;
  gap: clamp(36px, 7vw, 108px);
  padding-bottom: 120px;
}

.terms-sidebar-card {
  position: static;
  padding: 28px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,.12));
  border-radius: 20px;
  background: var(--bg-card, rgba(255,255,255,.04));
  backdrop-filter: blur(14px);
}

.terms-sidebar nav {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  max-height: none;
  overflow: visible;
}

.terms-sidebar a {
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-dim, #9ca3af);
  font-size: 0.79rem;
  line-height: 1.4;
  transition: color .2s ease, background .2s ease;
}

.terms-sidebar a:hover,
.terms-sidebar a:focus-visible {
  color: var(--text-main, #fff);
  background: rgba(195, 255, 0, 0.08);
}

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

.terms-opening {
  padding: 34px;
  margin-bottom: 52px;
  border: 1px solid rgba(195, 255, 0, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(195, 255, 0, 0.08), rgba(255, 255, 255, 0.025));
}

.terms-section {
  scroll-margin-top: 120px;
  padding: 0 0 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,.1));
}

.terms-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.terms-section-number {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan, #c3ff00);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.terms-section h2 {
  margin: 0 0 22px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.terms-document p,
.terms-document li {
  color: var(--text-muted, #cbd5e1);
  font-size: 1rem;
  line-height: 1.9;
}

.terms-document p {
  margin: 0 0 16px;
}

.terms-document p:last-child {
  margin-bottom: 0;
}

.terms-document ul {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding-inline-start: 22px;
}

.terms-document li::marker {
  color: var(--cyan, #c3ff00);
}

[data-theme="light"] .terms-hero::before {
  opacity: .55;
}

[data-theme="light"] .terms-opening {
  background: linear-gradient(145deg, rgba(137, 179, 0, 0.08), rgba(0, 0, 0, 0.018));
}

[dir="rtl"] .terms-hero h1,
[dir="rtl"] .terms-section h2 {
  letter-spacing: 0;
}

[dir="rtl"] .terms-kicker,
[dir="rtl"] .terms-sidebar-label,
[dir="rtl"] .terms-scroll-link,
[dir="rtl"] .terms-section-number {
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .terms-hero {
    padding: 148px 0 72px;
  }

  .terms-shell {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .terms-sidebar-card {
    position: static;
  }

  .terms-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 560px) {
  .terms-hero {
    padding: 126px 0 58px;
  }

  .terms-hero h1 {
    font-size: clamp(2.7rem, 15vw, 4.2rem);
  }

  .terms-sidebar-card,
  .terms-opening {
    padding: 22px;
    border-radius: 17px;
  }

  .terms-sidebar nav {
    grid-template-columns: 1fr;
  }

  .terms-section {
    padding-bottom: 34px;
    margin-bottom: 34px;
  }
}

@media print {
  .header,
  .footer-modern,
  .terms-sidebar,
  .terms-scroll-link,
  .ambient-bg {
    display: none !important;
  }

  .terms-hero {
    padding: 20px 0 36px;
  }

  .terms-shell {
    display: block;
    padding-bottom: 0;
  }

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