/* Public page headings only. Tablet and desktop retain their existing layout. */
@media (max-width: 767px) {
  #main-content h1,
  #main-content :is(.eyebrow, .geo-eyebrow, .fit-eyebrow, .review-kicker):has(+ h1) {
    text-align: center;
    width: 100%;
  }

  /* Center existing capped headings too, including children of start-aligned flex columns. */
  #main-content h1 {
    margin-inline: auto;
  }

  /* State-page labels are inline spans; give their text the heading's width. */
  #main-content span:is(.eyebrow, .geo-eyebrow):has(+ h1) {
    display: block;
  }

  /* Preserve the glossary label's existing flex layout and decorative rule. */
  #main-content .eyebrow:has(+ h1) {
    justify-content: center;
  }
}
