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

.terms-page strong {
  color: var(--color-alabaster-white);
  font-weight: 600;
}

.terms-intro__grid,
.terms-chapter__grid,
.terms-panel-layout,
.terms-legal-layout,
.terms-questions__layout,
.terms-guide__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
}

.terms-intro__content {
  grid-column: 2 / span 7;
  min-width: 0;
  width: 100%;
  max-width: 47.5rem;
}

.terms-intro__content h1 {
  max-width: 47.5rem;
}

.terms-intro__status {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  margin: 0 0 var(--space-5);
  border-block: 1px solid var(--color-bronze-wire);
  color: var(--color-cognac-amber);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: var(--leading-compact);
  text-transform: uppercase;
}

.terms-intro__lead {
  max-width: 42.5rem;
}

.terms-intro__scope {
  max-width: 42.5rem;
}

.terms-guide__intro {
  grid-column: 2 / span 7;
  min-width: 0;
  width: 100%;
  max-width: 42.5rem;
}

.terms-guide__nav {
  grid-column: 2 / span 9;
  min-width: 0;
  width: 100%;
}

.terms-guide__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-bronze-wire);
}

.terms-guide__list > li {
  min-width: 0;
  width: 100%;
  border-bottom: 1px solid var(--color-bronze-wire);
}

.terms-guide__list > li:nth-child(odd) {
  border-right: 1px solid var(--color-bronze-wire);
}

.terms-guide__list a {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: var(--space-3) var(--space-4);
  color: var(--color-sand-cream);
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.terms-guide__list a:hover {
  background: rgba(212, 154, 85, 0.06);
  color: var(--color-australian-gold);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

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

.terms-reading--standard,
.terms-reading--poker {
  max-width: 43.75rem;
}

.terms-reading--dining {
  max-width: 43.125rem;
}

.terms-clauses {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  width: 100%;
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none !important;
  counter-reset: clause;
}

.terms-clauses > li {
  position: relative;
  min-width: 0;
  width: 100%;
  counter-increment: clause;
}

.terms-clause::before {
  position: absolute;
  top: 0.25rem;
  left: -3.75rem;
  width: 2.75rem;
  color: var(--color-cognac-amber);
  content: counter(clause, decimal-leading-zero);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.35;
}

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

.terms-clause p {
  max-width: 43.75rem;
}

.terms-clause > :last-child {
  margin-bottom: 0;
}

.terms-clause__label {
  margin-bottom: var(--space-2) !important;
  color: var(--color-cognac-amber);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.terms-clause__note {
  max-width: 38.75rem !important;
  color: var(--color-muted-slate) !important;
  font-size: var(--text-label);
  line-height: 1.55;
}

.terms-clause--callout {
  max-width: 40rem;
  padding: var(--space-5);
  border: var(--border-subtle);
  background: var(--color-truffle-velvet);
}

.terms-clause--callout::before {
  left: -3.75rem;
}

.terms-clause--separated {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-bronze-wire);
}

.terms-clause--amber-rule {
  padding-left: var(--space-5);
  border-left: 1px solid var(--color-cognac-amber);
}

.terms-clause--merlot-rule,
.terms-clause--rsa {
  padding-left: var(--space-5);
  border-left: 1px solid var(--color-vintage-merlot);
}

.terms-panel-layout__marker {
  grid-column: 2 / span 1;
  min-width: 0;
  width: 100%;
}

.terms-panel-layout__marker .overline {
  white-space: nowrap;
}

.terms-booking-panel {
  grid-column: 3 / span 7;
  min-width: 0;
  width: 100%;
  max-width: 47.5rem;
}

.terms-booking-panel__intro {
  max-width: 43.75rem;
}

.terms-booking-panel .terms-clauses {
  gap: var(--space-6);
}

.terms-booking-panel .terms-clause::before {
  left: -3.75rem;
}

.terms-legal-panel {
  grid-column: 3 / span 8;
  min-width: 0;
  width: 100%;
  max-width: 51.5rem;
}

.terms-legal-panel .terms-clauses {
  max-width: 43.75rem;
}

.terms-clause--narrow p {
  max-width: 41.25rem;
}

.terms-clause--policy-links p {
  max-width: 35rem;
}

.terms-policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
}

.terms-policy-actions > a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 2.75rem;
  color: var(--color-australian-gold);
  font-size: var(--text-label);
  font-weight: 600;
}

