/*
 * propostasdogoverno.com.br — estilos
 *
 * Linguagem visual inspirada no seuimposto.com (engenharia reversa em docs/seuimposto-rea.md):
 * tema escuro "grafite quente" por padrão e tema claro opcional, Geist no texto,
 * Faustina (serifada) nos títulos, botões em pílula, bordas internas finas,
 * cantos de 20px nos cartões e 12px nos campos.
 */

:root {
  /* Base RGB do texto: usada para linhas e véus translúcidos (rgba(var(--ink), x)). */
  --ink: 250, 250, 249;

  --bg: #0F0E0D;
  --surface: #151412;          /* panel */
  --surface-2: #1B1A17;        /* panel-2 */
  --surface-3: #22201D;        /* panel-3 */
  --glass: rgba(21, 20, 18, .93);
  --line: rgba(var(--ink), .08);
  --line-2: rgba(var(--ink), .16);
  --line-3: rgba(var(--ink), .25);
  --border: var(--line-2);

  --text: #FAFAF9;
  --text-2: #D6D4CF;
  --muted: #A6A39C;
  --muted-2: #85827C;
  --muted-3: #6F6C66;

  --cta-bg: #F4F1EA;
  --cta-text: #12110F;

  --accent: #FAFAF9;           /* links e destaques seguem o texto, como no original */
  --accent-soft: rgba(var(--ink), .07);

  --done: #3DD68C;             /* "apur" do original */
  --done-soft: rgba(61, 214, 140, .12);
  --partial: #E8B04A;
  --partial-soft: rgba(232, 176, 74, .13);
  --fail: #F07167;
  --fail-soft: rgba(240, 113, 103, .13);

  --chart: #4F97E6;
  --chart-muted: #6F6C66;

  --serif: "Faustina", Georgia, "Times New Roman", serif;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --hover: .12s;

  --t-manchete: 27px;
  --t-fig: 42px;
  --t-name: 14px;
  --t-body: 14px;
  --t-label: 12px;
  --t-micro: 11px;

  --m: 20px;
  --pad: 16px;
  --gap: 12px;

  --radius: 20px;
  --radius-sm: 12px;
  --card-ring: inset 0 0 0 1px rgba(var(--ink), .1), inset 0 1px 0 0 rgba(var(--ink), .06);
  --modal-bg: linear-gradient(#201F1B, #1A1916);
  --serie-programa: #3987e5;   /* paleta de referência validada, tema escuro */
  --serie-fora: #d95926;
  --max: 1120px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --ink: 17, 16, 16;
  --bg: #F1F0EE;
  --surface: #F8F6F5;
  --surface-2: #EEECEB;
  --surface-3: #E6E4E2;
  --glass: rgba(248, 246, 245, .93);
  --text: #111010;
  --text-2: #302E2D;
  --muted: #53514F;
  --muted-2: #6F6C69;
  --muted-3: #86827F;
  --cta-bg: #111010;
  --cta-text: #F8F6F5;
  --accent: #111010;
  --done: #0C8A4C;
  --done-soft: rgba(12, 138, 76, .10);
  --partial: #A86A00;
  --partial-soft: rgba(168, 106, 0, .10);
  --fail: #B42318;
  --fail-soft: rgba(180, 35, 24, .09);
  --chart: #0B5CAD;
  --chart-muted: #86827F;
  --modal-bg: linear-gradient(#FBFAF9, #F4F2F0);
  --serie-programa: #2a78d6;
  --serie-fora: #eb6834;
  color-scheme: light;
}

* { box-sizing: border-box; }
/* O atributo hidden sempre esconde, mesmo em elementos com display definido no CSS
   (sem isso, ex.: a dica dos gráficos com display:grid continuava visível). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--t-body)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: text-decoration-color var(--hover) var(--ease); }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { line-height: 1.08; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--m); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Cabeçalho (vidro fosco, como a barra do original) */
.site-header { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 -1px 0 var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: var(--gap); min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 600; color: var(--text); text-decoration: none; font-size: var(--t-name); display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 13px; }
.brand small { color: var(--muted); font-weight: 400; font-size: inherit; }
.site-header .wrap { flex-wrap: nowrap; max-width: 1480px; }
.brand { flex: none; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; min-width: 0; padding: 3px; border-radius: 100px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; flex: none; padding: 0 12px; }
.header-acoes { display: flex; align-items: center; gap: 8px; flex: none; }
/* Abaixo de 1280px: logo + ações numa linha; menu numa faixa rolável embaixo. */
@media (max-width: 1279px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 10px; row-gap: 6px; }
  .header-acoes { margin-left: auto; }
  .nav { order: 3; flex: 1 1 100%; margin: 0 -4px; padding: 0 4px 8px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
}
.nav a { height: 30px; line-height: 30px; padding: 0 14px; border-radius: 100px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 13px; transition: color var(--hover) var(--ease), background var(--hover) var(--ease); }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { background: rgba(var(--ink), .14); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--ink), .12); }
.theme-toggle { height: 34px; min-width: 34px; border: 0; background: rgba(var(--ink), .07); box-shadow: inset 0 0 0 1px rgba(var(--ink), .25); color: var(--text); border-radius: 100px; padding: 0 13px 0 11px; cursor: pointer; font: 500 12px/1 var(--sans); transition: background var(--hover) var(--ease); }
.theme-toggle:hover { background: rgba(var(--ink), .12); }

/* Topo da página */
.hero { padding: 40px 0 22px; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 5vw, var(--t-fig)); letter-spacing: -.012em; }
.hero p { color: var(--text-2); max-width: 68ch; margin: 12px 0 0; font-size: 15px; line-height: 1.55; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: var(--t-micro); font-weight: 600; color: var(--muted); margin-bottom: 10px; }

