.pagina-relatorio { background: var(--fundo); }
.controles { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px max(20px, calc((100% - 1000px) / 2)); align-items: flex-start; }
.controles fieldset { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 12px; background: var(--superficie); font-size: 14px; }
.controles fieldset label { display: inline-flex; gap: 5px; margin: 2px 12px 2px 0; }
.controles .botoes { display: flex; gap: 8px; flex-wrap: wrap; align-self: center; }
.documento { max-width: 1000px; margin: 0 auto 40px; background: #fff; color: #111; padding: 48px 56px; border-radius: 8px; box-shadow: var(--sombra); font: 14px/1.55 Georgia, "Times New Roman", serif; }
.documento h1 { font: 700 26px/1.25 system-ui, sans-serif; margin: 0 0 6px; }
.documento h2 { font: 700 19px/1.3 system-ui, sans-serif; margin: 30px 0 8px; padding-top: 10px; border-top: 2px solid #222; }
.documento h3 { font: 700 15px/1.35 system-ui, sans-serif; margin: 20px 0 4px; }
.documento .sub { color: #444; margin: 0 0 18px; }
.documento .aviso { border: 2px solid #b26a00; background: #fff7e6; padding: 14px 18px; border-radius: 6px; margin: 16px 0; }
.documento .aviso b { display: block; margin-bottom: 4px; font-family: system-ui, sans-serif; }
.documento table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font: 12.5px/1.4 system-ui, sans-serif; }
.documento th, .documento td { border: 1px solid #ccc; padding: 4px 7px; text-align: left; vertical-align: top; position: static; background: none; color: #111; text-transform: none; letter-spacing: 0; cursor: default; }
.documento th { background: #f1f1f1; }
.documento td.n, .documento th.n { text-align: right; white-space: nowrap; }
.documento .achado { border-left: 4px solid #999; padding: 6px 0 6px 14px; margin: 14px 0; page-break-inside: avoid; }
.documento .achado.alto { border-left-color: #c62828; } .documento .achado.medio { border-left-color: #b26a00; } .documento .achado.baixo { border-left-color: #2a78d6; }
.documento .achado .cab { font: 600 13px/1.4 system-ui, sans-serif; color: #555; }
.documento .achado .tit { font: 700 14.5px/1.4 system-ui, sans-serif; margin: 2px 0; }
.documento .dados { font: 12.5px/1.45 system-ui, sans-serif; color: #222; margin: 6px 0; }
.documento .dados dt { font-weight: 600; float: left; clear: left; width: 150px; }
.documento .dados dd { margin: 0 0 2px 160px; }
.documento .links a, .documento .lei a { color: #1a56a8; word-break: break-word; }
.documento .lei { font-size: 13px; margin: 2px 0 2px 18px; }
.documento .rodape-doc { margin-top: 30px; font-size: 12px; color: #555; border-top: 1px solid #ccc; padding-top: 10px; }
@media (prefers-color-scheme: dark) { .documento { background: #fff; color: #111; } }
@media print {
  .nao-imprimir { display: none !important; }
  body.pagina-relatorio { background: #fff; }
  .documento { box-shadow: none; padding: 0; max-width: none; margin: 0; }
  .documento h2 { page-break-after: avoid; }
  .documento a::after { content: " (" attr(href) ")"; font-size: 10px; color: #555; word-break: break-all; }
  @page { margin: 18mm 16mm; }
}
@media print {
  .documento table a::after, .documento .dados a::after { content: none; }
  .documento table { table-layout: fixed; }
  .documento td, .documento th { word-break: break-word; }
}
@media print { .documento h3 { page-break-after: avoid; } .documento .achado { break-inside: avoid; } }
