/* ==========================================================================
   BBN chrome normalisation  -  k263  -  2026-09-22  (v4)
   --------------------------------------------------------------------------
   SCOPE   the 12 legacy-built BBN pages that still carry the local static-site
           base-layout <style> block inside an HTML widget:
           2067 2669 2788 3213 3217 3220 3228 3229 3230 3232 3233 3524
           (loaded only on those pages, via snippet 316 -> bbn_chrome_pages())

   WHY     Three independent leaks make that chrome render differently from
           BBN Home after the page header/footer were swapped to the shared
           bbn-visual-template-embed widgets (4161 / 4164):

           L1  the base-layout <style> blob inside the page's HTML widget
                 body{line-height:1.65;color:#16202e;font-family:PingFang SC...}
                 img{max-width:100%}
                 .elementor-button{display:inline-flex;width:auto;font-weight:650}
               -> taller line boxes, dark text colour, clamped wrapper boxes,
                  footer buttons as auto-width pills instead of full-width bars

           L2  compat.css
                 body .elementor :not(.site-header) .elementor-button-wrapper{
                   margin-top:7px!important; margin-bottom:7px!important}
               That exemption only whitelists the LEGACY class names
               (.site-header / .site-footer). The new chrome uses
               .bbn-global-header / .bbn-global-footer, so every button wrapper
               inside it gains 7px + 7px => header/footer boxes 14px too tall.

           L3  the page's first child is a <style>-only HTML widget (0px tall).
               Its margin-bottom:20px collapses through itself and lifts the
               whole page 20px down; Home has no such widget.

   WHAT    Re-assert the Home values for the chrome subtree ONLY. Nothing
           outside .bbn-global-header / .bbn-global-footer /
           .bbn-global-footer-legal is touched, so page content is unchanged.

   ROLLBACK  delete this file -> snippet 316 stops enqueueing it (its
             file_exists() guard makes that automatic).
             .bak next to this file holds the previous revision.
   ========================================================================== */

/* ---------- L1-a  font family + line ratio  (Home: theme stack, 1.5) ------ */
html body .bbn-global-header,
html body .bbn-global-footer,
html body .bbn-global-footer-legal {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
}

/* ---------- L1-b  text colour (Home measured: header #333, footer #cbd5e1) */
html body .bbn-global-header {
  color: #333333;
}
html body .bbn-global-footer,
html body .bbn-global-footer-legal {
  color: #cbd5e1;
}

/* ---------- L1-c  img{max-width:100%} leak -------------------------------- */
html body .bbn-global-header .bbn-header-logo,
html body .bbn-global-header .bbn-header-actions,
html body .bbn-global-footer .bbn-footer-brand {
  max-width: none !important;
}

/* ---------- L1-d  footer buttons: inline-block, full width, weight 400 ---- */
html body .bbn-global-footer .elementor-button {
  display: inline-block !important;
  width: 100% !important;
  font-weight: 400 !important;
  align-items: normal !important;
}

/* ---------- L2  compat.css 7px button-wrapper margins ---------------------
   NOTE  compat.css declares them with !important in
             body .elementor :not(.site-header) .elementor-button-wrapper
         = specificity (0,3,1). The selectors below must therefore carry
         MORE classes (and equal-or-more type selectors) to win:
             html body .elementor .bbn-global-* .elementor-button-wrapper
         = (0,3,2)  ->  wins.                                          -------- */
html body .elementor .bbn-global-header .elementor-button-wrapper,
html body .elementor .bbn-global-footer .elementor-button-wrapper,
html body .elementor .bbn-global-footer-legal .elementor-button-wrapper {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ---------- L1-e  nav-list items (blob: .bbn-nav-list .bbn-nav-item ------
   blob   display:inline-flex!important; align-items:center!important;
          flex:0 0 auto!important; gap:.35rem!important
   Home   display:list-item; align-items:normal; flex-shrink:1; gap:normal
   Only the sub-menu items are affected (the parity sheet's child-combinator
   rule already wins for depth-0), but resetting the whole set matches Home. */
html body .elementor .bbn-global-header .bbn-nav .bbn-submenu .bbn-nav-item {
  display: list-item !important;
  align-items: normal !important;
  flex: 0 1 auto !important;
  gap: normal !important;
}

/* ---------- L1-f  nav link row: blob gap:.25rem (=4px) vs parity 2px ----- */
html body .elementor .bbn-global-header .bbn-nav .bbn-nav-link-row {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

/* ---------- L1-g  mega sub-menu list items --------------------------------
   blob   .bbn-submenu li{display:block;margin-bottom:.45rem}
          .bbn-submenu li a{font-size:.95rem}  (=15.2px)
   Home   display:list-item; margin-bottom:0; link font-size 15px          */
html body .elementor .bbn-global-header .bbn-nav .bbn-submenu li {
  display: list-item !important;
  margin-bottom: 0 !important;
}
html body .elementor .bbn-global-header .bbn-nav .bbn-submenu li a {
  font-size: 15px !important;
}

/* ---------- L1-h  mobile nav toggle corner radius ------------------------
   Home 3px (theme style.min.css button{border-radius:3px});
   the blob pushes it to .65rem = 10.4px.  NOTE the six visible .bbn-sub-toggle
   buttons must NOT be touched - Home renders those at 0px.                  */
html body .elementor .bbn-global-header .bbn-nav .bbn-nav-toggle {
  border-radius: 3px !important;
}

/* ---------- L2-b  compat.css  max-width:100%!important  on widget boxes --
   compat.css: body .elementor ... {max-width:100%!important}
   Home has no such clamp, so the chrome's widget containers are unclamped. */
html body .elementor .bbn-global-header .elementor-widget-container,
html body .elementor .bbn-global-footer .elementor-widget-container,
html body .elementor .bbn-global-footer-legal .elementor-widget-container {
  max-width: none !important;
}

/* ---------- L3  0px-tall first-child HTML widget margin collapse ---------- */
html body > .elementor > .elementor-widget-html:first-child {
  margin-bottom: 0 !important;
}
