/* Votações · Câmara de Quixadá
   Design tokens first; light + dark are separately chosen steps (not an automatic flip).
   Vote colours (sim/não/abstenção) and the agreement ramp were validated for contrast and colour-blindness. */
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --plane: #f3f5f8;              /* alias used by older rules */
  --ink: #14171c;
  --ink-2: #5a6170;              /* 6.1:1 on white */
  --line: #e5e8ec;
  --line-2: #d3d8df;
  --grid: #e5e8ec;
  --axis: #c2c8d0;
  --border: rgba(16, 24, 40, 0.10);
  --control-border: #767676;     /* form controls: >= 3:1 */
  --link: #1757ac;
  --link-hover: #0e3d7e;
  --accent: #1757ac;
  --accent-soft: #e9f1fc;
  --accent-ink: #ffffff;
  --sim: #257de0; --abst: #8c8c8c; --nao: #ec4647;
  --on-sim: #0b0b0b; --on-abst: #0b0b0b; --on-nao: #0b0b0b;
  --good: #0aac23; --warning: #fbb315; --serious: #f18a59; --critical: #dc3c3d;
  /* agreement heatmap: violet ramp (blue means "Sim"), 5 bins >= 1.5:1 apart */
  --h1: #d3caf6; --h2: #a796ee; --h3: #7b61e5; --h4: #4824db; --h5: #301791;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.05);
  --header-h: 64px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1014; --surface: #171a20; --surface-2: #1d2128; --plane: #1d2128;
    --ink: #e9ecf1; --ink-2: #a3aab6;
    --line: #272b33; --line-2: #343944; --grid: #272b33; --axis: #474d58;
    --border: rgba(255, 255, 255, 0.10);
    --control-border: #7a7a7a;
    --link: #84b9f3; --link-hover: #b6d5f8; --accent: #338ced; --accent-soft: rgba(51, 140, 237, 0.14);
    --accent-ink: #0b0b0b;
    --sim: #338ced; --abst: #666666; --nao: #eb6263;
    --on-sim: #0b0b0b; --on-abst: #ffffff; --on-nao: #0b0b0b;
    --h1: #341a9e; --h2: #4522d3; --h3: #7458e4; --h4: #a796ee; --h5: #d7cff7;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
html:has(.subnav) { scroll-padding-top: calc(var(--header-h) + 70px); }
html:has(.htabs) { scroll-padding-top: calc(var(--header-h) + 62px); }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; font-size: 15.5px; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
table.data a, .grupo a, .who-no a, .item-meta a, .pair-list a, ul.docs a, .pc-links a, .side-link a, .crumbs a, .more-link, .people a, .chips a { text-decoration: none; }
table.data a:hover, .grupo a:hover, .who-no a:hover, .pair-list a:hover, .item-meta a:hover, ul.docs a:hover, .pc-links a:hover, .side-link a:hover, .crumbs a:hover, .more-link:hover { text-decoration: underline; }
table.data a { font-weight: 500; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 1.6em 0 0.5em; letter-spacing: -0.012em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin-top: 0.4em; font-weight: 750; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }
h4 { font-size: 0.95rem; }
p { margin: 0.5em 0 1em; }
code { font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
img { max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 20px; padding-bottom: 56px; min-height: 70vh; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 72ch; }
.hint { flex-basis: 100%; margin: -2px 0 0; color: var(--ink-2); font-size: 0.82rem; }
.mobile-only { display: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.03em; }
.brand-mark.small { width: 24px; height: 24px; border-radius: 7px; font-size: 0.8rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1rem; }
.brand-text span { font-size: 0.78rem; color: var(--ink-2); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current] { background: var(--accent-soft); color: var(--link); font-weight: 650; }
.menu-btn, .search-btn, .gsearch-close { display: none; }
@media (min-width: 641px) { .home .site-header .gsearch { display: none; } }  /* the home hero has its own search */
.filter-toggle { display: none; }
.filter-toggle .n { margin-left: 0.25em; }
.filter-toggle::after { content: "▾" / ""; margin-left: 8px; transition: transform .15s; }
.filter-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.filter-toggle[aria-expanded="true"] { background: var(--accent-soft); }

/* global search (header) */
.gsearch { position: relative; flex: 1 1 280px; max-width: 380px; }
.gsearch input[type="search"] { width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--control-border); border-radius: 999px; padding: 9px 14px 9px 38px; min-height: 42px; }
.gsearch input[type="search"]:focus { background: var(--surface); border-color: var(--link); outline: 2px solid var(--link); outline-offset: 1px; }
.gsearch input::placeholder { color: var(--ink-2); opacity: 1; }
.gsearch input[type="search"]::-webkit-search-cancel-button { display: none; }
.gsearch-icon { position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -8px; border: 2px solid var(--ink-2); border-radius: 50%; pointer-events: none; }
.gsearch-icon::after { content: ""; position: absolute; width: 2px; height: 7px; background: var(--ink-2); right: -4px; bottom: -6px; transform: rotate(-45deg); border-radius: 2px; }
.gsearch-panel { position: absolute; top: calc(100% + 8px); left: 0; right: auto; width: max(100%, 460px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px; z-index: 40; max-height: min(70vh, 560px); overflow: auto; }
.gsearch-panel[hidden] { display: none; }
.gsearch-panel [role="listbox"] { margin: 0; padding: 0; }
.gsearch-panel .grp { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); padding: 10px 10px 4px; }
.gsearch-panel [role="option"] { display: block; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); text-decoration: none; }
.gsearch-panel [role="option"]:hover { background: var(--surface-2); }
.gsearch-panel [role="option"][aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--link); }
.gsearch-panel .opt-title { display: block; font-weight: 600; font-size: 0.93rem; line-height: 1.3; }
.gsearch-panel .opt-sub { display: block; font-size: 0.8rem; color: var(--ink-2); line-height: 1.35; }
.gsearch-foot { margin: 6px 10px; font-size: 0.8rem; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 0.9rem; padding: 28px 0 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; }
.foot-grid > div { max-width: 640px; }
.foot-brand { color: var(--ink); font-weight: 650; margin-top: 0; display: flex; align-items: center; gap: 8px; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* ---------- page head, sections, cards ---------- */
.crumbs { font-size: 0.88rem; color: var(--ink-2); margin: 4px 0 0; }
.crumbs a { color: var(--ink-2); }
.page-head { margin: 8px 0 20px; }
.page-head h1 { margin: 6px 0 6px; }
.page-head .kicker { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.page-head .lede { margin: 6px 0 0; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 24px; margin: 18px 0; }
.section > h2:first-child, .section > header h2, .section > .section-head:first-child h2 { margin-top: 0; }
.section > :last-child { margin-bottom: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.section-head h2 { margin-bottom: 4px; }
.section-head .more-link { font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.hero { padding: 28px 0 4px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px 40px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); max-width: 18ch; margin-bottom: 0.3em; letter-spacing: -0.025em; }
.hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.updated { margin: 6px 0 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 8px 24px; }
.grid2 > * { min-width: 0; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 24px; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--link); color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card h2 { margin: 0 0 0.3em; font-size: 1.05rem; color: var(--link); }
.card p { margin: 0; color: var(--ink-2); }
.feature { display: block; margin: 16px 0 8px; padding: 18px 22px; border-radius: var(--radius); text-decoration: none; color: var(--ink); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.feature strong { display: block; font-size: 1.12rem; color: var(--link); }
.feature span { color: var(--ink-2); }
.feature:hover { border-color: var(--link); color: var(--ink); }

/* notes and collapsible explanations */
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--axis); padding: 12px 16px; border-radius: var(--radius-sm); margin: 14px 0; }
.note.warn { border-left-color: var(--warning); }
.note.small { font-size: 0.92rem; }
details.info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 12px 0; }
.section details.info { background: var(--surface-2); border-color: transparent; }
details.info > div p { max-width: 88ch; }
details.info > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; }
details.info > summary::-webkit-details-marker { display: none; }
details.info > summary::before { content: "i" / ""; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--link); font-size: 0.8rem; font-weight: 800; font-family: Georgia, serif; flex: 0 0 auto; }
details.info > summary::after { content: "▾" / ""; margin-left: auto; color: var(--ink-2); transition: transform .15s; }
details.info[open] > summary::after { transform: rotate(180deg); }
details.info > div { padding: 0 16px 12px 42px; color: var(--ink); font-size: 0.94rem; }
details.info.warn > summary::before { background: color-mix(in srgb, var(--warning) 25%, transparent); color: var(--ink); content: "!" / ""; }
details.more { margin: 12px 0; }
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 14px 0; }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 650; font-size: 1.05rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾" / ""; margin-left: auto; color: var(--ink-2); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > .scroll, details.fold > div { padding: 0 20px 14px; }
details.fold > .items { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 0; }
.fold-note { margin: -6px 20px 10px; }
.ementa-fold { margin: 2px 0 4px; font-size: 0.95rem; color: var(--ink-2); }
.ementa-fold > summary { cursor: pointer; color: var(--ink-2); font-weight: 550; width: fit-content; }
.ementa-fold > p { margin: 6px 0 0; max-width: 80ch; }
.inline-details.quiet > summary { color: var(--ink-2); font-weight: 500; font-size: 0.88rem; }
.side-note { margin: 8px 0 0; }
a.quiet { color: var(--ink-2); }
details.more > summary, .inline-details > summary { cursor: pointer; color: var(--link); font-weight: 550; }
.inline-details { font-size: 0.92rem; margin-top: 6px; }
.inline-details[open] { padding: 6px 0 10px; }

