/* ==========================================================================
   Total Home Water Co — ad quiz funnel
   Deliberately NOT the main site's look. Friendly consumer styling: Poppins,
   a sky / powder blue palette, soft rounded tiles, one deeper-blue button.
   Standalone file so the page stays fast for paid traffic.
   ========================================================================== */
:root{
  --ink:#12283F;            /* text: soft navy */
  --accent:#5BB0EA;         /* sky blue (close to the logo droplet) */
  --accent-dark:#1B7CC7;
  --tint:#E8F3FC;           /* powder blue */
  --bg:#F3F8FD;
  --cta:#1677C4;            /* deeper blue: the one loud button, no orange */
  --cta-hover:#0F65AB;
  --green:#2FA36B;          /* only used for the small tick marks */
  --line:#D9E6F2;
  --gray-400:#9AA8B6;
  --gray-500:#6B7A8C;
  --gray-600:#46586B;
  --radius:16px;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;min-height:100vh;display:flex;flex-direction:column;
  font-family:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  font-size:16px;line-height:1.5;color:var(--ink);background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
svg{fill:currentColor}
a{color:inherit}
.hp{position:absolute;left:-9999px;height:0;overflow:hidden}

/* ---------- Header (black: the logo artwork has a solid black plate) ---------- */
.qhead{background:#000;display:flex;align-items:center;justify-content:space-between;padding:12px 18px}
.qhead__call{
  display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none;
  font-size:14px;font-weight:600;background:var(--accent);border-radius:999px;padding:9px 15px;
}
.qhead__call svg{width:14px;height:14px}

/* ---------- Progress ---------- */
.qbar{height:8px;background:#D9E6F2}
.qbar__fill{display:block;height:100%;width:0;background:var(--accent);border-radius:0 999px 999px 0;transition:width .35s ease}

/* ---------- Layout: white card on a soft blue page ---------- */
.qmain{flex:1;width:100%;max-width:560px;margin:0 auto;padding:16px 14px 28px}
.quiz{
  position:relative;background:#fff;border-radius:22px;padding:18px 16px 24px;
  box-shadow:0 12px 34px rgba(18,40,63,.09);
}
.screen{display:none}
.screen.is-active{display:block;animation:in .25s ease}
@keyframes in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.qback{
  display:inline-flex;align-items:center;gap:3px;margin:0 0 4px -4px;padding:6px 8px;
  background:none;border:0;font:inherit;font-size:13.5px;font-weight:500;color:var(--gray-500);cursor:pointer;
}
.qback svg{width:16px;height:16px}
.qback[hidden]{display:none}

.qstep{
  display:table;margin:2px auto 12px;padding:5px 13px;border-radius:999px;
  background:var(--tint);color:var(--accent-dark);font-size:12px;font-weight:600;letter-spacing:.02em;
}
.qstep:empty{display:none}

.q__title{
  margin:4px 0 10px;text-align:center;font-size:clamp(24px,6.4vw,32px);font-weight:700;
  letter-spacing:-.02em;line-height:1.18;text-wrap:balance;
}
.q__title .hl{color:var(--accent-dark)}
.q__sub{margin:0 auto 18px;max-width:42ch;text-align:center;font-size:15px;color:var(--gray-600)}
.q__sub a{color:var(--accent-dark);font-weight:600}
.q__label{margin:20px 0 12px;text-align:center;font-size:16px;font-weight:600}
.q__fine{margin:14px 0 0;text-align:center;font-size:12px;color:var(--gray-500)}
.q__fine a{color:var(--gray-600)}

/* ---------- Answer tiles ---------- */
.opts{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:18px auto 0;max-width:380px}
.opts--3{grid-template-columns:repeat(3,1fr);gap:10px;max-width:none}
.q__label + .opts{margin-top:0}
.opt{display:block;min-width:0}
.opt input{position:absolute;opacity:0;width:0;height:0}
.opt__box{
  position:relative;aspect-ratio:1/1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:12px;padding:12px 10px;text-align:center;
  border:2px solid var(--line);border-radius:var(--radius);background:#fff;
  font-size:15px;font-weight:600;line-height:1.25;cursor:pointer;
  box-shadow:0 3px 10px rgba(18,40,63,.05);
  transition:border-color .12s ease,background-color .12s ease,transform .12s ease,box-shadow .12s ease;
}
.opts--3 .opt__box{font-size:13px;gap:9px;padding:8px 5px}
/* icon sits in a soft blue disc */
.opt__box svg{
  box-sizing:content-box;width:28px;height:28px;padding:14px;flex:0 0 auto;
  border-radius:50%;background:var(--tint);color:var(--accent-dark);
  transition:background-color .12s ease,color .12s ease;
}
.opts--3 .opt__box svg{width:22px;height:22px;padding:11px}
.opt__box:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 8px 18px rgba(18,40,63,.09)}
.opt input:checked + .opt__box{border-color:var(--accent);background:var(--tint)}
.opt input:checked + .opt__box svg{background:var(--accent);color:#fff}
/* tick badge on the chosen tile */
.opt input:checked + .opt__box::after{
  content:"";position:absolute;top:8px;right:8px;width:22px;height:22px;border-radius:50%;
  background:var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.6 16.6L5 12l1.4-1.4 3.2 3.2 8-8L19 7.2z'/%3E%3C/svg%3E") center/15px no-repeat;
}
.opts--3 .opt input:checked + .opt__box::after{top:5px;right:5px;width:18px;height:18px;background-size:12px}
.opt input:focus-visible + .opt__box{box-shadow:0 0 0 4px rgba(91,176,234,.3)}
.opt--center{grid-column:1 / -1;justify-self:center;width:calc(50% - 6px)}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:58px;padding:15px 24px;border-radius:14px;border:2px solid transparent;
  background:var(--cta);color:#fff;font:inherit;font-size:18px;font-weight:700;
  cursor:pointer;text-decoration:none;box-shadow:0 8px 20px rgba(22,119,196,.30);
  transition:background-color .12s ease,transform .12s ease;
}
.btn:hover{background:var(--cta-hover);transform:translateY(-1px)}
.btn:disabled{opacity:.6;cursor:default;transform:none}
.btn--block{display:flex;width:100%}
.btn--ghost{background:#fff;color:var(--ink);border-color:var(--line);box-shadow:none}
.btn--ghost:hover{background:#fff;border-color:var(--accent)}

.q__continue{position:sticky;bottom:12px;margin:16px auto 0;max-width:380px}
.q__continue[hidden]{display:none}

/* ---------- Price reveal ---------- */
.price__label{
  display:table;margin:6px auto 10px;padding:6px 14px;border-radius:999px;
  background:var(--green);color:#fff;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
}
.price__amount{
  margin:0 0 4px;display:flex;align-items:baseline;justify-content:center;gap:8px;flex-wrap:wrap;
  font-size:clamp(54px,16vw,78px);font-weight:700;letter-spacing:-.03em;line-height:1.05;color:var(--ink);
}
.price__amount small{font-size:15px;font-weight:600;letter-spacing:0;color:var(--gray-500)}
.price__amount.is-range{font-size:clamp(34px,9.6vw,50px)}
.price__what{margin:0 0 18px;text-align:center;font-size:15px;font-weight:500;color:var(--gray-600)}
.price__list{list-style:none;margin:0 0 16px;padding:14px 16px;background:var(--bg);border-radius:var(--radius)}
.price__list li{position:relative;padding:7px 0 7px 32px;font-size:14.5px;font-weight:500}
.price__list li::before{
  content:"";position:absolute;left:0;top:8px;width:21px;height:21px;border-radius:50%;
  background:var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.6 16.6L5 12l1.4-1.4 3.2 3.2 8-8L19 7.2z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.price__why{
  margin:0 0 20px;padding:12px 14px;border-radius:12px;background:var(--tint);
  font-size:13.5px;color:var(--gray-600);
}
.price__why:empty{display:none}

/* ---------- Contact ---------- */
.field{margin-bottom:13px}
.field label{display:block;margin-bottom:6px;font-size:13.5px;font-weight:600}
.input{
  width:100%;padding:14px 15px;border:2px solid var(--line);border-radius:12px;
  font:inherit;font-size:16px;color:var(--ink);background:#FAFCFE;
}
.input::placeholder{color:var(--gray-400)}
.input:focus{outline:none;border-color:var(--accent);background:#fff;box-shadow:0 0 0 4px rgba(91,176,234,.16)}
.input.is-error{border-color:#DC2626}

.consent{display:flex;gap:11px;align-items:flex-start;margin:4px 0 18px;cursor:pointer}
.consent input{position:absolute;opacity:0;width:0;height:0}
.consent__box{
  flex:0 0 auto;width:22px;height:22px;margin-top:1px;border:2px solid var(--gray-400);border-radius:6px;
  display:flex;align-items:center;justify-content:center;background:#fff;
}
.consent__box svg{width:14px;height:14px;fill:#fff;opacity:0}
.consent input:checked + .consent__box{background:var(--accent);border-color:var(--accent)}
.consent input:checked + .consent__box svg{opacity:1}
.consent input:focus-visible + .consent__box{box-shadow:0 0 0 4px rgba(91,176,234,.3)}
.consent.is-error .consent__box{border-color:#DC2626}
.consent__text{font-size:11.5px;color:var(--gray-500);line-height:1.5}

/* ---------- Trust row + footer ---------- */
.qtrust{
  list-style:none;margin:18px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;
  font-size:12.5px;font-weight:600;color:var(--ink);
}
.qtrust li{display:flex;align-items:center;gap:7px;background:#fff;border-radius:999px;padding:7px 13px 7px 9px;box-shadow:0 2px 8px rgba(18,40,63,.06)}
.qtrust li::before{
  content:"";width:17px;height:17px;border-radius:50%;
  background:var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.6 16.6L5 12l1.4-1.4 3.2 3.2 8-8L19 7.2z'/%3E%3C/svg%3E") center/12px no-repeat;
}
.qfoot{padding:14px 20px 22px;text-align:center;font-size:11.5px;color:var(--gray-500)}
.qfoot a{color:var(--gray-600)}

@media (min-width:640px){
  .qhead{padding:14px 32px}
  .qmain{padding-top:36px}
  .quiz{padding:26px 30px 32px}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}

/* ---------- Headline above the quiz (first question only) ---------- */
.qintro{text-align:center;padding:6px 6px 16px}
.qintro[hidden]{display:none}
.qintro__title{
  margin:0 0 8px;font-size:clamp(25px,6.9vw,36px);font-weight:700;letter-spacing:-.02em;line-height:1.16;
  text-wrap:balance;color:var(--ink);
}
.qintro__title .hl{color:var(--accent-dark)}
.qintro__sub{margin:0 auto;max-width:40ch;font-size:15px;font-weight:500;color:var(--gray-600)}

/* Under-sink RO has no published number yet, so the "price" slot shows the system name */
.price__amount.is-text{font-size:clamp(28px,8vw,40px);letter-spacing:-.02em;line-height:1.15;text-align:center;margin-bottom:8px}
.price__amount small[hidden]{display:none}

/* ---------- Below the quiz: reviews + problem / agitate / solution ---------- */
html{scroll-behavior:smooth}
.qmore{margin-top:34px;display:grid;gap:16px}
.qmore[hidden]{display:none}
.qsec{text-align:center}
.qsec--card{background:#fff;border-radius:22px;padding:24px 20px 26px;box-shadow:0 12px 34px rgba(18,40,63,.07)}
.qsec__label{
  display:inline-block;margin-bottom:12px;padding:5px 13px;border-radius:999px;
  background:var(--tint);color:var(--accent-dark);font-size:12px;font-weight:600;letter-spacing:.02em;
}
.qsec--card .qsec__label{background:var(--bg)}
.qsec__title{margin:0 0 10px;font-size:clamp(21px,5.6vw,27px);font-weight:700;letter-spacing:-.02em;line-height:1.2;text-wrap:balance}
.qsec__title .hl{color:var(--accent-dark)}
.qsec p{margin:0 auto;max-width:46ch;font-size:15px;color:var(--gray-600)}
.qsec--solution .price__list{text-align:left;margin:14px 0 18px}


/* ---------- Problem card: stat, before/after photo, pain list ---------- */
.qsec__img{display:block;width:100%;height:auto;border-radius:16px;margin:14px 0 16px}
.painlist{list-style:none;margin:14px 0 14px;padding:0;text-align:left;display:grid;gap:10px}
.painlist li{position:relative;padding-left:32px;font-size:14.5px;font-weight:500;color:var(--ink)}
.painlist li::before{
  content:"";position:absolute;left:0;top:1px;width:21px;height:21px;border-radius:50%;
  background:var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.3 7.1l-1.4-1.4L12 10.6 7.1 5.7 5.7 7.1l4.9 4.9-4.9 4.9 1.4 1.4 4.9-4.9 4.9 4.9 1.4-1.4-4.9-4.9z'/%3E%3C/svg%3E") center/12px no-repeat;
}
.qsec .qsec__kicker{font-weight:600;color:var(--ink)}

/* Reviews now close the page; a last button under them so the page never dead-ends */
.qmore__cta{max-width:380px;margin:4px auto 0}

.qintro__sub strong{color:var(--ink);font-weight:700}

/* Line between the quiz card and the trust pills (first question only) */
.qnudge{margin:22px auto 0;max-width:44ch;text-align:center;font-size:13.5px;font-weight:600;color:var(--ink)}
.qnudge[hidden]{display:none}
.qnudge + .qtrust{margin-top:14px}

/* "The fix": city and well side by side */
.pricepair{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 4px}
.pricepair__item{
  display:flex;flex-direction:column;gap:4px;padding:16px 12px 14px;text-align:center;
  background:var(--tint);border-radius:14px;
}
.pricepair__who{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent-dark)}
.pricepair__amt{font-size:clamp(28px,8vw,36px);font-weight:700;letter-spacing:-.03em;line-height:1.05;color:var(--ink)}
.pricepair__what{font-size:12.5px;color:var(--gray-600);line-height:1.4}

/* Buttons: no longer edge to edge. Centred, sized to their label, with a floor
   so they still read as the main action and stay an easy thumb target. */
.btn--block{display:inline-flex;width:auto;min-width:220px;max-width:100%;padding-left:30px;padding-right:30px}
.screen .btn--block,.qsec .btn--block,.qmore__cta{display:flex;width:max-content;margin-left:auto;margin-right:auto}
.q__continue{width:max-content;left:0;right:0}

/* Free water test line on the price screen (only for people not yet tested) */
.price__test{
  display:flex;gap:10px;align-items:flex-start;margin:0 0 18px;padding:12px 14px;
  border-radius:12px;background:#fff;border:2px solid var(--line);font-size:13.5px;color:var(--gray-600);text-align:left;
}
.price__test[hidden]{display:none}
.price__test svg{width:20px;height:20px;flex:0 0 auto;color:var(--accent-dark);margin-top:1px}
.price__test strong{color:var(--ink)}

/* Progress bar now sits inside the quiz container */
.qz > .qbar{border-radius:999px;overflow:hidden;margin:0 0 14px}

/* Every answer tile in a row is the exact same size, whatever its label length */
.opts{align-items:stretch;grid-auto-rows:1fr}
.opt{display:flex}
.opt__box{flex:1;width:100%}
