/* Quantize Smart Form
 * Portable styles scoped to .qz-smart-form. The component inherits the
 * Quantize design tokens but includes safe fallbacks for standalone pages.
 */
.qz-smart-form {
  --lf-surface: var(--surface-inverse, #11151e);
  --lf-surface-soft: color-mix(in srgb, var(--lf-surface) 93%, #000 7%);
  --lf-heading: var(--content-inverse-heading, #f7f7fb);
  --lf-body: var(--content-inverse-body, #c8cad3);
  --lf-muted: color-mix(in srgb, var(--lf-body) 82%, transparent);
  --lf-border: color-mix(in srgb, var(--lf-heading) 11%, transparent);
  --lf-border-strong: color-mix(in srgb, var(--lf-heading) 19%, transparent);
  --lf-accent: color-mix(in srgb, var(--interactive-accent, #6d6af5) 78%, var(--lf-heading) 22%);
  --lf-accent-hover: color-mix(in srgb, var(--interactive-accent-hover, #8582ff) 74%, var(--lf-heading) 26%);
  position: relative;
  width: min(48.75rem, 100%);
  max-height: calc(100svh - var(--nav-height, 4.5rem) - 1.5rem);
  margin-inline: auto;
  padding: clamp(1.5rem, 3vw, 2.125rem);
  border: 1px solid color-mix(in srgb, var(--lf-accent) 20%, var(--lf-surface));
  border-radius: clamp(1.375rem, 2.4vw, 2rem);
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--lf-accent) 10%, transparent), transparent 35%),
    color-mix(in srgb, var(--lf-surface) 97%, transparent);
  box-shadow:
    0 2.125rem 6.25rem color-mix(in srgb, var(--surface-cinematic, #080a0f) 50%, transparent),
    0 1px 0 color-mix(in srgb, var(--lf-heading) 7%, transparent) inset;
  color: var(--lf-heading);
  overflow: hidden;
  overflow-anchor: none;
  isolation: isolate;
}

.qz-smart-form,
.qz-smart-form *,
.qz-smart-form *::before,
.qz-smart-form *::after {
  box-sizing: border-box;
}

.qz-smart-form .lead-form {
  --lf-surface: var(--surface-inverse, #11151e);
  --lf-surface-soft: color-mix(in srgb, var(--lf-surface) 93%, #000 7%);
  --lf-heading: var(--content-inverse-heading, #f7f7fb);
  --lf-body: var(--content-inverse-body, #c8cad3);
  --lf-muted: color-mix(in srgb, var(--lf-body) 82%, transparent);
  --lf-border: color-mix(in srgb, var(--lf-heading) 11%, transparent);
  --lf-border-strong: color-mix(in srgb, var(--lf-heading) 19%, transparent);
  --lf-accent: color-mix(in srgb, var(--interactive-accent, #6d6af5) 78%, var(--lf-heading) 22%);
  --lf-accent-hover: color-mix(in srgb, var(--interactive-accent-hover, #8582ff) 74%, var(--lf-heading) 26%);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.qz-smart-form button,
.qz-smart-form input,
.qz-smart-form textarea,
.qz-smart-form select {
  font: inherit;
}

.qz-smart-form button {
  border: 0;
  cursor: pointer;
}

.qz-smart-form .lf-back {
  background: transparent;
}

.qz-smart-form [hidden] {
  display: none !important;
}

.qz-smart-form[data-qz-smart-form]:not([data-qz-smart-form-mounted]) {
  min-height: 18rem;
}

.qz-smart-form[data-qz-smart-form]:not([data-qz-smart-form-mounted])::before {
  content: "Loading form…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--lf-muted);
  font-size: 0.875rem;
}

.qz-smart-form .lead-form {
  --lf-surface: var(--section-surface);
  --lf-surface-soft: color-mix(in srgb, var(--section-surface) 88%, var(--section-heading) 12%);
  --lf-heading: var(--section-heading);
  --lf-body: var(--section-body);
  --lf-muted: color-mix(in srgb, var(--section-body) 76%, transparent);
  --lf-border: color-mix(in srgb, var(--section-heading) 12%, transparent);
  --lf-border-strong: color-mix(in srgb, var(--section-heading) 22%, transparent);
  --lf-accent: var(--section-accent);
  --lf-accent-hover: var(--section-accent-hover);
  position: relative;
  max-width: 700px;
  margin: 18px auto 8px;
  padding: 26px;
  border: 1px solid var(--lf-border);
  border-radius: 24px;
  background: var(--lf-surface);
  color: var(--lf-heading);
  text-align: left;
}

.qz-smart-form .lf-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  color: var(--lf-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qz-smart-form .lf-progress {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lf-heading) 10%, transparent);
  overflow: hidden;
}

.qz-smart-form .lf-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lf-accent), var(--lf-accent-hover));
  box-shadow: 0 0 16px color-mix(in srgb, var(--lf-accent) 46%, transparent);
  transition: width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.qz-smart-form .lf-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin-top: 12px;
  color: var(--lf-body);
  font-size: 0.82rem;
}

.qz-smart-form .lf-status strong { color: var(--lf-heading); }

.qz-smart-form .lf-start-check {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--lf-accent) 17%, transparent);
  color: var(--lf-accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.qz-smart-form .lf-stage {
  position: relative;
  min-height: 410px;
  margin-top: 32px;
}

.qz-smart-form .lf-step {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.qz-smart-form .lf-step[hidden] { display: none; }
.qz-smart-form .lf-step.is-leaving { opacity: 0; transform: translateY(-12px); }
.qz-smart-form .lf-step.is-leaving.is-reverse { transform: translateY(12px); }
.qz-smart-form .lf-step.is-entering { opacity: 0; transform: translateY(14px); }
.qz-smart-form .lf-step.is-entering.is-reverse { transform: translateY(-14px); }
.qz-smart-form .lf-step.is-entering.is-active { opacity: 1; transform: translateY(0); }

.qz-smart-form .lf-step-kicker {
  margin-bottom: 10px;
  color: var(--lf-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.qz-smart-form .lf-question {
  max-width: 17ch;
  color: var(--lf-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.qz-smart-form .lf-helper {
  max-width: 56ch;
  margin-top: 12px;
  color: var(--lf-body);
  font-size: 0.94rem;
  line-height: 1.5;
}

.qz-smart-form .lf-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.qz-smart-form .lf-choices .lf-choice:last-child:nth-child(odd) { grid-column: 1 / -1; }

.qz-smart-form .lf-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--lf-border);
  border-radius: 18px;
  background: var(--lf-surface-soft);
  color: var(--lf-heading);
  text-align: left;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.qz-smart-form .lf-choice:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--lf-accent) 56%, var(--lf-border));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--tone-black) 11%, transparent);
}

.qz-smart-form .lf-choice:focus-visible,
.qz-smart-form .lf-field input:focus-visible,
.qz-smart-form .lf-consent input:focus-visible,
.qz-smart-form .lf-back:focus-visible,
.qz-smart-form .lf-skip:focus-visible,
.qz-smart-form .lf-review:focus-visible {
  outline: 2px solid var(--lf-accent);
  outline-offset: 3px;
}

.qz-smart-form .lf-choice.is-selected,
.qz-smart-form .lf-choice[aria-pressed="true"] {
  border-color: var(--lf-accent);
  background: color-mix(in srgb, var(--lf-accent) 13%, var(--lf-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lf-accent) 12%, transparent);
}

.qz-smart-form .lf-choice-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--lf-accent) 13%, transparent);
  color: var(--lf-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.qz-smart-form .lf-choice-copy { min-width: 0; }
.qz-smart-form .lf-choice-copy strong { display: block; font-size: 0.96rem; line-height: 1.25; }
.qz-smart-form .lf-choice-copy small { display: block; margin-top: 5px; color: var(--lf-body); font-size: 0.76rem; line-height: 1.35; }
.qz-smart-form .lf-choice-arrow { color: var(--lf-muted); font-size: 1.05rem; transition: transform 0.18s ease, color 0.18s ease; }
.qz-smart-form .lf-choice:hover .lf-choice-arrow,
.qz-smart-form .lf-choice.is-selected .lf-choice-arrow { color: var(--lf-accent); transform: translateX(3px); }

.qz-smart-form .lf-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.qz-smart-form .lf-field { margin-top: 28px; }
.qz-smart-form .lf-field-row .lf-field { margin-top: 0; }

.qz-smart-form .lf-field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--lf-heading);
  font-size: 0.82rem;
  font-weight: 700;
}

.qz-smart-form .lf-field label span { color: var(--lf-muted); font-weight: 500; }

.qz-smart-form .lf-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid var(--lf-border-strong);
  border-radius: 15px;
  background: var(--lf-surface-soft);
  color: var(--lf-heading);
  caret-color: var(--lf-accent);
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.qz-smart-form .lf-field input::placeholder { color: var(--lf-muted); }

.qz-smart-form .lf-field input:focus {
  border-color: var(--lf-accent);
  background: var(--lf-surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lf-accent) 12%, transparent);
  outline: 0;
}

.qz-smart-form .lf-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  margin-top: 20px;
  color: var(--lf-body);
  font-size: 0.78rem;
  line-height: 1.45;
  cursor: pointer;
}

.qz-smart-form .lf-consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--lf-accent);
}

.qz-smart-form .lf-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}

.qz-smart-form .lf-controls-back-only { margin-top: 18px; }
.qz-smart-form .lf-controls-end { display: flex; align-items: center; gap: 12px; }

.qz-smart-form .lf-back,
.qz-smart-form .lf-skip,
.qz-smart-form .lf-review {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  color: var(--lf-body);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.qz-smart-form .lf-back:hover,
.qz-smart-form .lf-skip:hover,
.qz-smart-form .lf-review:hover {
  color: var(--lf-heading);
  text-decoration-color: currentColor;
}

.qz-smart-form .lf-next,
.qz-smart-form .lf-submit,
.qz-smart-form .lf-booking-link {
  min-height: 54px;
  padding-inline: 24px;
  border-radius: 999px;
}

.qz-smart-form .lf-submit { max-width: 330px; line-height: 1.2; }
.qz-smart-form .lf-error { margin-top: 14px; color: var(--interactive-negative); font-size: 0.84rem; line-height: 1.45; }
.qz-smart-form .lf-honeypot { position: fixed !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

.qz-smart-form .lf-complete {
  padding-top: 28px;
  text-align: center;
}

.qz-smart-form .lf-complete .lf-question { margin-inline: auto; }
.qz-smart-form .lf-complete .lf-step-kicker { margin-top: 16px; }

.qz-smart-form .lf-complete-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-inline: auto;
  border-radius: 50%;
  background: color-mix(in srgb, var(--lf-accent) 15%, transparent);
  color: var(--lf-accent);
  font-size: 1.35rem;
  font-weight: 800;
}

.qz-smart-form .lf-done {
  max-width: 42ch;
  margin: 14px auto 0;
  color: var(--lf-body);
  font-size: 0.94rem;
  line-height: 1.5;
}

.qz-smart-form .lf-complete .lf-booking-link { display: flex; width: min(330px, 100%); margin: 24px auto 0; }
.qz-smart-form .lf-review { display: block; margin: 18px auto 0; }
/* ===== V5.8: final lead qualification form ===== */

.qz-smart-form .lead-form,
.qz-smart-form .lf-final-flow {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  margin: 0;
  overflow-anchor: none;
}

.qz-smart-form .lf-progress {
  width: 100%;
  height: 5px;
  margin: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lf-heading) 10%, transparent);
  overflow: hidden;
}

.qz-smart-form .lf-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--lf-accent) 84%, var(--lf-heading) 16%),
    var(--lf-accent)
  );
  box-shadow: 0 0 18px color-mix(in srgb, var(--lf-accent) 30%, transparent);
  transition: width 0.28s ease;
}

