/* Legis Itu — ajustes sobre o Pico.css */
:root {
  --pico-font-size: 100%;
  --cor-vigente: #1b7f3b;
  --cor-revogada: #b3261e;
  --cor-parcial: #b86e00;
  --cor-suspensa: #7b1fa2;
  --cor-exaurida: #5f6368;
  --cor-nao-informada: #6b7280;
}
body { display: flex; flex-direction: column; min-height: 100vh; }
main.container { flex: 1; }
.topo { border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 1rem; }
.topo nav { padding: 0 1rem; }
.topo .marca { font-size: 1.15rem; }
.busca-topo { margin: 0; }
.busca-topo input { margin: 0; min-width: 18rem; height: 2.3rem; padding: .3rem .8rem; }
.inline { display: inline; margin: 0; }
button.pequeno, [role=button].pequeno, .pequeno { padding: .25rem .6rem; font-size: .85rem; margin: 0; width: auto; }
.muted { color: var(--pico-muted-color); }
.rodape { color: var(--pico-muted-color); padding: 1rem 0; }
.caixa-estreita { max-width: 26rem; margin: 2rem auto; }
.acoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1rem; }
.acoes > * { margin: 0; }
.num { text-align: right; }
table.compacta td, table.compacta th { padding: .3rem .5rem; font-size: .9rem; }
.resumo { word-break: break-all; }

