/**
 * Shared rich-text hierarchy for full pages and category introductions.
 */
:where(.site-main) .text-content {
  --content-h2-size: 1.25rem;
  --content-h3-size: 1.125rem;
  --content-h4-size: 1.0625rem;
  --content-h5-size: 1rem;
  --content-h6-size: 0.9375rem;
}

:where(.site-main) .text-content h2 {
  font-size: var(--content-h2-size);
}

:where(.site-main) .text-content h3 {
  font-size: var(--content-h3-size);
}

:where(.site-main) .text-content h4 {
  font-size: var(--content-h4-size);
}

:where(.site-main) .text-content h5 {
  font-size: var(--content-h5-size);
}

:where(.site-main) .text-content h6 {
  font-size: var(--content-h6-size);
}

@media (min-width: 500px) {
  :where(.site-main) .text-content {
    --content-h2-size: clamp(1.25rem, calc(1.6vw + 0.75rem), 1.75rem);
    --content-h3-size: clamp(1.125rem, calc(0.8vw + 0.875rem), 1.375rem);
    --content-h4-size: clamp(1.0625rem, calc(0.6vw + 0.875rem), 1.25rem);
    --content-h5-size: clamp(1rem, calc(0.4vw + 0.875rem), 1.125rem);
    --content-h6-size: clamp(0.9375rem, calc(0.2vw + 0.875rem), 1rem);
  }
}

:where(.site-main) .text-content :is(h2, h3, h4, h5, h6) {
  margin-block: 1.5rem 0.75rem;
  line-height: 1.35;
}
:where(.site-main) .text-content > :is(h2, h3, h4, h5, h6):first-child {
  margin-block-start: 0;
}
