.terms-page {
  --terms-white: #ffffff;
  --terms-green: #358c74;
  --terms-aqua: #48d9b0;
  --terms-dark: #1f6351;
  --terms-ink: #143f35;
  --terms-muted: #49655e;
  --terms-surface: #f4faf8;
  --terms-line: #dce9e4;
  margin: 0;
  overflow-x: hidden;
  background: var(--terms-white);
  color: var(--terms-ink);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

.terms-page *,
.terms-page *::before,
.terms-page *::after {
  box-sizing: border-box;
}

.terms-page h1,
.terms-page h2,
.terms-page h3,
.terms-page p {
  margin-top: 0;
}

.terms-page main a {
  color: var(--terms-dark);
  overflow-wrap: anywhere;
  text-underline-offset: 0.2em;
}

.terms-page a:focus-visible,
.terms-page button:focus-visible {
  outline: 3px solid var(--terms-aqua);
  outline-offset: 4px;
}

.terms-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  background: var(--terms-dark);
  color: var(--terms-white);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.terms-skip-link:focus {
  color: var(--terms-white);
  transform: translateY(0);
}

.terms-hero {
  padding: clamp(4.75rem, 9vw, 7.5rem) 0 clamp(4rem, 7vw, 6rem);
  background: var(--terms-surface);
}

.terms-hero__inner,
.terms-layout {
  width: min(calc(100% - 3rem), 1160px);
  margin: 0 auto;
}

.terms-eyebrow {
  margin-bottom: 1rem;
  color: var(--terms-green);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.terms-hero h1,
.terms-document h2 {
  color: var(--terms-dark);
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.terms-hero h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(4.25rem, 8vw, 6.75rem);
  line-height: 0.9;
}

.terms-hero__copy {
  max-width: 700px;
  margin-bottom: 0.65rem;
  color: var(--terms-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.terms-effective-date {
  margin-bottom: 0;
  color: var(--terms-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.terms-layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 780px);
  justify-content: center;
  align-items: start;
  gap: clamp(3.5rem, 7vw, 6.5rem);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.terms-toc {
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--terms-line);
  border-radius: 10px;
  background: var(--terms-surface);
}

.terms-toc h2 {
  margin-bottom: 0.8rem;
  color: var(--terms-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.terms-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.terms-toc li {
  padding-left: 0.2rem;
  color: var(--terms-muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.terms-toc li + li {
  margin-top: 0.4rem;
}

.terms-toc a {
  color: inherit;
  text-decoration: none;
}

.terms-toc a:hover {
  color: var(--terms-green);
  text-decoration: underline;
}

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

.terms-document__intro {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

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

.terms-section {
  padding: clamp(2.75rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--terms-line);
  scroll-margin-top: 2rem;
}

.terms-section h2 {
  margin-bottom: 1.05rem;
  font-size: clamp(2.25rem, 4.6vw, 3.35rem);
  line-height: 1;
}

.terms-section h3 {
  margin: 1.75rem 0 0.65rem;
  color: var(--terms-ink);
  font-size: 1rem;
  font-weight: 700;
}

.terms-section p {
  margin-bottom: 1rem;
}

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

.terms-section ul,
.terms-section ol {
  margin: 1.15rem 0 1.35rem;
  padding-left: 1.5rem;
}

.terms-section li {
  padding-left: 0.3rem;
}

.terms-section li + li {
  margin-top: 0.6rem;
}

.terms-note,
.terms-emphasis {
  margin: 1.35rem 0;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--terms-aqua);
  border-radius: 0 6px 6px 0;
  background: var(--terms-surface);
}

.terms-emphasis {
  color: var(--terms-dark);
  font-weight: 600;
}

.terms-contact-details {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--terms-line);
}

@media (max-width: 960px) {
  .terms-layout {
    display: block;
    width: min(calc(100% - 3rem), 820px);
  }

  .terms-toc {
    position: static;
    max-height: none;
    margin-bottom: 4rem;
    overflow: visible;
  }

  .terms-toc ol {
    columns: 2;
    column-gap: 2.5rem;
  }

  .terms-toc li {
    break-inside: avoid;
    margin-bottom: 0.45rem;
  }
}

@media (max-width: 700px) {
  .terms-hero__inner,
  .terms-layout {
    width: min(calc(100% - 2rem), 820px);
  }

  .terms-hero {
    padding: 3.75rem 0 3.5rem;
  }

  .terms-hero h1 {
    font-size: clamp(3.55rem, 17vw, 5.1rem);
  }

  .terms-layout {
    padding: 3.5rem 0 5rem;
  }

  .terms-toc {
    margin-bottom: 3.5rem;
    padding: 1.15rem;
  }

  .terms-toc ol {
    columns: 1;
  }

  .terms-toc li {
    font-size: 0.9rem;
  }

  .terms-section h2 {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .terms-section ul,
  .terms-section ol {
    padding-left: 1.35rem;
  }
}

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