/* Extended PR 1.3.1: site-wide alignment and responsive containment */

/* Premium hero contains two centered rows: the split hero and the scroll cue. */
.epr-page-home .hero-premium{
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
}
.epr-page-home .hero-premium > .wrap{
  width:min(1220px,calc(100% - 48px));
  margin-left:auto;
  margin-right:auto;
  flex:0 0 auto;
}
.epr-page-home .hero-premium > .hero-split{
  width:min(1220px,calc(100% - 48px));
}
.epr-page-home .hero-premium > .hero-foot{
  width:min(1220px,calc(100% - 48px));
  align-self:center;
}
.epr-page-home .hero-copy,
.epr-page-home .intelligence-stage{
  min-width:0;
}
.epr-page-home .hero-copy h1{
  max-width:720px;
}
.epr-page-home .intelligence-stage{
  width:100%;
  max-width:560px;
  justify-self:end;
}

/* One alignment rail across all managed pages. */
body.epr-template .hero > .wrap,
body.epr-template .section > .wrap,
body.epr-template main > .wrap,
body.epr-template .footer > .wrap{
  margin-left:auto;
  margin-right:auto;
}
body.epr-template main,
body.epr-template section,
body.epr-template .hero,
body.epr-template .section{
  max-width:100%;
}

/* Prevent grid/flex children from forcing their parent off the viewport. */
body.epr-template .grid > *,
body.epr-template .hero-split > *,
body.epr-template .section-head > *,
body.epr-template .presentation-grid > *,
body.epr-template .tab-panel > *,
body.epr-template .case-feature > *,
body.epr-template .closing-card > *,
body.epr-template .os-map > *,
body.epr-template .command-result > *,
body.epr-template .footer-grid > *{
  min-width:0;
}
body.epr-template img,
body.epr-template svg,
body.epr-template video,
body.epr-template iframe{
  max-width:100%;
}

/* Long copy and controls should wrap rather than widen the layout. */
body.epr-template h1,
body.epr-template h2,
body.epr-template h3,
body.epr-template p,
body.epr-template li,
body.epr-template a,
body.epr-template button{
  overflow-wrap:break-word;
}

/* Keep page headers visually aligned with the content rail. */
body.epr-template:not(.epr-page-home) .hero{
  overflow:hidden;
}
body.epr-template:not(.epr-page-home) .hero > .wrap{
  position:relative;
  z-index:1;
}

/* Desktop rhythm: enough separation without letting the visual outrun the copy. */
@media (min-width:901px){
  .epr-page-home .hero-split{
    grid-template-columns:minmax(0,1fr) minmax(420px,.92fr);
    gap:clamp(44px,5vw,78px);
  }
  .epr-page-home .hero-foot{
    margin-top:34px;
  }
}

/* Medium screens stay centered and never clip the hero. */
@media (max-width:1100px){
  .epr-page-home .hero-split{
    grid-template-columns:minmax(0,1fr) minmax(360px,.86fr);
    gap:32px;
  }
  .epr-page-home .intelligence-stage{
    max-width:500px;
  }
}

/* Tablet/mobile moves the operating view below the statement. */
@media (max-width:900px){
  .epr-page-home .hero-premium > .wrap,
  .epr-page-home .hero-premium > .hero-split,
  .epr-page-home .hero-premium > .hero-foot{
    width:min(100% - 28px,1220px);
  }
  .epr-page-home .hero-split{
    grid-template-columns:1fr;
    gap:30px;
  }
  .epr-page-home .intelligence-stage{
    justify-self:stretch;
    max-width:none;
  }
  .epr-page-home .hero-foot{
    display:flex;
    margin-top:22px;
  }
}

@media (max-width:560px){
  .epr-page-home .hero-premium > .wrap,
  .epr-page-home .hero-premium > .hero-split,
  .epr-page-home .hero-premium > .hero-foot{
    width:calc(100% - 28px);
  }
  .epr-page-home .hero-copy h1{
    max-width:100%;
  }
  .epr-page-home .hero-foot{
    gap:10px;
    letter-spacing:.08em;
  }
  .epr-page-home .hero-foot .scroll-line{
    flex:1;
    min-width:34px;
    max-width:80px;
  }
}
