/* Páginas do DivulgaCandContas (/dinheiro, /ficha, /oficiais, /governador).
   Vem depois do style.css e usa os mesmos tokens (--paper, --bg-2, --muted...).
   Cores dos gráficos (âmbar #c98500, violeta #9085e9, verde #199e70) validadas
   contra o painel #3a3833: contraste >= 3:1 e separação para daltonismo. */

/* atalhos entre as quatro páginas */
.tse-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 26px; max-width: 760px; }
@media (min-width: 640px) { .tse-nav { grid-template-columns: repeat(4, 1fr); } }
.tse-nav a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 3px;
  background: var(--bg-2); color: var(--paper); text-decoration: none;
  font: 900 14px/1.15 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.tse-nav a:hover { background: var(--bg-3); }
.tse-nav a[aria-current] { background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.tse-nav svg { flex: none; width: 18px; height: 18px; }

.tse .home-sec { margin: 0 0 52px; }
.tse .sec-lede a, .tse-method a, .panel-note a { color: var(--yellow); text-underline-offset: 3px; }
.panel { background: var(--bg-2); border-radius: 4px; padding: var(--pad); }
.panel-note { margin: 18px 0 0; max-width: 46em; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tse-method p { max-width: 46em; }
.tse-source { color: var(--muted); font-size: 14px; }
.tse-links-lede { margin-bottom: 10px; }
.tse-links { margin: 0 0 18px; }
.tse-links .btn.small { min-height: 44px; display: inline-flex; align-items: center; }

/* números de destaque: um cartão de papel por candidato */
.stats { display: grid; gap: 16px; }
@media (min-width: 560px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { position: relative; background: var(--paper); color: var(--ink); padding: 22px var(--pad) 18px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35); transform: rotate(-.6deg); }
.stat:nth-child(2) { transform: rotate(.6deg); }
.stat::before { content: ""; position: absolute; top: -8px; left: 50%; width: 64px; height: 16px; margin-left: -32px;
  background: var(--tape); transform: rotate(-3deg); }
.stat h3 { margin: 0; font: 900 15px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.stat h3 small, .cmp-head small { font: 400 13px "NotoSans-Regular", sans-serif; text-transform: none; color: var(--ink-soft); margin-left: 4px; }
.cmp-head small { color: var(--muted); }
.stat-value { margin: 8px 0 6px; font: 900 clamp(28px, 7vw, 40px)/1.05 "NotoSans-Black", sans-serif; }
.stat-note { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* barras empilhadas: uma por candidato, mesma escala de 0 a 100% */
.legend { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.legend li, .stack-values li { display: flex; align-items: center; gap: 8px; }
.swatch { flex: none; width: 12px; height: 12px; border-radius: 2px; background: var(--c); }
.stack-row, .meter-row { margin-top: 22px; }
.stack-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 8px; }
.stack-who b { font: 900 16px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.stack-who span { color: var(--muted); font-size: 14px; }
.stack { display: flex; gap: 2px; height: 22px; }
.stack .seg { flex-basis: 0; flex-shrink: 0; min-width: 3px; background: var(--c); }
.stack .seg:last-child { border-radius: 0 4px 4px 0; }
.stack-values { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.stack-values b { color: var(--paper); font-weight: 700; }

/* gasto contratado × limite: trilho num tom apagado do próprio âmbar */
.meter { height: 14px; border-radius: 4px; background: rgba(201, 133, 0, .22); overflow: hidden; }
.meter span { display: block; height: 100%; background: #c98500; border-radius: 0 4px 4px 0; }
.meter-note { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* tabelas Lula | Flávio */
.tse-table { overflow-x: auto; background: var(--bg-2); border-radius: 4px; }
.tse-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tse-table th, .tse-table td { padding: 12px 14px; text-align: left; vertical-align: top; }
.tse-table thead th { color: var(--muted); font: 900 13px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase;
  border-bottom: 1px solid var(--line); }
.tse-table tbody tr + tr th, .tse-table tbody tr + tr td { border-top: 1px solid var(--line); }
.tse-table tbody th { font-weight: 400; }
.tse-table tfoot th, .tse-table tfoot td { border-top: 2px solid var(--muted); font-weight: 700; }
.tse-table td.numeric { white-space: nowrap; font-variant-numeric: tabular-nums; width: 28%; }
.tse-table small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; white-space: normal; }
.tse-table .mini { display: block; height: 6px; margin-top: 7px; min-width: 2px; background: #c98500; border-radius: 0 3px 3px 0; }
@media (max-width: 479px) {
  .tse-table table { font-size: 14px; }
  .tse-table th, .tse-table td { padding: 10px 8px; }
  .tse-table td.numeric { white-space: normal; }
}

/* cartões de papel do lado a lado */
.cell-value { display: block; font: 900 20px/1.25 "NotoSans-Black", sans-serif; }
.cmp-cell p + p { margin-top: 8px; }
.cmp-cell small { color: var(--ink-soft); }
.cmp-cell > p > small { display: block; margin-top: 2px; font-size: 14px; }
.cmp-cell details { margin-top: 10px; }
.cmp-cell summary { cursor: pointer; min-height: 44px; display: flex; align-items: center;
  font: 900 13px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; text-decoration: underline;
  text-underline-offset: 3px; }
.asset-list ol, .supplier-list { margin: 0; padding: 0; list-style: none; }
.asset-list li, .supplier-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-top: 1px solid rgba(26, 26, 26, .15); font-size: 14px; line-height: 1.4; }
.asset-list li > span { min-width: 0; overflow-wrap: anywhere; }
.asset-list small { display: block; font-size: 12.5px; }
.asset-list b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.supplier-list li { flex-direction: column; gap: 2px; }
.supplier-list li:first-child { border-top: 0; padding-top: 0; }
.supplier-list b { overflow-wrap: anywhere; }
.supplier-list span { color: var(--ink-soft); }
.history { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.history li { padding: 6px 0; border-top: 1px solid rgba(26, 26, 26, .15); }
.history li:first-child { border-top: 0; padding-top: 0; }

/* bens por candidatura: um gráfico de colunas por candidato, mesma escala */
.col-panel { display: grid; gap: 28px; }
@media (min-width: 760px) { .col-panel { grid-template-columns: 1fr 1fr; } .col-panel .panel-note { grid-column: 1 / -1; } }
.cols { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; border-bottom: 1px solid var(--muted); }
.col { flex: 1 1 0; max-width: 72px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  height: 168px; position: relative; outline-offset: 2px; }
.col-bar { width: 24px; height: var(--h); min-height: 2px; background: var(--c); border-radius: 4px 4px 0 0; }
.col-value { margin-bottom: 4px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.col-year { position: absolute; top: calc(100% + 6px); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col.now .col-year { color: var(--paper); font-weight: 700; }
.col-change { margin: 34px 0 0; font-size: 15px; }
.col-list { margin-top: 6px; font-size: 14px; color: var(--muted); }
.col-list summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--yellow);
  text-decoration: underline; text-underline-offset: 3px; }
.col-list ul { margin: 0; padding-left: 18px; }

/* /oficiais */
.check { max-width: 720px; }
.check label { display: block; font: 900 15px/1.3 "NotoSans-Black", sans-serif; text-transform: uppercase; margin-bottom: 8px; }
.check-row { display: flex; flex-wrap: wrap; gap: 10px; }
.check-row input { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 12px 14px; border: 0; border-radius: 3px;
  background: var(--paper); color: var(--ink); font: 17px/1.3 "NotoSans-Regular", sans-serif; }
.check-row .btn { min-height: 52px; }
.check-result:empty { display: none; }
.check-result { margin-top: 16px; padding: 16px var(--pad); border-radius: 3px; background: var(--bg-2); border-left: 6px solid var(--muted); }
.check-result.hit { border-left-color: #199e70; }
.check-result p { margin: 0; }
.check-result p + p, .check-result ul { margin-top: 8px; }
.check-result ul { padding-left: 18px; }
.check-result .verdict { font: 900 17px/1.3 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.check-result small { color: var(--muted); }
.cmp-cell h4 { margin: 14px 0 4px; font: 900 13px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.cmp-cell h4 small { font: 400 12px "NotoSans-Regular", sans-serif; }
.site-list { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.45; }
.site-list li { padding: 3px 0; overflow-wrap: anywhere; }
.gov-sites > summary { grid-template-columns: auto 1fr auto; }
.uf-tag { display: grid; place-items: center; min-width: 44px; height: 38px; padding: 0 6px; background: var(--paper); color: var(--ink);
  font: 900 16px/1 "NotoSans-Black", sans-serif; transform: rotate(-2deg); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.gov-pair { display: grid; gap: 16px; }
@media (min-width: 640px) { .gov-pair { grid-template-columns: 1fr 1fr; } }
.compare .gov-who { position: static; width: auto; height: auto; margin: 0 0 8px; overflow: visible; clip-path: none; white-space: normal; }

/* /governador */
.gov-states { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.gov-states a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border-radius: 3px;
  background: var(--bg-2); text-decoration: none; font-size: 15px; }
.gov-states a b { font: 900 15px/1 "NotoSans-Black", sans-serif; color: var(--yellow); }
.gov-states a:hover { background: var(--bg-3); }
.gov-states .gov-cola-link { background: var(--yellow); color: var(--ink); font: 900 14px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.gov-states .gov-cola-link:hover { background: var(--yellow); filter: brightness(.95); }
.gov-card { position: relative; background: var(--paper); color: var(--ink); padding: 22px var(--pad) 16px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35); transform: rotate(-.6deg); }
.gov-card:nth-child(2) { transform: rotate(.6deg); }
.gov-num { position: absolute; top: -12px; right: 16px; margin: 0; padding: 6px 12px; background: var(--yellow);
  font: 900 30px/1 "NotoSans-Black", sans-serif; transform: rotate(3deg); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.gov-card h3 { margin: 0 70px 2px 0; font: 900 20px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.gov-party { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.gov-card dl { margin: 0; display: grid; gap: 2px; font-size: 15px; }
.gov-card dt { margin-top: 8px; font: 900 12px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; color: var(--ink-soft); }
.gov-card dd { margin: 0; overflow-wrap: anywhere; }
.gov-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-underline-offset: 3px; }

.cola { display: grid; gap: 20px; align-items: start; max-width: 900px; }
@media (min-width: 760px) { .cola { grid-template-columns: 1fr 1fr; gap: 32px; } }
.cola-form { display: grid; gap: 16px; }
.cola-uf { display: grid; gap: 8px; font: 900 15px/1.3 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.cola-uf select { min-height: 48px; padding: 8px 12px; border: 0; border-radius: 3px; background: var(--paper); color: var(--ink);
  font: 16px "NotoSans-Regular", sans-serif; text-transform: none; }
.cola-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.cola-form legend { padding: 0; margin-bottom: 8px; font: 900 15px/1.3 "NotoSans-Black", sans-serif; text-transform: uppercase; }
#cola-gov-opts { display: grid; gap: 8px; }
.cola-opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 3px;
  background: var(--bg-2); cursor: pointer; }
.cola-opt:hover { background: var(--bg-3); }
.cola-opt:has(input:checked) { background: var(--paper); color: var(--ink); }
.cola-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.cola-opt b { font: 900 18px/1 "NotoSans-Black", sans-serif; min-width: 1.6em; }
.cola-opt small { color: var(--muted); }
.cola-opt:has(input:checked) small { color: var(--ink-soft); }
.cola-card { position: relative; background: var(--paper); color: var(--ink); padding: 26px var(--pad) 18px;
  box-shadow: 0 4px 0 rgba(0,0,0,.35); transform: rotate(-.8deg); }
.cola-card::before { content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 18px; margin-left: -42px;
  background: var(--tape); transform: rotate(-2deg); }
.cola-head { margin: 0 0 12px; font: 900 14px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.cola-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 16px; margin: 0;
  padding: 12px 0; border-top: 2px dashed rgba(26, 26, 26, .35); }
.cola-line span { font: 900 16px/1.2 "NotoSans-Black", sans-serif; text-transform: uppercase; }
.cola-num { grid-row: span 2; font: 900 56px/1 "NotoSans-Black", sans-serif; letter-spacing: .08em; }
.cola-line small { color: var(--ink-soft); font-size: 14px; }
.cola-foot { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.cola-actions { margin-top: 20px; }

@media print {
  body { background: #fff; color: #000; }
  .skip-link, .bar, .top, .foot, .gov-states, .gov-uf, .tse-method, .cola-form, .cola-actions,
  #colinha > .sec-title, #colinha > .sec-lede, main > .sec-lede { display: none !important; }
  .cola { display: block; }
  .cola-card { max-width: 9cm; transform: none; box-shadow: none; border: 1px solid #000; background: #fff; }
  .cola-card::before { display: none; }
}