/* toolbar-style in-page navigation */
.subnav { position: sticky; top: var(--header-h); z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); margin: 8px -4px 4px; padding: 8px 4px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 0.9rem; font-weight: 550; }
.subnav a:hover { border-color: var(--link); color: var(--link); }
.toc { margin: 8px 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- stat tiles ---------- */
.tiles { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tiles.mini { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tiles.mini .tile { padding: 10px 14px; }
.tiles.mini .tile-value { font-size: 1.4rem; }
.tiles.four { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; }
.tile-label { color: var(--ink-2); font-size: 0.88rem; }
.tile-value { font-size: 1.8rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.tile-sub { color: var(--ink-2); font-size: 0.8rem; }
.tiles.compact { align-items: start; }
.tile:has(> .tile-link) { padding: 0; }
.tile-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; height: 100%; color: var(--ink); text-decoration: none; border-radius: inherit; }
.tile:has(> .tile-link):hover { border-color: var(--link); box-shadow: var(--shadow-md); }
.tile-link:hover { color: var(--ink); }
.tile-link .tile-sub { color: var(--link); }
.section .tile { background: var(--surface-2); border-color: transparent; box-shadow: none; }

/* facts list */
dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 24px; margin: 14px 0 8px; }
dl.facts div { min-width: 0; }
dl.facts dt { color: var(--ink-2); font-size: 0.82rem; font-weight: 550; }
dl.facts dd { margin: 2px 0 0; }
dl.facts.small { font-size: 0.92rem; }
dl.glossary dt { font-weight: 650; margin-top: 12px; }
dl.glossary dd { margin: 2px 0 0; max-width: 80ch; }

/* ---------- people ---------- */
.profile-card { display: flex; gap: 22px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 24px; margin: 10px 0 4px; }
.profile-card .avatar { box-shadow: 0 0 0 4px var(--accent-soft); }
.profile-card h1 { margin: 2px 0 6px; }
.profile-card .kicker { font-size: 0.8rem; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.pc-body { min-width: 0; }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; color: var(--ink-2); font-size: 0.93rem; }
.pc-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; font-size: 0.93rem; font-weight: 550; }
.count-pill { display: inline-block; font-size: 0.78rem; font-weight: 650; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; vertical-align: 3px; font-variant-numeric: tabular-nums; }
.subnav .cnt { color: var(--ink-2); font-weight: 500; font-size: 0.85em; margin-left: 2px; }
.subnav a.on { background: var(--accent-soft); border-color: transparent; color: var(--link); }
.subnav a.on .cnt { color: inherit; }
a.strong { font-weight: 600; }
.sub-line { font-size: 0.84rem; color: var(--ink-2); margin-top: 2px; }

.show-extra { margin-top: 12px; }
.inline-legend { margin: 10px 0 0; color: var(--ink-2); font-size: 0.85rem; }
.filters.flat { box-shadow: none; background: var(--surface-2); border-color: transparent; margin-top: 6px; }
.sess-item { display: flex; gap: 16px; align-items: center; }
.sess-body { min-width: 0; flex: 1; }
.date-badge { flex: 0 0 56px; display: grid; justify-items: center; line-height: 1.05; padding: 7px 0 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.date-badge .d { font-size: 1.25rem; font-weight: 750; }
.date-badge .m { font-size: 0.72rem; font-weight: 650; text-transform: uppercase; color: var(--link); letter-spacing: 0.04em; }
.date-badge .y { font-size: 0.68rem; color: var(--ink-2); }
.sess-tit { margin: 4px 0 0; font-size: 0.86rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead-fact { font-size: 1.02rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.res-wait .ico { background: color-mix(in srgb, var(--warning) 25%, transparent); color: var(--ink); }
.ai-more { margin: 4px 0 8px; }
table.tema-tbl td:first-child { min-width: 12em; }
abbr[title] { text-decoration: none; }
.sess-head { display: flex; gap: 18px; align-items: center; }
.sess-head h1 { margin: 0 0 2px; }
.sess-head p { margin: 0; }
.date-badge.big { flex-basis: 72px; padding: 10px 0 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.date-badge.big .d { font-size: 1.7rem; }
dl.card-facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 20px; }
.item.contested { box-shadow: inset 3px 0 0 var(--nao); }
.mismatch-note .mm { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--warning); font-size: 0.75rem; font-weight: 700; color: var(--ink); }
.profile { display: flex; gap: 22px; align-items: center; margin: 6px 0 10px; }
.profile h1 { margin: 0 0 4px; }
.profile p { margin: 2px 0; }
.avatar { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: 0 0 var(--s); border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.avatar .ini { font-size: calc(var(--s) * 0.36); font-weight: 650; color: var(--ink-2); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.who { display: inline-flex; align-items: center; gap: 10px; font-weight: 550; }
ul.people { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
ul.people li { display: flex; }
ul.people a { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
ul.people a:hover { border-color: var(--link); box-shadow: var(--shadow-md); }
.section ul.people a { border-color: transparent; box-shadow: none; background: transparent; }
.section ul.people a:hover { background: var(--surface-2); border-color: transparent; box-shadow: none; }
@media (min-width: 1000px) { .section ul.people { grid-template-columns: repeat(6, 1fr); } }
ul.people .pname { font-weight: 650; font-size: 0.9rem; line-height: 1.25; }
ul.people .muted { font-size: 0.78rem; }

/* ---------- list items (matérias, votes) ---------- */
.items { list-style: none; padding: 0; margin: 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.item { padding: 14px 20px; border-top: 1px solid var(--line); transition: background .12s; }
.item:first-child { border-top: 0; }
.item[hidden] { display: none; }
.item:hover { background: var(--surface-2); }
.section .items { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 12px -24px 0; }
.section .items .item { padding-left: 24px; padding-right: 24px; }
.section .items:last-child { margin-bottom: -20px; }
.item-title { font-size: 1.02rem; font-weight: 650; line-height: 1.35; margin: 0; }
.item-title a { color: var(--ink); text-decoration: none; }
.item-title a:hover { color: var(--link); text-decoration: underline; }
/* separators: every entry sits 22px right of the previous; the "·" of an entry that starts a line is clipped */
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 6px 0 0 -22px; clip-path: inset(-6px -6px -6px 20px); font-size: 0.86rem; color: var(--ink-2); }
.item-meta > * { margin-left: 22px; position: relative; }
.item-meta .dot::before { content: "·" / ""; position: absolute; left: -14px; }
.item .ementa { margin-top: 6px; }
.item-side { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; }

/* ---------- tables ---------- */
.scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll:focus-visible { outline-offset: 4px; }
.scroll.overflows { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
.scroll.overflows.at-end { -webkit-mask-image: none; mask-image: none; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.94rem; background: var(--surface); }
table.data th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.82rem; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: bottom; background: var(--surface); position: sticky; top: var(--header-h); z-index: 1; }
table.data th.r { text-align: right; }
table.data thead th { white-space: nowrap; }
table.vtable td[data-label="Vereador"] { min-width: 230px; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody th[scope="row"] { font-weight: 500; color: var(--ink); font-size: inherit; border-bottom: 1px solid var(--line); position: static; background: transparent; text-align: left; padding: 10px 12px; }
table.data.compact td, table.data.compact th { padding: 7px 10px; }
/* inside a horizontal scroller, sticky headers would offset against the scroller, not the page */
.scroll table.data th { position: static; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tr[hidden] { display: none; }
table.data.mid td { vertical-align: middle; }
table.data td.wide { min-width: 15em; }
table.data.narrow { max-width: 780px; }
.section table.data.narrow { max-width: none; }
.section table.data, .section .scroll { margin: 0 -8px; width: calc(100% + 16px); }
.section .scroll table.data { margin: 0; width: 100%; }
caption.left { text-align: left; font-weight: 600; padding: 6px 0; }
tr.dim td, tr.dim th { color: var(--ink-2); }
tr.contested > td:first-child { box-shadow: inset 3px 0 0 var(--nao); padding-left: 12px; }
.ementa { color: var(--ink-2); font-size: 0.88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 78ch; }
.headline-sm { font-weight: 650; font-size: 0.92rem; margin-top: 2px; }
.sub { font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.sub.block { display: block; }
table.cards .sub { white-space: normal; }
.cell { display: inline; }
.who-no { font-size: 0.86rem; margin-top: 6px; }
.who-no .voto { color: var(--ink-2); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 14px 0 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.filters[hidden] { display: none; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 550; color: var(--ink-2); }
.filters label.grow { flex: 1 1 260px; }
.filters label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); padding-bottom: 8px; font-weight: 500; font-size: 0.9rem; }
.filters input[type="search"], .filters select { font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-sm); padding: 8px 10px; min-width: 160px; min-height: 42px; }
.filters input::placeholder, .search input::placeholder { color: var(--ink-2); opacity: 1; }
.filters input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--link); }
.filters output { margin-left: auto; color: var(--ink-2); font-size: 0.88rem; padding-bottom: 10px; font-variant-numeric: tabular-nums; }
.empty { padding: 18px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); margin: 8px 0; }
.empty[hidden] { display: none; }
.more-rows { display: block; margin: 12px auto 0; }
.more-rows[hidden] { display: none; }
.btn { font: inherit; font-weight: 600; padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 1px solid var(--link); background: var(--link); color: var(--surface); cursor: pointer; }
.btn.ghost { background: var(--surface); color: var(--link); padding: 8px 16px; min-height: 40px; }
.btn:hover { filter: brightness(1.08); }

/* home search */
.search { margin: 18px 0 8px; max-width: 680px; }
.search label { display: block; font-weight: 650; margin-bottom: 8px; }
.search-row { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px; box-shadow: var(--shadow-sm); }
.search-row:focus-within { border-color: var(--link); outline: 2px solid var(--link); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 1.02rem; padding: 10px 16px; min-height: 44px; border: 0; background: transparent; color: var(--ink); }
.search input:focus { outline: none; }
.search button { font: inherit; font-weight: 650; padding: 10px 22px; min-height: 44px; border-radius: 999px; border: 0; background: var(--link); color: var(--surface); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 0.86rem; color: var(--ink-2); align-items: center; }

/* ---------- chips, tags, badges ---------- */
.tag { display: inline-block; font-size: 0.75rem; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; line-height: 1.55; background: var(--surface-2); text-decoration: none; vertical-align: 1px; white-space: nowrap; }
.tag.big { font-size: 0.8rem; padding: 2px 10px; vertical-align: middle; color: var(--ink); }
.tag.ai { border-color: var(--h3); color: var(--ink); }
.tag.nao { color: var(--ink); border-color: color-mix(in srgb, var(--nao) 60%, transparent); background: color-mix(in srgb, var(--nao) 10%, var(--surface)); }
.tag.warn { border-color: var(--serious); }
a.tag:hover { border-color: var(--link); color: var(--link); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.85rem; font-weight: 500; white-space: nowrap; }
.chip.more { color: var(--link); }
.chip, .tema-chip { position: relative; }
.chip::after, a.tema-chip::after { content: ""; position: absolute; inset: -6px -2px; }
.chip:hover { border-color: var(--link); color: var(--link); }
.temas-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tema-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; border: 1px solid var(--line); line-height: 1.55; }
.tema-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--h3); flex: 0 0 auto; }
.tema-chip:hover { border-color: var(--h3); color: var(--ink); }

/* vote chip: coloured mark beside ink text */
.voto { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 550; }
.voto .mk { width: 10px; height: 10px; border-radius: 3px; background: var(--abst); flex: 0 0 auto; }
.v-sim .mk { background: var(--sim); }
.v-nao .mk { background: var(--nao); }
.v-abst .mk { background: var(--abst); }
.v-ausente .mk { background: transparent; border: 1.5px solid var(--ink-2); border-radius: 50%; }
.v-naovotou .mk, .sw.v-naovotou { background: repeating-linear-gradient(45deg, var(--ink-2) 0 1.5px, transparent 1.5px 4px); border: 1px solid var(--ink-2); border-radius: 3px; }

/* result: status icon + label */
.res { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
.res .ico { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 0.72rem; font-weight: 800; }
.res-ok .ico { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.res-no .ico { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--critical); }
.res-tie .ico { background: color-mix(in srgb, var(--serious) 20%, transparent); color: var(--serious); }
.res-none { color: var(--ink-2); font-weight: 500; }

/* data-quality flags and data-source badges: a shape + label */
.flag, .fonte { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; line-height: 1.6; color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 9px; white-space: nowrap; text-decoration: none; background: var(--surface); }
a.flag:hover { border-color: var(--link); color: var(--ink); }
.flag::before, .fonte::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.fonte-warn::before { background: var(--warning); }
.fonte-ok::before { background: var(--good); }
.fonte-none::before { background: transparent; border: 1.5px solid var(--ink-2); }
.flag-diverge::before { background: transparent; box-shadow: inset 0 0 0 2px var(--warning); }
.flag-incompleta::before { border-radius: 1px; background: var(--serious); }
.flag-pendente::before { background: linear-gradient(90deg, var(--warning) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--warning); }
.flag-semreg::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.flag-quorum::before { content: "!" / ""; width: 12px; height: 12px; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; color: #ffffff; background: var(--critical); }
.flags-row { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.placar { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.mismatch .mm { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--warning); font-size: 0.75rem; font-weight: 700; color: var(--ink); }
.gap-note { margin: 0; font-size: 0.9rem; color: var(--ink); }
.gap-note::before { content: "" / ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--serious); margin-right: 6px; }

/* ---------- matéria page ---------- */
.mat-head { display: grid; gap: 4px; }
.mat-head .official { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); margin: 0; }
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 18px; margin: 16px 0; }
.verdict .res { font-size: 1.1rem; }
.verdict .placar { font-size: 1.02rem; }
.verdict .seg { flex: 1 1 220px; max-width: 360px; }
.verdict .when { color: var(--ink-2); font-size: 0.88rem; }
article.votacao { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 14px; margin: 14px 0; background: var(--surface); box-shadow: var(--shadow-sm); }
article.votacao header h3 { margin: 12px 0 2px; }
article.votacao header p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.outcome { margin: 8px 0 10px; display: grid; gap: 6px; }
.big-res .res { font-size: 1.15rem; }
.big-placar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 1.05rem; }
.outcome-bar { max-width: 420px; }
.meta { margin: 4px 0 8px; font-size: 0.9rem; color: var(--ink-2); }
.meta .sep { color: var(--axis); margin: 0 4px; }
.grupos { display: grid; gap: 12px; margin-top: 12px; }
.grupo { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 6px 14px; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.grupo:first-child { border-top: 0; padding-top: 0; }
.grupo ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 6px; }
.grupo li { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.g-nao li { border-color: color-mix(in srgb, var(--nao) 55%, transparent); }
.g-abst li { border-color: color-mix(in srgb, var(--abst) 70%, transparent); }
.gh { margin: 3px 0 0; font-weight: 600; white-space: nowrap; }
.summary-line { font-size: 1.02rem; }
.summary-line .ok-note { display: block; color: var(--ink-2); font-size: 0.88rem; }
.ok-note::before { content: "✓ " / ""; color: var(--good); font-weight: 700; }
.official { background: var(--surface-2); border: 0; border-radius: var(--radius-sm); padding: 10px 14px; }
.mat-head .official { background: none; border: 0; padding: 0; }
ul.docs { list-style: none; padding: 0; margin: 6px 0; }
ul.docs li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; line-height: 1.35; }
ul.docs li:last-child { border-bottom: 0; }
.doc-sub { display: block; font-size: 0.8rem; color: var(--ink-2); margin-top: 2px; }
.doc-id { display: inline-block; font-weight: 650; font-size: 0.7rem; padding: 0 6px; margin-right: 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--link); }
.mat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 8px; }
.mat-main > section > h2:first-child { margin-top: 10px; }
.mat-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 4px 18px 14px; }
.side-h { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); margin: 14px 0 6px; }
dl.facts.stack { grid-template-columns: 1fr; gap: 10px; margin: 6px 0 4px; font-size: 0.94rem; }
.side-link { margin: 10px 0 0; font-size: 0.9rem; font-weight: 550; }
.mat-main details.info { max-width: none; }

