:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#101828;

  --green:#0b9a43;
  --greenDark:#0a7c37;
  --danger:#d92d20;

  --shadow:0 18px 42px rgba(16,24,40,.14);

  --pad:12px;
  --logoH:28px;
}

*{ box-sizing:border-box; }
img{ display:block; max-width:100%; }
button{ font-family:inherit; }
html, body{ margin:0; padding:0; height:100%; width:100%; }

body{
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

/* ===== LAYOUT ===== */
.wrap{
  min-height: 100svh;
  min-height: 100dvh;
  width:100%;
  display:flex;
  justify-content:center;
  align-items:stretch;
  padding: var(--pad);
  padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom));
}

@media(min-width:900px){
  .wrap{ align-items:center; }
}

.funnel{
  width:min(440px, 100%);
}

/* ===== TELAS ===== */
.screen{ display:none; }
.screen-active{ display:block; }

/* ===== LOGO TOP ===== */
.topMini{
  display:flex;
  justify-content:center;
  margin-bottom:6px;
}

.logoMini{
  height:var(--logoH);
  opacity:.95;
}

/* ===== CARD BASE ===== */
.card{
  background:var(--card);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:16px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* ===== START: preencher a tela (sem espaço vazio) ===== */
#start .card{
  min-height: calc(100svh - (var(--pad) * 2) - var(--logoH) - 6px - env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:10px;
}

@supports (height: 100dvh){
  #start .card{
    min-height: calc(100dvh - (var(--pad) * 2) - var(--logoH) - 6px - env(safe-area-inset-bottom));
  }
}

/* ===== BANNER ===== */
.banner{
  width:100%;
  border-radius:18px;
}

/* START: banner cresce e ocupa espaço (visual igual xquiz) */
#start .banner{
  flex: 1;
  min-height: 240px;
  object-fit: cover;
  margin-bottom: 0;
}

/* ===== BLOCO DE TEXTO ===== */
.content{ padding-bottom:6px; }

/* ===== ATENÇÃO ===== */
.attentionBox{
  font-size:15px;
  line-height:1.35;
  margin:4px 4px 0;
}
.attRed{
  color:var(--danger);
  font-weight:900;
}

/* ===== BOTÕES ===== */
.btn{
  width:100%;
  padding:18px;
  border:none;
  border-radius:16px;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}

.btn.main{
  background:var(--green);
  color:#fff;
  box-shadow:0 10px 0 var(--greenDark);
}

.btn.main:active{
  transform: translateY(2px);
  box-shadow:0 8px 0 var(--greenDark);
}

.btn.ghost{
  margin-top:10px;
  background:#eef2f6;
  color:#111827;
  box-shadow:none;
  font-weight:800;
}

/* ===== PULSO ===== */
.pulse{
  position:relative;
  animation:pulseBtn 1.35s ease-in-out infinite;
}

@keyframes pulseBtn{
  0%{ transform:scale(1); }
  50%{ transform:scale(1.03); }
  100%{ transform:scale(1); }
}

.pulse::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:18px;
  border:2px solid rgba(11,154,67,.22);
  opacity:0;
  animation:pulseRing 1.35s ease-in-out infinite;
  pointer-events:none;
}

@keyframes pulseRing{
  0%{ transform:scale(.96); opacity:0; }
  40%{ opacity:.9; }
  100%{ transform:scale(1.06); opacity:0; }
}

/* ===== QUIZ ===== */
.quizCard{ gap:10px; }

.quizCard h2{
  font-size:22px;
  margin:6px 0 6px;
  text-align:center;
}

.options{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:6px;
}

.option{
  padding:16px;
  border-radius:14px;
  background:#f1fdf6;
  border:2px solid #cdeedc;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
  transition:.18s;
  text-align:left;
  user-select:none;
}

.option:active{ transform: scale(.99); }

@media(hover:hover){
  .option:hover{
    background:var(--green);
    color:#fff;
    border-color:var(--green);
  }
}

.helper{
  margin-top:12px;
  font-size:13px;
  color:#475467;
  text-align:center;
}

/* ===== PROGRESSO ===== */
.progress span{
  font-size:13px;
  font-weight:800;
}

.bar{
  width:100%;
  height:8px;
  background:#e5e7eb;
  border-radius:8px;
  overflow:hidden;
  margin-top:6px;
}

.fill{
  height:100%;
  width:0%;
  background:var(--green);
  transition:.25s;
}

/* ===== LOADING ===== */
.loadingCard{
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:10px;
  min-height: calc(100svh - (var(--pad) * 2) - var(--logoH) - 6px - env(safe-area-inset-bottom));
}

@supports (height: 100dvh){
  .loadingCard{
    min-height: calc(100dvh - (var(--pad) * 2) - var(--logoH) - 6px - env(safe-area-inset-bottom));
  }
}

.loadingCard h3{
  margin: 4px 0 0;
  font-size:18px;
}

.loadingCard p{
  margin: 0;
  color:#475467;
  font-size:14px;
}

.loader{
  width:52px;
  height:52px;
  border-radius:50%;
  border:6px solid #e5e7eb;
  border-top:6px solid var(--green);
  animation:spin 1s linear infinite;
}

@keyframes spin{ to{ transform:rotate(360deg); } }

.fakeBar{ margin-top: 12px; }

/* ===== RESULT ===== */
.resultCard{ gap:14px; }

.resultLead{
  font-size:16px;
  font-weight:800;
  margin:0;
}

.resultBox{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px;
}

.muted{
  color:#475467;
  font-size:14px;
  margin:0;
}

/* ===== PROTOCOLO + PROVA SOCIAL (imagens em contain) ===== */
#protocol .banner,
#socialproof .banner{
  max-height: 62vh;
  object-fit: contain;
  margin-bottom: 10px;
}

.countdown{
  margin-top: 6px;
  margin-bottom: 4px;
  font-size: 14px;
  color: #475467;
  text-align: center;
  min-height: 18px;
}

/* ===== MOBILE ===== */
@media(max-width:480px){
  :root{ --pad:10px; --logoH:26px; }
  .card{ padding:14px; }
  .attentionBox{ font-size:14.5px; }
  .quizCard h2{ font-size:21px; }
  #start .banner{ min-height: 220px; }
}
