:root {
  --ink: #0f1f19;
  --muted: #4d5b55;
  --line: #c9d1cc;
  --bg: #f3f1ea;
  --card: #fbfaf6;
  --brand-dark: #16432f;
  --brand: #1a7a4f;
  --brand-tint: #e3efe7;
  --error: #b3261e;
  --radius: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}

.bar {
  background: var(--card);
  color: var(--brand-dark);
  border-bottom: 3px solid var(--brand);
}
.bar-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--heading-ink, var(--brand-dark));
}
.brand-mark {
  /* As tall as the wordmark needs; a wide mark (SherpaQuote's peak) keeps its shape. */
  height: 36px;
  width: auto;
  max-width: 72px;
  flex: none;
}
.brand-accent {
  color: var(--accent, var(--brand));
}
.bar-note {
  font-size: 14px;
  text-align: right;
  color: var(--muted);
  max-width: 150px;
}

.card {
  position: relative; /* the sending scene (loaders.js) covers it */
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  padding: 24px 20px 32px;
  min-height: 70vh;
}
h1 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.8px;
  margin: 8px 0 10px;
}
h2 {
  font-size: 18px;
  margin: 28px 0 10px;
}
.lede {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 22px;
}
.fine {
  color: var(--muted);
  font-size: 14px;
}
.center {
  text-align: center;
}

.progress {
  margin-bottom: 12px;
}
.progress-label {
  margin: 0 0 8px;
  font-size: 15px;
}
.progress-track {
  display: flex;
  gap: 6px;
}
.progress-track i {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #d7ddd9;
}
.progress-track i.done {
  background: #7fae93;
}
.progress-track i.on {
  background: var(--brand);
}

.panel {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}
.field {
  display: block;
  margin-bottom: 14px;
}
.field > span {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}
.field em {
  font-weight: 400;
  color: var(--muted);
  font-style: normal;
}
input:not([type="radio"]):not([type="checkbox"]),
select {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
input:focus-visible,
select:focus-visible,
.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 1px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) {
  .row {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 28px;
  }
}

