/* Central de Ajuda · Gestão Milimétrica. Tokens = os do design system do app (ZAIMU CASH/design-system/tokens), tema claro e escuro. */
:root{
  --brand-teal:#2DD4BF; --brand-navy:#16202B;
  --bg-app:#F5F6F8; --surface-card:#FFFFFF; --surface-sunken:#F7F8FA; --surface-hover:#F2F4F7;
  --text-strong:#0E121B; --text-body:#525866; --text-subtle:#717784; --text-muted:#99A0AE; --text-link:#335BFF;
  --border-subtle:#EBEDF0; --border-default:#E1E4EA; --border-strong:#CACFD8;
  --action-primary:#335BFF; --action-primary-hover:#2447E6; --action-soft:#EEF2FF; --on-primary:#FFFFFF;
  --status-info-bg:#EEF2FF; --status-info-fg:#1A35B8; --status-warn-bg:#FFF3EA; --status-warn-fg:#B3500B;
  --font-sans:'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:'Geist Mono', ui-monospace, Consolas, monospace;
  --font-serif:'Instrument Serif', Georgia, 'Times New Roman', serif;
  --r-sm:8px; --r-md:10px; --r-lg:14px; --r-xl:20px; --r-pill:999px;
  --shadow-xs:0 1px 2px rgba(14,18,27,.05); --ease:cubic-bezier(.22,.8,.36,1);
  color-scheme:light;
}
/* tema: claro por padrão (como o app); o botão do cabeçalho põe data-theme="dark" e guarda a escolha */
:root[data-theme="dark"]{
  --bg-app:#0E121B; --surface-card:#181B25; --surface-sunken:#0E121B; --surface-hover:#222530;
  --text-strong:#FFFFFF; --text-body:#C3C7CF; --text-subtle:#99A0AE; --text-muted:#717784; --text-link:#5C7CFF;
  --border-subtle:#222530; --border-default:#2B303B; --border-strong:#525866;
  --action-soft:rgba(92,124,255,.16); --status-info-bg:rgba(92,124,255,.16); --status-info-fg:#B8C8FF;
  --status-warn-bg:rgba(250,115,25,.16); --status-warn-fg:#FFB98A; --shadow-xs:0 1px 2px rgba(0,0,0,.4); color-scheme:dark; }
.tema .lua{ display:none; } :root[data-theme="dark"] .tema .sol{ display:none; } :root[data-theme="dark"] .tema .lua{ display:block; }

*{ box-sizing:border-box; }
html{ scroll-padding-top:88px; }
body{ margin:0; background:var(--bg-app); color:var(--text-body); font:400 14px/1.5 var(--font-sans); letter-spacing:-.005em; -webkit-font-smoothing:antialiased; }
img{ max-width:100%; display:block; }
[hidden]{ display:none !important; }
a{ color:var(--text-link); text-decoration:none; } a:hover{ text-decoration:underline; }
:focus-visible{ outline:3px solid color-mix(in srgb, var(--action-primary) 30%, transparent); outline-offset:2px; border-radius:var(--r-sm); }
h1,h2,h3{ color:var(--text-strong); letter-spacing:-.02em; font-weight:600; line-height:1.3; margin:0; text-wrap:balance; }
.wrap{ max-width:1200px; margin:0 auto; padding-left:max(16px, env(safe-area-inset-left,0px)); padding-right:max(16px, env(safe-area-inset-right,0px)); }
.ic{ width:18px; height:18px; flex:none; stroke:currentColor; fill:none; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* cabeçalho */
.topo{ position:sticky; top:0; z-index:5; background:var(--surface-card); border-bottom:1px solid var(--border-subtle); }
.topo .wrap{ display:flex; align-items:center; gap:16px; height:64px; }
.marca{ display:flex; align-items:center; gap:10px; color:var(--text-strong); font-weight:600; font-size:15px; white-space:nowrap; }
.marca:hover{ text-decoration:none; }
.marca .logo{ width:30px; height:30px; border-radius:8px; background:var(--brand-navy); display:grid; place-items:center; }
.marca b{ color:var(--brand-teal); font-weight:600; }
.marca .sep{ width:1px; height:18px; background:var(--border-default); }
.marca .ajuda{ color:var(--text-body); font-weight:500; }
.busca-mini{ margin-left:auto; flex:0 1 320px; min-width:0; }
.tema{ padding:0 11px; }
.btn{ display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 16px; border-radius:var(--r-md); font:500 14px var(--font-sans); border:1px solid transparent; cursor:pointer; white-space:nowrap; transition:background .12s var(--ease), border-color .12s var(--ease); }
.btn:hover{ text-decoration:none; }
.btn-pri{ background:var(--action-primary); color:var(--on-primary); } .btn-pri:hover{ background:var(--action-primary-hover); }
.btn-sec{ background:var(--surface-card); color:var(--text-strong); border-color:var(--border-default); } .btn-sec:hover{ background:var(--surface-sunken); }
.btn[aria-pressed="true"]{ border-color:var(--action-primary); color:var(--action-primary); }
.campo{ display:flex; align-items:center; gap:8px; height:40px; padding:0 12px; border:1px solid var(--border-default); border-radius:var(--r-md); background:var(--surface-card); color:var(--text-subtle); }
.campo:focus-within{ border-color:var(--action-primary); }
.campo input{ border:0; outline:0; background:transparent; font:inherit; color:var(--text-strong); width:100%; min-width:0; }
.campo kbd{ font:500 11px var(--font-mono); color:var(--text-muted); border:1px solid var(--border-default); border-radius:6px; padding:1px 6px; }

/* início */
.hero{ padding-block:56px 32px; }
.hero .wrap{ display:grid; gap:18px; justify-items:start; }
.hero h1{ font-size:clamp(30px, 4.4vw, 44px); font-weight:500; max-width:18ch; }
.hero h1 em{ font-family:var(--font-serif); font-style:italic; font-weight:400; font-size:1.12em; }
.hero p{ margin:0; font-size:16px; max-width:60ch; }
.busca{ width:min(640px, 100%); height:52px; border-radius:var(--r-lg); padding:0 16px; box-shadow:var(--shadow-xs); }
.busca input{ font-size:16px; }
.sugestoes{ display:flex; gap:8px; flex-wrap:wrap; font-size:13px; }
.sugestoes span{ color:var(--text-subtle); align-self:center; }
.chip{ display:inline-flex; align-items:center; height:30px; padding:0 12px; border-radius:var(--r-pill); background:var(--surface-card); border:1px solid var(--border-default); color:var(--text-body); }
.chip:hover{ border-color:var(--border-strong); text-decoration:none; }
.bloco{ padding-block:8px 44px; }
.bloco-cab{ display:flex; align-items:end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.bloco-cab h2{ font-size:24px; } .bloco-cab p{ margin:4px 0 0; }
.selo{ display:inline-flex; align-items:center; height:22px; padding:0 8px; border-radius:var(--r-pill); font-size:11px; font-weight:500; background:var(--surface-hover); color:var(--text-body); white-space:nowrap; }

/* trilha: a ordem é a do checklist do sistema */
.trilha{ background:var(--surface-card); border:1px solid var(--border-subtle); border-radius:var(--r-xl); padding:8px; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:4px; list-style:none; margin:0; }
.passo{ display:grid; grid-template-columns:auto 1fr; gap:2px 12px; padding:14px; border-radius:var(--r-lg); color:var(--text-body); height:100%; }
.passo:hover{ background:var(--surface-hover); text-decoration:none; }
.passo .n{ grid-row:span 2; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font:500 12px var(--font-mono); color:var(--text-strong); border:1px solid var(--border-strong); }
.passo b{ color:var(--text-strong); font-weight:500; font-size:15px; }
.passo small{ font-size:12px; color:var(--text-subtle); }

.modulos{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:16px; }
.mod{ background:var(--surface-card); border:1px solid var(--border-subtle); border-radius:var(--r-xl); padding:20px; display:grid; gap:12px; align-content:start; }
.mod-cab{ display:flex; align-items:center; gap:12px; }
.mod-cab .ico{ width:36px; height:36px; border-radius:var(--r-md); background:var(--action-soft); color:var(--action-primary); display:grid; place-items:center; }
.mod-cab h3{ font-size:16px; } .mod-cab small{ display:block; font-size:12px; color:var(--text-subtle); }
.mod ul{ list-style:none; margin:0; padding:0; display:grid; }
.mod li a{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 0; border-top:1px solid var(--border-subtle); color:var(--text-body); }
.mod li:first-child a{ border-top:0; }
.mod li a:hover{ color:var(--text-strong); text-decoration:none; }
.mod li a .ic{ width:16px; height:16px; color:var(--text-muted); }
.breve{ margin-top:16px; padding:14px 16px; border-radius:var(--r-lg); border:1px dashed var(--border-strong); font-size:13px; }

.resultados{ display:grid; gap:8px; list-style:none; margin:0; padding:0; }
.resultados a{ display:grid; gap:2px; padding:14px 16px; background:var(--surface-card); border:1px solid var(--border-subtle); border-radius:var(--r-lg); color:var(--text-body); }
.resultados a:hover{ border-color:var(--border-strong); text-decoration:none; }
.resultados b{ color:var(--text-strong); font-weight:500; font-size:15px; }
.resultados small{ color:var(--text-subtle); }
.vazio{ padding:24px; text-align:center; background:var(--surface-card); border:1px solid var(--border-subtle); border-radius:var(--r-lg); }

.contato{ background:var(--surface-card); border:1px solid var(--border-subtle); border-radius:var(--r-xl); padding:24px; display:flex; gap:20px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.contato h2{ font-size:18px; } .contato p{ margin:4px 0 0; max-width:62ch; }
.email{ font-family:var(--font-mono); font-size:13px; color:var(--text-strong); user-select:all; }
.rodape{ padding-block:24px 40px; font-size:12px; color:var(--text-muted); }

/* artigo */
.artigo{ display:grid; grid-template-columns:250px minmax(0,1fr) 200px; gap:40px; padding-block:32px 56px; align-items:start; }
.lado{ position:sticky; top:88px; display:grid; gap:2px; font-size:13px; }
.lado .tit{ font-size:12px; color:var(--text-subtle); padding:0 10px 6px; }
.lado a{ padding:7px 10px; border-radius:var(--r-sm); color:var(--text-body); }
.lado a:hover{ background:var(--surface-hover); text-decoration:none; }
.lado a[aria-current="page"]{ background:var(--action-soft); color:var(--action-primary); font-weight:500; }
.texto{ max-width:70ch; display:grid; gap:20px; min-width:0; }
.trilho{ display:flex; gap:6px; flex-wrap:wrap; font-size:13px; color:var(--text-subtle); }
.trilho a{ color:var(--text-subtle); }
.texto h1{ font-size:32px; }
.meta{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:13px; color:var(--text-subtle); }
.texto p{ margin:0; font-size:15px; line-height:1.65; }
.texto b{ color:var(--text-strong); font-weight:500; }
.onde{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 14px; border-radius:var(--r-lg); background:var(--surface-card); border:1px solid var(--border-subtle); font-size:14px; }
.onde > span{ color:var(--text-subtle); }
.caminho{ display:inline-flex; align-items:center; gap:6px; color:var(--text-strong); font-weight:500; flex-wrap:wrap; }
.caminho .ic{ width:14px; height:14px; color:var(--text-muted); }
.texto h2{ font-size:20px; margin-top:12px; scroll-margin-top:96px; }
.etapas{ list-style:none; margin:0; padding:0; display:grid; gap:24px; }
.etapas > li{ display:grid; grid-template-columns:32px minmax(0,1fr); gap:14px; }
.etapas .num{ width:28px; height:28px; border-radius:50%; background:var(--text-strong); color:var(--surface-card); display:grid; place-items:center; font:500 12px var(--font-mono); }
.etapas .corpo{ display:grid; gap:12px; min-width:0; }
.print{ margin:0; display:grid; gap:8px; }
.print a{ display:block; border:1px solid var(--border-default); border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow-xs); background:var(--surface-card); }
.print img{ width:100%; height:auto; }
.print figcaption{ font-size:12px; color:var(--text-subtle); }
.alerta{ display:flex; gap:10px; padding:12px 14px; border-radius:var(--r-lg); font-size:14px; line-height:1.55; }
.alerta .ic{ margin-top:2px; }
.alerta b{ color:inherit; font-weight:600; }
.alerta.info{ background:var(--status-info-bg); color:var(--status-info-fg); }
.alerta.atencao{ background:var(--status-warn-bg); color:var(--status-warn-fg); }
.ajudou{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:16px 0; border-top:1px solid var(--border-subtle); margin-top:8px; }
.ajudou > span{ color:var(--text-strong); font-weight:500; }
.prox{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.prox a, .prox span{ display:grid; gap:2px; padding:14px 16px; border:1px solid var(--border-subtle); border-radius:var(--r-lg); background:var(--surface-card); color:var(--text-strong); font-weight:500; }
.prox span{ visibility:hidden; }
.prox small{ color:var(--text-subtle); font-weight:400; font-size:12px; }
.prox .depois{ text-align:right; }
.prox a:hover{ border-color:var(--border-strong); text-decoration:none; }
.indice{ position:sticky; top:88px; display:grid; gap:6px; font-size:13px; border-left:1px solid var(--border-subtle); padding-left:14px; }
.indice b{ color:var(--text-strong); font-weight:500; margin-bottom:4px; }
.indice a{ color:var(--text-subtle); }

@media (max-width:1080px){ .artigo{ grid-template-columns:220px minmax(0,1fr); } .indice{ display:none; } .modulos, .trilha{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:760px){
  .busca-mini, .marca .sep, .marca .ajuda{ display:none; }
  .topo .btn{ padding:0 12px; } .topo .btn span{ display:none; } .topo .tema{ margin-left:auto; }
  .hero{ padding-block:32px 24px; }
  .modulos, .trilha{ grid-template-columns:minmax(0,1fr); }
  .artigo{ grid-template-columns:minmax(0,1fr); gap:20px; padding-block:20px 40px; }
  .lado{ position:static; display:flex; overflow-x:auto; gap:4px; padding-bottom:4px; }
  .lado .tit{ display:none; } .lado a{ white-space:nowrap; border:1px solid var(--border-subtle); }
  .texto h1{ font-size:26px; }
  .prox{ grid-template-columns:minmax(0,1fr); } .prox .depois{ text-align:left; } .prox span{ display:none; }
  .btn{ min-height:44px; }
}
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; } }
