/* CLAREZA ESSENCIAL · estilos
   Um só visual em todas as telas: fundo creme, cartão branco, Georgia nos textos, Helvetica na interface,
   terracota nos destaques. Mobile first. Sem dependências externas. */
:root {
  --bg: #e9e5df;
  --card: #ffffff;
  --tint: #f5f1ea;
  --olive: #474b32;
  --ink: #474b32;
  --muted: #6b6e57;
  --line: #e4ded3;
  --sage: #a2a183;
  --terracotta: #d49b7e;
  --rust: #914b27;
  --amber: #c08332;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Helvetica, Arial, sans-serif;
  /* nomes usados pelo simulador */
  --paper: var(--bg);
  --paper-2: var(--tint);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--olive);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Foco: só em elementos interativos. A área principal recebe foco por código (leitores de tela) e não deve ter contorno. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 6px; }
#stage:focus, #stage:focus-visible { outline: none; }

.shell { max-width: 680px; margin: 0 auto; padding: 32px 20px 64px; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Cabeçalho e progresso ---------- */
.brand { text-align: center; margin-bottom: 26px; }
.brand-eyebrow { font: 400 12px var(--sans); letter-spacing: 3px; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.brand-title { font: 700 28px/1.2 var(--serif); color: var(--olive); margin: 0; }
.track { height: 4px; background: rgba(162, 161, 131, .3); border-radius: 2px; margin-bottom: 30px; overflow: hidden; }
.track-bar { height: 100%; width: 0; background: var(--terracotta); border-radius: 2px; transition: width .35s ease; }

/* ---------- Cartão ---------- */
.card { background: var(--card); border-radius: 14px; padding: 34px 30px 30px; box-shadow: 0 4px 24px rgba(71, 75, 50, .08); }
.fade { animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { font-family: var(--serif); color: var(--olive); margin: 0; line-height: 1.25; }
h2 { font-size: 22px; font-weight: 700; color: var(--rust); margin-bottom: 14px; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 17px; }
.muted { color: var(--muted); font: 14px/1.55 var(--sans); }
.small { font-size: 13.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 700 11.5px var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }

.footer { text-align: center; margin-top: 24px; font: 12px var(--sans); color: var(--sage); }

/* ---------- Abertura ---------- */
.disclaimer { font: 13px/1.6 var(--sans); color: var(--olive); background: var(--bg); border-left: 3px solid var(--amber); padding: 14px 16px; border-radius: 6px; margin-top: 20px; }
.resume { margin-top: 22px; padding: 16px 16px 4px; background: var(--tint); border-radius: 10px; font: 14px var(--sans); }
.resume p { margin-bottom: 10px; }
.resume .row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block; font: 600 15px var(--sans); padding: 14px 28px; border-radius: 30px; border: 1.5px solid var(--rust);
  background: var(--rust); color: #fff; cursor: pointer; text-decoration: none; text-align: center;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--amber); border-color: var(--amber); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.block { display: block; width: 100%; margin-top: 30px; }
.btn.ghost { background: transparent; color: var(--olive); border-color: var(--sage); }
.btn.ghost:hover { background: var(--bg); border-color: var(--sage); color: var(--olive); }
.btn.small { padding: 10px 18px; font-size: 13.5px; }
.linklike { background: none; border: 0; padding: 0; color: var(--rust); font: inherit; font-family: var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.nav {
  position: sticky; bottom: 0; display: flex; gap: 12px; margin: 30px -30px -30px; padding: 20px 30px 26px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 38%); border-radius: 0 0 14px 14px;
}
.nav .btn { flex: 1; }
.nav .btn.ghost { flex: 0 0 auto; }
.error { color: var(--rust); font: 13.5px var(--sans); margin: 12px 0 0; min-height: 1.3em; }

/* ---------- Formulário ---------- */
.field { margin: 30px 0 0; }
.field > label.q, .field > .q { display: block; font: 700 16px/1.4 var(--serif); color: var(--olive); margin-bottom: 6px; }
.hint { color: var(--muted); font: 13.5px/1.5 var(--sans); margin: 0 0 12px; }
textarea, input[type=text], input[type=email], input[type=number] {
  width: 100%; font: 15px var(--sans); color: var(--olive); background: var(--bg);
  border: 1.5px solid var(--sage); border-radius: 8px; padding: 12px 14px; resize: vertical;
}
textarea { min-height: 112px; }
textarea:focus, input:focus { outline: 2px solid var(--terracotta); outline-offset: 0; }

.chips { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.chips.row { flex-direction: row; flex-wrap: wrap; }
.chip { position: relative; display: block; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: block; padding: 13px 16px; border: 1.5px solid var(--sage); border-radius: 10px; background: #fff;
  font: 15px/1.4 var(--sans); color: var(--olive); transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chips.row .chip span { padding: 11px 20px; border-radius: 999px; }
.chip:hover span { border-color: var(--terracotta); }
.chip input:checked + span { background: var(--rust); border-color: var(--rust); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 3px; }
.chip input:disabled + span { opacity: .6; cursor: not-allowed; background: var(--tint); }

/* ---------- Escala ---------- */
.part-sub { color: var(--muted); font: 14px var(--sans); margin-bottom: 4px; }
.item { margin: 32px 0 0; min-width: 0; }
.item + .item { padding-top: 32px; border-top: 1px solid var(--line); }
.item .legend { font: 17px/1.5 var(--serif); color: var(--olive); margin: 0 0 18px; }
.scale { display: flex; justify-content: space-between; gap: 8px; max-width: 340px; margin: 0 auto; }
.dot { position: relative; flex: 0 0 auto; }
.dot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dot i { display: block; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--sage); background: #fff; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.dot:hover i { border-color: var(--rust); }
.dot input:checked + i { background: var(--rust); border-color: var(--rust); transform: scale(1.06); }
.dot input:focus-visible + i { outline: 2px solid var(--rust); outline-offset: 3px; }
.dot input:disabled + i { opacity: .4; cursor: not-allowed; }
.ends { display: flex; justify-content: space-between; max-width: 340px; margin: 10px auto 0; font: 12px var(--sans); color: var(--muted); }
.picked { text-align: center; min-height: 1.5em; margin-top: 6px; font: 600 13.5px var(--sans); color: var(--rust); }
.item.missing .legend { color: var(--rust); }
.na { display: block; margin: 2px auto 0; font-size: 13px; }
.skip { margin-top: 26px; padding: 14px 16px; background: var(--tint); border-radius: 10px; font: 14.5px/1.55 var(--sans); }

/* ---------- Processamento ---------- */
.processing { text-align: center; padding: 8vh 0; }
.processing .line { height: 2px; width: 120px; background: var(--line); margin: 0 auto 30px; position: relative; overflow: hidden; border-radius: 2px; }
.processing .line::after { content: ""; position: absolute; inset: 0; background: var(--terracotta); transform: translateX(-100%); animation: sweep 1.8s ease-in-out infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.processing p { font: 19px var(--serif); color: var(--olive); opacity: 0; animation: fade .7s ease forwards; margin-bottom: 10px; }
@keyframes fade { to { opacity: 1; } }

/* ---------- Resultado ---------- */
.result section { margin-top: 54px; }
.result section:first-child { margin-top: 0; }
.result .eyebrow { display: block; }
.result h2 { font-size: 24px; margin-bottom: 16px; }
.result p { font-size: 16.5px; }
.quote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 3px solid var(--terracotta); font: italic 18px/1.5 var(--serif); color: var(--olive); white-space: pre-wrap; overflow-wrap: anywhere; }
.plain { list-style: none; padding: 0; margin: 6px 0 16px; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); font: 14.5px var(--sans); }
.plain li:last-child { border-bottom: 0; }

.dims { margin-top: 12px; border-top: 1px solid var(--line); }
.dimrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; padding: 14px 14px; border-bottom: 1px solid var(--line); }
.dimrow .name { font: 17px var(--serif); color: var(--olive); }
.dimrow .label { font: 13px var(--sans); color: var(--muted); text-align: right; }
.dimrow .seg { grid-column: 1 / -1; display: flex; gap: 5px; margin-top: 4px; }
.dimrow .seg b { height: 5px; flex: 1; border-radius: 3px; background: var(--line); }
.dimrow .seg b.on { background: var(--sage); }
.dimrow.hl { background: var(--tint); border-left: 3px solid var(--rust); padding-left: 11px; }
.dimrow.hl .name { font-weight: 700; }
.dimrow.hl .seg b.on { background: var(--rust); }
.dimrow.hl .label { color: var(--rust); font-weight: 700; }
.dimrow .tag { font: 700 10px var(--sans); letter-spacing: 1.2px; text-transform: uppercase; color: var(--amber); margin-left: 10px; }
.dimrow.na .name, .dimrow.na .label { opacity: .55; }

.callout { margin-top: 22px; padding: 14px 16px 6px; background: var(--tint); border-left: 3px solid var(--sage); border-radius: 6px; }
.callout .eyebrow { color: var(--muted); margin-bottom: 6px; }
.callout p { font-size: 15px; color: var(--muted); }

.pull { padding: 28px 24px; background: var(--olive); border-radius: 12px; }
.pull p { margin: 0; font: 24px/1.35 var(--serif); color: #fbf7ef; }

.evidence, .points { margin: 10px 0 0; padding: 0; list-style: none; }
.evidence li { position: relative; padding: 12px 0 12px 24px; border-bottom: 1px solid var(--line); font-size: 16px; }
.evidence li::before { content: ""; position: absolute; left: 3px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); }
.evidence li:last-child { border-bottom: 0; }
.points { counter-reset: p; }
.points li { counter-increment: p; position: relative; padding: 14px 0 14px 46px; border-bottom: 1px solid var(--line); font-size: 16px; }
.points li::before { content: counter(p); position: absolute; left: 0; top: 13px; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--terracotta); color: var(--rust); display: grid; place-items: center; font: 700 14px var(--sans); }
.points li:last-child { border-bottom: 0; }

.limits p { font-size: 15px; color: var(--muted); }
.next { background: var(--tint); border-radius: 12px; padding: 24px 22px; }
.next h3 { margin-bottom: 10px; color: var(--rust); }
.next .btn { margin-top: 6px; }

.lowev h2 { font-size: 24px; }

.feedback { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); }
.feedback h3 { margin-bottom: 4px; }
.after { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font: 13.5px var(--sans); color: var(--muted); }

.legal { font: 12.5px/1.55 var(--sans); color: var(--muted); margin-top: 20px; }

@media (max-width: 520px) {
  .shell { padding: 24px 16px 48px; }
  .brand-title { font-size: 26px; }
  .card { padding: 26px 20px 24px; }
  .nav { margin: 26px -20px -24px; padding: 18px 20px 22px; }
  .pull p { font-size: 22px; }
  .result h2 { font-size: 22px; }
  .dimrow .tag { display: block; margin: 2px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; font-size: 12pt; }
  .track, .brand-eyebrow, .nav, .feedback, .after, .footer { display: none !important; }
  .card { box-shadow: none; padding: 0; }
  .pull { background: #fff; border: 1.5px solid #000; }
  .pull p { color: #000; }
  .result section { break-inside: avoid; margin-top: 28px; }
}