.choices {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
}
.choice small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 15px;
  margin-top: 2px;
}
.choice:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.choice input {
  accent-color: var(--brand);
  width: 20px;
  height: 20px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  margin: 8px 0 16px;
}
.check input {
  accent-color: var(--brand);
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}
.consent span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.seg {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.seg legend {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  padding: 0;
}
.seg label {
  display: block;
}
.seg input {
  position: absolute;
  opacity: 0;
}
.seg span {
  display: block;
  text-align: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}
.seg input:checked + span {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.seg input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
}

.btn {
  font: inherit;
  font-size: var(--btn-font, 18px);
  font-weight: 600;
  padding: var(--btn-pad, 15px) var(--btn-px, var(--btn-pad, 15px));
  border-radius: var(--radius);
  border: 1px solid var(--brand-dark);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  width: 100%;
}
.btn.primary {
  background: var(--btn, var(--brand));
  border-color: var(--btn, var(--brand));
  color: var(--btn-ink, #fff);
  /* In the question's button row: first on screen, whatever the markup order (Back is a link under it). */
  order: -1;
  align-self: var(--btn-align, stretch);
  width: var(--btn-w, 100%);
  min-width: var(--btn-min, 0);
  justify-self: var(--btn-justify, stretch);
}
.btn.primary:disabled {
  opacity: 0.6;
  cursor: progress;
}
.btn.link {
  border: 0;
  background: none;
  color: var(--brand);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
/* Back: a text link, so it never looks like one of the answers. */
.nav .btn[data-back] {
  align-self: flex-start;
  width: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  padding: 8px 2px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.nav .btn[data-back]::before {
  content: "← ";
}
.nav .btn[data-back]:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}
.nav.single {
  grid-template-columns: 1fr;
  margin-top: 6px;
}
.wide {
  margin-top: 4px;
}

.summary {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f1f3f0;
  margin: 0 0 16px;
}
/* Consent that's agreed to by pressing the button (src/consent.ts mode "submit"): directly below it, before Back. */
.consent-below {
  order: -1;
  margin-bottom: 4px;
}
.consent-text {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.consent-text a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.providers {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-tint);
  font-size: 14px;
}
.providers summary {
  cursor: pointer;
  font-weight: 600;
}
.consent-below .providers {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.props {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 16px;
}
.props li {
  padding-left: 14px;
  border-left: 3px solid var(--brand-tint);
}
.props b {
  display: block;
}
.props span {
  color: var(--muted);
}

.err {
  color: var(--error);
  font-size: 14px;
  margin-top: 6px;
}
input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--error);
}

.recap dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 16px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.recap dt {
  color: var(--muted);
  font-size: 14px;
}
.recap dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.recap .next {
  color: var(--muted);
  margin-top: 14px;
}

.offers {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.offers a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.offers a span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.foot {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px 40px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.foot a {
  color: var(--muted);
  margin-left: 8px;
}

/* ---- engine v1: config-driven controls ---- */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body {
  font-family: var(--font);
}
.kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
h1:focus {
  outline: none;
}
.fields {
  display: grid;
  gap: 14px;
}
.fields .field {
  margin-bottom: 0;
}
.tiles {
  display: grid;
  /* auto-fit: two answers fill the row as two halves instead of leaving an empty third slot. */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.more-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}
.tiles.dense {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}
.tile {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  min-height: 56px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.tile small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.tile:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-tint) 55%, #fff);
}
.tile.on {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.tile:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 1px;
}
.tiles[aria-invalid="true"] .tile {
  border-color: var(--error);
}
.progress-track i.fill {
  flex: none;
  background: var(--brand);
  transition: width 0.25s ease;
}
.nav.solo {
  grid-template-columns: 1fr;
}
.btn.primary {
  background: var(--btn, var(--brand));
  border-color: var(--btn, var(--brand));
}

/* ---- landing page (funnel.landing): only on the first question of funnels that have one ---------- */
/* Everything is under body.landing-hero / body.landing-card or landing-only classes, so funnels without a landing
   page are unchanged. */
body.landing-hero .card {
  max-width: none;
  min-height: 0;
  background: var(--brand-dark);
  color: #fff;
  padding: 36px max(20px, calc((100% - 520px) / 2)) 40px;
}
body.landing-hero .card h1 {
  font-size: clamp(32px, 8vw, 44px);
  color: #fff;
}
body.landing-hero .card .lede {
  color: rgb(255 255 255 / 0.82);
  font-size: 20px;
}
body.landing-hero .card .field > span {
  color: rgb(255 255 255 / 0.85);
}
body.landing-hero .card .err {
  color: #ffd2cc;
}
body.landing-hero .card .btn.primary {
  background: var(--btn, var(--accent, var(--brand)));
  border-color: var(--btn, var(--accent, var(--brand)));
  font-size: var(--btn-font, 20px);
  padding: var(--btn-pad, 17px) var(--btn-px, var(--btn-pad, 17px));
}
.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
}
.badges li {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
}
.badges li::before {
  content: "✓ ";
}
.quote-visual {
  margin: 26px auto 0;
  max-width: 300px;
  background: #fff;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.25);
}
.quote-visual ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quote-visual li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 6px;
  border-bottom: 1px solid #e8ebe9;
  color: var(--ink);
}
.quote-visual li:last-child {
  border-bottom: 0;
}
.quote-visual .q-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--brand-tint);
  flex: none;
}
.quote-visual .q-name {
  height: 10px;
  border-radius: 5px;
  background: #dfe4e1;
}
.quote-visual b {
  margin-left: auto;
  font-size: 15px;
}
.landing-more {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 20px 12px;
}
.landing-more[hidden] {
  display: none;
}
.lp-section {
  padding: 26px 0 6px;
}
.lp-section h2 {
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--brand-dark);
}
.lp-section ul.cards,
.lp-section ol.steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.lp-section ul.cards li,
.lp-section ol.steps li {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}
.lp-section ol.steps {
  counter-reset: lp;
}
.lp-section ol.steps li {
  counter-increment: lp;
  position: relative;
  padding-left: 62px;
}
.lp-section ol.steps li::before {
  content: counter(lp);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.lp-section li strong {
  font-size: 17px;
}
.lp-section li p,
.lp-section details p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.lp-faq details {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
}
.lp-faq summary {
  font-weight: 600;
  cursor: pointer;
}
.lp-cta {
  padding-bottom: 10px;
}

/* ---- brand logos ------------------------------------------------------------------------------- */
.brand-wide {
  height: 38px;
  width: auto;
  display: block;
}
.brand-narrow {
  display: none;
}
@media (max-width: 340px) {
  .bar.has-wide .brand-wide {
    display: none;
  }
  .bar.has-wide .brand-narrow {
    display: block;
  }
}
@media (max-width: 480px) {
  .bar.has-wide .bar-note {
    display: none;
  }
}
.foot-mark {
  width: 22px;
  height: 22px;
  vertical-align: -6px;
  margin-right: 6px;
}

/* ---- landing page, "card" style: light page, kicker + big headline, the question in a white card, art -- */
body.landing-card .bar {
  background: transparent;
  border-bottom: 0;
}
body.landing-card .bar-inner {
  justify-content: center;
  max-width: 1120px;
}
body.landing-card .bar-note {
  display: none;
}
body.landing-card .card {
  max-width: 1120px;
  min-height: 0;
  background: transparent;
  padding: 8px 20px 28px;
}
body.landing-card #steps .step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
body.landing-card #steps .step .kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 12px 0 4px;
}
body.landing-card #steps .step h1 {
  font-size: clamp(40px, 11vw, 64px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 6px 0 14px;
}
body.landing-card #steps .step .lede {
  color: var(--brand-dark);
  font-size: clamp(20px, 5.2vw, 24px);
  line-height: 1.3;
  margin: 0 0 22px;
}
.lp-form {
  background: var(--card);
  border: 1px solid rgb(0 0 0 / 0.06);
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 0.06);
}
.lp-form .field > span {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-dark);
}
.lp-form .nav {
  margin-top: 4px;
}
.lp-form .btn.primary {
  background: var(--btn, var(--accent, var(--brand)));
  border-color: var(--btn, var(--accent, var(--brand)));
  font-size: var(--btn-font, 20px);
  padding: var(--btn-pad, 16px) var(--btn-px, var(--btn-pad, 16px));
}
.lp-form .btn.primary::after {
  content: " →";
}
.lp-form .fine {
  text-align: center;
  color: var(--brand-dark);
  margin: 12px 0 0;
  font-size: 16px;
}
.lp-art {
  margin: 20px -8px 0;
}
.lp-art img {
  display: block;
  width: 100%;
  height: auto;
  /* Watercolor art on white: multiply drops the white so it sits on the page color, and the edges fade out so
     the picture has no visible box. */
  mix-blend-mode: multiply;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}