.terms-questions__layout {
  align-items: center;
  row-gap: var(--space-5);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: var(--border-subtle);
}

.terms-questions__copy {
  grid-column: 2 / span 6;
  min-width: 0;
  width: 100%;
  max-width: 38.75rem;
}

.terms-questions__copy p {
  max-width: 38.75rem;
}

.terms-questions__action {
  grid-column: 9 / span 2;
  justify-self: end;
  min-width: 11.25rem;
  width: 100%;
}

.terms-questions__action .button-secondary {
  width: 100%;
}

@media (max-width: 1023px) {
  .terms-intro__grid,
  .terms-chapter__grid,
  .terms-panel-layout,
  .terms-legal-layout,
  .terms-questions__layout,
  .terms-guide__grid {
    column-gap: var(--space-4);
  }

  .terms-intro__content,
  .terms-guide__intro {
    grid-column: 1 / span 8;
  }

  .terms-guide__nav {
    grid-column: 1 / span 10;
  }

  .terms-reading {
    grid-column: 2 / span 8;
  }

  .terms-panel-layout__marker {
    grid-column: 1 / span 2;
  }

  .terms-booking-panel {
    grid-column: 3 / span 8;
  }

  .terms-legal-panel {
    grid-column: 2 / span 10;
  }

  .terms-questions__copy {
    grid-column: 1 / span 7;
  }

  .terms-questions__action {
    grid-column: 9 / span 3;
  }
}

@media (max-width: 899px) {
  .terms-panel-layout__marker {
    grid-column: 2 / span 8;
  }

  .terms-booking-panel {
    grid-column: 2 / span 8;
  }

  .terms-panel-layout__marker .overline {
    margin-bottom: var(--space-4);
  }

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

  .terms-questions__action {
    grid-column: 1 / span 3;
    justify-self: start;
  }
}

@media (max-width: 759px) {
  .terms-intro__grid,
  .terms-chapter__grid,
  .terms-panel-layout,
  .terms-legal-layout,
  .terms-questions__layout,
  .terms-guide__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-5);
  }

  .terms-intro__content,
  .terms-guide__intro,
  .terms-guide__nav,
  .terms-reading,
  .terms-panel-layout__marker,
  .terms-booking-panel,
  .terms-legal-panel,
  .terms-questions__copy,
  .terms-questions__action {
    grid-column: 1;
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .terms-intro__content h1,
  .terms-intro__lead,
  .terms-intro__scope,
  .terms-guide__intro,
  .terms-booking-panel__intro,
  .terms-questions__copy,
  .terms-questions__copy p {
    max-width: none;
  }

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

  .terms-guide__list > li:nth-child(odd) {
    border-right: 0;
  }

  .terms-guide__list a {
    min-height: 2.75rem;
  }

  .terms-reading--standard,
  .terms-reading--poker,
  .terms-reading--dining {
    max-width: none;
  }

  .terms-clauses {
    gap: var(--space-6);
    margin-top: var(--space-5);
  }

  .terms-clause {
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-bronze-wire);
  }

  .terms-clause::before {
    position: static;
    display: block;
    width: auto;
    margin-bottom: var(--space-2);
  }

  .terms-clause--callout {
    max-width: none;
    padding: var(--space-5);
    border: var(--border-subtle);
  }

  .terms-clause--separated {
    padding-top: var(--space-5);
  }

  .terms-clause--amber-rule,
  .terms-clause--merlot-rule,
  .terms-clause--rsa {
    padding-left: var(--space-4);
  }

  .terms-clause p,
  .terms-clause__note,
  .terms-clause--narrow p,
  .terms-clause--policy-links p {
    max-width: none !important;
  }

  .terms-booking-panel,
  .terms-legal-panel {
    padding: var(--space-5);
  }

  .terms-policy-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .terms-policy-actions > a {
    width: 100%;
  }

  .terms-questions__layout {
    padding: var(--space-5);
  }

  .terms-questions__action {
    min-width: 0;
  }
}
