:root {
  --brand: #003B88;
  --brand-dark: #002a62;
  --brand-soft: #e8eef8;
  --ink: #1d2533;
  --muted: #5b6577;
  --line: #d9dfe8;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #1f7a4d;
  --warn: #b25b00;
  --bad: #b3261e;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.logo { height: 64px; width: auto; margin: -10px 0; }
.back, .spacer { width: 40px; height: 40px; }
.back {
  border: 0; background: none; color: var(--brand); border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}
.back:hover { background: var(--brand-soft); }
.back[hidden] { display: grid; visibility: hidden; }

.progress { height: 4px; background: var(--line); }
.progress-fill { height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }

.container { width: 100%; max-width: 600px; margin: 0 auto; padding: 24px 16px 32px; flex: 1; }
.loading { color: var(--muted); text-align: center; margin-top: 40px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 8px 0 12px; color: var(--brand-dark); }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 4px 0 16px; }
h3 { font-size: 1.05rem; margin: 24px 0 8px; color: var(--brand-dark); }
p { margin: 0 0 14px; }
.lead { font-size: 1.08rem; color: var(--muted); }
.note {
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  padding: 12px 14px; border-radius: 8px; font-size: .97rem;
}
.hint { color: var(--muted); font-size: .95rem; margin-top: -8px; }
.step-count { color: var(--muted); font-size: .85rem; letter-spacing: .02em; margin-bottom: 4px; }

.options { display: grid; gap: 10px; margin: 8px 0 20px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; min-height: 56px; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.option:hover { border-color: var(--brand); }
.option:focus-visible { outline: 3px solid rgba(0,59,136,.35); outline-offset: 2px; }
.option[aria-pressed="true"], .option.selected { border-color: var(--brand); background: var(--brand-soft); }
.check {
  flex: 0 0 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 6px;
  display: grid; place-items: center; background: #fff;
}
.option[aria-pressed="true"] .check { background: var(--brand); border-color: var(--brand); }
.option[aria-pressed="true"] .check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 14px 20px; font: inherit; font-weight: 500;
  color: #fff; background: var(--brand); border: 0; border-radius: var(--radius);
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { color: var(--brand); background: transparent; border: 1.5px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-whatsapp { color: #0b5d34; background: transparent; border: 1.5px solid #25a560; }
.btn-whatsapp:hover { background: #ecf8f1; }

form .field { margin-bottom: 14px; }
label { display: block; font-weight: 500; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,59,136,.15); }
input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .9rem; margin-top: 4px; min-height: 1em; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .95rem; color: var(--muted); }
.consent input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 22px; accent-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--bad); margin: 10px 0; }

.result-tag { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.bars { display: grid; gap: 12px; margin: 8px 0 8px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.bar-row { display: grid; gap: 4px; }
.bar-label { display: flex; justify-content: space-between; font-size: .95rem; }
.bar-label .val { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; }
.bar.lvl-low > span { background: var(--bad); }
.bar.lvl-mid > span { background: var(--warn); }
.bar.lvl-high > span { background: var(--ok); }
.bar-row.weakest .bar-label { font-weight: 700; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.cta-area { display: grid; gap: 10px; margin-top: 24px; }
.cta-sub { text-align: center; color: var(--muted); font-size: .95rem; margin: 6px 0 0; }
.author { display: flex; gap: 14px; align-items: center; margin: 22px 0 6px; }
.author img { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; object-fit: cover; }
.author p { margin: 0; font-size: .95rem; color: var(--muted); }

.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 18px 16px 90px; }
.footer p { margin: 4px 0; }
.footer a, .linklike { color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10;
  max-width: 600px; margin: 0 auto; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16,24,40,.14); font-size: .92rem;
}
.cookie p { margin: 0 0 10px; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cookie .btn { min-height: 44px; padding: 10px; }

.screen { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .progress-fill { transition: none; } }

@media (min-width: 640px) {
  h1 { font-size: 1.9rem; }
  .container { padding-top: 40px; }
}
