.page-disclaimer {
  --page-number: clamp(2rem, 7vw, 3.75rem);
  --page-title: clamp(1.75rem, 4vw, 2.75rem);
  --page-rule: linear-gradient(to right, var(--accent-green), var(--accent-orange));

  position: relative;
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(to right, rgba(30, 42, 74, 0.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 42, 74, 0.32) 1px, transparent 1px);
  background-size: 26px 26px;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.terms-hero {
  display: grid;
  gap: 1.5rem 3rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  scroll-margin-top: 5rem;
}

.terms-hero__kicker {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin: 0 0 0.75rem;
}

.terms-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--page-title);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--text-title);
  margin: 0;
}

.terms-hero__lead {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-body);
}

.terms-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.terms-hero__figure {
  margin: 0;
}

.terms-hero__img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--line-grid);
  box-shadow: var(--shadow-panel);
}

.terms-hero__cap {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.terms-layout {
  display: block;
  margin-top: clamp(2rem, 6vw, 4rem);
  scroll-margin-top: 5rem;
}

.terms-toc__title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.terms-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.terms-toc__list li {
  margin: 0;
}

.terms-toc__list a {
  display: inline-block;
  padding: 0.375rem 0.825rem;
  border: 1px solid var(--line-grid);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-body);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.terms-toc__list a:hover {
  border-color: var(--accent-green);
  color: var(--text-title);
  background: rgba(0, 230, 138, 0.06);
}

.terms-body {
  margin-top: 1.75rem;
  background: rgba(14, 27, 51, 0.62);
  border: 1px solid var(--line-grid);
  box-shadow: var(--shadow-panel);
  padding: clamp(1.25rem, 4vw, 3rem);
}

.terms-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.875rem;
  border-top: 1px solid var(--line-grid);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  scroll-margin-top: 5rem;
}

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

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

.terms-section__no {
  font-family: var(--font-mono);
  font-size: var(--page-number);
  font-weight: 800;
  line-height: 1;
  color: rgba(0, 230, 138, 0.5);
  position: relative;
}

.terms-section__no::after {
  content: "";
  position: absolute;
  right: -0.42em;
  top: 0.18em;
  width: 0.38em;
  height: 0.38em;
  background: var(--accent-orange);
  transform: rotate(45deg);
}

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

.terms-section__content h2 {
  display: inline-block;
  position: relative;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  color: var(--text-title);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

.terms-section__content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 2.25rem;
  height: 0.28rem;
  background: var(--page-rule);
  transform: skewX(-24deg);
}

.terms-section__content p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-body);
  max-width: 65ch;
}

.terms-section__content p + p {
  margin-top: 0.75rem;
}

.terms-sign {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding: 1.75rem;
  background: rgba(27, 33, 77, 0.35);
  border: 1px dashed rgba(95, 111, 150, 0.5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
}

.terms-sign__stamp {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 0.5rem 0.75rem;
  transform: rotate(-3deg);
}

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

.terms-sign__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-title);
  margin: 0;
}

.terms-sign__meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.375rem 0 0;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  background: var(--zone-indigo);
  color: var(--text-title);
  border: 1px solid var(--line-grid);
  border-radius: 999px;
  box-shadow: var(--shadow-panel);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-decoration: none;
  opacity: 0.92;
  transition: background 0.2s ease, color 0.2s ease;
}

.back-to-top:hover {
  background: var(--zone-teal);
  color: var(--text-title);
  opacity: 1;
}

@media (min-width: 768px) {
  .terms-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
  }

  .terms-section {
    gap: 0.25rem 1.25rem;
  }

  .terms-section__content p {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  .page-disclaimer {
    padding-inline: clamp(2rem, 6vw, 5rem);
  }

  .terms-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 2.75rem;
    align-items: start;
  }

  .terms-body {
    margin-top: 0;
  }

  .terms-toc {
    position: sticky;
    top: 2rem;
  }

  .terms-toc__list {
    display: block;
  }

  .terms-toc__list li {
    margin-bottom: 0.375rem;
  }

  .terms-toc__list a {
    display: block;
    border: 0;
    border-left: 2px solid var(--line-grid);
    border-radius: 0;
    padding: 0.375rem 0.75rem;
    background: transparent;
  }

  .terms-toc__list a:hover {
    border-left-color: var(--accent-green);
    background: rgba(0, 230, 138, 0.06);
  }
}
