/* ============================================================
   Quiz Idade Zero — UI "Clinico Premium" (mobile-first)
   Tipografia: Fraunces (titulos, editorial/medico) + Inter (texto)
   ============================================================ */

:root {
  --primaria: #0E7C66;
  --primaria-esc: #0B3B33;
  --primaria-clr: #128a72;
  --destaque: #E8B23A;
  --destaque-esc: #cf9a22;

  --bg: #F4F1EA;          /* creme quente */
  --bg-2: #ECE7DB;
  --card: #FFFFFF;
  --texto: #1A2521;
  --texto-suave: #6A7570;
  --borda: #E6E1D6;
  --borda-forte: #D7D0C2;

  --sombra-sm: 0 2px 8px rgba(11, 59, 51, .06);
  --sombra: 0 12px 34px rgba(11, 59, 51, .10);
  --sombra-lg: 0 22px 60px rgba(11, 59, 51, .16);
  --raio: 18px;
  --raio-sm: 12px;
  --max: 540px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--texto);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(14,124,102,.10), transparent 60%),
    var(--bg);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 241, 234, .82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--borda);
}
.topbar__inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primaria), var(--primaria-esc));
  color: #fff; font-weight: 800; font-size: 13px;
  display: grid; place-items: center; letter-spacing: -.02em;
  box-shadow: var(--sombra-sm);
}
.brand__name { font-size: 15px; font-weight: 600; letter-spacing: .14em; color: var(--primaria-esc); }
.brand__name b { font-weight: 800; }
.topbar__trust { font-size: 12px; font-weight: 600; color: var(--primaria); white-space: nowrap; }

/* ---------- Progresso ---------- */
.progress {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px 12px;
}
.progress__back {
  border: 1px solid var(--borda); background: var(--card);
  color: var(--primaria-esc);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer; flex-shrink: 0;
  box-shadow: var(--sombra-sm); transition: transform .12s, opacity .2s;
}
.progress__back:hover { transform: translateX(-2px); }
.progress__back:disabled { opacity: 0; pointer-events: none; }
.progress__col { flex: 1; }
.progress__meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
#progress-secao { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--primaria); }
#progress-label { font-size: 11px; font-weight: 600; color: var(--texto-suave); }
.progress__track { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primaria), var(--destaque));
  border-radius: 999px; transition: width .45s cubic-bezier(.22,.61,.36,1);
}

/* ---------- App / Tela ---------- */
.app { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 8px 18px 28px; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 16px 0; }
.screen.anim { animation: enter .42s cubic-bezier(.22,.61,.36,1); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.screen.saindo { animation: leave .2s ease forwards; }
@keyframes leave { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Tipografia ---------- */
.titulo { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(25px, 6.4vw, 33px); line-height: 1.12; letter-spacing: -.01em; color: var(--primaria-esc); margin-bottom: 12px; }
.subtitulo { font-size: 16px; color: var(--texto-suave); margin-bottom: 6px; }
.pergunta { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(21px, 5.4vw, 27px); line-height: 1.2; letter-spacing: -.01em; color: var(--primaria-esc); margin-bottom: 6px; }
.ajuda { font-size: 13.5px; color: var(--texto-suave); margin: 4px 0 16px; }

/* ---------- Intro ---------- */
.selo { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; background: rgba(14,124,102,.10); color: var(--primaria); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 7px 13px; border-radius: 999px; margin-bottom: 20px; }
.intro-bullets { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 22px 0 8px; }
.intro-bullets li { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--texto); }
.intro-bullets li::before { content: "✓"; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: rgba(14,124,102,.12); color: var(--primaria); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.confianca { text-align: center; font-size: 12px; color: var(--texto-suave); margin-top: 14px; }

/* ---------- Opcoes ---------- */
.opcoes { display: flex; flex-direction: column; gap: 11px; margin-top: 10px; }
.opcao {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: var(--card); border: 1.5px solid var(--borda); border-radius: var(--raio);
  padding: 16px 16px; font-size: 16px; font-weight: 500; color: var(--texto);
  cursor: pointer; box-shadow: var(--sombra-sm);
  transition: border-color .16s, box-shadow .16s, transform .08s, background .16s;
}
.opcao:hover { border-color: var(--primaria-clr); box-shadow: var(--sombra); }
.opcao:active { transform: scale(.985); }
.opcao.selecionada { border-color: var(--primaria); background: linear-gradient(0deg, rgba(14,124,102,.05), rgba(14,124,102,.05)), var(--card); box-shadow: var(--sombra); }
.opcao__ic { width: 30px; flex-shrink: 0; font-size: 22px; text-align: center; }
.opcao__txt { flex: 1; }
.opcao__check {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--borda-forte);
  flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 14px;
  transition: background .16s, border-color .16s, transform .16s;
}
.opcao.tipo-single .opcao__check { border-radius: 50%; }
.opcao.selecionada .opcao__check { background: var(--primaria); border-color: var(--primaria); transform: scale(1.06); }

/* ---------- Inputs ---------- */
.campos { margin-top: 18px; }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--primaria-esc); }
.campo input {
  width: 100%; padding: 16px 16px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--borda); border-radius: var(--raio); background: var(--card); color: var(--texto);
  box-shadow: var(--sombra-sm); transition: border-color .16s, box-shadow .16s;
}
.campo input:focus { outline: none; border-color: var(--primaria); box-shadow: 0 0 0 4px rgba(14,124,102,.12); }
.consentimento { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--texto-suave); margin: 8px 0 4px; }
.consentimento input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primaria); }

