/*! NBC v6.667 · Global Section Heading System · balanced major-heading fit */

:root{
  --nbc-heading-section:clamp(54px,4.35vw,68px);
  --nbc-heading-signature:clamp(64px,5.05vw,80px);
  --nbc-heading-editorial:clamp(44px,3.55vw,56px);
  --nbc-heading-next:clamp(34px,2.75vw,44px);
  --nbc-heading-section-mobile:clamp(38px,10.2vw,44px);
  --nbc-heading-signature-mobile:clamp(42px,11.4vw,50px);
  --nbc-heading-editorial-mobile:clamp(34px,9.1vw,39px);
  --nbc-heading-next-mobile:clamp(28px,7.7vw,33px);
}

/*
  Major chapter headings across NBC.
  This layer is deliberately typography-only and is loaded after all page-specific CSS,
  but before the Ambilight contract. Cards, instrument labels and body copy are untouched.
*/
@media (min-width:761px){
  html body.page.design-system-executive main :is(
    .nbc-section-title,
    .service-context-head > h2,
    .service-editorial-head > h2,
    .service-after-head > h2,
    .service-proof-head > h2,
    .service-operating-signal__head > h2,
    .service-value-block > h2,
    .service-case-metric > h2,
    .service-authority-copy > h2,
    .process-evidence-head > h2,
    .erp-direction-head > h2,
    .erp-levels-head > h2,
    .erp-ai-copy > h2,
    .bi-head > h2,
    .dx-section-head > h2,
    .authority-section-head h2,
    .h7-section-head h2,
    .h7-unsure__copy > h2,
    .knowledge-container-head h2,
    .km-workbench-head__copy > h2,
    .km-b5-library-head__copy > h2,
    .km-decision > h2,
    .case2-section-head h2,
    .case2-section-title,
    .local-section-heading h2,
    .local-wide-heading h2,
    .local-independence-copy > h2,
    .ac-section-head h2,
    .nbc-contact-after-head > h2,
    .ac-intake-panel-head > h2,
    .nbc-about-section-intro > h2,
    .nbc-about-global-copy > h2,
    .trade-final-copy > h2,
    .ps-final-copy > h2,
    .ps-billing-copy > h2,
    .dc5-result-panel > h2,
    .evidence-library-cta h2,
    .dg3-section h2,
    .dg3-access-copy h2
  ){
    font-size:var(--nbc-heading-section)!important;
    line-height:.99!important;
    letter-spacing:-.044em!important;
    text-wrap:balance;
  }

  /* Signature chapters: the moments that structure the page, not merely introduce a block. */
  html body.page-home.design-system-executive main :is(
    .home-trust__head .nbc-section-title,
    .operating-twin__head .nbc-section-title,
    .home-service-choice__head > h2,
    .home-diagnosis-navigator__head .nbc-section-title,
    .home-case-proof-head .nbc-section-title,
    .home-self-service .nbc-section-title,
    .home-attitude .nbc-section-title,
    .home-conversation .nbc-section-title
  ),
  html body.page-home.design-system-executive main #situationen-title{
    font-size:var(--nbc-heading-signature)!important;
    line-height:.96!important;
    letter-spacing:-.050em!important;
  }

  html body.page-service.design-system-executive main :is(
    .pr-title-block > h2,
    .pp-title > h2,
    .dp-header > h2
  ),
  html body.page.design-system-executive main :is(
    .case-next-step h2,
    #case-next-step .case2-cta h2,
    .ac-final-cta h2,
    .ac-intake-panel-head h2,
    .process-conversion-section h2,
    .erp-decision-cta-section h2,
    .dg3-access-copy h2,
    .authority-section--next .authority-section-head h2,
    .local-final-grid h2,
    .km-final__grid h2,
    .ps-final-copy h2,
    .trade-final-copy h2
  ){
    font-size:var(--nbc-heading-signature)!important;
    line-height:.96!important;
    letter-spacing:-.050em!important;
    text-wrap:balance;
  }

  /* Long-form chapter headings keep hierarchy without turning every article section into a hero. */
  html body.page-template-article.design-system-executive main :is(
    .ep-chapter-title,
    .ep-conclusion > h2,
    .knowledge-container-head .nbc-section-title
  ){
    font-size:var(--nbc-heading-editorial)!important;
    line-height:1.01!important;
    letter-spacing:-.038em!important;
  }


  html body.page.design-system-executive main :is(
    .ep-conclusion-next > h3,
    .ai-final-conversion h3
  ){
    font-size:var(--nbc-heading-next)!important;
    line-height:1.02!important;
    letter-spacing:-.035em!important;
    text-wrap:balance;
  }
}

