[data-terms-page] {
  overflow: hidden;
  background: var(--color-ivory);
}

[data-terms-page] a {
  text-decoration-color: var(--color-paper-stone);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

[data-terms-page] a:hover {
  color: var(--color-deep-wine);
  text-decoration-color: var(--color-deep-wine);
}

.terms-lead {
  position: relative;
  isolation: isolate;
  padding: var(--space-28) 0 var(--space-16);
}

.terms-lead__shell {
  position: relative;
  width: min(100% - (var(--gutter) * 2), var(--container-editorial));
  margin-inline: auto;
}

.terms-lead__copy {
  position: relative;
  z-index: 1;
  width: min(42.5rem, 64%);
  min-width: 35rem;
}

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

.terms-lead__title {
  max-width: 41rem;
  margin-bottom: var(--space-6);
  font-size: clamp(4.875rem, 7vw, 5.875rem);
}

.terms-lead__dek {
  max-width: 40rem;
  margin-bottom: var(--space-6);
}

.terms-lead__tools {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-width: 0;
  padding-top: var(--space-4);
  border-top: var(--border-subtle);
}

.terms-lead__date {
  margin: 0;
  color: var(--color-deep-wine);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: var(--leading-caption);
}

.terms-lead__print {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.terms-lead__shape {
  position: absolute;
  z-index: -1;
  top: 1.5rem;
  right: 2.5rem;
  width: clamp(13rem, 26vw, 18.5rem);
  height: 17rem;
  background: rgb(229 224 216 / 58%);
  clip-path: polygon(8% 0, 100% 9%, 90% 83%, 25% 100%, 0 67%);
  transform: rotate(-5deg);
}

.terms-document {
  width: min(100% - (var(--gutter) * 2), var(--container-editorial));
  margin-inline: auto;
}

.terms-section {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 41.25rem) minmax(0, 1fr);
  align-items: start;
  width: 100%;
  min-width: 0;
  padding: var(--space-16) 0;
  border-top: var(--border-subtle);
}

.terms-section__rail {
  grid-column: 1;
  width: 100%;
  min-width: 0;
  padding-top: 0.38rem;
}

.terms-section__number,
.terms-section__category,
.terms-end__label,
.terms-rights-index__label {
  display: block;
  font-size: var(--text-utility);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-utility);
  text-transform: uppercase;
}

.terms-section__number {
  color: var(--color-deep-wine);
  margin-bottom: var(--space-1);
}

.terms-section__category {
  color: var(--color-muted-ink);
}

.terms-section__content {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: 41.25rem;
}

.terms-section__content > h2 {
  margin-bottom: var(--space-6);
}

.terms-section__content > h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
}