body.landing-card .badges li {
  background: var(--brand-tint);
  color: var(--brand-dark);
}
@media (min-width: 900px) {
  /* Desktop: words and the question on the left, the art on the right, all above the fold. */
  body.landing-card .card {
    padding: 24px 40px 40px;
  }
  body.landing-card #steps .step {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 56px;
    align-items: center;
  }
  body.landing-card #steps .step > * {
    grid-column: 1;
  }
  body.landing-card #steps .step > .lp-art {
    grid-column: 2;
    grid-row: 1 / span 6;
    margin: 0;
  }
  body.landing-card .lp-form {
    max-width: 480px;
  }
  body.landing-card #steps .step h1 {
    font-size: clamp(46px, 4.6vw, 64px);
  }
}

/* ---- landing page, "minimal" style: no band, no card box, the question centered ------------------- */
body.landing-minimal .bar {
  background: transparent;
  border-bottom: 0;
}
body.landing-minimal .bar-inner {
  justify-content: center;
}
body.landing-minimal .card {
  background: transparent;
  min-height: 0;
  padding-top: 28px;
}
body.landing-minimal #steps .step {
  text-align: center;
}
body.landing-minimal #steps .step h1 {
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.05;
  color: var(--brand-dark);
}
body.landing-minimal .lp-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  text-align: left;
}
body.landing-minimal .lp-art {
  margin: 24px auto 0;
  max-width: 520px;
}
@media (min-width: 900px) {
  body.landing-card.landing-art-left #steps .step > * {
    grid-column: 2;
  }
  body.landing-card.landing-art-left #steps .step > .lp-art {
    grid-column: 1;
  }
  body.landing-card.landing-art-left #steps .step {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
}

