/* HomeEstimateMatch — Bathroom landing V4 */
:root {
  --navy: #0b1b34;
  --green: #047857;
  --green-dark: #03634a;
  --green-light: #22a06b;
  --emerald: #10b981;
  --emerald-50: #ecfdf5;
  --mint: #f2f7f4;
  --gray-50: #f9fafb;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --slate-300: #cbd5e1;
  --text: #0b1b34;
  --text-muted: #475569;
  --red: #b91c1c;
  --red-50: #fef2f2;
  --amber-50: #fffbeb;
  --amber-500: #f59e0b;
  --amber-800: #92400e;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(11, 27, 52, .10), 0 2px 6px rgba(11, 27, 52, .05);
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 18px;
  --header-h: 59px;     /* .site-header incl. its 1px border */
}

*, *::before, *::after { box-sizing: border-box; }
/* scrollbar-gutter: quiz steps of different heights must not shift sideways when the scrollbar comes and goes */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  /* Footer sits at the bottom even when the page is short */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body > main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 900px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--gray-200); position: relative; z-index: 2; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 58px; }
.site-header__note { font-size: 16px; font-weight: 600; color: var(--text-muted); }

.logo { display: inline-flex; }
.logo img { width: auto; height: 40px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--radius);
  font-size: 19px; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.btn--block { width: 100%; }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); color: #fff; }
