html:has(.reference-page) {
  scroll-behavior: smooth;
}

.reference-mast {
  padding-block: clamp(36px, 6vw, 80px);
  background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
  border-bottom: 1px solid var(--border);
}

.reference-mast h1 {
  margin-top: 16px;
  text-wrap: wrap;
}

.reference-intro {
  max-width: 42em;
  margin-top: 18px;
  color: var(--text-muted);
  line-height: 1.8;
}

.reference-manual {
  padding-top: 16px;
  padding-bottom: var(--section-space);
}

.reference-manual > .toc-tabs a {
  min-height: 40px;
  text-decoration: none;
}

.reference-manual > .reference-chapter:first-of-type {
  margin-top: clamp(28px, 5vw, 56px);
}

.reference-chapter {
  padding-top: clamp(16px, 3vw, 28px);
  border-top: 1px solid var(--border);
}

.reference-chapter > h2 {
  text-wrap: wrap;
}

.reference-chapter > h3 {
  margin-top: 1.55em;
}

.reference-chapter > p {
  line-height: 1.85;
}

.reference-chapter > .callout {
  margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  html:has(.reference-page) {
    scroll-behavior: auto;
  }
}