/* NBC v6.461 — Global Editorial Layout Contract
   Reference: ueber.html. Loaded LAST on every HTML page.
   Purpose: one desktop shell, one section-heading hierarchy, one editorial text axis.
   Component geometry stays local; local styles may not shrink global editorial roles. */

:root{
  --nbc-v6461-shell-max:1680px;
  --nbc-v6461-gutter:clamp(32px,2.75vw,64px);
  --nbc-v6461-editorial-axis:min(60vw,1072px);
  --nbc-v6461-h2:clamp(38px,3.7vw,56px);
  --nbc-v6461-h3:clamp(26px,2.45vw,38px);
  --nbc-v6461-copy:clamp(16px,1.25vw,19px);
  --nbc-v6461-split-gap:clamp(48px,6vw,92px);
}

@media (min-width:1024px){
  /* Global shell: same outer geometry as the approved About page. */
  body.page.design-system-executive :where(.wrap,.sw,[data-layout-width="standard"]){
    width:min(calc(100% - (2 * var(--nbc-v6461-gutter))),var(--nbc-v6461-shell-max));
    max-width:var(--nbc-v6461-shell-max);
    margin-inline:auto;
  }

  /* Section-heading roles may use their entire assigned layout cell. */
  body.page.design-system-executive :where(
    .nbc-section-header,
    .nbc-section-heading,
    .ac-section-head,
    .nbc-about-collaboration-head,
    .service-context-head,
    .service-editorial-head,
    .bi-head,
    .dx-section-head,
    .home-service-choice__head,
    .home-diagnosis-path__head,
    .home-case-proof-head,
    .home-final-head,
    .km-workbench-head__copy,
    .km-b5-library-head__copy
  ){
    width:100%;
    max-width:none!important;
    min-width:0;
  }

  body.page.design-system-executive :where(
    .nbc-section-header,
    .nbc-section-heading,
    .ac-section-head,
    .nbc-about-collaboration-head,
    .service-context-head,
    .service-editorial-head,
    .bi-head,
    .dx-section-head,
    .home-service-choice__head,
    .home-diagnosis-path__head,
    .home-case-proof-head,
    .home-final-head,
    .km-workbench-head__copy,
    .km-b5-library-head__copy
  ) > h2,
  body.page.design-system-executive :where(.nbc-section-title){
    width:100%;
    max-width:none!important;
    font-family:Archivo,-apple-system,"Segoe UI",system-ui,sans-serif;
    font-size:var(--nbc-v6461-h2);
    line-height:.99;
    letter-spacing:-.047em;
    text-wrap:wrap!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }

  /* Generic page-level statements must not be trapped by historic ch/px caps. */
  body.page.design-system-executive main :where(
    .editorial-statement,
    .nbc-editorial-statement,
    .nbc-about-closing-quote p,
    .evidence-library-grid-section>.wrap>h2,
    .evidence-library-cta h2
  ){
    max-width:none!important;
    width:100%!important;
    text-wrap:wrap!important;
  }

  /* About-page quote: a statement, not a narrow testimonial card. */
  body.page-about .nbc-about-closing-quote{
    width:100%!important;
    max-width:none!important;
  }
  body.page-about .nbc-about-closing-quote p{
    width:100%!important;
    max-width:none!important;
    font-size:clamp(38px,3.1vw,50px)!important;
    line-height:1.04!important;
    letter-spacing:-.04em!important;
  }

  /* Case Studies hero uses the exact About split geometry and left alignment. */
  body.page-template-case-index .evidence-library-hero-grid{
    width:min(calc(100% - (2 * var(--nbc-v6461-gutter))),var(--nbc-v6461-shell-max))!important;
    max-width:var(--nbc-v6461-shell-max)!important;
    margin-inline:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.25fr) minmax(360px,.6fr)!important;
    gap:var(--nbc-v6461-split-gap)!important;
    text-align:left!important;
    justify-items:stretch!important;
  }
  body.page-template-case-index .evidence-library-hero-grid>div:first-child{
    grid-column:1!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    text-align:left!important;
  }
  body.page-template-case-index .evidence-library-hero :where(h1,.lede,.evidence-transparency-note){
    margin-left:0!important;
    margin-right:0!important;
    text-align:left!important;
  }

  /* Barometer gets the same wide shell as About; the old 1280px island is removed. */
  body.page-barometer .oml-page>.wrap{
    width:min(calc(100% - (2 * var(--nbc-v6461-gutter))),var(--nbc-v6461-shell-max))!important;
    max-width:var(--nbc-v6461-shell-max)!important;
    margin-inline:auto!important;
  }
  body.page-barometer .baro-scenario-head{
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.25fr) minmax(360px,.6fr)!important;
    gap:var(--nbc-v6461-split-gap)!important;
    align-items:end!important;
  }
  body.page-barometer .baro-scenario-head>div,
  body.page-barometer .baro-scenario-head>p{
    width:100%!important;
    max-width:none!important;
    margin-inline:0!important;
  }
  body.page-barometer .baro-scenario-head h2{
    width:100%!important;
    max-width:none!important;
    font-size:var(--nbc-v6461-h2)!important;
    line-height:.99!important;
    letter-spacing:-.047em!important;
    text-wrap:wrap!important;
  }

  /* Industry headings use the full editorial scene, rather than the old 980px cap. */
  body.page-industry .bi-head,
  body.page-template-industry .bi-head,
  body[class*="page-industry"] .bi-head{
    max-width:none!important;
  }
  body :where(.bi-head)>h2{max-width:none!important;width:100%!important;text-wrap:wrap!important}

  /* Service page section heads keep their approved split cell, but can fill that cell completely. */
  body.page-service :where(.service-context-head,.service-editorial-head)>h2{
    max-width:none!important;
    width:100%!important;
    text-wrap:wrap!important;
  }

  /* Reinforce the article contract after all legacy bundles. */
  body.page-article.page-template-article{
    --nbc-article-text-axis:var(--nbc-v6461-editorial-axis);
  }
  body.page-article.page-template-article :is(
    .ep-executive-answer,
    .ep-prologue,
    .ep-conclusion,
    .article-diagnostic-context,
    .ep-next-reading,
    .ep-practice-scenario.erp-journey-scope,
    .ep-section-kicker,
    .ep-chapter-head,
    .ep-ledger-head,
    .ep-decision-ledger>h3,
    .ep-decision-ledger>.ep-practice-scenario,
    .ep-decision-ledger>.ep-responsibility-ledger,
    .ep-decision-ledger>.ep-redflags,
    .article-diagnostic-context>header,
    .article-diagnostic-context>.article-diagnostic-grid,
    .ep-chapter-copy>p,
    .ep-chapter-copy>ol,
    .ep-chapter-copy>ul,
    .ep-chapter-copy>blockquote,
    .ep-chapter-copy>h3,
    .ep-chapter-copy>.cost-scope-grid,
    .ep-chapter-copy>.hinweis,
    .ep-chapter-copy>.source-note
  ){
    width:min(100%,var(--nbc-v6461-editorial-axis))!important;
    max-width:var(--nbc-v6461-editorial-axis)!important;
    margin-left:0!important;
    margin-right:auto!important;
  }
  body.page-article.page-template-article :is(.ep-chapter-head,.ep-section-kicker,.ep-ledger-head,.article-diagnostic-context>header) h2,
  body.page-article.page-template-article .ep-chapter-title{
    width:100%!important;
    max-width:none!important;
    text-wrap:wrap!important;
  }

  /* Full-width page headings: remove legacy one-third caps without changing grid placement. */
  body.page-home :where(.home-case-proof-head,.home-final-head) .nbc-section-title,
  body.page-diagnose .dx-section-head h2,
  body.km-knowledge-page :where(.km-workbench-head__copy,.km-b5-library-head__copy)>h2,
  body.page-about :where(.ac-section-head,.nbc-about-collaboration-head)>h2{
    max-width:none!important;
    width:100%!important;
  }
}

