/* Estilo compartilhado da documentação pública. Tokens em ../estilo.css. */
/* Topo */
.topo {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topo .marca { font-size: 17px; }
.topo .marca small { font-weight: 500; color: var(--ink-3); font-size: 14px; }

/* Layout */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
nav.indice { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow-y: auto; padding: 32px 0; }
nav.indice p { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 18px 0 6px; }
nav.indice p:first-child { margin-top: 0; }
nav.indice a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
nav.indice a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
nav.indice a.ativo { color: var(--accent); background: var(--accent-soft); }
main { padding: 40px 0 80px; min-width: 0; }

/* Capa */
.capa { padding: 8px 0 40px; border-bottom: 1px solid var(--line); }
.capa h1 { margin-top: 16px; font-size: clamp(32px, 5vw, 46px); line-height: 1.08; font-weight: 700; letter-spacing: -.03em; }
.capa h1 span { color: var(--accent); }
.capa .lead { margin-top: 16px; max-width: 620px; font-size: 18px; color: var(--ink-2); }
.capa .acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Seções */
section { padding-top: 56px; scroll-margin-top: 64px; }
.rotulo { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
h2 { margin-top: 6px; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
h2 + .intro { margin-top: 8px; color: var(--ink-2); max-width: 680px; }
h3 { margin: 32px 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
p + p { margin-top: 10px; }
.nota { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

/* Cartões */
.grade { display: grid; gap: 12px; margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grade.duas { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cartao { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.cartao h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cartao p { font-size: 14px; color: var(--ink-2); }
.cartao.destaque { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cartao .num { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
ul.faixas { list-style: none; margin: 8px 0 0; }
ul.faixas li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.faixas li:last-child { border-bottom: none; }
ul.faixas strong { flex: none; min-width: 86px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--accent); }
ul.faixas span { font-size: 14px; color: var(--ink-2); }
.cartao .grande { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--accent); margin-bottom: 2px; }

/* Passos */
ol.passos { list-style: none; margin-top: 16px; counter-reset: p; }
ol.passos li { position: relative; padding: 0 0 18px 44px; counter-increment: p; }
ol.passos li::before {
  content: counter(p); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
}
ol.passos li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--line-2); }
ol.passos strong { display: block; }
ol.passos span { color: var(--ink-2); font-size: 14px; }

/* Tabelas */
.tabela { margin-top: 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: var(--surface-2); white-space: nowrap; }
td:first-child { font-weight: 500; }

/* Código */
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
td code { white-space: nowrap; }
p code, li code { overflow-wrap: anywhere; }
pre { margin-top: 14px; padding: 16px 18px; overflow-x: auto; border-radius: 14px; background: var(--code-bg); color: var(--code-ink); font-size: 13px; line-height: 1.6; }
pre code { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; }
.rotulo-codigo { margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Listas e citações */
ul.lista { margin: 12px 0 0 18px; }
ul.lista li { margin-top: 6px; }
ul.lista li::marker { color: var(--accent); }
.pedido { margin-top: 8px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; font-size: 14px; color: var(--ink-2); }

/* Perguntas */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 16px 16px; color: var(--ink-2); font-size: 14px; }

/* Chamada final */
.chamada { margin-top: 64px; padding: 36px 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-card); }
.chamada h2 { margin-top: 0; }
.chamada p { margin-top: 8px; color: var(--ink-2); }
.chamada .btn { margin-top: 20px; }
footer { padding: 32px 0 48px; text-align: center; font-size: 12px; color: var(--ink-3); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  nav.indice { display: none; }
  .topo { padding: 10px 16px; }
  .topo .marca small { display: none; }
  main { padding-top: 28px; }
}
@media (max-width: 480px) {
  .topo .btn span { display: none; }
  .capa .acoes .btn { flex: 1 1 100%; }
  h2 { font-size: 24px; }
}

/* Migalhas, resposta direta e data: o que buscador e IA leem primeiro. */
.migalhas { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-3); }
.migalhas a { color: var(--ink-3); }
.migalhas a:hover { color: var(--ink); }
.migalhas span[aria-hidden] { opacity: .6; }
article h1 { margin-top: 14px; font-size: clamp(30px, 4.6vw, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.resposta { margin-top: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 14px 14px 0; font-size: 16px; color: var(--ink); max-width: 720px; }
.atualizado { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
article section { padding-top: 44px; }
article h2 { font-size: 24px; }
article p, article li { max-width: 720px; }
.fontes { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.fontes li { margin-top: 4px; }
.sim { color: var(--success); font-weight: 600; }
.nao { color: var(--ink-3); }
.rodape { margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--line); display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); font-size: 13px; }
.rodape p { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.rodape a { display: block; color: var(--ink-2); padding: 3px 0; }
.rodape .legal { grid-column: 1 / -1; color: var(--ink-3); }
a.cartao { display: block; color: var(--ink); transition: border-color .15s; }
a.cartao:hover { text-decoration: none; border-color: var(--accent); }
