:root {
  --fundo: #071a3d;
  --fundo-2: #0b2554;
  --cartao: #10306a;
  --cartao-2: #163a7c;
  --linha: #2a4f94;
  --texto: #eef3ff;
  --texto-2: #b7c6e6;
  --azul: #4f8dff;
  --estado: #1d4590;
  --estado-borda: #6f98e0;
  --cta: #ffc23d;
  --cta-texto: #1b1300;
  --ok: #3ddc97;
  --amarelo: #ffd400;
  --laranja: #ff8a00;
  --vermelho: #ff3b3b;
  --raio: 14px;
  --grad-alerta: linear-gradient(135deg, #FFF27A 0%, #FFC21A 45%, #FF7A00 100%);
  --grad-cartao: linear-gradient(160deg, #15408a 0%, #0f2d66 55%, #0b2352 100%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(255, 170, 0, .16), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(79, 141, 255, .18), transparent 60%),
    linear-gradient(180deg, #08204a 0%, #071a3d 40%, #040f26 100%);
  background-attachment: fixed;
  background-color: var(--fundo);
  color: var(--texto);
  font: 16px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--azul); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.6rem); }
b, strong { color: #fff; }
small, .mudo { color: var(--texto-2); }

.topo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255, 194, 26, .35); background: linear-gradient(90deg, rgba(11,37,84,.95), rgba(7,26,61,.9)); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 1000;
}
.marca { font-weight: 800; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.marca { font-size: 1.15rem; }
.marca::before { content: ''; width: 30px; height: 28px; background: url(icone.svg) center / contain no-repeat; filter: drop-shadow(0 2px 8px rgba(255, 150, 0, .45)); }

.miolo { max-width: 620px; margin: 0 auto; padding: 20px 16px 48px; }
.cartao { background: var(--grad-cartao); box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06); border: 1px solid var(--linha); border-radius: var(--raio); padding: 18px; }
.cartao + .cartao { margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 14px 18px; border: 0; border-radius: 12px;
  background: var(--grad-alerta); color: var(--cta-texto); font-family: inherit; font-weight: 800; font-size: 1.05rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 0 #c25a00, 0 12px 30px rgba(255, 140, 0, .35); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #c25a00, 0 6px 16px rgba(255, 140, 0, .3); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--texto); border: 1px solid var(--linha); box-shadow: none; font-weight: 600; }
.btn.peq { min-height: 40px; width: auto; padding: 8px 14px; font-size: .95rem; }

select, input, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--linha); background: var(--fundo-2); color: var(--texto); font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
select:focus, input:focus, textarea:focus, .btn:focus-visible, .opcao:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
.lado { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .lado { grid-template-columns: 1fr; } }