/* ---------- Botoes ---------- */
.btn {
  display: block; width: 100%; border: none; border-radius: var(--raio);
  padding: 17px 20px; font-size: 17px; font-weight: 700; font-family: inherit; cursor: pointer;
  margin-top: 22px; background: var(--primaria); color: #fff; box-shadow: var(--sombra);
  transition: transform .09s, box-shadow .16s, opacity .16s;
}
.btn:hover { box-shadow: var(--sombra-lg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn--ouro { background: linear-gradient(135deg, var(--destaque), var(--destaque-esc)); color: var(--primaria-esc); }
.btn--ghost { background: var(--card); color: var(--primaria-esc); border: 1.5px solid var(--borda); box-shadow: var(--sombra-sm); }

/* ---------- Interludio ---------- */
.interludio { text-align: center; }
.interludio__ic {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 22px; font-size: 36px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(14,124,102,.12), rgba(232,178,58,.16));
  box-shadow: var(--sombra-sm);
}
.interludio--educativo .interludio__ic { background: linear-gradient(135deg, rgba(14,124,102,.16), rgba(14,124,102,.06)); }
.interludio__titulo { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(22px, 5.6vw, 28px); line-height: 1.18; color: var(--primaria-esc); margin-bottom: 12px; }
.interludio__texto { font-size: 16px; color: var(--texto); max-width: 420px; margin: 0 auto; }
.interludio--educativo .interludio__texto { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra-sm); text-align: left; }
.destaque-num { color: var(--primaria); font-weight: 700; }

/* ---------- Analise ---------- */
.analise { text-align: center; }
.analise__spinner { width: 56px; height: 56px; border: 5px solid var(--bg-2); border-top-color: var(--primaria); border-radius: 50%; margin: 0 auto 26px; animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.analise__passos { list-style: none; display: flex; flex-direction: column; gap: 11px; max-width: 320px; margin: 0 auto; }
.analise__passos li { font-size: 15px; color: var(--texto-suave); opacity: .3; transition: opacity .35s; text-align: left; padding-left: 30px; position: relative; }
.analise__passos li.ativo { opacity: 1; color: var(--texto); font-weight: 600; }
.analise__passos li.feito::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--primaria); font-weight: 800; }
.analise__passos li.ativo:not(.feito)::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--destaque); box-shadow: 0 0 0 4px rgba(232,178,58,.25); }

/* ---------- Diagnostico + Gauge ---------- */
.diag { text-align: center; }
.diag__selo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primaria); margin-bottom: 4px; }
.gauge { position: relative; width: 230px; height: 230px; margin: 6px auto 8px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: var(--bg-2); stroke-width: 16; }
.gauge__val { fill: none; stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.22,.61,.36,1); }
.gauge__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge__num { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 58px; line-height: 1; color: var(--primaria-esc); }
.gauge__de { font-size: 13px; color: var(--texto-suave); margin-top: 2px; }
.gauge__rotulo { font-size: 12px; font-weight: 600; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .04em; }
.diag__banda { display: inline-block; font-weight: 700; font-size: 15px; padding: 7px 16px; border-radius: 999px; margin: 6px 0 14px; }
.diag__banda-msg { font-size: 15.5px; color: var(--texto); max-width: 430px; margin: 0 auto 22px; }

.diag__card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); padding: 22px; text-align: left; margin-bottom: 8px; }
.diag__perfil-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.diag__perfil-ic { width: 50px; height: 50px; border-radius: 14px; font-size: 26px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(14,124,102,.12), rgba(232,178,58,.14)); flex-shrink: 0; }
.diag__perfil-nome { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; color: var(--primaria-esc); line-height: 1.15; }
.diag__perfil-pilar { font-size: 12.5px; font-weight: 600; color: var(--primaria); }
.diag__corpo { font-size: 15.5px; color: var(--texto); margin-bottom: 14px; }
.diag__ponte { font-size: 15.5px; color: var(--texto); background: rgba(14,124,102,.06); border-left: 4px solid var(--primaria); padding: 14px 16px; border-radius: 0 12px 12px 0; }
.diag__disclaimer { font-size: 12px; color: var(--texto-suave); font-style: italic; margin-top: 14px; }

/* ---------- Rodape ---------- */
.disclaimer-rodape { width: 100%; max-width: var(--max); margin: 0 auto; padding: 16px 18px 26px; }
.disclaimer-rodape p { font-size: 11px; line-height: 1.55; color: var(--texto-suave); text-align: center; }

.erro-box { text-align: center; padding: 48px 0; color: var(--texto-suave); }

@media (max-width: 360px) {
  .topbar__trust { display: none; }
}
