/* Phones: see app-scroll.js. The screenshot stays under the header while the four
   features scroll normally beneath it; it cross-fades to each one as it arrives. */
@media (max-width:640px){
  /* Heading, then the screenshot, then the features, in one column. */
  #the-app .app-explorer{gap:0}
  #the-app .app-explorer-left{display:contents}
  #the-app .section-heading.app-heading{order:0;margin-bottom:16px}
  #the-app .feature-stage{order:1}
  #the-app .feature-list{order:2;border-top:0}

  /* The screenshot stays put just under the header. */
  #the-app .feature-stage{position:sticky;top:76px;z-index:5;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:0;padding:14px 0 12px;border-radius:18px;overflow:hidden;
    background:radial-gradient(120% 80% at 50% 100%,rgba(43,84,240,.16),transparent 60%),var(--canvas,#f2f5f9);box-shadow:0 10px 24px rgba(12,19,32,.06)}
  #the-app .stage-label,#the-app .stage-footer{display:none}

  /* All four screens share one spot and cross-fade with a soft zoom. */
  #the-app .feature-panel,#the-app .feature-panel[hidden]{display:block;grid-area:1/1;justify-self:stretch;padding-block:0;animation:none;
    opacity:0;transform:translateY(18px) scale(.9) rotate(-1.5deg);filter:blur(6px);
    transition:opacity .5s ease,transform .6s cubic-bezier(.2,.8,.2,1),filter .5s ease;pointer-events:none}
  #the-app .feature-panel:not([hidden]){opacity:1;transform:none;filter:none;pointer-events:auto}
  #the-app .feature-panel:not([hidden]) .phone{animation:sl-float 4.5s ease-in-out .6s infinite}
  #the-app .feature-panel .phone{width:165px;margin-inline:auto;border-radius:20px;padding:5px;box-shadow:0 20px 36px rgba(12,19,32,.22)}
  #the-app .feature-panel .phone img{border-radius:15px}

  /* Progress: four segments under the screenshot, the ones reached filled. */
  #the-app .sl-steps{grid-area:2/1;justify-self:stretch;display:flex;gap:6px;margin:12px 18px 0}
  #the-app .sl-steps span{flex:1;height:4px;border-radius:4px;background:var(--line,#d7dee8);overflow:hidden;position:relative}
  #the-app .sl-steps span::after{content:"";position:absolute;inset:0;background:var(--blue,#2b54f0);transform:scaleX(0);transform-origin:left;transition:transform .45s ease}
  #the-app .sl-steps span.is-done::after{transform:scaleX(1)}

  /* The features scroll normally; each gets room to pass under the screenshot. */
  #the-app .feature-tab,#the-app .feature-tab[aria-selected=true]{min-height:30vh;padding-block:22px;align-items:flex-start}
  #the-app .feature-tab:last-child{border-bottom:0}
  #the-app .feature-tab>.icon{display:none}
  #the-app .feature-text strong{font-size:18px}
  #the-app .feature-text>span{display:block;font-size:13px;line-height:1.7;margin-top:6px}
  html.sl-app-pinned .sticky-cta{transform:translateY(110%)!important}
}
/* The screenshot shrinks on shorter phones. */
@media (max-width:640px) and (max-height:760px){
  #the-app .feature-panel .phone{width:140px}
}
@media (max-width:640px) and (max-height:680px){
  #the-app .feature-panel .phone{width:118px}
}
@keyframes sl-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@media (prefers-reduced-motion:reduce){
  #the-app .feature-panel,#the-app .feature-panel[hidden]{transition:opacity .2s;transform:none;filter:none}
  #the-app .feature-panel .phone{animation:none!important}
}
