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

.terms-page a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.terms-hero {
  padding-block: clamp(4rem, 8vw, 7rem) clamp(3.5rem, 6vw, 5.5rem);
}

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

.terms-hero__reading {
  grid-column: 2 / span 7;
  min-width: 0;
  max-width: 43rem;
}

.terms-hero__eyebrow {
  color: var(--color-brass-500);
}

.terms-hero__lead {
  max-width: 38.75rem;
  color: var(--color-ivory-050);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.terms-hero__effective {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  margin-bottom: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--color-terracotta-600);
  background: rgba(255, 253, 248, 0.08);
  color: var(--color-ivory-050);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.terms-hero__effective span {
  color: var(--color-ivory-050);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terms-recreation-notice {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface-notice);
  color: var(--color-petrol-900);
}

.terms-recreation-notice__mark {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.3rem;
  border: 1px solid var(--color-terracotta-600);
  border-radius: 50%;
  position: relative;
}

.terms-recreation-notice__mark::before,
.terms-recreation-notice__mark::after {
  position: absolute;
  left: 50%;
  background: var(--color-terracotta-600);
  content: "";
  transform: translateX(-50%);
}

.terms-recreation-notice__mark::before {
  top: 0.25rem;
  width: 1px;
  height: 0.45rem;
}

.terms-recreation-notice__mark::after {
  bottom: 0.23rem;
  width: 1px;
  height: 1px;
  border-radius: 50%;
}

.terms-recreation-notice__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-2);
}

.terms-recreation-notice h2 {
  margin: 0;
  color: var(--color-petrol-900);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

.terms-recreation-notice p {
  margin: 0;
  max-width: 42.5rem;
}

.terms-navigation {
  display: none;
}

.terms-document {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) minmax(0, 2fr);
  column-gap: var(--space-5);
  align-items: start;
  padding-block: var(--section-space);
}

.terms-sidebar {
  grid-column: 1;
  min-width: 0;
}

.terms-sidebar__nav {
  position: sticky;
  top: 7rem;
  width: 100%;
  min-width: 0;
  padding-right: var(--space-5);
}

.terms-sidebar__title {
  margin-bottom: var(--space-3);
  color: var(--color-petrol-900);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terms-sidebar__nav ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.terms-sidebar__nav li {
  min-width: 0;
}

.terms-sidebar__nav a {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  padding: var(--space-2) 0;
  border-left: 1px solid transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  text-decoration: none;
  transition: border-color var(--transition-base), color var(--transition-base), padding-left var(--transition-base);
}

.terms-sidebar__nav a:hover,
.terms-sidebar__nav a[aria-current="true"] {
  padding-left: var(--space-2);
  border-left-color: var(--color-terracotta-600);
  color: var(--color-petrol-900);
}

.terms-content {
  grid-column: 2;
  min-width: 0;
}

.terms-section {
  scroll-margin-top: 7rem;
  min-width: 0;
  padding-block: var(--section-space-compact);
  border-top: 1px solid var(--border-color);
}

.terms-content > .terms-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.terms-section__heading {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  min-width: 0;
  margin-bottom: var(--space-6);
}

.terms-section__number {
  margin: 0;
  padding-top: 0.2rem;
  color: var(--color-brass-500);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1;
}

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

.terms-section__heading h2 {
  margin-bottom: 0;
}

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

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

.terms-section__copy--participation {
  max-width: 47.5rem;
}

.terms-section__copy--content {
  max-width: 47.5rem;
}

.terms-section__copy--reservations,
.terms-section__copy--use,
.terms-section__copy--limits {
  max-width: 43.75rem;
}

.terms-section__copy h3 {
  margin-top: var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

.terms-section__copy > h3:first-child,
.terms-section__copy > .terms-essential-copy:first-child h3,
.terms-section__copy > .terms-request-clarification:first-child h3,
.terms-section__copy > .terms-clause:first-child h3 {
  margin-top: 0;
}

.terms-editorial-list {
  max-width: 38.75rem;
}

.terms-related-note,
.terms-empty-note,
.terms-third-party-note,
.terms-update-note,
.terms-request-clarification,
.terms-essential-copy {
  min-width: 0;
}

.terms-related-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-petrol-100);
}

.terms-related-note h3,
.terms-related-note p,
.terms-empty-note h3,
.terms-empty-note p,
.terms-third-party-note h3,
.terms-third-party-note p,
.terms-update-note h3,
.terms-update-note p,
.terms-request-clarification h3,
.terms-request-clarification p,
.terms-essential-copy h3,
.terms-essential-copy p {
  margin: 0;
}

.terms-related-note h3,
.terms-empty-note h3,
.terms-third-party-note h3,
.terms-update-note h3,
.terms-request-clarification h3,
.terms-essential-copy h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

.terms-section--participation {
  margin-inline: calc(var(--container-padding) * -1);
  padding-inline: var(--container-padding);
  border-top: 0;
  background: var(--color-petrol-100);
}

.terms-section--participation .terms-section__heading,
.terms-section--participation .terms-section__copy {
  width: min(100%, 43.75rem);
  margin-left: calc((100% / 12) * 3 + var(--space-5));
}

