/* Theo Properties RC1.0.15.94
   Mobile + tablet Connected Journey fit lock.
   Scope: <=1180px only. No laptop/desktop changes. */

@media (max-width:1180px){
  #explore .how-theo-works.how-theo-works-v2,
  #explore .journey-stage-card,
  #explore .journey-stage-steps,
  #explore .journey-stage-steps li{
    box-sizing:border-box!important;
    max-width:100%!important;
  }

  #explore .journey-stage-card{
    overflow:hidden!important;
  }

  #explore .journey-stage-steps{
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
    scroll-snap-type:none!important;
    -webkit-overflow-scrolling:auto!important;
    padding:0!important;
    margin:0!important;
    gap:0!important;
  }

  #explore .journey-stage-steps li{
    min-width:0!important;
    width:auto!important;
    flex:none!important;
    scroll-snap-align:none!important;
    overflow:hidden!important;
  }

  #explore .journey-stage-steps li > div:last-child{
    min-width:0!important;
    overflow:hidden!important;
  }

  #explore .journey-stage-steps strong,
  #explore .journey-stage-steps small{
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }

  #explore .journey-stage-steps li:not(:last-child)::after{
    display:none!important;
  }
}

/* Tablets / iPad portrait + landscape: wrapped two-column journey, no horizontal scroll. */
@media (min-width:701px) and (max-width:1180px){
  #explore .journey-stage-steps{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  #explore .journey-stage-steps li{
    display:grid!important;
    grid-template-columns:30px 30px minmax(0,1fr)!important;
    align-items:start!important;
    gap:8px!important;
    padding:16px 16px 17px!important;
    border-right:0!important;
    border-bottom:1px solid #e6ecee!important;
  }

  #explore .journey-stage-steps li:nth-child(odd){
    border-right:1px solid #e6ecee!important;
  }

  #explore .journey-stage-steps li:last-child{
    grid-column:1 / -1!important;
    width:50%!important;
    justify-self:center!important;
    border-right:0!important;
    border-bottom:0!important;
  }

  #explore .journey-stage-steps strong{
    font-size:14px!important;
    line-height:1.18!important;
  }

  #explore .journey-stage-steps small{
    font-size:11px!important;
    line-height:1.42!important;
  }
}

/* Phones: one complete journey step per row. */
@media (max-width:700px){
  #explore .how-theo-works.how-theo-works-v2{
    overflow:hidden!important;
  }

  #explore .journey-stage-media{
    width:100%!important;
    max-width:100%!important;
    aspect-ratio:16/10!important;
  }

  #explore .journey-stage-label{
    left:14px!important;
    right:14px!important;
    bottom:14px!important;
  }

  #explore .journey-stage-label strong{
    max-width:100%!important;
    font-size:clamp(18px,5.6vw,22px)!important;
    line-height:1.05!important;
    white-space:normal!important;
  }

  #explore .journey-stage-steps{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  #explore .journey-stage-steps li{
    display:grid!important;
    grid-template-columns:28px 28px minmax(0,1fr)!important;
    align-items:start!important;
    gap:8px!important;
    padding:14px 13px 15px!important;
    border-right:0!important;
    border-bottom:1px solid #e6ecee!important;
  }

  #explore .journey-stage-steps li:last-child{
    border-bottom:0!important;
  }

  #explore .journey-stage-number,
  #explore .journey-stage-icon{
    width:27px!important;
    height:27px!important;
  }

  #explore .journey-stage-icon svg{
    width:18px!important;
    height:18px!important;
  }

  #explore .journey-stage-steps strong{
    font-size:14.5px!important;
    line-height:1.18!important;
    margin-bottom:4px!important;
  }

  #explore .journey-stage-steps small{
    font-size:11px!important;
    line-height:1.4!important;
  }
}

/* Phone landscape also uses the contained vertical stack. */
@media (max-width:900px) and (orientation:landscape) and (max-height:520px){
  #explore .journey-stage-steps{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    overflow-x:hidden!important;
  }
  #explore .journey-stage-steps li{
    width:auto!important;
    min-width:0!important;
    flex:none!important;
  }
  #explore .journey-stage-steps li:nth-child(odd){border-right:1px solid #e6ecee!important}
  #explore .journey-stage-steps li:last-child{
    grid-column:1 / -1!important;
    width:50%!important;
    justify-self:center!important;
    border-right:0!important;
  }
}
