/* flow.css: the flow screens (/auto/ ... /review/): the start of a flow, the progress header, one question per screen,
   the answer controls, Back and Next, the contact screen, welcome back and the result. Rendered by /js/flow-ui.js.
   Built on app.css (its top comment lists the shared classes: .stage .card .tiles .tile .btn .field .notice ...).
   Rules: tokens only, no hex colours (CLAUDE.md rule 7; new shades are color-mix() of tokens); no style= attributes in
   markup (the CSP; flow-ui.js only sets the progress fill width through the CSSOM); states never rely on colour alone.
   Phones (560px and under): the card drops its frame so content sits on the 16px page gutter, inputs are 16px text
   (app.css), and every target is at least 44px tall. */

/* ---------- the stage and the start of a flow ---------- */
.flow-stage{padding-top:clamp(20px,4vw,44px)}
.flow-hero{max-width:640px;margin:0 auto clamp(20px,3vw,30px);text-align:center}
.flow-pill{margin-bottom:14px}
.flow-title{font-size:clamp(30px,4.2vw,44px)}
.flow-intro{margin:12px auto 0;font-size:17px;line-height:1.55}
.flow-line{margin-top:18px;text-align:left}
.flow-line strong{font-weight:800}
.flow-nowrap{white-space:nowrap}

/* ---------- the card ---------- */
.flow-card{position:relative}
.flow-screen{animation:flow-in .22s ease both}
@keyframes flow-in{from{opacity:0}to{opacity:1}}

/* ---------- progress: named sections and a bar (desktop); "Step 2 of 5 · Drivers" and the bar (phones) ---------- */
.flow-progress{margin:0 0 clamp(22px,3vw,30px)}
.flow-steps{display:flex;gap:6px;margin:0 0 12px;padding:0;list-style:none}
.flow-step{flex:1 1 0;min-width:0}
.flow-step-btn{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:2px 0;
  font:inherit;font-size:14px;font-weight:700;line-height:1.25;color:var(--soft);text-align:left;background:none;border:0;border-radius:var(--rs)}
button.flow-step-btn{cursor:pointer}
button.flow-step-btn:hover .flow-step-name{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.flow-step-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.flow-dot{display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:50%;border:2px solid var(--edge);background:var(--white);color:var(--blue)}
.flow-dot .icon{width:12px;height:12px}
.is-done .flow-step-btn{color:var(--ink)}
.is-done .flow-dot{border-color:var(--blue)}
.is-current .flow-step-btn{color:var(--ink);font-weight:800}
.is-current .flow-dot{border-color:var(--blue);background:var(--blue);box-shadow:0 0 0 4px var(--tint)}
.flow-step-label{display:none;margin:0 0 10px;font-size:14.5px;font-weight:800;color:var(--ink)}
.flow-bar{height:6px;border-radius:99px;background:var(--line);box-shadow:inset 0 0 0 1px var(--edge);overflow:hidden}
.flow-bar-fill{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue),var(--blue-3));transition:width .35s var(--ease)}
@media(max-width:700px){
  .flow-steps{display:none}
  .flow-step-label{display:block}
}

/* ---------- the question ---------- */
.flow-kicker{margin:0 0 6px;font-size:13.5px;font-weight:800;letter-spacing:.02em;color:var(--blue)}
.flow-q{font-size:clamp(22px,2.4vw,27px);font-weight:800;letter-spacing:-.01em;line-height:1.25;overflow-wrap:break-word}
.flow-note{margin-top:8px;color:var(--soft);font-size:16px;line-height:1.55;max-width:62ch}
.flow-lead{margin-top:8px;color:var(--ink);font-size:17px;line-height:1.55}
.flow-help-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:6px;padding:4px 2px;
  font:inherit;font-size:15px;font-weight:800;color:var(--blue);background:none;border:0;border-radius:var(--rs);cursor:pointer}
