/* O-04 isolated preview: Financing Simple path stepper polish.
   Desktop already horizontal; add restrained dual-layer progress rail,
   first-step emphasis (not scoring), HIW-like tablet gap, phone vertical rail.
   No copy/facts/CTA changes. Not deployed. */

/* ---- Desktop / Tesla: 4-across with decorative path rail ---- */
html body.g5 #how .rail{
  position:relative !important;
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:0 !important;
  margin-top:32px !important;
}

/* Neutral track (full path diagram, not a percent fill) */
html body.g5 #how .rail::before{
  content:"" !important;
  display:block !important;
  position:absolute !important;
  left:12.5% !important;
  right:12.5% !important;
  top:27px !important; /* through 56px icon centres */
  height:4px !important;
  background:rgba(0,5,62,.10) !important;
  border-radius:999px !important;
  z-index:0 !important;
}

/* Gold decorative path overlaid full length (not progress %) */
html body.g5 #how .rail::after{
  content:"" !important;
  display:block !important;
  position:absolute !important;
  left:12.5% !important;
  right:12.5% !important;
  top:28px !important;
  height:2px !important;
  background:linear-gradient(90deg,#FED14D,#FFE9A0,#FED14D) !important;
  border-radius:999px !important;
  z-index:0 !important;
  opacity:1 !important;
  pointer-events:none !important;
}

html body.g5 #how .rail-step{
  position:relative !important;
  z-index:1 !important;
  padding:0 12px !important;
  text-align:center !important;
}

html body.g5 #how .rail-ico{
  width:56px !important;
  height:56px !important;
  margin:0 auto 14px !important;
  border-radius:50% !important;
  background:#00053E !important;
  color:#FED14D !important;
  display:grid !important;
  place-items:center !important;
  border:3px solid #FED14D !important;
  /* knockout ring so rail meets the circle cleanly */
  box-shadow:
    0 0 0 6px #f4f6fa,
    0 8px 20px rgba(0,5,62,.18) !important;
  position:relative !important;
  z-index:2 !important;
}

/* First step only: soft start emphasis. No completed/active scoring on 2-4. */
html body.g5 #how .rail-step:first-child .rail-ico{
  box-shadow:
    0 0 0 6px #f4f6fa,
    0 0 0 10px rgba(254,209,77,.28),
    0 8px 20px rgba(0,5,62,.18) !important;
}

html body.g5 #how .rail-step .rk{
  display:block !important;
  font-size:11px !important;
  font-weight:800 !important;
  letter-spacing:.12em !important;
  text-transform:uppercase !important;
  color:#001a4a !important;
  margin-bottom:4px !important;
}
html body.g5 #how .rail-step:first-child .rk{
  color:#00468C !important;
}

html body.g5 #how .rail-step h3{
  margin:0 0 6px !important;
  font-size:18px !important;
  color:#00053E !important;
}
html body.g5 #how .rail-step p{
  margin:0 !important;
  font-size:14px !important;
  line-height:1.4 !important;
  color:#4a5568 !important;
}

/* ---- Tablet (<=900): 2x2, hide horizontal rail, roomy row-gap (HIW5) ---- */
@media (max-width:900px){
  html body.g5 #how .rail{
    grid-template-columns:1fr 1fr !important;
    gap:36px 20px !important; /* was 16; HIW5 asks 32-40 row-gap */
  }
  html body.g5 #how .rail::before,
  html body.g5 #how .rail::after{
    display:none !important;
    content:none !important;
  }
  html body.g5 #how .rail-ico{
    box-shadow:0 8px 20px rgba(0,5,62,.18) !important;
  }
  html body.g5 #how .rail-step:first-child .rail-ico{
    box-shadow:
      0 0 0 4px rgba(254,209,77,.30),
      0 8px 20px rgba(0,5,62,.18) !important;
  }
}

/* ---- Phone (<=430): 1-col with thin vertical decorative rail ---- */
@media (max-width:430px){
  html body.g5 #how .rail{
    grid-template-columns:1fr !important;
    gap:0 !important;
    padding-left:0 !important;
  }
  /* vertical track through icon column (centred) */
  html body.g5 #how .rail::before{
    content:"" !important;
    display:block !important;
    position:absolute !important;
    left:50% !important;
    right:auto !important;
    top:28px !important;
    bottom:28px !important;
    width:4px !important;
    height:auto !important;
    transform:translateX(-50%) !important;
    background:rgba(0,5,62,.10) !important;
    border-radius:999px !important;
    z-index:0 !important;
  }
  html body.g5 #how .rail::after{
    content:"" !important;
    display:block !important;
    position:absolute !important;
    left:50% !important;
    right:auto !important;
    top:28px !important;
    bottom:28px !important;
    width:2px !important;
    height:auto !important;
    transform:translateX(-50%) !important;
    background:linear-gradient(180deg,#FED14D,#FFE9A0,#FED14D) !important;
    border-radius:999px !important;
    z-index:0 !important;
  }
  html body.g5 #how .rail-step{
    padding:18px 8px !important;
  }
  html body.g5 #how .rail-ico{
    box-shadow:
      0 0 0 6px #f4f6fa,
      0 8px 20px rgba(0,5,62,.18) !important;
  }
  html body.g5 #how .rail-step:first-child .rail-ico{
    box-shadow:
      0 0 0 6px #f4f6fa,
      0 0 0 10px rgba(254,209,77,.28),
      0 8px 20px rgba(0,5,62,.18) !important;
  }
}
