/* ==========================================================================
   Leak calculator funnel (#book): steps, calculator, contact card.
   Tokens come from styles.css. Field styles mirror call.css, scoped here.
   ========================================================================== */
.funnel .book-head .eyebrow { justify-content: center; }
.funnel .book-head .h2 { margin-top: 18px; }

/* ---- Progress ---------------------------------------------------------- */
.steps { list-style: none; display: flex; justify-content: center; gap: clamp(10px, 3vw, 36px); margin: clamp(28px, 3.5vw, 40px) auto 0; font-size: 14px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 10px; transition: color var(--t-small) var(--ease-quart); }
.steps .dot { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--border-strong); font: 600 13px/1 var(--font-display); transition: all var(--t-small) var(--ease-quart); }
.steps li.is-on { color: var(--text); }
.steps li.is-on .dot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.steps li.is-done .dot { border-color: var(--accent); background: var(--accent); color: var(--ink); }
@media (max-width: 559px) { .steps li:not(.is-on) { font-size: 0; gap: 0; } .steps li:not(.is-on) .dot { font-size: 13px; } }

.step { margin-top: clamp(28px, 3.5vw, 44px); }
.motion-ok .step:not([hidden]) { animation: step-in var(--t-ui) var(--ease-expo) both; }
@keyframes step-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Calculator ---------------------------------------------------------- */
.calc { display: grid; gap: clamp(20px, 3vw, 32px); max-width: 1080px; margin-inline: auto; }
@media (min-width: 960px) { .calc { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.calc-in, .calc-out, .lead-card { border-radius: 20px; border: 1px solid var(--border); background: var(--panel); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04); }
.calc-in { padding: clamp(22px, 3vw, 36px); display: grid; gap: 30px; }
.q { margin: 0; padding: 0; border: 0; min-width: 0; }
.q legend, .q label, .q-label { display: block; padding: 0; font-size: 15.5px; font-weight: 500; color: var(--text); }
.q legend { margin-bottom: 14px; }
.q-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.q-val { flex: 0 0 auto; font: 600 22px/1 var(--font-display); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.q-hint { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.q-split { display: grid; gap: 26px; }
@media (min-width: 620px) { .q-split { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.q-label { margin-bottom: 14px; }

.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--card); color: var(--muted-2); font-size: 14.5px; font-weight: 500; transition: border-color var(--t-press) var(--ease-quart), background-color var(--t-press) var(--ease-quart), color var(--t-press) var(--ease-quart), transform var(--t-press) var(--ease-quart); }
@media (hover: hover) { .pick:hover { border-color: var(--border-hover); color: var(--text); } }
.pick:active { transform: scale(0.97); }
.pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.pick:focus-visible { border-radius: var(--r-pill); }

/* Range: custom track with an orange fill to the thumb (--p set in JS) */
.range { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p), #2e2e2e var(--p)); }
.range::-moz-range-track { height: 6px; border-radius: 99px; background: #2e2e2e; }
.range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 2px 10px rgb(0 0 0 / 0.5); transition: transform var(--t-press) var(--ease-quart); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 2px 10px rgb(0 0 0 / 0.5); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgb(253 186 116 / 0.35); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgb(253 186 116 / 0.35); }

.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-weight: 500; pointer-events: none; }
.funnel .money .input { padding-left: 30px; font: 600 18px/1 var(--font-display); font-variant-numeric: tabular-nums; }

/* ---- Result card --------------------------------------------------------- */
.calc-out { position: relative; overflow: hidden; padding: clamp(22px, 3vw, 34px); background: radial-gradient(120% 80% at 100% 0%, rgb(249 115 22 / 0.13), transparent 60%), var(--panel); border-color: var(--accent-line); }
@media (min-width: 960px) { .calc-out { position: sticky; top: calc(var(--header-h) + 20px); } }
.out-k { font: 600 var(--fs-eyebrow)/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.out-big { margin-top: 16px; font: 600 clamp(46px, 6vw, 72px)/1 var(--font-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--text); }
.out-big small { margin-left: 6px; font-size: 0.32em; letter-spacing: 0; color: var(--muted-2); font-weight: 500; }
.out-sub { margin-top: 12px; color: var(--muted-2); font-size: 15.5px; }
.out-sub span { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.leakbar { position: relative; height: 12px; margin-top: 26px; border-radius: 99px; background: #2a2a2a; overflow: hidden; }
.leakbar span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; transition: width var(--t-ui) var(--ease-expo); }
.lb-missed { width: var(--missed-w, 25%); background: rgb(249 115 22 / 0.38); }
.lb-gone { width: var(--gone-w, 15%); background: var(--accent); }
.out-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 13.5px; color: var(--muted-2); }
.out-legend li { display: flex; align-items: center; gap: 8px; }
.out-legend span { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.out-legend i { width: 10px; height: 10px; border-radius: 3px; }
.k-all { background: #2a2a2a; border: 1px solid #444; }
.k-missed { background: rgb(249 115 22 / 0.38); }
.k-gone { background: var(--accent); }

.out-verdict { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 15.5px; color: var(--text); text-wrap: pretty; }
.out-cta { width: 100%; margin-top: 22px; }
.out-how { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.out-how summary { cursor: pointer; width: fit-content; color: var(--muted-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-hover); list-style: none; }
.out-how summary::-webkit-details-marker { display: none; }
.out-how p { margin-top: 10px; line-height: 1.55; }
.out-how b { color: var(--text); font-weight: 600; }

.skip { margin-top: 22px; text-align: center; font-size: 14.5px; color: var(--muted); }
.linkish { color: var(--accent-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(253 186 116 / 0.4); }
@media (hover: hover) { .linkish:hover { text-decoration-color: currentColor; } }

/* ---- Contact card -------------------------------------------------------- */
.lead-card { max-width: 760px; margin-inline: auto; padding: clamp(24px, 3.4vw, 40px); }
.lead-title { font: 600 clamp(24px, 2.4vw, 30px)/1.15 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.lead-sub { margin-top: 10px; color: var(--muted-2); font-size: 15.5px; }
.lead-grid { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 640px) { .lead-grid { grid-template-columns: 1fr 1fr; } }
.funnel .field { display: grid; gap: 8px; align-content: start; }
.funnel .field label { font-size: 15px; font-weight: 500; color: var(--text); }
.funnel .req { margin-left: 2px; color: var(--accent-ink); }
.funnel .opt { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.funnel .input { width: 100%; height: 50px; padding: 0 14px; border-radius: var(--r-input); border: 1px solid #6b6b6b; background: #111111; color: var(--text); font: 400 16px/1.4 var(--font-body); transition: border-color var(--t-press) var(--ease-quart), background-color var(--t-press) var(--ease-quart); }
.funnel .input::placeholder { color: #8f8f8f; }
@media (hover: hover) { .funnel .input:hover { border-color: #858585; } }
.funnel .input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-color: var(--accent-ink); background: #131313; }
.funnel .input[aria-invalid="true"] { border-color: var(--danger); }
.funnel .field-hint { font-size: 13px; color: var(--muted); }
.funnel .field-error { display: none; font-size: 14px; font-weight: 500; color: var(--danger); }
.funnel .field-error.is-visible { display: block; }
.lead-err { margin-top: 20px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgb(248 113 113 / 0.4); background: rgb(248 113 113 / 0.08); font-size: 14.5px; }
.lead-actions { display: flex; flex-wrap: wrap-reverse; align-items: center; justify-content: space-between; gap: 18px; margin-top: 30px; }
@media (max-width: 559px) { .lead-actions .btn { width: 100%; } .lead-actions { justify-content: center; } }
.btn.is-busy { opacity: 0.7; pointer-events: none; }

/* ---- Step 3 ------------------------------------------------------------ */
.book-hi { max-width: 680px; margin: 0 auto; text-align: center; }
.funnel .book-card { margin-top: clamp(22px, 3vw, 32px); }

@media (prefers-reduced-motion: reduce) {
  .leakbar span, .pick, .steps li, .steps .dot { transition: none; }
}
