.terms-page {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.terms-page__atmosphere,
.terms-page__cursor-light {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.terms-page__atmosphere {
  top: 0;
  right: 0;
  left: 0;
  height: 34rem;
  background:
    radial-gradient(circle at 77% 18%, color-mix(in srgb, var(--color-blue-haze) 72%, transparent), transparent 32%),
    radial-gradient(circle at 34% 2%, color-mix(in srgb, var(--color-violet-haze) 58%, transparent), transparent 38%);
  opacity: 0.72;
}

.terms-page__cursor-light {
  top: 0;
  left: 0;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-turquoise-400) 12%, transparent), transparent 68%);
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity var(--transition-fast);
}

.terms-page__cursor-light.is-active {
  opacity: 1;
}

.terms-hero {
  position: relative;
  padding-top: clamp(var(--space-9), 10vw, var(--space-10));
  padding-bottom: var(--space-8);
}

.terms-hero::after {
  position: absolute;
  right: max(var(--container-padding), calc((100vw - var(--container-max)) / 2));
  bottom: 2.35rem;
  width: 10rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-turquoise-400), transparent);
  content: "";
  opacity: 0.6;
}

.terms-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: start;
}

.terms-hero__title-block {
  grid-column: 1 / span 8;
  min-width: 0;
}

.terms-hero__summary {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--color-mist-300);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.terms-hero__status {
  display: flex;
  grid-column: 10 / span 3;
  align-items: flex-start;
  min-width: 220px;
  gap: var(--space-3);
  padding-top: var(--space-5);
}

.terms-hero__status-node {
  width: 0.6rem;
  min-width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.34rem;
  border-radius: 50%;
  background: var(--color-ultramarine-400);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-ultramarine-400) 12%, transparent);
}

.terms-hero__status .meta {
  margin: 0 0 var(--space-1);
}

.terms-hero__status-text {
  margin: 0;
  color: var(--color-platinum-100);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  line-height: var(--leading-compact);
}

.terms-hero__guidance {
  grid-column: 1 / span 8;
  width: min(100%, 62ch);
  min-width: 0;
  margin-top: var(--space-3);
  padding: var(--space-4) 0 var(--space-4) var(--space-5);
  border-inline-start: 2px solid var(--color-turquoise-400);
}

.terms-hero__guidance p {
  margin: 0;
}

.terms-document {
  position: relative;
  padding-top: var(--space-8);
}

.terms-document__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  align-items: start;
}

.terms-index {
  position: sticky;
  top: calc(var(--space-8) + var(--space-3));
  grid-column: 1 / span 3;
  width: 100%;
  min-width: 240px;
  padding: var(--space-5);
}

.terms-index .eyebrow {
  margin-bottom: var(--space-3);
}

.terms-index__list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.terms-index__list > li {
  width: 100%;
  min-width: 0;
  border-top: var(--border-subtle);
}

.terms-index__list > li:last-child {
  border-bottom: var(--border-subtle);
}

.terms-index__list a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 44px;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  color: var(--color-mist-300);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.terms-index__list a:hover,
.terms-index__list a[aria-current="location"] {
  color: var(--color-platinum-100);
}

.terms-index__list a[aria-current="location"] .terms-index__number {
  color: var(--color-turquoise-400);
}

.terms-index__number {
  color: var(--color-muted-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.terms-index__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-1);
}

