/* =========================================================
   Rentrel Quiz UI - Clean Blue Theme
   Replaces the older stacked override CSS.
   Paths assume this file is: assets/css/styles.css
   ========================================================= */

:root {
  --bg: #f4f8ff;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #08142f;
  --ink: #08142f;
  --muted: #63708a;

  /* Keep old variable names as aliases so existing JS/classes stay compatible */
  --purple: #0b5ed7;
  --purple-dark: #063b8e;
  --purple-light: #39a9ff;

  --orange: #0b6bff;
  --red: #0057d9;
  --accent-soft: #eaf3ff;
  --border: #d8e7ff;
  --input: rgba(255, 255, 255, .9);
  --shadow: 0 26px 80px rgba(11, 95, 215, .12), 0 12px 34px rgba(28, 20, 35, .06);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background-color: #f8fbff;
  background-image:
    url("../images/bg-curves.svg"),
    radial-gradient(circle at 50% 18%, rgba(11, 107, 255, .10), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 54%, #eef6ff 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center bottom, center top, center center;
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed, fixed, fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header / Logo */
.topbar {
  position: relative;
  width: 100%;
  min-height: 72px;
  padding: 0 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(11, 95, 215, .08);
  box-shadow: 0 12px 36px rgba(8, 34, 78, .05);
  backdrop-filter: blur(10px);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.brand,
.brand-logo {
  color: #17131d;
  text-decoration: none;
}

.brand {
  font-size: 29px;
  font-weight: 850;
  letter-spacing: -0.048em;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 132px;
  line-height: 0;
  z-index: 2;
}

.brand-logo img {
  display: block;
  width: auto;
  height: 38px;
  max-width: 160px;
  object-fit: contain;
}

.brand-fallback {
  display: none;
  color: #0d2c52;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
}

.help-btn {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(11, 95, 215, .14);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(11, 95, 215, .14);
}

/* Layout / Hero */
.quiz-wrap {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 34px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--purple-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .145em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 4.6vw, 62px);
  line-height: .93;
  letter-spacing: -.058em;
}

.hero h1 span {
  color: var(--purple);
  font-style: italic;
  background: linear-gradient(90deg, var(--orange) 0%, #0b5ed7 45%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 28px rgba(11, 95, 215, .08);
}

.hero-copy {
  margin: 10px 0 0;
  max-width: 590px;
  color: #17223b;
  font-size: 16px;
  line-height: 1.45;
}

.micro-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.illustration {
  width: min(210px, 62vw);
  height: 122px;
  margin: 14px auto 18px;
  display: grid;
  place-items: center;
}

.illustration svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.illustration svg path,
.illustration svg rect,
.illustration svg circle {
  vector-effect: non-scaling-stroke;
}

/* Quiz card */
.quiz-card {
  position: relative;
  width: min(100%, 480px);
  min-height: 264px;
  padding: 26px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 260ms ease, opacity 260ms ease;
}

.quiz-card.is-changing {
  opacity: .86;
  transform: translateY(4px) scale(.996);
}

.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(11, 95, 215, .18);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--purple-dark);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: 200ms ease;
  box-shadow: 0 10px 22px rgba(11, 95, 215, .08);
}

.back-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.back-btn:hover {
  border-color: rgba(11, 95, 215, .45);
  color: var(--red);
}

.progress-wrap {
  padding-left: 0;
  margin-bottom: 20px;
}

.quiz-card.has-back .progress-wrap {
  padding-left: 44px;
}

.progress-bar {
  width: 100%;
  height: 7px;
  background: #e8eef7;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 14%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width 280ms ease;
}

#stepCounter {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.question-title {
  margin: 0 0 13px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -.025em;
}

.question-subtitle {
  margin: -4px 0 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.43;
}

.option-list {
  display: grid;
  gap: 11px;
}