.qz-smart-form .lf-stage {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  margin-top: clamp(20px, 3vh, 28px);
}

.qz-smart-form .lf-step {
  width: 100%;
  max-width: 700px;
  margin-inline: auto;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.qz-smart-form .lf-step[hidden] { display: none; }

.qz-smart-form .lf-step.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.qz-smart-form .lf-step.is-entering.is-reverse {
  transform: translateY(-10px);
}

.qz-smart-form .lf-step.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.qz-smart-form .lf-step.is-leaving.is-reverse {
  transform: translateY(8px);
}

.qz-smart-form .lf-question-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.qz-smart-form .lf-question {
  width: 100%;
  max-width: 17ch;
  margin: 0 auto;
  color: var(--lf-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.03;
  text-align: center;
}

.qz-smart-form .lf-question:focus { outline: 0; }

.qz-smart-form .lf-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: clamp(18px, 2.6vh, 24px);
}

.qz-smart-form .lf-choices .lf-choice:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.qz-smart-form .lf-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid var(--lf-border-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--lf-surface-soft) 94%, transparent);
  color: var(--lf-heading);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.qz-smart-form .lf-choice:hover {
  border-color: color-mix(in srgb, var(--lf-accent) 44%, var(--lf-border-strong));
  transform: translateY(-1px);
}

