[hidden]{display:none!important}

body{margin:0}

.atlas-tela{display:grid;grid-template-columns:var(--nav-w) minmax(0,1fr);min-height:calc(100vh - var(--bar-h))}
.atlas-secoes{position:sticky;top:var(--bar-h);align-self:start;height:calc(100vh - var(--bar-h));padding:var(--space-32) var(--space-16);box-shadow:inset -1px 0 0 var(--line-structure);overflow:auto}
.atlas-secoes > .g-source{display:block;padding:0 var(--space-16);margin-bottom:var(--space-16)}
.atlas-secoes nav{display:flex;flex-direction:column;gap:var(--space-4)}
.atlas-secoes nav a{display:flex;align-items:center;min-height:var(--touch-min);padding:0 var(--space-16);border-radius:var(--radius-pill);color:var(--text-primary);text-decoration:none}
.atlas-secoes nav a[aria-current="page"]{background:var(--text-primary);color:var(--surface-ground)}
.atlas-secoes nav a:not([aria-current="page"]):hover{background:var(--surface-hover)}
.atlas-secoes__note{display:flex;flex-direction:column;gap:var(--space-8);margin:var(--space-48) var(--space-16) 0;padding-top:var(--space-16);box-shadow:inset 0 1px 0 var(--line-structure)}
.atlas-secoes__note p{color:var(--text-support);font-size:.875rem;line-height:1.25rem}