/* ---- design options (funnel.json "design"): body classes added by the server ------------------------
   Each block only applies when the funnel turns that option on; without "design" nothing here matches. */
body.d-font-rounded {
  --font:
    ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, Manjari, "Arial Rounded MT", "Arial Rounded MT Bold", Calibri,
    source-sans-pro, sans-serif;
}
body.d-font-geometric {
  --font: Avenir, Montserrat, Corbel, "URW Gothic", source-sans-pro, sans-serif;
}
body.d-font-humanist {
  --font: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
}
body.d-font-serif {
  --font: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
}
body.d-corners-square {
  --radius: 4px;
}
body.d-corners-soft {
  --radius: 10px;
}
body.d-corners-round {
  --radius: 16px;
}
body.d-corners-pill {
  --radius: 16px;
}
body.d-corners-pill .btn,
body.d-corners-pill .tile {
  border-radius: 999px;
}
body.d-headings-large #steps .step h1 {
  font-size: clamp(32px, 8vw, 42px);
}
body.d-headings-xl #steps .step h1 {
  font-size: clamp(38px, 10vw, 54px);
  line-height: 1.05;
}
/* Choices as full-width rows (EverQuote-style), optionally with a radio circle on the right. */
body.d-choices-list .tiles,
body.d-choices-radio-list .tiles {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
body.d-choices-list .tile,
body.d-choices-radio-list .tile {
  text-align: left;
  padding: 14px 18px;
  font-size: 18px;
}
body.d-choices-radio-list .tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.d-choices-radio-list .tile::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
}
body.d-choices-radio-list .tile[aria-checked="true"]::after {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 5px #fff;
  background: var(--brand);
}
body.d-header-center .bar-inner {
  justify-content: center;
}
body.d-header-center .bar-note,
body.d-no-tagline .bar-note {
  display: none;
}
body.d-surface-flat .card {
  background: transparent;
}
body.d-surface-outlined .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 16px;
}
body.d-background-tint {
  background: var(--brand-tint);
  min-height: 100vh;
}
body.d-background-gradient {
  background:
    linear-gradient(180deg, var(--brand-tint), var(--bg) 420px) no-repeat,
    var(--bg);
  min-height: 100vh;
}
body.d-width-narrow .card,
body.d-width-narrow .bar-inner {
  max-width: 480px;
}
body.d-width-wide .card,
body.d-width-wide .bar-inner {
  max-width: 720px;
}
body.d-arrow #steps .btn.primary[data-next]::after {
  content: " →";
}
/* The landing page's card style already adds its own arrow. */
body.d-arrow .lp-form .btn.primary::after {
  content: " →";
}
body.landing-minimal .badges li {
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.quote-visual li.carrier img {
  height: 26px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
}

/* ---- landing sections: icons, image beside text, carrier logo strip -------------------------------- */
.lp-section li.has-icon {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.lp-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}
.lp-section ul.bullets {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.lp-media-row {
  display: grid;
  gap: 18px;
  align-items: center;
}
.lp-media-row figure {
  margin: 0;
}
.lp-media-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}
@media (min-width: 760px) {
  .lp-media-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
  }
  .lp-media-row.right figure {
    order: 2;
  }
}
.lp-logos {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: center;
}
.lp-logo {
  height: 30px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
@media (min-width: 900px) {
  /* Card style: the quote card takes the right column like the illustration does. */
  body.landing-card #steps .step > .quote-visual {
    grid-column: 2;
    grid-row: 1 / span 6;
    margin: 0 auto;
    width: 100%;
    max-width: 360px;
  }
  /* Sections match the hero's width; cards and steps sit side by side. */
  body.landing-card .landing-more,
  body.landing-minimal .landing-more {
    max-width: 1120px;
    padding: 16px 40px 24px;
  }
  body.landing-card .lp-section ul.cards,
  body.landing-card .lp-section ol.steps,
  body.landing-minimal .lp-section ul.cards,
  body.landing-minimal .lp-section ol.steps {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  body.landing-card .lp-cta .btn,
  body.landing-minimal .lp-cta .btn {
    max-width: 420px;
    display: block;
    margin: 0 auto;
  }
}
.lp-carriers h2,
.lp-carriers .lede {
  text-align: center;
}

/* ---- design.spacing: tighter or roomier padding and gaps ------------------------------------------- */
body.d-spacing-tight .card {
  padding: 14px 16px 20px;
}
body.d-spacing-tight .field {
  margin-bottom: 8px;
}
body.d-spacing-tight .nav {
  margin-top: 10px;
}
body.d-spacing-tight #steps .step .lede {
  margin-bottom: 12px;
}
body.d-spacing-tight #steps .step h1 {
  margin: 4px 0 6px;
}
body.d-spacing-tight .tiles {
  gap: 6px;
}
body.d-spacing-tight .lp-section {
  padding: 16px 0 4px;
}
body.d-spacing-tight .lp-form {
  padding: 14px 14px 12px;
}
body.d-spacing-roomy .card {
  padding: 36px 24px 44px;
}
body.d-spacing-roomy .field {
  margin-bottom: 20px;
}
body.d-spacing-roomy .nav {
  margin-top: 26px;
}
body.d-spacing-roomy .tiles {
  gap: 14px;
}
body.d-spacing-roomy .lp-section {
  padding: 40px 0 10px;
}

