/* Quiz Microverdes — clone estático do funil do Inlead.
   Cores, tamanhos e espaçamentos medidos no original (estilos computados). */

:root {
  --tema: #65A30D;
  --tema-hover: #6DA819;
  --tema-borda: #5c9604;
  --fundo: #F7FEE7;
  --titulo: #030712;
  --texto: #6b7280;
  --contraste: rgba(198, 203, 185, .4);
  --raio: 16px;
  --altura-elemento: 56px;
  --largura: 28rem;          /* 448px */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: Inter, "sans serif", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

.tela {
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* igual ao .main-content do original */
  gap: 16px;
  padding: 12px;
  min-height: 95svh;
}

/* ------------------------------------------------------------------ topo */
.topo {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 12px;    /* o cabeçalho do original nunca zera */
  z-index: 50;
}

.voltar {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--titulo);
  cursor: pointer;
}
.voltar[hidden] { display: none; }

.marca { display: flex; justify-content: center; }
.marca img { width: 6rem; height: auto; }
.marca[hidden] { display: none; }

.progresso {
  position: relative;
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--tema) 10%, transparent);
}
.progresso[hidden] { display: none; }
.pg-barra {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--tema);
  border-radius: 9999px;
  transition: width .7s cubic-bezier(.4, 0, .2, 1);
}

/* ------------------------------------------------------------- estrutura */
/* O original tem 3 blocos no flex (cabeçalho, conteúdo, espaçador de 80px);
   é o espaçador + justify-between que posiciona o conteúdo na vertical. */
#palco { flex: 0 1 auto; }
.rodape-espaco { flex: 0 0 auto; height: 80px; }

.passo { display: none; }
.passo.ativo { display: block; animation: entrar .35s ease both; }

@keyframes entrar {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.pilha {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
}

.camada { position: relative; min-width: 0; padding: .2rem; }
.camada.centro { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------- texto (Quill) */
.conteudo { padding: 8px 0; color: var(--texto); overflow-wrap: break-word; }

/* enunciado de uma pergunta: o original usa mt-3 mb-6 em vez do py-2 */
.conteudo.intro { padding: 0; margin: 12px 0 24px; line-height: 1.25; }
.conteudo > :first-child { margin-top: 0; }
.conteudo > :last-child { margin-bottom: 0; }

.conteudo h1, .conteudo h2, .conteudo h3, .conteudo h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  color: var(--titulo);
}
.conteudo h1 { font-size: 32px; }
.conteudo h2 { font-size: 25.6px; }
.conteudo h3 { font-size: 20.8px; }
.conteudo h4 { font-size: 16px; font-weight: 400; }
.conteudo p { margin: 12px 0 0; font-size: 16px; line-height: 1.4; }
/* o Quill usa parágrafos/títulos vazios como espaçador — vale a altura da linha */
.conteudo p:empty { height: 22.4px; }
.conteudo h1:empty { height: 35.2px; }
.conteudo h2:empty { height: 28.16px; }
.conteudo h3:empty { height: 22.88px; }
.conteudo h1 + p, .conteudo h2 + p, .conteudo h3 + p { margin-top: 12px; }
.conteudo strong { font-weight: 700; }
.ql-align-center { text-align: center; }
.ql-align-right  { text-align: right; }

/* ------------------------------------------------------------------ botão */
.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--altura-elemento);
  padding: 8.8px 16px;
  border: 0;
  border-radius: var(--raio);
  background: var(--tema);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}
.botao:hover { background: var(--tema-hover); }
.botao:active { transform: scale(.99); }

/* ------------------------------------------------------------------ campo */
.campo {
  width: 100%;
  height: var(--altura-elemento);
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--tema) 50%, transparent);
  border-radius: var(--raio);
  background: #fff;
  color: var(--titulo);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
}
.campo:focus { outline: 0; border-color: var(--tema); }
.campo::placeholder { color: #9ca3af; }

/* ----------------------------------------------------------------- opções */
.opcoes { display: grid; gap: 8px; margin-bottom: 2px; }
.opcoes.col1 { grid-template-columns: 1fr; }
.opcoes.col2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.opcao {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--tema) 50%, transparent);
  border-radius: var(--raio);
  background: color-mix(in srgb, var(--tema) 10%, transparent);
  color: var(--titulo);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}
.opcao:hover { border-color: var(--tema); transform: scale(1.01); }
.opcao.ativa { border-color: var(--tema); transform: scale(1.02); }

/* linha = [coluna do ícone][bloco da direita], igual ao option-wrap do original */
.op-linha { display: flex; height: 100%; }
.opcao.vertical .op-linha { flex-direction: column; }

.op-icone { width: 3.75rem; display: flex; align-items: center; justify-content: center; }
.opcao.vertical .op-icone { width: 100%; }

.op-emoji { padding: 8px; font-size: 32px; line-height: 1.2; text-align: center; }
.opcao.vertical .op-emoji { padding-top: 16px; }

.op-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.op-dir {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 12px 12px 12px 0;
}
/* no vertical o original usa p-3 (todos os lados) e min-height 56px,
   mantendo o items-center — o círculo acompanha o meio do rótulo */
.opcao.vertical .op-dir { padding: 12px; min-height: 56px; }

