/* Shared outer width, explicitly requested for existing site chrome.
   Width alone needs !important to override the more specific legacy template
   widths (about-selector, products chooser and responsive home footer).
   Keep each template's existing position, max-width and inner navigation gutter. */
:root{--ec-site-chrome-max:1180px;--ec-site-chrome-gutter:20px}
@media(max-width:700px){:root{--ec-site-chrome-gutter:12px}}
body .ec-unified-header,body .ec-screen-header,body .site-header.ec-global-header,body .ec-unified-footer,body footer.light-footer{
 box-sizing:border-box;
 width:min(var(--ec-site-chrome-max),calc(100vw - 2 * var(--ec-site-chrome-gutter)))!important;
}

/* Fixed unified headers retain their original left/transform centring.
   Relative article headers are direct body children; centre with margins.
   Legacy freebie headers are relative through products-v48.css and retain
   their existing position, left/right and untransformed inner .nav-wrap. */
body.ec-home-screen .ec-unified-header,
body.freebie-site-page .site-header.ec-global-header,
body .ec-unified-footer,
body footer.light-footer{margin-left:auto;margin-right:auto}

/* Normal block/grid shells: centre the wider header within the shell.
   Flex-centred selector headers are deliberately excluded: their parent's
   align-items:center already centres them, so no left/transform is applied. */
body.ec-home-screen:not(.ec-about-selector) .ec-screen-header{
 left:50%;transform:translateX(-50%);margin-left:0;margin-right:0;
}

/* Preserve the existing 58px landscape rail and its grid structure.
   This explicit width exception is required for the existing narrow header. */
@media(max-width:980px) and (orientation:landscape) and (max-height:580px){
 body.ec-home-screen.ec-home-calendar .ec-screen-header{
  width:100%!important;left:auto;transform:none;margin-left:0;margin-right:0;
 }
}