/* ---- design.text: question intro, labels and answer choices (inputs stay 16px+ so phones don't zoom) ---- */
body.d-text-small #steps .step .lede {
  font-size: 16px;
}
body.d-text-small #steps .field > span {
  font-size: 14px;
}
body.d-text-small #steps .tile {
  font-size: 15px;
}
body.d-text-large #steps .step .lede {
  font-size: clamp(22px, 6vw, 27px); /* above every layout's normal size (18-24px) */
}
body.d-text-large #steps .field > span {
  font-size: 17px;
}
body.d-text-large #steps .tile {
  font-size: 18px;
}

/* ---- design.buttonSize / buttonWidth / buttonColor --------------------------------------------------- */
body.d-buttonSize-large {
  --btn-font: 21px;
  --btn-pad: 19px;
}
body.d-buttonWidth-auto {
  --btn-align: flex-start;
  --btn-w: auto;
  --btn-min: min(100%, 220px);
  --btn-px: 36px;
  --btn-justify: start;
}
body.d-buttonColor-dark {
  --btn: var(--brand-dark);
}
/* Never dark-on-dark: on the hero band a "dark" button falls back to the accent (the config rules refuse it too). */
body.d-buttonColor-dark.landing-hero {
  --btn: var(--accent, var(--brand));
}
body.d-buttonColor-accent {
  --btn: var(--accent, var(--brand));
}
body.d-buttonColor-brand {
  --btn: var(--brand);
}

/* ---- design.buttonColor "highlight" and design.headlineBar: the brand's bright call-to-action color ---- */
body.d-buttonColor-highlight {
  --btn: var(--highlight, var(--accent, var(--brand)));
  --btn-ink: var(--highlight-ink, #fff);
}
body.landing.d-headline-bar #steps .step > h1::before {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  border-radius: 3px;
  background: var(--highlight, var(--accent, var(--brand)));
  margin: 0 0 22px;
}

/* ---- landing sections, layout "row": icon + title side by side on desktop, no boxes ----------------- */
.lp-section.lp-row ul.cards {
  gap: 14px;
}
.lp-section.lp-row ul.cards li {
  background: transparent;
  box-shadow: none;
  padding: 0;
  align-items: center;
}
.lp-section.lp-row .lp-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-tint) 85%, transparent);
  color: var(--heading-ink, var(--brand-dark));
  box-shadow: 0 1px 4px rgb(15 31 61 / 0.06);
}
.lp-section.lp-row li strong {
  font-size: 19px;
  font-weight: 500;
  color: var(--brand-dark);
}
@media (min-width: 900px) {
  .lp-section.lp-row ul.cards {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
    gap: 28px;
  }
  .lp-section.lp-row .lp-icon {
    width: 68px;
    height: 68px;
  }
  .lp-section.lp-row li strong {
    font-size: 22px;
  }
}