/* AI summary */
.ai-summary { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px 22px 16px; margin: 16px 0 22px; overflow: hidden; }
.ai-summary::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--h3), var(--h2)); }
.ai-summary h2 { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.1rem; }
.ai-summary h3 { font-size: 0.82rem; margin: 14px 0 6px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.ai-summary .headline { font-size: 1.2rem; font-weight: 700; margin: 4px 0 8px; letter-spacing: -0.01em; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 0 28px; }
.ai-list { margin: 0; padding-left: 18px; }
.ai-list li { margin: 5px 0; }
.ai-list li.unconfirmed { color: var(--ink-2); }
.ai-note { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; font-size: 0.84rem; color: var(--ink-2); }
.ai-note p { margin: 4px 0; }
.warn-line { color: var(--ink); }
a.src { display: inline-block; font-size: 0.76rem; font-weight: 600; line-height: 1.55; padding: 0 6px; margin: 0 1px; border-radius: 5px; border: 1px solid var(--line-2); text-decoration: none; color: var(--link); background: var(--surface-2); white-space: nowrap; vertical-align: 1px; }
a.src:hover { border-color: var(--link); }
a.src.src-nao_encontrado { color: var(--ink-2); border-style: dashed; }

/* themes */
ul.tema-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
ul.tema-cards .card h2 { font-size: 1.02rem; min-height: 2.5em; }
ul.tema-cards .card p { margin: 4px 0 0; }
ul.tema-cards li { display: flex; }
ul.tema-cards .card { flex: 1; }
.tema-card .tc-n { color: var(--ink); }
.tema-card .tc-n strong { font-size: 1.5rem; letter-spacing: -0.02em; }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 8px 0 6px; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--h2), var(--h3)); border-radius: 999px; }