@media (max-width:760px){
  html body.page.design-system-executive main :is(
    .nbc-section-title,
    .service-context-head > h2,
    .service-editorial-head > h2,
    .service-after-head > h2,
    .service-proof-head > h2,
    .service-operating-signal__head > h2,
    .service-value-block > h2,
    .service-case-metric > h2,
    .service-authority-copy > h2,
    .process-evidence-head > h2,
    .erp-direction-head > h2,
    .erp-levels-head > h2,
    .erp-ai-copy > h2,
    .bi-head > h2,
    .dx-section-head > h2,
    .authority-section-head h2,
    .h7-section-head h2,
    .h7-unsure__copy > h2,
    .knowledge-container-head h2,
    .km-workbench-head__copy > h2,
    .km-b5-library-head__copy > h2,
    .km-decision > h2,
    .case2-section-head h2,
    .case2-section-title,
    .local-section-heading h2,
    .local-wide-heading h2,
    .local-independence-copy > h2,
    .ac-section-head h2,
    .nbc-contact-after-head > h2,
    .ac-intake-panel-head > h2,
    .nbc-about-section-intro > h2,
    .nbc-about-global-copy > h2,
    .trade-final-copy > h2,
    .ps-final-copy > h2,
    .ps-billing-copy > h2,
    .dc5-result-panel > h2,
    .evidence-library-cta h2,
    .dg3-section h2,
    .dg3-access-copy h2
  ){
    font-size:var(--nbc-heading-section-mobile)!important;
    line-height:.99!important;
    letter-spacing:-.040em!important;
    text-wrap:balance;
  }

  html body.page-home.design-system-executive main #situationen-title{
    font-size:var(--nbc-heading-signature-mobile)!important;
    line-height:.96!important;
    letter-spacing:-.047em!important;
  }

  html body.page-home.design-system-executive main :is(
    .home-trust__head .nbc-section-title,
    .operating-twin__head .nbc-section-title,
    .home-service-choice__head > h2,
    .home-diagnosis-navigator__head .nbc-section-title,
    .home-case-proof-head .nbc-section-title,
    .home-self-service .nbc-section-title,
    .home-attitude .nbc-section-title,
    .home-conversation .nbc-section-title,
    .p7-title
  ),
  html body.page-service.design-system-executive main :is(
    .pr-title-block > h2,
    .pp-title > h2,
    .dp-header > h2
  ),
  html body.page.design-system-executive main :is(
    .case-next-step h2,
    #case-next-step .case2-cta h2,
    .ac-final-cta h2,
    .ac-intake-panel-head h2,
    .process-conversion-section h2,
    .erp-decision-cta-section h2,
    .dg3-access-copy h2,
    .authority-section--next .authority-section-head h2,
    .local-final-grid h2,
    .km-final__grid h2,
    .ps-final-copy h2,
    .trade-final-copy h2
  ){
    font-size:var(--nbc-heading-signature-mobile)!important;
    line-height:.96!important;
    letter-spacing:-.047em!important;
    text-wrap:balance;
  }

  /* Phase-7 homepage signature variants remain distinct, but all live on the larger scale. */
  html body.page-home.design-system-executive main .p7-title--editorial{font-size:clamp(40px,10.8vw,46px)!important;}
  html body.page-home.design-system-executive main .p7-title--visual{font-size:clamp(44px,11.8vw,50px)!important;}
  html body.page-home.design-system-executive main .p7-title--statement{font-size:clamp(42px,11.2vw,48px)!important;}
  html body.page-home.design-system-executive main .p7-title--metric{font-size:clamp(39px,10.5vw,45px)!important;}
  html body.page-home.design-system-executive main .p7-title--final{font-size:clamp(46px,12.2vw,52px)!important;}

  html body.page-template-article.design-system-executive main :is(
    .ep-chapter-title,
    .ep-conclusion > h2,
    .knowledge-container-head .nbc-section-title
  ){
    font-size:var(--nbc-heading-editorial-mobile)!important;
    line-height:1.01!important;
    letter-spacing:-.035em!important;
  }


  html body.page.design-system-executive main :is(
    .ep-conclusion-next > h3,
    .ai-final-conversion h3
  ){
    font-size:var(--nbc-heading-next-mobile)!important;
    line-height:1.03!important;
    letter-spacing:-.030em!important;
    text-wrap:balance;
  }
}


/* v6.667 fit layer: measured from all-page Desktop/Mobile QA.
   Keep short chapter headings large; rebalance only headings whose real rendered line count becomes excessive. */
