:root{
  --bg:#0e1022; --card:#191d3a; --line:#2b3060;
  --text:#f2f3fa; --muted:#aab0d6;
  --accent:#7c8cff; --accent2:#35d0ba;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; min-height:100vh;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:radial-gradient(1200px 600px at 80% -10%,#262b66 0%,transparent 60%),var(--bg);
  color:var(--text); line-height:1.5;
}
a{color:var(--accent)}

/* ---------- Layout ---------- */
.layout{display:flex;justify-content:center;gap:24px;padding:0 16px}
.main{width:100%;max-width:560px;padding:12px 0 24px}
.side{width:160px;flex:none;position:sticky;top:20px;align-self:flex-start;display:none;padding-top:70px}
@media(min-width:1180px){ .side{display:block} }
body[data-screen="start"] .side,
body[data-screen="start"] .ad-bottom{display:none}

.top{padding:8px 0 16px}
.brand{color:var(--text);text-decoration:none;font-weight:800;font-size:18px;letter-spacing:.2px}
.brand span{color:var(--accent)}

.screen{animation:fade .25s ease}
.screen.center{text-align:center}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- Tipografia ---------- */
.eyebrow{margin:0 0 8px;color:var(--accent2);font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
h1{margin:0 0 14px;font-size:clamp(30px,8vw,44px);line-height:1.12;font-weight:850}
h2{margin:0 0 12px;font-size:24px;line-height:1.25}
h3{margin:0 0 8px;font-size:19px}
h4{margin:0 0 8px;font-size:16px;color:var(--accent2)}
.grad{background:linear-gradient(90deg,var(--accent),var(--accent2));-webkit-background-clip:text;background-clip:text;color:transparent}
.lead{color:var(--muted);font-size:17px;margin:0 0 18px}
.fine{color:var(--muted);font-size:13px;margin:14px 0 0}
.note{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 14px;color:var(--muted);font-size:14px}

.chips{list-style:none;display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:0 0 22px}
.chips li{background:var(--card);border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:14px;color:var(--muted)}

/* ---------- Botões ---------- */
.btn{
  appearance:none;border:0;cursor:pointer;font:inherit;font-weight:700;
  padding:13px 18px;border-radius:14px;color:#0b0d1f;background:var(--accent);
}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn-big{display:block;width:100%;font-size:18px;padding:16px 18px}
.btn-primary{background:linear-gradient(90deg,var(--accent),#9aa6ff)}
.btn-accent{background:linear-gradient(90deg,var(--accent2),#6fe3d2)}
.btn-wa{background:#25d366}
.btn-ghost{background:transparent;color:var(--text);border:1px solid var(--line)}
.link-btn{appearance:none;background:none;border:0;color:var(--muted);font:inherit;font-size:14px;cursor:pointer;padding:6px 0;text-decoration:underline}
.center-btn{display:block;margin:18px auto 0}
.actions{display:flex;gap:10px;margin:18px 0 6px}
.actions .btn{flex:1}

/* ---------- Quiz ---------- */
.progress-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;color:var(--muted);font-size:14px}
.bar{height:8px;background:var(--card);border-radius:99px;overflow:hidden;margin-bottom:22px}
#bar-fill{height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent2));transition:width .25s ease}
.question{font-size:clamp(21px,5.5vw,26px);line-height:1.3;min-height:4.2em;margin-bottom:16px}
.options{display:block}
.opt{
  display:block;width:100%;text-align:left;margin:0 0 10px;padding:16px;
  font:inherit;font-size:17px;color:var(--text);cursor:pointer;
  background:var(--card);border:1px solid var(--line);border-radius:14px;
}
.opt:active,.opt.sel{background:var(--accent);border-color:var(--accent);color:#0b0d1f;font-weight:700}
@media(hover:hover){ .opt:hover{border-color:var(--accent)} }

/* ---------- Anúncios ---------- */
.ad{margin:16px auto;text-align:center;max-width:100%;overflow:hidden}
.ad-ph{
  display:flex;align-items:center;justify-content:center;text-align:center;
  border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:13px;margin:0 auto;
}
.ad-rect .ad-ph{width:300px;max-width:100%;height:250px}
.side .ad{margin:0}
.side .ad-ph{width:160px;height:600px}
.ad-bottom{
  position:fixed;left:0;right:0;bottom:0;height:56px;z-index:40;
  background:#0b0d1f;border-top:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;
}
.ad-bottom .ad{margin:0;width:100%;height:100%}
.ad-bottom .ad-ph{width:100%;height:100%;border:0;border-radius:0}
body:not([data-screen="start"]){padding-bottom:62px}
@media(min-width:768px){
  .ad-bottom{position:static;height:100px;max-width:728px;margin:0 auto 24px;border:0;background:none}
  .ad-bottom .ad-ph{border:1px dashed var(--line);border-radius:12px}
  body:not([data-screen="start"]){padding-bottom:0}
}

/* ---------- Calculando ---------- */
.spinner{width:46px;height:46px;margin:18px auto;border-radius:50%;border:4px solid var(--line);border-top-color:var(--accent);animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- Resultado ---------- */
.res-band{font-size:clamp(34px,10vw,52px);line-height:1.05;margin:0 0 10px;background:linear-gradient(90deg,var(--accent),var(--accent2));-webkit-background-clip:text;background-clip:text;color:transparent}
.axes{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:6px 16px;margin-bottom:14px}
.axis{padding:12px 0;border-bottom:1px solid var(--line)}
.axis:last-child{border-bottom:0}
.axis-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}
.axis-head span{color:var(--accent2);font-weight:700;font-size:14px}
.track{position:relative;height:10px;border-radius:99px;background:linear-gradient(90deg,var(--accent2),var(--accent))}
.track .mid{position:absolute;left:50%;top:-4px;bottom:-4px;width:2px;background:rgba(255,255,255,.5)}
.track .dot{position:absolute;top:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:50%;background:#fff;border:4px solid #0e1022;box-shadow:0 0 0 2px var(--accent)}
.poles{display:flex;justify-content:space-between;margin-top:8px;font-size:12px;color:var(--muted)}

.unlock{background:linear-gradient(180deg,#1d2250,#171a33);border:1px solid var(--line);border-radius:16px;padding:18px;margin-top:8px}
.unlock p{color:var(--muted);margin:0 0 14px}

.report{margin-top:8px}
.rep-block{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:12px}
.rep-block p{margin:0 0 10px;color:var(--muted)}
.rep-block p:last-child{margin-bottom:0}
.rep-axis p{margin:6px 0 0}
.rep-list{margin:0;padding-left:18px;color:var(--muted)}
.rep-list li{margin-bottom:8px}
.rep-list b{color:var(--text)}

/* ---------- Rodapé / cookies / modal ---------- */
.foot{display:flex;gap:18px;justify-content:center;align-items:baseline;flex-wrap:wrap;margin-top:28px;font-size:14px}
.foot a{color:var(--muted)}
.consent{
  position:fixed;left:12px;right:12px;bottom:12px;z-index:100;max-width:640px;margin:0 auto;
  background:#12152e;border:1px solid var(--line);border-radius:16px;padding:14px;
  box-shadow:0 10px 40px rgba(0,0,0,.5);
}
.consent p{margin:0 0 12px;font-size:14px;color:var(--muted)}
.consent-btns{display:flex;gap:10px;justify-content:flex-end}
.modal{position:fixed;inset:0;z-index:120;background:rgba(5,6,16,.8);display:flex;align-items:center;justify-content:center;padding:16px}
.modal-box{width:100%;max-width:420px;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px}
.demo-ad{height:200px;margin-bottom:10px}
.modal-btns{display:flex;gap:10px;margin-top:14px}
.modal-btns .btn{flex:1}

/* ---------- Páginas de texto (privacidade / sobre) ---------- */
.doc h1{font-size:30px}
.doc h2{margin-top:26px;font-size:20px}
.doc p,.doc li{color:var(--muted)}
.doc li{margin-bottom:6px}
.doc .ph{background:#2a2540;color:#ffd78a;padding:0 6px;border-radius:6px}

/* =====================================================================
   MODO APP (index.html): tudo cabe na tela, sem barra de rolagem.
   As páginas de texto (privacidade/sobre) continuam rolando normalmente.
   ===================================================================== */
body.app{height:100vh;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
body.app .layout{flex:1;min-height:0}
body.app .main{display:flex;flex-direction:column;min-height:0;padding:6px 0 8px}
body.app .top{flex:none;padding:4px 0 8px}
body.app .screen{flex:1;min-height:0;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}
body.app .screen.center{align-items:center;justify-content:center}
body.app #screen-start{justify-content:center}
body.app h1{font-size:clamp(26px,min(8vw,6vh),44px);margin-bottom:10px}
body.app .lead{font-size:clamp(14px,2.3vh,17px);margin-bottom:clamp(8px,2vh,18px)}
body.app .chips{margin-bottom:clamp(12px,3vh,22px)}

/* rodapé só no início, resultado e relatório */
body.app .foot{flex:none;margin-top:6px;font-size:12px;gap:14px}
body[data-screen="quiz"] .foot,
body[data-screen="pause"] .foot,
body[data-screen="calc"] .foot{display:none}
.foot #btn-restart{display:none;font-size:12px}
body[data-screen="result"] .foot #btn-restart,
body[data-screen="report"] .foot #btn-restart{display:inline}

/* anúncios laterais: só com espaço de sobra (largura E altura) */
body.app .side{display:none;padding-top:0}
@media(min-width:1180px) and (min-height:720px){
  body.app .side{display:block;align-self:center}
}
@media(min-width:768px){
  .ad-bottom{height:90px;margin:0 auto 8px;flex:none}
}

/* perguntas */
body.app .progress-row{flex:none}
body.app .bar{flex:none;margin-bottom:clamp(10px,2.5vh,22px)}
body.app .question{flex:1;min-height:0;display:flex;align-items:center;margin:0 0 clamp(8px,2vh,16px);font-size:clamp(18px,min(5.2vw,3.8vh),26px)}
body.app .options{flex:none}
body.app .opt{margin-bottom:clamp(6px,1.3vh,10px);padding:clamp(10px,2vh,16px) 16px;font-size:clamp(15px,2.4vh,17px)}

/* pausa e cálculo */
body.app .ad-rect{margin:clamp(6px,1.5vh,14px) auto;flex:none}
body.app #screen-pause h2,body.app #screen-calc h2{margin-bottom:8px}
body.app .spinner{margin:10px auto}
@media(max-height:640px){
  body.app #screen-pause .eyebrow,body.app #screen-pause .lead{display:none}
  .ad-rect .ad-ph{height:200px}
}

/* resultado compacto */
body.app .eyebrow{margin-bottom:4px}
body.app .res-band{font-size:clamp(28px,min(9vw,6vh),48px);margin-bottom:6px}
body.app .axes{padding:2px 14px;margin-bottom:8px}
body.app .axis{padding:clamp(6px,1.2vh,10px) 0}
body.app .axis-head{margin-bottom:clamp(5px,1vh,8px)}
body.app .track .dot{width:20px;height:20px;margin:-10px 0 0 -10px;border-width:3px}
body.app .poles{margin-top:5px;font-size:11px}
body.app .note{font-size:12px;padding:8px 12px;margin:0 0 6px}
body.app .actions{margin:8px 0 6px;flex:none}
body.app .actions .btn{padding:11px 14px}
body.app .unlock{padding:12px;margin-top:4px;flex:none}
body.app .unlock h3{font-size:16px;margin-bottom:4px}
body.app .unlock p{font-size:13px;margin-bottom:10px}
body.app .unlock .btn-big{font-size:16px;padding:12px 16px}
.ad[data-key="res"]{display:none}
@media(min-height:1000px){ .ad[data-key="res"]{display:block} }
@media(max-height:720px){
  body.app .unlock{background:none;border:0;padding:0}
  body.app .unlock h3,body.app .unlock p{display:none}
}

/* relatório paginado: substitui o resultado, sem rolar */
body.app #screen-report{min-height:0}
.rep-body{flex:1;min-height:0;overflow-y:auto}
.rep-body .rep-block{margin-bottom:8px;padding:12px 14px}
.rep-body .rep-block p{font-size:14px}
.rep-body .rep-axis{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:6px 14px 10px;margin-bottom:8px}
.rep-body .rep-axis p{font-size:13px;margin:4px 0 0;color:var(--muted)}
.rep-body .rep-list{font-size:14px}
.rep-body .rep-list li{margin-bottom:6px}
.rep-body .fine{margin:8px 0 0}
.rep-dots{display:flex;justify-content:center;gap:6px;margin:8px 0 2px;flex:none}
.rep-dots i{width:8px;height:8px;border-radius:50%;background:var(--line)}
.rep-dots i.on{background:var(--accent2)}

/* telas baixas: o resultado enxuga para caber sem rolar */
.foot .link-btn{font-size:12px}
@media(max-height:900px){
  body[data-screen="result"] .eyebrow{display:none}
  #res-desc{display:none}
}
@media(max-height:740px){
  body.app .poles{display:none}
}
@media(max-height:580px){
  body.app .axis{padding:5px 0}
  body.app .axis-head{margin-bottom:4px}
}
/* computador com tela baixa: os 4 eixos em 2 colunas */
@media(min-width:700px) and (max-height:800px){
  #res-axes{display:grid;grid-template-columns:1fr 1fr;column-gap:22px}
  #res-axes .axis:nth-last-child(-n+2){border-bottom:0}
  body.app .poles{display:flex}
}
@media(max-height:640px){
  .rep-body .rep-block{padding:10px 12px}
  .rep-body .rep-block p,.rep-body .rep-list{font-size:13px;line-height:1.35}
  .rep-body .rep-list li{margin-bottom:4px}
  .rep-body h4{margin-bottom:4px}
  .rep-body .rep-axis{padding:4px 12px 8px}
}
@media(max-height:600px){ .rep-body .fine{display:none} }

/* ---------- Início: os 4 eixos ---------- */
.axes-intro{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0;margin:0 0 clamp(12px,3vh,22px)}
.axes-intro li{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;gap:2px}
.axes-intro b{font-size:14px}
.axes-intro span{font-size:12px;color:var(--muted);line-height:1.3}
@media(max-height:700px){ .axes-intro span{display:none} .axes-intro li{padding:6px 12px} .chips{display:none} }

/* ---------- Resultado: compartilhar em destaque ---------- */
.actions .btn-main{flex:2;font-size:17px;padding:13px 14px}
.actions .btn-wa{flex:1}
.unlock .btn-ghost{border-color:var(--accent2);color:var(--accent2)}

/* Sem AdSense ativo: nenhuma caixa de anúncio no site público */
body.no-ads .side,body.no-ads .ad-bottom,body.no-ads .ad{display:none!important}
body.app.no-ads:not([data-screen="start"]){padding-bottom:0}
