/*! NBC v6.543 · G1 Global Layout Contract
    Single owner for global shells, horizontal axes, vertical rhythm,
    hero exit spacing, generic card grids, visual-stage geometry and CTA alignment.
    Page-specific components may define internal composition, but must resolve
    their outer geometry through these tokens. */

:root{
  /* Horizontal system */
  --nbc-shell-max:1680px;
  --nbc-shell-gutter:clamp(32px,2.75vw,64px);
  --nbc-shell-width:min(var(--nbc-shell-max),calc(100vw - (2 * var(--nbc-shell-gutter))));
  --nbc-content-max:1280px;
  --nbc-editorial-max:800px;
  --nbc-narrow-max:640px;

  /* Vertical rhythm — G1 corridors */
  --nbc-hero-exit:clamp(64px,5vw,88px);
  --nbc-section-compact:clamp(64px,4.6vw,80px);
  --nbc-section-standard:clamp(88px,6.4vw,112px);
  --nbc-section-feature:clamp(104px,7vw,120px);
  --nbc-heading-content-gap:clamp(28px,2.4vw,40px);
  --nbc-group-exit:clamp(64px,5vw,88px);
  --nbc-card-gap:clamp(18px,1.65vw,24px);

  /* Compatibility aliases: legacy components consume the G1 owner. */
  --nbc-desktop-shell-max:var(--nbc-shell-max);
  --nbc-desktop-shell-gutter:var(--nbc-shell-gutter);
  --nbc-desktop-shell-width:var(--nbc-shell-width);
  --nbc-layout-wide:var(--nbc-shell-max);
  --nbc-layout-standard:var(--nbc-content-max);
  --nbc-layout-editorial:var(--nbc-editorial-max);
  --nbc-layout-narrow:var(--nbc-narrow-max);
  --nbc-layout-gutter:var(--nbc-shell-gutter);
  --nbc-layout-section:var(--nbc-section-standard);
  --nbc-layout-section-compact:var(--nbc-section-compact);
  --nbc-layout-heading-gap:var(--nbc-heading-content-gap);
  --nbc-layout-grid-gap:var(--nbc-card-gap);
  --space-section:var(--nbc-section-standard);
  --space-section-compact:var(--nbc-section-compact);
  --section-gap:var(--nbc-section-standard);
  --section-space:var(--nbc-section-standard);
  --section-space-tight:var(--nbc-section-compact);
  --layout-gutter:var(--nbc-shell-gutter);
  --layout-max:var(--nbc-shell-max);
  --nbc-page-gutter:var(--nbc-shell-gutter);
  --nbc-gutter:var(--nbc-shell-gutter);
  --nbc-wide:var(--nbc-shell-max);
  --nbc-standard:var(--nbc-content-max);
  --nbc-editorial:var(--nbc-editorial-max);
  --nbc-editorial-width:var(--nbc-editorial-max);
  --nbc-narrow:var(--nbc-narrow-max);
  --nbc-section:var(--nbc-section-standard);
  --nbc-section-y:var(--nbc-section-standard);
  --nbc-section-y-compact:var(--nbc-section-compact);
  --nbc-group-gap:var(--nbc-card-gap);
}

html{
  scroll-padding-top:calc(var(--header-height,80px) + 20px);
}

body.page.design-system-executive,
body.page.design-system-executive main.nbc-page-shell{
  width:100%;
  max-width:100%;
}
body.page.design-system-executive main.nbc-page-shell{
  overflow-x:clip;
}
body.page.design-system-executive main :where(section,article,div),
body.page.design-system-executive :where(.wrap,.sw,.pp-wrap,.dp-wrap,.nbc-layout-grid,.nbc-visual-stage)>*{
  min-width:0;
}
body.page.design-system-executive :where(img,picture,svg,canvas,video,iframe){
  max-width:100%;
}

/* --------------------------------------------------------------------------
   One outer axis: chrome, heroes, sections and long-form compositions.
   Internal reading measures remain component-owned. */
