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

.terms-page section[id] {
  scroll-margin-top: 7rem;
}

.terms-cover {
  padding-block: var(--space-10) var(--space-9);
}

.terms-cover__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6);
}

.terms-cover__copy {
  grid-column: 3 / span 7;
  min-width: 0;
}

.terms-cover__lead {
  max-width: 58ch;
  color: var(--color-white-warm);
  font-size: var(--text-intro);
  line-height: var(--leading-intro);
}

.terms-cover__body {
  max-width: 58ch;
}

.terms-cover__anchor {
  margin-block: var(--space-2) var(--space-6);
}

.terms-cover__scope {
  display: flex;
  min-width: 0;
  max-width: 48ch;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
}

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

.terms-cover__scope h2 {
  font-size: var(--text-card-title);
}

.terms-index__intro {
  width: 58.333%;
  min-width: 0;
}

.terms-index__intro > :last-child {
  max-width: 52ch;
}

.terms-index__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 83.333%;
  min-width: 0;
  margin-top: var(--space-6);
  padding: 0 var(--space-5);
}

.terms-index__list {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.terms-index__list li {
  min-width: 0;
  border-bottom: var(--border-subtle);
}

.terms-index__list li:nth-child(3) {
  border-bottom: 0;
}

.terms-index__list:nth-child(1) {
  grid-column: 1;
}

.terms-index__list li:nth-child(n + 4) {
  grid-column: 2;
}

.terms-index__list {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terms-index__list a {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 4rem;
  padding: var(--space-3) 0;
  text-decoration: none;
}

.terms-index__list a span:first-child {
  color: var(--color-rose-gold);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.terms-index__list a span:last-child {
  min-width: 0;
  color: var(--color-white);
  font-size: var(--text-small);
  font-weight: 700;
  line-height: var(--leading-small);
}

.terms-index__list a[aria-current="true"] {
  box-shadow: inset 2px 0 0 var(--color-rose-gold);
  padding-left: var(--space-3);
}

.terms-article__layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6);
}

.terms-article__marker {
  grid-column: 1 / span 2;
  min-width: 0;
  padding-top: var(--space-2);
  color: var(--color-rose-gold);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: var(--leading-micro);
  text-transform: uppercase;
}

.terms-article__content {
  grid-column: 3 / span 8;
  min-width: 0;
}

.terms-article__content > h2 {
  max-width: 12ch;
}

.terms-article__stack {
  display: flex;
  min-width: 0;
  max-width: 62ch;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-6);
}

.terms-article__stack > section {
  min-width: 0;
}

.terms-article__stack h3 {
  max-width: 24ch;
}

.terms-note,
.terms-clarification,
.terms-trust {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  padding: var(--space-5);
}

.terms-note h3,
.terms-note p,
.terms-clarification h3,
.terms-clarification p,
.terms-trust h3,
.terms-trust p {
  margin: 0;
}

.terms-note,
.terms-clarification {
  max-width: 54ch;
}

.terms-clarification {
  border: var(--border-accent);
  background: var(--color-rose-tint);
}

.terms-clarification > .button {
  align-self: flex-start;
  margin-top: var(--space-1);
}

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

.terms-process__heading > .terms-article__marker,
.terms-preparation__heading > .terms-article__marker {
  grid-column: 1 / span 2;
}

.terms-process__heading > div:last-child,
.terms-preparation__heading > div:last-child {
  grid-column: 3 / span 7;
  min-width: 0;
}

.terms-process__heading > div:last-child > p,
.terms-preparation__heading > div:last-child > p {
  max-width: 58ch;
}

.terms-process__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.terms-step {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  border-top: var(--border-accent);
  padding: var(--space-5) 0;
}

.terms-step--raised {
  border: var(--border-subtle);
  border-top-color: var(--color-rose-gold);
  background: var(--color-charcoal-raised);
  padding: var(--space-5);
}

.terms-step h3,
.terms-step p {
  margin: 0;
}

.terms-step h3 {
  max-width: 18ch;
}

.terms-step > p:last-child {
  max-width: 36ch;
}

.terms-step__number {
  color: var(--color-rose-gold);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: var(--leading-micro);
  text-transform: uppercase;
}

.terms-process__caption {
  max-width: 58ch;
  margin-top: var(--space-5);
  margin-bottom: 0;
  color: var(--color-muted-stone);
  font-size: var(--text-small);
}

