/* Site-wide primary text alignment grid v13
   One shared content start line across major pages and homepage strips.
   Full-bleed backgrounds stay full width; inner content aligns to this grid. */
:root{
  --site-align-max:1320px;
  --site-align-gutter:16px;
  --site-align-width:min(var(--site-align-max),calc(100% - (var(--site-align-gutter) * 2)));
  --site-align-edge:max(var(--site-align-gutter),calc((100vw - var(--site-align-max)) / 2));
}

/* Homepage — all primary text and strip content share one start line. */
.site-homepage :where(
  .container,
  .mission-strip-shell,
  .discover-shell,
  .record-preview-shell,
  #officials .engagement-single,
  #officials .engagement-trust,
  #officials .engagement-form-panel
){
  width:var(--site-align-width)!important;
  max-width:var(--site-align-max)!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}

/* Remove wrapper-specific horizontal padding that shifts the text start. */
.site-homepage :where(.mission-strip-shell,.record-preview-shell){
  padding-inline:0!important;
}

/* Full-bleed Track II band: content begins on exactly the same grid line. */
.site-homepage #initiatives .initiative{
  padding-inline:var(--site-align-edge)!important;
}

/* Major page shells — one site-wide content line. */
:where(
  .mission-v3-shell,
  .dlg-shell,
  .stab-shell,
  .human-shell,
  .coop-shell,
  .td-wrap,
  .sa-shell,
  .sf-wrap,
  .mp-container,
  .om-container,
  .publication-detail-hero-inner,
  .publication-detail-main,
  .embassy-shell-container,
  .dashboard-container,
  .global-footer-shell
){
  width:var(--site-align-width)!important;
  max-width:var(--site-align-max)!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}

/* Standard informational pages that use the generic wrapper. */
body.site-seo-page > :where(main,header,footer) .wrap,
body.site-seo-page main > .wrap,
body.site-seo-page .page-hero > .wrap,
body.site-seo-page .section > .wrap{
  width:var(--site-align-width)!important;
  max-width:var(--site-align-max)!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}

/* Abrahamic/Learning pages use generic .container shells. */
body.site-abraham-guide :where(main,header) > .container,
body.site-abraham-guide main > :where(section,div) > .container,
body.site-learning :where(main,header) > .container,
body.site-learning main > :where(section,div) > .container{
  width:var(--site-align-width)!important;
  max-width:var(--site-align-max)!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}

/* Heritage uses full-width sections rather than centered shells.
   Keep the backgrounds full bleed and align the copy with the global grid. */
body.site-heritage :where(.brochure-section,.brochure-dark){
  padding-inline:var(--site-align-edge)!important;
}
body.site-heritage .brochure-hero-copy{
  padding-inline-start:var(--site-align-edge)!important;
}

/* Shared headers/topbars where present. */
:where(.head-inner,.topbar-inner,.embassy-topbar-inner,.sf-head-inner){
  width:var(--site-align-width)!important;
  max-width:var(--site-align-max)!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}

@media(max-width:900px){
  :root{
    --site-align-gutter:14px;
  }
}

@media(max-width:640px){
  :root{
    --site-align-gutter:12px;
  }

  /* Heritage mobile rails intentionally bleed on the end side for swiping;
     their text still begins at the shared start line. */
  body.site-heritage .brochure-hero-copy{
    padding-inline-start:var(--site-align-gutter)!important;
  }
}
