/* Home Warranty quiz v2 - Comparisons.org
   Design: reviews.comparisons.org/windows/26700070.php (our page). Flow: 4 questions -> loading (same page).
   CSS only: hidden radios + :has(). */

:root{
  --primary:#047857;
  --primary-light:#ecfdf5;
  --primary-dark:#065f46;
  --orange:#f59e0b;
  --ink:#0f172a;
  --muted:#475569;
  --soft:#64748b;
  --line:#e2e5e8;
  --bg:#f2f4f7;
  --white:#fff;
  --hairline:rgba(60,60,67,.12);
  --fill:rgba(118,118,128,.12);
  --radius-card:20px;
  --radius-btn:14px;
  --ease:cubic-bezier(.25,.1,.25,1);
  --pad:16px;
  /* Clear shadow on answer options (Alex) */
  --option-shadow:0 1px 2px rgba(15,23,42,.06),0 6px 18px rgba(15,23,42,.09);
  --card-shadow:0 1px 2px rgba(15,23,42,.05);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{background:var(--bg);scroll-behavior:smooth}
body{
  /* Same font stack as our windows page (26700070): system font - SF Pro on Apple, Segoe UI on Windows (Inter is not loaded there) */
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,sans-serif;
  background:var(--bg);color:var(--ink);
  font-size:17px;line-height:1.4;
  -webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;
}
img,svg{display:block}
ul,ol{list-style:none}
a{color:inherit}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Header ---------- */
.header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px var(--pad);height:52px}
.logo{height:30px;width:auto}
.disclosure-link{flex:none;font-size:11px;color:rgba(100,116,139,.8);text-decoration:underline;text-decoration-color:rgba(100,116,139,.35);text-underline-offset:2px;cursor:pointer;white-space:nowrap}
/* Advertiser Disclosure - step 1 only */
body:not(:has(#q1-none:checked)) .disclosure-link{visibility:hidden}

/* ---------- Main + steps ---------- */
/* min-height keeps the footer out of the first screen on every step (AGENTS.md) */
.main{padding:0 var(--pad);min-height:calc(100svh - 52px);overflow-x:clip}
.screen-container{width:100%;max-width:560px;margin:0 auto}

.step{display:none;flex-direction:column;padding-bottom:14px}
/* Each step = all earlier questions answered + this one not yet. Back unwinds one step at a time. */
body:has(#q1-none:checked) .step--1,
body:has(#q1-none:not(:checked)):has(#q2-none:checked) .step--2,
body:has(#q1-none:not(:checked)):has(#q2-none:not(:checked)):has(#q3-none:checked) .step--3,
body:has(#q1-none:not(:checked)):has(#q2-none:not(:checked)):has(#q3-none:not(:checked)) .step--4{display:flex;animation:stepIn .35s var(--ease)}
@keyframes stepIn{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}

/* ---------- Quiz nav (Back + progress + step) ---------- */
.quiz-nav{padding:10px 0 10px;margin-bottom:20px;border-bottom:.5px solid var(--hairline)}
.quiz-nav-row{display:flex;align-items:center;justify-content:center;gap:14px;min-height:30px}
.quiz-back-btn{display:flex;align-items:center;gap:2px;font-size:16px;color:var(--primary);cursor:pointer;padding:4px 0}
.quiz-back-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.step:not(.step--1) .quiz-nav-row{justify-content:space-between}
.step:not(.step--1) .quiz-progress-bar{flex:1;max-width:160px}
.quiz-progress-bar{width:110px;height:4px;background:var(--fill);border-radius:100px;overflow:hidden}
.quiz-progress-fill{display:block;height:100%;background:var(--primary);border-radius:100px}
.quiz-step-text{font-size:12px;font-weight:600;letter-spacing:.6px;color:var(--soft);text-transform:uppercase;white-space:nowrap}
.step-num{color:var(--primary);font-weight:700}

/* ---------- Headings ---------- */
.screen-header{margin-bottom:16px}
.eyebrow{font-size:15px;font-weight:600;letter-spacing:.2px;text-transform:uppercase;color:var(--primary);margin-bottom:4px}
.screen-title{font-size:26px;font-weight:700;letter-spacing:-.5px;line-height:1.2;margin-bottom:4px;text-wrap:balance}
.screen-subtitle{font-size:15px;color:var(--muted);text-wrap:pretty}
.first-fold{padding-top:clamp(12px,4dvh,48px)}

/* ---------- Answer options ---------- */
.options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.option{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;
  min-height:158px;padding:20px 12px 16px;background:var(--white);
  border:2px solid transparent;border-radius:var(--radius-card);box-shadow:var(--option-shadow);
  cursor:pointer;transition:border-color .2s var(--ease),transform .15s var(--ease),box-shadow .2s var(--ease);
}
.option:hover{border-color:rgba(4,120,87,.35)}
.option:active{transform:scale(.97)}
.option-icon{width:62px;height:62px;display:flex;align-items:center;justify-content:center;background:var(--primary-light);border-radius:17px;color:var(--primary)}
.option-icon svg{width:50%;height:50%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Filled icons copied from the windows page */
.option-icon svg.icon-fill{fill:currentColor;stroke:none}
/* Yes / No questions: big check / X (Alex) */
.yn-icon{width:84px;height:84px;display:flex;align-items:center;justify-content:center;background:var(--primary-light);border-radius:50%;color:var(--primary)}
.yn-icon svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.option--yn .option-title{font-size:18px}
.option-title{display:block;font-size:15px;font-weight:600;letter-spacing:-.2px;line-height:1.25}
.option-sub{display:block;font-size:12.5px;font-weight:500;color:var(--soft);margin-top:3px;line-height:1.3;text-wrap:balance}
.option-check{position:absolute;top:10px;right:10px;width:20px;height:24px}
.option-check svg{width:20px;height:24px}
.shield-outline{fill:none;stroke:#c7ccd4;stroke-width:1.8}
.badge{position:absolute;top:-8px;left:12px;background:var(--primary);color:#fff;font-size:10px;font-weight:700;padding:3px 9px;border-radius:100px;text-transform:uppercase;letter-spacing:.5px;box-shadow:0 1px 3px rgba(4,120,87,.35)}

/* ---------- Trust tags ---------- */
.trust-row{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:18px}
.trust-item{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--primary-dark);background:rgba(4,120,87,.08);padding:5px 10px;border-radius:6px;white-space:nowrap}
.trust-item svg{width:12px;height:12px;fill:none;stroke:var(--primary);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- ZIP ---------- */
.zip-wrapper{position:relative;margin-bottom:12px}
.zip-icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:var(--soft);pointer-events:none}
.zip-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.zip-input{
  width:100%;height:56px;padding:0 16px 0 46px;font:500 16px/1 inherit;font-family:inherit;color:var(--ink);
  background:var(--white);border:.5px solid var(--hairline);border-radius:var(--radius-btn);outline:none;appearance:none;
  box-shadow:var(--card-shadow);transition:border-color .2s,box-shadow .2s;
}
.zip-input::placeholder{color:var(--soft);font-weight:400}
.zip-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(4,120,87,.15)}
.zip-input:valid{border-color:var(--primary)}
.zip-privacy-note{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--soft);margin:-2px 0 14px;padding-left:4px}
.zip-privacy-note svg{width:13px;height:13px;flex-shrink:0;fill:none;stroke:var(--primary);stroke-width:2.2}
.btn-find{
  width:100%;height:52px;display:flex;align-items:center;justify-content:center;gap:8px;
  font-size:17px;font-weight:600;letter-spacing:-.2px;color:#fff;text-decoration:none;
  background:var(--primary);border-radius:var(--radius-btn);transition:transform .15s var(--ease),background .2s;
}
.btn-find:hover{background:var(--primary-dark)}
.btn-find:active{transform:scale(.97)}
.btn-find svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* Disabled until the ZIP has 5 digits */
.zip-form:has(.zip-input:invalid) .btn-find{background:#c7ccd4;pointer-events:none}

/* ---------- Below the quiz (step 1 only) ---------- */
.below{margin-top:72px}
.why{margin-top:0}
.why-title{font-size:22px;font-weight:700;letter-spacing:-.4px;line-height:1.25;text-align:center;margin-bottom:16px;text-wrap:balance}
.educational-section{display:flex;flex-direction:column;gap:12px}
.edu-card{background:var(--white);border-radius:var(--radius-card);padding:20px;box-shadow:var(--card-shadow)}
.edu-icon{width:44px;height:44px;background:var(--primary-light);border-radius:11px;display:flex;align-items:center;justify-content:center;margin-bottom:12px}
.edu-icon svg{width:23px;height:23px;fill:none;stroke:var(--primary);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.edu-title{font-size:17px;font-weight:600;letter-spacing:-.2px;line-height:1.3;margin-bottom:6px}
.edu-body{font-size:14px;color:var(--muted);line-height:1.5}

/* Closing CTA: plain section + the same green button as the quiz (.btn-find) */
.cta-repeat{margin-top:36px;text-align:center}
.cta-title{font-size:22px;font-weight:700;letter-spacing:-.4px;line-height:1.25;margin-bottom:6px;text-wrap:balance}
.cta-subtitle{font-size:15px;color:var(--muted);margin-bottom:18px;text-wrap:pretty}
.btn-cta-repeat{max-width:460px;margin:0 auto}

/* ---------- Footer (approved, always at the bottom - margin-top 150px) ---------- */
.footer{margin-top:150px;background:var(--bg);border-top:1px solid var(--line);padding:28px var(--pad) 40px;text-align:center}
.footer__inner{max-width:820px;margin:0 auto}
.footer__lead{font-size:14px;font-weight:600;color:var(--ink);margin-bottom:4px}
.footer__copy{font-size:13px;color:var(--soft);margin-bottom:14px}
.footer__legal{font-size:11.5px;line-height:1.6;color:var(--soft);margin-bottom:16px}
.footer__links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 16px}
.footer__links a{font-size:12.5px;color:var(--primary);text-decoration:none}
.footer__links a:hover{text-decoration:underline}

/* ---------- Advertiser Disclosure modal (CSS only) ---------- */
.modal{position:fixed;inset:0;z-index:100;display:none;align-items:flex-end;justify-content:center}
body:has(#disclosure-toggle:checked) .modal{display:flex}
.modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.4);backdrop-filter:blur(4px);cursor:pointer}
.modal__box{position:relative;background:#fff;border-radius:20px 20px 0 0;padding:28px 20px 34px;max-width:560px;width:100%}
.modal__title{font-size:17px;font-weight:600;margin-bottom:10px;padding-right:36px}
.modal__box p{font-size:14px;color:var(--muted);line-height:1.5}
.modal__close{position:absolute;top:14px;right:14px;width:30px;height:30px;border-radius:50%;background:var(--fill);display:flex;align-items:center;justify-content:center;font-size:20px;line-height:1;color:var(--soft);cursor:pointer}

/* ---------- Loading (after the ZIP) - stays on screen for now ---------- */
.step-loading{display:none;min-height:calc(100svh - 52px);place-items:center;padding:20px 0 40px;position:relative;overflow:clip}
body:has(#submit:checked) .step{display:none!important}
body:has(#submit:checked) .step-loading{display:grid}
body:has(#submit:checked) .disclosure-link{visibility:hidden}
.loading{display:flex;flex-direction:column;align-items:center;text-align:center}

.radar{position:absolute;left:50%;top:50%;width:280px;height:280px;transform:translate(-50%,-50%);pointer-events:none}
.radar span{position:absolute;inset:0;border:1.5px solid rgba(4,120,87,.12);border-radius:50%;animation:radar 2s var(--ease) 2;opacity:0}
.radar span:nth-child(2){animation-delay:.5s}
.radar span:nth-child(3){animation-delay:1s}
@keyframes radar{from{transform:scale(.3);opacity:.8}to{transform:scale(1.5);opacity:0}}
.shield-loader{position:relative;width:72px;height:82px;margin-bottom:22px}
.shield-loader svg{width:100%;height:100%}
.shield-loader .s-path{fill:none;stroke:var(--primary);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:150;stroke-dashoffset:150;animation:drawShield 1.8s var(--ease) forwards}
.shield-loader .s-check{fill:none;stroke:var(--primary);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30;animation:drawCheck .4s var(--ease) 1.8s forwards}
@keyframes drawShield{60%{stroke-dashoffset:0;fill:transparent}to{stroke-dashoffset:0;fill:rgba(4,120,87,.08)}}
@keyframes drawCheck{to{stroke-dashoffset:0}}
.loading-title{position:relative;font-size:21px;font-weight:700;letter-spacing:-.4px;margin-bottom:14px;text-wrap:balance}
.verify-list{position:relative;display:flex;flex-direction:column;gap:12px;text-align:left}
.verify-row{display:flex;align-items:center;gap:10px;opacity:.35;animation:rowOn .3s var(--ease) forwards}
.verify-row:nth-child(1){animation-delay:.3s}
.verify-row:nth-child(2){animation-delay:1.5s}
.verify-row:nth-child(3){animation-delay:2.7s}
@keyframes rowOn{to{opacity:1}}
.verify-dot{width:22px;height:22px;border-radius:50%;background:var(--fill);display:flex;align-items:center;justify-content:center;flex-shrink:0;animation:dotDone .25s var(--ease) forwards}
.verify-row:nth-child(1) .verify-dot{animation-delay:1.3s}
.verify-row:nth-child(2) .verify-dot{animation-delay:2.5s}
.verify-row:nth-child(3) .verify-dot{animation-delay:3.7s}
@keyframes dotDone{to{background:var(--primary)}}
.verify-dot svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.verify-text{font-size:14.5px;font-weight:500;color:var(--muted)}
.scan-progress{position:relative;width:220px;height:4px;background:var(--fill);border-radius:100px;overflow:hidden;margin-top:20px}
.scan-progress span{display:block;height:100%;width:0;background:var(--primary);border-radius:100px;animation:fill 4s linear .2s forwards}
@keyframes fill{to{width:100%}}


/* ---------- Responsive ---------- */
@media (min-width:640px){
  :root{--pad:32px}
  .header{height:58px;padding:12px 32px}
  .main{min-height:calc(100svh - 58px)}
  .logo{height:34px}
  .screen-container{max-width:620px}
  .screen-title{font-size:30px}
  .screen-subtitle{font-size:16px}
  .option{min-height:176px}
  .option-icon{width:72px;height:72px;border-radius:19px}
  .option-title{font-size:16px}
  .educational-section{display:grid;grid-template-columns:1fr 1fr;gap:16px}
  .educational-section .edu-card:last-child{grid-column:1/-1}
  .zip-form{max-width:460px;margin:0 auto;width:100%}
  .modal{align-items:center;padding:20px}
  .modal__box{border-radius:20px;padding:28px 24px}
  .step-loading{min-height:calc(100svh - 58px)}
}
@media (min-width:1024px){
  .first-fold{padding-top:40px}
  .below{margin-top:96px}
}
@media (max-width:380px){
  .screen-title{font-size:23px}
  .options{gap:10px}
  .option{min-height:148px;padding:16px 8px 12px;gap:10px}
  .option-title{font-size:14px}
  .option-icon{width:58px;height:58px;border-radius:15px}
  .trust-row{gap:5px}
  .trust-item{font-size:10px;letter-spacing:.2px;padding:5px 7px;gap:4px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition:none!important}
}
