/* ==========================================================================
   Handy Volt — quote.css
   Instant-quote console. Used on index.html (#calculator) and quote.html.
   Written against the tokens already defined in style.css.
   ========================================================================== */

/* #D64430 measured 4.44:1 on white — just under AA for body text. */
:root { --alert: #C2371F; }

/* --- Console frame -------------------------------------------------------- */
/* No overflow:hidden — it would break position:sticky on the rail inside.
   Corners are rounded on each child individually instead. */
.console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  border-radius: var(--r-xl);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.console > .q-main {
  padding: clamp(26px, 2.8vw, 40px);
  min-width: 0;
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  display: flex;
  flex-direction: column;
}
.console .q-rail-in {
  height: 100%;
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
  padding: clamp(26px, 2.6vw, 34px) clamp(22px, 2.4vw, 30px);
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  max-height: calc(100vh - var(--nav-h) - 28px);
  overflow-y: auto;
}

@media (max-width: 1080px) {
  .console { grid-template-columns: 1fr; }
  .console > .q-main { border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .console .q-rail-in {
    position: static; max-height: none;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
  }
}

/* --- Banner --------------------------------------------------------------- */
.q-banner {
  display: none; gap: 12px; align-items: flex-start;
  padding: 14px 18px; margin-bottom: 22px;
  border-radius: var(--r-sm);
  background: rgba(214, 68, 48, .07);
  font-size: .87rem; line-height: 1.58; color: var(--text-2);
}
.q-banner.on { display: flex; }
.q-banner b { color: var(--alert); display: block; margin-bottom: 2px; font-weight: 700; }

/* --- Step blocks ---------------------------------------------------------- */
.q-block { padding-block: clamp(24px, 2.6vw, 32px); border-top: 1px solid var(--line); }
.q-block:first-child { border-top: 0; padding-top: 0; }

.q-block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.q-block-head .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--brand), var(--brand-700));
  color: #1A1A1A; font-size: .72rem; font-weight: 800;
}
.q-block-head h2 { font-size: 1.24rem; letter-spacing: -.02em; margin: 0; }
.q-block > .hint {
  font-size: .87rem; color: var(--text-3); line-height: 1.6;
  margin: 0 0 20px 37px;
}

/* --- Category picker ------------------------------------------------------ */
.q-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.q-cat {
  position: relative; text-align: left; flex: 1 1 21%; min-width: 158px;
  padding: 16px 40px 15px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--paper); cursor: pointer;
  transition: border-color .18s var(--ease), transform .18s var(--ease),
              box-shadow .18s var(--ease);
}
.q-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.q-cat h3 { font-size: .89rem; font-weight: 700; color: var(--ink);
            margin: 0; letter-spacing: -.01em; line-height: 1.35; }