.qz-smart-form .lf-choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.qz-smart-form .lf-choice.is-selected,
.qz-smart-form .lf-choice:has(.lf-choice-input:checked) {
  border-color: color-mix(in srgb, var(--lf-accent) 48%, var(--lf-heading));
  background: var(--lf-heading);
  color: var(--lf-surface);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--lf-heading) 18%, transparent);
}

.qz-smart-form .lf-choice:has(.lf-choice-input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--lf-accent) 42%, transparent);
  outline-offset: 3px;
}

.qz-smart-form .lf-choice-copy {
  min-width: 0;
}

.qz-smart-form .lf-choice-copy strong {
  display: block;
  color: inherit;
  font-size: 0.91rem;
  font-weight: 660;
  line-height: 1.25;
}

.qz-smart-form .lf-choice-mark {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  border: 1px solid var(--lf-border-strong);
  border-radius: 50%;
  background: var(--lf-surface);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.qz-smart-form .lf-choice.is-selected .lf-choice-mark,
.qz-smart-form .lf-choice:has(.lf-choice-input:checked) .lf-choice-mark {
  border-color: var(--lf-accent);
  background: var(--lf-accent);
  transform: scale(1.04);
}

.qz-smart-form .lf-choice.is-selected .lf-choice-mark::after,
.qz-smart-form .lf-choice:has(.lf-choice-input:checked) .lf-choice-mark::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  width: 5px;
  height: 8px;
  border: solid var(--lf-surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.qz-smart-form .lf-field,
.qz-smart-form .lf-field-row {
  margin-top: 18px;
}

.qz-smart-form .lf-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.qz-smart-form .lf-field-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qz-smart-form .lf-field-single {
  width: min(500px, 100%);
  margin-inline: auto;
}

.qz-smart-form .lf-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--lf-heading);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.qz-smart-form .lf-optional {
  color: var(--lf-muted);
  font-weight: 560;
}

.qz-smart-form .lf-field input,
.qz-smart-form .lf-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--lf-border-strong);
  border-radius: 14px;
  background: var(--lf-surface-soft);
  color: var(--lf-heading);
  caret-color: var(--lf-accent);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.qz-smart-form .lf-field textarea {
  min-height: 92px;
  padding-block: 12px;
  line-height: 1.4;
  resize: none;
}