@media (min-width:761px){
  html body.page.design-system-executive main h2[data-nbc-heading-fit="signature-long"]{
    font-size:clamp(56px,4.20vw,64px)!important;
    line-height:.98!important;
    letter-spacing:-.045em!important;
    text-wrap:pretty!important;
  }
  html body.page.design-system-executive main h2[data-nbc-heading-fit="section-long"]{
    font-size:clamp(48px,3.70vw,56px)!important;
    line-height:1!important;
    letter-spacing:-.040em!important;
    text-wrap:pretty!important;
  }
  html body.page.design-system-executive main h2[data-nbc-heading-fit="section-xlong"]{
    font-size:clamp(44px,3.30vw,50px)!important;
    line-height:1.01!important;
    letter-spacing:-.036em!important;
    text-wrap:pretty!important;
  }
  html body.page.design-system-executive main h2[data-nbc-heading-fit="section-compact"]{
    font-size:clamp(44px,3.35vw,52px)!important;
    line-height:1.01!important;
    letter-spacing:-.036em!important;
    text-wrap:pretty!important;
  }
}

@media (max-width:760px){
  html body.page.design-system-executive main h2[data-nbc-heading-fit="signature-long"]{
    font-size:clamp(40px,10.10vw,44px)!important;
    line-height:.99!important;
    letter-spacing:-.040em!important;
    text-wrap:pretty!important;
  }
  html body.page.design-system-executive main h2[data-nbc-heading-fit="section-long"]{
    font-size:clamp(36px,9.15vw,40px)!important;
    line-height:1.01!important;
    letter-spacing:-.035em!important;
    text-wrap:pretty!important;
  }
  html body.page.design-system-executive main h2[data-nbc-heading-fit="section-xlong"]{
    font-size:clamp(34px,8.10vw,35.5px)!important;
    line-height:1.035!important;
    letter-spacing:-.030em!important;
    text-wrap:pretty!important;
  }
  html body.page.design-system-executive main h2[data-nbc-heading-fit="section-compact"]{
    font-size:clamp(35px,8.85vw,38px)!important;
    line-height:1.02!important;
    letter-spacing:-.032em!important;
    text-wrap:pretty!important;
  }
}


/* Specificity guard: the measured fit tier must outrank older signature selectors with !important. */
@media (min-width:761px){
  html body#nbc-page.page.design-system-executive main h2[data-nbc-heading-fit="signature-long"]{
    font-size:clamp(56px,4.20vw,64px)!important;
    line-height:.99!important;
    letter-spacing:-.043em!important;
    text-wrap:pretty!important;
  }
  html body#nbc-page.page.design-system-executive main #case-next-step .case2-cta h2[data-nbc-heading-fit="signature-long"]{
    font-size:clamp(56px,4.20vw,64px)!important;
  }
}
@media (max-width:760px){
  html body#nbc-page.page.design-system-executive main h2[data-nbc-heading-fit="signature-long"]{
    font-size:clamp(40px,10.10vw,44px)!important;
    line-height:1!important;
    letter-spacing:-.038em!important;
    text-wrap:pretty!important;
  }
  html body#nbc-page.page.design-system-executive main #case-next-step .case2-cta h2[data-nbc-heading-fit="signature-long"]{
    font-size:clamp(40px,10.10vw,44px)!important;
  }
}

@media (min-width:761px){
  html body#nbc-page.page.design-system-executive main h2[data-nbc-heading-fit="editorial-long"]{
    font-size:clamp(46px,3.35vw,50px)!important;
    line-height:1.02!important;
    letter-spacing:-.034em!important;
    text-wrap:pretty!important;
  }
}
@media (max-width:760px){
  html body#nbc-page.page.design-system-executive main h2[data-nbc-heading-fit="editorial-long"]{
    font-size:clamp(33px,8.25vw,35.5px)!important;
    line-height:1.04!important;
    letter-spacing:-.028em!important;
    text-wrap:pretty!important;
  }
}

@media (min-width:761px){
  html body#nbc-page.page.design-system-executive main h2[data-nbc-heading-fit="section-narrow"]{
    font-size:clamp(47px,3.40vw,50px)!important;
    line-height:1.02!important;
    letter-spacing:-.036em!important;
    text-wrap:pretty!important;
  }
}
@media (max-width:760px){
  html body#nbc-page.page.design-system-executive main h2[data-nbc-heading-fit="section-narrow"]{
    font-size:clamp(36px,9.15vw,40px)!important;
    line-height:1.02!important;
    letter-spacing:-.034em!important;
    text-wrap:pretty!important;
  }
}
