:root {
  --ink: #24302B;
  --muted: #66736D;
  --accent: #4F7565;
  --tint: #EEF3F0;
  --ring: #D5E0DA;
  --erro: #A8483D;
  --sombra: 0 8px 28px rgba(36, 48, 43, .07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFF;
  color: var(--ink);
  font-family: 'M PLUS Rounded 1c', ui-rounded, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h2, h3, h4, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.tela {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

/* Botão principal */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 12px 20px;
  border: 0;
  border-radius: 22px;
  background: var(--accent);
  color: #FFF;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(79, 117, 101, .24);
  transition: transform .15s ease, background .15s ease;
}
.cta:hover { background: #456859; }
.cta:active { transform: scale(.985); }
.cta.secundario {
  background: #FFF;
  color: var(--accent);
  border: 1px solid var(--ring);
  box-shadow: none;
}
.cta.secundario:hover { background: var(--tint); }

/* Capa */
.capa {
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 28px 32px;
  overflow: hidden;
  text-align: center;
}
.capa .marca {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 3;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}
.heroi {
  position: relative;
  flex: 1 1 380px;
  align-self: stretch;
  min-height: 380px;
  max-height: 500px;
  margin: 0 -28px;
  overflow: hidden;
}
.heroi svg, .heroi img { position: absolute; left: 50%; }
.heroi svg { top: 72px; width: 352px; transform: translateX(-50%); }
.heroi img { left: calc(50% + 14px); top: 36px; width: 400px; height: auto; transform: translateX(-50%); }
.heroi .fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 190px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,.22) 22%, rgba(255,255,255,.62) 44%, rgba(255,255,255,.92) 62%, #FFF 76%, #FFF 100%);
}
.capa .chamada { position: relative; z-index: 2; margin-top: -54px; }
.capa h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.24; font-weight: 500; }
.capa .chamada p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.capa .autor { margin-top: -8px; font-size: 14px; font-weight: 500; }
.capa .nota { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* Perguntas */
.pergunta { gap: 32px; padding: 16px 24px 32px; }
.topo { display: flex; align-items: center; gap: 12px; }
.voltar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.voltar:hover { background: var(--tint); }
.progresso { flex: 1; height: 8px; border-radius: 8px; background: var(--tint); overflow: hidden; }
.progresso span { display: block; height: 100%; border-radius: 8px; background: var(--accent); transition: width .25s ease; }
.contagem { flex: none; color: var(--muted); font-size: 13px; }

.enunciado { text-align: center; }
.selo {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--tint);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.enunciado h2 { font-size: 27px; line-height: 1.32; font-weight: 500; }
.enunciado p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.65; }

.opcoes { display: flex; flex-direction: column; gap: 12px; }
.opcoes.par { display: grid; grid-template-columns: 1fr 1fr; }
.opcao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  border: 1px solid #F0F2F1;
  border-radius: 22px;
  background: #FFF;
  font-size: 17px;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--sombra);
  transition: background .15s ease, border-color .15s ease;
}
.opcao:hover { border-color: var(--ring); }
.opcao[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.opcoes.par .opcao { justify-content: center; height: 148px; border-radius: 26px; text-align: center; }
.marcador {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ring);
  border-radius: 8px;
  background: #FFF;
  color: #FFF;
}
.opcao[aria-pressed="true"] .marcador { background: var(--accent); border-color: var(--accent); }
/* O botão fica sempre à vista, mesmo em listas maiores que a tela. */
.acao {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(255,255,255,0), #FFF 22%);
}
.pergunta:has(.acao) { padding-bottom: 8px; }

/* Campos */
.campos { display: flex; flex-direction: column; gap: 18px; }
.campo label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 500; }
.entrada { position: relative; }
.campo input[type="text"] {
  width: 100%;
  height: 62px;
  padding: 0 20px;
  border: 1px solid var(--ring);
  border-radius: 22px;
  background: #FFF;
  font-size: 18px;
}
.campo input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.entrada .unidade {
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--muted);
  font-size: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}
.erro { margin-top: 8px; color: var(--erro); font-size: 14px; line-height: 1.45; }
.erro:empty { display: none; }
.aceite { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.55; cursor: pointer; }
.aceite input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }

/* Relatório */
.relatorio { gap: 40px; padding: 36px 24px 48px; }
.relatorio .marca { color: var(--accent); font-size: 15px; font-weight: 700; text-align: center; }
.abertura h2 { margin-top: 20px; font-size: 27px; line-height: 1.32; font-weight: 500; }
.abertura p { margin-top: 14px; }
.relatorio p, .relatorio li { font-size: 16px; line-height: 1.65; }
.secao { display: flex; flex-direction: column; gap: 16px; }
.secao > h3 { font-size: 22px; line-height: 1.35; font-weight: 500; }
.apoio { color: var(--muted); }

.barra-item { display: flex; flex-direction: column; gap: 8px; }
.barra-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.barra-topo strong { font-size: 16px; font-weight: 500; }
.rotulo { flex: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.barra-item.forte .rotulo { color: var(--accent); font-weight: 700; }
.trilha { height: 10px; border-radius: 10px; background: var(--tint); overflow: hidden; }
.trilha span { display: block; height: 100%; border-radius: 10px; background: var(--ring); }
.barra-item.atencao .trilha span { background: #8FAD9F; }
.barra-item.forte .trilha span { background: var(--accent); }
.barra-item p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.mapa { display: flex; flex-direction: column; gap: 20px; }

.cartao { padding: 20px; border-radius: 22px; background: var(--tint); }
.cartao p + p { margin-top: 10px; }
.cartao .apoio { font-size: 14px; }
.borda {
  padding: 20px;
  border: 1px solid #F0F2F1;
  border-radius: 22px;
  background: #FFF;
  box-shadow: var(--sombra);
}
.borda h4 { margin-bottom: 8px; font-size: 16px; font-weight: 700; }
.borda p + p { margin-top: 8px; }
.borda ul { margin: 0; padding-left: 20px; }
.borda li + li { margin-top: 8px; }
.oferta { display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; border-radius: 26px; background: var(--tint); }
.oferta h3 { font-size: 22px; line-height: 1.35; font-weight: 500; }
.relatorio .aviso-final { color: var(--muted); font-size: 12.5px; line-height: 1.6; text-align: center; }

/* Em telas baixas a foto encolhe para o botão da capa aparecer sem rolar. */
@media (max-height: 700px) {
  .capa { gap: 14px; padding-bottom: 20px; }
  .capa .marca { top: 16px; }
  .heroi { flex: 1 1 214px; min-height: 214px; max-height: 300px; }
  .heroi svg { top: 38px; width: 230px; }
  .heroi img { left: calc(50% + 9px); top: 34px; width: 244px; }
  .heroi .fade { height: 110px; }
  .capa .chamada { margin-top: -30px; }
  .capa h1 { margin-bottom: 8px; font-size: 26px; }
  .capa .chamada p { font-size: 15px; line-height: 1.5; }
  .capa .cta { min-height: 56px; }
  .capa .autor { margin-top: -4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (min-width: 620px) {
  .pergunta, .relatorio { padding-top: 40px; }
}

@media print {
  @page { margin: 16mm; }
  .sem-impressao { display: none !important; }
  .tela { max-width: none; min-height: 0; }
  .relatorio { gap: 24px; padding: 0; }
  .secao, .borda, .cartao, .barra-item { break-inside: avoid; }
  .borda { box-shadow: none; border-color: var(--ring); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
