/*
 * Phase 12.9-C global typography normalization.
 *
 * Loaded after all page and responsive styles so frozen templates inherit one
 * controlled B2B typography scale without page-level rewrites.
 */

body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

body .site-main {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

/*
 * Enforce the 14px accessibility floor for main content. More specific rules
 * below restore the intended body, lead, card, and heading sizes.
 */
body .site-main * {
  font-size: var(--font-size-small) !important;
}

body .site-main h1,
body .site-main [class] h1 {
  font-size: clamp(36px, 3vw, var(--font-size-h1-desktop)) !important;
}

body .site-main h2,
body .site-main [class] h2 {
  font-size: clamp(30px, 2.5vw, var(--font-size-h2-desktop)) !important;
}

body .site-main h3,
body .site-main [class] h3 {
  font-size: clamp(22px, 1.7vw, 26px) !important;
}

body .site-main h4 {
  font-size: 20px !important;
}

body .site-main h5 {
  font-size: 18px !important;
}

body .site-main h6 {
  font-size: 16px !important;
}

body .site-main h1,
body .site-main h2,
body .site-main h3,
body .site-main h4,
body .site-main h5,
body .site-main h6 {
  line-height: var(--line-height-heading) !important;
}

body .site-main h1,
body .site-main h2 {
  letter-spacing: -.035em;
}

body .site-main h3,
body .site-main h4,
body .site-main h5,
body .site-main h6 {
  letter-spacing: -.02em;
}

body .site-main p,
body .site-main li,
body .site-main dd,
body .site-main td {
  font-size: var(--font-size-body) !important;
  line-height: var(--line-height-body) !important;
}

body .site-main article p,
body .site-main article li,
body .site-main [class*="card"] p,
body .site-main [class*="card"] li {
  font-size: var(--font-size-card-body) !important;
}

body .site-main .section-intro,
body .site-main [class*="answer"],
body .site-main [class*="description"],
body .site-main [class*="lead"] {
  font-size: var(--font-size-large) !important;
  line-height: var(--line-height-body) !important;
}

body .site-main p :is(a, em, strong, span),
body .site-main li :is(a, em, strong, span),
body .site-main dd :is(a, em, strong, span),
body .site-main td :is(a, em, strong, span) {
  font-size: inherit !important;
}

body .site-main :is(
  small,
  figcaption,
  caption,
  label,
  dt,
  th,
  .section-kicker,
  .eyebrow,
  [class*="badge"],
  [class*="status"],
  [class*="kicker"],
  [class*="meta"]
) {
  font-size: var(--font-size-small) !important;
  line-height: 1.5 !important;
}

body .site-main .section,
body .site-main .legal-main {
  padding-block: var(--section-space-desktop) !important;
}

body .site-main .section-title {
  margin-bottom: 20px;
}

body .site-main .section-intro {
  margin-bottom: 42px;
}

body .site-main article h3,
body .site-main [class*="card"] h3 {
  margin-bottom: 10px;
}

/*
 * Shared navigation and footer copy also follows the 14px small-text floor.
 * Heading scale rules remain scoped to main content.
 */
body :is(.site-header, .global-header, .mobile-nav, .global-mobile-nav, .global-footer)
  :is(a, button, p, li, span, small, label) {
  font-size: var(--font-size-small) !important;
}

body .global-footer :is(h2, h3, h4) {
  font-size: 16px !important;
  line-height: var(--line-height-heading) !important;
}

@media (max-width: 1024px) {
  body .site-main h1,
  body .site-main [class] h1 {
    font-size: var(--font-size-h1-tablet) !important;
  }

  body .site-main h2,
  body .site-main [class] h2 {
    font-size: var(--font-size-h2-tablet) !important;
  }

  body .site-main h3,
  body .site-main [class] h3 {
    font-size: var(--font-size-h3-compact) !important;
  }

  body .site-main .section,
  body .site-main .legal-main {
    padding-block: var(--section-space-tablet) !important;
  }
}

@media (max-width: 680px) {
  body .site-main h1,
  body .site-main [class] h1 {
    font-size: var(--font-size-h1-mobile) !important;
  }

  body .site-main h2,
  body .site-main [class] h2 {
    font-size: var(--font-size-h2-mobile) !important;
  }

  body .site-main .section,
  body .site-main .legal-main {
    padding-block: var(--section-space-mobile) !important;
  }

  body .site-main .section-intro {
    margin-bottom: 34px;
  }
}