.option-btn {
  width: 100%;
  min-height: 56px;
  padding: 14px 17px;
  border: 1px solid rgba(220, 197, 188, .9);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #0b1835;
  background: rgba(255, 255, 255, .9);
  text-align: left;
  font-size: 16px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.option-btn::after {
  content: "\203A";
  color: var(--purple);
  font-size: 25px;
  line-height: 1;
  opacity: .78;
}

.option-btn:hover,
.option-btn:focus-visible,
.chip-btn:hover,
.chip-btn:focus-visible,
.secondary-btn:hover,
.secondary-btn:focus-visible {
  outline: none;
  border-color: rgba(11, 95, 215, .42);
  background: #f8fbff;
  box-shadow: 0 14px 28px rgba(11, 95, 215, .09);
  transform: translateY(-1px);
}

/* Forms */
.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.form-group label {
  color: #0b1835;
  font-size: 14px;
  font-weight: 850;
}

.field,
.money-field,
.secondary-btn {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(220, 197, 188, .9);
  border-radius: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, .9);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field,
.money-field {
  padding: 0 16px;
}

.field:focus,
.money-field:focus {
  border-color: rgba(11, 95, 215, .58);
  box-shadow: 0 0 0 4px rgba(11, 95, 215, .12);
}

.money-wrap {
  position: relative;
}

.money-wrap span {
  position: absolute;
  top: 50%;
  left: 17px;
  transform: translateY(-50%);
  color: #91858f;
  font-size: 18px;
  font-weight: 850;
}

.money-field {
  padding-left: 42px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.primary-btn {
  position: relative;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(90deg, var(--orange) 0%, #006dff 45%, var(--red) 100%);
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(11, 95, 215, .22);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-btn:hover,
.primary-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(11, 95, 215, .27);
}

.cta-btn {
  gap: 12px;
}

.btn-arrow {
  position: absolute;
  right: 24px;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.error-text {
  min-height: 18px;
  margin: 4px 0 0;
  color: #c81722;
  font-size: 13px;
  font-weight: 750;
}

.disclaimer {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.disclaimer strong {
  color: #122449;
}

/* Amount step */
.quiz-card.is-amount-step {
  min-height: 250px;
}

.quiz-card.is-amount-step .progress-wrap {
  margin-bottom: 16px;
}

.quiz-card.is-amount-step .question-title {
  margin-bottom: 10px;
}

.quiz-card.is-amount-step .question-subtitle {
  margin-bottom: 12px;
}

.quiz-card.is-amount-step .form-group {
  margin-bottom: 6px;
}

.quiz-card.is-amount-step .primary-btn {
  margin-top: 4px;
}

/* Extra quiz flow controls */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.optional-money-group {
  margin-top: 14px;
}

#optionalAmountBox,
.followup-box {
  display: none;
}

#optionalAmountBox.is-visible {
  display: grid;
}

.followup-box.is-visible {
  display: block;
}

.selectable-btn.is-selected,
.chip-btn.is-selected {
  border-color: rgba(11, 95, 215, .72);
  background: linear-gradient(180deg, #f3f8ff, #eaf3ff);
  box-shadow: 0 14px 30px rgba(11, 95, 215, .12);
}

.selectable-btn.is-selected::after,
.chip-btn.is-selected::after {
  content: "\2713";
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
}

.followup-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(220, 197, 188, .9);
  border-radius: 18px;
  background: rgba(247, 251, 255, .82);
}

.followup-title {
  margin: 0 0 10px;
  color: #0b1835;
  font-size: 14px;
  font-weight: 850;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-btn {
  min-width: 56px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(220, 197, 188, .9);
  border-radius: 999px;
  color: #0b1835;
  background: #fff;
  font-size: 14px;
  font-weight: 850;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

/* Contact input icons */
.icon-field {
  position: relative;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 18px;
  height: 18px;
  color: #817786;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.field-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-input,
.quiz-card.is-contact-step .icon-input {
  padding-left: 52px !important;
}

/* Contact step */
.quiz-card.is-contact-step {
  padding: 21px 24px 22px;
}

.quiz-card.is-contact-step .progress-wrap {
  margin-bottom: 11px;
}

.quiz-card.is-contact-step .question-title {
  margin-bottom: 16px;
  font-size: 20px;
  line-height: 1.13;
}

.quiz-card.is-contact-step .question-subtitle {
  margin-bottom: 9px;
  font-size: 13px;
  line-height: 1.28;
}

.quiz-card.is-contact-step .contact-field-group,
.quiz-card.is-contact-step .form-group {
  gap: 5px;
  margin-bottom: 10px;
}

.quiz-card.is-contact-step .contact-field-group label {
  display: none;
}

.quiz-card.is-contact-step .field {
  min-height: 44px;
  padding-left: 18px;
  border-radius: 15px;
}

.quiz-card.is-contact-step .primary-btn {
  min-height: 48px;
  margin-top: 12px;
}

.quiz-card.is-contact-step .disclaimer {
  margin-top: 10px;
  font-size: 10.8px;
  line-height: 1.25;
}

.contact-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.quiz-card.is-contact-step .contact-name-row .contact-field-group {
  margin-bottom: 0;
}

.quiz-card.is-contact-step .contact-name-row .field {
  width: 100%;
}

/* Consent step */
.consent-badge {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--purple-dark);
  background: #eaf3ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.consent-actions {
  display: grid;
  gap: 11px;
  margin-top: 17px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #25324b;
  font-size: 15px;
  font-weight: 850;
}

.consent-primary {
  margin-top: 0;
}

.quiz-card.is-consent-step {
  min-height: 320px;
}

input[type="date"].field {
  appearance: none;
  color-scheme: light;
}

/* Long steps compact mode */
.quiz-card.is-long-step {
  min-height: 0;
}

.quiz-card.is-long-step .progress-wrap {
  margin-bottom: 15px;
}

.quiz-card.is-long-step .question-title {
  margin-bottom: 9px;
}

.quiz-card.is-long-step .question-subtitle {
  margin-bottom: 12px;
}

.quiz-card.is-long-step .option-list {
  gap: 8px;
}

.quiz-card.is-long-step .option-btn {
  min-height: 49px;
  padding: 11px 15px;
  border-radius: 15px;
}

.quiz-card.is-long-step .form-group {
  margin-bottom: 8px;
}

.quiz-card.is-long-step .primary-btn,
.quiz-card.is-long-step .secondary-btn {
  min-height: 50px;
}

/* Loading and modal */
.loading-layer,
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.loading-layer.is-visible,
.modal-layer.is-visible {
  display: flex;
}

.loading-layer {
  background: rgba(246, 250, 255, .22);
  pointer-events: none;
}

.loader-card {
  min-width: 154px;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--purple-dark);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 40px rgba(11, 95, 215, .12);
  backdrop-filter: blur(12px);
}

.loader-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.loader-dot {
  width: 15px;
  height: 15px;
  border: 3px solid rgba(11, 95, 215, .18);
  border-top-color: var(--red);
  border-radius: 999px;
  animation: spin 780ms linear infinite;
}

.modal-layer {
  z-index: 80;
  background: rgba(8, 20, 47, .44);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(100%, 450px);
  padding: 34px 30px 30px;
  border-radius: 30px;
  text-align: center;
  background: #fff;
  box-shadow: 0 32px 90px rgba(25, 18, 32, .26);
  animation: modalIn 220ms ease both;
}

.modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 28px;
  font-weight: 900;
}

.modal-icon.is-warning {
  background: #221726;
}

.modal-card h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  letter-spacing: -.04em;
}

.modal-card p {
  margin: 0;
  color: #25324b;
  font-size: 16px;
  line-height: 1.55;
}

.modal-note {
  margin-top: 12px !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Desktop / laptop height fit */
@media (min-width: 721px) {
  .quiz-card.is-long-step .option-list {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-card.is-long-step.is-consent-step .option-list,
  .quiz-card.is-long-step.is-contact-step .option-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) and (max-height: 860px) {
  .topbar {
    min-height: 68px;
  }

  .brand-logo img {
    height: 35px;
    max-width: 150px;
  }

  .help-btn {
    width: 31px;
    height: 31px;
    font-size: 16px;
  }

  .quiz-wrap {
    padding-top: 24px;
    padding-bottom: 36px;
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: clamp(38px, 4.2vw, 55px);
  }

  .hero-copy {
    margin-top: 9px;
    font-size: 15.5px;
    line-height: 1.38;
  }

  .micro-copy {
    margin-top: 5px;
  }

  .illustration {
    width: min(180px, 56vw);
    height: 102px;
    margin: 10px auto 14px;
  }

  .quiz-card {
    width: min(100%, 460px);
    min-height: 245px;
    padding: 24px;
  }

  .progress-wrap {
    margin-bottom: 18px;
  }
}

@media (min-width: 721px) and (max-height: 720px) {
  .quiz-wrap {
    padding-top: 15px;
  }

  .hero h1 {
    font-size: clamp(34px, 4vw, 48px);
  }

  .hero-copy,
  .micro-copy {
    display: none;
  }

  .illustration {
    height: 82px;
    margin: 8px auto 12px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  body {
    background-attachment: scroll, scroll, scroll;
    background-size: auto 100%, 100% 100%, 100% 100%;
  }

  .topbar {
    min-height: 64px;
    padding: 0 20px;
    justify-content: flex-end;
  }

  .brand-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    justify-content: center;
    min-width: 0;
    max-width: 150px;
  }

  .brand-logo img {
    height: 36px;
    max-width: 132px;
  }

  .brand-fallback {
    font-size: 24px;
  }

  .help-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .quiz-wrap {
    /* Short quiz steps need a little breathing space after the logo bar. */
    padding: 18px 14px 28px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: .16em;
  }

  .hero h1 {
    font-size: clamp(32px, 9vw, 40px);
    line-height: .92;
  }

  .hero-copy {
    max-width: 310px;
    margin-top: 8px;
    font-size: 13.4px;
    line-height: 1.34;
  }

  .micro-copy {
    margin-top: 5px;
    font-size: 11.5px;
  }

  .illustration {
    /* Default/short steps: slightly bigger center icon for better visual balance. */
    width: 136px;
    height: 78px;
    margin: 13px auto 16px;
  }

  .quiz-card {
    width: min(100%, 440px);
    /* Let short steps shrink naturally instead of leaving a large empty bottom area. */
    min-height: 0;
    padding: 18px 20px 20px;
    border-radius: 27px;
  }

  .back-btn {
    top: 18px;
    left: 18px;
    width: 34px;
    height: 34px;
  }

  .quiz-card.has-back .progress-wrap {
    padding-left: 42px;
  }

  .progress-wrap {
    margin-bottom: 14px;
  }

  .progress-bar {
    height: 6px;
  }

  #stepCounter {
    margin-top: 7px;
    font-size: 12px;
  }

  .question-title {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.18;
  }

  .question-subtitle {
    margin: -2px 0 14px;
    font-size: 13.5px;
    line-height: 1.36;
  }

  .option-list {
    gap: 9px;
  }

  .option-btn,
  .field,
  .money-field,
  .primary-btn {
    min-height: 50px;
  }

  .option-btn {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
  }

  .form-group {
    gap: 7px;
    margin-bottom: 9px;
  }

  .form-group label {
    font-size: 14px;
  }

  .money-field {
    font-size: 20px;
  }

  .primary-btn {
    margin-top: 6px;
  }

  .error-text {
    min-height: 14px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .followup-box {
    padding: 13px;
    border-radius: 16px;
  }

  .chip-btn {
    min-height: 40px;
    font-size: 13px;
  }

  .secondary-btn {
    min-height: 52px;
    padding: 0 14px;
    font-size: 14px;
  }

  .btn-arrow {
    right: 19px;
    font-size: 21px;
  }

  .field-icon {
    left: 16px;
    width: 16px;
    height: 16px;
  }

  .icon-input,
  .quiz-card.is-contact-step .icon-input {
    padding-left: 47px !important;
  }

  /* Mobile long-step compact mode */
  body.has-long-step .quiz-wrap {
    /* Long forms stay compact so submit/next stays reachable. */
    padding-top: 10px;
  }

  body.has-long-step .eyebrow {
    margin-bottom: 5px;
    font-size: 11px;
  }

  body.has-long-step .hero h1 {
    font-size: clamp(30px, 8.8vw, 38px);
    line-height: .92;
  }

  body.has-long-step .hero-copy {
    max-width: 320px;
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.3;
  }

  body.has-long-step .micro-copy {
    margin-top: 4px;
    font-size: 11px;
  }

  body.has-long-step .illustration {
    width: min(128px, 40vw);
    height: 62px;
    margin: 7px auto 10px;
  }

  .quiz-card.is-long-step {
    padding: 17px;
    border-radius: 24px;
  }

  .quiz-card.is-long-step .back-btn {
    top: 16px;
    left: 16px;
    width: 31px;
    height: 31px;
  }

  .quiz-card.is-long-step.has-back .progress-wrap {
    padding-left: 39px;
  }

  .quiz-card.is-long-step .progress-wrap {
    margin-bottom: 12px;
  }

  .quiz-card.is-long-step #stepCounter {
    margin-top: 6px;
  }

  .quiz-card.is-long-step .question-title {
    font-size: 18.5px;
    line-height: 1.14;
  }

  .quiz-card.is-long-step .question-subtitle {
    margin-bottom: 10px;
    font-size: 12.8px;
    line-height: 1.32;
  }

  .quiz-card.is-long-step .option-list {
    gap: 7px;
  }

  .quiz-card.is-long-step .option-btn {
    min-height: 44px;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
  }

  .quiz-card.is-long-step .option-btn::after {
    font-size: 21px;
  }

  .quiz-card.is-long-step .field,
  .quiz-card.is-long-step .money-field,
  .quiz-card.is-long-step .primary-btn,
  .quiz-card.is-long-step .secondary-btn {
    min-height: 46px;
  }

  .quiz-card.is-long-step .money-field {
    font-size: 18px;
  }

  .quiz-card.is-long-step .optional-money-group,
  .quiz-card.is-long-step .followup-box {
    margin-top: 9px;
  }

  .quiz-card.is-long-step .followup-box {
    padding: 11px;
  }

  .quiz-card.is-long-step .chip-list {
    gap: 7px;
  }

  .quiz-card.is-long-step .chip-btn {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12.8px;
  }

  .quiz-card.is-long-step .disclaimer {
    font-size: 11px;
    line-height: 1.3;
  }

  /* Contact step remains slightly roomier than other long steps */
  body.has-contact-step .illustration {
    width: min(170px, 50vw);
    height: 92px;
    margin: 10px auto 16px;
  }

  body.has-contact-step .quiz-card {
    margin-top: 12px;
  }

  .quiz-card.is-contact-step {
    padding: 22px 16px 16px;
  }

  .quiz-card.is-contact-step .question-title {
    margin-bottom: 20px;
    font-size: 17.5px;
    line-height: 1.12;
  }

  .quiz-card.is-contact-step .contact-field-group {
    margin-bottom: 8px;
  }

  .quiz-card.is-contact-step .field {
    min-height: 42px;
  }

  .quiz-card.is-contact-step .primary-btn {
    min-height: 44px;
    margin-top: 9px;
  }

  .quiz-card.is-contact-step .disclaimer {
    font-size: 10px;
  }
}

/* Small mobile */
@media (max-width: 420px) {
  .topbar {
    min-height: 62px;
    padding: 0 18px;
  }

  .brand-logo img {
    height: 34px;
    max-width: 124px;
  }

  .help-btn {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .quiz-wrap {
    padding-top: 16px;
  }

  .hero h1 {
    font-size: clamp(30px, 8.7vw, 37px);
  }

  .hero-copy {
    max-width: 292px;
    font-size: 12.8px;
  }

  .micro-copy {
    font-size: 11px;
  }

  .illustration {
    width: 124px;
    height: 70px;
    margin: 10px auto 13px;
  }

  .quiz-card {
    padding: 16px 18px 18px;
    min-height: 0;
  }

  body.has-contact-step .illustration {
    width: min(158px, 48vw);
    height: 86px;
    margin: 8px auto 14px;
  }

  body.has-contact-step .quiz-card {
    margin-top: 14px;
  }
}

/* Very small height mobile */
@media (max-width: 380px) and (max-height: 760px) {
  .topbar {
    min-height: 58px;
  }

  .brand-logo img {
    height: 31px;
    max-width: 116px;
  }

  .quiz-wrap {
    padding: 10px 14px 20px;
  }

  .eyebrow {
    font-size: 10.5px;
    margin-bottom: 5px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-copy {
    margin-top: 7px;
    font-size: 12.2px;
    line-height: 1.32;
    max-width: 292px;
  }

  .micro-copy {
    margin-top: 4px;
    font-size: 10.7px;
  }

  .illustration {
    width: 112px;
    height: 62px;
    margin: 7px auto 9px;
  }

  .quiz-card {
    padding: 15px 16px 17px;
    border-radius: 23px;
    min-height: 0;
  }

  .progress-wrap {
    margin-bottom: 14px;
  }

  .question-title {
    font-size: 18.5px;
  }

  .question-subtitle {
    font-size: 12.8px;
    margin-bottom: 12px;
  }

  .option-btn,
  .field,
  .money-field,
  .primary-btn {
    min-height: 49px;
  }

  .quiz-card.is-long-step {
    padding: 15px;
  }

  .quiz-card.is-long-step .question-title {
    font-size: 17.5px;
  }

  .quiz-card.is-long-step .question-subtitle {
    font-size: 12.2px;
  }

  .quiz-card.is-long-step .option-btn {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 13.5px;
  }

  .quiz-card.is-amount-step .question-title {
    font-size: 18px;
  }

  .quiz-card.is-amount-step .question-subtitle {
    font-size: 12.5px;
  }

  .quiz-card.is-amount-step .form-group {
    margin-bottom: 4px;
  }

  .quiz-card.is-amount-step .primary-btn {
    min-height: 48px;
  }
}

/* Credit check loading sequence: typing + background blur */
.loading-layer.is-credit-loading {
  background: rgba(24, 16, 12, .28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.loader-card.is-credit-loader {
  width: min(92vw, 440px);
  min-height: 166px;
  padding: 30px 28px 28px;
  border-radius: 30px;
  flex-direction: column;
  gap: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 32px 94px rgba(8, 34, 78, .25), 0 18px 46px rgba(11, 95, 215, .17);
  text-align: center;
}

.loader-card.is-credit-loader::before {
  content: "Secure verification";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--purple-dark);
  background: #eaf3ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.loader-card.is-credit-loader .loader-dot {
  width: 30px;
  height: 30px;
  border-width: 4px;
  border-color: rgba(11, 95, 215, .16);
  border-top-color: var(--red);
}

.loader-card.is-credit-loader p {
  position: relative;
  min-height: 46px;
  max-width: 360px;
  margin: 0;
  color: #0b1835;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.42;
  letter-spacing: -.012em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.loader-card.is-credit-loader p.is-clearing {
  opacity: 0;
  transform: translateY(4px);
}

.loader-card.is-credit-loader p.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), var(--red));
  animation: typingCursorBlink 780ms steps(2, start) infinite;
  transform: translateY(2px);
}

@keyframes typingCursorBlink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 720px) {
  .loader-card.is-credit-loader {
    width: min(91vw, 364px);
    min-height: 154px;
    padding: 25px 22px 24px;
    border-radius: 26px;
    gap: 14px;
  }

  .loader-card.is-credit-loader::before {
    min-height: 25px;
    padding: 6px 11px;
    font-size: 10.2px;
  }

  .loader-card.is-credit-loader p {
    min-height: 43px;
    max-width: 300px;
    font-size: 14.4px;
    line-height: 1.36;
  }

  .loader-card.is-credit-loader .loader-dot {
    width: 27px;
    height: 27px;
  }
}

/* Address pre-pop field layout */
@media (min-width: 721px) {
  .field-grid .field-wide {
    grid-column: 1 / -1;
  }
}

.hero-copy .hero-highlight {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.22;
}

.hero-copy .hero-small-copy {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  color: #25324b;
  font-size: clamp(15px, 1.55vw, 18px);
  font-weight: 500;
  line-height: 1.45;
}

/* Help question icon removed */
.help-btn {
  display: none !important;
}

.topbar .brand-logo {
  margin-left: auto;
  margin-right: auto;
}


/* Location step: compact 2x2 layout + searchable suggestions */
.quiz-card.is-location-step {
  width: min(100%, 540px);
}

.quiz-card.is-location-step .location-field-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-card.is-location-step .location-field-grid .field-wide {
  grid-column: auto;
}

.autocomplete-wrap {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: none;
  max-height: 218px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid rgba(11, 95, 215, .16);
  border-radius: 15px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 40px rgba(8, 34, 78, .14);
  backdrop-filter: blur(10px);
}

.autocomplete-wrap.is-open .autocomplete-menu {
  display: grid;
  gap: 5px;
}

.autocomplete-option {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-size: 13.5px;
  font-weight: 800;
}

.autocomplete-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.autocomplete-option:hover,
.autocomplete-option:focus-visible {
  outline: none;
  background: var(--accent-soft);
}

@media (max-width: 720px) {
  .quiz-card.is-location-step {
    width: min(100%, 440px);
  }

  .quiz-card.is-location-step .location-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .autocomplete-menu {
    max-height: 190px;
  }
}
/* Quiz bridge page: request received / email copy flow */
.bridge-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  color: #334155;
  text-align: left;
}

.bridge-copy p {
  margin: 0;
}

.bridge-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0 0;
  padding: 13px 14px;
  border: 1px solid rgba(11, 95, 215, .16);
  border-radius: 17px;
  background: #f8fbff;
  color: #334155;
  font-size: 14px;
}

.bridge-email-box strong {
  color: var(--purple-dark);
  word-break: break-word;
}

.bridge-actions {
  grid-template-columns: 1fr;
}

.bridge-secondary {
  background: #ffffff;
}

.bridge-trust-copy {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.bridge-status {
  display: none;
  margin: 12px 0 0;
  padding: 11px 12px;
  border-radius: 14px;
  background: #e9ffef;
  color: #116b35;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  text-align: center;
}

.bridge-status.is-visible {
  display: block;
}

@media (max-width: 720px) {
  .bridge-copy {
    gap: 8px;
    font-size: 12.8px;
    line-height: 1.5;
  }

  .bridge-email-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
  }
}