.terms-section__note {
  margin-top: var(--space-6);
  color: var(--color-muted-ink);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.terms-section__note--ruled {
  padding-top: var(--space-4);
  border-top: var(--border-subtle);
}

.terms-section__list {
  display: grid;
  gap: var(--space-3);
  margin-top: 0;
  padding-inline-start: 1.45rem;
}

.terms-section__list li {
  padding-left: var(--space-2);
}

.terms-pullquote {
  width: min(31.25rem, calc(100% - 2.5rem));
  min-width: 0;
  margin: var(--space-8) 0 var(--space-8) 2.5rem;
  padding: var(--space-6) var(--space-8);
  border: 0;
  background: var(--color-paper-stone);
  color: var(--color-soft-black);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
}

.terms-pullquote p {
  margin: 0;
}

.terms-enquiry-emphasis {
  color: var(--color-deep-wine);
  font-weight: 600;
}

.terms-service-note {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: var(--border-subtle);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.terms-service-note p {
  margin: 0;
}

.terms-closing-rule {
  width: calc(100% + 10rem);
  max-width: none;
  height: 1px;
  margin: var(--space-8) 0 0;
  border: 0;
  background: var(--color-paper-stone);
}

.terms-closing-rule--long {
  width: calc(100% + 15rem);
}

.terms-rights-index {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 29fr) minmax(0, 29fr);
  width: 100%;
  min-width: 0;
  margin: var(--space-8) 0;
  border-top: var(--border-subtle);
  border-bottom: var(--border-subtle);
}

.terms-rights-index__entry {
  min-width: 0;
  padding: var(--space-4);
}

.terms-rights-index__entry + .terms-rights-index__entry {
  border-left: var(--border-subtle);
}

.terms-rights-index__label {
  margin-bottom: var(--space-2);
  color: var(--color-deep-wine);
}

.terms-rights-index__entry p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.terms-privacy-accent {
  width: 7.5rem;
  height: 1px;
  margin: 0 0 var(--space-6);
  border: 0;
  background: var(--color-deep-wine);
}

.terms-disclaimer {
  width: min(33.75rem, calc(100% - 2rem));
  min-width: 0;
  margin: var(--space-8) 0 var(--space-8) 2rem;
  padding: var(--space-6) var(--space-8);
  background: var(--color-paper-stone);
}

.terms-disclaimer p {
  margin: 0;
}

.terms-protection {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: var(--border-strong);
  font-weight: 600;
}

.terms-end {
  width: min(100% - (var(--gutter) * 2), var(--container-editorial));
  margin: 0 auto;
  padding: var(--space-20) 0 var(--space-20);
}

.terms-end__content {
  width: min(31.25rem, calc(100% - 1.75rem));
  min-width: 0;
  margin-left: 1.75rem;
}

.terms-end__label {
  margin-bottom: var(--space-4);
  color: var(--color-muted-ink);
}

.terms-end__acknowledgement {
  margin-bottom: var(--space-4);
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
}

.terms-end__note {
  margin: 0;
  color: var(--color-muted-ink);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

@media (max-width: 56.25rem) {
  .terms-lead {
    padding-top: var(--space-20);
  }

  .terms-lead__copy {
    width: min(43.75rem, 100%);
    min-width: 0;
  }

  .terms-lead__shape {
    display: none;
  }

  .terms-section {
    grid-template-columns: minmax(0, 43.75rem);
    padding: var(--space-12) 0;
  }

  .terms-section__rail,
  .terms-section__content {
    grid-column: 1;
  }

  .terms-section__rail {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-top: 0;
  }

  .terms-section__number {
    margin: 0;
  }

  .terms-closing-rule,
  .terms-closing-rule--long {
    width: 100%;
  }
}

@media (max-width: 53.75rem) {
  .terms-pullquote {
    width: 100%;
    margin-left: 0;
    padding: var(--space-6) var(--space-5, 1.25rem);
  }
}

@media (max-width: 51.25rem) {
  .terms-disclaimer {
    width: 100%;
    margin-left: 0;
    padding: var(--space-6) var(--space-5, 1.25rem);
  }

  .terms-end__content {
    width: min(41.25rem, 100%);
    margin-left: 0;
  }
}

@media (max-width: 47.5rem) {
  .terms-rights-index {
    grid-template-columns: minmax(0, 1fr);
  }

  .terms-rights-index__entry {
    width: 100%;
  }

  .terms-rights-index__entry + .terms-rights-index__entry {
    border-top: var(--border-subtle);
    border-left: 0;
  }
}

@media (max-width: 45rem) {
  .terms-lead {
    padding: var(--space-16) 0 var(--space-12);
  }

  .terms-lead__title {
    max-width: 100%;
    font-size: clamp(3rem, 14vw, 3.875rem);
    line-height: 0.92;
  }

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

  .terms-lead__tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .terms-lead__print {
    width: auto;
    margin-left: 0;
  }

  .terms-section {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-12) 0;
  }

  .terms-section__content > h2 {
    font-size: clamp(1.875rem, 8vw, 2.125rem);
  }

  .terms-section__content > h3 {
    font-size: 1.5rem;
  }

  .terms-pullquote,
  .terms-disclaimer {
    padding: var(--space-6) var(--space-4);
  }

  .terms-pullquote {
    font-size: clamp(1.875rem, 9vw, 2.125rem);
  }

  .terms-end {
    padding: var(--space-16) 0;
  }
}

@media print {
  [data-terms-page] {
    background: #fff;
    color: #1a1a1a;
  }

  .terms-lead {
    padding-top: 2rem;
  }

  .terms-lead__shape,
  .terms-lead__print {
    display: none;
  }

  .terms-lead__copy,
  .terms-section__content,
  .terms-end__content {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
  }

  .terms-section {
    grid-template-columns: 4rem minmax(0, 1fr);
    break-inside: avoid;
  }

  .terms-section__rail {
    grid-column: 1;
    display: block;
  }

  .terms-section__content {
    grid-column: 2;
  }

  .terms-pullquote,
  .terms-disclaimer {
    width: 100%;
    margin-left: 0;
    background: #fff;
    border: 1px solid #e5e0d8;
  }

  .terms-closing-rule,
  .terms-closing-rule--long {
    width: 100%;
  }

  h2,
  h3 {
    break-after: avoid;
  }
}
