:root {
  --preto: #0d0d0d;
  --marinho: #0d0d0d;
  --tinta: #141414;
  --texto: #2b2f36;
  --suave: #6b7280;
  --linha: #e7e8ec;
  --bolha: #f3f4f6;
  /* Paleta da marca Destrave Escale Mentoria (destrave-escale/docs/replicas/mentoria/design.md) */
  --laranja: #FF8822;
  --laranja-escuro: #D9650A;
  --laranja-claro: #FFF3E8;
  --gradiente: linear-gradient(135deg, #FF8A1F 0%, #E5650B 100%);
  --verde: #16a34a;
  --fundo: #ffffff;
  --raio: 18px;
  --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--laranja);
  /* Laterais iguais: a trilha fica no centro da tela mesmo com o logo mais largo que o contador. */
  display: grid; grid-template-columns: 1fr minmax(0, 420px) 1fr; align-items: center; gap: 16px;
  padding: 14px max(20px, env(safe-area-inset-left)); background: var(--marinho); color: #fff;
}
.marca { justify-self: start; display: flex; align-items: center; }
/* Logo "destrave escale MENTORIA": parte esquerda do logo da Mentoria Full, sem o FULL (serve para Full e Pro). */
.marca img { height: 36px; width: auto; display: block; }
.marca-e { color: var(--laranja); }
.trilha { display: flex; align-items: center; width: 100%; max-width: 420px; justify-self: center; min-width: 0; }
.trilha .ponto {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  border: 1.5px solid rgba(255,255,255,.45); background: transparent; transition: all .35s ease;
}
.trilha .ponto.feito { background: var(--laranja); border-color: var(--laranja); }
.trilha .ponto.atual { background: var(--laranja); border-color: var(--laranja); box-shadow: 0 0 0 4px rgba(255,136,34,.28); }
.trilha .traco { flex: 1; height: 1.5px; background: rgba(255,255,255,.22); position: relative; overflow: hidden; }
.trilha .traco i { position: absolute; inset: 0; width: 0; background: var(--laranja); transition: width .5s ease; }
.contador { justify-self: end; font-size: 13px; color: rgba(255,255,255,.55); white-space: nowrap; }
.contador strong { font-size: 26px; color: #fff; font-weight: 700; margin-right: 4px; vertical-align: -3px; }

/* ---------- Conversa ---------- */
.chat, .entrada { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.chat { padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.entrada { padding-bottom: 32px; flex: 1; }

.linha { display: flex; gap: 12px; align-items: flex-end; animation: entra .35s ease both; }
.linha.bot { padding-right: 48px; }
.linha.eu { justify-content: flex-end; padding-left: 64px; }
.linha.continua .avatar { visibility: hidden; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--laranja); background: var(--bolha);
}
.bolha { padding: 12px 16px; border-radius: var(--raio); max-width: 100%; overflow-wrap: anywhere; }
.bot .bolha { background: var(--bolha); color: var(--tinta); border-bottom-left-radius: 6px; }
.eu .bolha { background: var(--gradiente); color: #fff; box-shadow: 0 4px 14px rgba(229,101,11,.25); border-bottom-right-radius: 6px; font-weight: 500; }
.bolha p { margin: 0; }
.bolha p + p { margin-top: 10px; }
.bolha strong { font-weight: 700; }
.bot .bolha strong { color: var(--laranja-escuro); }
.bolha a { color: var(--laranja-escuro); font-weight: 600; }

.digitando { display: inline-flex; gap: 4px; padding: 16px 18px; }
.digitando i { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; animation: pula 1.1s infinite ease-in-out; }
.digitando i:nth-child(2) { animation-delay: .15s; }
.digitando i:nth-child(3) { animation-delay: .3s; }

.analisando { display: flex; align-items: center; gap: 10px; }
.analisando::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid #d1d5db; border-top-color: var(--laranja); animation: gira .8s linear infinite;
}

/* ---------- Entradas ---------- */
.opcoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; animation: entra .3s ease both; }
.opcoes.coluna { flex-direction: column; align-items: stretch; margin-left: auto; max-width: 420px; }
.opcao {
  font: inherit; font-weight: 600; cursor: pointer; text-align: left;
  padding: 12px 18px; border-radius: 14px; border: 1.5px solid var(--laranja);
  background: #fff; color: var(--laranja-escuro); transition: background .15s, color .15s, transform .1s;
}
.opcao:active { transform: scale(.98); }
.opcao.destaque { background: var(--gradiente); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(229,101,11,.3); }
.opcao:disabled { opacity: .5; cursor: default; }

.seletor {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 420px; margin: 14px 0 0 auto; padding: 14px 18px;
  font: inherit; color: var(--suave); background: #fff; cursor: pointer;
  border: 1px solid var(--linha); border-radius: 14px; box-shadow: var(--sombra);
  animation: entra .3s ease both;
}
.seletor::after { content: "⌄"; font-size: 20px; line-height: 1; margin-top: -6px; color: var(--laranja); }

.campo { margin: 14px 0 0 auto; max-width: 460px; animation: entra .3s ease both; }
.campo label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--laranja-escuro); text-transform: uppercase; margin: 0 0 6px 18px; }
.campo form { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; background: #fff; border: 1.5px solid var(--linha); border-radius: 999px; box-shadow: var(--sombra); transition: border-color .15s; }
.campo form:focus-within { border-color: var(--laranja); box-shadow: 0 0 0 4px rgba(255,136,34,.18); }
.campo input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; color: var(--tinta); background: transparent; padding: 8px 0; }
.campo input::placeholder { color: #9095a0; }
.enviar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  background: var(--gradiente); color: #fff; font-size: 18px; display: grid; place-items: center;
  transition: opacity .15s;
}
.enviar:disabled { opacity: .25; cursor: default; }
.campo .erro { color: #b42318; font-size: 14px; margin: 8px 18px 0; }

/* ---------- Folha de opções (listas longas) ---------- */
.folha { position: fixed; inset: 0; z-index: 20; background: #fff; display: flex; flex-direction: column; animation: sobe .25s ease both; }
.folha[hidden] { display: none; }
.folha-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 20px 16px; border-bottom: 1px solid var(--linha); }
.folha-topo h2 { margin: 0; font-size: 20px; color: var(--tinta); }
.folha-topo p { margin: 2px 0 0; color: var(--suave); font-size: 14px; }
.folha-fechar { border: 0; background: var(--bolha); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.folha-opcoes { overflow-y: auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 480px; margin: 0 auto; }
.folha-opcoes button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: inherit; font-weight: 500; text-align: left; color: var(--tinta); cursor: pointer;
  padding: 16px 18px; background: #fff; border: 1px solid var(--linha); border-radius: 14px; box-shadow: var(--sombra);
}
.folha-opcoes button::after { content: "›"; color: #9ca3af; font-size: 22px; line-height: 1; }

/* ---------- Resultado ---------- */
.cartao {
  margin: 8px 0 0 52px; padding: 22px; border-radius: 20px; color: #fff; animation: entra .4s ease both;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,136,34,.35), transparent 55%), var(--marinho);
}
.cartao .selo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--gradiente); padding: 5px 12px; border-radius: 99px; }
.cartao h3 { margin: 10px 0 6px; font-size: 22px; line-height: 1.25; }
.cartao p { margin: 0; color: rgba(255,255,255,.78); }
.cartao .passos { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cartao .passos li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,.9); }
.cartao .passos b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--laranja); color: #fff; display: grid; place-items: center; font-size: 12px; }

