/*
 * Shared readable heading system.
 * Loaded after page-specific styles so headings never split inside words.
 */

main h1,
main h2,
main h3,
main h4 {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

main h1 {
  max-width: 16ch !important;
  font-size: clamp(3rem, 5.5vw, 5.75rem) !important;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
}

main h2 {
  max-width: 20ch !important;
  font-size: clamp(2.25rem, 4.2vw, 4.4rem) !important;
  letter-spacing: -0.035em !important;
  line-height: 1.04 !important;
}

main h3 {
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
  line-height: 1.12;
}

/* Component headings must remain compact inside forms, cards, and articles. */
.quote-panel h2,
.hero-new__quote h2 {
  max-width: 18ch !important;
  font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
  line-height: 1.04 !important;
}

.article-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.article-card__body {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.article-card h2 {
  max-width: 100% !important;
  margin-bottom: 0.85rem;
  font-size: clamp(1.55rem, 2.15vw, 2rem) !important;
  letter-spacing: -0.025em !important;
  line-height: 1.08 !important;
  text-wrap: pretty;
}

.article-card__body > p {
  display: block;
  overflow: visible;
  margin-bottom: 1.25rem;
  -webkit-line-clamp: unset;
}

.article-card .text-link {
  margin-top: auto;
}

.article-content h2 {
  max-width: 24ch !important;
  font-size: clamp(2rem, 3.8vw, 3.4rem) !important;
  line-height: 1.08 !important;
}

.article-content h3,
.editorial-hold h2 {
  max-width: 28ch !important;
  font-size: clamp(1.45rem, 2.6vw, 2.15rem) !important;
  line-height: 1.12 !important;
}

.accordion__item h3 {
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

.accordion__item button {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 520;
  letter-spacing: -0.012em;
  line-height: 1.35;
  text-wrap: pretty;
}

.accordion__item button > span {
  max-width: 48rem;
}

.accordion__panel p {
  font-size: 0.98rem;
  line-height: 1.7;
}

@media (max-width: 42rem) {
  main h1 {
    max-width: 100% !important;
    font-size: clamp(2.7rem, 12vw, 4.25rem) !important;
    line-height: 1.02 !important;
  }

  main h2 {
    max-width: 100% !important;
    font-size: clamp(2.15rem, 9vw, 3.35rem) !important;
    line-height: 1.06 !important;
  }
}
