:root {
  --reference-chapter-gap: clamp(48px, 7vw, 96px);
  --reference-inline-gap: clamp(12px, 3vw, 24px);
  --reference-note-size: .875rem;
}

.reference-intro {
  padding-top: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(28px, 5vw, 64px);
  background: radial-gradient(ellipse at 92% 18%, var(--accent-08), var(--clear) 58%);
}

.reference-intro .lede {
  max-width: 36em;
  margin-top: 20px;
}

.reference-entry {
  max-width: 40em;
  margin-top: 16px;
  color: var(--text-soft);
}

.reference-body {
  padding-bottom: var(--section-space);
}

.reference-body .toc-tabs a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: var(--reference-note-size);
}

.reference-body .toc-tabs a.is-current {
  color: var(--accent-dark);
}

.reference-body > .reference-chapter {
  margin-top: var(--reference-chapter-gap);
}

.reference-heading {
  padding-bottom: .85em;
  border-bottom: 1px solid var(--line-strong);
}

.reference-tab {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border: 1px solid var(--accent-20);
  border-radius: var(--r-pill);
  background: var(--accent-08);
  color: var(--accent-dark);
  font-size: var(--reference-note-size);
  font-weight: 700;
}

.reference-heading h2 {
  margin-top: 0;
  text-wrap: pretty;
}

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

.reference-chapter > :is(p, .callout, .table-scroll) {
  margin-top: .85em;
}

.reference-chapter > .callout {
  margin-top: 1.35em;
}

.reference-chapter .data-table th,
.reference-chapter .data-table td {
  padding-inline: var(--reference-inline-gap);
}

.reference-chapter .data-table tbody th {
  background: var(--panel-3);
}