.atlas-trabalho{min-width:0}
.atlas-recorte{position:sticky;top:var(--bar-h);z-index:10;display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-8);padding:var(--space-8) var(--space-48);background:var(--surface-ground);box-shadow:inset 0 -1px 0 var(--line-structure)}
.atlas-recorte .g-chip{min-height:var(--space-24);padding:0 var(--space-8);font-size:.75rem;line-height:1rem;cursor:default}
.atlas-recorte__counts{margin-left:auto;color:var(--text-support);font-size:.75rem;line-height:1rem}
.atlas-recorte__counts strong{color:var(--text-primary);font-weight:500}
.atlas-conteudo{display:flex;flex-direction:column;gap:var(--space-48);max-width:calc(var(--measure-max) * 2 + var(--space-96));padding:var(--space-48) var(--space-48) var(--space-64)}
.atlas-status{min-height:var(--space-16);color:var(--text-support);font-size:.75rem;line-height:1rem}
.atlas-status.is-error{font-weight:500}
.atlas-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-24);max-width:var(--measure-max)}
.atlas-heading h1{margin-top:var(--space-8)}
.atlas-heading .g-support{margin-top:var(--space-16)}
.atlas-painel{display:flex;flex-direction:column;gap:var(--space-48)}
.atlas-leitura{padding-block:var(--space-24);box-shadow:inset 0 1px 0 var(--line-structure),inset 0 -1px 0 var(--line-structure)}
.atlas-leitura p:first-child{font-size:1.25rem;line-height:1.75rem;letter-spacing:-.02em}
.atlas-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-8)}
.atlas-kpi{min-height:calc(var(--space-96) * 2);justify-content:space-between}
.atlas-kpi .g-kpi__value{margin-block:var(--space-16)}
.atlas-volume{gap:var(--space-24)}
.atlas-volume__answer{max-width:var(--measure-max);margin:0;font-size:1.25rem;line-height:1.75rem;letter-spacing:-.02em}
.atlas-volume__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-16)}
.atlas-volume-card{gap:var(--space-8);min-height:calc(var(--space-96) * 2);justify-content:flex-start}
.atlas-volume-card__head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-16)}
.atlas-volume-card__value{font-family:var(--font-galeria-nome,"Galeria Nome",var(--font-sans));font-size:2.75rem;line-height:3rem;font-weight:400;letter-spacing:-.04em}
.atlas-volume-card__unit{color:var(--text-support);font-size:.875rem;line-height:1.25rem}
.atlas-volume-card .g-bar__track{margin-top:auto}
.atlas-volume__overlap{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-8)}
.atlas-volume__overlap div{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-16);background:var(--surface-hover);border-radius:var(--radius-s)}
.atlas-volume__overlap strong{font-size:1.25rem;line-height:1.5rem;font-weight:500}
.atlas-volume__overlap span{color:var(--text-support);font-size:.875rem;line-height:1.25rem}
.atlas-origin-inventory{padding:var(--space-24);background:var(--surface-hover);border-radius:var(--radius-s)}
.atlas-inventory{display:flex;flex-direction:column;gap:var(--space-16)}
.atlas-inventory__headline{display:flex;align-items:baseline;gap:var(--space-8);flex-wrap:wrap}
.atlas-inventory__headline strong{font-family:var(--font-galeria-nome,"Galeria Nome",var(--font-sans));font-size:2.75rem;line-height:3rem;font-weight:400;letter-spacing:-.04em}
.atlas-inventory__headline span,.atlas-inventory__comparison span{color:var(--text-support);font-size:.875rem;line-height:1.25rem}
.atlas-inventory__comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-8)}
.atlas-inventory__comparison div{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-16);background:var(--surface-ground);border-radius:var(--radius-s)}
.atlas-inventory__comparison strong{font-size:1.5rem;line-height:2rem;font-weight:500}
.atlas-volume-mini{gap:var(--space-16)}
.atlas-volume-mini .atlas-volume__answer{font-size:1.25rem;line-height:1.75rem}
.atlas-dataset-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-8)}
.atlas-dataset-card{gap:var(--space-8);min-height:calc(var(--space-96) * 1.25);justify-content:space-between}
.atlas-dataset-card__value{font-family:var(--font-galeria-nome,"Galeria Nome",var(--font-sans));font-size:2rem;line-height:2.25rem;font-weight:400;letter-spacing:-.03em}
.atlas-dataset-card.is-pending{background:var(--surface-hover);box-shadow:none}
.atlas-dataset-card.is-pending .atlas-dataset-card__value{color:var(--text-support)}
.atlas-bloco{display:flex;flex-direction:column;gap:var(--space-24);min-width:0}
.atlas-bloco__head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-24);padding-bottom:var(--space-16);box-shadow:inset 0 -1px 0 var(--line-strong)}
.atlas-bloco__head h2{margin-top:var(--space-8)}
.atlas-table-wrap{min-width:0;overflow-x:auto}
.atlas-table{min-width:calc(var(--measure-max) * 1.5)}
.atlas-table td:first-child{min-width:var(--measure-max)}
.atlas-table td{position:relative}
.atlas-table td .g-table__open{display:flex;flex-direction:column;justify-content:center;gap:var(--space-4);min-height:var(--table-row-reading);padding-block:var(--space-8)}
.atlas-table__title{display:block;font-weight:500;overflow-wrap:anywhere}
.atlas-table__support{display:block;color:var(--text-support);font-size:.75rem;line-height:1rem;overflow-wrap:anywhere}
.atlas-table .g-go{font-size:1.25rem}
.atlas-table .g-go::after{content:"→"}
.atlas-table .g-status{white-space:nowrap;font-size:.75rem}

.atlas-sinais{display:flex;flex-direction:column;gap:0;list-style:none;margin:0;padding:0}
.atlas-sinal{display:grid;grid-template-columns:var(--space-48) minmax(calc(var(--measure-max) / 2),3fr) minmax(calc(var(--measure-max) / 3),2fr);gap:var(--space-16);padding:var(--space-24) 0;box-shadow:inset 0 -1px 0 var(--line-structure)}
.atlas-sinal:first-child{padding-top:0}
.atlas-sinal__marker{display:grid;place-items:start center;padding-top:var(--space-4);font-family:var(--font-galeria-nome,"Galeria Nome",var(--font-sans));color:var(--text-support)}
.atlas-sinal__body{display:flex;flex-direction:column;gap:var(--space-8);min-width:0}
.atlas-sinal__body h3{font-size:1rem;line-height:1.5rem;font-weight:500}
.atlas-sinal__body p{color:var(--text-support)}
.atlas-sinal__evidence{display:flex;flex-direction:column;gap:var(--space-4);padding-left:var(--space-16);box-shadow:inset 1px 0 0 var(--line-structure);font-size:.875rem;line-height:1.25rem}
.atlas-sinal__evidence strong{font-weight:500}
.atlas-sinal__evidence span{color:var(--text-support)}
.atlas-sinal__action{align-self:start}
.atlas-empty{color:var(--text-support)}