.op-marca {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--tema);
  border-radius: 9999px;
  background: var(--fundo);
}
.op-marca::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 7px;
  margin: -5px 0 0 -6px;
  border: 2px solid var(--tema);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity .15s ease;
}
.opcao.ativa .op-marca::after { opacity: 1; }

.op-rotulo { flex: 1; min-width: 0; padding: 0; }
.op-rotulo p { margin: 0; }
.op-rotulo p + p { margin-top: 6px; }
.op-rotulo strong { font-weight: 700; }

/* -------------------------------------------------------------- carregando */
.carregando { padding: 25svh 0; }
.cg-topo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  color: var(--titulo);
  font-size: 15px;
}
.cg-trilha {
  margin-top: 8px;
  height: 10px;
  border-radius: 9999px;
  overflow: hidden;
  background: var(--contraste);
}
.cg-barra {
  width: 0;
  height: 100%;
  border-radius: 9999px;
  background: var(--tema);
  transition: width .1s linear;
}
.carregando .conteudo { text-align: center; }

/* ---------------------------------------------------------------- alertas */
.alerta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid;
  border-radius: var(--raio);
}
.alerta .conteudo { flex: 1; padding: 0 .2rem; margin-top: -2px; color: inherit; }
.alerta .conteudo p { color: inherit; }
.al-icone { font-size: 18px; line-height: 1.3; }

/* --------------------------------------------------------------- gráficos */
.graficos { display: grid; gap: 8px; padding: .125rem 0; }
.graficos.col4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.graficos.col3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.graficos.col2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.gf-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--contraste);
  border-radius: 12px;
}
.gf-item { height: 100%; }
/* no original a caixa (e o tubo) tem 7rem cravados — é o que alinha as legendas */
.gf-caixa { flex: 0 0 auto; width: 100%; height: 7rem; text-align: center; }
.gf-tubo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 2.5rem;
  height: 100%;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: var(--contraste);
}
.gf-pc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 4px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--titulo);
}
.gf-nivel {
  width: 100%;
  height: 0;
  background: var(--tema);
  transition: height 1.2s ease;
}
/* o original não quebra palavra aqui — a legenda transborda o card */
.gf-legenda { font-size: .85rem; line-height: 1.2; width: 100%; padding: 0; overflow-wrap: normal; }
.gf-legenda p { font-size: .85rem; margin: 0; }
.gf-legenda p + p { margin-top: 4px; }

/* ------------------------------------------------------------- argumentos */
.argumentos { display: grid; gap: 8px; }
.argumentos.col2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.argumentos.col1 { grid-template-columns: 1fr; }

.arg {
  overflow: hidden;
  border: 1px solid var(--contraste);
  border-radius: var(--raio);
  background: color-mix(in srgb, var(--fundo) 60%, #fff);
}
.arg img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.arg .conteudo { padding: 16px; }
.arg .conteudo h3 { font-size: 18px; }

/* ----------------------------------------------------------------- vídeo */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--raio);
  overflow: hidden;
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --------------------------------------------------------------- carrossel */
.carrossel { position: relative; }
.cr-trilho {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cr-trilho::-webkit-scrollbar { display: none; }
.cr-item {
  flex: 0 0 92%;
  scroll-snap-align: center;
  overflow: hidden;
  border: 1px solid var(--contraste);
  border-radius: var(--raio);
  background: color-mix(in srgb, var(--fundo) 60%, #fff);
}
.cr-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.cr-item .conteudo { padding: 8px 12px 12px; }
.cr-pontos { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.cr-ponto {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--contraste);
  transition: background .2s ease;
}
.cr-ponto.ativo { background: var(--tema); }

/* ------------------------------------------------------------ depoimentos */
.citacoes { display: grid; gap: 8px; }
.citacao {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--contraste);
  border-radius: var(--raio);
  background: color-mix(in srgb, var(--fundo) 60%, #fff);
}
.q-foto { width: 40px; height: 40px; border-radius: 9999px; object-fit: cover; flex: 0 0 40px; }
.q-corpo { flex: 1; min-width: 0; }
.q-estrelas { display: block; font-size: 12px; color: #facc15; letter-spacing: 1px; line-height: 1.4; }
.q-nome { font-weight: 700; color: var(--titulo); }
.q-local { font-size: 12px; color: var(--texto); }
.q-texto { margin: 8px 0 0; font-size: 15px; line-height: 1.45; }

/* ----------------------------------------------------------------- preço */
.preco {
  position: relative;
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--tema);
  border-radius: var(--raio);
  background: var(--fundo);
}
.pr-faixa {
  padding: 4px;
  width: 100%;
  background: var(--tema);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.pr-corpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
}
.pr-titulo { padding: 0 0 12px; }
.pr-titulo p { margin: 0; font-size: 20px; font-weight: 700; color: var(--titulo); }
.pr-caixa {
  position: relative;
  display: inline-block;
  padding: 8px;
  border-radius: 12px;
  background: var(--contraste);
}
.pr-antes { font-size: 12px; line-height: 1; opacity: .7; text-align: left; }
.pr-valor {
  padding: .2rem 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--titulo);
}
.pr-depois { font-size: 12px; line-height: 1; opacity: .7; text-align: right; }

/* --------------------------------------------------------------- desktop */
@media (min-width: 768px) {
  .tela { padding: 20px; gap: 24px; }
  .marca img { width: 8rem; }
}
