/* Base de todos os sites do motor. Cores e fontes vêm do site.yaml (tema), injetadas em :root no base.html.
   Mudar aqui muda todos os sites; mudar o tema muda um site; mudar um template muda uma categoria. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--fonte-texto); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--acento-texto); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sol); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.estreito { max-width: 760px; }

.aviso-preview { background: var(--sol); color: #1d1600; text-align: center; font-size: 14px; font-weight: 600; padding: 6px 16px; }

header.topo { border-bottom: 1px solid var(--line); background: var(--surface); }
header.topo .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 14px; }
.marca { font-family: var(--fonte-titulo); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.marca span { color: var(--acento); }
nav.menu { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
nav.menu a { color: var(--muted); text-decoration: none; font-weight: 500; }
nav.menu a:hover, nav.menu a[aria-current] { color: var(--ink); }

main { padding-block: 28px 64px; }
.trilha { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.trilha a { color: var(--muted); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-family: var(--fonte-titulo); font-weight: 700; font-size: clamp(28px, 5vw, 42px); margin: 0 0 12px; }
h2 { font-family: var(--fonte-titulo); font-weight: 600; font-size: clamp(21px, 3vw, 26px); margin: 40px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 8px; }
.linha-fina { font-size: 19px; color: var(--muted); margin: 0 0 8px; max-width: 62ch; }
.atualizado { font-size: 14px; color: var(--muted); }
.corpo { max-width: 72ch; }
.corpo p, .corpo li { max-width: 72ch; }
.corpo ul, .corpo ol { padding-left: 1.2em; }

/* Blocos de dado: toda tabela com número tem fonte e data embaixo. */
.dado { margin: 22px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dado .rolagem { overflow-x: auto; }
.dado table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.dado th, .dado td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dado th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--bg); white-space: nowrap; }
.dado tr:last-child td { border-bottom: 0; }
.dado .num { text-align: right; white-space: nowrap; }
.dado .titulo-dado { font-weight: 700; padding: 12px 12px 0; margin: 0; font-size: 16px; }
.dado .resumo { padding: 10px 12px; margin: 0; font-size: 15px; }
.dado .fonte { font-size: 13px; color: var(--muted); padding: 10px 12px; border-top: 1px solid var(--line); margin: 0; }
.dado.vazio { padding: 14px; color: var(--muted); }
.corpo table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 18px 0; display: block; overflow-x: auto; }
.corpo table th, .corpo table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }

/* Ficha (página de tamanho) */
.ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.ficha div { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--acento); border-radius: 10px; padding: 10px 12px; }
.ficha span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ficha b { font-size: 20px; font-variant-numeric: tabular-nums; }
.nota { font-size: 14px; color: var(--muted); }

/* Ferramentas */
.ferramenta { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 18px 0 26px; display: grid; gap: 14px; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.campo { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.campo input, .campo select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; width: 100%; }
.saida { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.grande { font-family: var(--fonte-titulo); font-size: clamp(26px, 5vw, 36px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lista-modelos { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.lista-modelos li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); }

/* Cartões (hub, relacionados) */
.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.cartao { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.cartao:hover { border-color: var(--acento); }
.cartao b { display: block; font-size: 17px; margin-bottom: 4px; }
.cartao span { font-size: 14px; color: var(--muted); }
.secao-relacionados { margin-top: 48px; }

.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; }

footer.rodape { border-top: 1px solid var(--line); padding-block: 22px 32px; font-size: 14px; color: var(--muted); }
footer.rodape .wrap { display: grid; gap: 8px; }
footer.rodape nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer.rodape a { color: var(--muted); }
