:root {
  --roxo: #6b1530;
  --roxo-esc: #3b0a19;
  --amarelo: #c9a13b;
  --cinza: #f1ece4;
  --texto: #3a3a44;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--texto);
  background: #e4dcd6;
}
button { font-family: inherit; cursor: pointer; }

/* ---------- Telas do questionário ---------- */
.tela { min-height: 100vh; background: #f4f4f7; }
.topo {
  background: linear-gradient(90deg, var(--roxo-esc), var(--roxo) 55%, var(--roxo));
  color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 14px;
  border-bottom: 6px solid var(--amarelo);
}
.topo .logo-txt { font-weight: 800; font-size: 26px; color: var(--amarelo); letter-spacing: 1px; }
.topo .logo-sub { font-size: 9px; letter-spacing: 1.5px; opacity: .85; }
.caixa { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }
.cartao { background: #fff; border-radius: 10px; padding: 32px; box-shadow: 0 2px 14px rgba(20,5,51,.08); }
h1.tit { color: #555; text-align: center; font-size: 34px; margin: 8px 0 28px; }
label.campo { display: block; margin: 14px 0 4px; font-weight: 600; color: var(--roxo); }
input.inp { width: 100%; padding: 12px 14px; border: 1px solid #c9c9d6; border-radius: 6px; font-size: 16px; }
.btns { display: flex; justify-content: center; gap: 120px; margin-top: 36px; }
.btn { border: 0; border-radius: 6px; padding: 16px 0; width: 180px; font-size: 16px; font-weight: 600; color: #fff; background: var(--roxo-esc); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.btn.sec { background: #8f8f96; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.progresso { height: 8px; background: #ddd; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progresso > div { height: 100%; background: var(--amarelo); transition: width .3s; }
.prog-txt { text-align: right; font-size: 13px; color: #777; margin-bottom: 18px; }
.q { padding: 26px 8px; }
.q p { font-size: 19px; line-height: 1.55; text-align: justify; margin: 0 0 18px; color: #555; }
.q.falta p { color: #b3261e; }
.opcoes { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 8px; }
.opcoes label { font-size: 18px; color: #555; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.opcoes input { width: 16px; height: 16px; accent-color: var(--roxo); }
.lista-salvos { margin-top: 24px; }
.lista-salvos a { display: block; padding: 10px 0; border-bottom: 1px solid #eee; color: var(--roxo); text-decoration: none; }
.credito { text-align: center; color: var(--roxo); margin: -18px 0 22px; font-size: 15px; letter-spacing: .5px; }
.aviso { font-size: 13px; color: #777; margin-top: 18px; line-height: 1.5; }

/* ---------- Barra de ações do laudo ---------- */
.acoes { position: sticky; top: 0; z-index: 10; background: var(--roxo-esc); color: #fff; display: flex; gap: 12px; align-items: center; padding: 10px 16px; }
.acoes .esp { flex: 1; }
.acoes button { background: var(--amarelo); color: var(--roxo-esc); border: 0; border-radius: 5px; padding: 9px 16px; font-weight: 700; }
.acoes button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* ---------- Páginas A4 ---------- */
#laudo { padding: 24px 0; }
.page {
  width: 210mm; height: 297mm; margin: 0 auto 24px; background: #fff; position: relative;
  overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.pg-head { position: absolute; top: 0; left: 0; right: 0; height: 31mm; }
.pg-head svg.band { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg-head .logo { position: absolute; left: 13mm; top: 5mm; display: flex; align-items: center; gap: 2mm; }
.pg-head .logo .sig { font-weight: 900; font-size: 13mm; line-height: 1; color: var(--amarelo); letter-spacing: .5mm; }
.pg-head .logo .sub { font-size: 1.6mm; color: #fff; letter-spacing: .3mm; margin-top: .6mm; }
.pg-head .tipo { position: absolute; right: 4mm; top: 13.2mm; font-size: 6.4mm; color: var(--roxo-esc); }
.pg-foot { position: absolute; bottom: 0; left: 0; right: 0; height: 32mm; }
.pg-foot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg-foot .rod { position: absolute; right: 12mm; bottom: 6mm; color: #fff; font-weight: 700; font-size: 3.8mm; letter-spacing: .2mm; }
.pg-foot .num { position: absolute; left: 12mm; bottom: 5mm; color: var(--roxo-esc); font-size: 3mm; font-weight: 700; }
.pg-body { position: absolute; top: 38mm; bottom: 34mm; left: 16mm; right: 16mm; overflow: hidden; font-size: 4.25mm; line-height: 1.5; }
.pg-body.full { left: 0; right: 0; }

.pg-body p { margin: 0 0 4mm; text-align: justify; }
.pg-body p.ind { text-indent: 10mm; margin-bottom: 0; }
.pg-body p.sub { margin-bottom: 2.5mm; }
.pg-body .li { margin: 0 0 1.6mm; text-align: justify; }
.pg-body .li + p { margin-top: 4mm; }
.pg-body .li b { font-weight: 600; color: #2f2f38; }
.pg-body h2.sec { font-weight: 400; color: var(--roxo); font-size: 7.4mm; margin: 7mm 0 7mm; padding-bottom: 1.8mm; border-bottom: .7mm solid #aaa; letter-spacing: .2mm; }
.pg-body h2.sec:first-child { margin-top: 0; }
.pg-body .faixa { background: var(--roxo); color: #fff; font-size: 7mm; padding: 1.5mm 6mm; margin: 0 0 8mm; }
.pg-body .alerta { background: #f8efd9; border-left: 1.5mm solid var(--amarelo); padding: 3mm 4mm; font-size: 3.7mm; margin-bottom: 5mm; }

/* Capa */
.capa { text-align: center; color: var(--roxo); }
.capa .nome { font-size: 9mm; line-height: 1.2; margin: 0 auto 4mm; max-width: 120mm; text-transform: uppercase; }
.capa .tnome { font-size: 11mm; margin-top: 4mm; }
.capa .palavras { font-size: 4.6mm; color: #444; letter-spacing: .2mm; margin-top: 1mm; text-transform: uppercase; }
.hexs { display: flex; justify-content: space-between; margin: 4mm 10mm 0; }
.hexs .h { width: 30mm; text-align: center; }
.hexs .h .l { font-size: 6mm; color: var(--roxo); margin-bottom: 2mm; }
.hex { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.hexs .hv { width: 26mm; height: 22mm; margin: 0 auto; background: #9a9aa8; display: flex; align-items: center; justify-content: center; position: relative; }
.hexs .hv::before { content: ''; position: absolute; inset: .5mm; background: linear-gradient(#fff, #e7e7ec); clip-path: inherit; }
.hexs .hv span { position: relative; font-size: 6mm; color: var(--roxo); }
.capa .evento { margin: 8mm 20mm 0; font-size: 3.8mm; color: #333; border-top: .3mm solid #333; border-bottom: .3mm solid #333; padding: 1mm 0; }

/* Sobre */
.sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; align-items: start; }
.sobre-grid h3 { color: var(--roxo); font-weight: 400; font-size: 5.6mm; text-align: center; margin: 4mm 0; }
.caixa-roxa { background: var(--roxo); color: #fff; text-align: center; padding: 6mm 4mm; font-size: 3.4mm; }
.caixa-roxa .code { color: var(--amarelo); font-size: 10mm; font-weight: 800; margin: 2mm 0; }
.caixa-roxa .pref { color: var(--amarelo); font-weight: 700; font-size: 3.5mm; margin-top: 3mm; }

/* Pares */
.pares-box { background: var(--cinza); padding: 8mm 10mm; margin: 0 0 6mm; }
.par { margin-bottom: 7mm; }
.par:last-child { margin-bottom: 0; }
.par .pill { background: var(--amarelo); color: var(--roxo-esc); font-weight: 800; text-align: center; border-radius: 6mm; padding: 1.6mm; font-size: 3.6mm; margin-bottom: 3mm; }
.par .row { display: grid; grid-template-columns: 1fr 15mm 10mm 15mm 1fr; align-items: center; font-weight: 800; color: var(--roxo); font-size: 3.8mm; }
.par .row .a { text-align: right; padding-right: 3mm; }
.par .row .b { padding-left: 3mm; }
.par .row .ou { text-align: center; font-weight: 400; color: #777; font-size: 3.2mm; }
.hexl { width: 15mm; height: 13mm; background: var(--roxo); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 6mm; font-weight: 900; }
.hexl.on { background: var(--amarelo); color: var(--roxo-esc); }

.pd { margin: 0; padding: 7mm 6mm; }
.pd.esc { background: var(--roxo); color: #fff; }
.pd.cla { background: #f4f4f6; color: #333; }
.pd h4 { text-align: center; font-size: 4.6mm; margin: 0 0 5mm; font-weight: 900; }
.pd.esc h4 { color: var(--amarelo); }
.pd.cla h4 { color: var(--roxo); }
.pd .cols { display: grid; grid-template-columns: 1fr 36mm 1fr; gap: 3mm; align-items: center; }
.pd .cols h5 { margin: 0 0 1.5mm; font-size: 4mm; font-weight: 900; }
.pd .cols .c1 h5 { text-align: right; }
.pd .cols p { font-size: 3.35mm; line-height: 1.45; margin: 0; text-align: left; }
.pd .duo { display: flex; justify-content: center; gap: 2mm; }
.pd .duo .hexl { width: 16mm; height: 14mm; background: #fff; color: var(--roxo); border: 0; outline: 0; box-shadow: none; }
.pd .duo .hexl.on { background: var(--amarelo); color: var(--roxo-esc); }
.pd .marca { display: inline-block; background: var(--amarelo); color: var(--roxo-esc); font-size: 2.6mm; padding: .3mm 1.5mm; border-radius: 1mm; margin-left: 1.5mm; vertical-align: middle; font-weight: 800; }

/* Pontuações */
.barra { margin: 0 0 8mm; }
.barra .lab { display: flex; justify-content: space-between; font-weight: 700; color: var(--roxo); font-size: 3.8mm; margin-bottom: 1.5mm; }
.barra .trk { display: flex; height: 8mm; border-radius: 1.5mm; overflow: hidden; background: #ddd; }
.barra .trk div { display: flex; align-items: center; justify-content: center; font-size: 3.2mm; font-weight: 700; }
.barra .trk .a { background: var(--roxo); color: #fff; }
.barra .trk .b { background: var(--amarelo); color: var(--roxo-esc); }
.barra .cl { font-size: 3.3mm; color: #555; margin-top: 1.2mm; }

/* Visão geral */
.vg-top { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6mm; margin-bottom: 8mm; }
.vg-top .t1 { color: var(--roxo); font-size: 8mm; line-height: 1.25; }
.vg-top .t2 { color: var(--roxo); font-size: 4.6mm; }

/* Exercícios */
.ex-ban { position: relative; height: 26mm; margin: 2mm 0 4mm; }
.ex-ban .bar { position: absolute; left: 0; right: 30mm; bottom: 3mm; height: 11mm; background: linear-gradient(90deg, var(--roxo), var(--roxo-esc)); color: var(--amarelo); font-weight: 900; font-size: 6.4mm; display: flex; align-items: center; padding-left: 4mm; }
.ex-ban svg { position: absolute; right: 0; top: 0; height: 26mm; width: 52mm; }
.ex-tag { display: inline-block; background: var(--amarelo); color: var(--roxo-esc); font-weight: 800; font-size: 3mm; padding: .6mm 2mm; border-radius: 1mm; margin: 0 0 2mm; }

.contra { display: flex; align-items: center; justify-content: center; height: 100%; }

/* ---------- Impressão / PDF ---------- */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .acoes, .no-print { display: none !important; }
  #laudo { padding: 0; }
  .page { margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen and (max-width: 840px) {
  #laudo { zoom: .45; }
  .btns { gap: 16px; }
  .btn { width: 46%; }
  .q p { font-size: 17px; }
}