/* Cartões e resumo */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-ring); }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap); margin: 6px 0 24px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: var(--t-label); font-weight: 500; }
.stat .value { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat.done .value { color: var(--done); }
.stat.partial .value { color: var(--partial); }
.stat.fail .value { color: var(--fail); }
.stat .progress { margin-top: 10px; }

.progress { height: 6px; background: rgba(var(--ink), .08); border-radius: 99px; overflow: hidden; display: flex; gap: 2px; }
.progress span { display: block; height: 100%; border-radius: 99px; transition: width .6s var(--ease-out); }
.progress span[style="width:0%"], .progress span[style="width:0.00%"] { display: none; }
.progress .p-done { background: var(--done); }
.progress .p-partial { background: var(--partial); }
.progress .p-fail { background: var(--fail); }

/* Filtros */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.toolbar input[type="search"], .toolbar select {
  font: 400 15px/1 var(--sans); height: 44px; padding: 0 15px; border: 0; border-radius: var(--radius-sm);
  background: rgba(var(--ink), .043); color: var(--text); min-width: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--ink), .13);
  transition: box-shadow var(--hover) var(--ease), background var(--hover) var(--ease);
}
.toolbar input[type="search"]::placeholder { color: var(--muted-2); }
.toolbar input[type="search"]:focus, .toolbar select:focus { outline: none; background: rgba(var(--ink), .075); box-shadow: inset 0 0 0 1px rgba(var(--ink), .72), 0 0 0 4px rgba(var(--ink), .07); }
.toolbar select option { background: var(--surface); color: var(--text); }
.toolbar input[type="search"] { flex: 1 1 260px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { font: 500 var(--t-label)/1 var(--sans); border: 0; background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 8px 12px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(var(--ink), .08); transition: background var(--hover) var(--ease), color var(--hover) var(--ease); }
.chip-btn:hover { color: var(--text); background: var(--surface-3); }
.chip-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* Setores e lista de propostas */
.sector { margin-bottom: var(--gap); overflow: hidden; }
.sector-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; box-shadow: inset 0 -1px 0 var(--line); flex-wrap: wrap; }
.sector-num { width: 28px; height: 28px; border-radius: 100px; background: rgba(var(--ink), .07); box-shadow: inset 0 0 0 1px rgba(var(--ink), .12); color: var(--text-2); display: grid; place-items: center; font-weight: 600; font-size: var(--t-label); flex: none; }
.sector-head h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -.01em; flex: 1 1 240px; }
.sector-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--t-label); font-variant-numeric: tabular-nums; flex: 0 1 220px; }
.sector-meta .progress { flex: 1; min-width: 80px; }

.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 15px 20px; box-shadow: inset 0 -1px 0 var(--line); align-items: start; transition: background var(--hover) var(--ease); }
.item:last-child { box-shadow: none; }
.item:hover { background: rgba(var(--ink), .02); }
.item.is-done { background: var(--done-soft); }
.item-title { font-weight: 500; font-size: var(--t-name); color: var(--text); }
.item.is-done .item-title { color: var(--done); }
.item-body p { margin: 5px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.item-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; align-items: center; font-size: var(--t-micro); color: var(--muted-2); }
.page-chip { max-width: 100%; overflow-wrap: anywhere; display: inline-block; padding: 4px 9px; border-radius: 999px; text-decoration: none; font-variant-numeric: tabular-nums; background: rgba(var(--ink), .05); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(var(--ink), .08); transition: background var(--hover) var(--ease), color var(--hover) var(--ease); }
.page-chip:hover { background: rgba(var(--ink), .1); color: var(--text); }
.done-note { margin-top: 8px; font-size: var(--t-label); color: var(--done); }
.done-note a { color: inherit; }

/* Checkbox */
.check { position: relative; width: 22px; height: 22px; margin-top: 1px; }
.check input { appearance: none; -webkit-appearance: none; margin: 0; width: 22px; height: 22px; border: 0; border-radius: 7px; background: rgba(var(--ink), .05); box-shadow: inset 0 0 0 1px rgba(var(--ink), .25); cursor: default; display: block; transition: background var(--hover) var(--ease); }
.check input:checked { background: var(--done); box-shadow: none; }
.check input:checked + svg { opacity: 1; }
.check svg { position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; opacity: 0; pointer-events: none; color: var(--bg); }
body.editing .check input { cursor: pointer; box-shadow: inset 0 0 0 1px rgba(var(--ink), .72); }

/* Status (2022–2026) */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro); font-weight: 600; padding: 4px 9px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
.badge.cumprida { background: var(--done-soft); color: var(--done); }
.badge.parcial { background: var(--partial-soft); color: var(--partial); }
.badge.nao_cumprida { background: var(--fail-soft); color: var(--fail); }
.status-dot { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; color: var(--bg); font-size: 12px; }
.status-dot.cumprida { background: var(--done); }
.status-dot.parcial { background: var(--partial); }
.status-dot.nao_cumprida { background: var(--fail); }
.item-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; justify-content: space-between; }

/* Botões e barra de edição */
.edit-bar { position: sticky; bottom: 0; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 var(--line-2); padding: 12px 0; z-index: 20; }
.edit-bar .wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; color: var(--text-2); font-size: 13px; }
.btn { font: 600 14px/1 var(--sans); border: 0; border-radius: 13px; height: 44px; padding: 0 18px; cursor: pointer; background: var(--cta-bg); color: var(--cta-text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: opacity var(--hover) var(--ease); }
.btn:hover { opacity: .9; }
.btn.secondary { background: rgba(var(--ink), .07); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--ink), .25); border-radius: 100px; }

