/*! NBC v6.499 · M1 Mobile Foundation
    Scope: <=760px only. Desktop is intentionally untouched.
    Purpose: mobile typography, rhythm, header states, touch controls,
    surface primitives, rails and bottom-sheet primitives. */

.nbc-mobile-header-cta{display:none}
.m1-sheet-layer{display:none}

@media (max-width:760px){
  :root{
    --m-gutter:clamp(18px,5.15vw,22px);
    --m-header-h:66px;
    --m-section:clamp(64px,17vw,82px);
    --m-section-tight:clamp(46px,12.5vw,60px);
    --m-section-loose:clamp(82px,22vw,104px);
    --m-display-short:clamp(42px,11.8vw,46px);
    --m-display-medium:clamp(38px,10.6vw,42px);
    --m-display-long:clamp(35px,9.7vw,39px);
    --m-display-xlong:clamp(33px,8.9vw,36px);
    --m-h2:clamp(30px,8.45vw,34px);
    --m-h3:clamp(22px,6.35vw,26px);
    --m-lead:clamp(17.5px,4.75vw,19px);
    --m-body:17px;
    --m-small:14px;
    --m-eyebrow:10px;
    --m-line:rgba(247,245,242,.12);
    --m-line-strong:rgba(247,245,242,.18);
    --m-surface:#0b100d;
    --m-surface-deep:#07100b;
    --m-paper:#f1efe9;
    --m-paper-ink:#101410;
    --m-radius:18px;
    --m-ease:cubic-bezier(.22,.61,.36,1);

    /* Existing contracts now resolve through the new mobile scale. */
    --nbc-mobile-gutter:var(--m-gutter);
    --nbc-mobile-section:var(--m-section);
    --nbc-mobile-section-tight:var(--m-section-tight);
    --nbc-mobile-header:var(--m-header-h);
    --nbc-mobile-display-short:var(--m-display-short);
    --nbc-mobile-display-medium:var(--m-display-medium);
    --nbc-mobile-display-long:var(--m-display-long);
    --nbc-mobile-display-xlong:var(--m-display-xlong);
    --nbc-mobile-title:var(--m-h2);
    --nbc-mobile-subtitle:var(--m-h3);
    --nbc-mobile-copy:var(--m-body);
    --nbc-mobile-leading:1.64;
  }

  html{
    scroll-padding-top:calc(var(--m-header-h) + env(safe-area-inset-top) + 14px);
    text-size-adjust:100%;
    -webkit-text-size-adjust:100%;
  }
  body.page.design-system-executive{
    overflow-x:clip;
    font-size:var(--m-body);
    line-height:1.64;
    -webkit-font-smoothing:antialiased;
  }
  body.page.design-system-executive main.nbc-page-shell{overflow:clip}
  body.page.design-system-executive .wrap,
  body.page.design-system-executive .sw{
    width:calc(100% - (2 * var(--m-gutter)));
    max-width:none;
    margin-inline:auto;
  }

  /* ---- Editorial type hierarchy ------------------------------------------------ */
  body.page.design-system-executive main :is(h1,.editorial-title,.display){
    font-size:var(--m-display-short);
    line-height:.96;
    letter-spacing:-.047em;
    text-wrap:balance;
    max-width:100%;
    overflow-wrap:normal;
    word-break:normal;
    -webkit-hyphens:none;
    hyphens:none;
  }
  body.page.design-system-executive main :is(h1,.editorial-title).title-length-medium{
    font-size:var(--m-display-medium);
    line-height:.97;
  }
  /* Explicit fit classes are the final authority for real headline length. */
  body.page.design-system-executive main :is(h1,.editorial-title).title-fit-short{font-size:var(--m-display-short);line-height:.96}
  body.page.design-system-executive main :is(h1,.editorial-title).title-fit-medium{font-size:var(--m-display-medium);line-height:.97}
  body.page.design-system-executive main :is(h1,.editorial-title).title-fit-long{font-size:var(--m-display-long);line-height:.985}
  body.page.design-system-executive main :is(h1,.editorial-title).title-fit-xlong{font-size:var(--m-display-xlong);line-height:1}
  body.page.design-system-executive main :is(h1,.editorial-title).title-length-long,
  body.page.design-system-executive.page-template-article main h1,
  body.page.design-system-executive.title-case-long main h1{
    font-size:var(--m-display-long);
    line-height:.985;
  }
  body.page.design-system-executive.case-title-extra-long main h1,
  body.page.design-system-executive.title-case-metric-long main h1{
    font-size:var(--m-display-xlong);
    line-height:1;
  }
  body.page-home .home-process-opening__title{
    font-size:clamp(44px,12.2vw,49px);
    line-height:.93;
    letter-spacing:-.052em;
    max-width:9.2ch;
  }
  body.page.design-system-executive main h2{
    font-size:var(--m-h2);
    line-height:1.02;
    letter-spacing:-.037em;
    text-wrap:balance;
    overflow-wrap:normal;
    word-break:normal;
  }
  body.page.design-system-executive main h3{
    font-size:var(--m-h3);
    line-height:1.08;
    letter-spacing:-.025em;
    text-wrap:balance;
  }
  body.page.design-system-executive :is(.lede,.lead,.nbc-section-intro,.service-hero-copy>.lede,.local-hero-lede,.knowledge-hero-note){
    font-size:var(--m-lead);
    line-height:1.58;
  }
  body.page.design-system-executive :is(.nbc-eyebrow,.eyebrow,.ep-eyebrow,.knowledge-eyebrow,.evidence-eyebrow,.legal-hero-kicker,.nbc-hero-location,.mono){
    font-size:var(--m-eyebrow);
    letter-spacing:.105em;
    line-height:1.35;
  }
  body.page.design-system-executive main :is(p,li){text-wrap:pretty}

  /* Article reading is deliberately calmer than conversion pages. */
  body.page-template-article .ep-chapter :is(p,li){
    font-size:17px;
    line-height:1.76;
  }
  body.page-template-article .ep-chapter h2{margin-bottom:20px}

  /* ---- Vertical rhythm --------------------------------------------------------- */
  body.page.design-system-executive .nbc-section{padding-block:var(--m-section)}
  body.page.design-system-executive :is(
    .service-context-section,.service-editorial-section,.knowledge-direct-library,
    .knowledge-diagnostic,.evidence-library-grid-section,.ac-section,
    .ih-command,.ih-architecture,.ih-routes,.ih-decision,.ih-ninety,.ih-evidence,
    .ih-faqs,.ih-next,.case-film-section,.case-evidence-system,.case-related,
    .case-knowledge-container,.case-audit-trail,.case-next-step
  ){padding-block:var(--m-section)}
  body.page.design-system-executive :is(.nbc-hero-bridge,.nbc-authority-strip){
    padding-block:var(--m-section-tight);
  }
  body.page.design-system-executive :is(
    .diagnose-hero,.oml-hero,.service-hero,.premium-hub-opening,.evidence-library-hero,
    .case-dossier-hero,.knowledge-direct-hero,.knowledge-hub-direct-hero,.ep-signature-stage,
    .ac-intake-hero,.ac-founder-hero,.local-hero,.decision-hub-hero,.decision-library-hero,
    .dg-hub-hero,.dg-page-hero,.legal-hero
  ){
    padding-top:calc(var(--m-header-h) + env(safe-area-inset-top) + 30px);
    padding-bottom:clamp(48px,13vw,62px);
  }

  /* Avoid accidental empty 'cinema screens' in the foundation layer. M2/M3 may
     opt into immersive heights explicitly with data-mobile-immersive. */
  body.page.design-system-executive main>section:not([data-mobile-immersive="true"]){
    scroll-margin-top:calc(var(--m-header-h) + 14px);
  }

  /* ---- Mobile header: quiet in hero, contextual after the hero ---------------- */
  body.page.design-system-executive .site-header{
    height:calc(var(--m-header-h) + env(safe-area-inset-top));
    padding-top:env(safe-area-inset-top);
    border-bottom:1px solid rgba(247,245,242,.075);
    background:linear-gradient(180deg,rgba(7,11,9,.94),rgba(7,11,9,.78));
    backdrop-filter:blur(20px) saturate(118%);
    -webkit-backdrop-filter:blur(20px) saturate(118%);
    box-shadow:0 10px 34px rgba(0,0,0,.10);
    transform:none!important;
  }
  body.page.design-system-executive .site-header .nav{
    width:calc(100% - (2 * var(--m-gutter)));
    height:var(--m-header-h);
    min-height:var(--m-header-h);
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto auto;
    align-items:center;
    gap:8px;
  }
  body.page.design-system-executive .brand{grid-column:1;min-width:0}
  body.page.design-system-executive .brand-logo{
    width:104px;
    max-height:44px;
    object-fit:contain;
  }
  body.page.design-system-executive .site-header nav{grid-column:2;grid-row:1}
  body.page.design-system-executive .site-header .nav>.nbc-mobile-context{
    grid-column:2;
    grid-row:1;
    position:static;
    display:flex;
    min-width:0;
    max-width:100%;
    transform:none;
    align-items:center;
    justify-content:flex-start;
    gap:0;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    color:rgba(247,245,242,.62);
    font:500 9px/1.2 var(--mono,"IBM Plex Mono",monospace);
    letter-spacing:.085em;
    text-transform:uppercase;
    transition:opacity .2s ease,transform .2s var(--m-ease);
  }
  body.page.design-system-executive .site-header .nav>.nbc-mobile-context b{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--green);
    font-weight:500;
  }
  body.page.design-system-executive .site-header .nav>.nbc-mobile-context span{display:none}
  body.page.design-system-executive[data-m1-header-condensed="true"] .site-header .nav>.nbc-mobile-context{
    opacity:1;
    visibility:visible;
  }
  .nbc-mobile-header-cta{
    grid-column:3;
    grid-row:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:38px;
    padding:0 12px;
    border:1px solid rgba(145,212,159,.26);
    border-radius:999px;
    background:rgba(145,212,159,.055);
    color:rgba(247,245,242,.9);
    text-decoration:none;
    font-size:12px;
    font-weight:650;
    letter-spacing:-.01em;
    opacity:0;
    transform:translateY(2px);
    visibility:hidden;
    pointer-events:none;
    transition:opacity .2s ease,transform .2s var(--m-ease),background .18s ease,border-color .18s ease;
  }
  body.page.design-system-executive[data-m1-header-condensed="true"] .nbc-mobile-header-cta{
    opacity:1;
    transform:none;
    visibility:visible;
    pointer-events:auto;
  }
  body.page.design-system-executive.menu-open .nbc-mobile-header-cta,
  body.page.design-system-executive.menu-open .site-header .nav>.nbc-mobile-context{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
  }
  body.page.design-system-executive .burger{
    grid-column:4;
    grid-row:1;
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
    border:1px solid rgba(247,245,242,.16);
    border-radius:999px;
    background:rgba(10,15,12,.66);
    color:transparent;
    font-size:0;
    position:relative;
    z-index:92;
  }
  body.page.design-system-executive .burger::before,
  body.page.design-system-executive .burger::after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width:16px;
    height:1.5px;
    border-radius:2px;
    background:rgba(247,245,242,.92);
    transform-origin:center;
    transition:transform .2s var(--m-ease);
  }
  body.page.design-system-executive .burger::before{transform:translate(-50%,-4px)}
  body.page.design-system-executive .burger::after{transform:translate(-50%,4px)}
  body.page.design-system-executive .burger[aria-expanded="true"]::before{transform:translate(-50%,0) rotate(45deg)}
  body.page.design-system-executive .burger[aria-expanded="true"]::after{transform:translate(-50%,0) rotate(-45deg)}

  /* The menu remains a full-screen decision surface, but becomes more editorial. */
  body.page.design-system-executive .site-header nav #menu.open{
    inset:0;
    width:100vw;
    height:100dvh;
    min-height:100svh;
    max-height:100dvh;
    padding:
      calc(var(--m-header-h) + env(safe-area-inset-top) + 28px)
      var(--m-gutter)
      calc(28px + env(safe-area-inset-bottom));
    gap:0;
    background:
      radial-gradient(circle at 88% 6%,rgba(145,212,159,.11),transparent 31%),
      linear-gradient(180deg,#08100b 0%,#07100b 100%);
  }
  body.page.design-system-executive .site-header nav #menu.open>li{
    border-top:1px solid rgba(247,245,242,.09);
  }
  body.page.design-system-executive .site-header nav #menu.open>li>a,
  body.page.design-system-executive .site-header nav #menu.open .nav-summary{
    min-height:55px;
    padding:13px 0;
    font-size:clamp(22px,6.35vw,27px);
    line-height:1.06;
    letter-spacing:-.027em;
  }
  body.page.design-system-executive .site-header nav #menu.open .nav-sub a{
    min-height:43px;
    padding:8px 0;
    color:rgba(247,245,242,.64);
    font-size:14.5px;
  }
  body.page.design-system-executive .site-header nav #menu.open .nav-cta{
    min-height:50px;
    margin-top:5px;
    border-radius:999px;
    font-size:15px;
  }

  /* ---- Buttons / thumb targets ------------------------------------------------- */
  body.page.design-system-executive :is(.btn,.button,.lm-btn){
    min-height:50px;
    max-width:100%;
    padding:0 18px;
    border-radius:999px;
    font-size:14px;
    line-height:1.15;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
  body.page.design-system-executive .hero-ctas{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
  }
  body.page.design-system-executive .hero-ctas .btn{width:auto;max-width:100%}
  body.page.design-system-executive :is(button,.btn,.button,.lm-btn,a.nav-cta,.nbc-mobile-header-cta,summary){
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
  body.page.design-system-executive :is(button,.btn,.button,.lm-btn,a.nav-cta,.nbc-mobile-header-cta):active{
    transform:scale(.985);
  }
  body.page.design-system-executive :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
    min-height:50px;
    font-size:16px;
    border-radius:14px;
  }
  body.page.design-system-executive textarea{min-height:112px}

  /* Replace permanent bottom conversion bars with the quieter header path. */
  body.page.design-system-executive :is(.home-float-cta,.fab){display:none!important}

  /* ---- Surface primitives for M2–M4 ------------------------------------------- */
  body.page.design-system-executive [data-mobile-surface="dark"],
  body.page.design-system-executive .m-surface-dark{
    background:transparent;
    color:var(--paper);
  }
  body.page.design-system-executive [data-mobile-surface="deep"],
  body.page.design-system-executive .m-surface-deep{
    background:
      radial-gradient(circle at 82% 15%,rgba(145,212,159,.075),transparent 34%),
      var(--m-surface-deep);
    color:var(--paper);
  }
  body.page.design-system-executive [data-mobile-surface="paper"],
  body.page.design-system-executive .m-surface-paper{
    margin-inline:calc(var(--m-gutter) * -1);
    padding-inline:var(--m-gutter);
    background:var(--m-paper);
    color:var(--m-paper-ink);
  }
  body.page.design-system-executive [data-mobile-surface="paper"] :is(h1,h2,h3,h4,strong,a),
  body.page.design-system-executive .m-surface-paper :is(h1,h2,h3,h4,strong,a){color:var(--m-paper-ink)}
  body.page.design-system-executive [data-mobile-surface="paper"] :is(p,li),
  body.page.design-system-executive .m-surface-paper :is(p,li){color:rgba(16,20,16,.72)}
  body.page.design-system-executive [data-mobile-surface="paper"] :is(.nbc-eyebrow,.eyebrow,.mono),
  body.page.design-system-executive .m-surface-paper :is(.nbc-eyebrow,.eyebrow,.mono){color:#3e7650}

  /* ---- Horizontal rail primitive ---------------------------------------------- */
  body.page.design-system-executive :is(.m-rail,[data-mobile-rail="true"],[data-m1-rail="true"]){
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:minmax(78%,1fr);
    grid-template-columns:none;
    gap:12px;
    width:auto;
    margin-inline:calc(var(--m-gutter) * -1);
    padding-inline:var(--m-gutter);
    padding-bottom:10px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x proximity;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  body.page.design-system-executive :is(.m-rail,[data-mobile-rail="true"],[data-m1-rail="true"])::-webkit-scrollbar{display:none}
  body.page.design-system-executive :is(.m-rail,[data-mobile-rail="true"],[data-m1-rail="true"])>*{
    min-width:0;
    scroll-snap-align:start;
  }
  body.page.design-system-executive :is(.m-rail,[data-mobile-rail="true"],[data-m1-rail="true"])[data-scroll-cue="more"]{
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%);
    mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%);
  }

  /* ---- Bottom-sheet primitive (used by M2/M3 progressive disclosure) ---------- */
  .m1-sheet-layer{
    position:fixed;
    inset:0;
    z-index:140;
    display:grid;
    align-items:end;
    visibility:hidden;
    pointer-events:none;
  }
  .m1-sheet-layer[data-open="true"]{visibility:visible;pointer-events:auto}
  .m1-sheet-backdrop{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    min-height:0;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(0,0,0,.58);
    opacity:0;
    transition:opacity .24s ease;
  }
  .m1-sheet-layer[data-open="true"] .m1-sheet-backdrop{opacity:1}
  .m1-sheet{
    position:relative;
    z-index:1;
    width:100%;
    max-height:min(82dvh,760px);
    overflow:auto;
    overscroll-behavior:contain;
    padding:14px var(--m-gutter) calc(26px + env(safe-area-inset-bottom));
    border:1px solid rgba(247,245,242,.12);
    border-bottom:0;
    border-radius:24px 24px 0 0;
    background:#0a120d;
    color:var(--paper);
    box-shadow:0 -24px 80px rgba(0,0,0,.42);
    transform:translateY(102%);
    transition:transform .3s var(--m-ease);
  }
  .m1-sheet-layer[data-open="true"] .m1-sheet{transform:none}
  .m1-sheet__bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
  .m1-sheet__handle{width:38px;height:4px;border-radius:99px;background:rgba(247,245,242,.22)}
  .m1-sheet__close{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    min-height:42px;
    padding:0;
    border:1px solid rgba(247,245,242,.14);
    border-radius:999px;
    background:transparent;
    color:var(--paper);
    font-size:20px;
  }
  .m1-sheet__title{margin:0 0 12px;font-size:var(--m-h3);line-height:1.08}
  .m1-sheet__body{font-size:16px;line-height:1.65;color:rgba(247,245,242,.72)}
  body.m1-sheet-open{overflow:hidden}

  /* ---- Media discipline -------------------------------------------------------- */
  body.page.design-system-executive :is(img,video,canvas,svg){max-width:100%}
  body.page.design-system-executive figure{max-width:100%}

  /* ---- Footer: quieter, easier to scan ---------------------------------------- */
  body.page.design-system-executive .site-footer{padding-top:var(--m-section);padding-bottom:calc(34px + env(safe-area-inset-bottom))}
  body.page.design-system-executive .footer-main{grid-template-columns:1fr;gap:28px}
  body.page.design-system-executive .footer-navigation-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 16px;
  }
  body.page.design-system-executive .footer-navigation-row a{
    min-height:42px;
    padding-block:7px;
  }
  body.page.design-system-executive .footer-meta{grid-template-columns:1fr;gap:9px}

  /* ---- Utility/admin heroes: intentional clearance below the fixed header ---- */
  body.page-contact .ac-intake-hero,
  body.page.page-legal:not(.page-styleguide) .legal-hero,
  body.page.page-styleguide .styleguide-hero{
    padding-top:calc(var(--m-header-h) + env(safe-area-inset-top) + 28px)!important;
  }
  body.page-contact .ac-intake-hero{padding-bottom:28px!important}
  body.page.page-legal:not(.page-styleguide) .legal-hero,
  body.page.page-styleguide .styleguide-hero{padding-bottom:30px!important}
}


@media (max-width:374px){
  :root{
    --m-gutter:18px;
    --m-display-short:40px;
    --m-display-medium:38px;
    --m-display-long:35px;
    --m-display-xlong:32px;
    --m-h2:29px;
    --m-h3:22px;
  }
  .nbc-mobile-header-cta{padding-inline:10px;font-size:11.5px}
  body.page.design-system-executive .brand-logo{width:98px}
  body.page.design-system-executive .footer-navigation-row{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  .nbc-mobile-header-cta,
  .nbc-mobile-context,
  .m1-sheet,
  .m1-sheet-backdrop,
  body.page.design-system-executive .burger::before,
  body.page.design-system-executive .burger::after{transition:none!important}
  body.page.design-system-executive :is(button,.btn,.button,.lm-btn,a.nav-cta,.nbc-mobile-header-cta):active{transform:none}
}