.flow-help-btn .icon{width:18px;height:18px}
.flow-help-btn span{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.flow-help-btn:hover{color:var(--blue-hover)}
.flow-help-btn[aria-expanded="true"] span{text-decoration:none}
.flow-help{margin-top:6px;padding:14px 16px;border:1px solid var(--line);border-left:4px solid var(--blue-3);border-radius:10px;background:var(--tint-2);font-size:15.5px;line-height:1.55}
.flow-answer{margin-top:22px}
.flow-answer > .field-error{margin-top:12px}
/* an invalid field keeps its red edge while it has focus (the focus ring would otherwise read as fine) */
.flow-card [aria-invalid="true"]:focus-visible{outline-color:var(--red-text)}

/* ---------- fields ---------- */
.flow-field{width:100%}
.flow-field-narrow{max-width:300px}
.flow-select{max-width:460px}
.input-affix-end .affix{left:auto;right:14px}
.input-affix-end input{padding-left:14px;padding-right:70px}
.flow-my{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:0 12px;max-width:440px}
.flow-my .field,.flow-vehicle .field{margin-bottom:0}
.flow-vehicle{display:grid;gap:14px}
@media(min-width:700px){.flow-vehicle{grid-template-columns:8.5rem minmax(0,1fr) minmax(0,1.3fr);gap:0 14px}}
input[type=date]{max-width:300px}

/* ---------- tiles (app.css .tiles and .tile, plus layouts for this flow) ---------- */
.tiles.tiles-short{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:561px){.tiles-short.tiles-n3,.tiles-short.tiles-n5,.tiles-short.tiles-n6{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:861px){.tiles-short.tiles-n4{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:560px){.tiles-short > .tile:last-child:nth-child(odd){grid-column:1 / -1}}
.tiles-rows,.tiles-dense{gap:10px}
.tiles-rows .tile,.tiles-dense .tile{min-height:54px;padding:12px 16px}
.tiles-rows .tile-label,.tiles-dense .tile-label{font-size:16px}
.tile[aria-checked="true"] .tile-label{color:var(--navy)}
.tile-go .icon{width:14px;height:14px}

/* gates: what was added so far */
.flow-added{display:grid;gap:6px;margin:0 0 16px;font-weight:700}
.flow-added li{display:flex;align-items:center;gap:10px}
.flow-added .icon{width:16px;height:16px;color:var(--green-text)}

/* notices: an information box, then the choices */
.flow-notice .notice{margin-bottom:16px}

/* ---------- coverage packages ---------- */
.pkgs{display:grid;gap:18px;padding-top:10px}
.tile.pkg{flex-direction:column;align-items:stretch;gap:10px;padding:20px 20px 18px;border-radius:14px}
.tile.pkg.is-featured{border-color:color-mix(in srgb,var(--blue) 45%,var(--line));background:linear-gradient(180deg,var(--tint-2),var(--white))}
.tile.pkg[aria-checked="true"]{border-color:var(--blue);background:var(--tint)}
.pkg-tag{position:absolute;top:-11px;left:18px;padding:3px 10px;border-radius:99px;background:var(--blue);color:var(--white);font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;line-height:1.5}
.pkg-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.pkg-title{font-family:var(--fh);font-size:18.5px;font-weight:800;line-height:1.25}
.pkg-body{display:grid;gap:12px}
.pkg-desc{color:var(--soft);font-size:15.5px;line-height:1.5}
.pkg-items{display:grid;gap:6px 18px;font-size:14.5px;line-height:1.45}
@media(min-width:561px){.pkg-items{grid-template-columns:repeat(2,minmax(0,1fr))}}
.pkg-item{display:flex;align-items:flex-start;gap:8px}
.pkg-item .icon{width:16px;height:16px;margin-top:2px;color:var(--green-text)}

/* ---------- skip, Back and Next ---------- */
.flow-skip{margin-top:10px}
.flow-skip-btn{padding-left:2px;padding-right:2px}
.flow-skip-btn .icon{width:14px;height:14px}
.flow-skip-btn[aria-pressed="true"]{text-decoration:none;font-weight:800}
.flow-actions{margin-top:26px}
.flow-back .icon{width:13px;height:13px}
.flow-next{min-width:132px}
.flow-send{min-width:220px}
@media(max-width:560px){
  .flow-actions{flex-wrap:nowrap;gap:8px;margin-top:22px}
  /* phones: a text Back on the left, the primary filling the rest of the row */
  .flow-back{min-width:0;padding:12px 10px 12px 2px;background:none;border-color:transparent;box-shadow:none;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
  .flow-back:hover{background:none}
  .flow-actions > .btn-blue{flex:1 1 auto;min-width:0}
  .flow-send{min-width:0}
}

/* ---------- the card footer: Start over and the phone line ---------- */
.flow-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 18px;margin-top:30px;padding-top:14px;border-top:1px solid var(--line);color:var(--soft);font-size:14.5px}
.flow-foot .btn-text{min-height:44px;padding-left:0;padding-right:0;font-size:14.5px}
.flow-call{margin:0}
.flow-confirm{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;width:100%;padding:10px 0}
.flow-confirm p{color:var(--ink);font-weight:700}
.flow-confirm-actions{display:flex;flex-wrap:wrap;gap:6px 14px}
.flow-confirm-actions .btn{min-height:44px}

/* ---------- the contact screen ---------- */
.flow-contact .f-row{gap:0 14px}
.flow-optional{font-weight:600;color:var(--soft)}
.flow-pref{max-width:520px}
.flow-pref .tile{min-height:52px;padding:10px 14px}
.flow-pref .tile-label{font-size:15.5px}
@media(max-width:560px){.flow-pref .tile{gap:10px;padding:10px 12px}.flow-pref .tile-label{font-size:15px}}
/* the smallest phones: one tile per row, so "WhatsApp" never breaks mid-word */
@media(max-width:359px){.tiles.tiles-pair.flow-pref{grid-template-columns:minmax(0,1fr)}}
.flow-consent{margin-top:8px;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--tint-2)}
.flow-consent .check{font-size:15px;line-height:1.55}
.flow-consent .check input{margin-top:3px}
.flow-consent .field-error{margin-left:32px}
.flow-consent-note{margin-top:10px;margin-left:32px;color:var(--soft);font-size:14px;line-height:1.55}
.flow-hp{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.flow-submit-error{margin-top:16px}
@media(max-width:560px){.flow-consent{padding:14px}}

/* ---------- welcome back and the result ---------- */
.flow-result-head{display:flex;align-items:flex-start;gap:16px}
.flow-badge{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:50%;
  background:color-mix(in srgb,var(--green) 14%,var(--white));color:var(--green-text)}
.flow-badge .icon{width:24px;height:24px}
.flow-badge-info{background:var(--tint);color:var(--blue)}
.flow-result-head .flow-q{margin-top:6px}
.flow-resume .flow-note{margin-top:16px}
.flow-ref{margin-top:18px;font-size:16.5px;line-height:1.9}
.flow-ref-code{display:inline-block;padding:1px 10px;border:1px solid var(--line);border-radius:8px;background:var(--tint);color:var(--navy);font-family:var(--fh);font-weight:800;letter-spacing:.04em;line-height:1.6}
.flow-no-estimate{margin-top:14px}
.flow-estimate{margin-top:20px;padding:clamp(18px,3vw,24px);border:1px solid color-mix(in srgb,var(--blue) 30%,var(--line));border-radius:14px;background:linear-gradient(180deg,var(--tint-2),var(--white))}
.flow-estimate-title{font-size:15px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--blue)}
.flow-estimate-range{margin-top:8px;line-height:1.2}
.flow-estimate-range strong{font-family:var(--fh);font-size:clamp(26px,3.6vw,34px);font-weight:800;color:var(--navy);letter-spacing:-.01em}
.flow-estimate-range span{font-size:17px;font-weight:700;color:var(--soft)}
.flow-estimate-month{margin-top:6px;font-size:16px;color:var(--ink)}
.flow-meter{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}
.flow-meter-label{font-size:15px;font-weight:800}
.flow-meter-bars{display:inline-grid;grid-template-columns:repeat(3,30px);gap:4px}
.flow-meter-bar{height:8px;border-radius:99px;background:var(--line);box-shadow:inset 0 0 0 1px var(--edge)}
.flow-meter-bar.is-on{background:var(--blue);box-shadow:none}
.flow-estimate-note{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-size:15px;line-height:1.55}
.flow-h2{margin-top:30px;font-size:clamp(18px,2vw,21px)}
.flow-what-next{display:grid;gap:14px;margin:14px 0 0;padding:0;list-style:none}
.flow-what-next li{display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;align-items:start}
.flow-what-next-no{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--blue);color:var(--white);font-family:var(--fh);font-weight:800;font-size:15px}
.flow-what-next h3{font-size:16.5px;margin-top:5px}
.flow-what-next p{margin-top:2px;color:var(--soft);font-size:15.5px;line-height:1.5}
.flow-brokers{display:flex;flex-wrap:wrap;gap:14px 28px;margin-top:14px}
.flow-broker{display:flex;align-items:center;gap:12px}
.flow-broker img{width:56px;height:56px;flex:none;border-radius:50%;object-fit:cover;object-position:center 18%;border:2px solid var(--white);box-shadow:var(--sh);background:var(--tint)}
.flow-broker-text{display:flex;flex-direction:column;line-height:1.35}
.flow-broker-text strong{font-family:var(--fh);font-weight:800}
.flow-broker-text span{color:var(--soft);font-size:14.5px}
.flow-call-result{margin-top:22px;font-size:16px}
.flow-result-links{display:flex;flex-wrap:wrap;align-items:center;gap:12px 22px;margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}
@media(max-width:560px){.flow-result-links .btn{width:100%}.flow-result-links .link{display:inline-flex;align-items:center;min-height:44px}}

/* ---------- phones: the card drops its frame so content sits on the 16px gutter ---------- */
@media(max-width:560px){
  .flow-root{background:var(--white)}
  .flow-card{padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}
  .flow-card + .flow-card{margin-top:24px}
  .flow-hero{text-align:left;margin-bottom:22px}
  .flow-intro{margin-left:0;margin-right:0;font-size:16.5px}
  .flow-foot{margin-top:26px}
  .flow-result-head{gap:12px}
  .flow-badge{width:40px;height:40px}
}

@media print{
  .flow-progress,.flow-foot,.flow-actions,.flow-result-links{display:none}
}