.qz-smart-form .lf-field input::placeholder,
.qz-smart-form .lf-field textarea::placeholder {
  color: color-mix(in srgb, var(--lf-body) 70%, transparent);
}

.qz-smart-form .lf-field input:focus,
.qz-smart-form .lf-field textarea:focus {
  border-color: var(--lf-accent);
  background: var(--lf-surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lf-accent) 12%, transparent);
  outline: 0;
}

.qz-smart-form .lf-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(560px, 100%);
  min-height: 44px;
  margin: 14px auto 0;
  color: var(--lf-body);
  font-size: 0.74rem;
  line-height: 1.4;
  cursor: pointer;
}

.qz-smart-form .lf-consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--lf-accent);
  flex: 0 0 auto;
}

.qz-smart-form .lf-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.qz-smart-form .lf-controls-end-only {
  justify-content: flex-end;
}

.qz-smart-form .lf-back {
  min-width: 74px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  color: var(--lf-body);
  font-size: 0.78rem;
  font-weight: 680;
  text-decoration: none;
}

.qz-smart-form .lf-back:hover { color: var(--lf-heading); }

.qz-smart-form .lf-back:focus-visible,
.qz-smart-form .lf-next:focus-visible,
.qz-smart-form .lf-submit:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--lf-accent) 42%, transparent);
  outline-offset: 3px;
}

.qz-smart-form .lf-next,
.qz-smart-form .lf-submit {
  min-height: 48px;
  padding-inline: 22px;
  border-radius: 999px;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--lf-accent) 22%, transparent);
}

.qz-smart-form .lf-error {
  width: min(700px, 100%);
  min-height: 18px;
  margin: 9px auto 0;
  color: color-mix(in srgb, var(--interactive-negative) 68%, var(--lf-heading) 32%);
  font-size: 0.76rem;
  font-weight: 650;
  text-align: center;
}

