/* No-JavaScript fallback is fully readable; JS only adds erm-gsap-active. */
.erm-scroll-story {
  color: #f7f3ec;
  background: radial-gradient(ellipse at 80% 0%, #23446b 0%, #10213d 55%, #0a182a 100%) !important;
  padding: clamp(75px, 8vw, 115px) 5vw !important;
  isolation: isolate;
  overflow: hidden;
}
.erm-scroll-story .erm-story-heading { color: #fffaf1 !important; font-size: clamp(2.6rem, 4.7vw, 4.9rem) !important; line-height: 1.08; letter-spacing: -.055em; margin-bottom: 20px; }
.erm-scroll-story .erm-eyebrow { color: #e6ae49 !important; letter-spacing: .20em; }
.erm-scroll-story .erm-story-intro { color: #dce4eb !important; font-size: clamp(1rem, 1.4vw, 1.25rem); max-width: 780px; margin-bottom: 40px; }
.erm-story-stage { position: relative; max-width: 1320px !important; margin: 0 auto !important; }
.erm-story-panel {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0, .9fr);
  align-items: center; gap: clamp(28px, 5vw, 90px);
  background: rgba(255,255,255,.065) !important;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 26px;
  padding: clamp(18px, 3vw, 44px) !important;
  margin: 24px 0;
  box-shadow: 0 24px 55px rgba(0,0,0,.11);
  min-width: 0;
}
.erm-story-panel figure { margin: 0 !important; min-width: 0; }
.erm-story-panel figure img { width: 100%; height: min(46vw, 480px); object-fit: cover; border-radius: 16px; display:block; }
.erm-story-panel :is(.erm-story-copy, .wp-block-group){ min-width:0; }
.erm-story-panel h3 { color: #fff9ed !important; font-size: clamp(2.2rem, 3.5vw, 4.0rem) !important; letter-spacing: -.045em; line-height: 1.1; }
.erm-story-panel p { color: #e1e8ef !important; font-size:clamp(.98rem,1.24vw,1.16rem); line-height:1.75; max-width:560px; }
.erm-story-panel .erm-eyebrow { color: #f1c67f !important; font-size:.78rem!important; font-weight:800; }
.erm-story-panel a { color:#f0c782 !important; }
.erm-story-controls { max-width: 1200px !important; margin: 30px auto 0 !important; display:flex; align-items:center; gap:18px; }
.erm-story-current { color:#e9bc72 !important; font-size:.85rem; font-weight:750; letter-spacing:.15em; white-space:nowrap; }
.erm-story-progress-track { height:3px; flex:1; background:rgba(255,255,255,.2); border-radius:99px; overflow:hidden; }
.erm-story-progress-fill { height:100%; width:100%; background:#efb854; display:block; transform:scaleX(0); transform-origin:left center; }
/* On desktop, JS pins the whole chapter and crossfades exactly one panel at a time. */
@media(min-width:960px) {
 .erm-scroll-story.erm-gsap-active { min-height: min(860px, calc(100vh - 80px)); padding-top:clamp(42px, 5vh, 75px)!important; padding-bottom:40px!important; }
 .erm-scroll-story.erm-gsap-active .erm-story-stage { position: relative; height:min(560px,56vh); min-height:440px; }
 .erm-scroll-story.erm-gsap-active .erm-story-panel {
  position:absolute; inset:0; margin:0; width:100%; opacity:0; visibility:hidden; pointer-events:none; max-height:100%;
 }
 .erm-scroll-story.erm-gsap-active .erm-story-panel figure img { height:min(46vh,450px); }
}
.erm-reading-progress { position:fixed; left:0; right:0; top:0; height:3px; z-index:100000; pointer-events:none; background:transparent; }
.erm-reading-progress>span{ display:block; height:100%; width:100%; background:linear-gradient(90deg,#e6ae49,#f4d393); transform-origin:left; transform:scaleX(0); }
/* Avoid competition with previously configured CSS view-timeline effects */
.erm-gsap-ready .erm-section>.wp-block-heading,.erm-gsap-ready .erm-section>.wp-block-columns,.erm-gsap-ready .erm-section>.wp-block-query,.erm-gsap-ready .erm-section>.wp-block-group{animation:none!important}
@media(max-width:959px){
 .erm-scroll-story { padding:70px 5vw!important; }
 .erm-story-panel{ display:block; margin:20px 0; }
 .erm-story-panel figure img{ height:auto; aspect-ratio: 16 / 10; margin-bottom:26px; }
 .erm-story-progress-track{display:none}
}
@media(prefers-reduced-motion:reduce){
 .erm-story-panel,.erm-story-panel img{ transition:none!important; animation:none!important }
 .erm-reading-progress{display:none}
}