.atlas-filtros{display:flex;align-items:flex-end;flex-wrap:wrap;gap:var(--space-16)}
.atlas-filtros .g-field{flex:1 1 calc(var(--measure-max) / 2);max-width:none}
.atlas-filtros .g-btn{flex:0 0 auto}
.atlas-health{position:relative;display:flex;flex-direction:column;gap:var(--space-16);max-width:var(--measure-max);margin-top:var(--space-16)}
.atlas-health__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-16)}
.atlas-health dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-16);margin:0}
.atlas-health dl div{display:flex;flex-direction:column;gap:var(--space-4)}
.atlas-health dt{color:var(--text-support);font-size:.75rem;line-height:1rem}
.atlas-health dd{margin:0;font-weight:500}

.atlas-metodo{display:flex;flex-direction:column;gap:var(--space-32)}
.atlas-metodo .g-ai{padding-block:var(--space-24);box-shadow:inset 0 -1px 0 var(--line-structure)}
.atlas-metodo .g-ai:first-child{padding-top:0}
.atlas-dialog{width:min(calc(100vw - var(--space-32)),calc(var(--measure-max) * 1.5));max-height:calc(100vh - var(--space-32));margin:auto;border:0;color:var(--text-primary)}
.atlas-dialog::backdrop{background:color-mix(in srgb,var(--surface-scrim) calc(var(--scrim) * 100%),transparent)}
.atlas-dialog__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-16);margin-bottom:var(--space-24)}
.atlas-dialog__head h2{margin-top:var(--space-8);max-width:var(--measure-max)}
.atlas-evidence{display:flex;flex-direction:column;gap:var(--space-24)}
.atlas-evidence__meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-16);padding-bottom:var(--space-16);box-shadow:inset 0 -1px 0 var(--line-structure)}
.atlas-evidence__meta div,.atlas-evidence__list li{overflow-wrap:anywhere}
.atlas-evidence__meta dt,.atlas-evidence__list .g-source{display:block;margin-bottom:var(--space-4)}
.atlas-evidence__meta dd{margin:0}
.atlas-evidence__list{display:flex;flex-direction:column;gap:var(--space-8);margin:var(--space-8) 0 0;padding-left:var(--space-24)}
.atlas-evidence code{overflow-wrap:anywhere}

@media(max-width:900px){
  .g-frame__acts .g-status{display:none}
  .atlas-tela{display:block;min-height:0}
  .atlas-secoes{display:none}
  .atlas-recorte{top:var(--bar-h-mobile);padding-inline:var(--space-16)}
  .atlas-recorte__counts{margin-left:0}
  .atlas-conteudo{padding:var(--space-32) var(--space-16) var(--space-48)}
  .atlas-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .atlas-dataset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .atlas-bloco__head{align-items:flex-start;flex-direction:column}
  .atlas-sinal{grid-template-columns:var(--space-32) minmax(0,1fr)}
  .atlas-sinal__evidence{grid-column:2;padding-left:0;padding-top:var(--space-8);box-shadow:inset 0 1px 0 var(--line-structure)}
  .atlas-health dl,.atlas-evidence__meta{grid-template-columns:1fr}
}

@media(max-width:760px){
  .atlas-kpis{grid-template-columns:1fr}
  .atlas-volume__grid,.atlas-volume__overlap{grid-template-columns:1fr}
  .atlas-inventory__comparison{grid-template-columns:1fr}
  .atlas-dataset-grid{grid-template-columns:1fr}
  .atlas-kpi{min-height:0}
  .atlas-filtros{align-items:stretch;flex-direction:column}
  .atlas-filtros .g-field,.atlas-filtros .g-btn{width:100%}
}