@media (max-width: 600px) {

  .qz-smart-form .lf-stage {
    margin-top: 15px;
  }

  .qz-smart-form .lf-question {
    max-width: 18ch;
    font-size: clamp(1.46rem, 7vw, 1.9rem);
  }

  .qz-smart-form .lf-choices {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 14px;
  }

  .qz-smart-form .lf-choices .lf-choice:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .qz-smart-form .lf-choice {
    min-height: 48px;
    padding: 8px 11px;
    border-radius: 13px;
  }

  .qz-smart-form .lf-choice-copy strong {
    font-size: 0.82rem;
  }

  .qz-smart-form .lf-choice-mark {
    width: 18px;
    height: 18px;
  }

  .qz-smart-form .lf-choice.is-selected .lf-choice-mark::after,
  .qz-smart-form .lf-choice:has(.lf-choice-input:checked) .lf-choice-mark::after {
    top: 3px;
    left: 5px;
  }

  .qz-smart-form .lf-field,
  .qz-smart-form .lf-field-row {
    margin-top: 13px;
  }

  .qz-smart-form .lf-field-row,
  .qz-smart-form .lf-field-row-three {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .qz-smart-form .lf-field-row .lf-field {
    margin-top: 0;
  }

  .qz-smart-form .lf-field label {
    margin-bottom: 4px;
    font-size: 0.7rem;
  }

  .qz-smart-form .lf-field input,
  .qz-smart-form .lf-field textarea {
    min-height: 46px;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .qz-smart-form .lf-field textarea {
    min-height: 78px;
  }

  .qz-smart-form .lf-consent {
    margin-top: 11px;
    font-size: 0.7rem;
  }

  .qz-smart-form .lf-controls {
    margin-top: 12px;
  }

  .qz-smart-form .lf-next,
  .qz-smart-form .lf-submit {
    min-height: 46px;
  }
}

@media (max-width: 600px) and (max-height: 670px) {

  .qz-smart-form .lf-stage {
    margin-top: 10px;
  }

  .qz-smart-form .lf-question {
    font-size: 1.35rem;
  }

  .qz-smart-form .lf-choices {
    gap: 4px;
    margin-top: 9px;
  }

  .qz-smart-form .lf-choice {
    min-height: 44px;
    padding-block: 6px;
  }

  .qz-smart-form .lf-field,
  .qz-smart-form .lf-field-row {
    margin-top: 9px;
  }

  .qz-smart-form .lf-field input {
    min-height: 42px;
  }

  .qz-smart-form .lf-field textarea {
    min-height: 68px;
  }

  .qz-smart-form .lf-controls {
    margin-top: 8px;
  }

  .qz-smart-form .lf-consent {
    margin-top: 7px;
    font-size: 0.66rem;
  }
}

@media (max-height: 520px) and (min-width: 601px) {

  .qz-smart-form .lf-stage {
    margin-top: 8px;
  }

  .qz-smart-form .lf-question {
    font-size: 1.3rem;
  }

  .qz-smart-form .lf-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 8px;
  }

  .qz-smart-form .lf-choice {
    min-height: 44px;
    padding: 6px 9px;
  }

  .qz-smart-form .lf-field,
  .qz-smart-form .lf-field-row {
    margin-top: 8px;
  }

  .qz-smart-form .lf-controls {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qz-smart-form .lf-bar,
  .qz-smart-form .lf-choice,
  .qz-smart-form .lf-choice-mark,
  .qz-smart-form .lf-step {
    transition: none;
  }
}

/* ===== V5.9: smart qualification flow ===== */
/* Kept as a final compatibility layer so the routed form can evolve without
   disturbing the established meadow section or the earlier form fallback. */

.qz-smart-form .lf-final-flow,
.qz-smart-form .lf-stage,
.qz-smart-form .lf-step {
  min-height: 0;
}

.qz-smart-form .lf-step {
  align-self: center;
}

.qz-smart-form .lf-contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.qz-smart-form .lf-contact-grid .lf-field {
  min-width: 0;
  margin-top: 0;
}

.qz-smart-form [data-conditional-detail] {
  width: min(560px, 100%);
  margin: 12px auto 0;
  padding: 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--lf-accent) 22%, var(--lf-border));
  border-radius: 15px;
  background: color-mix(in srgb, var(--lf-accent) 5%, var(--lf-surface-soft));
}

.qz-smart-form [data-conditional-detail][hidden],
.qz-smart-form [data-route-panel][hidden],
.qz-smart-form [data-finance-phase][hidden],
.qz-smart-form .lf-error[hidden] {
  display: none;
}

.qz-smart-form [data-conditional-detail] label {
  color: var(--lf-muted);
}

.qz-smart-form [data-conditional-detail] textarea {
  min-height: 72px;
}

.qz-smart-form .lf-consent {
  display: block;
  min-height: 0;
  cursor: default;
  text-align: center;
}

.qz-smart-form .lf-consent a {
  color: var(--lf-heading);
  font-weight: 680;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--lf-accent) 58%, transparent);
  text-underline-offset: 3px;
}

.qz-smart-form .lf-consent a:hover {
  color: var(--lf-accent);
  text-decoration-color: currentColor;
}

.qz-smart-form .lf-field input[readonly] {
  border-color: color-mix(in srgb, var(--lf-accent) 24%, var(--lf-border));
  background: color-mix(in srgb, var(--lf-accent) 5%, var(--lf-surface-soft));
}

.qz-smart-form .lf-next,
.qz-smart-form .lf-submit,
.qz-smart-form .lf-booking-link {
  justify-content: center;
  white-space: nowrap;
}

.qz-smart-form .lf-next:disabled,
.qz-smart-form .lf-submit:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.qz-smart-form .lf-next[aria-busy="true"],
.qz-smart-form .lf-submit[aria-busy="true"] {
  cursor: progress;
  opacity: 0.86;
}

.qz-smart-form .lf-next[aria-busy="true"]::before,
.qz-smart-form .lf-submit[aria-busy="true"]::before {
  content: "";
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.55em;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: lf-smart-spin 0.72s linear infinite;
}

@keyframes lf-smart-spin {
  to { transform: rotate(1turn); }
}

.qz-smart-form .lf-stage:has(.lf-complete:not([hidden])) {
  justify-content: center;
}

.qz-smart-form .lf-complete {
  display: grid;
  justify-items: center;
  align-content: center;
  padding: clamp(10px, 3vh, 28px) 0;
  text-align: center;
}

.qz-smart-form .lf-complete[hidden] {
  display: none;
}

.qz-smart-form .lf-complete-mark {
  width: 60px;
  height: 60px;
  border: 1px solid color-mix(in srgb, var(--lf-accent) 36%, transparent);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--lf-accent) 21%, transparent), transparent 70%);
  box-shadow: 0 0 34px color-mix(in srgb, var(--lf-accent) 19%, transparent);
}