/* ---------- charts ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 18px 32px; margin-top: 14px; }
figure.chart { margin: 0; min-width: 0; }
figure.chart figcaption { font-size: 0.92rem; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
figure.chart figcaption .muted { font-size: 0.84rem; }
.chart-h { margin: 0 0 10px; font-size: 0.95rem; }
.chart-foot { font-size: 0.82rem; color: var(--ink-2); margin: 10px 0 0; }
.empty-chart { padding: 16px 0; margin: 0; }
.contra-chart { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
/* beeswarm on a left-right axis: emphasis = the person in ink, colleagues in gray */
.swarm, .dothist { position: relative; margin: 26px 10px 0; }
.swarm { height: calc((var(--span) * 2 + 1) * 16px + 16px); }
.swarm-axis { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--axis); }
.swarm-mid { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--axis); }
.sdot { position: absolute; top: calc(50% + var(--row) * 16px); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: color-mix(in srgb, var(--ink-2) 50%, var(--surface)); box-shadow: 0 0 0 2px var(--surface); }
.sdot::after, .hdot::after { content: ""; position: absolute; inset: -6px; }
.sdot:hover { background: var(--ink-2); }
.sdot.me { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--ink); z-index: 2; }
.sdot-label { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 650; color: var(--ink); white-space: nowrap; background: var(--surface); padding: 0 5px; border-radius: 4px; pointer-events: none; }
.me-marker { position: relative; height: 1.4em; margin: 0 10px; }
.me-guide { position: absolute; width: 0; border-left: 1.5px solid var(--ink); bottom: -6px; }
.me-marker span { position: absolute; transform: translateX(-50%); font-size: 0.78rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.axis-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: var(--ink-2); margin: 8px 0 0; }
.axis-labels.five { position: relative; height: 1.3em; margin: 6px 10px 0; }
.axis-labels.five span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.axis-labels.five span:first-child { transform: none; left: 0 !important; }
.axis-labels.five span:last-child { transform: none; left: auto !important; right: 0; }
.dothist { height: calc(var(--h) * 16px + 14px); }
.dothist .swarm-axis { top: auto; bottom: 0; }
.dh-col { position: absolute; bottom: 6px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 4px; align-items: center; }
.hdot { position: relative; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.hdot:hover { background: var(--link); }
/* ranked horizontal bars (meter list) */
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 2.6em; gap: 12px; align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: 6px; }
.hbars li:hover { background: var(--surface-2); }
.hb-label { font-size: 0.88rem; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.hb-label:hover { color: var(--link); text-decoration: underline; }
.hb-track { display: flex; gap: 2px; height: 12px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.hb-bar { height: 100%; min-width: 3px; border-radius: 0; }
.hb-track .hb-bar:last-child { border-radius: 0 4px 4px 0; }
.hb-bar.hb-tema { background: var(--h3); }
.hb-bar.v-nao { background: var(--nao); }
.hb-bar.v-abst { background: var(--abst); }
.hb-val { text-align: right; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.hbars li.thin-base { opacity: 0.55; }
ul.legend.small { font-size: 0.8rem; margin: 8px 0 0; color: var(--ink-2); }
.meters { list-style: none; padding: 0; margin: 18px 0 4px; display: grid; gap: 8px; max-width: 680px; }
.meters li { display: grid; grid-template-columns: 190px 200px auto; gap: 12px; align-items: center; font-size: 0.88rem; }
.meter-track { height: 8px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.meter-track > span { display: block; height: 100%; background: var(--ink-2); border-radius: 999px; }
.mt-val { color: var(--ink-2); white-space: nowrap; }
/* month-by-month calendar heatmap */
table.cal { border-collapse: separate; border-spacing: 3px; font-size: 0.75rem; table-layout: fixed; width: 100%; max-width: 560px; }
table.cal th.cal-corner { width: 3.2em; }
table.cal th { font-weight: 500; color: var(--ink-2); text-transform: capitalize; }
table.cal th[scope="row"] { text-align: right; padding-right: 6px; font-variant-numeric: tabular-nums; }
table.cal td { height: 24px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--border); }
table.cal td.out { box-shadow: none; padding: 0; border: 0; background: transparent; }
table.cal td.novote { background: repeating-linear-gradient(45deg, var(--line-2) 0 1.5px, transparent 1.5px 5px); box-shadow: inset 0 0 0 1px var(--line); }
table.cal td[tabindex]:hover { box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1px var(--ink-2); }
table.cal td[tabindex]:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
tr.me-row td { font-weight: 650; background: var(--accent-soft); }
/* left-right on the matéria page */
.esp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 2px; font-size: 0.9rem; }
.esp-scale { display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.esp-scale span { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ink-2) 30%, var(--surface)); }
.esp-scale span.mid { width: 2px; height: 12px; border-radius: 1px; background: var(--axis); }
.esp-scale span.on { background: var(--ink); box-shadow: 0 0 0 2px var(--surface); width: 12px; height: 12px; }
.esp-label { border-bottom: 1px dotted var(--ink-2); cursor: help; }
.tag.esp { color: var(--ink); }
/* whole-chamber dot plot */
table.dotplot { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 6px 0 10px; }
table.dotplot th, table.dotplot td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
table.dotplot thead th { color: var(--ink-2); font-size: 0.78rem; font-weight: 600; }
table.dotplot th[scope="row"] { white-space: nowrap; width: 1%; }
table.dotplot th[scope="row"] a { text-decoration: none; color: var(--ink); }
table.dotplot .r { text-align: right; width: 1%; }
.dp-axis { display: flex; justify-content: space-between; font-weight: 500; }
td.dp-track { position: relative; min-width: 220px; }
.dp-line { position: absolute; left: 8px; right: 8px; top: 50%; border-top: 1px solid var(--line-2); }
.dp-mid { position: absolute; left: 50%; top: 4px; bottom: 4px; border-left: 1px solid var(--axis); }
.dp-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.dp-dot::after { content: ""; position: absolute; inset: -7px; }
table.dotplot tbody tr:hover { background: var(--surface-2); }
/* info button: explanations on hover/focus/tap instead of paragraphs */
.info-i { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; margin: 0 2px; vertical-align: 2px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); font: 700 0.68rem/1 Georgia, serif; cursor: help; position: relative; }
.info-i::after { content: ""; position: absolute; inset: -10px; }
.info-i:hover, .info-i:focus-visible { border-color: var(--link); color: var(--link); }
h2 .info-i, h3 .info-i { vertical-align: 3px; }
.head-stat { color: var(--ink-2); font-size: 0.95rem; }
.head-stat strong { color: var(--ink); font-size: 1.15rem; }
.head-links { display: inline-flex; gap: 16px; }
.badge { display: inline-block; font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; font-size: 0.85rem; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 6px; font-size: 0.85rem; color: var(--ink-2); }
.mini-stats strong { color: var(--ink); font-size: 1rem; }
/* "como vota": one big bar + figures under it */
.vote-big { margin: 14px 0 10px; }
.vote-big .seg { height: 34px; }
.vote-big .seg .part { line-height: 34px; font-size: 0.85rem; }
.vstats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.vstats li { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.92rem; }
.vs-n { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.vs-p { color: var(--ink-2); font-size: 0.82rem; }
.presence { margin: 18px 0 0; padding: 12px 16px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.pres-h { margin: 0 0 8px; font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pres-seg { height: 22px; }
.pres-seg .part { line-height: 22px; font-size: 0.78rem; color: #fff; }
.pres-ok { background: var(--good); }
.pres-just { background: var(--abst); }
.pres-falta { background: var(--warning); color: #0b0b0b; }
.sw.pres-ok { background: var(--good); } .sw.pres-just { background: var(--abst); } .sw.pres-falta { background: var(--warning); }
@media (prefers-color-scheme: dark) { .pres-ok, .sw.pres-ok { background: color-mix(in srgb, var(--good) 70%, var(--surface)); } }
.presence .legend { margin: 8px 0 0; }
.val-tiles { list-style: none; margin: 12px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.val-tiles li { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.vt-v { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.vt-t { font-size: 0.85rem; color: var(--ink-2); }
.vt-src { margin-top: 4px; }
.val-tiles li.unconfirmed .vt-v { color: var(--ink-2); }
.limit-chip { margin: 6px 0 10px; }
.parecer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 14px; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0; }
/* seat strip: one square per vote of the official score */
.seats { display: inline-flex; flex-wrap: nowrap; gap: 1px; vertical-align: middle; cursor: default; }
.seats i { width: 6px; height: 8px; border-radius: 1.5px; background: var(--sim); flex: 0 0 auto; }
.seats i.s-n { background: var(--nao); }
.seats i.s-a { background: var(--abst); }
.nao-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--nao) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--nao) 55%, transparent); border-radius: 999px; padding: 0 7px; line-height: 1.5; }
.res.icon-only .ico { width: 20px; height: 20px; }
/* face stacks */
.faces { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.face { display: inline-flex; border-radius: 50%; }
.face .avatar { border: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--line-2); }
.face.ring-nao .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--nao); }
.face.ring-abst .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--abst); }
.face.ring-sim .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sim); }
.face:hover .avatar { transform: translateY(-1px); }
.who-no { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* councillor header: comparison badges */
.profile-card.with-side { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(112px, 1fr)); gap: 8px; align-self: center; }
.bdg { display: flex; flex-direction: column; gap: 0; padding: 8px 12px; height: 100%; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.bdg:hover { border-color: var(--link); color: var(--ink); }
.bdg.hi { border-color: color-mix(in srgb, var(--warning) 70%, transparent); background: color-mix(in srgb, var(--warning) 10%, var(--surface)); }
.b-v { font-size: 1.35rem; font-weight: 750; line-height: 1.1; letter-spacing: -0.02em; }
.b-l { font-size: 0.8rem; font-weight: 600; }
.b-s { font-size: 0.74rem; color: var(--ink-2); }
.pc-portal { font-size: 0.85rem; font-weight: 550; text-decoration: none; }
.pc-meta .tag.big { cursor: help; }
a.tag.warn { color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 70%, transparent); }
/* "voted differently from the majority" */
.standout-h { margin-top: 22px; }
.standout { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.standout li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.so-body { display: flex; flex-direction: column; min-width: 0; }
.so-body a { font-weight: 600; color: var(--ink); text-decoration: none; }
.so-body a:hover { color: var(--link); text-decoration: underline; }
.so-meta { font-size: 0.8rem; color: var(--ink-2); }
.voto-pill { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; color: var(--ink); background: var(--surface); border: 2px solid var(--abst); }
.voto-pill.v-nao { border-color: var(--nao); background: color-mix(in srgb, var(--nao) 12%, var(--surface)); }
.voto-pill.v-sim { border-color: var(--sim); background: color-mix(in srgb, var(--sim) 12%, var(--surface)); }
/* average tick on rate bars */
.hb-track { position: relative; }
.hb-avg { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.sw.avg-key { width: 2px; height: 12px; background: var(--ink); border-radius: 1px; }
/* seat grid of faces (matéria votes) */
.seatgrid { display: grid; gap: 12px; margin-top: 12px; }
.sg-group { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: start; }
.sg-h { margin: 6px 0 0; font-weight: 600; white-space: nowrap; }
.sg-h .num { color: var(--ink-2); font-weight: 500; }
.sg-faces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sg-faces .face { position: relative; }
.face.ring-ausente .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--line-2); opacity: 0.55; }
.face.ring-naovotou .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink-2); }
.presid { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 0.62rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.v-who { display: inline-flex; align-items: center; gap: 6px; }
.esp-label.na { color: var(--ink-2); font-size: 0.85rem; }
/* session: outcome bar + roll-call matrix */
.sess-links { margin: 4px 0 14px; }
.sess-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 20px; margin: 12px 0; }
.sb-h { margin: 0 0 8px; font-size: 0.95rem; }
.sb-h strong { font-size: 1.3rem; }
.sb-seg { height: 26px; }
.sb-seg .part { line-height: 26px; font-size: 0.8rem; text-align: center; padding: 0; }
.sess-bar .legend { margin: 8px 0 0; }
table.rollcall { border-collapse: separate; border-spacing: 2px; font-size: 0.82rem; }
table.rollcall thead th { padding: 0 0 4px; vertical-align: bottom; }
table.rollcall thead th a { display: inline-flex; position: relative; }
table.rollcall thead th .presid { right: -5px; bottom: -3px; width: 13px; height: 13px; font-size: 0.55rem; }
.rc-more { margin-top: 8px; }
.presid.inline { position: static; display: inline-grid; margin-right: 4px; vertical-align: -3px; }
.hb-label.who { display: inline-flex; align-items: center; gap: 6px; }
.contra-bars li { grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 5.2em; }
table.rollcall th[scope="row"] { text-align: right; padding-right: 8px; font-weight: 500; max-width: 380px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.rollcall th[scope="row"] a { color: var(--ink); text-decoration: none; }
table.rollcall th[scope="row"] a:hover { color: var(--link); text-decoration: underline; }
td.rc { width: 26px; min-width: 26px; height: 22px; border-radius: 4px; padding: 0; }
td.rc-sim { background: var(--sim); }
td.rc-nao { background: var(--nao); }
td.rc-abst { background: var(--abst); }
td.rc-naovotou { background: repeating-linear-gradient(45deg, var(--ink-2) 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px var(--ink-2); }
td.rc-ausente { box-shadow: inset 0 0 0 1.5px var(--control-border); }
td.rc-none { background: var(--surface-2); }
td.rc[tabindex]:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
td.rc:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.vmarks { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0 0; }
.vm { width: 12px; height: 12px; border-radius: 3px; background: var(--sim); position: relative; }
.vm::after { content: ""; position: absolute; inset: -3px; }
.vm-nao { background: var(--nao); }
.vm-abst { background: var(--abst); }
.vm-pend { background: transparent; border: 1.5px dashed var(--ink-2); border-radius: 3px; }
.sw.pend { background: transparent; border: 1.5px dashed var(--ink-2); border-radius: 3px; }
.seg .part.v-pend { background: transparent; border: 1.5px dashed var(--ink-2); }
.m-only { display: none; }
/* home hero: councillor faces with a micro vote bar */
.hero-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px 12px; }
.hs-h { font-size: 0.95rem; margin: 0 0 6px; }
.face-grid { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 6px; }
.face-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); padding: 4px 2px; border-radius: 8px; }
.face-grid a:hover { background: var(--surface-2); }
.fg-name { font-size: 0.72rem; font-weight: 600; text-align: center; line-height: 1.15; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.face-grid .seg.thin { width: 100%; height: 5px; }
.face-grid .seg.thin .part { line-height: 5px; }
.kpis { margin: 14px 0 0; gap: 6px 24px; }
.kpis a { color: var(--ink-2); text-decoration: none; }
.kpis a:hover strong { color: var(--link); }
.vmarks.big .vm { width: 16px; height: 16px; border-radius: 4px; }
.sw.hb-tema-sw { background: var(--h3); }
.hb-track.full { background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hb-track.full .hb-bar:last-child { border-radius: 0; }
.hb-bar.v-sim { background: var(--sim); }
.tema-bars.big li { padding: 7px 6px; }
.tema-bars.big .hb-track { height: 16px; }
.tema-bars li { grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 4.5em; }
.rej { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--ink); padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--critical) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--critical) 55%, transparent); }
.dp-dot.thin { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--surface); }
.flag-pres::before { background: var(--ink); }
.flag-hi::before { background: var(--warning); }
/* diverging bars: dissent left of zero, Sim right */
table.divbars { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.divbars th, table.divbars td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
table.divbars thead th { color: var(--ink-2); font-size: 0.78rem; font-weight: 600; }
table.divbars th[scope="row"] { white-space: nowrap; width: 1%; }
table.divbars th[scope="row"] a { color: var(--ink); text-decoration: none; }
table.divbars .r { text-align: right; width: 1%; }
.db-axis { min-width: 260px; }
.db-axis span:last-child { float: right; }
td.db-track { min-width: 260px; }
.db-in { display: flex; align-items: center; height: 22px; }
.db-left, .db-right { flex: 1 1 50%; display: flex; height: 12px; }
.db-left { justify-content: flex-end; }
.db-left .hb-bar { border-radius: 0; }
.db-left .hb-bar:first-child { border-radius: 4px 0 0 4px; }
.db-right .hb-bar { border-radius: 0 4px 4px 0; }
.db-zero { width: 2px; height: 22px; background: var(--ink); margin: 0 2px; border-radius: 1px; }
table.divbars tbody tr:hover { background: var(--surface-2); }
.item.has-score { display: grid; grid-template-columns: minmax(0, 1fr) 190px; column-gap: 18px; }
.item.has-score > * { grid-column: 1; }
.item.has-score > .item-score { grid-column: 2; grid-row: 1 / span 4; align-self: center; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.item-score .score-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nao-badge { white-space: nowrap; }
/* profile page: fact sidebar + tabs */
.person-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; margin-top: 16px; align-items: start; }
.person-side { position: sticky; top: calc(var(--header-h) + 12px); display: grid; gap: 14px; }
.ptabs { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px; }
.ptabs a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 550; font-size: 0.93rem; }
.ptabs a:hover { background: var(--surface-2); color: var(--ink); }
.ptabs a.on { background: var(--accent-soft); color: var(--link); }
.ptabs .cnt { color: var(--ink-2); font-weight: 500; font-size: 0.8rem; }
.person-main { min-width: 0; }
.person-main > .tabpanel > :first-child { margin-top: 0; }
.tabpanel:focus { outline: none; }
.ficha-h { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); margin: 10px 0 4px; font-weight: 650; }
.ficha-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.ficha-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ficha-list li:last-child { border-bottom: 0; }
.perfil-artigo { max-width: 74ch; }
.perfil-artigo .pa-h { font-size: 1.02rem; margin: 22px 0 6px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.perfil-artigo p { margin: 0 0 10px; line-height: 1.65; }
.pa-src { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: 1px; }
.perfil-resumo { font-size: 1.08rem; font-weight: 500; max-width: 74ch; }
/* matéria: status tracker */
.tracker { list-style: none; margin: 4px 0 16px; padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); counter-reset: none; }
.tracker li { position: relative; flex: 1 1 0; min-width: 120px; padding-top: 30px; }
.tracker li::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--line-2); }
.tracker li:first-child::before { left: 11px; }
.tracker li:last-child::before { right: auto; width: 11px; }
.tracker li > a, .tracker li > span { text-decoration: none; color: var(--ink); }
.tr-dot { position: absolute; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; background: var(--surface); box-shadow: inset 0 0 0 2px var(--link); color: var(--link); z-index: 1; }
.tr-done .tr-dot { background: var(--link); box-shadow: none; }
.tr-ok .tr-dot { background: var(--good); color: #fff; box-shadow: none; }
.tr-no .tr-dot { background: var(--critical); color: #fff; box-shadow: none; }
.tr-wait .tr-dot { box-shadow: inset 0 0 0 2px var(--ink-2); color: var(--ink-2); border: 0; background: var(--surface); }
.tr-t { display: block; font-weight: 650; font-size: 0.88rem; line-height: 1.25; padding-right: 10px; }
.tr-d { display: block; font-size: 0.78rem; color: var(--ink-2); }
.tracker a:hover .tr-t { color: var(--link); text-decoration: underline; }
/* horizontal tabs */
.htabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-2); margin: 0 0 14px; position: sticky; top: var(--header-h); z-index: 15; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.htabs a { flex: 0 0 auto; padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.htabs a:hover { color: var(--ink); }
.htabs a.on { color: var(--link); border-bottom-color: var(--link); }
@media (max-width: 900px) { .htabs, .ptabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); } }
.htabs .cnt { font-size: 0.78rem; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
/* detailed explanation + unified log */
.detalhe p { max-width: 74ch; line-height: 1.65; margin: 0 0 10px; }
.lacunas { margin-top: 16px !important; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 0.92rem; }
.mlog { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; }
.mlog li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 10px 0 10px; border-left: 2px solid var(--line-2); padding-left: 16px; position: relative; }
.mlog li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--axis); }
.mlog li.ml-voto::before { background: var(--link); box-shadow: none; }
.mlog li.ml-parecer::before { background: var(--h3); box-shadow: none; }
.ml-d { color: var(--ink-2); font-size: 0.85rem; padding-top: 1px; }
.ml-b { min-width: 0; }
.ml-b a { color: var(--ink); text-decoration: none; }
.ml-b a:hover { color: var(--link); text-decoration: underline; }
.ml-txt { display: block; font-size: 0.86rem; color: var(--ink-2); margin-top: 2px; }
.vg-bar { margin: 6px 0 4px; max-width: 74ch; }
.vg-link { display: block; text-decoration: none; color: var(--ink-2); }
.vg-link .seg.thin { height: 10px; }
.vg-cap { display: block; font-size: 0.82rem; margin-top: 4px; }
.vg-link:hover .vg-cap { color: var(--link); }
.ficha.infobox { float: right; width: 250px; margin: 0 0 14px 22px; }
@media (max-width: 900px) { .ficha.infobox { float: none; width: auto; margin: 0 0 14px; } }
.perfil-artigo::after { content: ""; display: block; clear: both; }
.abs-line { margin: 14px 0 0; font-size: 0.92rem; }
.mat-meta { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 2px 0 4px; font-size: 0.9rem; color: var(--ink-2); }
.mat-meta a { text-decoration: none; }
.pol-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 2px; font-size: 0.9rem; }
.tag.pol { color: var(--ink); border-color: color-mix(in srgb, var(--warning) 70%, transparent); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.tag.loc { color: var(--ink); }
.big-stat { margin: 0 0 10px; color: var(--ink-2); }
.bs-n { font-size: 1.8rem; font-weight: 750; color: var(--ink); margin-right: 6px; letter-spacing: -0.02em; }
.pol-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pol-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.pol-list li > a { font-weight: 600; color: var(--ink); text-decoration: none; }
.pol-list li > a:hover { color: var(--link); text-decoration: underline; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; }
/* AI profile */
.pc-frase { font-size: 1.02rem; color: var(--ink); margin: 0 0 6px; max-width: 70ch; }
.pc-causas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; }
.chip.sm { padding: 2px 10px; font-size: 0.8rem; }
.perfil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; margin: 12px 0 4px; }
.pt { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.ai-summary .pt h3 { margin: 0 0 4px; }
.pt p { margin: 0; font-size: 0.93rem; }
.pt .pt-src { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
a.src.src-dado { color: var(--ink-2); }
.perfil-resumo { font-size: 1.02rem; }
.distrib { margin: 10px 0 8px; }
.distrib .seg { margin-bottom: 6px; }
ul.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; font-size: 0.88rem; }
ul.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -1px; }
.sw.v-sim { background: var(--sim); } .sw.v-abst { background: var(--abst); } .sw.v-nao { background: var(--nao); }
.sw.v-ausente { background: transparent; box-shadow: inset 0 0 0 1.5px var(--control-border); }
.sw.round { border-radius: 50%; }
.seg { display: flex; gap: 2px; height: 28px; width: 100%; }
.seg .part { min-width: 2px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; line-height: 28px; padding-left: 6px; white-space: nowrap; overflow: visible; }
.seg .part.v-sim { background: var(--sim); color: var(--on-sim); }
.seg .part.v-abst { background: var(--abst); color: var(--on-abst); }
.seg .part.v-nao { background: var(--nao); color: var(--on-nao); }
.seg .part.v-ausente { background: transparent; box-shadow: inset 0 0 0 1.5px var(--control-border); }
.seg .part.v-naovotou { background: repeating-linear-gradient(45deg, var(--control-border) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--control-border); color: var(--ink); }
.seg.thin { height: 8px; }
.seg.thin .part { border-radius: 999px; padding: 0; line-height: 8px; }
.seg.thin .part.v-ausente { background: repeating-linear-gradient(90deg, var(--control-border) 0 2px, transparent 2px 4px); box-shadow: none; }
table.bars td { vertical-align: middle; }
table.bars .barcol { width: 48%; min-width: 220px; }
td.dist { min-width: 120px; }
td.dist .seg { width: 170px; }
td.dist { min-width: 180px; }
.seg .part { min-width: 3px; }
table.pairs { max-width: 540px; }
.pairs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 8px 32px; }
.pairs-h { margin: 12px 0 6px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.pair-list { list-style: none; margin: 0; padding: 0; }
.pair-list li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.pl-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pl-bar > span { display: block; height: 100%; background: var(--h3); border-radius: 999px; }
.pl-v { white-space: nowrap; text-align: right; font-weight: 600; }
.more-p { margin: 12px 0 0; }
table.pairs th.group { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.8rem; padding-top: 12px; background: transparent; position: static; border-bottom: 1px solid var(--axis); }

/* heatmap */
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 0.82rem; margin: 4px 0 8px; }
table.heat th[scope="row"] { text-align: right; padding-right: 8px; white-space: nowrap; font-weight: 400; position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.heat th.vh { vertical-align: bottom; padding: 0 0 6px; font-weight: 400; }
table.heat th.vh span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; display: inline-block; }
table.heat td { width: 26px; height: 26px; min-width: 26px; border-radius: 4px; padding: 0; box-shadow: inset 0 0 0 1px var(--border); }
table.heat td.self { background: var(--surface-2); box-shadow: none; position: relative; }
table.heat td.self::after { content: "" / ""; position: absolute; left: 25%; right: 25%; top: 50%; border-top: 1.5px solid var(--axis); }
table.heat td.corner { box-shadow: none; background: transparent; }
table.heat td.na, .sw.na { background: repeating-linear-gradient(45deg, var(--control-border) 0 1.5px, transparent 1.5px 6px); box-shadow: inset 0 0 0 1px var(--control-border); }
table.heat td[tabindex]:hover { box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1px var(--ink-2); }
table.heat td[tabindex]:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.h1 { background: var(--h1); } .h2 { background: var(--h2); } .h3 { background: var(--h3); } .h4 { background: var(--h4); } .h5 { background: var(--h5); }
.heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.85rem; margin: 8px 0 4px; }
.heat-legend .key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.heat-legend .sw { width: 16px; height: 16px; }

