/* Espelho do Painel BI nº 1 · identidade SUS Digital ([arquivo do projeto]). Contraste AA em todo texto. */
@font-face { font-family: 'Rawline'; font-weight: 400; src: url('fontes/rawline-400.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Rawline'; font-weight: 700; src: url('fontes/rawline-700.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Rawline'; font-weight: 800; src: url('fontes/rawline-800.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Rawline'; font-weight: 900; src: url('fontes/rawline-900.ttf') format('truetype'); font-display: swap; }

:root {
  --azul: #0B3C8C; --azul-gov: #1351B4; --tinta: #1D1E20; --cinza: #374151; --rodape: #5A5E6B;
  --fundo: #F4F5F7; --cartao: #FFFFFF; --borda: #DADCE0; --t-azul: #E8EFFA; --t-amarelo: #FFF7DD; --ocre: #C99700;
  --laranja-txt: #C84500; --raio: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--fundo); color: var(--tinta); font-family: Rawline, 'Segoe UI', Arial, sans-serif; font-size: 1.0625rem; line-height: 1.55; }
a { color: var(--azul-gov); text-underline-offset: 3px; }
a:hover { color: var(--azul); }
:focus-visible { outline: 3px solid #FF7A00; outline-offset: 3px; border-radius: 4px; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: .5rem; top: -4rem; background: #fff; color: var(--azul); padding: .6rem 1rem; border: 2px solid var(--azul); border-radius: 8px; z-index: 50; font-weight: 800; }
.pular:focus { top: .5rem; }

/* cabeçalho */
.topo { background: var(--azul); color: #fff; padding: 1.25rem 1rem 1.5rem; }
.topo-int { max-width: 1160px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }
.selo-cartao { background: #fff; border-radius: 12px; padding: 1.1rem 1.4rem; flex: none; }   /* área de não-interferência: >= 1,5x a altura do selo */
.selo-cartao img { display: block; width: 168px; height: auto; }
.topo h1 { margin: 0; font-size: clamp(1.5rem, 4.6vw, 2.25rem); font-weight: 900; line-height: 1.15; }
.topo p { margin: .45rem 0 0; max-width: 62ch; font-size: 1.05rem; color: #F1F5FD; }
.legenda-selos { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .9rem; font-size: .95rem; }
.legenda-selos span { display: inline-flex; align-items: center; gap: .4rem; }

/* navegação */
.nav { background: #fff; border-bottom: 1px solid var(--borda); }
.nav ul { max-width: 1160px; margin: 0 auto; padding: 0 .5rem; list-style: none; display: flex; flex-wrap: wrap; }
.nav a { display: inline-block; padding: .85rem 1rem; min-height: 44px; font-weight: 800; text-decoration: none; color: var(--azul-gov); border-bottom: 4px solid transparent; }
.nav a:hover { border-bottom-color: var(--azul-gov); }

/* filtros */
.filtros { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--borda); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.filtros-int { max-width: 1160px; margin: 0 auto; padding: .7rem 1rem; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.filtros fieldset { border: 0; margin: 0; padding: 0; display: contents; }
.campo { display: flex; flex-direction: column; gap: .2rem; min-width: 12rem; flex: 1 1 12rem; max-width: 22rem; }
.campo label { font-weight: 800; font-size: .9rem; color: var(--cinza); }
.campo select { min-height: 44px; font: inherit; padding: .4rem .6rem; border: 2px solid #6B7280; border-radius: 8px; background: #fff; color: var(--tinta); }
.btn { min-height: 44px; padding: .4rem 1.1rem; font: inherit; font-weight: 800; border: 2px solid var(--azul-gov); background: #fff; color: var(--azul-gov); border-radius: 8px; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--azul-gov); color: #fff; }
.btn:disabled { border-color: #8A8F9A; color: #5A5E6B; cursor: not-allowed; }
#f-status { flex: 1 1 100%; margin: 0; font-size: .92rem; color: var(--cinza); }

/* conteúdo */
main { max-width: 1160px; margin: 0 auto; padding: 1rem; }
.secao { margin: 2rem 0 3rem; }
.secao h2 { margin: 0 0 .3rem; font-size: 1.6rem; font-weight: 900; color: var(--azul); }
.intro { margin: 0 0 1.1rem; max-width: 75ch; color: var(--cinza); }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 1.1rem; align-items: start; }
.visual { background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.1rem 1.2rem 1rem; min-width: 0; }
.visual.largo { grid-column: 1 / -1; }
.visual header { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.visual h3 { margin: 0; font-size: 1.28rem; line-height: 1.25; font-weight: 900; color: var(--azul); }
.selo { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .7rem; border-radius: 99px; color: var(--tinta); border: 1.5px solid; }
.selo-contexto { background: var(--t-amarelo); border-color: var(--ocre); }
.selo-artigo { background: var(--t-azul); border-color: var(--azul-gov); color: var(--azul); }
.sintese { margin: .6rem 0 .5rem; }
.fig { margin: .4rem 0 0; min-width: 0; overflow: hidden; }
.fig svg { display: block; max-width: 100%; height: auto; }
.fonte { margin: .5rem 0 .2rem; font-size: .9rem; color: var(--rodape); }
.filtros-nota { margin: .1rem 0 .5rem; font-size: .9rem; color: var(--cinza); font-style: italic; }
.acoes { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: flex-start; }
details.eq { flex: 1 1 100%; }
details.eq summary { cursor: pointer; font-weight: 800; color: var(--azul-gov); min-height: 44px; display: flex; align-items: center; }
a.csv { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }

/* comparação ICSD x INMSD no celular */
.indice { border: 1px solid var(--borda); border-radius: 10px; padding: .8rem 1rem; margin: .6rem 0; }
.indice h4 { margin: 0 0 .4rem; font-size: 1.15rem; color: var(--azul); }
.indice h4 span { display: block; font-size: .92rem; font-weight: 400; color: var(--cinza); }
.indice dt { font-weight: 800; margin-top: .5rem; }
.indice dd { margin: 0; }
.alerta { background: var(--t-amarelo); border-left: 5px solid var(--ocre); padding: .7rem 1rem; border-radius: 6px; }

/* tabelas */
.tabela-rolavel { overflow-x: auto; margin: .3rem 0; border: 1px solid var(--borda); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .5rem .7rem; text-align: left; border-bottom: 1px solid var(--borda); vertical-align: top; }
thead th { background: var(--azul); color: #fff; font-weight: 800; position: sticky; top: 0; }
tbody th { font-weight: 700; background: #fff; }
tbody tr:nth-child(even) { background: #F9FAFB; }
.calor td { text-align: center; font-weight: 800; min-width: 7rem; }
.calor thead th:not(:first-child) { text-align: center; }
.calor tbody th { min-width: 14rem; }
.texto-nota { max-width: 80ch; }
.texto-nota h3 { color: var(--azul); margin: 1.6rem 0 .4rem; font-size: 1.2rem; }
.texto-nota ol { padding-left: 1.3rem; }
.texto-nota li { margin-bottom: .6rem; }
.texto-nota .tabela-rolavel { max-width: none; }

footer { background: #fff; border-top: 1px solid var(--borda); margin-top: 2rem; }
footer div { max-width: 1160px; margin: 0 auto; padding: 1.4rem 1rem 2rem; font-size: .92rem; color: var(--cinza); }
footer p { margin: .35rem 0; max-width: 90ch; }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .filtros { position: static; }
  .campo { max-width: none; min-width: 100%; }
  .visual { padding: .9rem .85rem .8rem; }
  .secao h2 { font-size: 1.4rem; }
  .selo-cartao img { width: 140px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .filtros, .nav, .pular { display: none; } .visual { break-inside: avoid; } }

/* ---- Painéis 2 e 3: acréscimos ---- */
[hidden] { display: none !important; }
.selo-projeto { background: #E6F2F4; border-color: #0E6090; color: var(--tinta); }
.sim { font-weight: 800; color: #0B5F1A; }
.nao { font-weight: 700; color: #5A5E6B; }
.matriz td.c, .matriz th.c { text-align: center; }
.matriz td { min-width: 3.6rem; }
.matriz tbody th { min-width: 13rem; }
.lista-curta { margin: .6rem 0 .4rem; padding-left: 1.4rem; }
.lista-curta li { margin-bottom: .3rem; }
h4.sub { margin: 1rem 0 .2rem; font-size: 1.05rem; color: var(--azul); }
.ressalvas li { margin-bottom: .5rem; }
.texto-nota code { background: #F1F3F5; padding: 0 .3rem; border-radius: 4px; }
.texto-nota code, .texto-nota p, .texto-nota li { overflow-wrap: anywhere; }