.qz-smart-form .lf-complete .lf-question {
  max-width: 20ch;
  margin-top: 18px;
}

.qz-smart-form .lf-complete .lf-done {
  margin-top: 10px;
}

.qz-smart-form .lf-complete .lf-booking-link {
  align-items: center;
  width: min(310px, 100%);
  margin-top: 22px;
  text-decoration: none;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--lf-accent) 28%, transparent);
}

.qz-smart-form .lf-booking-link span {
  margin-left: 0.45em;
  font-size: 0.9em;
}

.qz-smart-form [id$="-lf-booking-note"] {
  margin-top: 9px;
  color: var(--lf-muted);
  font-size: 0.72rem;
}

@media (max-width: 600px) {

  .qz-smart-form .lf-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 6px;
  }

  .qz-smart-form .lf-contact-grid .lf-field {
    margin-top: 0;
  }

  .qz-smart-form .lf-contact-grid .lf-field label {
    min-height: 1.75em;
    margin-bottom: 3px;
    font-size: 0.65rem;
    line-height: 1.05;
  }

  .qz-smart-form .lf-contact-grid .lf-field input {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.8rem;
  }

  .qz-smart-form .lf-choices-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qz-smart-form .lf-choices-compact .lf-choice:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .qz-smart-form [data-conditional-detail] {
    margin-top: 7px;
    padding: 7px 8px 8px;
    border-radius: 12px;
  }

  .qz-smart-form [data-conditional-detail] textarea {
    min-height: 58px;
  }

  .qz-smart-form .lf-complete-mark {
    width: 52px;
    height: 52px;
  }

  .qz-smart-form .lf-complete .lf-question {
    margin-top: 14px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {

  .qz-smart-form .lf-progress {
    height: 4px;
  }

  .qz-smart-form .lf-stage {
    margin-top: 8px;
  }

  .qz-smart-form .lf-question {
    font-size: 1.2rem;
    line-height: 1;
  }

  .qz-smart-form .lf-choices,
  .qz-smart-form .lf-choices-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 8px;
  }

  .qz-smart-form .lf-choice {
    min-height: 39px;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 10px;
  }

  .qz-smart-form .lf-choice-copy strong {
    font-size: 0.7rem;
    line-height: 1.12;
  }

  .qz-smart-form .lf-choice-mark {
    width: 15px;
    height: 15px;
  }

  .qz-smart-form .lf-choice.is-selected .lf-choice-mark::after,
  .qz-smart-form .lf-choice:has(.lf-choice-input:checked) .lf-choice-mark::after {
    top: 2px;
    left: 4px;
    width: 4px;
    height: 7px;
  }

  .qz-smart-form .lf-contact-grid {
    gap: 4px 5px;
    margin-top: 7px;
  }

  .qz-smart-form .lf-contact-grid .lf-field label {
    min-height: 1.55em;
    margin-bottom: 2px;
    font-size: 0.58rem;
  }

  .qz-smart-form .lf-contact-grid .lf-field input {
    min-height: 36px;
    padding-inline: 8px;
    border-radius: 9px;
    font-size: 0.72rem;
  }

  .qz-smart-form .lf-field,
  .qz-smart-form .lf-field-row {
    margin-top: 7px;
  }

  .qz-smart-form .lf-field label {
    margin-bottom: 3px;
    font-size: 0.64rem;
  }

  .qz-smart-form .lf-field input,
  .qz-smart-form .lf-field textarea {
    min-height: 39px;
    border-radius: 10px;
    font-size: 0.78rem;
  }

  .qz-smart-form .lf-field textarea,
  .qz-smart-form [data-conditional-detail] textarea {
    min-height: 50px;
    padding-block: 7px;
  }

  .qz-smart-form .lf-consent {
    width: 100%;
    margin-top: 5px;
    font-size: 0.55rem;
    line-height: 1.18;
  }

  .qz-smart-form .lf-controls {
    margin-top: 6px;
  }

  .qz-smart-form .lf-back {
    min-height: 34px;
    font-size: 0.66rem;
  }

  .qz-smart-form .lf-next,
  .qz-smart-form .lf-submit,
  .qz-smart-form .lf-booking-link {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 0.72rem;
  }

  .qz-smart-form [data-conditional-detail] {
    margin-top: 5px;
    padding: 5px 6px 6px;
  }

  .qz-smart-form .lf-complete {
    padding-block: 4px;
  }

  .qz-smart-form .lf-complete-mark {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .qz-smart-form .lf-complete .lf-question {
    margin-top: 9px;
  }

  .qz-smart-form .lf-complete .lf-booking-link {
    margin-top: 12px;
  }

  .qz-smart-form .lf-complete .lf-done,
  .qz-smart-form [id$="-lf-booking-note"] {
    margin-top: 6px;
    font-size: 0.66rem;
  }
}

@media (max-height: 440px) and (min-width: 601px) {

  .qz-smart-form .lf-progress {
    height: 3px;
  }

  .qz-smart-form .lf-stage {
    margin-top: 5px;
  }

  .qz-smart-form .lf-question {
    max-width: none;
    font-size: 1.03rem;
    line-height: 1;
  }

  .qz-smart-form .lf-choices,
  .qz-smart-form .lf-choices-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-top: 6px;
  }

  .qz-smart-form .lf-choices .lf-choice:last-child:nth-child(odd),
  .qz-smart-form .lf-choices-compact .lf-choice:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .qz-smart-form .lf-choice {
    min-height: 35px;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 9px;
  }

  .qz-smart-form .lf-choice-copy strong {
    font-size: 0.62rem;
    line-height: 1.08;
  }

  .qz-smart-form .lf-choice-mark {
    width: 14px;
    height: 14px;
  }

  .qz-smart-form .lf-choice.is-selected .lf-choice-mark::after,
  .qz-smart-form .lf-choice:has(.lf-choice-input:checked) .lf-choice-mark::after {
    top: 2px;
    left: 4px;
    width: 3px;
    height: 6px;
    border-width: 0 1.5px 1.5px 0;
  }

  .qz-smart-form .lf-contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px 6px;
    margin-top: 5px;
  }

  .qz-smart-form .lf-contact-grid .lf-field label {
    min-height: 0;
    margin-bottom: 1px;
    font-size: 0.52rem;
    line-height: 1;
  }

  .qz-smart-form .lf-contact-grid .lf-field input {
    min-height: 31px;
    padding-inline: 7px;
    border-radius: 8px;
    font-size: 0.66rem;
  }

  .qz-smart-form .lf-field,
  .qz-smart-form .lf-field-row {
    margin-top: 5px;
  }

  .qz-smart-form .lf-field label {
    margin-bottom: 2px;
    font-size: 0.58rem;
  }

  .qz-smart-form .lf-field input,
  .qz-smart-form .lf-field textarea {
    min-height: 34px;
    border-radius: 8px;
    font-size: 0.68rem;
  }

  .qz-smart-form .lf-field textarea,
  .qz-smart-form [data-conditional-detail] textarea {
    min-height: 39px;
    padding-block: 4px;
    line-height: 1.15;
  }

  .qz-smart-form [data-conditional-detail] {
    margin-top: 4px;
    padding: 4px 5px 5px;
    border-radius: 9px;
  }

  .qz-smart-form .lf-consent {
    width: 100%;
    margin-top: 3px;
    font-size: 0.5rem;
    line-height: 1.1;
  }

  .qz-smart-form .lf-controls {
    margin-top: 4px;
  }

  .qz-smart-form .lf-back {
    min-height: 30px;
    font-size: 0.58rem;
  }

  .qz-smart-form .lf-next,
  .qz-smart-form .lf-submit,
  .qz-smart-form .lf-booking-link {
    min-height: 32px;
    padding-inline: 12px;
    font-size: 0.64rem;
  }

  .qz-smart-form .lf-complete {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 14px;
    padding: 0;
    text-align: left;
  }

  .qz-smart-form .lf-complete-mark {
    grid-row: 1 / 4;
    width: 42px;
    height: 42px;
    margin: 0;
    font-size: 0.9rem;
  }

  .qz-smart-form .lf-complete .lf-question,
  .qz-smart-form .lf-complete .lf-done {
    justify-self: start;
    margin: 0;
    text-align: left;
  }

  .qz-smart-form .lf-complete .lf-booking-link {
    grid-column: 3;
    grid-row: 1 / 3;
    width: auto;
    margin: 0;
  }

  .qz-smart-form [id$="-lf-booking-note"] {
    grid-column: 3;
    grid-row: 3;
    justify-self: center;
    margin: 2px 0 0;
    font-size: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qz-smart-form .lf-next[aria-busy="true"]::before,
  .qz-smart-form .lf-submit[aria-busy="true"]::before {
    animation: none;
  }
}

