:root {
  --roxo: #6d3e91;
  --roxo-80: #8a65a7;
  --roxo-20: #e2d8e9;
  --roxo-10: #f0ebf4;
  --laranja: #ec671a;
  --verde: #c8d400;
  --texto: #2b2233;
  --cinza: #6b6475;
  --borda: #d9d0e0;
  --bg: #faf8fc;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--texto);
  font-family: "Museo Sans", Calibri, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px; line-height: 1.55;
}
header.top { background: var(--roxo); border-bottom: 4px solid var(--laranja); color: #fff; }
header.top .in { max-width: 860px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header.top .brand { font-weight: 700; letter-spacing: 3px; font-size: 20px; display: flex; align-items: center; gap: 10px; }
header.top .brand img { height: 36px; display: block; }
header.top .tag { font-size: 14px; opacity: .9; text-align: right; }
main { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { color: var(--roxo); font-size: 28px; line-height: 1.2; margin: 0 0 4px; }
h2 { color: var(--roxo); font-size: 22px; margin: 0 0 8px; }
h3 { font-size: 18px; margin: 0 0 4px; }
.sub { color: var(--laranja); font-weight: 700; margin: 0 0 18px; font-size: 18px; }
.card { background: #fff; border: 1px solid var(--borda); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.note { background: var(--roxo-10); border-left: 5px solid var(--laranja); border-radius: 6px; padding: 12px 16px; margin: 14px 0; font-size: 15.5px; }
.note.verde { border-left-color: var(--verde); }
.muted { color: var(--cinza); font-size: 15px; }
label.f { display: block; font-weight: 700; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=date], textarea, select {
  width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--borda); border-radius: 8px; background: #fff; color: var(--texto);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, .opt input:focus-visible + span { outline: 3px solid var(--laranja); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 15px; }
.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; accent-color: var(--roxo); }
button, a.btn {
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 8px; padding: 12px 22px;
  background: var(--roxo); color: #fff; text-decoration: none; display: inline-block; text-align: center;
}
button:hover, a.btn:hover { background: #5a3279; }
button.alt, a.btn.alt { background: #fff; color: var(--roxo); border: 2px solid var(--roxo); padding: 10px 20px; }
button.alt:hover, a.btn.alt:hover { background: var(--roxo-10); }
button.orange, a.btn.orange { background: var(--laranja); }
button.orange:hover, a.btn.orange:hover { background: #cf5510; }
button.danger { background: #fff; color: #b3261e; border: 2px solid #b3261e; padding: 6px 12px; font-size: 14px; }
button.danger:hover { background: #fdecea; }
button[disabled] { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.err { color: #b3261e; font-weight: 700; margin-top: 12px; min-height: 1.2em; }

/* progresso */
.prog { margin-bottom: 18px; }
.prog .bar { height: 10px; background: var(--roxo-20); border-radius: 6px; overflow: hidden; }
.prog .bar > i { display: block; height: 100%; background: var(--roxo); transition: width .25s; }
.prog .lbl { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--cinza); margin-bottom: 6px; flex-wrap: wrap; gap: 4px; }
.steps { display: flex; gap: 6px; margin-top: 8px; }
.steps i { flex: 1; height: 6px; border-radius: 4px; background: var(--roxo-20); }
.steps i.done { background: var(--roxo); }
.steps i.cur { background: var(--laranja); }

/* itens */
.item { border-top: 1px solid var(--borda); padding: 18px 0; }
.item:first-of-type { border-top: 0; }
.item p.q { font-weight: 700; margin: 0 0 10px; }
.item p.q span { color: var(--roxo); margin-right: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 72px; padding: 8px 4px; border: 2px solid var(--borda); border-radius: 9px; background: #fff; font-size: 13.5px; line-height: 1.25; gap: 2px;
}
.opt span b { font-size: 22px; color: var(--roxo); line-height: 1; }
.opt input:checked + span { border-color: var(--roxo); background: var(--roxo); color: #fff; }
.opt input:checked + span b { color: #fff; }
.opt:hover span { border-color: var(--roxo-80); }
.na { margin-top: 8px; }
.na .opt span { flex-direction: row; min-height: 0; padding: 9px 14px; font-size: 14.5px; justify-content: flex-start; }
.na .opt input:checked + span { background: var(--cinza); border-color: var(--cinza); }

/* resultado */
.dim { border: 1px solid var(--borda); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.dim .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dim .val { font-size: 24px; font-weight: 700; color: var(--roxo); }
.dim .val.nd { font-size: 16px; color: var(--cinza); }
.meter { height: 12px; background: var(--roxo-20); border-radius: 7px; overflow: hidden; margin: 8px 0 6px; }
.meter i { display: block; height: 100%; background: var(--roxo); border-radius: 7px; }
.dim .meta { font-size: 14px; color: var(--cinza); }
.dim .refl { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--borda); font-size: 15.5px; }
.dim .refl b { color: var(--roxo); }
.radar { display: block; width: 100%; max-width: 520px; margin: 0 auto 10px; height: auto; }

.hide { display: none !important; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 24px; }
  .opts { grid-template-columns: 1fr; }
  .opt span { flex-direction: row; justify-content: flex-start; text-align: left; min-height: 48px; padding: 10px 14px; gap: 12px; font-size: 15px; }
  .opt span b { font-size: 20px; min-width: 20px; }
  header.top .tag { display: none; }
  .card { padding: 16px; }
}

/* admin */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { background: var(--roxo-10); color: var(--roxo); font-size: 13.5px; }
.tablewrap { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.pill.on { background: #eef3b0; color: #4b5200; }
.pill.off { background: #eee; color: #555; }
.code { font-family: Consolas, monospace; font-size: 20px; letter-spacing: 3px; color: var(--roxo); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
a.lnk { color: var(--roxo); font-weight: 700; cursor: pointer; text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; }
a.lnk:hover { background: none; }

@media print {
  header.top, .row, button { display: none !important; }
  body { background: #fff; }
}

body.admin header.top .in { max-width: 1100px; }
td.act { white-space: nowrap; }