@media (min-width:1024px){
  body.page.design-system-executive .site-header > .wrap,
  body.page.design-system-executive .site-footer > .wrap,
  body.page.design-system-executive main > section > :is(.wrap,.sw,.pp-wrap,.dp-wrap,.home-service-choice__inner),
  body.page.design-system-executive main > .nbc-hero-bridge > .wrap,
  body.page.design-system-executive main > section > .nbc-hero-bridge > .wrap,
  body.page.design-system-executive main > section > .premium-hub-hero > .wrap,
  body.page.design-system-executive main > section > .premium-hub-landscape > .wrap,
  body.page.design-system-executive main > article > :is(.ep-hero,.ep-signature-stage) > .ep-hero-wrap,
  body.page.design-system-executive main > article > .ep-article-layout,
  body.page.design-system-executive main > article > .nbc-hero-bridge > .wrap,
  body.page.design-system-executive main > article.guide-html > :is(.guide-editorial-hero,section),
  body.page.design-system-executive.page-barometer #barometer > .wrap,
  body.page.design-system-executive.page-digital-check #digital-check > .wrap,
  body.page.design-system-executive.page-blog main.nbc-page-shell > section > .wrap,
  body.page.design-system-executive.page-diagnose main.nbc-page-shell > section > .wrap,
  body.page.design-system-executive.page-contact main.nbc-page-shell > section > .wrap,
  body.page.design-system-executive.page-about main.nbc-page-shell > section > .wrap,
  body.page.design-system-executive.page-home #situationen > .wrap{
    width:var(--nbc-shell-width);
    max-width:var(--nbc-shell-max);
    margin-inline:auto;
    box-sizing:border-box;
  }

  body.page.design-system-executive :is(.layout-wide,[data-layout-width="wide"]){
    width:var(--nbc-shell-width);
    max-width:var(--nbc-shell-max);
    margin-inline:auto;
  }
  body.page.design-system-executive :is(.layout-content,[data-layout-width="standard"]){
    width:min(var(--nbc-content-max),calc(100vw - (2 * var(--nbc-shell-gutter))));
    max-width:var(--nbc-content-max);
    margin-inline:auto;
  }
  body.page.design-system-executive :is(.layout-editorial,[data-layout-width="editorial"]){
    width:min(var(--nbc-editorial-max),calc(100vw - (2 * var(--nbc-shell-gutter))));
    max-width:var(--nbc-editorial-max);
    margin-inline:auto;
  }
  body.page.design-system-executive :is(.layout-narrow,[data-layout-width="narrow"]){
    width:min(var(--nbc-narrow-max),calc(100vw - (2 * var(--nbc-shell-gutter))));
    max-width:var(--nbc-narrow-max);
    margin-inline:auto;
  }
  body.page.design-system-executive main > article.guide-html{
    padding-inline:0;
  }
}

/* --------------------------------------------------------------------------
   Vertical system. Home composition is intentionally not re-authored in G1. */
@media (min-width:761px){
  body.page.design-system-executive:not(.page-home) main > :is(
    .nbc-section,
    .service-context-section,
    .service-editorial-section,
    .ac-section,
    .authority-section,
    .knowledge-direct-library,
    .knowledge-diagnostic,
    .evidence-library-grid-section,
    .case-film-section,
    .case-evidence-system,
    .case-related,
    .case-knowledge-container,
    .case-audit-trail,
    .case-next-step
  ){
    padding-block:var(--nbc-section-standard);
  }
  body.page.design-system-executive:not(.page-home) main > :is(.nbc-authority-strip,.nbc-hero-bridge){
    padding-block:var(--nbc-section-compact);
  }
  body.page.design-system-executive:not(.page-home) main > :is(
    .nbc-process-reality-section,
    .nbc-provider-proof-section,
    .nbc-delegation-probe-section,
    .authority-section--visual
  ){
    padding-block:var(--nbc-section-feature);
  }

  /* Hero → first-content spacing: readable exit, no oversized blank zone. */
  body.page.design-system-executive:not(.page-home) main > :is(
    .nbc-hero-system,
    .service-hero,
    .diagnose-hero,
    .oml-hero,
    .premium-hub-opening,
    .evidence-library-hero,
    .case2-index-hero,
    .case-dossier-hero,
    .knowledge-direct-hero,
    .knowledge-hub-direct-hero,
    .ep-signature-stage,
    .ep-hero,
    .ac-intake-hero,
    .ac-founder-hero,
    .local-hero,
    .decision-hub-hero,
    .decision-library-hero,
    .dg-hub-hero,
    .dg-page-hero,
    .legal-hero
  ){
    padding-bottom:var(--nbc-hero-exit);
  }
}

/* Heading → content rhythm. No heading receives a synthetic left offset here. */
body.page.design-system-executive main :is(
  .nbc-section-head,
  .service-section-head,
  .dx-section-head,
  .authority-head,
  .knowledge-section-head,
  .evidence-library-head,
  .case-section-head
){
  display:grid;
  gap:var(--nbc-heading-content-gap);
  align-content:start;
}
body.page.design-system-executive main :is(
  .nbc-section-head,
  .service-section-head,
  .dx-section-head,
  .authority-head,
  .knowledge-section-head,
  .evidence-library-head,
  .case-section-head
) > :is(h2,h3,p){
  margin-block:0;
}

/* Generic grid rhythm only; specialist instruments keep their own topology. */
body.page.design-system-executive main :is(
  .grid-cards,
  .related-grid,
  .proof-grid,
  .service-case-grid,
  .service-fit-grid,
  .knowledge-grid,
  .evidence-library-grid,
  .contact-process-grid,
  .contact-trust-grid,
  .branch-case-grid,
  .branch-read-grid
){
  gap:var(--nbc-card-gap);
}
body.page.design-system-executive main :is(
  .grid-cards,
  .related-grid,
  .proof-grid,
  .service-case-grid,
  .service-fit-grid,
  .knowledge-grid,
  .evidence-library-grid,
  .contact-process-grid,
  .contact-trust-grid,
  .branch-case-grid,
  .branch-read-grid
) > *{
  min-width:0;
}