@media (max-width:760px){
  /* Mobile keeps the existing art direction; only neutralize historic narrow caps. */
  body.page.design-system-executive main :where(.nbc-section-title,.bi-head h2,.dx-section-head h2,.service-editorial-head h2,.service-context-head h2){
    max-width:100%!important;
    width:100%!important;
  }
  body.page-template-case-index .evidence-library-hero-grid{display:block!important;text-align:left!important}
  body.page-template-case-index .evidence-library-hero :where(h1,.lede,.evidence-transparency-note){text-align:left!important;margin-left:0!important;margin-right:0!important}
  body.page-about .nbc-about-closing-quote p{max-width:none!important;width:100%!important}
}

@media (min-width:1024px){
  /* Barometer scenario section itself used to keep an extra 180px inset on wide screens. */
  body.page-barometer .baro-scenario-section{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}

@media (min-width:1024px){
  /* Topic landing pages: About-style split instead of legacy one-third headline column. */
  body.page.design-system-executive .knowledge-hub-direct-list> .wrap > header{
    display:grid!important;
    grid-template-columns:minmax(0,1.25fr) minmax(360px,.6fr)!important;
    gap:var(--nbc-v6461-split-gap)!important;
    align-items:end!important;
    width:100%!important;
    max-width:none!important;
  }
  body.page.design-system-executive .knowledge-hub-direct-list> .wrap > header h2{
    width:100%!important;
    max-width:none!important;
    text-wrap:wrap!important;
  }
  body.page.design-system-executive .knowledge-hub-direct-list> .wrap > header p{
    width:100%!important;
    max-width:none!important;
  }
}

@media (min-width:1024px){
  body.page-contact .nbc-contact-after-head,
  body.page-template-contact .nbc-contact-after-head{max-width:none!important}
  body.page-contact .nbc-contact-after-head h2,
  body.page-template-contact .nbc-contact-after-head h2{
    width:100%!important;
    max-width:none!important;
    text-wrap:wrap!important;
  }
}

@media (min-width:1024px){
  /* Empty legacy split-heads must not reserve an unused second column. */
  body.page-home .home-service-choice__head{
    display:block!important;
    grid-template-columns:none!important;
    width:100%!important;
    max-width:none!important;
  }
  body.page-home .home-service-choice__head>h2{width:100%!important;max-width:none!important}
  body.page-contact .nbc-contact-after-head,
  body.page-template-contact .nbc-contact-after-head{
    display:block!important;
    grid-template-columns:none!important;
    width:100%!important;
    max-width:none!important;
  }
}
