.lead-modal-open,
.lead-modal-open body { overflow: hidden; }

.lead-dialog {
  width: min(940px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(8, 32, 36, 0.3);
  overflow: hidden;
}
.lead-dialog::backdrop { background: rgba(10, 35, 39, 0.64); backdrop-filter: blur(6px); }
.lead-dialog [hidden] { display: none !important; }
.lead-shell { position: relative; display: grid; grid-template-columns: 0.82fr 1.18fr; height: min(720px, calc(100dvh - 48px)); }
.lead-dialog svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.lead-close { position: absolute; z-index: 3; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eff7f5; color: var(--deep); cursor: pointer; transition: background 180ms ease; }
.lead-close:hover { background: #d9efea; }
.lead-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 36px; overflow: hidden; background: radial-gradient(circle at 0 0, rgba(137,234,230,0.3), transparent 58%), linear-gradient(155deg, #267276, #16373c 65%); color: #fff; }
.lead-story::after { content: ""; position: absolute; right: -90px; bottom: 110px; width: 330px; height: 330px; background: url('./assets/background_logo.webp') center / contain no-repeat; opacity: 0.08; pointer-events: none; }
.lead-story > * { position: relative; z-index: 1; }
.lead-brand { gap: 10px; }
.lead-brand img { width: 44px; height: 44px; }
.lead-brand strong { font-size: 25px; }
.lead-brand small { font-size: 10px; letter-spacing: 0.08em; }
.lead-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.17em; color: #b7eeea; }
.lead-story-copy h2 { margin: 20px 0; font-size: 46px; line-height: 1.08; letter-spacing: -0.05em; }
.lead-story-copy h2 em { color: var(--mint); font-style: normal; }
.lead-story-copy > p { margin: 0; font-size: 16px; line-height: 1.65; color: #d3e6e4; }
.lead-story-copy ul { display: grid; gap: 14px; list-style: none; margin: 28px 0 0; padding: 0; }
.lead-story-copy li { position: relative; padding-left: 22px; color: #e3f0ef; font-size: 12px; line-height: 1.5; }
.lead-story-copy li::before { content: '✓'; position: absolute; left: 0; color: var(--mint); }
.lead-person { display: flex; align-items: center; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(137,234,230,0.25); }
.lead-person img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: center 22%; background: #c7f1eb; }
.lead-person strong { display: block; font-size: 11px; line-height: 1.5; }
.lead-person span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.5; color: #bfd9d6; }
.lead-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.lead-heading { padding: 36px 36px 22px; flex-shrink: 0; }
.lead-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-right: 36px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.lead-progress-meta > span:first-child { font-weight: 800; color: #287c78; letter-spacing: 0.12em; }
.lead-progress-meta > span:last-child { white-space: nowrap; }
.lead-progress { height: 4px; margin: 18px 0 26px; overflow: hidden; border-radius: 99px; background: #e4efec; --lead-progress: 20%; }
.lead-progress > span { display: block; width: var(--lead-progress); height: 100%; border-radius: inherit; background: #287c78; transition: width 200ms ease; }
.lead-heading h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.18; letter-spacing: -0.04em; color: var(--deep); }
.lead-heading p { margin: 0; max-width: 380px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.lead-form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.lead-form-body { flex: 1; overflow-y: auto; min-height: 0; padding: 2px 36px 24px; overscroll-behavior: contain; scrollbar-width: thin; }
.lead-options { padding: 0; margin: 0; min-width: 0; border: 0; }
.lead-purpose { display: grid; gap: 12px; }
.lead-purpose .lead-choice-content { min-height: 88px; }
.lead-choice { position: relative; display: block; cursor: pointer; min-width: 0; }
.lead-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lead-choice-content { display: flex; align-items: center; gap: 12px; min-height: 94px; padding: 16px; color: var(--deep); background: #fbfdfc; border: 1px solid #b6ceca; border-radius: 14px; transition: border-color 150ms ease, background 150ms ease; }
.lead-choice-content > span:not(.lead-choice-icon, .lead-choice-check) { flex: 1; min-width: 0; }
.lead-choice-content strong { display: block; font-size: 14px; line-height: 1.45; }
.lead-choice-explain .lead-choice-content strong { color: #287c78; }
.lead-choice-content small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.lead-choice-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; color: #287c78; border-radius: 12px; background: #e8f3ef; }
.lead-choice-check { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border: 1px solid #789e97; border-radius: 50%; background: #fff; }
.lead-choice > input:checked + .lead-choice-content { border-color: #287c78; box-shadow: inset 0 0 0 1px #287c78; background: #eaf7f2; }
.lead-choice > input:checked + .lead-choice-content .lead-choice-check { background: #287c78; border-color: #287c78; }
.lead-choice > input:checked + .lead-choice-content .lead-choice-check::after { content: ''; width: 8px; height: 4px; margin-top: -2px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); }
.lead-choice:hover .lead-choice-content { border-color: #287c78; background: #f0f9f5; }
.lead-reassurance { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.lead-reassurance svg { width: 17px; height: 17px; color: #287c78; }
.lead-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lead-services .lead-choice-content { position: relative; flex-direction: column; justify-content: center; gap: 8px; min-height: 150px; padding: 18px 8px; text-align: center; }
.lead-services .lead-choice-content > svg { color: #287c78; width: 28px; height: 28px; }
.lead-services .lead-choice-content strong { font-size: 13px; }
.lead-services .lead-choice-content small { min-height: 36px; margin: 0; font-size: 11px; }
.lead-services .lead-choice-check { width: 17px; height: 17px; flex-basis: 17px; }
.lead-timing { margin-top: 26px; }
.lead-timing legend { margin-bottom: 14px; padding: 0; color: var(--deep); font-size: 14px; font-weight: 700; line-height: 1.5; }
.lead-timing legend small { font-size: 11px; font-weight: 400; color: var(--muted); }
.lead-timing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lead-timing .lead-choice-content { min-height: 70px; padding: 12px; justify-content: space-between; gap: 8px; border-radius: 10px; }
.lead-timing .lead-choice-content strong { font-size: 12px; font-weight: 500; }
.lead-timing .lead-choice-check { width: 17px; height: 17px; flex-basis: 17px; }
.lead-qualifiers { display: grid; gap: 10px; }
.lead-qualifiers .lead-choice-content { min-height: 58px; padding: 14px 16px; justify-content: space-between; }
.lead-qualifiers .lead-choice-content strong { font-size: 13px; font-weight: 500; }
.lead-summary { margin-bottom: 22px; padding: 12px 14px; color: #23605d; border-radius: 10px; background: #edf7f3; font-size: 12px; line-height: 1.6; white-space: pre-line; }
.lead-field { display: grid; gap: 8px; margin-bottom: 18px; }
.lead-field > label { font-size: 13px; font-weight: 700; color: var(--deep); }
.lead-field > input { width: 100%; min-width: 0; min-height: 50px; padding: 12px 14px; border: 1px solid #a9c3c0; border-radius: 10px; background: #fbfdfc; font: inherit; font-size: 16px; color: var(--ink); }
.lead-field > input::placeholder { color: #6a7f7b; opacity: 1; }
.lead-field > input[aria-invalid='true'] { border-color: #aa3737; background: #fffafa; }
.lead-consent { display: flex; align-items: start; gap: 10px; cursor: pointer; }
.lead-consent input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: #287c78; margin: 1px 0 0; cursor: pointer; }
.lead-consent span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.lead-consent a { color: var(--deep); text-decoration: underline; text-underline-offset: 3px; }
.lead-contact-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.lead-error, .lead-field-error { display: block; margin: 8px 0 0; color: #a33232; font-size: 12px; line-height: 1.5; }
.lead-error { margin-top: 18px; padding: 12px; border-radius: 8px; background: #fff0ee; }
.lead-actions { flex-shrink: 0; padding: 20px 36px; border-top: 1px solid #e2ece8; background: #fff; }
.lead-actions-row { display: flex; gap: 12px; align-items: center; }
.lead-next, .lead-back { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lead-next { flex: 1; justify-content: space-between; border: 1px solid var(--deep); border-radius: 12px; padding: 14px 20px; background: var(--deep); color: #fff; transition: background 180ms ease; }
.lead-next:hover:not(:disabled) { background: #25616a; }
.lead-next:disabled { opacity: 0.5; cursor: not-allowed; }
.lead-whatsapp { text-decoration: none; }
.lead-next.is-secondary { flex: 0 0 auto; background: transparent; color: var(--deep); border-color: transparent; padding-inline: 10px; }
.lead-next.is-secondary > svg { display: none; }
.lead-next.is-secondary:hover:not(:disabled) { background: #edf7f3; }
.lead-whatsapp-message { margin: 20px 0; padding: 16px; border-left: 3px solid #287c78; border-radius: 0 10px 10px 0; background: #edf7f3; color: var(--deep); font-size: 13px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.lead-main { position: relative; }
.lead-success .lead-review-icon { width: 60px; height: 60px; }
.lead-success .lead-review-icon svg { width: 30px; height: 30px; }
.lead-success h3 { margin: 18px 0 8px; color: var(--deep); font-size: 19px; line-height: 1.3; }
.lead-success > p { margin: 10px 0; }
.lead-success #lead-whatsapp-sharing { font-size: 12px; }
.lead-confetti { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.lead-confetti > span { position: absolute; top: 40%; left: 50%; width: 6px; height: 10px; border-radius: 1px; animation: lead-receipt-confetti var(--confetti-duration) cubic-bezier(.16,.65,.35,1) both; }
@keyframes lead-receipt-confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(var(--confetti-x), var(--confetti-y)) rotate(var(--confetti-spin)); opacity: 1; }
  100% { transform: translate(var(--confetti-x), 180px) rotate(var(--confetti-spin)); opacity: 0; }
}
.lead-back { padding: 10px 4px; border: 0; background: transparent; color: var(--deep); font-size: 12px; }
.lead-back svg { width: 16px; height: 16px; }
.lead-actions > p { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.lead-review-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #e2f4eb; color: #287c78; }
.lead-review > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.lead-review dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 20px 0; border: 1px solid #c8dcd5; border-radius: 12px; overflow: hidden; background: #e2ece8; }
.lead-review dl > div { min-width: 0; padding: 12px 14px; background: #fff; }
.lead-review dt { font-size: 11px; color: var(--muted); }
.lead-review dd { margin: 5px 0 0; font-size: 13px; color: var(--deep); line-height: 1.5; overflow-wrap: anywhere; }
.lead-review .lead-preview-note { font-size: 12px; }
.lead-dialog :is(button, a, input):focus-visible, .lead-choice input:focus-visible + .lead-choice-content { outline: 3px solid #287c78; outline-offset: 3px; }
.lead-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lead-noscript { padding: 24px; margin: 0; background: #eff9f5; text-align: center; }
.lead-noscript a { text-decoration: underline; }

@media (max-width: 700px) {
  .lead-dialog { width: min(540px, calc(100% - 20px)); max-height: calc(100dvh - 20px); border-radius: 20px; }
  .lead-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: min(800px, calc(100dvh - 20px)); }
  .lead-story { padding: 16px 20px; gap: 0; }
  .lead-story-copy, .lead-person, .lead-story::after { display: none; }
  .lead-brand img { width: 34px; height: 34px; }
  .lead-brand strong { font-size: 20px; }
  .lead-brand small { font-size: 8px; }
  .lead-close { top: 12px; right: 12px; color: #fff; background: rgba(255,255,255,0.12); }
  .lead-close:hover { background: rgba(255,255,255,0.22); }
  .lead-heading { padding: 24px 20px 18px; }
  .lead-progress-meta { margin-right: 0; font-size: 9px; }
  .lead-progress { margin: 14px 0 22px; }
  .lead-heading h2 { font-size: 25px; }
  .lead-heading p { font-size: 13px; }
  .lead-form-body { padding: 2px 20px 20px; }
  .lead-choice-content { gap: 10px; padding: 14px 12px; min-height: 90px; }
  .lead-choice-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
  .lead-choice-icon svg { width: 20px; height: 20px; }
  .lead-choice-content strong { font-size: 13px; }
  .lead-choice-content small { font-size: 11px; }
  .lead-services { gap: 7px; }
  .lead-services .lead-choice-content { min-height: 140px; padding: 16px 5px; }
  .lead-services .lead-choice-content strong { font-size: 12px; }
  .lead-services .lead-choice-content small { font-size: 10px; }
  .lead-timing-grid { gap: 8px; }
  .lead-timing .lead-choice-content { padding: 10px; }
  .lead-timing .lead-choice-content strong { font-size: 11px; }
  .lead-actions { padding: 16px 20px max(16px, env(safe-area-inset-bottom)); }
  .lead-next { font-size: 13px; padding: 14px 16px; }
  .lead-actions > p { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .lead-confetti { display: none; }
  .lead-confetti > span { animation: none; }
  .lead-dialog *, .lead-dialog *::before, .lead-dialog *::after { transition: none; }
}

@media (max-width: 390px) {
  .lead-actions-row:has(.lead-whatsapp:not([hidden])) { flex-wrap: wrap; gap: 4px; }
  .lead-whatsapp, .lead-next.is-secondary { flex-basis: 100%; }
  .lead-next.is-secondary { justify-content: center; }
}