.rodape { text-align: center; font-size: 12px; color: var(--suave); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.rodape a { color: var(--suave); }

@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sobe { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pula { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes gira { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  /* Celular: só logo e contador; a trilha de pontos apertava o topo. */
  .topo { grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; }
  .trilha { display: none; }
  .marca img { height: 32px; }
  .contador strong { font-size: 22px; }
  .status { margin-left: 0; }
  .linha.bot { padding-right: 16px; }
  .linha.eu { padding-left: 40px; }
  .avatar { width: 34px; height: 34px; }
  .cartao { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Status entre perguntas, como na referência */
.status { display: inline-flex; flex-direction: column; gap: 6px; margin: 2px 0 2px 52px; animation: entra .3s ease both; }
.status span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--suave); }
.status span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d1d5db; border-top-color: var(--laranja); animation: gira .8s linear infinite; }
.status span.ok::before { animation: none; border: 0; content: "✓"; color: var(--verde); font-weight: 700; width: auto; height: auto; }
.status span + span { padding: 8px 12px; background: #fff; border: 1px solid var(--linha); border-radius: 10px; box-shadow: var(--sombra); }

/* Checklist da análise */
.checklist { display: grid; gap: 8px; padding: 4px 0; }
.checklist div { display: flex; gap: 10px; align-items: center; color: var(--suave); transition: color .3s; }
.checklist div::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #d1d5db; border-top-color: var(--laranja); animation: gira .8s linear infinite; flex: none; }
.checklist div.ok { color: var(--tinta); font-weight: 500; }
.checklist div.ok::before { animation: none; border: 0; background: var(--verde); color: #fff; content: "✓"; display: grid; place-items: center; font-size: 11px; font-weight: 700; width: 18px; height: 18px; }

/* Resultado personalizado */
.cartao .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.cartao .chips span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.1); color: #fff; }
.cartao h4 { margin: 18px 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.cartao .sdr { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.07); }
.cartao .sdr .inicial { width: 40px; height: 40px; border-radius: 50%; background: var(--gradiente); display: grid; place-items: center; font-weight: 700; flex: none; }
.cartao .sdr small { display: block; color: rgba(255,255,255,.6); }
.cartao .cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 14px; border-radius: 12px; background: #25d366; color: #0d0d0d; font-weight: 700; text-decoration: none; }

/* Lista de opções na conversa (substitui o pop-up) */
.opcoes.lista { flex-direction: column; align-items: stretch; margin-left: auto; max-width: 420px; gap: 8px; }
.opcoes.lista .opcao {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--tinta);
  border: 1px solid var(--linha); box-shadow: var(--sombra); font-weight: 500; padding: 14px 16px;
}
.opcoes.lista .opcao::after { content: "›"; color: #9ca3af; font-size: 20px; line-height: 1; }

/* Múltipla escolha (onde vende): quadradinho de marcar, sem a seta das listas de uma opção */
.opcoes.multipla .opcao[data-v] { justify-content: flex-start; gap: 12px; text-align: left; }
.opcoes.multipla .opcao[data-v]::after { content: none; }
.opcoes.multipla .opcao[data-v]::before {
  content: ''; flex: none; width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid #c4c8d0; background: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; line-height: 1; color: #fff; transition: all .15s ease;
}
.opcoes.multipla .opcao.marcada { background: var(--laranja-claro); border-color: var(--laranja); color: var(--laranja-escuro); font-weight: 600; }
.opcoes.multipla .opcao.marcada::before { content: '✓'; background: var(--laranja); border-color: var(--laranja); }
.opcoes.multipla .confirmar { margin-top: 6px; justify-content: center; }
.opcoes.multipla .confirmar::after { content: none; }
.opcoes.multipla .confirmar:disabled { opacity: .45; cursor: default; }

/* Página de obrigado: vídeo, nota e dúvidas */
.cartao .nota { margin-top: 8px; font-size: 13px; color: rgba(255,255,255,.6); text-align: center; }
.cartao .video { margin-top: 16px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.cartao .video iframe { width: 100%; height: 100%; border: 0; }
.cartao .video.vazio { display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; border: 1px dashed rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.cartao .video .play { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gradiente); color: #fff; font-size: 18px; }
.cartao .video small { color: rgba(255,255,255,.55); font-size: 12px; }
.cartao .faq details { border-top: 1px solid rgba(255,255,255,.1); padding: 10px 0; }
.cartao .faq summary { cursor: pointer; font-weight: 600; color: #fff; }
.cartao .faq details p { margin-top: 6px; }
.cartao img.inicial { object-fit: cover; }

/* Hover só em quem tem mouse: no celular o toque deixava o botão aceso. */
@media (hover: hover) {
  .opcao:hover { background: var(--laranja); border-color: var(--laranja); color: #fff; }
  .opcao.destaque:hover { filter: brightness(1.06); }
  .seletor:hover { border-color: var(--laranja); }
  .folha-opcoes button:hover { border-color: var(--laranja); background: var(--laranja-claro); }
  .folha-opcoes button:hover::after { color: var(--laranja); }
  .cartao .cta:hover { filter: brightness(1.05); }
  .opcoes.lista .opcao:hover { border-color: var(--laranja); background: var(--laranja-claro); color: var(--laranja-escuro); }
  .opcoes.lista .opcao:hover::after { color: var(--laranja); }
  .opcoes.multipla .opcao[data-v]:hover { background: var(--laranja-claro); border-color: var(--laranja); color: var(--laranja-escuro); }
  .opcoes.multipla .opcao[data-v]:hover::before { border-color: var(--laranja); }
}

/* Celular */
@media (max-width: 520px) {
  .chat, .entrada { padding: 0 12px; }
  .chat { padding-top: 16px; }
  .linha { gap: 8px; }
  .linha.bot { padding-right: 8px; }
  .linha.eu { padding-left: 32px; }
  .bolha { padding: 11px 14px; font-size: 15.5px; line-height: 1.5; }
  .opcao { padding: 12px 16px; }
  .opcoes.lista .opcao { padding: 13px 14px; }
  .opcoes.lista, .opcoes.coluna { max-width: none; }
  .campo { max-width: none; }
  .status { margin-left: 42px; }
  .rodape { font-size: 11px; padding-top: 8px; }
}