/* misc lists */
ol.avisos li { margin-bottom: 0.8em; max-width: 90ch; }
ul.inline { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
ul.downloads { list-style: none; padding: 0; margin: 6px 0 0; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.dl-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 16px 12px; background: var(--surface-2); }
.dl-group h3 { margin: 12px 0 4px; font-size: 0.98rem; }
ul.downloads li { padding: 3px 0; break-inside: avoid; }

/* sortable headers */
table.sortable th[data-sort] button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.sortable th[data-sort] button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
table.sortable th[data-sort] button::after { content: "↕" / ""; color: var(--ink-2); font-size: 0.8em; opacity: 0.35; transition: opacity .12s; }
table.sortable th[data-sort]:hover button::after, table.sortable th[data-sort] button:focus-visible::after, table.sortable th[aria-sort] button::after { opacity: 1; }
table.sortable th[aria-sort="ascending"] button::after { content: "↑" / ""; color: var(--ink); }
table.sortable th[aria-sort="descending"] button::after { content: "↓" / ""; color: var(--ink); }
td.num a { display: inline-block; min-width: 32px; padding: 6px 4px; margin: -6px -4px; text-align: inherit; }

/* floating tooltip (app.js) */
.tip { position: fixed; z-index: 60; background: var(--ink); color: var(--surface); font-size: 0.82rem; padding: 6px 9px; border-radius: 8px; max-width: 300px; box-shadow: var(--shadow-md); }
.tip.pinned { padding: 10px 12px; max-width: min(340px, calc(100vw - 16px)); }
.tip .tip-open { display: block; margin-top: 8px; padding: 8px 0 2px; border-top: 1px solid color-mix(in srgb, var(--surface) 30%, transparent); color: var(--surface); font-weight: 650; text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .gsearch { max-width: none; }
  .site-nav a { padding: 8px 10px; }
}
@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .wrap { padding: 0 16px; }
  .brand-text span { display: none; }
  .js .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex: 0 0 auto; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: ""; }
  .menu-icon::before { position: absolute; top: -6px; } .menu-icon::after { position: absolute; top: 6px; }
  .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 8px 16px 14px; display: none; }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 2px; }
  .js .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .site-nav { margin-left: 0; }
  html:not(.js) .site-header .bar { flex-wrap: wrap; padding-bottom: 8px; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
  .gsearch { flex: 1 1 auto; }
  .gsearch-panel { position: fixed; left: 8px; right: 8px; top: calc(var(--header-h) + 6px); min-width: 0; width: auto; }
  table.data th { position: static; }
  .section { padding: 16px; }
  .section table.data, .section .scroll { margin: 0; width: 100%; }
  .subnav { top: var(--header-h); }
  /* tables become cards */
  table.cards thead { position: absolute; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 10px; background: var(--surface); box-shadow: var(--shadow-sm); }
  table.cards tr[hidden] { display: none; }
  table.cards td, table.cards th[scope="row"] { border: 0; padding: 3px 0; display: block; text-align: right; min-width: 0; overflow-wrap: anywhere; }
  table.cards td::before, table.cards th[scope="row"]::before { content: attr(data-label) / ""; float: left; margin-right: 12px; color: var(--ink-2); font-size: 0.82rem; font-weight: 400; text-align: left; }
  table.cards td.wide { text-align: left; }
  table.cards td.wide::before { display: none; }
  table.cards td:empty { display: none; }
  table.cards tbody tr:hover { background: var(--surface); }
  table.sortable thead { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  table.sortable thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; border: 0; padding: 0; margin: 0 0 10px; background: transparent; box-shadow: none; }
  table.sortable thead tr::before { content: "Ordenar por:" / ""; color: var(--ink-2); font-size: 0.85rem; }
  table.sortable thead th { display: inline-block; border: 1px solid var(--line-2); border-radius: 999px; padding: 0; position: static; font-size: 0.82rem; background: var(--surface); }
  table.sortable th[data-sort] button { padding: 10px 14px; min-height: 40px; box-sizing: border-box; }
  table.sortable thead th[aria-sort] { background: var(--accent-soft); border-color: var(--link); color: var(--link); font-weight: 700; }
  table.sortable thead th.dist { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; border: 0; }
  table.vtable tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; }
  table.vtable td { text-align: left; }
  table.vtable td::before { float: none; display: block; margin: 0; }
  table.vtable td[data-label="Vereador"], table.vtable td.dist { grid-column: 1 / -1; }
  table.vtable td.dist .seg { width: 100%; }
  table.vtable td[data-label="Vereador"]::before, table.vtable td.dist::before { display: none; }
  table.vtable td[data-label="Partido atual"] { grid-column: 1 / -1; }
  table.vtable td[data-label="Partido atual"]::before { display: inline; margin-right: 6px; }
  table.hist tr { display: flex; flex-direction: column; }
  table.bars, table.bars tbody { display: block; }
  table.bars thead { display: none; }
  table.bars tr { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.bars td { border: 0; padding: 0; }
  table.bars td.name, table.bars td.barcol { flex: 0 0 100%; min-width: 0; width: 100%; }
  table.bars td.r::before { content: attr(data-label) " "; color: var(--ink-2); font-size: 0.82rem; }
  dl.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  ul.people { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile-value { font-size: 1.45rem; }
  .profile { align-items: flex-start; gap: 14px; }
  .profile-card { padding: 16px; gap: 14px; align-items: flex-start; }
  .profile-card.with-side { grid-template-columns: auto minmax(0, 1fr); }
  .profile-card.with-side .badges { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bdg { padding: 7px 9px; }
  .b-v { font-size: 1.15rem; }
  .pc-causas .chip { white-space: nowrap; flex: 0 0 auto; }
  .pc-causas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .standout li { grid-template-columns: auto minmax(0, 1fr); }
  .standout li .seats { grid-column: 2; }
  .mat-layout { grid-template-columns: minmax(0, 1fr); }
  .tracker { padding: 10px 12px; flex-wrap: nowrap; }
  .tracker li { min-width: 0; padding-top: 26px; }
  .tr-dot { width: 20px; height: 20px; font-size: 0.65rem; }
  .tracker li::before { top: 9px; }
  .tr-t { font-size: 0.72rem; }
  .tr-d { font-size: 0.68rem; }
  .mlog li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  html:has(.ptabs) { scroll-padding-top: calc(var(--header-h) + 62px); }
  .person-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .person-side { display: contents; }
  .ptabs { position: sticky; top: var(--header-h); z-index: 15; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 999px; }
  .ptabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
  .person-main { order: 1; }
  .ficha { order: 2; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .face-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .mat-side { position: static; max-height: none; overflow: visible; }
  .profile-card .avatar { --s: 72px !important; }
  .section .items.flat { margin: 4px -14px 0; }
  .section .items.flat .item { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 640px) {
  .mobile-only { display: block; }
  .chip { white-space: normal; }
  .section { padding: 16px; }
  .section .items { margin: 10px -16px 0; }
  .section .items .item { padding-left: 16px; padding-right: 16px; }
  .section .items:last-child { margin-bottom: -16px; }
  ul.people, .section ul.people { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 29%; grid-template-rows: repeat(2, auto); overflow-x: auto; gap: 4px; scroll-snap-type: x proximity; padding-bottom: 6px; }
  ul.people li { scroll-snap-align: start; }
  .grupo { grid-template-columns: minmax(0, 1fr); }
  table.dotplot thead th:not(:nth-child(2)), table.dotplot td.r, table.dotplot td:last-child { display: none; }
  table.dotplot tr { display: grid; grid-template-columns: minmax(0, 1fr); }
  table.dotplot th[scope="row"] { width: auto; border-bottom: 0; padding-bottom: 0; }
  table.dotplot td.dp-track { min-width: 0; height: 26px; }
  table.dotplot thead th:nth-child(2) { display: block; }
  .item.has-score { grid-template-columns: minmax(0, 1fr); }
  .item.has-score > .item-score { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; margin-top: 6px; }
  .meters li { grid-template-columns: minmax(0, 1fr) auto; }
  table.divbars td.r, table.divbars thead th.r { display: none; }
  table.divbars, table.divbars tbody { display: block; }
  table.divbars thead { display: block; }
  table.divbars thead tr { display: grid; }
  table.divbars thead th:first-child { display: none; }
  table.divbars tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line); padding: 4px 0; }
  table.divbars th[scope="row"], table.divbars td.db-track { width: auto; border: 0; padding: 2px 4px; }
  /* councillors table on phones: face, name, party and the bar; numbers in the tooltips */
  table.vtable td:not([data-label="Vereador"]):not(.dist) { display: none; }
  table.vtable tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 12px; }
  table.vtable td.dist .seg { width: 100%; }
  .m-only { display: inline; }
  .pc-causas { flex-wrap: wrap; overflow: visible; }
  td.db-track, .db-axis { min-width: 140px; }
  table.rollcall th[scope="row"] { max-width: 130px; }
  .sg-group { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hbars li, .tema-bars li, .contra-bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .hbars .hb-track { grid-column: 1 / -1; grid-row: 2; }
  .meters li { grid-template-columns: minmax(0, 1fr) auto; }
  .meters .meter-track { grid-column: 1 / -1; grid-row: 2; }
  .axis-labels { font-size: 0.7rem; }
  .grupo li { white-space: normal; }
  table.tema-tbl .c-total { display: none; }
  table.tema-tbl td:first-child { min-width: 0; }
  table.tema-tbl td, table.tema-tbl th { padding-left: 4px; padding-right: 4px; }
  /* header: search behind an icon */
  .js .gsearch { display: none; }
  .js .search-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
  .js .search-btn .gsearch-icon { position: relative; left: -2px; top: auto; margin: 0; }
  .js .site-header.search-open .gsearch { display: block; flex: 1 1 auto; }
  .js .site-header.search-open .brand, .js .site-header.search-open .menu-btn, .js .site-header.search-open .search-btn { display: none; }
  .js .site-header.search-open .gsearch input[type="search"] { padding-right: 48px; }
  .js .gsearch-close:not([hidden]) { display: inline-grid; place-items: center; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.5rem; cursor: pointer; }
  /* filters: search + "Filtros" button; the rest opens on demand */
  .filters.has-toggle .filter-toggle { display: inline-flex; align-items: center; min-height: 42px; align-self: flex-end; }
  .filters.has-toggle:not(.open) > label:not(.grow), .filters.has-toggle:not(.open) > .hint { display: none; }
  .filters.has-toggle > label.grow { flex: 1 1 160px; }
  .filters > label:not(.grow):not(.check) { flex: 1 1 calc(50% - 7px); min-width: 0; }
  .filters select, .filters input[type="search"] { width: 100%; min-width: 0; }
  .filters > label:has(input[type="search"]) { flex: 1 1 160px; }
  .filters label.check { flex: 1 1 100%; padding-bottom: 0; min-height: 36px; }
  .filters output { flex-basis: 100%; margin-left: 0; padding-bottom: 0; }
  .hero { padding-top: 12px; }
  .search-row { border-radius: var(--radius); }
  .item { padding: 12px 14px; }
}
@media print {
  .site-header, .filters, .site-footer, .subnav { display: none; }
  main.wrap { padding: 0; }
  .section, .item, .card, .tile { box-shadow: none; }
}
table.vtable td[data-label="Faltas (portal)"] { white-space: nowrap; }
.ficha.infobox .side-h { display: block; font-size: 0.82rem; margin: 6px 0 4px; }
.leg-tag { font-variant-numeric: tabular-nums; }
