/* Quiz Tricolor do Nacional — mobile first. Tokens por leitura visual da logo (não é manual de marca oficial). */
:root {
  --navy: #0d153d;
  --navy-2: #172152;
  --navy-3: #222d6b;
  --yellow: #f4a900;
  --green: #087a24;
  --green-soft: #2fbf5a;
  --white: #ffffff;
  --muted: #c5ccee;
  --danger: #ffb3a7;
  --line: #3a4690;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
}
img { max-width: 100%; height: auto; }
a { color: var(--yellow); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.shell { max-width: 30rem; margin: 0 auto; padding: 0 20px 32px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.shell > main { flex: 1; display: flex; flex-direction: column; gap: 20px; outline: none; }

.test-banner {
  position: sticky; top: 0; z-index: 10; margin: 0 -20px 12px; padding: 8px 16px;
  background: var(--yellow); color: var(--navy); font-weight: 700; font-size: 0.875rem; text-align: center; letter-spacing: 0.02em;
}
.net-banner {
  position: sticky; top: 0; z-index: 11; margin: 0 -20px 12px; padding: 10px 16px; background: #7a1f12; color: #fff; font-weight: 600; text-align: center;
}

.brand { display: flex; justify-content: center; padding: 20px 0 4px; }
.brand img { width: 112px; height: auto; display: block; }
.brand.small img { width: 72px; }

h1 { font-size: 1.75rem; line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 0; font-weight: 700; }
h1:focus, h2:focus, legend:focus { outline: none; }
p { margin: 0; }
.lead { font-size: 1.125rem; color: var(--white); }
.muted { color: var(--muted); font-size: 0.9375rem; }
.eyebrow { color: var(--yellow); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; }

.card { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }

.btn {
  appearance: none; border: 2px solid transparent; border-radius: 14px; min-height: 52px; padding: 12px 20px; width: 100%;
  font: inherit; font-weight: 700; font-size: 1.0625rem; cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--yellow); color: var(--navy); }
.btn-primary:hover { background: #ffbb2e; }
.btn-secondary { background: transparent; color: var(--white); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-green { background: var(--green); color: #fff; }
.btn[aria-disabled='true'], .btn:disabled { opacity: 0.65; cursor: not-allowed; }
.linkish { background: none; border: 0; color: var(--yellow); font: inherit; text-decoration: underline; cursor: pointer; padding: 12px 4px; min-height: 44px; }

.links { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: center; font-size: 0.9375rem; }
.links a { display: inline-flex; min-height: 44px; align-items: center; }

/* formulário */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 600; }
.field input[type='text'], .field input[type='tel'], .field input[type='password'], .field input[type='number'] {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--navy); color: var(--white); font: inherit; font-size: 1rem;
}
.field input::placeholder { color: #8e98cf; }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.field-error { color: var(--danger); font-weight: 600; font-size: 0.9375rem; }
.field-hint { color: var(--muted); font-size: 0.875rem; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 6px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--yellow); flex: none; }
.form-error { background: #4a1a14; border: 1px solid var(--danger); color: #ffd9d2; padding: 12px 14px; border-radius: 12px; font-weight: 600; }

/* pergunta */
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress-bar { height: 10px; border-radius: 999px; background: var(--navy-3); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--yellow); border-radius: 999px; transition: width 200ms ease; }
.progress-label { font-weight: 700; color: var(--muted); font-size: 0.9375rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 1.375rem; line-height: 1.25; font-weight: 800; padding: 0; margin-bottom: 16px; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option { position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--navy-2); cursor: pointer; font-size: 1.0625rem; font-weight: 600; transition: border-color 120ms ease, background-color 120ms ease; }
.option:hover { border-color: var(--muted); }
.option input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.option .mark { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.option .mark::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); transform: scale(0); transition: transform 120ms ease; }
.option:has(input:checked) { border-color: var(--yellow); background: var(--navy-3); }
.option:has(input:checked) .mark { background: var(--yellow); border-color: var(--yellow); }
.option:has(input:checked) .mark::after { transform: scale(1); }
.option:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 3px; }
.status-line { min-height: 1.5em; font-weight: 700; color: var(--green-soft); }
.status-line.err { color: var(--danger); }

/* resultado */
.score { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-weight: 800; }
.score b { font-size: 4.5rem; line-height: 1; color: var(--yellow); }
.score span { font-size: 1.5rem; color: var(--muted); }
.review { display: flex; flex-direction: column; gap: 12px; }
.review-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--navy-2); display: flex; flex-direction: column; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 2px 10px; border-radius: 999px; font-size: 0.875rem; width: fit-content; }
.badge.ok { background: #0e3d1c; color: #8ff0ac; border: 1px solid var(--green-soft); }
.badge.no { background: #4a1a14; color: var(--danger); border: 1px solid var(--danger); }
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--yellow); }

/* voucher */
.voucher { position: relative; background: linear-gradient(160deg, var(--navy-3), var(--navy-2)); border: 2px solid var(--yellow); border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow); overflow: hidden; }
.voucher .amount { font-size: 2.5rem; font-weight: 800; color: var(--yellow); line-height: 1.1; }
.voucher .qr { background: #fff; border-radius: 12px; padding: 10px; width: min(260px, 100%); margin: 8px auto; display: block; }
.voucher .qr img { display: block; width: 100%; height: auto; }
.voucher .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.0625rem; letter-spacing: 0.04em; text-align: center; word-break: break-all; background: var(--navy); border-radius: 10px; padding: 10px; border: 1px dashed var(--line); }
.voucher.used, .voucher.expired { border-color: var(--line); opacity: 0.85; }
.voucher.used .qr, .voucher.expired .qr { display: none; }
.ribbon { display: inline-block; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 0.8125rem; padding: 4px 10px; border-radius: 8px; letter-spacing: 0.04em; width: fit-content; }
.status-pill { display: inline-flex; font-weight: 700; padding: 4px 12px; border-radius: 999px; font-size: 0.9375rem; width: fit-content; }
.status-pill.available { background: #0e3d1c; color: #8ff0ac; border: 1px solid var(--green-soft); }
.status-pill.redeemed, .status-pill.expired { background: #33385e; color: #e3e7ff; border: 1px solid var(--line); }

.rules-list { padding-left: 1.2rem; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.skeleton { height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--navy-2), var(--navy-3), var(--navy-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

footer.foot { padding-top: 20px; }

@media (min-width: 640px) {
  .shell { padding-top: 12px; }
  h1 { font-size: 2.125rem; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .brand img { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --line: #8e9ae0; --muted: #e3e7ff; }
}