/* avisos e mensagens */
.flash, .aviso { padding: .7rem 1rem; border-radius: var(--pico-border-radius); margin: .6rem 0; border-left: 5px solid; }
.flash-ok, .aviso-info { background: #e8f1fb; border-color: #1f6fc5; color: #123; }
.flash-aviso, .aviso-atencao { background: #fff5e0; border-color: #d98e04; color: #3a2800; }
.flash-erro, .aviso-perigo { background: #fdecea; border-color: #b3261e; color: #410e0b; }
.aviso details, details.aviso { margin: .3rem 0 0; }
.erro-campo { color: #b3261e; display: block; }
.ok { color: var(--cor-vigente); }

/* situação */
.situacao { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 1rem;
  color: #fff; vertical-align: middle; letter-spacing: .02em; }
.sit-vigente { background: var(--cor-vigente); }
.sit-revogada { background: var(--cor-revogada); }
.sit-parcial { background: var(--cor-parcial); }
.sit-suspensa { background: var(--cor-suspensa); }
.sit-exaurida { background: var(--cor-exaurida); }
.sit-nao-informada { background: var(--cor-nao-informada); }
.selo-pendente { font-size: .72rem; background: #fff1c2; color: #6b4b00; border: 1px solid #e0b400; padding: 0 .4rem; border-radius: .3rem; }

/* listas de normas */
.item-norma { padding: 1rem 1.2rem; margin-bottom: 1rem; }
.item-norma header { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .4rem; padding-bottom: .4rem; }
.item-norma p { margin-bottom: .3rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { font-size: .75rem; padding: .05rem .5rem; border-radius: 1rem; background: var(--pico-secondary-background);
  color: var(--pico-secondary-inverse); text-decoration: none; }
.trecho { margin: .4rem 0; padding: .3rem .8rem; font-size: .92rem; }
.trecho .rotulo { font-weight: 600; margin-right: .4rem; }
mark { padding: 0 .1rem; }
.filtros .grid { gap: .5rem; }
.filtros select, .filtros input { margin-bottom: .5rem; }
.paginacao { display: flex; gap: 1rem; justify-content: center; margin: 1rem 0; }

/* página da norma */
.cabecalho-norma h1 { margin-bottom: .3rem; font-size: 1.7rem; }
.cabecalho-norma .tipo { margin: 0; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; }
.cabecalho-norma .ementa { font-style: italic; font-size: 1.05rem; }
.cabecalho-norma .meta { font-size: .88rem; color: var(--pico-muted-color); }
.consulta-data { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin: 1rem 0; }
.consulta-data label { margin: 0; }
.consulta-data input { margin: 0; width: 9rem; }
.layout-norma { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 2rem; }
@media (max-width: 900px) { .layout-norma { grid-template-columns: 1fr; } }
.lateral section { margin-bottom: 1.4rem; font-size: .9rem; }
.lateral h4 { font-size: .95rem; margin-bottom: .4rem; }
.lateral ul, .lateral ol { padding-left: 1.1rem; }
.versoes .atual-exibida { font-weight: 600; }
.texto-norma { font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; line-height: 1.6; }
.versao-info { font-family: var(--pico-font-family); font-size: .85rem; }
.disp { position: relative; padding: .15rem .4rem .15rem 0; border-radius: .3rem; scroll-margin-top: 5rem; }
.disp .corpo { white-space: pre-line; }
.disp.alvo { background: #fff6c8; }
.disp .ferramentas { position: absolute; left: -3.8rem; top: .15rem; width: 3.5rem; text-align: right; opacity: 0;
  font-family: var(--pico-font-family); font-size: .72rem; }
.disp:hover .ferramentas, .disp.alvo .ferramentas, .disp .ferramentas:focus-within { opacity: 1; }
.disp .ferramentas .ancora { text-decoration: none; margin-right: .2rem; }
.disp .citar { padding: 0 .25rem; font-size: .7rem; background: transparent; color: var(--pico-primary); border: 1px solid var(--pico-primary); }
@media (max-width: 1100px) { .disp .ferramentas { position: static; opacity: 1; float: right; width: auto; } }
.nivel-epigrafe { font-weight: 700; text-align: center; margin: .5rem 0; }
.nivel-ementa { margin-left: 45%; font-style: italic; margin-bottom: 1rem; }
@media (max-width: 700px) { .nivel-ementa { margin-left: 0; } }
.nivel-preambulo { margin-bottom: 1rem; }
.nivel-livro, .nivel-titulo, .nivel-capitulo, .nivel-secao, .nivel-subsecao { text-align: center; font-weight: 700; margin-top: 1.2rem; }
.nivel-secao .corpo, .nivel-subsecao .corpo { font-weight: 600; }
.nivel-artigo { margin-top: .7rem; }
.nivel-paragrafo, .nivel-inciso, .nivel-alinea, .nivel-item { margin-left: 1.5rem; }
.nivel-inciso .nivel-alinea { margin-left: 3rem; }
.nivel-alinea { margin-left: 3rem; }
.nivel-item { margin-left: 4.5rem; }
.nivel-fecho { margin-top: 1.5rem; }
.nivel-anexo { margin-top: 1.5rem; border-top: 1px dashed var(--pico-muted-border-color); padding-top: 1rem; font-size: .9rem; }
.nivel-nao_classificado { background: #fff5e0; }

/* formulários admin */
.texto-integral { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: .85rem; }
.linha-relacao { gap: .5rem; }
.linha-relacao > * { margin-bottom: .4rem; }
.preview .arvore { list-style: none; padding: 0; font-size: .85rem; max-height: 36rem; overflow: auto; }
.preview .arvore li { padding: .1rem 0; border-bottom: 1px dotted var(--pico-muted-border-color); }
.preview .arvore .inicio { color: var(--pico-muted-color); }
.preview .arvore .com-anomalia { background: #fff5e0; }
.preview .anomalias { font-size: .85rem; max-height: 20rem; overflow: auto; }
.prof-1 { padding-left: 1.2rem; } .prof-2 { padding-left: 2.4rem; } .prof-3 { padding-left: 3.6rem; }
.prof-4 { padding-left: 4.8rem; } .prof-5 { padding-left: 6rem; } .prof-6 { padding-left: 7.2rem; }
.texto-norma .prof-1, .texto-norma .prof-2, .texto-norma .prof-3, .texto-norma .prof-4, .texto-norma .prof-5, .texto-norma .prof-6 { padding-left: 0; }
.qr svg { width: 12rem; height: 12rem; background: #fff; }

/* diff */
.diff-wrap { overflow-x: auto; font-size: .82rem; }
table.diff { font-family: ui-monospace, monospace; border-collapse: collapse; width: 100%; }
table.diff td { padding: .1rem .3rem; vertical-align: top; white-space: pre-wrap; word-break: break-word; }
table.diff th, .diff_next { display: none; }
td.diff_header { color: var(--pico-muted-color); text-align: right; white-space: nowrap; }
.diff_add { background: #d4f5dc; }
.diff_chg { background: #fff2b3; }
.diff_sub { background: #fbd5d2; }
.legenda span { padding: .1rem .5rem; margin-right: .5rem; border-radius: .2rem; font-size: .85rem; }

@media (prefers-color-scheme: dark) {
  .flash-ok, .aviso-info { background: #13263b; color: #dbe9f8; }
  .flash-aviso, .aviso-atencao { background: #3a2a07; color: #fbe7bd; }
  .flash-erro, .aviso-perigo { background: #3d1412; color: #fbd5d2; }
  .disp.alvo { background: #4a3f0b; }
  .diff_add { background: #173d22; } .diff_chg { background: #4a400d; } .diff_sub { background: #4d1a17; }
  .preview .arvore .com-anomalia, .nivel-nao_classificado { background: #3a2a07; }
  .selo-pendente { background: #4a400d; color: #fbe7bd; }
}
code.quebra { word-break: break-all; white-space: normal; }