/* Impostômetro */
.counter { background: var(--surface); box-shadow: var(--card-ring); border-radius: var(--radius); padding: 32px 22px; text-align: center; margin-bottom: 24px; }
.counter .label { color: var(--muted); font-size: 13px; }
.counter .big { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 7.4vw, 64px); font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 8px 0; white-space: nowrap; overflow: hidden; }
.counter .sub { color: var(--muted); font-size: var(--t-label); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); margin-bottom: 20px; }
.mini { padding: 16px 18px; }
.mini .label { color: var(--muted); font-size: var(--t-label); font-weight: 500; }
.mini .value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.01em; }
.mini .pct { color: var(--muted-2); font-size: var(--t-label); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
.table th, .table td { text-align: left; padding: 11px 16px; box-shadow: inset 0 -1px 0 var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: var(--t-label); }
.table td.num, .table th.num { text-align: right; }
.table tr:last-child td { box-shadow: none; }
.table-wrap { overflow-x: auto; }

/* Texto */
.prose { max-width: 72ch; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 32px 0 10px; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { background: rgba(var(--ink), .07); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.note { padding: 14px 18px; background: rgba(var(--ink), .04); box-shadow: inset 0 0 0 1px rgba(var(--ink), .1); border-radius: var(--radius-sm); margin: 16px 0; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.section-title { font-family: var(--serif); font-weight: 400; font-size: var(--t-manchete); letter-spacing: -.01em; margin: 36px 0 14px; }

/* Rodapé */
.site-footer { box-shadow: inset 0 1px 0 var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--muted-2); font-size: var(--t-label); }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--muted); }

/* Herança e balanço */
.group-nav { margin: 16px 0 8px; }
.group-nav .chip-btn { text-decoration: none; }
.table tr.grupo-linha th { background: rgba(var(--ink), .04); color: var(--text); font-family: var(--serif); font-weight: 400; font-size: 16px; }
.table .ref { color: var(--muted-2); font-size: var(--t-micro); }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.ind { padding: 18px 20px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.ind-nome { font-size: var(--t-name); font-weight: 500; line-height: 1.3; }
.ind-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ind-label { color: var(--muted-2); font-size: var(--t-micro); }
.ind-valor { font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--muted); letter-spacing: -.01em; }
.ind-valor.now { color: var(--text); }
.ind-serie { margin: 0; color: var(--muted-2); font-size: var(--t-micro); font-variant-numeric: tabular-nums; line-height: 1.5; }
.ind-nota { margin: 0; font-size: var(--t-label); color: var(--muted); line-height: 1.5; }
.delta { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; font-size: var(--t-label); font-weight: 600; padding: 4px 9px; border-radius: 99px; background: rgba(var(--ink), .07); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.melhorou { background: var(--done-soft); color: var(--done); }
.delta.piorou { background: var(--fail-soft); color: var(--fail); }
.delta-label { font-weight: 500; }
.spark { width: 100%; height: auto; display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-base { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--chart-muted); stroke: var(--surface); stroke-width: 2; }
.spark-dot.now { fill: var(--chart); }
.spark-hit { fill: transparent; cursor: default; }
.spark-tip { position: fixed; z-index: 30; pointer-events: none; background: var(--cta-bg); color: var(--cta-text); font-size: var(--t-label); font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); }

@media (max-width: 640px) {
  :root { --m: 16px; }
  .site-header { position: static; }
  .site-header .wrap { padding-top: 10px; gap: 8px; }
  .theme-toggle { padding: 0; }
  .tt-label { display: none; }

  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .value { font-size: 28px; }
  .item { padding: 13px 16px; }
  .sector-head { padding: 16px; }
  .sector-meta { flex-basis: 100%; }
  .ind-grid { grid-template-columns: 1fr; }
  /* Tabela-resumo vira blocos: nome em cima, valores embaixo. */
  #tabela-resumo thead { display: none; }
  #tabela-resumo tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; box-shadow: inset 0 -1px 0 var(--line); }
  #tabela-resumo tbody tr.grupo-linha { display: block; padding: 0; }
  #tabela-resumo th, #tabela-resumo td { padding: 0; box-shadow: none; text-align: left; }
  #tabela-resumo tr.grupo-linha th { display: block; padding: 10px 14px; }
  #tabela-resumo td:first-child, #tabela-resumo td.td-delta { grid-column: 1 / -1; }
  #tabela-resumo td[data-label]::before { content: attr(data-label); display: block; color: var(--muted-2); font-size: var(--t-micro); }
}

@media print {
  .site-header, .toolbar, .edit-bar, .theme-toggle { display: none; }
  .card { box-shadow: none; }
}

/* Pessoas acessando agora (canto inferior esquerdo, como no original) */
.online-pill { position: fixed; left: 16px; bottom: 16px; z-index: 25; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px 0 11px; border-radius: 100px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(var(--ink), .16), 0 10px 30px -10px rgba(0, 0, 0, .5); color: var(--text-2); font-size: var(--t-label); font-weight: 500; font-variant-numeric: tabular-nums; }
.online-pill[hidden] { display: none; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 0 rgba(61, 214, 140, .5); animation: pulso 2s var(--ease) infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, .45); } 70% { box-shadow: 0 0 0 7px rgba(61, 214, 140, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0); } }
@media (prefers-reduced-motion: reduce) { .online-dot { animation: none; } }
body.editing .online-pill { display: none; }
@media print { .online-pill { display: none; } }

/* ---------- Anúncios ---------- */
.ad-slot:empty { display: none; }
.ad-slot-topo { margin-top: 14px; }
.ad-slot-rodape { margin-top: 32px; }
.ad-slot[data-espaco="lista"], .ad-slot[data-espaco="contador"] { margin: 0 0 20px; }
.ad-card { background: var(--surface); border-radius: 16px; box-shadow: var(--card-ring); padding: 12px 16px 10px; display: grid; gap: 8px; }
.ad-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.ad-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.ad-texto { min-width: 0; }
.ad-marca { font-family: var(--serif); font-size: 20px; line-height: 1.15; color: var(--text); overflow-wrap: anywhere; }
.ad-frase { font-size: var(--t-label); color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.ad-visitar { flex: none; height: 30px; line-height: 30px; padding: 0 13px; border-radius: 100px; background: rgba(var(--ink), .07); box-shadow: inset 0 0 0 1px rgba(var(--ink), .25); color: var(--text); font-size: var(--t-label); font-weight: 500; text-decoration: none; white-space: nowrap; }
.ad-visitar:hover { background: rgba(var(--ink), .12); }
.ad-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; box-shadow: inset 0 1px 0 var(--line); font-size: var(--t-micro); color: var(--muted-2); }
.ad-tomar { border: 0; background: none; color: var(--text-2); font: 500 var(--t-micro)/1 var(--sans); cursor: pointer; padding: 4px 0; }
.ad-tomar:hover { color: var(--text); text-decoration: underline; }