.terms-preparation__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.terms-duty {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  padding: var(--space-5);
}

.terms-duty h3,
.terms-duty p {
  margin: 0;
}

.terms-duty h3 {
  max-width: 18ch;
}

.terms-duty > p:last-child {
  max-width: 40ch;
}

.terms-duty--accent {
  box-shadow: var(--shadow-panel);
}

.terms-rule {
  border-inline-start: 1px solid var(--color-rose-gold);
  padding-inline-start: var(--space-5);
}

.terms-rule--separated {
  border-top: var(--border-accent);
  border-inline-start: 0;
  padding-top: var(--space-5);
  padding-inline-start: 0;
}

.terms-article__stack--panels {
  max-width: 54ch;
}

.terms-trust {
  max-width: 54ch;
}

.terms-trust > .button {
  align-self: flex-start;
}

.terms-closing__panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr);
  gap: var(--space-6);
  width: 66.667%;
  min-width: 0;
  margin-inline: auto;
  padding: var(--space-7);
}

.terms-closing__copy,
.terms-closing__action {
  min-width: 0;
}

.terms-closing__copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
}

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

.terms-closing__copy p:last-child {
  max-width: 48ch;
}

.terms-closing__action {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.terms-closing__action .button {
  width: auto;
}

@media (max-width: 64rem) {
  .terms-cover__grid,
  .terms-article__layout,
  .terms-process__heading,
  .terms-preparation__heading {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

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

  .terms-index__intro {
    width: 87.5%;
  }

  .terms-index__panel {
    width: 100%;
  }

  .terms-article__marker,
  .terms-process__heading > .terms-article__marker,
  .terms-preparation__heading > .terms-article__marker {
    grid-column: 1 / span 8;
    padding-top: 0;
  }

  .terms-article__content,
  .terms-process__heading > div:last-child,
  .terms-preparation__heading > div:last-child {
    grid-column: 1 / span 8;
  }

  .terms-process__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terms-process__steps > :nth-child(3) {
    grid-column: 1 / span 2;
  }

  .terms-preparation__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terms-preparation__cards > :nth-child(3) {
    grid-column: 1 / span 2;
  }

  .terms-closing__panel {
    width: 75%;
  }
}

@media (max-width: 52.5rem) {
  .terms-closing__panel {
    grid-template-columns: 1fr;
    width: 87.5%;
  }

  .terms-closing__action {
    justify-content: flex-start;
  }
}

@media (max-width: 48rem) {
  .terms-cover {
    padding-block: var(--space-9) var(--space-7);
  }

  .terms-cover__grid,
  .terms-article__layout,
  .terms-process__heading,
  .terms-preparation__heading {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .terms-cover__copy,
  .terms-article__marker,
  .terms-article__content,
  .terms-process__heading > .terms-article__marker,
  .terms-process__heading > div:last-child,
  .terms-preparation__heading > .terms-article__marker,
  .terms-preparation__heading > div:last-child {
    grid-column: 1 / span 4;
  }

  .terms-cover__lead,
  .terms-cover__body,
  .terms-index__intro,
  .terms-index__panel,
  .terms-article__stack,
  .terms-note,
  .terms-clarification,
  .terms-trust,
  .terms-article__stack--panels {
    max-width: none;
    width: 100%;
  }

  .terms-index__intro {
    width: 100%;
  }

  .terms-index__panel {
    grid-template-columns: 1fr;
    padding: 0 var(--space-4);
  }

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

  .terms-index__list li,
  .terms-index__list li:nth-child(3) {
    grid-column: 1;
    border-bottom: var(--border-subtle);
  }

  .terms-index__list li:last-child {
    border-bottom: 0;
  }

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

  .terms-process__steps,
  .terms-preparation__cards {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
  }

  .terms-process__steps > :nth-child(3),
  .terms-preparation__cards > :nth-child(3) {
    grid-column: 1;
  }

  .terms-step,
  .terms-duty {
    width: 100%;
  }

  .terms-step h3,
  .terms-duty h3,
  .terms-step > p:last-child,
  .terms-duty > p:last-child {
    max-width: none;
  }

  .terms-closing__panel {
    grid-template-columns: 1fr;
    width: 100%;
    gap: var(--space-5);
    padding: var(--space-5);
  }

  .terms-closing__action,
  .terms-closing__action .button {
    width: 100%;
  }
}