/* Acesso pelo Hub: tela de entrada e tela preta enquanto o token é conferido. */
.atlas-gate{position:fixed;inset:0;z-index:100;display:flex;align-items:center;padding:var(--space-48);background:var(--surface-ground)}
.atlas-gate__texto{display:flex;flex-direction:column;gap:var(--space-24);max-width:36rem}
body.atlas-autenticando::after{content:"";position:fixed;inset:0;z-index:200;background:#000}
@media (max-width:640px){.atlas-gate{padding:var(--space-24) var(--space-16)}}

/* Mapa de votação. PT em argila e PL em lago (validados no modo claro e escuro, todos os pares);
   outro partido em cinza; a intensidade vem da opacidade sobre a superfície. */
:root{--map-pt:#9E4F3B;--map-pl:#316CA5;--map-outro:var(--neutral-400);--map-neutral:var(--neutral-200);--map-ink:var(--text-primary)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--map-pt:#C4715C;--map-pl:#538FCB;--map-outro:var(--neutral-d-500);--map-neutral:var(--neutral-d-650)}}
:root[data-theme="dark"]{--map-pt:#C4715C;--map-pl:#538FCB;--map-outro:var(--neutral-d-500);--map-neutral:var(--neutral-d-650)}
.atlas-map{position:relative}
.atlas-map__canvas{width:100%;max-width:880px;margin:0 auto}
.atlas-map__svg{display:block;width:100%;height:auto;max-height:78vh}
.atlas-map__muni path{stroke:var(--surface-ground);stroke-width:.15;fill:var(--map-neutral);transition:opacity var(--duration-fast) var(--ease-dry)}
.atlas-map__muni path.is-pt{fill:var(--map-pt)}
.atlas-map__muni path.is-pl{fill:var(--map-pl)}
.atlas-map__muni path.is-outro{fill:var(--map-outro)}
.atlas-map__muni path.is-neutral{fill:var(--map-neutral)}
.atlas-map__muni path.is-dim{opacity:.12}
.atlas-map__muni path:hover{stroke:var(--text-primary);stroke-width:.8}
.atlas-map__uf path{fill:none;stroke:var(--surface-ground);stroke-width:1.1;pointer-events:none}
.atlas-map__legend{display:flex;flex-direction:column;gap:var(--space-8);margin-top:var(--space-16)}
.atlas-map__keys{display:flex;flex-wrap:wrap;gap:var(--space-8) var(--space-16)}
.atlas-map__key{display:inline-flex;align-items:center;gap:var(--space-8);font-size:.875rem;line-height:1.25rem;color:var(--text-primary)}
.atlas-map__swatch{display:inline-block;width:14px;height:14px;border-radius:4px;background:var(--map-neutral)}
.atlas-map__swatch.is-pt{background:var(--map-pt)}
.atlas-map__swatch.is-pl{background:var(--map-pl)}
.atlas-map__swatch.is-outro{background:var(--map-outro)}
.atlas-map__swatch.is-neutral-ink{background:var(--map-ink)}
.atlas-map__tip{position:absolute;z-index:20;min-width:220px;max-width:280px;padding:var(--space-16);border-radius:var(--radius-m);pointer-events:none;display:flex;flex-direction:column;gap:var(--space-8);font-size:.875rem;line-height:1.25rem}
.atlas-map__tip ol{margin:var(--space-4) 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px}
.atlas-map__tip li{display:flex;justify-content:space-between;gap:var(--space-16)}
.atlas-map__tip li strong{font-variant-numeric:tabular-nums}
.atlas-map__tip-year{display:flex;flex-direction:column}
.atlas-map-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--space-16);margin:var(--space-16) 0}
.atlas-map-summary__item{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:var(--space-4) var(--space-8);padding:var(--space-16);border-radius:var(--radius-m);background:var(--surface-raised)}
.atlas-map-summary__item > .g-source{grid-column:1 / -1}
.atlas-map-summary__item strong{font-size:1.5rem;line-height:2rem;font-weight:500;font-variant-numeric:tabular-nums}
.atlas-map-summary__item span:not(.g-source){color:var(--text-support);font-size:.875rem}