/* Modal (mesma construção do .acard do original) */
.ad-dialog { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; border: 0; padding: 30px 30px 24px; border-radius: var(--radius); color: var(--text); background: var(--modal-bg); box-shadow: 0 0 0 1px rgba(var(--ink), .1), inset 0 1px 0 rgba(var(--ink), .06), 0 30px 80px -10px rgba(0, 0, 0, .65); }
.ad-dialog::backdrop { background: rgba(10, 9, 8, .78); }
.ad-dialog[open] { animation: subir .28s var(--ease-out); }
@keyframes subir { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ad-dialog[open] { animation: none; } }
.ad-fechar { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 100px; background: rgba(var(--ink), .07); color: var(--text-2); cursor: pointer; font-size: 13px; }
.ad-fechar:hover { background: rgba(var(--ink), .14); color: var(--text); }
.ad-dialog h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -.012em; line-height: 1.08; margin: 0 36px 8px 0; }
.ad-lead { color: var(--text-2); font-size: 13px; line-height: 1.5; margin: 0 0 18px; }
.ad-form { display: flex; flex-direction: column; }
.ad-campo { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.ad-campo span { font-size: var(--t-label); font-weight: 500; color: var(--text-2); }
.ad-campo input, .admin-motivo, .ad-valor input { height: 48px; border: 0; border-radius: var(--radius-sm); padding: 0 15px; font: 400 16px/1 var(--sans); color: var(--text); background: rgba(var(--ink), .043); box-shadow: inset 0 0 0 1px rgba(var(--ink), .13); transition: box-shadow var(--hover) var(--ease), background var(--hover) var(--ease); width: 100%; }
.ad-campo input::placeholder, .admin-motivo::placeholder, .ad-valor input::placeholder { color: var(--muted-2); }
.ad-campo input:focus, .admin-motivo:focus, .ad-valor input:focus { outline: none; background: rgba(var(--ink), .075); box-shadow: inset 0 0 0 1px rgba(var(--ink), .72), 0 0 0 4px rgba(var(--ink), .07); }
.ad-espacos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.ad-espaco { border: 0; border-radius: 999px; padding: 7px 11px; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(var(--ink), .08); font: 400 var(--t-label)/1 var(--sans); cursor: pointer; }
.ad-espaco b { font-weight: 500; }
.ad-espaco[aria-checked="true"] { background: var(--text); color: var(--bg); }
.ad-previa { border-radius: var(--radius-sm); padding: 10px 12px; background: rgba(var(--ink), .04); box-shadow: inset 0 0 0 1px rgba(var(--ink), .1); display: grid; gap: 6px; margin-bottom: 16px; }
.ad-erro { color: var(--fail); font-size: var(--t-label); margin: 0 0 10px; min-height: 0; }
.ad-erro:empty { display: none; }
.ad-cta { width: 100%; height: 50px; justify-content: center; font-size: 15px; border-radius: 13px; }
.ad-cta:disabled { opacity: .6; cursor: progress; }
.ad-fine { color: var(--muted); font-size: var(--t-label); line-height: 1.45; margin: 12px 0 0; }
.ad-status { display: flex; flex-direction: column; }
.ad-status .btn.secondary { align-self: flex-start; margin-top: 14px; }
.ad-passos { list-style: none; display: flex; gap: 6px; padding: 0; margin: 4px 0 16px; counter-reset: passo; }
.ad-passos li { counter-increment: passo; font-size: var(--t-micro); font-weight: 500; color: var(--muted-2); padding: 5px 10px; border-radius: 99px; background: rgba(var(--ink), .05); }
.ad-passos li::before { content: counter(passo) ". "; }
.ad-passos li.atual { background: var(--text); color: var(--bg); }
.ad-passos li.feito { color: var(--done); background: var(--done-soft); }
.ad-qr { width: 220px; max-width: 100%; aspect-ratio: 1; margin: 0 auto 14px; background: #fff; border-radius: 14px; padding: 8px; display: grid; place-items: center; color: #111; font-size: 12px; text-align: center; }
.ad-qr svg { width: 100%; height: 100%; display: block; }
.ad-copia { width: 100%; resize: none; border: 0; border-radius: var(--radius-sm); padding: 10px 12px; font: 400 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); background: rgba(var(--ink), .043); box-shadow: inset 0 0 0 1px rgba(var(--ink), .13); margin-bottom: 10px; word-break: break-all; }

/* Painel de administração */
.admin-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.admin-grid .chips { margin-top: 4px; }
.admin-motivo { height: 40px; font-size: 14px; }
#login input { flex: 1 1 260px; }

/* ---------- Apoio (doação) ---------- */
.apoio-btn { height: 34px; border: 0; border-radius: 100px; padding: 0 14px; cursor: pointer; font: 600 12px/1 var(--sans); background: var(--cta-bg); color: var(--cta-text); transition: opacity var(--hover) var(--ease); }
.apoio-btn:hover { opacity: .88; }
.apoio-btn[hidden] { display: none; }
.ad-valores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.ad-valores .ad-espaco { justify-content: center; text-align: center; padding: 11px 6px; font-size: 13px; font-weight: 500; }
.ad-valor { position: relative; margin-bottom: 8px; }
.ad-valor .prefixo { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; pointer-events: none; }
.ad-valor input { padding-left: 44px; }
.ad-sem-valor { border: 0; background: none; color: var(--muted); font: 400 var(--t-label)/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; align-self: flex-start; margin-bottom: 14px; }
.ad-sem-valor:hover { color: var(--text); }
@media (max-width: 640px) { .apoio-btn { padding: 0 12px; } }

/* Ranking de apoiadores */
.ranking-titulo { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 22px 0 8px; }
.ranking { list-style: none; margin: 0; padding: 0; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px rgba(var(--ink), .1); background: rgba(var(--ink), .03); }
.ranking li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 10px 14px; box-shadow: inset 0 -1px 0 var(--line); font-variant-numeric: tabular-nums; }
.ranking li:last-child { box-shadow: none; }
.ranking-pos { color: var(--muted-2); font-size: var(--t-label); font-weight: 600; }
.ranking li.top .ranking-pos { color: var(--text); }
.ranking-nome { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.ranking-total { color: var(--text-2); font-size: 13px; }
.ranking.compacta li { padding: 8px 12px; font-size: 13px; }
.ranking-vazio { color: var(--muted); font-size: 13px; margin: 0; }
.prose .ranking { max-width: 520px; }

/* ---------- Três colunas (página principal) ---------- */
body.tres-colunas .wrap { max-width: 1480px; }
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.conteudo { min-width: 0; }
.lateral { position: sticky; top: 68px; max-height: calc(100vh - 80px); overflow-y: auto; padding: 40px 2px 24px; scrollbar-width: thin; }
.lateral:empty { display: none; }
@media (max-width: 1279px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; } .lateral-esq { display: none; } }
@media (max-width: 1023px) { .layout { display: block; } .lateral-dir { display: none; } }
@media (max-width: 640px) { .lateral { position: static; max-height: none; } }