/* quiz */
.barra { height: 6px; background: var(--fundo-2); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.barra > i { display: block; height: 100%; width: 0; background: var(--grad-alerta); box-shadow: 0 0 12px rgba(255, 170, 0, .6); transition: width .3s; }
.opcoes { display: grid; gap: 10px; margin-top: 14px; }
.opcao {
  text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--linha); background: var(--cartao); color: var(--texto); font: inherit;
}
.opcao span { display: block; color: var(--texto-2); font-size: .9rem; margin-top: 2px; }
.opcao { transition: border-color .15s, transform .08s; }
.opcao:hover { border-color: #5d86d6; }
.opcao[aria-pressed="true"] { border-color: #FFC21A; background: linear-gradient(135deg, rgba(255, 194, 26, .16), rgba(255, 122, 0, .08)), var(--cartao-2); box-shadow: inset 0 0 0 1px #FFC21A, 0 0 18px rgba(255, 170, 0, .18); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; color: var(--cta); margin-bottom: 6px; background: var(--grad-alerta); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.destaque { background: var(--grad-alerta); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fonte { font-size: .8rem; color: var(--texto-2); margin-top: 10px; }

/* alertas */
.aviso { border-left: 6px solid var(--amarelo); background: var(--fundo-2); border-radius: 10px; padding: 12px 14px; }
.aviso + .aviso { margin-top: 10px; }
.aviso h3 { font-size: 1rem; margin-bottom: 4px; }
.aviso p { margin: 4px 0 0; font-size: .92rem; color: var(--texto-2); }
.selo { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; color: #111; background: var(--amarelo); vertical-align: middle; }

/* resultado */
.nota { font-size: 3.4rem; font-weight: 900; line-height: 1; background: var(--grad-alerta); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nota small { -webkit-text-fill-color: var(--texto-2); }
.medidor { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--vermelho), var(--laranja), var(--amarelo), var(--ok)); position: relative; margin: 12px 0 4px; }
.medidor > i { position: absolute; top: -5px; width: 4px; height: 22px; background: #fff; border-radius: 2px; transform: translateX(-2px); }
.lista { list-style: none; padding: 0; margin: 10px 0 0; }
.lista li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--linha); }
.lista li:last-child { border-bottom: 0; }
.lista li::before { content: '✕'; position: absolute; left: 4px; color: var(--vermelho); font-weight: 900; }
.lista.bom li::before { content: '✓'; color: var(--ok); }
.preco { font-size: 2.6rem; font-weight: 900; background: linear-gradient(135deg, #ffffff, #FFE45C); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.preco s { -webkit-text-fill-color: var(--texto-2); }
.preco s { font-size: 1.1rem; color: var(--texto-2); font-weight: 500; margin-right: 6px; }
details { border-bottom: 1px solid var(--linha); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 600; }

.rodape { text-align: center; color: var(--texto-2); font-size: .85rem; padding: 24px 16px 32px; border-top: 1px solid var(--linha); }
.rodape small { display: block; margin-top: 6px; }
.carregando { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--linha); border-top-color: var(--cta); border-radius: 50%; animation: gira 0.8s linear infinite; vertical-align: middle; }
@keyframes gira { to { transform: rotate(360deg); } }
.oculto { display: none !important; }

/* materiais (despensa, plano da família) */
.doc { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.doc h2 { margin-top: 1.6em; padding-top: .4em; border-top: 1px solid var(--linha); }
.doc h3 { margin-top: 1.2em; }
.doc p, .doc li { max-width: 68ch; }
.doc .capa { padding: 8px 0 4px; }
.doc .capa p { color: var(--texto-2); font-size: 1.05rem; }
.tabela { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .95rem; }
.tabela th, .tabela td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linha); vertical-align: top; }
.tabela th { color: var(--texto-2); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.tabela td.num { white-space: nowrap; font-weight: 700; color: #fff; }
.tabela-rolagem { overflow-x: auto; }
@media (max-width: 560px) { .tabela .col-total { display: none; } .tabela { font-size: .9rem; } }
.dica { background: var(--cartao); border-left: 4px solid var(--cta); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.dica.perigo { border-left-color: var(--vermelho); }
.passos { counter-reset: p; list-style: none; padding: 0; }
.passos li { counter-increment: p; position: relative; padding: 6px 0 6px 36px; }
.passos li::before { content: counter(p); position: absolute; left: 0; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--cta); color: var(--cta-texto); font-weight: 800; text-align: center; line-height: 26px; font-size: .85rem; }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.acoes .btn { width: auto; flex: 1 1 200px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .campos { grid-template-columns: 1fr; } }
.cenario { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 14px 16px; margin: 10px 0; break-inside: avoid; }
.cenario h3 { margin-top: 0; }
.cenario ol { margin: 0; padding-left: 20px; }

@media print {
  :root { --texto: #111; --texto-2: #444; --linha: #bbb; --cartao: #fff; --fundo: #fff; --fundo-2: #fff; --cta: #b07800; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .cartao, .cenario, .dica { background: #fff !important; box-shadow: none !important; }
  .eyebrow, .destaque { -webkit-text-fill-color: #b06a00; background: none; }
  b, strong, .tabela td.num { color: #000; }
  .topo, .rodape, .acoes, .nao-imprimir { display: none !important; }
  .doc { padding: 0; max-width: none; }
  .doc h2 { break-after: avoid; }
  input::placeholder, textarea::placeholder { color: transparent; }
  .tabela .col-total { display: table-cell !important; }
  input, textarea, select { border: 0; border-bottom: 1px solid #999; border-radius: 0; background: #fff; color: #000; min-height: 0; padding: 2px 0; }
  .cenario, .dica { border-color: #bbb; }
  a { color: #000; text-decoration: none; }
  @page { margin: 14mm; }
}

/* ---------- modo PDF (?pdf=1): mesmo visual do site, com capa ---------- */
.capa-pdf { display: none; }
html.modo-pdf { background: #071a3d; }
html.modo-pdf body { background: #071a3d; }
html.modo-pdf .topo, html.modo-pdf .rodape, html.modo-pdf .acoes, html.modo-pdf .nao-imprimir, html.modo-pdf .doc > .capa { display: none !important; }
html.modo-pdf .doc { max-width: none; padding: 0 16mm; }
html.modo-pdf .capa-pdf {
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
  height: 297mm; margin: 0 -16mm; padding: 0 22mm; break-after: page; page: capa;
  background:
    radial-gradient(70% 45% at 80% 70%, rgba(255, 160, 0, .28), transparent 70%),
    radial-gradient(60% 50% at 0% 0%, rgba(79, 141, 255, .45), transparent 70%),
    linear-gradient(165deg, #0d2f72 0%, #071a3d 55%, #030c20 100%);
}
.capa-pdf .simbolo { width: 120mm; position: absolute; right: -14mm; bottom: 20mm; opacity: .95; filter: drop-shadow(0 10mm 18mm rgba(255, 140, 0, .5)); }
.capa-pdf .aneis { position: absolute; right: -40mm; bottom: -10mm; width: 190mm; height: 190mm; border-radius: 50%; border: 1px solid rgba(255, 194, 26, .35); box-shadow: 0 0 0 18mm rgba(255, 194, 26, .05), 0 0 0 40mm rgba(255, 194, 26, .03); }
.capa-pdf .marca-pdf { display: flex; align-items: center; gap: 4mm; font-weight: 900; font-size: 20pt; position: absolute; top: 22mm; left: 22mm; }
.capa-pdf .marca-pdf img { width: 14mm; }
.capa-pdf h1 { font-size: 46pt; line-height: 1; letter-spacing: -.03em; margin: 4mm 0 6mm; max-width: 150mm; }
.capa-pdf p { font-size: 15pt; color: #c3d2f0; max-width: 120mm; margin: 0; }
.capa-pdf .url { position: absolute; left: 22mm; bottom: 20mm; font-weight: 800; font-size: 12pt; }
html.modo-pdf h2 { break-after: avoid; padding-top: 6mm; margin-top: 8mm; border-top: 1px solid rgba(255, 194, 26, .35); }
html.modo-pdf h2::before { content: ''; display: inline-block; width: 7mm; height: 6.5mm; margin-right: 3mm; vertical-align: -1mm; background: url(icone.svg) center / contain no-repeat; }
html.modo-pdf .cartao, html.modo-pdf .cenario, html.modo-pdf .dica, html.modo-pdf .tabela tr, html.modo-pdf .passos li { break-inside: avoid; }
html.modo-pdf .tabela { background: linear-gradient(160deg, #15408a, #0b2352); border-radius: 10px; overflow: hidden; }
html.modo-pdf .tabela th { background: rgba(255, 194, 26, .12); color: #FFD84D; }
html.modo-pdf .tabela th, html.modo-pdf .tabela td { padding: 7px 10px; }
html.modo-pdf .cenario { background: var(--grad-cartao); }
html.modo-pdf .dica { background: linear-gradient(135deg, rgba(255, 194, 26, .14), rgba(255, 122, 0, .06)), #0f2d66; }
html.modo-pdf .dica.perigo { background: linear-gradient(135deg, rgba(255, 59, 59, .18), rgba(255, 59, 59, .05)), #0f2d66; }
html.modo-pdf input { background: rgba(255, 255, 255, .04); border-color: #3a62ad; min-height: 11mm; }
html.modo-pdf input::placeholder { color: transparent; }
html.modo-pdf .col-total { display: table-cell !important; }
html.modo-pdf .membro button { display: none; }
html.modo-pdf .membro { grid-template-columns: 1.3fr 1fr 1.6fr; }
