:root {
  --ink: #15201c;
  --muted: #60706a;
  --paper: #f4f4ee;
  --card: #fff;
  --line: #d9dfda;
  --green: #087154;
  --green-dark: #0b382d;
  --mint: #dff3e9;
  --lime: #c9f36a;
  --amber: #9a5b08;
  --red: #9d2c2c;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c4a;
  --shadow: 0 20px 60px rgba(18, 38, 30, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.topbar { min-height: 72px; background: rgba(13, 34, 27, .97); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px)/2)); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.brand { color: #fff; text-decoration: none; font-weight: 850; letter-spacing: -.025em; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.brand-icon { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; flex: 0 0 auto; }
.brand-name { color: #fff; font-weight: 850; }
.brand-name span { font-weight: 400; color: #a9c7ba; }
.topbar nav { display: flex; gap: 22px; align-items: center; }
.desktop-nav { display: flex; gap: 22px; align-items: center; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; border: 1px solid #77968a; border-radius: 999px; padding: 6px 14px; color: #dce8e3; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav > div { position: absolute; top: calc(100% + 12px); right: 0; min-width: 190px; display: grid; gap: 2px; padding: 10px; border: 1px solid #48675c; border-radius: 14px; background: var(--green-dark); box-shadow: var(--shadow); }
.mobile-nav > div a, .mobile-nav > div button { display: block; width: 100%; padding: 10px 12px; text-align: left; border-radius: 8px; }
.mobile-nav > div a:hover, .mobile-nav > div button:hover { background: rgba(255, 255, 255, .08); }
.topbar nav a, .link-button { color: #dce8e3; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.topbar nav a:hover, .link-button:hover { color: #fff; }
.topbar form { margin: 0; }
.nav-contact { border: 1px solid rgba(37, 211, 102, .55); border-radius: 999px; padding: 7px 15px; color: #d9ffe6 !important; }
.nav-contact:hover { background: rgba(37, 211, 102, .12); }
.container { max-width: 1240px; margin: 0 auto; padding: 54px 24px 84px; }

.eyebrow { text-transform: uppercase; letter-spacing: .15em; color: var(--green); font-size: .74rem; font-weight: 850; margin: 0 0 8px; }
.hero { min-height: 330px; display: grid; grid-template-columns: 1.2fr .7fr; gap: 80px; align-items: center; padding: 28px 0 54px; }
.hero h1 { font-size: clamp(3rem, 7vw, 6.3rem); line-height: .94; letter-spacing: -.07em; margin: 0; max-width: 900px; }
.hero h1 span { color: var(--green); }
.hero-copy { color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.3rem); margin: 38px 0 0; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.module-grid-public { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-card { min-height: 390px; display: flex; flex-direction: column; position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); text-decoration: none; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.module-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #b9c8c0; }
.module-featured { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.module-index { font-size: .78rem; color: var(--muted); font-weight: 800; letter-spacing: .1em; }
.module-featured .module-index, .module-featured p { color: #afd0c1; }
.module-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--mint); color: var(--green-dark); font-size: 1.8rem; margin: 38px 0 28px; }
.module-featured .module-icon { background: var(--lime); }
.module-card h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.08; letter-spacing: -.04em; margin: 0 0 16px; }
.module-card p { color: var(--muted); margin: 0 0 24px; }
.module-link { margin-top: auto; font-weight: 800; color: var(--green); }
.module-featured .module-link { color: var(--lime); }
.module-link b { float: right; font-size: 1.3rem; }
.source-note { display: grid; grid-template-columns: 180px 1fr; gap: 30px; margin-top: 24px; border-top: 1px solid var(--line); padding: 28px 4px; }
.source-note p { margin: 0; color: var(--muted); max-width: 760px; }
.contact-card { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; margin-top: 18px; padding: 30px; border-radius: 22px; background: var(--green-dark); color: #fff; box-shadow: var(--shadow); }
.contact-card h2 { margin: 0; max-width: 720px; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.08; letter-spacing: -.035em; }
.contact-card p:not(.eyebrow) { color: #bdd5ca; margin: 12px 0 0; max-width: 760px; }
.contact-card .eyebrow { color: var(--lime); }
.whatsapp-button { display: grid; gap: 2px; min-width: 230px; padding: 14px 20px; border-radius: 14px; background: var(--whatsapp); color: #062e18; text-decoration: none; text-align: center; font-weight: 850; transition: transform .2s ease, background .2s ease; }
.whatsapp-button:hover { transform: translateY(-2px); background: #36df75; }
.whatsapp-button small { font-weight: 700; opacity: .8; }

.page-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 28px; }
.page-heading h1, .login-card h1, .auth-intro h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1; letter-spacing: -.055em; margin: 0; }
.tool-heading { padding-top: 22px; }
.disclaimer { max-width: 500px; color: var(--muted); margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 34px; }
.metrics article { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.metrics strong { font-size: 2rem; display: block; }
.metrics span { color: var(--muted); }

.auth-shell { min-height: 66vh; display: grid; grid-template-columns: 1fr minmax(360px, 480px); gap: 90px; align-items: center; }
.auth-intro > p { color: var(--muted); font-size: 1.1rem; max-width: 600px; }
.privacy-mini { border-left: 3px solid var(--green); padding: 12px 0 12px 18px; color: var(--muted); max-width: 650px; margin-top: 30px; }
.auth-card, .login-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 32px; }
.provider-button { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid #bac4bf; border-radius: 12px; margin-bottom: 12px; text-decoration: none; font-weight: 750; background: #fff; }
.provider-dark { background: #111; color: #fff; border-color: #111; }
.provider-mark { width: 24px; font-weight: 900; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 22px 0; }
.auth-divider:before, .auth-divider:after { content: ""; height: 1px; background: var(--line); flex: 1; }
.compact-stack { margin-top: 0 !important; }
.compact-stack small { color: var(--muted); margin-top: -10px; }
.setup-state { background: #eef4f0; border-radius: 14px; padding: 20px; }
.setup-state p { color: var(--muted); margin-bottom: 0; }
.team-access { display: block; text-align: center; color: var(--muted); font-size: .88rem; margin-top: 22px; }
.login-card { max-width: 480px; margin: 7vh auto; }
.login-card > p:not(.eyebrow) { color: var(--muted); }
.stack { display: grid; gap: 18px; margin-top: 24px; }
.stack label, .filter-bar label { display: grid; gap: 7px; font-weight: 750; }
.stack input, .filter-bar select { width: 100%; border: 1px solid #aeb8b3; border-radius: 10px; padding: 12px; font: inherit; background: #fff; }

.filter-bar { display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 1fr) minmax(190px, 1fr) auto; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.filter-bar > button { align-self: end; }
.filter-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.filter-context { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .82rem; padding: 12px 4px 0; }
.data-notice { margin: 18px 0 26px; padding: 15px 18px; border-radius: 12px; background: #eef4f0; color: #365148; }
.asset-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.asset-summary article { min-width: 0; background: var(--green-dark); color: #fff; border-radius: 16px; padding: 18px 20px; }
.asset-summary strong { display: block; color: var(--lime); font-size: 1.7rem; line-height: 1; }
.asset-summary span { display: block; color: #c5d8d0; font-size: .82rem; margin-top: 7px; }
.asset-list { display: grid; gap: 16px; }
.asset-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.asset-card header { display: flex; justify-content: space-between; gap: 20px; }
.asset-card h2 { font-size: 1.7rem; line-height: 1; margin: 8px 0; letter-spacing: -.04em; }
.asset-card header p, .asset-card footer { color: var(--muted); margin: 0; }
.party, .candidate-status { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; color: var(--green); }
.candidate-status { align-self: start; padding: 7px 10px; border-radius: 999px; background: var(--mint); }
.asset-values { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.asset-values > div { padding: 18px; }
.asset-values > div + div { border-left: 1px solid var(--line); }
.asset-values span { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 5px; }
.asset-values strong { font-size: 1.08rem; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.delta-chip { display: inline-flex; width: max-content; border-radius: 999px; background: #edf3ef; padding: 3px 8px; margin-top: 8px; font-size: .75rem; font-weight: 800; }
.delta-chip.positive { background: var(--mint); }
.delta-chip.negative { background: #f9e5e5; }
.delta-chip.neutral { color: var(--muted); }
.asset-card footer { display: flex; justify-content: space-between; margin-top: 16px; font-size: .82rem; }
.asset-card footer a { color: var(--green); font-weight: 700; }
.asset-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
.asset-actions .detail-link { color: #fff; background: var(--green); border-radius: 999px; padding: 5px 11px; text-decoration: none; }
.back-link { display: inline-block; color: var(--green); font-weight: 750; margin: 4px 0 30px; }
.detail-heading { align-items: center; }
.candidate-full-name { color: var(--muted); margin: 10px 0 0; }
.detail-comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.detail-comparison article { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.detail-comparison span, .detail-comparison small { display: block; color: var(--muted); }
.detail-comparison strong { display: block; font-size: 1.35rem; margin-top: 6px; }
.detail-comparison small { margin-top: 5px; font-weight: 750; }
.declaration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.declaration-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.declaration-card > header { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); }
.declaration-card h2 { margin: 0; font-size: 1.45rem; }
.declaration-card > header > strong { white-space: nowrap; }
.declaration-card footer { padding: 16px 22px; border-top: 1px solid var(--line); }
.declaration-card footer a { color: var(--green); font-weight: 750; }
.asset-table-wrap { overflow-x: auto; }
.asset-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.asset-table th { color: var(--muted); text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.asset-table th, .asset-table td { padding: 15px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
.asset-table th:last-child, .asset-table td:last-child { text-align: right; white-space: nowrap; }
.asset-table td span { display: block; color: var(--muted); margin-top: 4px; }
.no-assets { color: var(--muted); padding: 24px 22px; margin: 0; }
.chart-panel, .compare-panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.chart-header { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.chart-header h2, .compare-panel h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.04em; margin: 0; }
.chart-header p:not(.eyebrow) { color: var(--muted); margin: 8px 0 0; }
.metric-form { min-width: 250px; }
.metric-form label, .compare-form label { display: grid; gap: 6px; font-weight: 750; }
.metric-form select, .compare-form select { width: 100%; border: 1px solid #aeb8b3; border-radius: 10px; padding: 11px; background: #fff; font: inherit; }
.chart-explainer { background: #eef4f0; color: #365148; border-radius: 12px; padding: 13px 15px; margin: 24px 0; }
.party-chart { display: grid; gap: 18px; }
.party-bar { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 18px; align-items: center; }
.party-bar-label { display: grid; }
.party-bar-label span { color: var(--muted); font-size: .78rem; }
.party-bar-measure { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(120px, auto); align-items: center; gap: 14px; }
.party-bar progress { width: 100%; height: 18px; border: 0; border-radius: 5px; overflow: hidden; background: #e5ebe8; }
.party-bar progress::-webkit-progress-bar { background: #e5ebe8; border-radius: 5px; }
.party-bar progress::-webkit-progress-value { background: var(--green); border-radius: 5px; }
.party-bar progress::-moz-progress-bar { background: var(--green); border-radius: 5px; }
.party-bar-measure > strong { text-align: right; font-variant-numeric: tabular-nums; }
.chart-source { color: var(--muted); font-size: .78rem; margin: 24px 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.compare-form { display: grid; grid-template-columns: .8fr 1fr 1fr auto; gap: 12px; align-items: end; margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #f8f9f6; }
.comparison-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.comparison-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.comparison-card h3 { font-size: 1.55rem; margin: 6px 0; }
.comparison-card > p { color: var(--muted); }
.comparison-card dl { margin: 18px 0; border-top: 1px solid var(--line); }
.comparison-card dl div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.comparison-card dt { color: var(--muted); }
.comparison-card dd { margin: 0; text-align: right; font-weight: 800; }
.comparison-card a { color: var(--green); font-weight: 750; }
.workbench-empty { min-height: 230px; display: flex; align-items: center; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.workbench-empty h2 { margin: 0 0 5px; }
.workbench-empty p { margin: 0; color: var(--muted); }
.status-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 8px var(--mint); flex: 0 0 auto; }
.status-dot.waiting { background: #c18a27; box-shadow: 0 0 0 8px #fbefda; }

.amendment-filter { display: grid; grid-template-columns: 1.15fr 1.35fr 1.15fr .8fr .9fr auto; gap: 12px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 12px 34px rgba(18, 38, 30, .05); }
.amendment-filter label, .amendment-filter .filter-field { min-width: 0; display: grid; gap: 7px; font-weight: 780; }
.amendment-filter .filter-field > label { display: block; }
.amendment-filter label > span { font-size: .84rem; }
.amendment-filter input, .amendment-filter select { width: 100%; min-height: 48px; border: 1px solid #aeb8b3; border-radius: 11px; padding: 10px 12px; background: #fff; color: var(--ink); font: inherit; }
.amendment-filter small { min-height: 2.6em; color: var(--muted); font-size: .7rem; font-weight: 450; line-height: 1.3; }
.amendment-filter > button { min-height: 48px; white-space: nowrap; margin-bottom: 2.6em; }
.mandate-period { min-height: 89px; display: grid; align-content: start; gap: 3px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #f1f6f3; }
.mandate-period > span { font-size: .72rem; color: var(--muted); }
.mandate-period > strong { color: var(--green-dark); }
.mandate-period > small { color: var(--muted); font-size: .7rem; line-height: 1.25; }
.evidence-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin: 16px 0 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.evidence-legend p { margin: 0; padding: 13px 15px; background: #f8faf7; color: var(--muted); font-size: .78rem; }
.evidence-legend b { color: var(--ink); }
.amendment-summary { display: grid; grid-template-columns: .7fr repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
.amendment-summary article { background: var(--green-dark); color: #fff; border-radius: 15px; padding: 17px 18px; }
.amendment-summary article.paid { background: var(--green); }
.amendment-summary span { display: block; color: #bcd2c9; font-size: .75rem; }
.amendment-summary strong { display: block; margin-top: 5px; color: #fff; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.amendment-list { display: grid; gap: 16px; }
.amendment-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 21px; box-shadow: 0 13px 36px rgba(18, 38, 30, .055); }
.amendment-card > header { display: flex; justify-content: space-between; gap: 18px; padding: 22px 24px 18px; }
.amendment-card h2 { margin: 8px 0 3px; font-size: 1.55rem; letter-spacing: -.035em; line-height: 1.05; }
.amendment-card header p { margin: 0; color: var(--muted); }
.sphere-tag, .year-tag, .stage-badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: .69rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.sphere-tag { background: var(--mint); color: var(--green); }
.sphere-tag.estadual { background: #e8edf7; color: #31507d; }
.year-tag { margin-left: 5px; background: #eef0ed; color: var(--muted); }
.stage-badge { align-self: start; background: #f5ead9; color: #79500c; white-space: nowrap; }
.stage-badge.stage-pago { background: var(--mint); color: var(--green); }
.stage-badge.stage-liquidado { background: #e8f1f6; color: #235b73; }
.amendment-destination { display: grid; grid-template-columns: .8fr 1.1fr 1.5fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.amendment-destination > div { padding: 17px 24px; }
.amendment-destination > div + div { border-left: 1px solid var(--line); }
.amendment-destination span, .amendment-destination small, .money-flow span { display: block; color: var(--muted); font-size: .72rem; }
.amendment-destination strong { display: block; margin-top: 3px; line-height: 1.3; }
.amendment-destination small { margin-top: 5px; }
.money-flow { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 24px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.money-flow > div { padding: 14px 16px; }
.money-flow > div + div { border-left: 1px solid var(--line); }
.money-flow .paid { background: #eff8f4; }
.money-flow strong { display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.execution-proof { margin: 0 24px 18px; padding: 13px 15px; border-left: 3px solid #d4932b; background: #fff7e9; color: #65491c; font-size: .84rem; }
.amendment-card footer { display: flex; justify-content: space-between; gap: 18px; padding: 15px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.amendment-card footer a { color: var(--green); font-weight: 780; }
.official-sources-note { margin: 24px 4px 0; color: var(--muted); font-size: .78rem; }

.legislative-filter { display: grid; grid-template-columns: 1.05fr 1.3fr 1fr 1.15fr .65fr auto; gap: 12px; align-items: end; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(18, 38, 30, .05); }
.legislative-filter label, .legislative-filter .filter-field { min-width: 0; display: grid; gap: 7px; font-weight: 780; }
.legislative-filter .filter-field > label { display: block; }
.legislative-filter label > span { font-size: .84rem; }
.legislative-filter select, .legislative-filter input[type="search"] { width: 100%; min-height: 48px; border: 1px solid #aeb8b3; border-radius: 11px; padding: 10px 12px; background: #fff; color: var(--ink); font: inherit; }
.searchable-combobox { position: relative; display: block; min-width: 0; }
.combobox-options { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; left: 0; max-height: min(340px, 52vh); overflow-y: auto; padding: 6px; border: 1px solid #aeb8b3; border-radius: 13px; background: #fff; box-shadow: 0 18px 42px rgba(18, 38, 30, .18); }
.combobox-options[hidden], .combobox-options button[hidden] { display: none; }
.combobox-options button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 9px; padding: 10px 11px; background: transparent; color: var(--ink); text-align: left; font: inherit; font-weight: 720; cursor: pointer; }
.combobox-options button:hover, .combobox-options button.active { background: var(--mint); color: var(--green-dark); }
.combobox-options button small { min-height: 0; color: var(--green); font-size: .7rem; font-weight: 850; }
.legislative-filter small { min-height: 3.8em; color: var(--muted); font-size: .7rem; font-weight: 450; line-height: 1.3; }
.legislative-filter > button { min-height: 48px; margin-bottom: 3.8em; white-space: nowrap; }
.legislative-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.legislative-legend p { margin: 0; padding: 14px 16px; background: #f8faf7; color: var(--muted); font-size: .78rem; }
.legislative-legend b { color: var(--ink); }
.legislative-legend.state-source { grid-template-columns: repeat(2, 1fr); }
.legislative-profile { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.legislative-profile img { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; background: #edf2ef; }
.legislative-profile span, .legislative-profile p { color: var(--muted); font-size: .8rem; }
.legislative-profile h2, .legislative-profile p { margin: 2px 0; }
.legislative-profile a { color: var(--green); font-weight: 780; }
.legislative-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.legislative-summary.state-source { grid-template-columns: minmax(220px, 360px); }
.legislative-summary article { min-width: 0; padding: 17px 18px; border-radius: 15px; background: var(--green-dark); color: #fff; }
.legislative-summary article.norm { background: var(--green); }
.legislative-summary span { display: block; color: #bcd2c9; font-size: .75rem; }
.legislative-summary strong { display: block; margin-top: 5px; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.attendance-panel { position: relative; overflow: hidden; margin: 24px 0; border: 1px solid #bcd6c9; border-radius: 24px; padding: clamp(20px, 4vw, 34px); background: linear-gradient(145deg, #f7fbf8 0%, #edf7f1 100%); box-shadow: 0 16px 40px rgba(18, 38, 30, .07); }
.attendance-panel:before { content: ""; position: absolute; width: 240px; height: 240px; top: -145px; right: -90px; border-radius: 50%; background: rgba(154, 211, 177, .24); }
.attendance-heading { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 126px; gap: 24px; align-items: center; }
.attendance-heading h2 { margin: 2px 0 8px; font-size: clamp(1.75rem, 3vw, 2.55rem); letter-spacing: -.045em; }
.attendance-heading p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); }
.attendance-mascot { justify-self: end; width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 10px 13px rgba(18, 38, 30, .14)); transform-origin: 50% 85%; animation: mascot-dance 2.4s ease-in-out infinite; }
@keyframes mascot-dance { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-6px); } }
.attendance-years { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.attendance-year { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.attendance-year > header { display: flex; justify-content: space-between; gap: 14px; align-items: start; padding: 18px 18px 14px; }
.attendance-year-number { display: block; font-size: 1.75rem; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.partial-badge { display: inline-flex; margin-top: 8px; border-radius: 999px; padding: 4px 7px; background: #fff2d9; color: #73500f; font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.attendance-scale { flex: 0 0 auto; min-width: 88px; border-radius: 14px; padding: 9px 11px; background: var(--green-dark); color: #fff; text-align: center; }
.attendance-scale span { display: block; color: #bdd4ca; font-size: .57rem; text-transform: uppercase; letter-spacing: .06em; }
.attendance-scale strong { display: block; margin-top: 2px; color: var(--lime); font-size: 1.45rem; line-height: 1; }
.attendance-rate { display: grid; padding: 0 18px 16px; }
.attendance-rate strong { font-size: 1.75rem; color: var(--green); font-variant-numeric: tabular-nums; }
.attendance-rate span { color: var(--muted); font-size: .72rem; }
.attendance-counts { margin: 0; border-top: 1px solid var(--line); }
.attendance-counts div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 18px; border-bottom: 1px solid var(--line); }
.attendance-counts dt { color: var(--muted); font-size: .74rem; }
.attendance-counts dd { margin: 0; font-weight: 850; font-variant-numeric: tabular-nums; }
.attendance-year footer { display: grid; gap: 5px; padding: 13px 18px 16px; color: var(--muted); font-size: .68rem; }
.attendance-year footer a { color: var(--green); font-weight: 780; }
.attendance-method { position: relative; z-index: 1; margin-top: 16px; border-top: 1px solid #c9ded3; padding-top: 14px; color: var(--muted); font-size: .78rem; }
.attendance-method summary { width: max-content; max-width: 100%; color: var(--green-dark); font-weight: 800; cursor: pointer; }
.attendance-method p { max-width: 980px; margin-bottom: 0; }
.attendance-empty { position: relative; z-index: 1; margin-top: 20px; border: 1px dashed #98b8a8; border-radius: 15px; padding: 18px; background: rgba(255, 255, 255, .72); }
.attendance-empty p { margin: 5px 0 0; color: var(--muted); }
.legislative-list { display: grid; gap: 15px; }
.legislative-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 13px 36px rgba(18, 38, 30, .055); }
.legislative-card > header { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding: 20px 22px 0; }
.proposal-type, .author-role, .result-badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: .69rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.proposal-type { background: var(--green-dark); color: #fff; }
.author-role { margin-left: 5px; background: var(--mint); color: var(--green); }
.result-badge { background: #eef0ed; color: var(--muted); text-align: center; }
.result-badge.result-em_tramitacao { background: #e8f1f6; color: #235b73; }
.result-badge.result-aprovado_casa { background: #edf3e0; color: #526e13; }
.result-badge.result-transformado_norma { background: var(--mint); color: var(--green); }
.result-badge.result-rejeitado, .result-badge.result-retirado { background: #f9e5e5; color: var(--red); }
.legislative-card > h2 { margin: 18px 22px; max-width: 1000px; font-size: clamp(1.1rem, 2vw, 1.42rem); line-height: 1.35; letter-spacing: -.02em; }
.legislative-card dl { margin: 0; border-top: 1px solid var(--line); }
.legislative-card dl div { display: grid; grid-template-columns: minmax(140px, .35fr) 1fr; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.legislative-card dt { color: var(--muted); font-size: .78rem; }
.legislative-card dd { margin: 0; font-weight: 700; }
.legislative-card footer { display: flex; justify-content: space-between; gap: 18px; padding: 15px 22px; color: var(--muted); font-size: .78rem; }
.legislative-card footer div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
.legislative-card footer a { color: var(--green); font-weight: 780; }

.review-card, .approved-card, .empty { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.review-card { padding: 26px; margin: 0 0 24px; }
.review-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; align-items: center; }
.pill { background: #e5f0eb; color: var(--green-dark); border-radius: 999px; padding: 4px 10px; font-weight: 700; }
.original { margin: 22px 0; }
.label { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.original blockquote { font-size: 1.2rem; border-left: 4px solid var(--green); margin: 8px 0 12px; padding: 8px 0 8px 18px; }
.original a, .sources a, .approved-card a { color: var(--green-dark); }
.alert { padding: 14px 16px; border: 1px solid #e2bd83; background: #fff7e9; color: #6d4207; border-radius: 10px; margin: 16px 0; }
.variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.variant { border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.variant-number { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #10221b; color: #fff; margin-right: 9px; }
.variant p, .final-text { white-space: pre-wrap; }
.primary, .secondary, .danger { border: 0; border-radius: 10px; padding: 12px 16px; font: inherit; font-weight: 780; cursor: pointer; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: var(--green-dark); }
.secondary { background: #e5ebe8; color: var(--ink); }
.danger { background: #f7e6e6; color: var(--red); }
.sources { margin: 18px 0; }
.manual-actions { border-top: 1px solid var(--line); padding-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; }
.edit-form label { display: grid; gap: 7px; font-weight: 700; }
.edit-form textarea { width: 100%; border: 1px solid #aeb8b3; border-radius: 9px; padding: 11px; font: inherit; background: #fff; }
.edit-form button { margin-top: 9px; }
.flash { padding: 12px 15px; border-radius: 9px; margin-bottom: 18px; }
.flash.sucesso { background: #e1f2e9; color: #14583f; }
.flash.erro { background: #f9e5e5; color: #822; }
.approved-list { display: grid; gap: 16px; }
.approved-card { padding: 22px; }
.final-text { font-size: 1.12rem; }
.approved-card footer { color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.site-footer { max-width: 1240px; margin: 0 auto; border-top: 1px solid var(--line); padding: 26px 24px 40px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .86rem; }
.site-footer a { color: var(--green); font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; }
.whatsapp-fab { position: fixed; right: 22px; bottom: 22px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 11px; border-radius: 999px; background: var(--whatsapp); color: #06351c; text-decoration: none; font-size: .88rem; font-weight: 850; box-shadow: 0 12px 34px rgba(9, 88, 43, .28); transition: transform .2s ease, box-shadow .2s ease; }
.whatsapp-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(9, 88, 43, .34); }
.whatsapp-fab-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--whatsapp-dark); font-size: .68rem; letter-spacing: -.04em; }
.consent-banner { position: fixed; left: 22px; right: 22px; bottom: 20px; z-index: 30; max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 20px 22px; border: 1px solid #36574a; border-radius: 18px; background: #0d2d22; color: #fff; box-shadow: 0 20px 60px rgba(4, 25, 17, .3); }
.consent-banner[hidden] { display: none; }
.consent-banner strong { display: block; font-size: 1.05rem; }
.consent-banner p { margin: 5px 0 0; color: #c6d9d0; font-size: .9rem; line-height: 1.45; }
.consent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.consent-actions button { white-space: nowrap; }
.policy-card { max-width: 820px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(26px, 6vw, 64px); box-shadow: var(--shadow); }
.policy-card h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.055em; line-height: 1; margin: 0 0 22px; }
.policy-card h2 { font-size: 1.15rem; margin: 30px 0 5px; }
.policy-card p { color: var(--muted); }
.policy-lead { font-size: 1.2rem; }

@media (max-width: 900px) {
  .module-grid { grid-template-columns: 1fr 1fr; }
  .module-grid-public { grid-template-columns: 1fr 1fr; }
  .module-featured { grid-column: auto; }
  .auth-shell { grid-template-columns: 1fr; gap: 36px; }
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { max-width: 700px; }
  .declaration-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar > button { width: 100%; }
  .compare-form { grid-template-columns: 1fr 1fr; }
  .amendment-filter { grid-template-columns: 1fr 1fr; }
  .amendment-filter > button { width: 100%; margin-bottom: 0; }
  .amendment-summary { grid-template-columns: repeat(3, 1fr); }
  .legislative-filter { grid-template-columns: 1fr 1fr; }
  .legislative-filter > button { width: 100%; margin-bottom: 0; }
  .legislative-summary { grid-template-columns: repeat(3, 1fr); }
  .attendance-years { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .topbar { padding: 0 16px; min-height: 64px; }
  .brand-name > span { display: none; }
  .topbar nav { gap: 12px; font-size: .86rem; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .container { padding: 30px 16px 60px; }
  .hero { min-height: auto; padding: 24px 0 42px; }
  .hero h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .module-grid { grid-template-columns: 1fr; }
  .module-grid-public { grid-template-columns: 1fr; }
  .module-featured { grid-column: auto; }
  .module-card { min-height: 330px; padding: 24px; }
  .source-note { grid-template-columns: 1fr; gap: 6px; }
  .page-heading { display: block; }
  .disclaimer { margin-top: 16px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .variants, .manual-actions { grid-template-columns: 1fr; }
  .review-card { padding: 19px; }
  .auth-card, .login-card { padding: 24px; }
  .filter-bar, .asset-values, .asset-summary, .detail-comparison, .compare-form, .comparison-cards { grid-template-columns: 1fr; }
  .filter-bar { gap: 12px; padding: 14px; }
  .asset-values > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .asset-card { padding: 18px; }
  .asset-card h2 { font-size: 1.4rem; }
  .asset-card header, .asset-card footer { display: grid; }
  .asset-actions { justify-content: flex-start; }
  .asset-actions .detail-link { width: 100%; text-align: center; padding: 9px 12px; }
  .declaration-card > header { align-items: start; display: grid; }
  .asset-table th, .asset-table td { padding: 13px 16px; }
  .chart-header { display: grid; }
  .metric-form { min-width: 0; }
  .party-bar { grid-template-columns: 1fr; gap: 7px; }
  .party-bar-measure { grid-template-columns: 1fr; gap: 4px; }
  .party-bar-measure > strong { text-align: left; }
  .amendment-filter, .amendment-summary, .evidence-legend, .amendment-destination, .money-flow, .legislative-filter, .legislative-legend, .legislative-summary { grid-template-columns: 1fr; }
  .amendment-filter small { min-height: 0; }
  .evidence-legend { gap: 0; }
  .evidence-legend p + p, .amendment-destination > div + div, .money-flow > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .amendment-card > header, .amendment-card footer { display: grid; }
  .amendment-card > header, .amendment-destination > div, .amendment-card footer { padding-left: 18px; padding-right: 18px; }
  .money-flow { margin: 14px 18px; }
  .execution-proof { margin: 0 18px 16px; }
  .legislative-filter small { min-height: 0; }
  .legislative-profile { grid-template-columns: auto 1fr; }
  .legislative-profile > a { grid-column: 1 / -1; }
  .attendance-heading { grid-template-columns: 1fr 86px; gap: 10px; }
  .attendance-mascot { width: 82px; height: 82px; }
  .attendance-years { grid-template-columns: 1fr; }
  .legislative-card > header, .legislative-card footer { display: grid; }
  .legislative-card dl div { grid-template-columns: 1fr; gap: 3px; }
  .legislative-card footer div { justify-content: flex-start; }
  .contact-card { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .whatsapp-button { min-width: 0; width: 100%; }
  .site-footer { display: grid; padding-bottom: 92px; }
  .footer-links { display: grid; justify-content: start; }
  .whatsapp-fab { right: 14px; bottom: 14px; padding: 10px; }
  .whatsapp-fab > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .whatsapp-fab-mark { width: 36px; height: 36px; }
  .consent-banner { left: 10px; right: 10px; bottom: 10px; grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .consent-actions { display: grid; grid-template-columns: 1fr; }
  .consent-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .attendance-mascot { animation: none; }
}