.terms-essential-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-left: var(--space-5);
  border-left: 3px solid var(--color-terracotta-600);
}

.terms-principles {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 47.5rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  counter-reset: principles;
}

.terms-principles li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: var(--space-3);
  min-width: 0;
  counter-increment: principles;
}

.terms-principles li::before {
  color: var(--color-brass-500);
  content: counter(principles, decimal-leading-zero);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
}

.terms-content__opening {
  max-width: 42.5rem;
  color: var(--color-petrol-900);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  line-height: 1.45;
}

.terms-topic-rows {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.terms-topic-row {
  display: grid;
  grid-template-columns: minmax(7rem, 22%) minmax(0, 78%);
  gap: var(--space-4);
  min-width: 0;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.terms-topic-row__label,
.terms-topic-row > p:last-child {
  margin: 0;
}

.terms-topic-row__label {
  color: var(--color-petrol-900);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terms-empty-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.terms-request-clarification {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-petrol-100);
}

.terms-request-clarification h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-heading);
}

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

.terms-clause--brass {
  border-top-color: var(--color-brass-500) !important;
}

.terms-third-party-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: calc(100% * 6 / 7);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.terms-update-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-petrol-100);
}

.terms-update-note__date {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-brass-500);
  color: var(--color-petrol-900);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.terms-contact {
  scroll-margin-top: 7rem;
  padding-block: var(--section-space);
}

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

.terms-contact__content {
  grid-column: 2 / span 7;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-5);
  max-width: 43.75rem;
}

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

.terms-contact__content .eyebrow {
  color: var(--color-brass-500);
}

.terms-contact__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  width: 100%;
  min-width: 0;
  margin: 0;
}

.terms-contact__details > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-2);
}

.terms-contact__details > div:last-child {
  grid-column: 1 / -1;
}

.terms-contact__details span {
  color: var(--color-brass-500);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terms-contact__details a {
  width: fit-content;
  max-width: 100%;
  color: var(--color-ivory-050);
  font-weight: var(--weight-bold);
  overflow-wrap: anywhere;
}

.terms-contact__details p {
  margin: 0;
  color: var(--color-ivory-050);
}

.terms-contact__version {
  width: 100%;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-brass-500);
  color: var(--color-ivory-050);
  font-size: var(--text-sm);
}

@media (max-width: 1023px) {
  .terms-hero__reading {
    grid-column: 1 / span 8;
  }

  .terms-navigation {
    display: block;
    padding-block: var(--space-5) 0;
  }

  .terms-mobile-index {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
  }

  .terms-mobile-index summary {
    padding: var(--space-4);
    color: var(--color-petrol-900);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
  }

  .terms-mobile-index nav {
    padding: 0 var(--space-4) var(--space-4);
  }

  .terms-mobile-index ol {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .terms-mobile-index a {
    display: block;
    padding-block: var(--space-2);
  }

  .terms-document {
    display: block;
    padding-top: var(--section-space-compact);
  }

  .terms-sidebar {
    display: none;
  }

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

  .terms-section--participation {
    margin-inline: calc(var(--container-padding) * -1);
  }

  .terms-section--participation .terms-section__heading,
  .terms-section--participation .terms-section__copy {
    width: min(100%, 43.75rem);
    margin-left: 0;
  }

  .terms-section--participation .terms-section__heading,
  .terms-section--participation .terms-section__copy {
    margin-inline: auto;
  }

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

@media (max-width: 900px) {
  .terms-hero__reading {
    grid-column: 1 / span 9;
  }

  .terms-third-party-note {
    width: 100%;
  }
}

@media (max-width: 840px) {
  .terms-topic-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }
}

@media (max-width: 767px) {
  .terms-hero {
    padding-block: var(--section-space-compact);
  }

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

  .terms-hero__reading,
  .terms-contact__content {
    grid-column: 1;
    width: 100%;
    max-width: none;
  }

  .terms-hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

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

  .terms-recreation-notice {
    grid-template-columns: 1.25rem minmax(0, 1fr);
    padding: var(--space-4);
  }

  .terms-document {
    padding-block: var(--section-space-compact);
  }

  .terms-content {
    width: 100%;
    max-width: none;
  }

  .terms-section__heading {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-5);
  }

  .terms-section__number {
    font-size: var(--text-xl);
  }

  .terms-section__copy--legal,
  .terms-section__copy--participation,
  .terms-section__copy--content,
  .terms-section__copy--reservations,
  .terms-section__copy--use,
  .terms-section__copy--limits {
    max-width: none;
  }

  .terms-section--participation {
    margin-inline: calc(var(--container-padding) * -1);
    padding-inline: var(--container-padding);
  }

  .terms-section--participation .terms-section__heading,
  .terms-section--participation .terms-section__copy {
    width: 100%;
    margin-inline: 0;
  }

  .terms-topic-row {
    padding-block: var(--space-5);
  }

  .terms-contact__details {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .terms-contact__details > div:last-child {
    grid-column: 1;
  }

  .terms-contact__details a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terms-sidebar__nav a {
    transition: none;
  }
}
