.terms-hero {
  background-color: #ffffff;
  border-bottom: 1px solid var(--gray-200);
}

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

.terms-hero__heading-group {
  max-width: 46rem;
}

.terms-hero__eyebrow {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}

.terms-hero__title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.terms-hero__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.terms-hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.terms-content {
  background-color: var(--color-background);
}

.terms-layout {
  display: grid;
  gap: var(--space-10);
}

.terms-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  align-self: flex-start;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.terms-toc__title {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-3);
}

.terms-toc__nav {
  margin-bottom: var(--space-4);
}

.terms-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--font-size-sm);
}

.terms-toc__list a {
  color: var(--gray-600);
}

.terms-toc__list a:hover {
  color: var(--color-primary-strong);
}

.terms-toc__cta {
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.terms-toc__cta-text {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-bottom: var(--space-3);
}

.terms-article {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.terms-section + .terms-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--gray-100);
}

.terms-section__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}

.terms-list {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.terms-list li + li {
  margin-top: 0.4rem;
}

.terms-list--ordered {
  list-style: decimal;
}

.terms-list:not(.terms-list--ordered) {
  list-style: disc;
}

.terms-section--final {
  margin-top: var(--space-8);
}

.terms-article a {
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.45);
  text-underline-offset: 0.12em;
}

.terms-article a:hover {
  text-decoration-color: rgba(37, 99, 235, 1);
}

@media (min-width: 960px) {
  .terms-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
  }
}

@media (max-width: 959.98px) {
  .terms-toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 639.98px) {
  .terms-hero__inner {
    gap: var(--space-4);
  }

  .terms-article {
    padding: var(--space-4);
  }
}
