/*
 * T-Booster global layout contract
 * Commercial Opportunity is the site-wide geometry reference.
 * One 1320px outer frame is shared by every public page, header,
 * hero, content section, pre-footer and footer. Individual reading
 * columns may remain narrower inside this frame for legibility.
 */
:root {
  --site-shell: 1320px;
  --site-gutter: clamp(18px, 3vw, 48px);

  /* Compatibility aliases used by the existing page styles. */
  --shell: var(--site-shell) !important;
  --max: var(--site-shell) !important;
  --ending-wrap: var(--site-shell) !important;
  --v208-shell: var(--site-shell) !important;
}

/* Current shell-based pages and legacy wrap-based pages. */
html body .shell,
html body .wrap,
html body .page-shell,
html body .science-shell,
html body#v205-site.visual-system-v205.global-column-alignment-v33.global-column-alignment-v35 .wrap {
  width: min(var(--site-shell), calc(100% - (var(--site-gutter) * 2))) !important;
  max-width: var(--site-shell) !important;
  margin-inline: auto !important;
}

/* Keep every footer on the same outer grid as its page content. */
html body .global-footer-v266 > .shell,
html body .global-footer-v267 > .shell,
html body .global-footer-v268 > .shell,
html body .global-footer-v269 > .shell,
html body .site-footer > .shell,
html body#v205-site.visual-system-v205.global-column-alignment-v33.global-column-alignment-v35 .global-footer-v269 > .shell {
  width: min(var(--site-shell), calc(100% - (var(--site-gutter) * 2))) !important;
  max-width: var(--site-shell) !important;
  margin-inline: auto !important;
}

/* Legacy principal heroes previously carried narrower hard-coded frames. */
html body#v205-site.visual-system-v205.global-column-alignment-v33.global-column-alignment-v35 main .hero .wrap.hero-grid,
html body#v205-site.visual-system-v205.global-column-alignment-v33.global-column-alignment-v35 header .wrap.head,
html body#v205-site.visual-system-v205.global-column-alignment-v33.global-column-alignment-v35 .top-note .wrap,
html body#v205-site.visual-system-v205.global-column-alignment-v33.global-column-alignment-v35 main > section > .wrap {
  width: min(var(--site-shell), calc(100% - (var(--site-gutter) * 2))) !important;
  max-width: var(--site-shell) !important;
  margin-inline: auto !important;
}

/* Explicit page families guard against older high-specificity overrides. */
html body.home-v253 .shell,
html body.science-page .shell,
html body.clinical-atlas-page .shell,
html body[class*="commercial-v"] .shell {
  width: min(var(--site-shell), calc(100% - (var(--site-gutter) * 2))) !important;
  max-width: var(--site-shell) !important;
  margin-inline: auto !important;
}

/* Redirect/fallback pages also use the common frame when scripts are unavailable. */
body.layout-redirect main {
  width: min(var(--site-shell), calc(100% - (var(--site-gutter) * 2)));
  max-width: var(--site-shell);
  margin: 10vh auto;
}