/* ===== V6: concise, vertically scanned smart intake ===== */
.qz-smart-form .lf-choices,
.qz-smart-form .lf-choices-compact,
.qz-smart-form .lf-entry-choices {
  grid-template-columns: 1fr;
  width: min(620px, 100%);
  margin-inline: auto;
  gap: 7px;
}

.qz-smart-form .lf-choices .lf-choice:last-child:nth-child(odd),
.qz-smart-form .lf-choices-compact .lf-choice:last-child:nth-child(odd),
.qz-smart-form .lf-entry-choices .lf-choice:last-child:nth-child(odd) {
  grid-column: auto;
}

.qz-smart-form .lf-choice {
  min-height: 48px;
  padding: 8px 13px;
}

.qz-smart-form .lf-single-field {
  width: min(540px, 100%);
  margin-inline: auto;
}

.qz-smart-form .lf-name-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(720px, 100%);
  margin-inline: auto;
}

.qz-smart-form .lf-name-grid .lf-field {
  min-width: 0;
  margin-top: 0;
}

.qz-smart-form .lf-controls {
  width: min(620px, 100%);
  margin-inline: auto;
}

.qz-smart-form .lf-field-hint {
  margin: 6px 0 0;
  color: color-mix(in srgb, var(--lf-heading) 55%, transparent);
  font-size: 0.68rem;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .qz-smart-form .lf-choices,
  .qz-smart-form .lf-choices-compact,
  .qz-smart-form .lf-entry-choices {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .qz-smart-form .lf-name-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 6px;
  }

  .qz-smart-form .lf-name-grid .lf-field:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .qz-smart-form .lf-choices,
  .qz-smart-form .lf-choices-compact,
  .qz-smart-form .lf-entry-choices {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .qz-smart-form .lf-choice {
    min-height: 36px;
  }
}

@media (max-height: 440px) and (min-width: 601px) {
  .qz-smart-form .lf-choices,
  .qz-smart-form .lf-choices-compact,
  .qz-smart-form .lf-entry-choices {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    gap: 3px;
  }
}

/* Normal screens keep the single-viewport card. Short/reflowed screens get a
   contained fallback so zoom, landscape, and virtual keyboards cannot clip it. */

/* Keep the vertically scanned list inside one common laptop viewport without
   shrinking the normal desktop presentation. */
@media (min-width: 601px) and (min-height: 521px) and (max-height: 780px) {

  .qz-smart-form .lf-stage {
    margin-top: 13px;
  }

  .qz-smart-form .lf-question {
    font-size: clamp(1.42rem, 2.5vw, 1.8rem);
  }

  .qz-smart-form .lf-choices,
  .qz-smart-form .lf-choices-compact,
  .qz-smart-form .lf-entry-choices {
    gap: 5px;
    margin-top: 12px;
  }

  .qz-smart-form .lf-choice {
    min-height: 42px;
    padding: 6px 11px;
    border-radius: 12px;
  }

  .qz-smart-form .lf-choice-copy strong {
    font-size: 0.82rem;
  }

  .qz-smart-form .lf-field,
  .qz-smart-form .lf-field-row {
    margin-top: 12px;
  }

  .qz-smart-form [data-conditional-detail] {
    margin-top: 7px;
    padding: 7px 9px 9px;
  }

  .qz-smart-form .lf-controls {
    margin-top: 11px;
  }

  .qz-smart-form .lf-back,
  .qz-smart-form .lf-next,
  .qz-smart-form .lf-submit,
  .qz-smart-form .lf-booking-link {
    min-height: 42px;
  }
}

/* Keep the portable card on its inverse palette even when it is mounted inside
 * a light section whose section tokens would otherwise cascade into the form. */
.qz-smart-form .lead-form {
  --lf-surface: var(--surface-inverse, #11151e);
  --lf-surface-soft: color-mix(in srgb, var(--lf-surface) 93%, #000 7%);
  --lf-heading: var(--content-inverse-heading, #f7f7fb);
  --lf-body: var(--content-inverse-body, #c8cad3);
  --lf-muted: color-mix(in srgb, var(--lf-body) 82%, transparent);
  --lf-border: color-mix(in srgb, var(--lf-heading) 11%, transparent);
  --lf-border-strong: color-mix(in srgb, var(--lf-heading) 19%, transparent);
  --lf-accent: color-mix(in srgb, var(--interactive-accent, #6d6af5) 78%, var(--lf-heading) 22%);
  --lf-accent-hover: color-mix(in srgb, var(--interactive-accent-hover, #8582ff) 74%, var(--lf-heading) 26%);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* The form remains a single viewport on normal screens. Short screens and
 * virtual keyboards get a contained scroll fallback instead of clipped fields.
 */
@media (max-height: 43.75rem), (max-width: 37.5rem) and (max-height: 47.5rem) {
  .qz-smart-form {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 37.5rem) {
  .qz-smart-form {
    width: 100%;
    max-height: calc(100svh - var(--nav-height, 4.5rem) - 1rem);
    padding: 1rem;
    border-radius: 1.375rem;
  }

  /* Keep form fields at the mobile browser's non-zooming text size. */
  .qz-smart-form .lf-field input,
  .qz-smart-form .lf-field textarea {
    font-size: 1rem;
  }
}

/* Accessibility floor for compact laptop and short-phone layouts. */
.qz-smart-form .lf-choice {
  min-height: 44px;
}

.qz-smart-form .lf-choice-copy strong {
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .qz-smart-form *,
  .qz-smart-form *::before,
  .qz-smart-form *::after {
    scroll-behavior: auto !important;
  }
}
