/* ===== Núcleo copiado de /avaliacao/lp.css v48 (cartão, campos, perguntas, final). NÃO editar aqui sem espelhar lá. ===== */

:root {
  --amber: #F7A23B;
  --coral: #FF6B6B;
  --rose:  #F94D9A;
  --grad: linear-gradient(100deg, var(--amber) 0%, var(--coral) 52%, var(--rose) 100%);

  --bg:        #FBF7F1;
  --bg-2:      #EFE7DB;
  --surface:   #FFFFFF;
  --line:      rgba(58, 40, 30, 0.10);
  --line-2:    rgba(58, 40, 30, 0.17);

  --ink:     #231A23;
  --text:    #342A34;
  --muted:   #5E5460;
  --muted-2: #6F6573;
  /* âmbar para TEXTO: o --amber puro some no marfim (contraste 1,9) */
  --amber-ink: #A0520C;
  --warm:      #FFF8EF;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body); color: var(--text); background: var(--bg);
  line-height: 1.5; min-height: 100vh; min-height: 100dvh; position: relative; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Contador REAL (servidor): só aparece com número de verdade e acima do mínimo.
   (Classe .ao-vivo, e não .agora: .agora já é o marco atual da estrada.) */
.ao-vivo { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin: -2px 0 2px; padding: 5px 11px 5px 9px; border-radius: 999px;
  background: #EEF9F1; border: 1px solid rgba(34, 165, 89, 0.28); color: #16603A; font-size: 12.5px; font-weight: 500; }
.ao-vivo i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #22A559; flex: none; }
.ao-vivo i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(34, 165, 89, 0.55); animation: vivo 2s var(--ease) infinite; }
.ao-vivo b { font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; min-width: 1ch; text-align: right; }
.ao-vivo b.tique { animation: tique 0.35s var(--ease); }
@keyframes tique { 0% { transform: translateY(-35%); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
@keyframes vivo { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }


/* ------------------------------- o cartão ------------------------------ */
.palco { position: relative; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px 20px;
  box-shadow: 0 30px 60px -38px rgba(58, 40, 30, 0.34), 0 1px 3px rgba(58, 40, 30, 0.05); }
.panel { display: flex; flex-direction: column; gap: 16px; animation: entra 0.42s var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card-head { display: flex; flex-direction: column; gap: 5px; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.card-sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* A estrada (a evolução do caso). */
.estrada { position: relative; height: 14px; margin: 0 1px; }
.estrada-trilho { position: absolute; left: 5px; right: 6px; top: 50%; height: 2px; transform: translateY(-50%); background: var(--bg-2); border-radius: 2px; overflow: hidden; }
.estrada-fill { height: 100%; width: 0; background: var(--grad); transition: width 0.8s var(--ease); }
.estrada-marcos { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; }
.marco { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--bg-2); flex: none;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; }
.marco.feito { background: linear-gradient(135deg, var(--amber), var(--coral)); border-color: transparent; }
.marco.agora { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(247, 162, 59, 0.15); }
.marco.destino { width: 12px; height: 12px; }
.marco.destino.feito { background: var(--grad); box-shadow: 0 0 0 4px rgba(249, 77, 154, 0.13); }
.estrada-leg { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 18px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.card.sem-estrada .estrada, .card.sem-estrada .estrada-leg { display: none; }
.estrada-leg #estradaPct { color: var(--amber-ink); font-variant-numeric: tabular-nums; }

/* ------------------------------- campos ------------------------------ */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.field-hint { font-weight: 400; color: var(--muted-2); font-size: 13px; }
.field input, .q-text textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px; outline: none; min-height: 50px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .q-text textarea::placeholder { color: #8C8290; }
.field input:focus, .q-text textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(247, 162, 59, 0.14); }
.field.invalid input, .field.invalid .phone { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(249, 77, 154, 0.10); }
.field-err { font-size: 13px; color: #C2185B; }
.field-echo { display: flex; gap: 7px; font-size: 13px; color: var(--muted); }
.field-echo strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* WhatsApp: um campo só, com a bandeira e o +1 dentro, separados por um fio. */
.phone { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s; }
.phone:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(247, 162, 59, 0.14); }
.phone-prefix { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 13px; border-right: 1px solid var(--line);
  font-size: 15.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.phone-prefix .flag, .confirm-box .flag { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.field .phone input { flex: 1; min-width: 0; border: 0; box-shadow: none; background: transparent; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.field .phone input:focus { box-shadow: none; }
.field.invalid .phone input { box-shadow: none; }

/* ------------------------------- botões ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 600;
  font-size: 15.5px; padding: 14px 24px; border-radius: 999px; border: 1px solid transparent; min-height: 50px; letter-spacing: -0.005em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s, opacity 0.2s; white-space: nowrap; }
.btn-lg { width: 100%; font-size: 16px; min-height: 54px; }
.btn-primary { background: var(--grad); color: #1a1020; box-shadow: 0 12px 26px -16px rgba(249, 77, 154, 0.55); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -16px rgba(249, 77, 154, 0.65); }
.btn-primary:active { transform: none; }
.btn-primary[disabled] { opacity: 0.55; cursor: progress; transform: none; box-shadow: none; }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .opt:focus-visible, .chip:focus-visible, .link-edit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--amber); }

.fine { display: flex; gap: 8px; align-items: flex-start; color: var(--muted-2); font-size: 13px; line-height: 1.5; }
.fine svg { width: 13px; height: 13px; color: var(--amber-ink); flex: none; margin-top: 3px; }
.fine strong { color: var(--text); font-weight: 600; }
.fine a { color: var(--muted); border-bottom: 1px solid var(--line-2); }
/* O que acontece depois do clique. */
.depois { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: -4px; }
.depois svg { width: 14px; height: 14px; flex: none; margin-top: 2px; fill: none; stroke: var(--amber-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.depois strong { color: var(--text); font-weight: 600; }

/* --------------------------- confirma número -------------------------- */
.confirm-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--warm); }
.confirm-num { flex: 1; min-width: 0; font-size: 19px; font-weight: 500; color: var(--ink); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-edit { align-self: center; font-size: 14px; color: var(--muted); font-weight: 500; padding: 12px 8px; min-height: 44px; }
.link-edit:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------ perguntas ---------------------------- */
.q { display: flex; flex-direction: column; gap: 16px; }
.q.swap { animation: desliza 0.4s var(--ease) both; }
.q.swap.back { animation-name: deslizaVolta; }
@keyframes desliza { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes deslizaVolta { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.q-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.22; color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; }
.q-help { color: var(--muted); font-size: 14px; margin-top: -8px; }
.q-options { display: flex; flex-direction: column; gap: 9px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  padding: 14px 15px 14px 16px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-size: 15.5px; line-height: 1.3; font-weight: 500; min-height: 54px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s; }
.opt:hover { border-color: rgba(247, 162, 59, 0.7); }
.opt.on { border-color: var(--amber); background: var(--warm); box-shadow: 0 0 0 3px rgba(247, 162, 59, 0.13); }
.opt-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: all 0.18s; }
.opt-dot svg { width: 12px; height: 12px; opacity: 0; color: #fff; }
.opt.on .opt-dot { background: linear-gradient(135deg, var(--amber), var(--coral)); border-color: transparent; }
.opt.on .opt-dot svg { opacity: 1; }
.opt[disabled] { cursor: default; }
.q-text { display: flex; flex-direction: column; gap: 10px; }
.q-text-label { font-size: 13px; font-weight: 500; color: var(--ink); display: flex; gap: 8px; align-items: baseline; }
.q-text textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.q-nav { display: flex; justify-content: flex-start; min-height: 20px; }
.link-back { color: var(--muted); font-size: 14px; padding: 12px 4px; margin: -10px 0 -8px; min-height: 44px; }
.link-back:hover { color: var(--ink); }

/* ------------------------------- enviando ---------------------------- */
.panel-sending { align-items: center; padding: 26px 0 18px; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg-2); border-top-color: var(--amber); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------ mensagem de confiança ----------------------- */
.nota { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 13px 14px; border-radius: 14px;
  background: var(--warm); border: 1px solid rgba(247, 162, 59, 0.24); }
.panel-done .nota { margin-top: 0; }
.nota.entra { animation: notaEntra 0.55s var(--ease) both; }
@keyframes notaEntra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nota-selo { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid rgba(247, 162, 59, 0.3); display: grid; place-items: center; }
.nota-selo svg { width: 15px; height: 15px; }
.nota-txt { font-size: 14px; line-height: 1.55; color: var(--text); padding-top: 3px; }
.nota-txt strong { color: var(--ink); font-weight: 600; }

/* -------------------------------- concluído --------------------------- */
.done-kicker { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-ink); }
.done-kicker svg { width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--coral));
  fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.panel-done .card-title { font-size: 24px; }
.perfil-rot { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: -8px; }
.perfil { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.perfil div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.perfil dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); }
.perfil dd { font-size: 15px; font-weight: 500; color: var(--ink); min-width: 0; font-variant-numeric: tabular-nums; }
.done-next { font-size: 14.5px; color: var(--muted); }
.when { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.when-label { font-weight: 500; color: var(--ink); font-size: 15px; text-align: center; }
/* 2 x 2: nenhum horário fica sozinho numa linha. */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; min-height: 44px; transition: all 0.18s; }
.chip:hover { border-color: var(--amber); }
.chip.on { background: var(--grad); border-color: transparent; color: #1a1020; font-weight: 600; }
.when-ok { text-align: center; color: var(--muted); font-size: 13.5px; }
.wa-box { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.wa-label { text-align: center; font-weight: 500; color: var(--ink); font-size: 15px; }
.wa { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 14px 22px;
  border-radius: 999px; background: #25D366; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 16px; text-align: center;
  box-shadow: 0 12px 26px -16px rgba(37, 211, 102, 0.8); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s; }
.wa svg { width: 20px; height: 20px; fill: #fff; flex: none; }
.wa:hover { background: #20C05C; transform: translateY(-1px); }
.wa:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }


.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 5; background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 12px; font-size: 14px; max-width: min(92vw, 420px); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.45); }
