/* CasusLab — formulário de qualificação em 2 etapas */
.lead-section { background: linear-gradient(180deg, var(--bg), var(--surface-muted)); }
.lead-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 1024px) { .lead-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; } .lead-aside { position: sticky; top: calc(var(--header-h) + 32px); } }
.lead-aside h2 { outline: none; }
.lead-aside > p { color: var(--text-muted); margin-top: 14px; font-size: 1.06rem; }
.steps-explain { list-style: none; counter-reset: s; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.steps-explain li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; color: var(--text-muted); font-size: .96rem; }
.steps-explain li::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; font-size: .9rem; }
.steps-explain b { color: var(--text); display: block; }
.aside-wa { margin-top: 26px; font-size: .95rem; color: var(--text-muted); }
.aside-wa a { color: var(--teal-ink); font-weight: 700; text-underline-offset: 3px; }

.lead-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 24px 18px 26px; position: relative; overflow: hidden; }
@media (min-width: 768px) { .lead-form { padding: 36px 36px 34px; } }
.progress { position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--surface-muted); }
.progress span { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--teal-ink), var(--teal)); border-radius: 0 4px 4px 0; transition: width .4s var(--ease); }
.step-label { font-family: var(--mono); font-size: .78rem; color: var(--teal-ink); margin-bottom: 20px; }
.no-js-steps .step-label { display: none; }

.js .step[data-step="2"] { display: none; }
.js .lead-form[data-current="2"] .step[data-step="1"] { display: none; }
.js .lead-form[data-current="2"] .step[data-step="2"] { display: block; }
@media (prefers-reduced-motion: no-preference) { .js .lead-form .step { animation: stepIn .3s var(--ease); } }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } }

.q { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.q legend { font-weight: 800; font-size: 1.04rem; margin-bottom: 12px; padding: 0; line-height: 1.35; }
.req, .opt-tag { font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .02em; padding: 2px 7px; border-radius: 5px; vertical-align: 2px; margin-left: 6px; white-space: nowrap; }
.req { background: var(--teal-soft); color: var(--teal-ink); }
.opt-tag { background: var(--surface-muted); color: var(--text-muted); }

.opts { display: grid; gap: 10px; }
.opts-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-card, .chip { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.opt-card input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-card > span { display: grid; gap: 2px; padding: 14px 16px 14px 50px; min-height: 60px; border: 1.5px solid var(--border); border-radius: var(--r-md); transition: border-color .15s, background .15s, box-shadow .15s; position: relative; }
.opt-card > span::before { content: ""; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid #A9BCC9; background: #fff; transition: border .15s, box-shadow .15s; }
.opt-card b { font-size: .98rem; }
.opt-card small { color: var(--text-muted); font-size: .86rem; }
.opt-card:hover > span, .chip:hover > span { border-color: #A9BCC9; }
.opt-card input:checked + span { border-color: var(--teal-ink); background: color-mix(in srgb, var(--teal-soft) 55%, white); box-shadow: 0 0 0 3px rgba(31,176,143,.15); }
.opt-card input:checked + span::before { border: 6px solid var(--teal-ink); }
.opt-card input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--teal-ink); outline-offset: 2px; }

.chip > span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 12px; font-weight: 600; font-size: .94rem; line-height: 1.25; transition: border-color .15s, background .15s, color .15s; }
.chip input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip input[type="checkbox"]:checked + span::before { content: "✓"; color: var(--teal); font-weight: 800; }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }

.field { display: grid; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field label { font-weight: 700; font-size: .95rem; }
.field input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #8DA0B1; }
.field input:hover { border-color: #A9BCC9; }
.field input:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 4px rgba(31,176,143,.18); }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180,35,24,.10); }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-other { margin-top: 12px; }
.js .field-other { display: none; }
.js .field-other.show { display: grid; }

.err { color: var(--danger); font-size: .88rem; font-weight: 600; display: none; align-items: center; gap: 6px; margin-top: 6px; }
.err:not(:empty) { display: flex; }
.err:not(:empty)::before { content: "!"; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.hint { font-size: .86rem; color: var(--text-muted); margin-top: 8px; min-height: 0; }
.hint:empty { display: none; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--text-muted); margin: 4px 0 18px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal-ink); flex: none; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.privacy { font-size: .86rem; color: var(--text-muted); padding: 14px 16px; border-radius: 12px; background: var(--surface-muted); }
.privacy a { color: var(--teal-ink); font-weight: 700; }

.form-error { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: .92rem; }
.form-error:not(:empty) { display: block; }

.form-actions { margin-top: 22px; }
.form-actions.two { display: flex; gap: 12px; flex-wrap: wrap-reverse; }
.form-actions.two [data-submit] { flex: 1 1 240px; }
.form-actions.two [data-back] { flex: 0 0 auto; }
@media (max-width: 479px) { .form-actions.two [data-back] { flex: 1 1 100%; } }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(11,31,59,.25); border-top-color: var(--navy); }
.lead-form.submitting .spinner { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sem JavaScript: as duas etapas aparecem juntas e o envio é um POST comum */
html:not(.js) [data-next], html:not(.js) [data-back], html:not(.js) .step-label, html:not(.js) .progress { display: none; }