/* Visual-stage geometry: component runtimes own drawing and motion, G1 owns bounds. */
body.page.design-system-executive [data-nbc-visual-stage],
body.page.design-system-executive .nbc-visual-stage{
  position:relative;
  inline-size:100%;
  max-inline-size:100%;
  min-inline-size:0;
  box-sizing:border-box;
  overflow:clip;
}
body.page.design-system-executive [data-nbc-visual-stage] :is(svg,canvas),
body.page.design-system-executive .nbc-visual-stage :is(svg,canvas){
  max-inline-size:100%;
}

/* CTA alignment: one wrapping geometry, visual treatment stays component-owned. */
body.page.design-system-executive main :is(.hero-ctas,.hero-actions,.nbc-hero-actions,.nbc-section-actions){
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 14px;
}
body.page.design-system-executive main :is(.hero-ctas,.hero-actions,.nbc-hero-actions,.nbc-section-actions) > *{
  min-width:0;
}

/* --------------------------------------------------------------------------
   Mobile G1 rhythm. G10 may later redesign composition; these are only the
   global spacing and shell guarantees. */
@media (max-width:760px){
  :root{
    --nbc-shell-gutter:clamp(18px,5.2vw,22px);
    --nbc-shell-width:calc(100vw - (2 * var(--nbc-shell-gutter)));
    --nbc-hero-exit:clamp(48px,13vw,64px);
    --nbc-section-compact:clamp(44px,12vw,56px);
    --nbc-section-standard:clamp(56px,16vw,72px);
    --nbc-section-feature:clamp(64px,18vw,72px);
    --nbc-heading-content-gap:clamp(22px,6.2vw,30px);
    --nbc-group-exit:clamp(48px,14vw,64px);
    --nbc-card-gap:16px;

    --nbc-mobile-gutter:var(--nbc-shell-gutter);
    --nbc-mobile-section:var(--nbc-section-standard);
    --nbc-mobile-section-tight:var(--nbc-section-compact);
    --nbc-mobile-section-standard:var(--nbc-section-standard);
    --nbc-mobile-section-compact:var(--nbc-section-compact);
    --nbc-mobile-section-feature:var(--nbc-section-feature);
    --m-gutter:var(--nbc-shell-gutter);
    --m-section:var(--nbc-section-standard);
    --m-section-tight:var(--nbc-section-compact);
    --m-section-loose:var(--nbc-section-feature);
  }

  html{scroll-padding-top:calc(var(--header-height,66px) + 14px)}

  body.page.design-system-executive :is(.wrap,.sw),
  body.page.design-system-executive main > section > :is(.pp-wrap,.dp-wrap),
  body.page.design-system-executive main > .nbc-hero-bridge > .wrap,
  body.page.design-system-executive main > section > .nbc-hero-bridge > .wrap{
    width:var(--nbc-shell-width);
    max-width:none;
    margin-inline:auto;
    box-sizing:border-box;
  }

  body.page.design-system-executive:not(.page-home) main > :is(
    .nbc-section,
    .service-context-section,
    .service-editorial-section,
    .ac-section,
    .authority-section,
    .knowledge-direct-library,
    .knowledge-diagnostic,
    .evidence-library-grid-section,
    .case-film-section,
    .case-evidence-system,
    .case-related,
    .case-knowledge-container,
    .case-audit-trail,
    .case-next-step
  ){
    padding-block:var(--nbc-section-standard);
  }
  body.page.design-system-executive:not(.page-home) main > :is(.nbc-authority-strip,.nbc-hero-bridge){
    padding-block:var(--nbc-section-compact);
  }
  body.page.design-system-executive:not(.page-home) main > :is(
    .nbc-process-reality-section,
    .nbc-provider-proof-section,
    .nbc-delegation-probe-section,
    .authority-section--visual
  ){
    padding-block:var(--nbc-section-feature);
  }
  body.page.design-system-executive:not(.page-home) main > :is(
    .nbc-hero-system,
    .service-hero,
    .diagnose-hero,
    .oml-hero,
    .premium-hub-opening,
    .evidence-library-hero,
    .case2-index-hero,
    .case-dossier-hero,
    .knowledge-direct-hero,
    .knowledge-hub-direct-hero,
    .ep-signature-stage,
    .ep-hero,
    .ac-intake-hero,
    .ac-founder-hero,
    .local-hero,
    .decision-hub-hero,
    .decision-library-hero,
    .dg-hub-hero,
    .dg-page-hero,
    .legal-hero
  ){
    padding-bottom:var(--nbc-hero-exit);
  }

  body.page.design-system-executive main :is(.hero-ctas,.hero-actions,.nbc-hero-actions,.nbc-section-actions){
    gap:10px;
  }
}

@media (max-width:374px){
  :root{--nbc-shell-gutter:18px}
}

/* v6.559 · Technical stage layers are not layout children. Prevent the generic stage-child clamp from truncating local Ambilight. */
body.page.design-system-executive main .nbc-stage-ambilight{max-width:none;}
