html {
  color-scheme: light;
}

.terms-hero__header {
  color: #020617;
}

.terms-hero__header .section__title,
.terms-hero__header .section__lead,
.terms-hero__header .section__eyebrow {
  color: #020617;
  font-weight: 700;
}

.terms-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.terms-hero__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #020617;
  font-weight: 700;
}

.terms-hero__cta {
  max-width: 100%;
}

.terms-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: var(--grid-gap-xl);
  margin-top: var(--space-2xl);
  background: radial-gradient(circle at 0% 0%, rgba(0, 212, 255, 0.12), transparent 55%), radial-gradient(circle at 100% 100%, rgba(77, 255, 136, 0.12), transparent 60%), var(--color-surface-soft);
}

.terms-layout__nav,
.terms-layout__content {
  min-width: 0;
}

.terms-layout__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.terms-toc {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-lg);
}

.terms-toc__toggle {
  display: none;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #020617;
  cursor: pointer;
}

.terms-toc__list {
  margin: 0;
  padding: 0;
  list-style: none !important;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.terms-toc__item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #020617;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.02);
}

.terms-toc__item a:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(77, 255, 136, 0.18));
  color: #020617;
}

.terms-legend {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: var(--space-lg);
  color: var(--color-text-inverse);
}

.terms-legend__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.8);
  background: radial-gradient(circle at 0% 0%, rgba(0, 212, 255, 0.4), transparent 60%);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.terms-legend__text {
  margin-top: var(--space-md);
  margin-bottom: 0;
  color: rgba(226, 232, 240, 0.92);
  font-weight: 600;
}

.terms-layout__content {
  padding: var(--space-sm) 0;
}

.terms-section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

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

.terms-section h2,
.terms-section h3 {
  color: #020617;
  font-weight: 800;
}

.terms-section h2 {
  margin-top: 0;
}

.terms-section h3 {
  margin-top: var(--space-lg);
}

.terms-section p,
.terms-section li {
  color: rgba(15, 23, 42, 0.9);
  font-weight: 500;
}

.terms-section ul {
  list-style: none !important;
  margin: 0 0 var(--space-md);
  padding: 0;
}

.terms-section ul li {
  position: relative;
  padding-left: 1.35rem;
}

.terms-section ul li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.7rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #0f172a, #00d4ff);
}

.terms-section a {
  font-weight: 700;
}

.terms-final-note {
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: rgba(15, 23, 42, 0.8);
  font-weight: 600;
}

.btn {
  max-width: 100%;
}

.nav-toggle {
  flex-direction: column;
}

@media (max-width: 1023.98px) {
  .terms-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .terms-layout__nav {
    order: -1;
  }
}

@media (max-width: 767.98px) {
  .terms-hero__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .terms-layout {
    margin-top: var(--space-xl);
  }

  .terms-toc {
    padding: var(--space-md);
  }

  .terms-toc__toggle {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
  }

  .terms-toc__list {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }

  .terms-toc__list.is-open {
    max-height: 500px;
  }
}

@media (max-width: 479.98px) {
  .terms-hero__pill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .terms-legend {
    padding: var(--space-md);
  }
}