.terms-index__copy strong {
  color: currentColor;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.terms-index__copy small {
  color: var(--color-muted-500);
  font-size: var(--text-xs);
}

.terms-body {
  display: flex;
  grid-column: 5 / span 7;
  flex-direction: column;
  min-width: 0;
  gap: clamp(var(--space-8), 9vw, var(--space-10));
}

.terms-clause {
  position: relative;
  min-width: 0;
}

.terms-clause__heading {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.terms-clause__number {
  color: var(--color-turquoise-400);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.terms-clause--property .terms-clause__number {
  color: var(--color-ultramarine-400);
}

.terms-clause__heading .eyebrow {
  margin-bottom: var(--space-2);
}

.terms-clause__heading h2 {
  max-width: 18ch;
  margin-bottom: 0;
}

.terms-clause__units {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-6);
}

.terms-unit {
  min-width: 0;
  max-width: 68ch;
  padding-bottom: var(--space-6);
  border-bottom: var(--border-subtle);
}

.terms-unit--final,
.terms-unit--update {
  max-width: 60ch;
}

.terms-unit:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.terms-unit h3 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
  line-height: var(--leading-compact);
}

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

.terms-unit__annotation {
  margin: 0 0 var(--space-2);
  color: var(--color-muted-500);
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.terms-unit__annotation--warning {
  color: var(--color-warning-400);
}

.terms-unit__annotation--signal {
  color: var(--color-ultramarine-400);
}

.terms-unit a,
.terms-hero__guidance a {
  text-decoration-color: var(--color-turquoise-400);
  text-decoration-thickness: 1px;
}

.terms-reminder {
  width: min(100%, 54ch);
  min-width: 0;
  margin-top: var(--space-6);
  margin-left: auto;
  padding: var(--space-5);
}

.terms-reminder .eyebrow {
  margin-bottom: var(--space-2);
}

.terms-reminder p:last-child {
  max-width: 52ch;
  margin-bottom: 0;
  color: var(--color-platinum-100);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.terms-checklist {
  width: min(100%, 56ch);
  min-width: 0;
  margin-top: var(--space-6);
}

.terms-checklist .eyebrow {
  margin-bottom: var(--space-3);
}

.terms-checklist ul {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: var(--border-subtle);
  list-style: none;
}

.terms-checklist li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 44px;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: var(--border-subtle);
  color: var(--color-mist-300);
}

.terms-checklist li > span:first-child {
  color: var(--color-turquoise-400);
  font-family: var(--font-heading);
  font-weight: 600;
}

.terms-cta {
  display: flex;
  flex-direction: column;
  width: min(100%, 60ch);
  min-width: 0;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding: clamp(var(--space-5), 5vw, var(--space-7));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--color-blue-haze) 46%, transparent), transparent 55%),
    var(--color-charcoal-900);
}

.terms-cta .eyebrow,
.terms-cta h2,
.terms-cta p {
  margin: 0;
}

.terms-cta h2 {
  max-width: 18ch;
  font-size: var(--text-2xl);
  line-height: var(--leading-display);
}

.terms-cta p {
  max-width: 52ch;
}

.terms-cta .button {
  align-self: flex-start;
  width: auto;
}

@media (max-width: 1100px) {
  .terms-reminder {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  .terms-hero__grid,
  .terms-document__grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .terms-hero__title-block {
    grid-column: 1 / span 6;
  }

  .terms-hero__status {
    grid-column: 7 / span 2;
    min-width: 0;
  }

  .terms-hero__guidance {
    grid-column: 1 / span 6;
  }

  .terms-index {
    position: static;
    grid-column: 1 / span 8;
    min-width: 0;
    margin-bottom: var(--space-7);
  }

  .terms-body {
    grid-column: 1 / span 8;
    width: min(100%, 68ch);
    margin-inline: auto;
  }
}

@media (max-width: 900px) {
  .terms-hero__grid {
    row-gap: var(--space-4);
  }

  .terms-hero__title-block {
    grid-column: 1 / span 8;
  }

  .terms-hero__status {
    grid-column: 1 / span 8;
    width: auto;
    min-width: 0;
    padding-top: 0;
  }

  .terms-hero__guidance {
    grid-column: 1 / span 8;
    margin-top: var(--space-2);
  }

  .terms-page__cursor-light {
    display: none;
  }
}

@media (max-width: 760px) {
  .terms-page__atmosphere {
    height: 20rem;
    opacity: 0.4;
  }

  .terms-hero::after {
    display: none;
  }

  .terms-hero {
    padding-top: var(--space-8);
    padding-bottom: var(--space-7);
  }

  .terms-hero__grid,
  .terms-document__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .terms-hero__title-block,
  .terms-hero__status,
  .terms-hero__guidance,
  .terms-index,
  .terms-body {
    grid-column: 1;
    width: 100%;
  }

  .terms-hero__summary {
    max-width: none;
    font-size: var(--text-body);
  }

  .terms-hero__guidance {
    width: 100%;
  }

  .terms-document {
    padding-top: var(--space-7);
  }

  .terms-index {
    margin-bottom: var(--space-3);
    padding: var(--space-4);
  }

  .terms-body {
    gap: var(--space-8);
  }

  .terms-clause__heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
  }

  .terms-clause__number {
    width: auto;
  }

  .terms-clause__heading h2 {
    max-width: none;
  }

  .terms-clause__units {
    gap: var(--space-5);
  }

  .terms-unit {
    max-width: none;
    padding-bottom: var(--space-5);
  }

  .terms-reminder,
  .terms-checklist,
  .terms-cta {
    width: 100%;
    max-width: none;
  }

  .terms-cta {
    margin-top: var(--space-6);
  }
}

@media (max-width: 420px) {
  .terms-hero__guidance {
    padding-left: var(--space-4);
  }

  .terms-index__list a {
    grid-template-columns: 1.75rem minmax(0, 1fr);
  }

  .terms-cta .button {
    align-self: stretch;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terms-page__cursor-light {
    display: none;
  }
}