.q-cat p { display: none; }
.q-cat .chk {
  position: absolute; right: 14px; top: 15px; width: 19px; height: 19px;
  border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--white);
  display: grid; place-items: center; transition: all .18s var(--ease);
}
.q-cat .chk svg { opacity: 0; color: #1A1A1A; width: 11px; height: 11px; }
.q-cat[aria-pressed="true"] { border-color: var(--brand); box-shadow: var(--shadow); }
.q-cat[aria-pressed="true"] .chk { background: var(--brand); border-color: var(--brand); }
.q-cat[aria-pressed="true"] .chk svg { opacity: 1; }

.q-cat:nth-child(1) { background: linear-gradient(160deg, #FDECCB, var(--paper) 72%); }
.q-cat:nth-child(2) { background: linear-gradient(160deg, #FAF1E1, var(--paper) 72%); }
.q-cat:nth-child(3) { background: linear-gradient(160deg, #EFEDE8, var(--paper) 72%); }
.q-cat:nth-child(4) { background: linear-gradient(160deg, #F8E4CE, var(--paper) 72%); }

/* --- Questions ------------------------------------------------------------ */
.q-field + .q-field { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.q-field > .qlab, .q-field > label.qlab {
  display: block; font-size: .95rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em; margin-bottom: 4px;
}
.q-field .qhint { font-size: .84rem; color: var(--text-3); line-height: 1.55; margin: 0 0 13px; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 17px; border: 1.5px solid var(--line-strong); border-radius: var(--pill);
  background: var(--white); font-size: .88rem; font-weight: 600; color: var(--text);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.opt:hover { border-color: var(--brand); }
.opt[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.opt .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: transparent; border: 1.5px solid var(--text-3);
}
.opt[aria-pressed="true"] .dot { background: #FFFFFF; border-color: #FFFFFF; }
.opt.is-ideal[aria-pressed="true"] .dot { background: var(--brand); border-color: var(--brand); }

.q-field input[type="text"] {
  max-width: 190px; padding: 12px 16px;
  background: var(--paper); border: 1.5px solid transparent; border-radius: var(--r-sm);
  font-size: .97rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.q-field input[type="text"]::placeholder { color: var(--text-3); }
.q-field input[type="text"]:focus {
  outline: none; background: var(--white); border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(248, 176, 56, .30);
}

/* Money slider (the old savings-estimator control, kept) */
.q-money-top {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px;
}
.q-money-val {
  font-weight: 800; font-size: 1.02rem; color: var(--brand-700);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* --- Distance question ----------------------------------------------------- */
.dist-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dist-row input[type="number"] {
  width: 104px; padding: 12px 16px;
  background: var(--paper); border: 1.5px solid transparent; border-radius: var(--r-sm);
  font-size: .97rem; font-variant-numeric: tabular-nums;
}
.dist-row input[type="number"]:focus {
  outline: none; background: var(--white); border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(248, 176, 56, .30);
}
.dist-row input[disabled] { opacity: .5; background: var(--paper-2); }
.dist-unit { font-size: .87rem; color: var(--text-3); margin-right: 4px; }

/* --- Product pickers -------------------------------------------------------- */
.q-cat-group + .q-cat-group { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.q-cat-group > h3 { font-size: .88rem; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.q-cat-group > p { font-size: .83rem; color: var(--text-3); margin-bottom: 14px; line-height: 1.5; }
.picker + .picker { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--line-strong); }

.psel-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 10px; }
.psel { display: flex; flex-direction: column; gap: 6px; }
.psel label { font-size: .74rem; font-weight: 700; color: var(--text-2);
              letter-spacing: .04em; text-transform: uppercase; }
.psel select, .psel input[type="number"] {
  width: 100%; padding: 11px 13px;
  background: var(--paper); border: 1.5px solid transparent; border-radius: var(--r-sm);
  font-size: .9rem;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.psel select {
  appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235A5A5E' stroke-width='1.8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.psel select:focus, .psel input:focus {
  outline: none; background: var(--white); border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(248, 176, 56, .30);
}

/* --- Product summary card ---------------------------------------------------- */
.brand-card {
  margin-top: 14px; display: flex; align-items: center; gap: 18px;
  padding: 18px 20px; background: var(--paper);
  border: 1.5px solid transparent; border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.brand-card:hover { box-shadow: var(--shadow); border-color: var(--line); }
.brand-ico {
  flex: none; width: 84px; height: 84px; border-radius: var(--r);
  display: grid; place-items: center; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(26, 26, 26, .06);
}
.brand-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.brand-info b {
  font-size: 1.06rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  display: flex; align-items: center; gap: 9px;
}
.brand-info span { font-size: .84rem; color: var(--text-2); }
.brand-info .brand-kw { color: var(--ink); font-weight: 800; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.spec-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.spec-badge {
  font-size: .7rem; font-weight: 700; color: var(--text-2);
  padding: 4px 11px; border-radius: var(--pill);
  background: var(--white); border: 1px solid var(--line);
}

.cmp-tog {
  flex: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: .74rem; font-weight: 700; color: var(--text-3);
  padding: 8px 15px; border: 1.5px solid var(--line-strong); border-radius: var(--pill);
  background: var(--white);
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.cmp-tog:hover { border-color: var(--brand); color: var(--brand-700); }
.cmp-tog.on { background: var(--brand); border-color: var(--brand); color: #1A1A1A; }
.cmp-tog[disabled] { opacity: .4; pointer-events: none; }

.prods { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.prod {
  position: relative; text-align: left; display: flex; flex-direction: column;
  padding: 18px 18px 20px; background: var(--paper); cursor: pointer;
  border: 1.5px solid transparent; border-radius: var(--r);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.prod:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.prod[aria-pressed="true"] { border-color: var(--brand); background: var(--white); box-shadow: var(--shadow); }
.prod h4 { font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -.01em; }
.prod .sum { font-size: .8rem; color: var(--text-3); line-height: 1.5; }
.prod .price { font-size: 1.05rem; font-weight: 800; color: var(--text-3); margin: 14px 0 0; }
.prod .pick {
  margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border-radius: var(--pill); border: 1.5px solid var(--line-strong);
  font-size: .8rem; font-weight: 700; color: var(--text-2); transition: all .2s var(--ease);
}
.prod[aria-pressed="true"] .pick { background: var(--brand); border-color: var(--brand); color: #1A1A1A; }

.q-empty {
  padding: 26px 20px; text-align: center; border: 1.5px dashed var(--line-strong);
  border-radius: var(--r); font-size: .9rem; color: var(--text-3);
}

/* --- Price rail ------------------------------------------------------------- */
.q-rail-in {
  background: linear-gradient(168deg, var(--ink) 0%, var(--ink-3) 100%);
  color: rgba(255, 255, 255, .72);
  position: relative; overflow: hidden;
}
.q-rail-in::before {
  content: ""; position: absolute; top: -130px; right: -100px;
  width: 300px; height: 300px; pointer-events: none;
  background: radial-gradient(circle, rgba(248, 176, 56, .34), transparent 70%);
}
.q-rail h2 {
  font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5); margin-bottom: 3px; position: relative;
}

.lines { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.12); position: relative; }
.line {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .87rem;
}
.line .lbl { color: rgba(255, 255, 255, .88); }
.line .lbl small {
  display: block; font-size: .74rem; color: rgba(255, 255, 255, .44);
  margin-top: 3px; line-height: 1.45;
}
.line .amt { font-weight: 700; font-size: .92rem; color: #fff; font-variant-numeric: tabular-nums; }
.line.credit .amt { color: var(--brand-lift); }
.line.pending .amt {
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .42); font-weight: 700;
}
.line.pending .lbl { color: rgba(255, 255, 255, .55); }

.total { padding-top: 22px; position: relative; }
.total .lbl {
  display: block; font-size: .7rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 10px;
}
.total .lbl small {
  display: block; font-size: .72rem; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: rgba(255, 255, 255, .36); margin-top: 6px;
}
.total .amt {
  display: block; font-size: clamp(2.5rem, 4vw, 3.1rem); font-weight: 800;
  line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--brand), #FFDC97 88%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.total .amt.tbc {
  font-size: 1.02rem; letter-spacing: 0; background: none;
  color: rgba(255, 255, 255, .55); -webkit-text-fill-color: rgba(255, 255, 255, .55);
}

/* Savings block — the old estimator, now fed by the real system picked */
.q-save {
  position: relative; margin-top: 22px; padding: 18px;
  border-radius: var(--r); background: rgba(248, 176, 56, .10);
  border: 1px solid rgba(248, 176, 56, .22);
}
.q-save h3 {
  font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px;
}
.q-save-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  font-size: .86rem; padding: 5px 0;
}
.q-save-row span { color: rgba(255, 255, 255, .66); }
.q-save-row b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.q-save-row b.big { font-size: 1.28rem; letter-spacing: -.02em; color: var(--brand); }
.q-save-note { margin-top: 10px; font-size: .72rem; color: rgba(255,255,255,.42); line-height: 1.55; }

.q-rail .btn { width: 100%; margin-top: 22px; }

.q-conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px;
           position: relative; list-style: none; padding: 0; }
.q-conds li {
  font-size: .7rem; font-weight: 600; padding: 5px 11px; border-radius: var(--pill);
  border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .58);
}
.q-conds li.ok { color: var(--brand-lift); border-color: rgba(255, 200, 104, .32); }
.q-conds li.tbc { color: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .26); }

.q-note {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .74rem; color: rgba(255, 255, 255, .46); line-height: 1.6; position: relative;
}
.q-note b { color: rgba(255, 255, 255, .8); font-weight: 700; }

/* --- Lead capture + assumptions --------------------------------------------- */
.q-assume { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.q-assume h3 { font-size: .8rem; font-weight: 700; color: var(--ink); margin-bottom: 11px; }
.q-assume ul { display: flex; flex-direction: column; gap: 7px; list-style: none; margin: 0; padding: 0; }
.q-assume li {
  position: relative; padding-left: 16px; font-size: .82rem;
  color: var(--text-3); line-height: 1.55;
}
.q-assume li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}

/* --- Comparison table --------------------------------------------------------- */
.cmp-table { overflow-x: auto; border: 1.5px solid var(--line); border-radius: var(--r); }
.cmp-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 1fr); }
.cmp-row + .cmp-row { border-top: 1px solid var(--line); }
.cmp-row.cmp-head { position: sticky; top: 0; background: var(--paper); }
.cmp-cell {
  padding: 12px 14px; font-size: .84rem; color: var(--text);
  display: flex; align-items: center; border-right: 1px solid var(--line);
}
.cmp-cell:last-child { border-right: 0; }
.cmp-cell.cmp-label {
  font-size: .78rem; font-weight: 700; color: var(--text-2);
  background: var(--paper); position: sticky; left: 0;
}
.cmp-row.cmp-head .cmp-cell { flex-direction: column; align-items: flex-start; gap: 2px; position: relative; }
.cmp-row.cmp-head .cmp-cell b {
  font-size: .95rem; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.cmp-row.cmp-head .cmp-cell span { font-size: .76rem; color: var(--text-3); }
.cmp-remove {
  position: absolute; right: 8px; top: 8px; width: 20px; height: 20px;
  border: 0; background: transparent; cursor: pointer;
  border-radius: 50%; display: grid; place-items: center;
  font-size: .95rem; line-height: 1; color: var(--text-3);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cmp-remove:hover { background: var(--paper-2); color: var(--ink); }
.cmp-table a { color: var(--brand-700); font-weight: 700; }
.cmp-note { margin-top: 10px; font-size: .76rem; color: var(--text-3); line-height: 1.5; }

/* --- Responsive ---------------------------------------------------------------- */
@media (max-width: 620px) {
  .q-cats { flex-direction: column; }
  .q-block > .hint { margin-left: 0; }
  .prods { grid-template-columns: 1fr; }
  .cmp-row { grid-auto-columns: minmax(124px, 1fr); }
  .brand-card { flex-wrap: wrap; }
  .brand-ico { width: 64px; height: 64px; }
  .console > .q-main { padding: 24px 18px; }
  .console .q-rail-in { padding: 24px 18px 26px; }
}