/* Coluna da esquerda */
.lat-bloco { margin-bottom: 26px; }
.lat-titulo { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 600; margin: 0 0 10px; }
.lat-setores { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lat-setores a { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: baseline; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-size: var(--t-label); line-height: 1.3; }
.lat-setores a:hover { background: rgba(var(--ink), .05); color: var(--text); }
.lat-num { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.lat-conta { color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: var(--t-micro); }
.lat-prog { height: 3px; margin: 0 8px 4px 34px; }
.lat-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lat-feed li { display: grid; gap: 2px; font-size: var(--t-label); line-height: 1.4; }
.lat-feed time { color: var(--muted-2); font-size: var(--t-micro); font-variant-numeric: tabular-nums; }
.lat-feed a { color: var(--text-2); text-decoration: none; }
.lat-feed a:hover { color: var(--text); text-decoration: underline; }
.lat-quem, .lat-sobre { color: var(--muted-2); font-size: var(--t-micro); }

/* Botão "Debater" em cada proposta */
.debate-btn { display: none; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(var(--ink), .07); box-shadow: inset 0 0 0 1px rgba(var(--ink), .16); color: var(--text); font: 500 var(--t-micro)/1.3 var(--sans); cursor: pointer; transition: background var(--hover) var(--ease); }
body.debate-on .debate-btn { display: inline-flex; }
.debate-btn:hover { background: rgba(var(--ink), .13); }
.debate-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.debate-btn-stats { color: inherit; opacity: .75; font-variant-numeric: tabular-nums; }
.debate-btn-stats:empty { display: none; }
.item.selecionada { box-shadow: inset 3px 0 0 var(--text), inset 0 -1px 0 var(--line); background: rgba(var(--ink), .035); }

/* ---------- Painel de debate (coluna da direita / janela no celular) ---------- */
.deb-painel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-ring); padding: 18px; display: grid; gap: 16px; }
.deb-dialog .deb-painel { background: none; box-shadow: none; padding: 0; }
.deb-dialog { width: min(520px, calc(100vw - 16px)); padding: 26px 20px 20px; }
.deb-lead { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.deb-fine { margin: 0; color: var(--muted); font-size: var(--t-label); line-height: 1.45; }
.deb-login, .deb-lado { display: grid; gap: 12px; }
.deb-google { min-height: 44px; }
.deb-dev { display: flex; gap: 8px; flex-wrap: wrap; }
.deb-dev .deb-input { flex: 1 1 140px; height: 40px; }
.deb-input { width: 100%; border: 0; border-radius: var(--radius-sm); padding: 10px 12px; font: 400 14px/1.45 var(--sans); color: var(--text); background: rgba(var(--ink), .043); box-shadow: inset 0 0 0 1px rgba(var(--ink), .13); resize: vertical; }
.deb-input:focus { outline: none; background: rgba(var(--ink), .075); box-shadow: inset 0 0 0 1px rgba(var(--ink), .72), 0 0 0 4px rgba(var(--ink), .07); }
.deb-lados { display: flex; flex-wrap: wrap; gap: 6px; }
.deb-conta { display: flex; align-items: center; gap: 10px; }
.deb-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink), .1); color: var(--text); font-weight: 600; font-size: 13px; flex: none; }
.deb-quem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; font-size: 13px; }
.lado-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 99px; background: rgba(var(--ink), .07); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(var(--ink), .1); white-space: nowrap; }
.deb-menu { position: relative; }
.deb-menu summary { list-style: none; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.deb-menu summary::-webkit-details-marker { display: none; }
.deb-menu summary:hover { background: rgba(var(--ink), .07); color: var(--text); }
.deb-menu-itens { position: absolute; right: 0; top: 34px; z-index: 5; background: var(--surface-2); border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px rgba(var(--ink), .12), 0 12px 30px -10px rgba(0, 0, 0, .5); padding: 6px; display: grid; min-width: 180px; }
.deb-menu-itens button { border: 0; background: none; color: var(--text-2); text-align: left; padding: 8px 10px; border-radius: 8px; font: 400 13px/1.2 var(--sans); cursor: pointer; }
.deb-menu-itens button:hover { background: rgba(var(--ink), .07); color: var(--text); }
.deb-aviso { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(var(--ink), .06); color: var(--text); font-size: 13px; }
.deb-h3 { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 600; margin: 0 0 10px; }
.deb-alta-lista { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; counter-reset: alta; }
.deb-alta-lista li { counter-increment: alta; }
.deb-alta-lista button { width: 100%; text-align: left; border: 0; background: rgba(var(--ink), .03); border-radius: var(--radius-sm); padding: 10px 12px 10px 34px; position: relative; cursor: pointer; display: grid; gap: 3px; color: var(--text); font: inherit; }
.deb-alta-lista button::before { content: counter(alta); position: absolute; left: 12px; top: 10px; color: var(--muted-2); font-size: var(--t-label); font-weight: 600; }
.deb-alta-lista button:hover { background: rgba(var(--ink), .07); }
.deb-alta-titulo { font-size: 13px; font-weight: 500; line-height: 1.35; }
.deb-alta-num { font-size: var(--t-micro); color: var(--muted); }
.deb-topo { display: flex; }
.deb-voltar { border: 0; background: none; color: var(--muted); font: 500 var(--t-label)/1 var(--sans); cursor: pointer; padding: 4px 0; }
.deb-voltar:hover { color: var(--text); }
.deb-proposta { display: grid; gap: 14px; }
.deb-setor { font-size: var(--t-micro); color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: -8px; }
.deb-titulo { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
.deb-voto-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.deb-voto-btn { height: 42px; border: 0; border-radius: 12px; background: rgba(var(--ink), .06); box-shadow: inset 0 0 0 1px rgba(var(--ink), .16); color: var(--text); font: 600 13px/1 var(--sans); cursor: pointer; transition: background var(--hover) var(--ease); }
.deb-voto-btn:hover { background: rgba(var(--ink), .11); }
.deb-voto-btn[aria-pressed="true"] { background: var(--cta-bg); color: var(--cta-text); box-shadow: none; }
.deb-barra-linha { display: grid; grid-template-columns: 82px 1fr auto; gap: 8px; align-items: center; font-size: var(--t-micro); margin-bottom: 6px; }
.deb-barra-rotulo { color: var(--text-2); font-weight: 500; }
.deb-barra-num { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.deb-barra { height: 8px; border-radius: 99px; overflow: hidden; display: flex; gap: 2px; background: rgba(var(--ink), .05); }
.deb-barra span { display: block; height: 100%; border-radius: 99px; }
.deb-barra .sim { background: var(--text-2); }
.deb-barra .nao { background: var(--muted-3); opacity: .55; }
.deb-barra .vazia { width: 100%; background: none; }
.deb-lados-res { margin-top: 4px; padding-top: 8px; box-shadow: inset 0 1px 0 var(--line); }
.deb-abas { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(var(--ink), .05); margin-bottom: 10px; }
.deb-abas button { border: 0; border-radius: 999px; padding: 7px 10px; background: none; color: var(--muted); font: 500 var(--t-label)/1 var(--sans); cursor: pointer; }
.deb-abas button[aria-selected="true"] { background: rgba(var(--ink), .14); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--ink), .12); }
.deb-arg-lista { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.deb-arg { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(var(--ink), .03); box-shadow: inset 0 0 0 1px rgba(var(--ink), .08); display: grid; gap: 6px; }
.deb-arg.fora { opacity: .75; box-shadow: inset 0 0 0 1px rgba(var(--ink), .16); background: none; }
.deb-arg-autor { display: flex; align-items: center; gap: 8px; font-size: var(--t-label); flex-wrap: wrap; }
.deb-arg-texto { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.deb-arg-acoes { display: flex; align-items: center; gap: 10px; }
.deb-apoiar { border: 0; border-radius: 99px; padding: 4px 10px; background: rgba(var(--ink), .07); color: var(--text-2); font: 600 var(--t-micro)/1 var(--sans); cursor: pointer; font-variant-numeric: tabular-nums; }
.deb-apoiar:hover:not(:disabled) { background: rgba(var(--ink), .13); color: var(--text); }
.deb-apoiar[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.deb-apoiar:disabled { cursor: default; opacity: .7; }
.deb-denunciar { border: 0; background: none; color: var(--muted-2); font: 400 var(--t-micro)/1 var(--sans); cursor: pointer; padding: 4px 0; }
.deb-denunciar:hover { color: var(--fail); text-decoration: underline; }
.deb-status { font-size: var(--t-micro); color: var(--partial); }
.deb-status.recusado { color: var(--fail); }
.deb-form { display: grid; gap: 8px; }
.deb-form-rodape { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.deb-form .btn { height: 38px; font-size: 13px; padding: 0 14px; }
.deb-contador { font-size: var(--t-micro); color: var(--muted-2); font-variant-numeric: tabular-nums; }
.lateral-esq { padding-bottom: 72px; }
.online-pill.online-pill-inline { position: static; margin-bottom: 22px; box-shadow: inset 0 0 0 1px rgba(var(--ink), .12); background: rgba(var(--ink), .04); }
.lateral-esq { padding-bottom: 24px; }
.deb-dialog .deb-conta, .deb-dialog .deb-login, .deb-dialog .deb-lado { padding-right: 40px; }
.deb-lado-voto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.deb-lado-voto .chip-btn { padding: 7px 11px; }
.deb-login-arg { display: grid; gap: 10px; padding: 12px; border-radius: var(--radius-sm); background: rgba(var(--ink), .03); box-shadow: inset 0 0 0 1px rgba(var(--ink), .08); }
.deb-marca { font-size: var(--t-micro); color: var(--muted-2); font-variant-numeric: tabular-nums; }
.deb-nome { height: 38px; }

/* Fora do programa */
.secao-fora { margin-top: 40px; }
.fora-intro { color: var(--text-2); font-size: 14px; max-width: 75ch; margin: 0 0 16px; }
.fora-cat { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -.01em; flex: 1 1 240px; margin: 0; }
.fora-dot { background: rgba(var(--ink), .12); color: var(--text); }
.fora-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag-fora { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-radius: 99px; background: rgba(var(--ink), .07); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(var(--ink), .12); white-space: nowrap; }
.tag-fora.contraria { background: var(--partial-soft); color: var(--partial); box-shadow: none; }
.fora-ato { margin: 4px 0 0 !important; font-size: var(--t-label) !important; color: var(--muted) !important; }
.fora-ato a { color: var(--text-2); }
.fora-trecho { margin: 8px 0 0; padding: 8px 12px; border-left: 2px solid var(--line-3); color: var(--text-2); font-size: 13px; background: rgba(var(--ink), .03); border-radius: 0 8px 8px 0; }
.fora-trecho span { color: var(--muted); }

/* ---------- Select personalizado (visual do seuimposto.com) ---------- */
.pdg-select { position: relative; flex: 0 1 300px; min-width: 200px; }
.pdg-select-nativo { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.pdg-select-btn { width: 100%; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 15px; border: 0; border-radius: var(--radius-sm); background: rgba(var(--ink), .043); box-shadow: inset 0 0 0 1px rgba(var(--ink), .13); color: var(--text-2); font: 400 15px/1 var(--sans); text-align: left; cursor: pointer; transition: box-shadow var(--hover) var(--ease), background var(--hover) var(--ease); }
.pdg-select-btn:hover { background: rgba(var(--ink), .065); box-shadow: inset 0 0 0 1px rgba(var(--ink), .22); }
.pdg-select.tem-valor .pdg-select-btn { color: var(--text); }
.pdg-select.aberto .pdg-select-btn, .pdg-select-btn:focus-visible { outline: none; background: rgba(var(--ink), .075); box-shadow: inset 0 0 0 1px rgba(var(--ink), .72), 0 0 0 4px rgba(var(--ink), .07); }
.pdg-select-texto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdg-select-btn svg { width: 12px; height: 12px; flex: none; color: var(--muted); transition: transform var(--hover) var(--ease); }
.pdg-select.aberto .pdg-select-btn svg { transform: rotate(180deg); }
.pdg-select-menu { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); min-width: 100%; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--modal-bg); box-shadow: 0 0 0 1px rgba(var(--ink), .1), inset 0 1px 0 rgba(var(--ink), .06), 0 24px 60px -12px rgba(0, 0, 0, .6); outline: none; scrollbar-width: thin; animation: menu-abrir .14s var(--ease-out); }
.pdg-select.para-cima .pdg-select-menu { top: auto; bottom: calc(100% + 6px); }
@keyframes menu-abrir { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pdg-select-menu { animation: none; } }
.pdg-select-op { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text-2); font-size: 14px; line-height: 1.3; cursor: pointer; }
.pdg-select-op.ativo { background: rgba(var(--ink), .08); color: var(--text); }
.pdg-select-op[aria-selected="true"] { color: var(--text); font-weight: 500; }
.pdg-select-op[aria-disabled="true"] { opacity: .45; cursor: default; }
.pdg-select-op svg { width: 12px; height: 12px; flex: none; color: var(--text); }
@media (max-width: 640px) { .pdg-select { flex: 1 1 100%; } }

/* ---------- Página Dinheiro ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); margin: 22px 0 8px; }
.kpi { padding: 18px 20px; }
.kpi-valor { font: 600 30px/1.1 var(--sans); letter-spacing: -.02em; color: var(--text); }
.kpi-rotulo { margin-top: 6px; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.kpi-nota { margin-top: 6px; color: var(--muted-2); font-size: var(--t-micro); }
.viz-bloco { margin-top: 12px; }
.viz-sub { color: var(--text-2); font-size: 14px; margin: -4px 0 12px; max-width: 75ch; }
.viz-legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: var(--t-label); color: var(--text-2); }
.viz-legenda > span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw.programa { background: var(--serie-programa); }
.sw.fora { background: var(--serie-fora); }
.sw.pontual { background: repeating-linear-gradient(45deg, var(--muted-2) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--muted-3); }
.dot-leg { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-leg.antes { box-shadow: inset 0 0 0 2px var(--muted-2); }
.dot-leg.depois { background: var(--text); }
.viz-card { padding: 14px 16px; overflow: hidden; }
.viz-nota { margin: 8px 0 0; color: var(--muted-2); font-size: var(--t-micro); }
.viz-tabela { margin: 10px 0 8px; }
.viz-tabela summary { cursor: pointer; color: var(--muted); font-size: var(--t-label); padding: 6px 0; }
.viz-tabela summary:hover { color: var(--text); }
.viz-tabela .table td a { color: var(--text-2); }
.viz-tip { position: fixed; z-index: 50; pointer-events: none; max-width: 300px; display: grid; gap: 3px; padding: 9px 11px; border-radius: 10px; background: var(--cta-bg); color: var(--cta-text); font-size: var(--t-label); line-height: 1.4; box-shadow: 0 12px 32px -10px rgba(0, 0, 0, .55); }
.viz-tip strong { font-weight: 600; }
.viz-tip-fonte { opacity: .7; }

/* Mapa (bolhas) */
.mapa-svg { display: block; overflow: visible; font-family: var(--sans); }
.mapa-col { text-anchor: middle; fill: var(--text); font-size: 13px; font-weight: 600; }
.mapa-linha { fill: var(--muted); font-size: 11.5px; font-weight: 500; }
.mapa-vazio { text-anchor: middle; fill: var(--muted-3); font-size: 12px; }
.mapa-div { stroke: var(--line-2); stroke-width: 1; }
.fill-programa { fill: var(--serie-programa); }
.fill-fora { fill: var(--serie-fora); }
.stroke-programa { stroke: var(--serie-programa); }
.stroke-fora { stroke: var(--serie-fora); }
.bolha circle:first-child { stroke: var(--surface); stroke-width: 2; transition: opacity var(--hover) var(--ease); }
.bolha .alvo { fill: transparent; stroke: none; }
.bolha:hover circle:first-child, .bolha:focus-visible circle:first-child { opacity: .82; }
.bolha:focus { outline: none; }
.bolha:focus-visible circle:first-child { stroke: var(--text); }
.bolha-nome, .bolha-valor { text-anchor: middle; fill: #fff; pointer-events: none; }
.bolha-nome { font-size: 11.5px; font-weight: 600; }
.bolha-valor { font-size: 11px; font-weight: 500; opacity: .92; }

/* Ranking (barras divergentes) */
.rk-eixo { display: grid; grid-template-columns: minmax(140px, 32%) 1fr 1fr; gap: 0 10px; font-size: var(--t-micro); color: var(--muted-2); margin-bottom: 6px; }
.rk-eixo span:first-child { grid-column: 2; text-align: right; padding-right: 8px; }
.rk-eixo span:last-child { padding-left: 8px; }
.rk-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rk-linha { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 10px; align-items: center; padding: 5px 4px; border-radius: 8px; outline: none; }
.rk-linha:hover, .rk-linha:focus-visible { background: rgba(var(--ink), .05); }
.rk-nome { font-size: 13px; color: var(--text-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rk-barras { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.rk-barras::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--line-3); }
.rk-lado { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.rk-barras.esquerda .rk-lado:first-child { flex-direction: row-reverse; }
.rk-bar { height: 16px; min-width: 3px; border-radius: 0 4px 4px 0; flex: none; max-width: calc(100% - 64px); }
.rk-barras.esquerda .rk-bar { border-radius: 4px 0 0 4px; }
.rk-bar.programa { background: var(--serie-programa); }
.rk-bar.fora { background: var(--serie-fora); }
.rk-bar.pontual.programa { background: repeating-linear-gradient(45deg, var(--serie-programa) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--serie-programa); }
.rk-bar.pontual.fora { background: repeating-linear-gradient(45deg, var(--serie-fora) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--serie-fora); }
.rk-val { font-size: var(--t-micro); color: var(--text-2); white-space: nowrap; }

/* Gasto por área (halteres) */
.hb-painel + .hb-painel { margin-top: 18px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.hb-titulo { margin: 0 0 8px; font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 600; }
.hb-linha { display: grid; grid-template-columns: minmax(120px, 22%) 1fr minmax(130px, auto); gap: 12px; align-items: center; padding: 6px 4px; border-radius: 8px; outline: none; }
.hb-linha:hover, .hb-linha:focus-visible { background: rgba(var(--ink), .05); }
.hb-nome { font-size: 13px; color: var(--text-2); }
.hb-trilho { position: relative; height: 14px; }
.hb-trilho::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.hb-ligacao { position: absolute; top: calc(50% - 1px); height: 2px; background: var(--muted-3); }
.hb-ponto { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; }
.hb-ponto.antes { background: var(--surface); box-shadow: inset 0 0 0 2px var(--muted-2); }
.hb-ponto.depois { background: var(--text); box-shadow: 0 0 0 2px var(--surface); }
.hb-val { font-size: 13px; color: var(--text); white-space: nowrap; text-align: right; }
.hb-var { font-size: var(--t-micro); color: var(--muted); }

@media (max-width: 640px) {
  .rk-eixo { grid-template-columns: 1fr 1fr; }
  .rk-eixo span:first-child { grid-column: 1; }
  .rk-linha { grid-template-columns: 1fr; gap: 4px; }
  .hb-linha { grid-template-columns: 1fr auto; }
  .hb-trilho { grid-column: 1 / -1; grid-row: 2; }
  .kpi-valor { font-size: 24px; }
}
.hb-alertas { list-style: none; margin: 16px 0 0; padding: 12px 0 0; box-shadow: inset 0 1px 0 var(--line); display: grid; gap: 6px; font-size: var(--t-label); color: var(--muted); line-height: 1.45; }
.hb-alertas strong { color: var(--text-2); font-weight: 500; }
.viz-tip-alerta { opacity: .85; font-size: var(--t-micro); }
.sw.revogada { background: var(--muted-2); opacity: .35; box-shadow: inset 0 0 0 1px var(--muted-2); }
.bolha.revogada circle:first-child { opacity: .35; }
.bolha.revogada:hover circle:first-child, .bolha.revogada:focus-visible circle:first-child { opacity: .55; }
.rk-bar.revogada { opacity: .35; }
.kpi-valor.menor { font-size: 24px; }

/* ---------- Página inicial (resumo) ---------- */
.resumo .hero h1 { font-size: clamp(34px, 6vw, 52px); }
.resumo .hero p { font-size: 17px; }
.rs-bloco { margin: 44px 0 0; }
.rs-titulo { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -.01em; margin: 0 0 14px; }
.rs-num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 15px/1 var(--sans); background: var(--text); color: var(--bg); }
.rs-frase { font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 70ch; margin: 0 0 16px; }
.rs-frase strong { color: var(--text); font-weight: 600; }
.t-ok { color: var(--done) !important; } .t-parcial { color: var(--partial) !important; } .t-nao { color: var(--fail) !important; }
.rs-barra { display: flex; gap: 3px; height: 46px; border-radius: 14px; overflow: hidden; }
.rs-seg { display: flex; align-items: center; justify-content: center; min-width: 46px; color: var(--bg); font-size: 15px; }
.rs-seg b { font-weight: 600; }
.rs-seg.ok { background: var(--done); } .rs-seg.parcial { background: var(--partial); } .rs-seg.nao { background: var(--fail); }
.rs-barra-legenda { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.rs-barra-legenda span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; white-space: pre; }
.rs-sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.rs-sw.ok { background: var(--done); } .rs-sw.parcial { background: var(--partial); } .rs-sw.nao { background: var(--fail); }
.rs-duas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 22px; }
.rs-card { padding: 22px 24px; display: flex; flex-direction: column; }
.rs-card-titulo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0; }
.rs-icone { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 700 15px/1 var(--sans); color: var(--bg); flex: none; }
.rs-icone.ok { background: var(--done); } .rs-icone.nao { background: var(--fail); }
.rs-card-sub { color: var(--muted); font-size: 14px; margin: 8px 0 10px; }
.rs-lista { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; color: var(--text); }
.rs-lista li::marker { color: var(--muted-3); }
.rs-mais { display: inline-block; margin-top: 12px; color: var(--text); font-weight: 500; font-size: 14px; text-decoration-color: var(--line-3); }
.rs-card .rs-mais { margin-top: auto; }
.rs-fora { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rs-fora li { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.rs-fora-texto { font-size: 15px; line-height: 1.45; color: var(--text); }
.rs-fora-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rs-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.rs-numero { padding: 20px 22px; display: grid; gap: 8px; }
.rs-numero strong { font: 600 28px/1.15 var(--sans); letter-spacing: -.02em; color: var(--text); }
.rs-numero span { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.rs-indicadores { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rs-ind { padding: 16px 18px; display: grid; gap: 6px; }
.rs-ind-nome { font-size: 14px; color: var(--text-2); font-weight: 500; }
.rs-ind-valores { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rs-ind-antes { color: var(--muted); font-size: 17px; }
.rs-ind-seta { color: var(--muted-3); }
.rs-ind-valores strong { font: 600 24px/1.1 var(--sans); color: var(--text); letter-spacing: -.01em; }
.rs-ind-ref { font-size: var(--t-micro); color: var(--muted-2); }
.rs-ind-aval { justify-self: start; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: rgba(var(--ink), .07); color: var(--text-2); }
.rs-ind-aval.melhorou { background: var(--done-soft); color: var(--done); }
.rs-ind-aval.piorou { background: var(--fail-soft); color: var(--fail); }
.rs-proximos { padding: 22px 24px; display: grid; gap: 12px; }
.rs-proximos p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; max-width: 70ch; }
.rs-prox-num { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rs-prox-num strong { font: 600 36px/1 var(--sans); letter-spacing: -.02em; }
.rs-prox-num span { color: var(--text-2); font-size: 15px; }
.rs-proximos .btn { justify-self: start; }
.rs-imposto { display: grid; gap: 8px; padding: 26px 24px; text-decoration: none; text-align: center; color: var(--text); }
.rs-imposto:hover { box-shadow: var(--card-ring), 0 0 0 1px rgba(var(--ink), .2); }
.rs-imposto-rotulo { color: var(--text-2); font-size: 15px; }
.rs-imposto-valor { font: 600 clamp(26px, 5.6vw, 46px)/1.1 var(--sans); letter-spacing: -.02em; }
.rs-imposto-sub { color: var(--muted); font-size: 13px; }
.rs-rodape { margin: 40px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 80ch; }
@media (max-width: 760px) {
  .rs-duas { grid-template-columns: 1fr; }
  .rs-frase, .resumo .hero p { font-size: 16px; }
  .rs-seg { font-size: 13px; min-width: 38px; }
}

/* Modal de apoio: chamada para anunciar */
.apoio-anunciar { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.apoio-anunciar p { margin: 0; color: var(--muted); font-size: 14px; }

/* Herança: selo dos indicadores atualizados automaticamente */
.ind-auto { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font: 500 11px/1.6 var(--sans); vertical-align: middle; white-space: nowrap; }
