/* =========== Wizard de pré-análise — liquid glass =========== */
.wz {
  --wz-hair: rgba(21, 22, 27, .08);
  --wz-hair-2: rgba(21, 22, 27, .14);
  --wz-glass: rgba(255, 255, 255, .5);
  --wz-glass-hi: rgba(255, 255, 255, .78);
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  /* sem backdrop-filter aqui: senão o painel perde o próprio desfoque (backdrop root) */
  background: rgba(28, 22, 20, .34);
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
}
.wz.open { opacity: 1; pointer-events: auto; }

/* luz ambiente atrás do painel (dá o que o vidro refratar) */
.wz-glow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wz-glow span { position: absolute; border-radius: 50%; }
.wz-glow span:nth-child(1) { width: 620px; height: 620px; background: radial-gradient(closest-side, rgba(163,48,59,.45), rgba(163,48,59,0)); left: calc(50% - 570px); top: calc(50% - 460px); }
.wz-glow span:nth-child(2) { width: 560px; height: 560px; background: radial-gradient(closest-side, rgba(217,178,94,.45), rgba(217,178,94,0)); left: calc(50% + 50px); top: calc(50% - 50px); }
.wz-glow span:nth-child(3) { width: 460px; height: 460px; background: radial-gradient(closest-side, rgba(243,230,214,.6), rgba(243,230,214,0)); left: calc(50% - 200px); top: calc(50% - 140px); }

/* painel */
.wz-panel {
  position: relative; isolation: isolate;
  width: 100%; max-width: 720px; height: min(760px, calc(100vh - 48px)); height: min(760px, calc(100dvh - 48px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 252, 247, .72), rgba(250, 245, 238, .62));
  -webkit-backdrop-filter: blur(40px) saturate(190%); backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 0 0 1px rgba(255,255,255,.25) inset,
    0 -1px 0 rgba(193,154,75,.12) inset,
    0 40px 90px -30px rgba(40, 18, 14, .45),
    0 12px 30px -12px rgba(40, 18, 14, .18);
  transform: translateY(24px) scale(.985); transition: transform .6s var(--ease);
}
/* reflexo especular */
.wz-panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(90% 40% at 15% 0%, rgba(255,255,255,.85), rgba(255,255,255,0) 60%),
    radial-gradient(60% 30% at 100% 100%, rgba(193,154,75,.10), transparent 70%);
}
/* filete de luz na borda superior */
.wz-panel::after {
  content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,1), transparent);
}
.wz.open .wz-panel { transform: none; }

/* topo */
.wz-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 16px; }
.wz-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.wz-title .ic {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--bordo);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.55));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px var(--wz-hair), 0 6px 14px -6px rgba(110,18,27,.25);
}
.wz-title .ic .ico { width: 19px; height: 19px; stroke-width: 1.6; }
.wz-title small { display: block; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; }
.wz-title b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-x {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink-2);
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px var(--wz-hair);
  transition: background .3s, transform .4s var(--ease);
}
.wz-x:hover { background: rgba(255,255,255,.9); transform: rotate(90deg); }
.wz-x .ico { width: 15px; height: 15px; }