/* ---- footer links (brand.links) -------------------------------------------------------------------- */
/* Six links (Privacy, Terms, Your Privacy Choices, Our Partners, Accessibility, Contact): their own line, wrapping
   between links, never inside one, so a phone never scrolls sideways. */
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 12px 0 0;
}
.foot-links a {
  margin-left: 0;
  white-space: nowrap;
}

/* ---- landing page, "photo" style: a full-width photo behind the first screen ------------------------
   The photo is decorative (aria-hidden): a white wash keeps the words readable over it, and its bottom fades
   into the page so the sections below sit on the same scene. Only on the first question. */
body.landing-photo {
  position: relative;
  background: var(--bg);
}
.lp-photo {
  /* Phones: the scene behind the top of the page, fading into mist under the question (desktop: below). */
  position: absolute;
  inset: 0 0 auto;
  height: min(100%, max(118vh, 900px));
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.lp-photo[hidden] {
  display: none;
}
.lp-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% 40%;
}
.lp-photo.focus-center .lp-photo-img {
  object-position: 50% 40%;
}
.lp-photo.focus-left .lp-photo-img {
  object-position: 25% 40%;
}
.lp-photo::after {
  /* Phones: a light wash over the top half for the words, fading to the page color at the bottom. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.42) 30%, rgb(255 255 255 / 0.5) 50%, rgb(255 255 255 / 0.75) 72%, var(--bg) 90%),
    linear-gradient(to right, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.1) 85%);
}
body.landing-photo .bar,
body.landing-photo main.card,
body.landing-photo .landing-more,
body.landing-photo .foot {
  position: relative;
  z-index: 1;
}
body.landing-photo .bar {
  background: transparent;
  border-bottom: 0;
}
body.landing-photo .bar-inner,
body.landing-photo .landing-more,
body.landing-photo .foot {
  max-width: 1200px;
}
body.landing-photo .bar-note {
  display: none;
}
body.landing-photo .card {
  max-width: 1200px;
  min-height: 0;
  background: transparent;
  padding: 24px 20px 12px;
}
body.landing-photo .lp-section h2,
body.landing-photo .lp-section.lp-row li strong,
body.landing-photo #steps .lp-form .field > span {
  color: var(--heading-ink, var(--brand-dark));
}
body.landing-photo #steps .step {
  max-width: 640px;
  color: var(--heading-ink, var(--brand-dark));
}
body.landing-photo #steps .step .kicker {
  color: var(--heading-ink, var(--brand-dark));
  letter-spacing: 0.14em;
}
body.landing-photo #steps .step h1 {
  font-size: clamp(38px, 9.8vw, 72px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  font-weight: 800;
  color: var(--heading-ink, var(--brand-dark));
  margin: 10px 0 14px;
}
body.landing-photo #steps .step .lede {
  color: var(--heading-ink, var(--brand-dark));
  font-size: clamp(18px, 4.7vw, 25px);
  line-height: 1.3;
  margin: 0 0 22px;
}
body.landing-photo .lp-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: 480px;
}
body.landing-photo .lp-form .btn.primary::after {
  content: none;
}
body.landing-photo .lp-section h2 {
  font-size: clamp(28px, 7vw, 40px);
  letter-spacing: -0.5px;
}
body.landing-photo .foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  text-align: left;
  border-top: 1px solid rgb(15 31 61 / 0.12);
  margin-top: 24px;
  padding-top: 22px;
}
body.landing-photo .foot-links {
  justify-content: flex-start;
}
@media (min-width: 900px) {
  .lp-photo {
    height: max(100vh, 940px);
  }
  .lp-photo-img {
    object-position: 50% 40%;
  }
  .lp-photo::after {
    /* Desktop: the words sit on the left over a soft white wash; the scene stays clear on the right. */
    background:
      linear-gradient(to right, rgb(255 255 255 / 0.78), rgb(255 255 255 / 0.45) 35%, rgb(255 255 255 / 0) 62%),
      linear-gradient(to bottom, rgb(255 255 255 / 0.25), rgb(255 255 255 / 0) 28%, rgb(255 255 255 / 0) 50%, rgb(255 255 255 / 0.55) 72%, var(--bg) 96%);
  }
  body.landing-photo .card {
    padding: 64px 40px 12px;
  }
  body.landing-photo .bar-inner {
    padding: 26px 40px;
  }
  body.landing-photo .landing-more,
  body.landing-photo .foot {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* ---- design.hero: room above and below the landing page's first screen ------------------------------ */
body.d-hero-compact.landing-hero .card {
  padding-top: 18px;
  padding-bottom: 22px;
}
body.d-hero-tall.landing-hero .card {
  padding-top: 64px;
  padding-bottom: 72px;
}
body.d-hero-compact.landing-card .card,
body.d-hero-compact.landing-minimal .card,
body.d-hero-compact.landing-photo .card {
  padding-top: 4px;
  padding-bottom: 16px;
}
body.d-hero-tall.landing-card .card,
body.d-hero-tall.landing-minimal .card,
body.d-hero-tall.landing-photo .card {
  padding-top: 48px;
  padding-bottom: 56px;
}

/* ---- progress: the default thin line (design.progressStyle "classic" keeps the text + bar/segments) -------- */
.progress.line {
  margin: -6px 0 20px;
}
.progress.line .progress-label {
  /* Read out, not shown: the line says it at a glance. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.progress.line .progress-track {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  overflow: hidden;
}
.progress.line .progress-track i.fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.35s ease-out;
}
@media (max-width: 599px) {
  /* A little thicker on phones, where it's seen at arm's length. */
  .progress.line .progress-track {
    height: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .progress.line .progress-track i.fill {
    transition: none;
  }
}

/* ---- room between a question and its answers (when there's no intro line under the headline) ---------- */
#steps .step > h1 + .fields,
#steps .step > h1 + .lp-form {
  margin-top: 20px;
}

/* ---- short answer sets: one even row (2, 3 or 4 answers); four go 2x2 on narrow phones ---------------- */
.tiles[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tiles[data-count="3"],
.tiles[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 480px) {
  .tiles[data-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tiles[data-count="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- the "finding your matches" scene while the lead is sent (loaders.js) -------------------------------- */
.loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  /* A steady width (the words changing length must not resize the picture): up to 480px, full width on phones. */
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
  /* Near the top (the card can be taller than the screen), not centered in it. */
  align-content: start;
  justify-items: center;
  gap: 22px;
  padding: clamp(24px, 8vh, 72px) 16px 24px;
  background: var(--card);
  text-align: center;
  animation: loader-in 0.25s ease-out;
}
.loader-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #f4efe6;
  box-shadow: 0 10px 30px rgb(15 31 61 / 0.12);
}
.loader-video,
.loader-still,
.loader-final {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.loader-video {
  z-index: 1;
  transform-origin: 50% 60%;
  transition: transform 8s ease-out;
}
.loader-frame.hold .loader-video {
  transform: scale(1.05);
}
.loader-final {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.loader-frame.done .loader-final {
  opacity: 1;
}
.loader-check {
  position: absolute;
  z-index: 3;
  right: 14px;
  top: 14px;
  width: 48px;
  height: 48px;
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.25s ease 0.35s,
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s;
  filter: drop-shadow(0 3px 8px rgb(0 0 0 / 0.25));
}
.loader-frame.done .loader-check {
  opacity: 1;
  transform: scale(1);
}
/* The progress bar under the animation: brand color, rounded, a soft sheen moving through it. */
.loader-bar {
  position: relative;
  width: min(100%, 360px);
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}
.loader-fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--btn, var(--brand)) 80%, #fff), var(--btn, var(--brand)));
  transition: width 0.4s linear;
}
.loader-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / 0.45) 50%, transparent 100%) no-repeat;
  background-size: 40% 100%;
  animation: loader-sheen 1.6s ease-in-out infinite;
}
.loader.done .loader-fill {
  transition-duration: 0.35s;
}
/* Trusty: a paw print riding the leading edge. */
.loader-rider {
  position: absolute;
  z-index: 1;
  right: -13px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  padding: 3px;
  border-radius: 50%;
  background: var(--card, #fff);
  color: var(--btn, var(--brand));
  box-shadow: 0 2px 6px rgb(15 31 61 / 0.18);
  animation: loader-trot 0.5s ease-in-out infinite alternate;
}
/* Sherpa: the summit flag waiting at the end of the track. */
.loader-goal {
  position: absolute;
  right: -6px;
  bottom: 2px;
  width: 26px;
  height: 26px;
  color: var(--heading-ink, var(--brand-dark, #0f1f3d));
  transform-origin: 25% 100%;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.loader.done .loader-goal {
  transform: scale(1.25);
}
.loader-rider svg,
.loader-goal svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* The brand's logo, breathing, with two soft rings. */
.loader-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
}
.loader-logo-img {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  object-fit: contain;
  animation: loader-breathe 2.4s ease-in-out infinite;
}
.loader-logo .ring {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  opacity: 0;
  animation: loader-ring 2.4s ease-out infinite;
}
.loader-logo .ring.r2 {
  animation-delay: 1.2s;
}
.loader-logo-check {
  position: absolute;
  z-index: 3;
  right: 6px;
  top: 6px;
  width: 48px;
  height: 48px;
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.25s ease 0.2s,
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
  filter: drop-shadow(0 3px 8px rgb(0 0 0 / 0.25));
}
.loader-logo.done .loader-logo-check {
  opacity: 1;
  transform: scale(1);
}
.loader-logo.done .loader-logo-img,
.loader-logo.done .ring {
  animation-play-state: paused;
}
.loader-msg {
  margin: 0;
  min-height: 2.6em;
  max-width: 32ch;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading-ink, var(--ink));
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.loader-msg.out {
  opacity: 0;
  transform: translateY(4px);
}
@keyframes loader-sheen {
  from {
    background-position: -60% 0;
  }
  to {
    background-position: 160% 0;
  }
}
@keyframes loader-trot {
  to {
    transform: translateY(-2px) rotate(8deg);
  }
}
@keyframes loader-breathe {
  50% {
    transform: translateY(-4px) scale(1.04);
  }
}
@keyframes loader-ring {
  0% {
    opacity: 0.5;
    transform: scale(0.85);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}
@keyframes loader-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader,
  .loader-video,
  .loader-final,
  .loader-check,
  .loader-fill::after,
  .loader-rider,
  .loader-logo-img,
  .loader-logo-check,
  .loader-logo .ring,
  .loader-msg {
    animation: none;
    transition: none;
  }
}

/* ---- question pages (not the landing page): room to breathe, answers within thumb reach ------------------
   Phones: the page fills the screen (footer at the bottom, not floating mid-screen), the question starts a little
   lower, and a lone question's short answer set (2-4) is full-width bars, 60px tall: easy to read and to hit anywhere
   along the row (screens with several questions keep 2x2 so they don't get long).
   Desktop: the question sits in a floating card with generous padding instead of a strip at the top.
   (":not(.landing-hero)" is redundant, landing-hero implies landing; it keeps these after the landing rules in weight.) */
body:not(.landing) {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
body:not(.landing):not(.landing-hero) > .card {
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
}
body:not(.landing) #steps .step {
  padding-top: clamp(8px, 4svh, 36px);
}
body:not(.landing) #steps .step h1 {
  margin-bottom: 22px;
}
body:not(.landing) #steps .nav {
  margin-top: 28px;
}
@media (max-width: 479px) {
  body:not(.landing) #steps .step {
    padding-top: clamp(16px, 6svh, 56px);
  }
  body:not(.landing) #steps .one-q .tiles[data-count] {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  body:not(.landing) #steps .one-q .tiles[data-count] .tile {
    min-height: 60px;
    font-size: 18px;
  }
}
@media (min-width: 640px) {
  body:not(.landing):not(.landing-hero) > .card {
    flex: 0 0 auto;
    margin: 36px auto 24px;
    padding: 36px 44px 40px;
    border-radius: 18px;
  }
  body:not(.landing) #steps .tiles[data-count] .tile {
    min-height: 64px;
  }
  body:not(.landing):not(.d-surface-flat):not(.d-surface-outlined) > .card {
    box-shadow: 0 8px 32px rgb(15 31 61 / 0.07);
  }
}
