/* Central de Ajuda Averix — estilos
   Cores alinhadas ao app (menu azul-marinho, ação azul). */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #5b6475;
  --navy: #0b2447;
  --navy-2: #133a6b;
  --primary: #1d5bd8;
  --primary-soft: #e8efff;
  --ok: #15803d;
  --ok-soft: #e8f7ee;
  --warn: #b45309;
  --warn-soft: #fff5e6;
  --info-soft: #eef4ff;
  --mark: #f97316;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 24px rgba(15, 23, 42, .06);
  --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #111a2c;
    --surface-2: #0f1727;
    --line: #22304a;
    --text: #e7ecf5;
    --muted: #9aa6bd;
    --primary: #6b9bff;
    --primary-soft: #1a2a4d;
    --ok: #4ade80;
    --ok-soft: #10281c;
    --warn: #fbbf24;
    --warn-soft: #2b2110;
    --info-soft: #152241;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2c; --surface-2: #0f1727; --line: #22304a;
  --text: #e7ecf5; --muted: #9aa6bd; --primary: #6b9bff; --primary-soft: #1a2a4d;
  --ok: #4ade80; --ok-soft: #10281c; --warn: #fbbf24; --warn-soft: #2b2110; --info-soft: #152241;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
/* Dentro do app Averix: ao puxar a página além do limite aparece azul, não branco. */
html.embed { background: var(--navy); overscroll-behavior-y: none; }
html.embed body { overscroll-behavior-y: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
main { flex: 1; outline: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Topo */
.topo { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topo-in { max-width: var(--max); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.marca { color: #fff; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.marca:hover { text-decoration: none; }
.marca-icone { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); }
.marca-txt { font-size: 15px; opacity: .95; }
.marca-txt b { font-weight: 800; letter-spacing: .02em; margin-right: 4px; }
.busca-topo { flex: 1; position: relative; max-width: 460px; margin-left: auto; }
.busca-topo input {
  width: 100%; border: 0; border-radius: 10px; padding: 9px 12px 9px 36px;
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 15px;
}
.busca-topo input::placeholder { color: rgba(255,255,255,.7); }
.busca-topo input:focus { outline: 2px solid rgba(255,255,255,.55); background: rgba(255,255,255,.18); }
.busca-ico { position: absolute; left: 10px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: rgba(255,255,255,.8); }
.topo-app { color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 7px 12px; border-radius: 10px; font-size: 14px; white-space: nowrap; }
.topo-app:hover { background: rgba(255,255,255,.1); text-decoration: none; }
body.home .busca-topo { visibility: hidden; }
body.embed .topo, body.embed .rodape { display: none; }

/* Layout */
.pagina { max-width: var(--max); margin: 0 auto; padding: 24px 16px 48px; }
.carregando { max-width: var(--max); margin: 48px auto; padding: 0 16px; color: var(--muted); }
.migalhas { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.migalhas a { color: var(--muted); }
.migalhas span[aria-hidden] { opacity: .6; }

/* Início */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1d4ed8 140%); color: #fff; }
.hero-in { max-width: 820px; margin: 0 auto; padding: 48px 16px 56px; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
.hero p { margin: 0 0 24px; opacity: .85; }
.busca-grande { position: relative; }
.busca-grande input {
  width: 100%; border: 0; border-radius: 14px; padding: 17px 18px 17px 52px; font: inherit; font-size: 18px;
  background: #fff; color: #0f172a; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.busca-grande input:focus { outline: 3px solid #93b4ff; }
.busca-grande .busca-ico { left: 18px; width: 22px; height: 22px; color: #64748b; }
.sugestoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.sugestoes a { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 999px; font-size: 14px; }
.sugestoes a:hover { background: rgba(255,255,255,.2); text-decoration: none; }

.secao-titulo { font-size: 20px; margin: 32px 0 14px; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cartao {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); color: var(--text); display: flex; flex-direction: column; gap: 6px; min-height: 100%;
  transition: transform .12s ease, border-color .12s ease;
}
a.cartao:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--primary); }
.cartao-topo { display: flex; align-items: center; gap: 12px; }
.cartao h3 { font-size: 17px; margin: 0; }
.cartao p { margin: 0; color: var(--muted); font-size: 14px; }
.cartao .qtd { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.icone-mod { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.icone-mod svg { width: 22px; height: 22px; }
.em-breve { opacity: .6; }
.selo { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

.lista-artigos { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.lista-artigos li + li { border-top: 1px solid var(--line); }
.lista-artigos a { display: flex; gap: 12px; align-items: center; padding: 14px 18px; color: var(--text); }
.lista-artigos a:hover { background: var(--surface-2); text-decoration: none; }
.lista-artigos .t { font-weight: 600; }
.lista-artigos .r { font-size: 14px; color: var(--muted); }
.lista-artigos .seta { margin-left: auto; color: var(--muted); }
.lista-artigos .em-breve .t { font-weight: 500; }

/* Artigo */
.artigo-grade { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.artigo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 36px); box-shadow: var(--shadow); min-width: 0; overflow-wrap: anywhere; }
.artigo h1 { font-size: clamp(24px, 3.6vw, 32px); line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
.artigo .resumo { color: var(--muted); font-size: 17px; margin: 0 0 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); max-width: 100%; min-width: 0; }
.chip svg { flex: none; }
.chip svg { width: 14px; height: 14px; }
.artigo h2 { font-size: 21px; margin: 30px 0 10px; }
.artigo h3 { font-size: 18px; margin: 24px 0 8px; }
.artigo p, .artigo li { font-size: 16.5px; }
.artigo code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.artigo kbd, .artigo .ui { font: inherit; font-weight: 700; }

ol.passos { list-style: none; counter-reset: passo; padding: 0; margin: 8px 0 0; }
ol.passos > li { counter-increment: passo; position: relative; padding: 0 0 22px 48px; }
ol.passos > li::before {
  content: counter(passo); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
ol.passos > li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 2px; background: var(--line); }
ol.passos > li:last-child::after { display: none; }
ol.passos > li > p:first-child { margin-top: 3px; }

.figura { margin: 12px 0 4px; }
.figura-quadro { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; cursor: zoom-in; }
.figura-quadro img, .figura-quadro video { width: 100%; height: auto; }
.figura figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.figura.animacao .figura-quadro { cursor: default; }
.figura .rotulo-anim { position: absolute; top: 8px; right: 8px; background: rgba(11,36,71,.85); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }

/* Destaques sobre a imagem (coordenadas em % da imagem) */
.destaque { position: absolute; pointer-events: none; }
.destaque.circulo {
  border: 3px solid var(--mark); border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .22);
  animation: pulsar 1.8s ease-in-out infinite;
}
.destaque.retangulo { border: 3px solid var(--mark); border-radius: 10px; box-shadow: 0 0 0 4px rgba(249, 115, 22, .2); }
.destaque.numero {
  width: 26px; height: 26px; border-radius: 50%; background: var(--mark); color: #fff; font-weight: 700; font-size: 14px;
  display: grid; place-items: center; transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.destaque.seta { width: 0; height: 0; }
.destaque.seta::before {
  content: ""; position: absolute; width: 44px; height: 4px; background: var(--mark); border-radius: 2px;
  right: 10px; top: -2px; transform-origin: right center;
}
.destaque.seta::after {
  content: ""; position: absolute; right: 0; top: -9px; border-left: 16px solid var(--mark);
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.destaque.seta.esq { transform: scaleX(-1); }
@keyframes pulsar { 0%, 100% { box-shadow: 0 0 0 4px rgba(249,115,22,.22); } 50% { box-shadow: 0 0 0 9px rgba(249,115,22,.08); } }
@media (prefers-reduced-motion: reduce) { .destaque.circulo { animation: none; } }

.caixa { border-radius: 12px; padding: 14px 16px 14px 46px; margin: 18px 0; position: relative; border: 1px solid transparent; }
.caixa > :first-child { margin-top: 0; }
.caixa > :last-child { margin-bottom: 0; }
.caixa::before { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.caixa.resultado { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.caixa.resultado::before { content: "✓"; background: var(--ok); }
.caixa.dica { background: var(--info-soft); border-color: color-mix(in srgb, var(--primary) 22%, transparent); }
.caixa.dica::before { content: "i"; background: var(--primary); }
.caixa.atencao { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.caixa.atencao::before { content: "!"; background: var(--warn); }
.caixa .caixa-titulo { font-weight: 700; display: block; margin-bottom: 4px; }

.relacionados { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.relacionados h2 { font-size: 18px; margin: 0 0 8px; }
.relacionados ul { margin: 0; padding-left: 18px; }
.feedback { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.feedback button { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.feedback button:hover { border-color: var(--primary); }

.lateral { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.lateral .bloco { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: 14px; }
.lateral h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.lateral ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lateral a.ativo { font-weight: 700; color: var(--text); }

/* Busca */
.resultado-busca { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.resultado-busca a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; color: var(--text); box-shadow: var(--shadow); }
.resultado-busca a:hover { border-color: var(--primary); text-decoration: none; }
.resultado-busca .mod { font-size: 13px; color: var(--muted); }
.resultado-busca .t { font-weight: 700; font-size: 17px; display: block; }
.resultado-busca .r { color: var(--muted); font-size: 14px; }
.vazio { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); }
.auto { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.18); list-style: none; margin: 0; padding: 6px; text-align: left; z-index: 30; }
.auto a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.auto a small { display: block; color: var(--muted); font-size: 12px; }
.auto a:hover, .auto a.sel { background: var(--primary-soft); text-decoration: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, .86); z-index: 100; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-corpo { position: relative; max-width: min(1400px, 96vw); max-height: 92vh; }
.lightbox-corpo .figura-quadro { cursor: default; }
.lightbox-corpo img { max-height: 88vh; width: auto; }
.lightbox-fechar { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }

.rodape { border-top: 1px solid var(--line); background: var(--surface); }
.rodape-in { max-width: var(--max); margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.rodape-sep { opacity: .5; }

@media (max-width: 900px) {
  .artigo-grade { grid-template-columns: 1fr; }
  .lateral { position: static; }
}
@media (max-width: 640px) {
  .marca-txt { display: none; }
  .topo-app { display: none; }
  .busca-topo { max-width: none; }
  body.home .busca-topo { display: none; }
  .hero-in { padding: 32px 16px 36px; }
  .busca-grande input { font-size: 16px; padding: 15px 14px 15px 46px; }
  ol.passos > li { padding-left: 40px; }
  ol.passos > li::before { width: 28px; height: 28px; font-size: 14px; }
  ol.passos > li::after { left: 13px; top: 32px; }
  .destaque.numero { width: 20px; height: 20px; font-size: 12px; }
  .destaque.circulo { border-width: 2px; }
}