/* progresso */
.wz-progress { padding: 0 26px 18px; }
.wz-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.wz-meta .blk { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.wz-meta .blk i { font-style: normal; font-weight: 500; color: var(--muted); letter-spacing: .06em; }
.wz-meta .pct { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.wz-meta .pct b { color: var(--ink); font-weight: 600; }
.wz-bar { position: relative; height: 4px; border-radius: 99px; background: rgba(21,22,27,.07); overflow: visible; }
.wz-bar i { position: relative; display: block; height: 100%; border-radius: inherit; transition: width .7s var(--ease);
  background: linear-gradient(90deg, var(--bordo-2), var(--bordo) 55%, var(--gold)); }
.wz-bar i::after { content: ''; position: absolute; right: -1px; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(50%, -50%);
  background: #fff; box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(193,154,75,.8); }

/* corpo */
.wz-body { flex: 1; overflow-y: auto; padding: 28px 26px 32px; overscroll-behavior: contain;
  border-top: 1px solid rgba(255,255,255,.6); }
.wz-one { display: flex; flex-direction: column; }
.wz-screen { margin: auto 0; width: 100%; max-width: 540px; align-self: center; padding: 8px 0 12px; }
.wz-screen.down { animation: wzDown .6s var(--ease) both; }
.wz-screen.up { animation: wzUp .6s var(--ease) both; }
@keyframes wzDown { from { opacity: 0; transform: translateY(28px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wzUp { from { opacity: 0; transform: translateY(-28px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.wz-q { display: grid; gap: 14px; }
.wz-num { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.wz-num::before { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.wz-num i { font-style: normal; color: var(--muted); }
.wz-label { font-family: var(--serif); font-weight: 600; font-size: clamp(23px, 3.1vw, 29px); line-height: 1.25; margin: 0; letter-spacing: -.01em; color: var(--ink); }
.wz-label .optl { font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 4px 9px; border-radius: 99px; border: 1px solid var(--wz-hair-2); vertical-align: middle; margin-left: 4px; }
.wz-hint { margin: -6px 0 8px; color: var(--muted); font-size: 13.5px; }

/* texto */
.wz-input {
  width: 100%; font: inherit; color: var(--ink); outline: none;
  height: 60px; padding: 0 20px; font-size: 19px; border-radius: 16px;
  background: var(--wz-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 1px var(--wz-hair), 0 6px 18px -10px rgba(40,18,14,.18);
  transition: box-shadow .3s, background .3s;
}
.wz-input:focus { background: var(--wz-glass-hi); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(138,28,38,.55), 0 0 0 5px rgba(138,28,38,.08), 0 10px 24px -12px rgba(110,18,27,.3); }
.wz-input::placeholder { color: #b3ada4; }
textarea.wz-input { height: auto; min-height: 130px; padding: 16px 20px; font-size: 16.5px; line-height: 1.55; resize: vertical; }
input[type="date"].wz-input { font-size: 18px; }

/* opções */
.wz-opts { display: grid; gap: 9px; }
.wz-opt {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px 10px 12px; border-radius: 16px; cursor: pointer;
  background: var(--wz-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 1px var(--wz-hair), 0 4px 14px -10px rgba(40,18,14,.2);
  font-size: 15.5px; line-height: 1.35; color: var(--ink);
  transition: background .3s, box-shadow .3s, transform .35s var(--ease); user-select: none;
  animation: optIn .5s var(--ease) both; animation-delay: var(--d, 0ms);
}
@keyframes optIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wz-opt:hover { background: var(--wz-glass-hi); transform: translateY(-1px);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px var(--wz-hair-2), 0 10px 22px -12px rgba(40,18,14,.28); }
.wz-opt input { position: absolute; opacity: 0; pointer-events: none; }

/* tecla */
.wz-opt .key {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--ink-2);
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.6));
  box-shadow: 0 0 0 1px var(--wz-hair-2), 0 1px 0 #fff inset, 0 1.5px 0 rgba(21,22,27,.08);
  transition: all .3s var(--ease);
}
.wz-opt .tx { flex: 1; }
/* indicador à direita */
.wz-opt .mk {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; color: transparent;
  box-shadow: 0 0 0 1.5px var(--wz-hair-2) inset; transition: all .3s var(--ease);
}
.wz-opt.multi .mk { border-radius: 7px; }
.wz-opt .mk .ico { width: 13px; height: 13px; stroke-width: 2.6; transform: scale(.6); transition: transform .3s var(--ease); }

.wz-opt.on {
  background: rgba(255,255,255,.88);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1.5px rgba(138,28,38,.7), 0 12px 26px -14px rgba(110,18,27,.45);
}
.wz-opt.on .key { color: #fff; background: linear-gradient(180deg, #9d2530, var(--bordo-2)); box-shadow: 0 0 0 1px rgba(193,154,75,.6), 0 1px 0 rgba(255,255,255,.25) inset; }
.wz-opt.on .mk { color: #fff; background: var(--bordo); box-shadow: 0 0 0 1px rgba(193,154,75,.55); }
.wz-opt.on .mk .ico { transform: none; }
.wz-opt input:focus-visible ~ .key { box-shadow: 0 0 0 2px rgba(138,28,38,.45); }
.wz-opt.blink { animation: pick .42s var(--ease); }
@keyframes pick { 0% { transform: scale(1); } 40% { transform: scale(.985); } 100% { transform: scale(1); } }

/* consentimento */
.wz-consent {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; cursor: pointer; font-size: 15.5px; line-height: 1.45;
  background: var(--wz-glass); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,.8); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 1px var(--wz-hair);
  transition: all .3s var(--ease);
}
.wz-consent:hover { background: var(--wz-glass-hi); }
.wz-consent input { position: absolute; opacity: 0; pointer-events: none; }
.wz-consent .mk { width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center; color: transparent; background: #fff;
  box-shadow: 0 0 0 1.5px var(--wz-hair-2) inset; transition: all .3s var(--ease); }
.wz-consent .mk .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.wz-consent.on { background: rgba(255,255,255,.88); box-shadow: 0 1px 0 #fff inset, 0 0 0 1.5px rgba(138,28,38,.7); }
.wz-consent.on .mk { background: var(--bordo); color: #fff; box-shadow: 0 0 0 1px rgba(193,154,75,.55); }
.wz-consent a { color: var(--bordo); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }

/* erro */
.err-msg { display: none; align-items: center; gap: 6px; color: #b3122c; font-size: 13px; font-weight: 500; }
.err-msg::before { content: '!'; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; background: #b3122c; }
.wz-q.err .err-msg { display: inline-flex; }
.wz-q.err .wz-input, .wz-q.err .wz-opt, .wz-q.err .wz-consent { box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(179,18,44,.45); }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* rodapé */
.wz-foot {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 26px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.45));
  border-top: 1px solid rgba(255,255,255,.7); box-shadow: 0 -1px 0 var(--wz-hair);
}
.wz-foot .btn { height: 50px; }
.wz-foot .btn-glass { background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px var(--wz-hair); }
.wz-foot .btn-glass:hover { background: rgba(255,255,255,.85); transform: none; }
.wz-foot .btn[disabled] { opacity: .7; pointer-events: none; }
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .02em; color: var(--muted); opacity: 0; transition: opacity .3s; }
.saved .ico { width: 13px; height: 13px; color: #2b8a4b; }
.saved.show { opacity: 1; }
.send-err { position: absolute; left: 24px; right: 24px; top: -34px; color: #b3122c; font-size: 13px; text-align: center; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* intro / fim */
.wz-intro, .wz-done { display: grid; gap: 18px; align-content: start; padding-top: 22px; }
.wz-intro h2, .wz-done h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; margin: 0; }
.wz-lead { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.wz-lead.small { font-size: 15px; color: var(--muted); }
.wz-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-facts span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px; font-size: 13.5px; color: var(--ink-2);
  background: var(--wz-glass); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px var(--wz-hair); }
.wz-facts .ico { width: 16px; height: 16px; color: var(--gold-2); }
.wz-facts b { color: var(--ink); font-weight: 600; }
.wz-list { list-style: none; padding: 20px 22px; margin: 4px 0 0; display: grid; gap: 12px; border-radius: 18px;
  background: var(--wz-glass); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px var(--wz-hair); }
.wz-list li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); }
.wz-list .ico { width: 17px; height: 17px; color: var(--gold-2); margin-top: 3px; stroke-width: 2; }
.ok-badge { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #9d2530, var(--bordo-2)); box-shadow: 0 0 0 1px rgba(193,154,75,.7), 0 0 0 8px rgba(255,255,255,.5), 0 18px 34px -12px rgba(110,18,27,.55);
  animation: pop .6s var(--ease) both; }
.ok-badge .ico { width: 32px; height: 32px; stroke-width: 2; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .wz-screen, .wz-opt { animation: none !important; }
}

@media (max-width: 680px) {
  .wz { padding: 0; place-items: stretch; }
  .wz-glow span:nth-child(1) { left: -160px; top: -120px; }
  .wz-glow span:nth-child(2) { left: auto; right: -180px; top: auto; bottom: -120px; }
  .wz-panel { max-width: none; height: 100%; height: 100dvh; border-radius: 0; border: 0; transform: translateY(40px);
    background: linear-gradient(180deg, rgba(255, 252, 247, .8), rgba(250, 245, 238, .72)); }
  .wz-panel::after { display: none; }
  .wz-head { padding: calc(14px + env(safe-area-inset-top)) 18px 12px; }
  .wz-progress { padding: 0 18px 14px; }
  .wz-body { padding: 20px 18px 24px; }
  .wz-screen { margin: 0; padding-top: 6px; }
  .wz-label { font-size: 23px; }
  .wz-input { font-size: 17px; height: 56px; }
  .wz-opt { min-height: 54px; font-size: 15px; padding-left: 16px; }
  .wz-opt .key { display: none; }
  .wz-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .wz-foot .btn { height: 52px; padding: 0 18px; }
  .wz-foot [data-back] { width: 52px; padding: 0; }
  .wz-foot [data-back] .lbl { display: none; }
  .wz-foot [data-next], .wz-foot a.btn-primary { flex: 1; }
  .saved { display: none; }
}