.btn--primary[aria-busy="true"] { opacity: .8; cursor: progress; }
.btn--bright { background: var(--emerald); color: var(--navy); }
.btn--bright:hover { background: #0ea371; color: var(--navy); }
.btn--outline { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn--outline:hover { background: var(--emerald-50); color: var(--green-dark); }
.btn-back {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 16px; padding: 0 6px;
  background: none; border: 0; color: var(--green); font-size: 19px; font-weight: 800; cursor: pointer;
}
.btn-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.btn-link { background: none; border: 0; padding: 0; color: var(--green); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Card, progress, fields */
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px 22px 22px; }
.progress__label { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.progress { height: 7px; border-radius: 99px; background: var(--gray-200); overflow: hidden; margin-bottom: 22px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s ease; }
.step__title { font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; margin-bottom: 18px; }
.step__title:focus { outline: none; }
.step__subtitle { font-size: 18px; color: var(--text-muted); margin: -8px 0 18px; }
.step__note { margin-top: 14px; text-align: center; font-size: 15px; color: var(--text-muted); }

.field { margin-bottom: 18px; }
.field__label { display: block; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.field__label small { font-size: inherit; font-weight: 500; color: var(--text-muted); }
.input {
  display: block; width: 100%; min-height: 56px; padding: 12px 16px;
  font-size: 19px; background: #fff;
  border: 2px solid var(--slate-300); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.input::placeholder { color: #7b8494; }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(4, 120, 87, .15); }
.input[aria-invalid="true"] { border-color: var(--red); background: var(--red-50); }
.field__error { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; color: var(--red); font-size: 16px; font-weight: 700; line-height: 1.35; }
.field__error::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form-error { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--red-50); color: var(--red); font-weight: 700; font-size: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Check list */
.checklist { display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; }
.checklist li::before {
  content: ""; flex: none; width: 24px; height: 24px; 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='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 12.5 3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Hero */
.hero { position: relative; background: var(--mint); overflow: hidden; padding: 26px 0 28px; }
.hero__photo { position: absolute; top: 0; left: 0; right: 0; height: 300px; }
/* The section's mint shows through the photo: lower --hero-photo-opacity = paler photo */
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; opacity: var(--hero-photo-opacity, .8); }
.hero__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(242, 247, 244, .55), rgba(242, 247, 244, .7) 60%, var(--mint));
}
.hero__grid { position: relative; display: grid; grid-template-areas: "intro" "form" "benefits" "disclosure"; gap: 20px; }
.hero__intro { grid-area: intro; }
.hero__form { display: contents; }
.hero__form .card { grid-area: form; }
.hero__disclosure { grid-area: disclosure; }
.hero__benefits { grid-area: benefits; }
.hero h1 { font-size: clamp(26px, 7.9vw, 34px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; margin-bottom: 10px; }
.hero__lead { font-size: 17px; color: #334155; }
.hero .step__title { font-size: clamp(22px, 6.3vw, 26px); }
.hero__form .card { margin: 0 -6px; }
.hero__disclosure { font-size: 16px; color: var(--text-muted); }

/* Sections */
.section { padding: 48px 0; }
.section--mint { background: var(--mint); }
.section__title { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-bottom: 26px; }

.how__list { display: grid; gap: 24px; }
.how__item { display: flex; gap: 16px; }
.how__num {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  color: #fff; font-weight: 800; font-size: 18px;
}
.how__num--1 { background: var(--navy); }
.how__num--2 { background: var(--green); }
.how__num--3 { background: var(--gray-500); }
.how__item h3 { font-size: 20px; font-weight: 800; line-height: 1.25; margin-bottom: 4px; }
.how__item p { color: var(--text-muted); }

.includes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.includes__item { display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: 14px; padding: 18px 16px; font-size: 17px; font-weight: 800; line-height: 1.25; }
.includes__item svg { width: 22px; height: 22px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.faq__list { border-top: 1px solid var(--gray-200); }
.faq__item { padding: 18px 0; border-bottom: 1px solid var(--gray-200); }
.faq__item dt { font-size: 19px; font-weight: 800; line-height: 1.3; margin-bottom: 6px; }
.faq__item dd { color: var(--text-muted); }

.cta { background: var(--navy); color: #fff; text-align: center; padding: 40px 0; }
.cta h2 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; margin-bottom: 12px; }
.cta p { color: #dbe3ee; margin-bottom: 22px; }
.cta .btn { width: 100%; }

/* Footer */
.site-footer { background: var(--gray-50); padding: 32px 0 40px; font-size: 15px; color: var(--text-muted); }
.site-footer__top { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.site-footer__top .logo { align-self: flex-start; }
.site-footer__nav { display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
.site-footer__legal { margin-bottom: 14px; line-height: 1.6; }

/* Quiz mode: landing hidden, quiz full-screen under the header */
body.is-quiz .hero, body.is-quiz .landing { display: none; }
body.is-quiz main { display: flex; flex-direction: column; }
/* At least one screen tall, so the footer stays below the fold and does not jump as step heights change.
   svh, not dvh: dvh changes when the mobile address bar hides, which would itself make the page jump. */
.quiz { flex: 1 0 auto; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); padding: 22px 0 40px; background: #fff; }
.quiz--tinted { background: var(--mint); }
.quiz__inner { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
.quiz .step__title { font-size: 28px; }
.banner { margin-bottom: 20px; padding: 14px 16px; border-radius: 14px; background: var(--emerald-50); color: var(--green); font-size: 18px; font-weight: 700; line-height: 1.4; }

.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 60px; padding: 14px 18px;
  text-align: left; font-size: 19px; font-weight: 700; line-height: 1.25;
  background: #fff; border: 2px solid var(--gray-200); border-radius: 14px; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.option:hover { border-color: var(--green); }
.option__icon { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--gray-400); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.option[aria-pressed="true"] { border-color: var(--green); background: var(--emerald-50); }
.option[aria-pressed="true"] .option__icon { stroke: none; }
.options--tiles { grid-template-columns: 1fr 1fr; }
.options--tiles .option { flex-direction: column; justify-content: center; text-align: center; min-height: 130px; font-size: 20px; font-weight: 800; }
.options--tiles .tile-icon { width: 32px; height: 32px; fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.options--tiles .tile-icon--green { stroke: var(--green); }

.ac { position: relative; }
.ac__list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.ac__item { padding: 14px 16px; font-size: 18px; cursor: pointer; border-bottom: 1px solid var(--gray-200); }
.ac__item:last-child { border-bottom: 0; }
.ac__item[aria-selected="true"], .ac__item:hover { background: var(--gray-50); }
.ac__item strong { font-weight: 800; }
.address-loc { margin: -4px 0 20px; font-size: 18px; color: var(--text-muted); }

.consent { margin: 4px 0 18px; padding: 14px 16px; border: 2px dashed var(--amber-500); border-radius: 14px; background: var(--amber-50); font-size: 15px; line-height: 1.55; color: #334155; }
.consent__draft { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--amber-800); }
.consent--final { border: 1px solid var(--gray-200); background: var(--gray-50); }

.screen { text-align: center; padding-top: 28px; }
.screen__icon { width: 64px; height: 64px; margin: 0 auto 18px; fill: none; stroke: #475569; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.screen h2 { font-size: 30px; line-height: 1.2; font-weight: 800; margin-bottom: 14px; }
.screen p { font-size: 18px; color: #334155; margin-bottom: 14px; }
.screen .btn { width: 100%; margin-top: 10px; }

/* Thank-you page */
.thanks { background: var(--mint); padding: 40px 0 56px; }
.thanks__inner { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.thanks__check { width: 72px; height: 72px; margin: 0 auto 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='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 42px no-repeat; }
.thanks h1 { font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }
.thanks__lead { font-size: 18px; color: #334155; margin-bottom: 26px; }
.thanks .card { text-align: left; padding: 24px 22px; box-shadow: none; }
.thanks .card h2 { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
.thanks .card li { font-size: 18px; color: #334155; margin-bottom: 10px; padding-left: 14px; position: relative; }
.thanks .card li::before { content: "•"; position: absolute; left: 0; }

/* Legal pages */
.legal { padding: 40px 0 56px; }
.legal h1 { font-size: 34px; font-weight: 800; margin-bottom: 18px; }
.legal p { margin-bottom: 14px; color: #334155; }
.legal .draft { padding: 12px 14px; border: 2px dashed var(--amber-500); border-radius: 12px; background: var(--amber-50); color: var(--amber-800); font-weight: 700; }
.legal h2 { font-size: 22px; font-weight: 800; line-height: 1.3; margin: 30px 0 10px; }
.legal h3 { font-size: 18px; font-weight: 800; margin: 22px 0 8px; }
.legal ul, .legal ol { margin: 0 0 14px; padding-left: 22px; color: #334155; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal ol.plain { list-style: none; padding-left: 0; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--gray-500); }
.legal strong { color: var(--text); }
.legal__updated { font-size: 15px; color: var(--gray-500) !important; }
/* Gaps the client still has to fill in; must not survive to production */
mark.todo { background: #fde68a; color: #78350f; font-weight: 700; padding: 1px 4px; border-radius: 4px; }
.consent p + p { margin-top: 8px; }
/* TCPA checkbox: the whole consent text is its label, so a tap anywhere on it ticks the box */
.consent__label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.consent__label input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); cursor: pointer; }
.consent__para { display: block; }
.consent__para + .consent__para { margin-top: 8px; }
.consent .field__error { margin: 8px 0 0 34px; }

/* Opt-out / Do Not Sell form */
.optout-form { margin-top: 28px; padding: 24px 22px; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: var(--gray-50); }
.optout-form fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.optout-form .field__label small { font-weight: 500; color: var(--text-muted); }
.optout-form__hint { font-size: 16px; margin-bottom: 14px !important; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; font-size: 17px; font-weight: 600; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
select.input { appearance: none; padding-right: 44px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 20px no-repeat; }
.gpc-notice { padding: 12px 14px; border-radius: 12px; background: var(--emerald-50); color: var(--green) !important; }
.optout-done { margin-top: 28px; padding: 24px 22px; border-radius: var(--radius-lg); background: var(--emerald-50); }
.optout-done h2 { margin-top: 0 !important; }

/* Desktop */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero__grid { max-width: 700px; }
  .includes__item { flex-direction: row; align-items: center; }
  .includes__grid { grid-template-columns: repeat(2, 1fr); }
  .cta .btn { width: auto; }
  .site-footer__nav { flex-direction: row; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
}

@media (min-width: 900px) {
  :root { --gutter: 40px; --header-h: 77px; }
  .site-header__inner { min-height: 76px; }
  .site-header__note { font-size: 16px; }
  .site-header .logo img { height: 48px; }

  .hero { padding: 72px 0 80px; }
  .hero__photo { right: 32%; bottom: 0; height: auto; }
  .hero__photo img { object-position: left center; }
  .hero__photo::after { background: linear-gradient(to right, transparent 72%, var(--mint)), linear-gradient(to bottom, transparent 70%, var(--mint)); }
  .hero__grid {
    max-width: 1240px;
    grid-template-columns: minmax(0, 1fr) min(568px, 49%);
    grid-template-areas: "intro form" "benefits form" ". form";
    grid-template-rows: auto auto 1fr;
    column-gap: 56px; row-gap: 24px;
  }
  .hero h1 { font-size: clamp(38px, 3.65vw, 52px); line-height: 1.08; margin-bottom: 26px; padding-top: 6px; }
  .hero__lead { font-size: 18px; max-width: 560px; }
  .hero__form { display: block; grid-area: form; }
  .hero__form .card { margin: 0; padding: 32px 34px 28px; }
  .hero__disclosure { margin: 18px 20px 0; text-align: center; font-size: 14px; }
  .checklist li { font-size: 17px; }

  .section { padding: 72px 0 80px; }
  .section__title { font-size: 40px; text-align: center; margin-bottom: 44px; }
  .how__list { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .how__item { flex-direction: column; gap: 14px; background: var(--gray-50); border-radius: 16px; padding: 28px; }
  .how__num { width: 44px; height: 44px; border-radius: 10px; }
  .how__item h3 { font-size: 22px; margin-bottom: 8px; }
  .includes__grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .includes__item { flex-direction: column; align-items: flex-start; padding: 22px 22px 26px; }
  .faq__item dt { font-size: 20px; }

  .cta { padding: 72px 0; }
  .cta h2 { font-size: 40px; }
  .cta p { font-size: 19px; }

  .site-footer__top { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .site-footer__nav { justify-content: flex-end; gap: 8px 22px; }

  .quiz { padding-top: 48px; }
  .quiz .step__title { font-size: 34px; }
  .thanks h1 { font-size: 44px; }
}

/* Wide desktop: logo and every footer link on one line */
@media (min-width: 1140px) {
  .site-footer__nav { flex-wrap: nowrap; white-space: nowrap; }
}
