/* NBC v7.383 — Global Premium Visual Integration · Part 1 / P0 foundation
   Scope: geometry safety, mobile microtype, guide-preview readiness,
   and the reusable semantic-visual design primitives used by later passes. */

@layer nbc.premium-integration {
  /* Global visual safety: clip only the decorative lighting owner itself.
     Do not hide page overflow globally; functional content must remain measurable. */
  body.page.design-system-executive > .nbc-ambient-field{
    max-inline-size:100vw!important;
    overflow:clip!important;
    contain:strict!important;
    clip-path:inset(0);
  }

  /* About P0: the glow/pseudo planes remain part of their scenes but may not
     enlarge the page geometry. This replaces the former body-level masking. */
  body.page-about .abt2-hero,
  body.page-about .abt2-personal__media,
  body.page-about .abt2-final{
    overflow:clip!important;
  }

  /* Preserve image storytelling while keeping local ambient paint inside scene bounds. */
  body.page-about .abt2-hero,
  body.page-about .abt2-personal__media,
  body.page-about .abt2-final,
  body.page-about .abt2-portrait{
    min-inline-size:0;
    max-inline-size:100%;
  }

  /* Decision-guide paper must always read as a deliberate document object,
     even during image decode. No additional light/dark section is introduced. */
  body.page-template-guide .dg3-preview-paper{
    position:relative;
    min-inline-size:0;
    overflow:clip!important;
    background:
      linear-gradient(180deg,rgba(22,40,29,.025),transparent 18%),
      #f1efe7!important;
  }
  body.page-template-guide .dg3-preview-paper::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    box-shadow:inset 0 0 0 1px rgba(28,52,35,.055);
    z-index:2;
  }
  body.page-template-guide .dg3-preview-paper img{
    position:relative;
    z-index:1;
    display:block;
    inline-size:100%!important;
    block-size:auto!important;
    background:#f1efe7!important;
  }
  body.page-template-guide .dg3-preview-card,
  body.page-template-guide .dg3-preview-grid,
  body.page-template-guide .dg3-wrap{
    min-inline-size:0;
    max-inline-size:100%;
  }

  /* Desktop: two real working pages, lightly staggered like one document family.
     Transform only; the existing light-area footprint does not grow. */
  @media (min-width:761px){
    body.page-template-guide .dg3-preview-card:nth-child(1){transform:translateY(0)}
    body.page-template-guide .dg3-preview-card:nth-child(2){transform:translateY(18px)}
    body.page-template-guide .dg3-preview-card:nth-child(1) .dg3-preview-paper{transform:rotate(-.10deg)}
    body.page-template-guide .dg3-preview-card:nth-child(2) .dg3-preview-paper{transform:rotate(.10deg)}
  }

  /* Mobile microtype: only functional labels that were below practical reading size.
     Body/editorial text is intentionally untouched. */
  @media (max-width:700px){
    body.page-about .final-about-tabs button,
    body.page-about .final-about-record-tabs button,
    body.page-about .abt2-record__no,
    body.page-about .abt2-record__eyebrow{
      font-size:11px!important;
      line-height:1.35!important;
    }
    body.page-about .final-about-tabs button,
    body.page-about .final-about-record-tabs button{
      letter-spacing:.045em!important;
    }

    body.page-template-guide .p4-guide-node span,
    body.page-template-guide .p4-guide-next span,
    body.page-template-guide .final-guide-pager > span,
    body.page-template-guide .dg3-preview-card figcaption > span{
      font-size:11px!important;
      line-height:1.35!important;
      letter-spacing:.055em!important;
    }
    body.page-template-guide .final-guide-pager button{
      min-height:44px;
      font-size:12px!important;
    }
  }

  /* Reusable semantic-visual primitives for Parts 2+.
     These classes are inert until a page explicitly uses them. */
  .nbc-sv{
    --sv-line:rgba(152,198,166,.28);
    --sv-line-strong:rgba(152,210,169,.62);
    --sv-ink:#e7eee9;
    --sv-muted:rgba(218,231,222,.58);
    --sv-paper-ink:#182219;
    --sv-paper-line:rgba(31,67,43,.18);
    position:relative;
    min-inline-size:0;
    max-inline-size:100%;
    isolation:isolate;
  }
  .nbc-sv__connection,
  .nbc-sv__return,
  .nbc-sv__branch{
    fill:none;
    vector-effect:non-scaling-stroke;
    stroke:var(--sv-line);
    stroke-width:1.35;
  }
  .nbc-sv__connection[data-state="active"],
  .nbc-sv__return[data-state="active"],
  .nbc-sv__branch[data-state="active"]{stroke:var(--sv-line-strong)}
  .nbc-sv__node,
  .nbc-sv__gate,
  .nbc-sv__merge,
  .nbc-sv__state{
    vector-effect:non-scaling-stroke;
    stroke:var(--sv-line-strong);
    stroke-width:1.25;
  }
  .nbc-sv__event{transform-box:fill-box;transform-origin:center}
  @media (prefers-reduced-motion:reduce){
    .nbc-sv *, .nbc-sv *::before, .nbc-sv *::after{
      animation-duration:.001ms!important;
      animation-iteration-count:1!important;
      transition-duration:.001ms!important;
    }
  }
}

@layer nbc.premium-integration {
  /* Functional microtype floor confirmed in the P0 render audit. */
  body.page-about .abt2-portrait figcaption,
  body.page-about .abt3-signature__step > span{
    font-size:11px!important;
    line-height:1.35!important;
  }
  body.page-template-guide .p4-guide-node span,
  body.page-template-guide .p4-guide-next span{
    font-size:11px!important;
    line-height:1.35!important;
  }
  @media (max-width:760px){
    body.page.design-system-executive .site-header .nav > .nbc-mobile-context{
      font-size:11px!important;
      line-height:1.2!important;
      letter-spacing:.055em!important;
    }
  }
}

@layer nbc.premium-integration {
  body.page-about :is(.abt2-portrait,.abt2-hero__portrait-mobile) figcaption{
    font-size:11px!important;
    line-height:1.35!important;
  }
  @media (max-width:760px){
    body.page.design-system-executive .site-header .nav > .nbc-mobile-context b,
    body.page.design-system-executive .site-header .nav > .nbc-mobile-context span{
      font-size:inherit!important;
      line-height:inherit!important;
    }
  }
}
