@font-face { font-family:'Public Sans'; font-style:normal; font-weight:100 900; font-display:swap; src:url('/assets/public-sans-variable.ttf') format('truetype'); }

:root {
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f4f7fb;
  --border: #d7dee8;
  --text: #13233a;
  --text-muted: #4a5a73;
  --text-subtle: #7a8aa0;
  --accent: #1f4e79;
  --accent-strong: #163a5c;
  --accent-soft: #e7f0fb;
  --accent-warm: #d05a3a;
  --shadow-soft: 0 10px 20px rgba(27, 43, 70, 0.08);
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-display: 'Public Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Public Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body.page-home,
body.page-election-mock,
body.page-candidate-mock {
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 16px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  z-index: 99;
}

.skip-link:focus {
  top: 16px;
}

.suggestion-name {
  font-weight: 600;
}

.suggestion-meta {
  color: var(--text-subtle);
  font-size: 0.85rem;
}

.form-card {
  margin-top: 16px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form textarea.mock-form-input {
  border-radius: var(--radius-md);
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-message {
  border: 1px solid var(--border);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  color: var(--text);
}

.form-message.is-error {
  background: #f5d8d8;
  border-color: #e5b1b1;
  color: #7a1f1f;
}

.honeypot {
  display: none;
}

.page-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 0 60px;
}

.home-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home-links a {
  color: inherit;
  font-weight: 600;
}

.home-links a:hover {
  color: var(--accent);
}

.search-hero {
  background: transparent;
  border: 0;
  padding: 16px 0;
}

.search-hero .search-bar {
  background: transparent;
  border: 1px solid var(--border);
}

.quick-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.quick-label {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.stat-card {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 12px;
  box-shadow: none;
}

.stat-card:last-child {
  border-right: 0;
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 6px;
}

.stat-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.feature-left .grid {
  margin-top: 12px;
}

.feature-card .map-placeholder {
  height: 110px;
}

.feature-card {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.feature-card:last-child {
  border-bottom: 0;
}

.feature-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.jump-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.jump-card a {
  color: var(--accent);
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.jump-card a:last-child {
  border-bottom: 0;
}

.filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.btn-reset {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.results-table {
  display: none;
}

.results-cards {
  display: grid;
  gap: 16px;
}

.result-meta {
  display: grid;
  gap: 4px;
}

.result-title {
  font-weight: 700;
}

.result-title-link {
  color: inherit;
  text-decoration: none;
}

.result-title-link:hover .result-title,
.result-title-link:focus-visible .result-title {
  color: var(--accent);
}

.result-action {
  text-align: right;
  white-space: nowrap;
}

.result-line {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 6px;
}

.result-divider {
  margin: 0 6px;
  color: var(--text-subtle);
}

.result-link,
.result-action a {
  color: var(--accent);
  font-weight: 600;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-muted);
}

.pagination button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.pagination button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.home-footer {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
}

.home-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-footer-latest {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
}

.home-footer-latest-label {
  font-weight: 600;
  color: var(--text-subtle);
}

.home-footer-links span {
  color: var(--text-subtle);
}

.home-footer-latest span {
  color: var(--text-subtle);
}

.home-footer a {
  color: inherit;
  font-weight: 600;
}

.home-footer-note {
  color: var(--text-subtle);
  max-width: 680px;
  margin: 0 auto;
}

.article {
  padding: 20px 0;
}

.article-header {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.article-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.article-body {
  padding-top: 20px;
  max-width: 720px;
}

.article-body h2 {
  font-size: 1.25rem;
  margin: 24px 0 8px;
}

.article-body p {
  margin: 0 0 14px;
  color: var(--text);
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 20px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.md-grid-2 {
  grid-template-columns: 1fr;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 14px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab-button {
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f3b64;
  flex: 1 1 120px;
  text-align: center;
}

.tab-button.is-active {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.overview-text {
  font-size: 0.95rem;
  line-height: 1.65;
}

.overview-text + .overview-text {
  margin-top: 12px;
}

.map-placeholder {
  height: 120px;
  border-radius: 0;
  border: 0;
  background: #f2f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8798;
  font-size: 0.85rem;
  font-weight: 600;
}

.map-large {
  height: 250px;
}

.boundary-map-wrap {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 12px;
  position: relative;
}

.boundary-map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.boundary-map-controls .map-zoom-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.boundary-map-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.boundary-map-viewport.is-dragging {
  cursor: grabbing;
}

.boundary-map-viewport {
  cursor: grab;
}

.boundary-map {
  width: 100%;
  height: 360px;
  display: block;
  transform-origin: center center;
  transition: transform 0.15s ease;
}

.boundary-shape {
  stroke: #ffffff;
  stroke-width: var(--map-stroke, 0.6);
  vector-effect: non-scaling-stroke;
  transition: opacity 0.15s ease;
}

.boundary-shape:hover,
.boundary-shape:focus {
  opacity: 0.82;
  outline: none;
}

.boundary-map-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  max-width: 220px;
  z-index: 3;
}

.boundary-map-tooltip.is-visible {
  opacity: 1;
}

.boundary-map-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.boundary-map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.boundary-map-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.winner-banner {
  text-align: center;
}

.candidate-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #e6ecf5;
  padding-top: 12px;
}

.candidate-row:first-child {
  border-top: none;
  padding-top: 0;
}

.candidate-meta {
  flex: 1;
  min-width: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #dbe4f0;
}

.bar-track {
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e9f2;
}

.bar-fill {
  height: 100%;
}

.bar-fill.blue {
  background: #1f4e79;
}

.bar-fill.red {
  background: #c0392b;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.footer-meta-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: #475569;
}

.hamburger {
  width: 36px;
  height: 36px;
  border: none;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1f3b64;
  margin: 0 auto;
}

.hero-media {
  position: relative;
  overflow: hidden;
  background: #1f3b64;
  min-height: 200px;
}

.hero-image {
  height: 220px;
  background: linear-gradient(120deg, #274c77, #1f3b64);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5f5;
  font-weight: 600;
}

.hero-overlay {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 16px;
  border-radius: 0;
}

.chart-placeholder {
  height: 180px;
  border-radius: 0;
  border: 0;
  background: #f2f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8798;
  font-weight: 600;
}

.performance-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.performance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e6ecf5;
  padding-top: 8px;
}

.performance-item:first-child {
  border-top: none;
  padding-top: 0;
}

.about-card {
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.thumb {
  width: 64px;
  height: 64px;
  border-radius: 0;
  background: #dbe4f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1f3b64;
}

.filter-row {
  display: grid;
  gap: 12px;
}

.select-input {
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid #d5dbe5;
  background: #fff;
  font-weight: 600;
  color: #1f3b64;
}

.shadow {
  box-shadow: none;
}

.rounded-xl {
  border-radius: 0;
}

.text-slate-900 {
  color: #0f172a;
}

.text-slate-600 {
  color: #4a5a73;
}

.text-blue-700 {
  color: #1f4e79;
}

.text-2xl {
  font-size: 1.55rem;
}

.text-lg {
  font-size: 1.1rem;
}

.text-base {
  font-size: 1rem;
}

.text-sm {
  font-size: 0.85rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.mt-4 {
  margin-top: 16px;
}

.grid {
  display: grid;
}

.gap-6 {
  gap: 24px;
}

.md-grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .md-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .results-table {
    display: block;
  }
  .results-cards {
    display: none;
  }
}

@media (max-width: 900px) {
  .home-links {
    display: none;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .shell {
    padding: 0 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }
  .stat-card {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
  }
  .stat-card:last-child {
    border-bottom: 0;
  }
  .page-wrap {
    gap: 14px;
    padding: 18px 0 44px;
  }
  .card,
  .stat-card,
  .jump-card,
  .search-hero {
    padding: 12px;
    border: 0;
    box-shadow: none;
  }
  .card.rounded-xl,
  .stat-card,
  .jump-card,
  .search-hero {
    border-radius: 0;
  }
.card .card {
  border: 0;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}
}

.table thead th {
  background: #f1f5fb;
  color: #1f3b64;
}

.table.table-primary thead th {
  background: transparent;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.page {
  padding-bottom: 72px;
}

.section {
  margin-bottom: 40px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.section-title h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.5rem;
}

.section-title span {
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: transparent;
  border-radius: 0;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.card-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.card-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 8px 0 4px;
}

.card-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.result-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid transparent;
}

.list-item strong {
  font-weight: 600;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.table th.num,
.table td.num {
  text-align: right;
}

.table th {
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: none;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.table th[data-sort] {
  cursor: pointer;
}

.table th[data-sort][data-sort-dir="asc"]::after {
  content: " ▲";
  font-size: 0.8em;
  color: var(--text-subtle);
}

.table th[data-sort][data-sort-dir="desc"]::after {
  content: " ▼";
  font-size: 0.8em;
  color: var(--text-subtle);
}

.table tfoot td {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: transparent;
}

.table-total td {
  font-weight: 600;
  background: transparent;
}

.table-compact th,
.table-compact td {
  padding: 8px 10px;
}

.muted {
  color: var(--text-muted);
}

.party-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.party-summary-table {
  min-width: 0;
}

.breakdown-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.breakdown-card .card-label {
  margin-bottom: 10px;
}

.breakdown-table {
  overflow-x: auto;
}

.breakdown-toggle {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.breakdown-toggle-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.breakdown-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.breakdown-container.is-hidden {
  display: none;
}

.breakdown-loading,
.breakdown-error {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breakdown-error {
  color: #c0392b;
}

.breakdown-actions {
  text-align: right;
  white-space: nowrap;
}

.breakdown-subrow td {
  background: var(--surface-alt);
  padding: 8px 10px;
}

.breakdown-subrow.is-collapsed {
  display: none;
}

.breakdown-subwrap {
  padding: 8px 0 4px 14px;
}

.breakdown-subdetails {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}

.breakdown-subdetails summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.breakdown-subdetails summary::marker {
  color: var(--accent);
}

.breakdown-subdetails[open] {
  background: var(--surface-alt);
}

.breakdown-subdetails table {
  margin-top: 8px;
}

.breakdown-subtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.breakdown-subtable th,
.breakdown-subtable td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.breakdown-subtable th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.breakdown-subtoggle {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.breakdown-subtoggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 8, 0.55);
}

.modal-dialog {
  position: relative;
  width: min(960px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  font-size: 1.05rem;
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-body {
  padding: 16px 20px 22px;
  overflow: auto;
}

.modal-meta {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.modal-loading,
.modal-error,
.modal-empty {
  padding: 12px 14px;
  background: var(--surface-alt);
  border-radius: 8px;
  color: var(--text-muted);
}

.party-summary-charts {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
}

.party-summary-chart {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.party-summary-chart .pie-chart {
  width: 84px;
  height: 84px;
}

@media (max-width: 900px) {
  .party-summary {
    grid-template-columns: 1fr;
  }

  .party-summary-charts {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    justify-items: start;
  }
}

.pie-cell {
  width: 72px;
  text-align: center;
}

.pie-chart {
  width: 56px;
  height: 56px;
}

.map-placeholder {
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--text-subtle);
  background: linear-gradient(135deg, rgba(15, 53, 86, 0.08), rgba(184, 72, 30, 0.05));
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 32px 0 48px;
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-brand {
  display: grid;
  gap: 12px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.footer-note {
  color: var(--text-muted);
  margin: 0;
}

.footer-group {
  display: grid;
  gap: 12px;
}

.footer-heading {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-subtle);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-meta {
  display: grid;
  gap: 8px;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.house-state {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.house-state summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.house-state summary::marker {
  color: var(--accent);
}

.house-state-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.house-state table {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .boundary-map {
    height: 260px;
  }
}

/* 2026 redesign overrides */

:root {
  --bg: #f4f1e8;
  --bg-soft: #ebe5d6;
  --surface: #fffdf8;
  --surface-alt: #f3ecdf;
  --surface-strong: #e7ddd0;
  --border: #d6c8b3;
  --border-strong: #b89f7f;
  --text: #1b2838;
  --text-muted: #58667b;
  --text-subtle: #7b8797;
  --accent: #8c3b2a;
  --accent-strong: #6f2c1e;
  --accent-soft: #f4d8cf;
  --accent-contrast: #fff8f4;
  --navy: #20364f;
  --navy-soft: #dde6ef;
  --shadow-soft: 0 18px 40px rgba(35, 38, 44, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

body,
body.page-home,
body.page-candidate-mock,
body.page-about,
body.page-article,
body.page-404 {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(140, 59, 42, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(32, 54, 79, 0.08), transparent 30%),
    linear-gradient(180deg, #f8f3ea 0%, #f3ede1 42%, #eee6d6 100%);
}

.shell {
  max-width: 1280px;
  padding: 0 28px;
}

.page {
  padding-bottom: 80px;
}

.page-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 0 0;
}

.card,
.site-panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(214, 200, 179, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.rounded-xl {
  border-radius: var(--radius-lg);
}

.shadow {
  box-shadow: var(--shadow-soft);
}

.section-kicker,
.footer-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.section-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.9vw, 2.05rem);
  line-height: 1.12;
  font-weight: 700;
}

.section-copy {
  max-width: 38rem;
  margin: 0;
  color: var(--text-muted);
}

.text-slate-600,
.text-sm {
  color: var(--text-muted);
}

.text-slate-900 {
  color: var(--text);
}

.text-2xl {
  font-family: var(--font-display);
}

.font-bold,
.font-semibold {
  letter-spacing: -0.01em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-hero-panel {
  padding: 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 24px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-point {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(32, 54, 79, 0.06);
  border: 1px solid rgba(32, 54, 79, 0.1);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-side {
  display: grid;
  gap: 16px;
}

.hero-side-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(214, 200, 179, 0.9);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 245, 0.9);
}

.hero-side-card.tone-accent {
  background: linear-gradient(180deg, rgba(36, 55, 80, 0.95), rgba(32, 54, 79, 0.9));
  color: #fff;
}

.hero-side-card.tone-accent .stat-label,
.hero-side-card.tone-accent .stat-note {
  color: rgba(255, 248, 244, 0.74);
}

.hero-side-card.tone-accent .stat-value {
  color: #fff;
}

.hero-stats-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  padding: 0;
}

.stat-card {
  min-height: 108px;
  padding: 16px;
  border: 1px solid rgba(214, 200, 179, 0.75);
  border-right: 1px solid rgba(214, 200, 179, 0.75);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 245, 0.75);
}

.hero-side-card.tone-accent .stat-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.stat-label {
  font-size: 0.7rem;
}

.stat-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2vw, 2rem);
  line-height: 1.05;
}

.start-grid {
  display: grid;
  gap: 12px;
}

.start-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(214, 200, 179, 0.9);
  background: #fffaf2;
}

.start-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.start-card-title,
.trust-title,
.collection-title,
.method-title,
.results-meta-title,
.feature-title,
.candidate-summary-item strong {
  font-weight: 700;
}

.start-card-copy,
.collection-copy,
.trust-card p,
.method-step p,
.explorer-side-note,
.home-footer-note,
.candidate-lead {
  margin: 0;
  color: var(--text-muted);
}

.start-card-meta {
  color: var(--text-subtle);
  font-size: 0.84rem;
}

.trust-grid,
.collection-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.trust-card,
.collection-card,
.method-step {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(214, 200, 179, 0.9);
  background: rgba(255, 251, 245, 0.88);
  box-shadow: var(--shadow-soft);
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  gap: 16px;
}

.feature-stack {
  display: grid;
  gap: 16px;
}

.feature-card {
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(214, 200, 179, 0.9);
}

.feature-card-top,
.feature-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-tag,
.feature-metric,
.feature-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.77rem;
  font-weight: 700;
}

.feature-tag {
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-metric,
.feature-chip {
  background: rgba(32, 54, 79, 0.08);
  color: var(--navy);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
}

.feature-subtitle {
  color: var(--text-subtle);
  font-size: 0.92rem;
}

.side-list-panel {
  padding: 20px;
}

.side-link-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.side-link-list a,
.inline-link,
.result-link,
.result-action a {
  color: var(--accent);
  font-weight: 700;
}

.side-link-list a {
  padding: 10px 0;
  border-bottom: 1px solid rgba(214, 200, 179, 0.8);
}

.explorer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
}

.explorer-sidebar,
.results-meta-bar,
.pagination {
  padding: 18px;
}

.filter-bar {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.select-input,
.mock-form-input {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(184, 159, 127, 0.85);
  background: rgba(255, 252, 247, 0.95);
  padding: 12px 14px;
  font-family: var(--font-body);
  color: var(--text);
}

.btn-reset {
  border-radius: 14px;
  min-height: 46px;
  border-color: rgba(184, 159, 127, 0.85);
  color: var(--accent);
  background: rgba(255, 248, 242, 0.9);
}

.results-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.results-meta-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.active-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(32, 54, 79, 0.08);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.results-table {
  display: block;
}

.results-table .card {
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  background: rgba(243, 236, 223, 0.72);
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(214, 200, 179, 0.7);
  vertical-align: top;
}

.table tbody tr:hover {
  background: rgba(243, 236, 223, 0.35);
}

.result-title {
  font-size: 1rem;
  line-height: 1.35;
}

.result-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.result-divider {
  color: var(--text-subtle);
}

.result-card {
  gap: 12px;
  padding: 18px;
  border-bottom: 0;
}

.results-cards {
  display: none;
  gap: 12px;
}

.pagination {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pagination button {
  border-radius: 999px;
  min-width: 92px;
  min-height: 42px;
  border-color: rgba(184, 159, 127, 0.85);
  background: #fffaf2;
}

.method-step {
  display: grid;
  gap: 10px;
}

.method-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent);
}

.home-footer {
  margin-top: 8px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(31, 50, 74, 0.96), rgba(27, 40, 56, 0.98));
  color: #e8edf3;
  box-shadow: var(--shadow-soft);
}

.home-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 20px;
  align-items: start;
}

.home-footer-links {
  display: grid;
  gap: 10px;
  justify-content: start;
}

.home-footer-links a,
.home-footer-latest a {
  color: #fff8f4;
}

.home-footer-latest {
  margin-top: 18px;
  justify-content: flex-start;
}

.home-footer-latest-label {
  color: rgba(255, 248, 244, 0.75);
}

.home-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(232, 237, 243, 0.82);
  font-size: 0.9rem;
}

.footer-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 1.8vw, 1.8rem);
  line-height: 1.08;
  font-weight: 700;
}

.article,
.candidate-hero {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(214, 200, 179, 0.9);
  box-shadow: var(--shadow-soft);
}

.article-header {
  padding-bottom: 18px;
  border-bottom-color: rgba(214, 200, 179, 0.7);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
}

.article-body {
  max-width: 760px;
}

.article-body h2,
.article-body h3 {
  font-family: var(--font-display);
}

.candidate-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
}

.candidate-hero-copy,
.candidate-hero-card,
.candidate-summary-list {
  display: grid;
  gap: 14px;
}

.candidate-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(214, 200, 179, 0.7);
}

.candidate-summary-item span {
  color: var(--text-subtle);
}

.candidate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-timeline {
  display: grid;
}

.candidate-timeline-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(214, 200, 179, 0.7);
}

.candidate-timeline-row:last-child,
.candidate-summary-item:last-child {
  border-bottom: 0;
}

.candidate-timeline-year,
.candidate-timeline-percent {
  font-weight: 700;
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.about-card {
  display: flex;
  gap: 16px;
  align-items: center;
}

.overview-text,
.list,
.list-item,
.breakdown-loading,
.breakdown-error {
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(140, 59, 42, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.boundary-map-wrap,
.party-summary,
.candidate-list,
.table-compact,
.breakdown-table {
  border-radius: var(--radius-md);
}

.footer-meta-row {
  padding: 14px 18px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .feature-grid,
  .explorer-grid,
  .candidate-hero,
  .home-footer-top {
    grid-template-columns: 1fr;
  }

  .results-meta-side {
    justify-items: start;
  }

  .active-filter-list {
    justify-content: flex-start;
  }

  .hero-points,
  .trust-grid,
  .collection-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0 16px;
  }

  .page-wrap {
    gap: 18px;
    padding-top: 16px;
  }

  .home-hero-panel,
  .article,
  .candidate-hero,
  .home-footer,
  .explorer-sidebar,
  .results-meta-bar,
  .pagination,
  .trust-card,
  .collection-card,
  .method-step,
  .feature-card,
  .result-card {
    padding: 18px;
  }

  .results-table {
    display: none;
  }

  .results-cards {
    display: grid;
  }

  .results-meta-bar,
  .pagination,
  .candidate-summary-item,
  .home-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid,
  .hero-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .candidate-timeline-row {
    grid-template-columns: 1fr;
  }
}

/* mockup alignment overrides */

:root {
  --bg: #e9edf2;
  --bg-soft: #dde3eb;
  --surface: #f8fafc;
  --surface-alt: #eef3f8;
  --surface-strong: #d7e0eb;
  --border: #c7d1de;
  --border-strong: #9eafc5;
  --text: #173b6b;
  --text-muted: #455f84;
  --text-subtle: #6a7f9e;
  --accent: #1f4f8a;
  --accent-strong: #163f72;
  --accent-soft: #dfe9f6;
  --accent-contrast: #ffffff;
  --navy: #173b6b;
  --navy-soft: #dbe6f4;
  --shadow-soft: 0 14px 34px rgba(33, 52, 78, 0.12);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
}

body,
body.page-home,
body.page-candidate-mock,
body.page-about,
body.page-article,
body.page-404 {
  background: #e6eaef;
}

.page-wrap {
  gap: 22px;
  padding-top: 34px;
}

.mock-home-card,
.mock-candidate-card,
.mock-election-shell {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  background: #f5f7fa;
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
}

.mock-home-card {
  max-width: 860px;
  padding: 0 0 18px;
}

.mock-candidate-card {
  max-width: 780px;
  padding: 0 0 18px;
}

.mock-election-shell {
  max-width: 920px;
  padding: 0 0 18px;
}

.mock-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--border);
  background: #f7f9fc;
}

.mock-panel-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.mock-panel-logo {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  text-decoration: none;
  flex: 0 0 auto;
}

.mock-panel-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4d84 0%, #12355f 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.mock-brand-block,
.mock-brand-stack {
  display: grid;
  gap: 2px;
}

.mock-brand-title,
.mock-page-title {
  font-family: var(--font-body);
  font-size: clamp(1.54rem, 2.35vw, 1.92rem);
  color: var(--navy);
  min-width: 0;
}

.mock-brand-title {
  font-weight: 700;
}

.mock-page-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.mock-page-title-primary {
  font-weight: 700;
}

.mock-page-title-secondary {
  font-size: 0.86em;
  font-weight: 500;
  color: #234d7d;
}

.mock-brand-subtitle {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  font-weight: 600;
}

.mock-panel-action {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
}

.mock-search-bar {
  margin: 18px 24px 14px;
  display: grid;
  grid-template-columns: 1fr 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.mock-search-bar input {
  border: 0;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
}

.mock-search-bar button {
  border: 0;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
}

.mock-search-icon {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.mock-search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: currentColor;
  right: -6px;
  bottom: -3px;
  transform: rotate(45deg);
  border-radius: 999px;
}

.mock-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 14px;
}

.mock-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #edf2f8;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.88rem;
}

.mock-chip:hover {
  border-color: var(--accent);
}

.mock-section {
  padding: 0 24px;
  margin-top: 16px;
}

.mock-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 700;
}

.mock-section-subtitle {
  margin: -4px 0 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.summary-shell {
  display: grid;
  gap: 16px;
}

.summary-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.summary-stat {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
}

.summary-stat-label {
  color: var(--text-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-stat-value {
  margin-top: 4px;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
}

.summary-stat-note {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.overview-shell {
  display: grid;
  gap: 16px;
}

.overview-copy {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px 18px;
}

.overview-lead {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 600;
}

.overview-lead + .overview-text,
.overview-text + .overview-text {
  margin-top: 12px;
}

.summary-table-wrap {
  overflow-x: auto;
}

.summary-data-table {
  min-width: 720px;
}

.summary-district-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.summary-district-link:hover,
.summary-district-link:focus-visible {
  text-decoration: underline;
}

.summary-party-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.summary-party-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.summary-share-cell {
  display: grid;
  gap: 6px;
  min-width: 130px;
}

.summary-share-value,
.summary-share-empty {
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
}

.summary-share-track {
  height: 7px;
  border-radius: 999px;
  background: #dbe3ee;
  overflow: hidden;
}

.summary-share-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.district-result-shell {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.district-result-shell + .district-result-shell {
  margin-top: 14px;
}

.district-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.district-result-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.district-stage-block {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.district-stage-label {
  margin-bottom: 10px;
  color: var(--text-subtle);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.district-stage-block .table {
  background: #fff;
}

.district-stage-block .table tfoot td {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.district-stage-block .breakdown-toggle {
  margin-top: 12px;
}

.stage-toggle {
  margin-top: 10px;
}

.guide-index-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 0;
}

.guide-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.guide-card-top,
.guide-breadcrumbs,
.guide-inline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-card-kicker,
.guide-card-meta,
.guide-breadcrumbs,
.guide-inline-meta,
.guide-section-label,
.guide-library-label {
  color: var(--text-subtle);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-section-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  align-items: start;
}

.guide-copy-block {
  display: grid;
  gap: 12px;
}

.guide-section-title {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: clamp(1.72rem, 2.4vw, 2.18rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.guide-section-copy {
  margin: 0;
  max-width: 780px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

.guide-library-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.guide-library-value {
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
}

.guide-library-copy {
  margin: 0;
  color: var(--text-muted);
}

.guide-library-link {
  color: var(--accent);
  font-weight: 700;
}

.guide-card-title {
  margin: 0;
  color: var(--navy);
  font-size: 1.18rem;
  line-height: 1.25;
}

.guide-card-copy {
  margin: 0;
  color: var(--text-muted);
}

.mock-form-input {
  border-radius: 0;
  border: 1px solid #cfd8e4;
  background: #fff;
  padding: 12px 14px;
  font-family: var(--font-body);
  color: var(--text);
}

.mock-form-input:focus {
  outline: none;
  border-color: #7f9dc2;
  box-shadow: 0 0 0 2px rgba(53, 85, 127, 0.12);
}

.mock-form-textarea {
  min-height: 132px;
  resize: vertical;
}

.mock-form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 0;
  border: 1px solid #214f87;
  background: #214f87;
  color: #fff;
  font-weight: 700;
}

.mock-form-button:hover {
  background: #173f74;
  border-color: #173f74;
}

.mock-form-field {
  display: grid;
  gap: 6px;
}

.mock-form-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.mock-form-help {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.mock-form-footnote {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.mock-search-shell {
  position: relative;
}

.mock-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
}

.mock-search-suggestion {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid transparent;
  text-decoration: none;
}

.mock-search-suggestion:hover,
.mock-search-suggestion:focus-visible {
  border-color: #cfd8e4;
  background: #eef3f8;
  outline: none;
}

.election-search-shell {
  max-width: 720px;
}

.election-search-input {
  min-height: 50px;
  font-size: 0.98rem;
  padding: 14px 16px;
}

.election-browse-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.election-browse-card {
  gap: 14px;
}

.election-browse-year {
  color: var(--text-subtle);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.election-browse-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mock-chip.is-muted {
  pointer-events: none;
  opacity: 0.65;
}

.about-source-group + .about-source-group {
  margin-top: 28px;
}

.about-source-group .guide-inline-meta {
  margin-bottom: 14px;
}

.about-contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.about-contact-panel,
.about-contact-form-shell {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 20px;
}

.about-contact-panel {
  display: grid;
  gap: 14px;
}

.about-contact-points {
  display: grid;
  gap: 12px;
}

.about-contact-point {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid #d9e1eb;
}

.about-contact-point strong {
  color: var(--navy);
  font-size: 0.94rem;
}

.about-contact-point span {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.about-contact-form-shell {
  display: grid;
  gap: 16px;
}

.about-contact-form-head {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d9e1eb;
}

.about-contact-form-title {
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.about-contact-form-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.contact-form-grid {
  display: grid;
  gap: 16px;
}

.mock-form-field-wide {
  grid-column: 1 / -1;
}

.about-contact-actions {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid #d9e1eb;
}

.guide-card-link,
.guide-library-link {
  color: var(--accent);
  font-weight: 700;
}

.guide-article-body {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.guide-article-body h2,
.guide-article-body h3 {
  color: var(--navy);
  margin: 28px 0 10px;
}

.guide-article-body p {
  margin: 0 0 14px;
}

.guide-article-intro {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.62;
  margin: 0 0 18px;
}

.guide-article-body ul,
.guide-article-body ol {
  margin: 0 0 18px 22px;
}

.guide-article-body li {
  margin-bottom: 8px;
}

.guide-article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.home-footer {
  position: relative;
  width: 100vw;
  margin-top: 0;
  margin-left: calc(50% - 50vw);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #e8edf3;
}

.home-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 41, 60, 0.98), rgba(20, 31, 47, 1));
  border-top: 1px solid rgba(226, 232, 240, 0.12);
}

.home-footer-inner {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 28px 0 30px;
}

.home-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}

.home-footer-intro {
  display: grid;
  gap: 10px;
}

.home-footer-note {
  max-width: 680px;
  margin: 0;
  color: rgba(232, 237, 243, 0.82);
}

.home-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgba(232, 237, 243, 0.68);
  font-size: 0.86rem;
}

.home-footer-groups {
  display: grid;
  gap: 18px 24px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.home-footer-group {
  display: grid;
  gap: 10px;
}

.home-footer-group-heading {
  color: rgba(255, 248, 244, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-footer-group-links {
  display: grid;
  gap: 8px;
}

.home-footer-group-links a,
.home-footer-latest a {
  color: #fff8f4;
}

.home-footer-latest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.home-footer-latest span {
  color: rgba(232, 237, 243, 0.42);
}

.home-footer-latest-label {
  color: rgba(255, 248, 244, 0.72);
  font-weight: 600;
}

@media (max-width: 980px) {
  .home-footer-inner {
    width: min(1080px, calc(100vw - 36px));
    padding: 24px 0 26px;
  }

  .home-footer-top {
    grid-template-columns: 1fr;
  }

  .home-footer-groups {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}

@media (max-width: 980px) {
  .guide-section-grid {
    grid-template-columns: 1fr;
  }
}

.mock-heading-rule {
  height: 1px;
  flex: 1;
  background: var(--border);
}

.top-election-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.top-election-card {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 8px;
  border-radius: 4px;
}

.top-election-thumb {
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 4px;
  margin-bottom: 10px;
  background:
    radial-gradient(circle at 20% 35%, rgba(49, 113, 202, 0.85), transparent 18%),
    radial-gradient(circle at 48% 54%, rgba(227, 73, 71, 0.9), transparent 20%),
    radial-gradient(circle at 72% 45%, rgba(49, 113, 202, 0.9), transparent 20%),
    linear-gradient(135deg, #dbe8f8 0%, #f5f8fb 100%);
}

.top-election-thumb.tone-2 {
  background:
    radial-gradient(circle at 22% 42%, rgba(49, 113, 202, 0.85), transparent 18%),
    radial-gradient(circle at 60% 38%, rgba(227, 73, 71, 0.9), transparent 22%),
    radial-gradient(circle at 74% 70%, rgba(49, 113, 202, 0.9), transparent 18%),
    linear-gradient(135deg, #dbe8f8 0%, #f5f8fb 100%);
}

.top-election-thumb.tone-3 {
  background:
    radial-gradient(circle at 20% 52%, rgba(49, 113, 202, 0.85), transparent 18%),
    radial-gradient(circle at 52% 44%, rgba(227, 73, 71, 0.9), transparent 24%),
    radial-gradient(circle at 80% 26%, rgba(49, 113, 202, 0.9), transparent 16%),
    linear-gradient(135deg, #dbe8f8 0%, #f5f8fb 100%);
}

.top-election-map {
  padding: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.home-boundary-map {
  width: 100%;
  height: 100%;
  display: block;
  background: #edf3f9;
  border-radius: 2px;
}

.home-boundary-shape {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}

.top-election-map-empty {
  background:
    linear-gradient(180deg, rgba(32, 81, 141, 0.18), rgba(32, 81, 141, 0.05)),
    linear-gradient(135deg, #d5e0ef 0%, #f8fafc 100%);
}

.top-election-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
}

.top-election-copy {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.mock-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.mock-filter-field {
  position: relative;
  display: grid;
}

.mock-filter-inside-label {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #35557f;
  pointer-events: none;
}

.mock-filter-select {
  min-height: 44px;
  padding: 20px 38px 8px 12px;
  border: 1px solid #cfd8e4;
  border-radius: 0;
  background-color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e3c68;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #35557f 50%),
    linear-gradient(135deg, #35557f 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.mock-filter-select:focus {
  outline: none;
  border-color: #7f9dc2;
  box-shadow: 0 0 0 2px rgba(53, 85, 127, 0.12);
}

.mock-results-table .card {
  border-radius: 4px;
  overflow: hidden;
}

.mock-results-table .table thead th {
  background: linear-gradient(180deg, #20518d 0%, #173f74 100%);
  color: #fff;
  font-size: 0.86rem;
  text-transform: none;
  letter-spacing: 0;
}

.mock-results-table .table th,
.mock-results-table .table td {
  padding: 12px 14px;
}

.mock-pagination {
  margin: 14px 24px 0;
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 12px 16px;
}

.mock-menu-button {
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.mock-menu-button span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 999px;
}

.candidate-banner {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  margin: 12px 16px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(90deg, #6d8cb2 0%, #1d4f8c 52%, #1a467c 100%);
}

.candidate-banner-photo {
  background: linear-gradient(135deg, #89a4c6 0%, #5d7ea8 100%);
  min-height: 160px;
  display: grid;
  place-items: center;
}

.candidate-banner-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  border: 3px solid rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
}

.candidate-banner-copy {
  padding: 24px;
  color: #fff;
  display: grid;
  align-content: center;
  gap: 12px;
}

.candidate-banner-role {
  font-size: 0.94rem;
  font-weight: 600;
}

.candidate-banner-race {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.94rem;
  font-weight: 500;
}

.candidate-chart-panel {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.candidate-line-chart {
  width: 100%;
  height: auto;
}

.chart-axis {
  stroke: #c6d0db;
  stroke-width: 1.5;
}

.chart-line {
  fill: none;
  stroke: #2f69b0;
  stroke-width: 2.5;
}

.chart-point {
  fill: #1f4f8a;
}

.chart-label {
  fill: var(--text-subtle);
  font-size: 11px;
}

.chart-value {
  fill: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.candidate-about-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.candidate-about-thumb {
  width: 78px;
  height: 78px;
  border-radius: 4px;
  background: linear-gradient(135deg, #89a4c6 0%, #5d7ea8 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.candidate-about-copy {
  margin: 0;
  color: var(--text-muted);
}

.candidate-issues-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.issue-card {
  border: 1px solid var(--border);
  background: #f3f6fa;
  border-radius: 4px;
  padding: 14px 12px;
  text-align: center;
}

.issue-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.issue-label {
  font-weight: 700;
  color: var(--navy);
}

.mock-election-meta-line {
  padding: 16px 24px 4px;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 500;
}

.guide-inline-meta,
.mock-election-meta-line {
  color: var(--text-subtle);
  font-size: 0.89rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.about-heading-panel {
  padding-top: 26px;
  padding-bottom: 26px;
}

.mock-election-winner {
  padding: 8px 0 12px;
  font-size: clamp(1.58rem, 2.15vw, 1.82rem);
  font-weight: 700;
  color: var(--navy);
}

.mock-candidate-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.mock-candidate-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.mock-candidate-name {
  font-weight: 700;
  color: var(--navy);
}

.mock-candidate-name span {
  font-weight: 500;
  color: var(--text-muted);
}

.mock-candidate-votes {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--navy);
  text-align: right;
}

.mock-candidate-votes strong {
  font-size: 1rem;
  font-weight: 700;
}

.mock-candidate-votes span {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mock-map-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  background: #fbfcfe;
}

.mock-map-card .map-placeholder {
  height: 220px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(32, 81, 141, 0.18), rgba(32, 81, 141, 0.05)),
    linear-gradient(135deg, #d5e0ef 0%, #f8fafc 100%);
}

.mock-breakdown-card {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.mock-breakdown-item + .mock-breakdown-item {
  margin-top: 16px;
}

.mock-breakdown-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.mock-breakdown-label {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
}

.mock-breakdown-label span {
  color: var(--text-muted);
  font-weight: 600;
}

.mock-breakdown-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.mock-breakdown-stat {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.mock-breakdown-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #dbe2eb;
}

.mock-breakdown-fill {
  height: 100%;
  min-width: 10px;
  border-radius: inherit;
}

.mock-detail-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 18px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.mock-detail-footer a {
  color: var(--accent);
}

@media (max-width: 900px) {
  .top-election-grid,
  .candidate-issues-grid,
  .mock-filter-row,
  .candidate-banner,
  .candidate-about-row {
    grid-template-columns: 1fr;
  }

  .mock-breakdown-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 720px) {
  .mock-panel-bar,
  .mock-search-bar,
  .mock-section,
  .mock-election-meta-line,
  .mock-pagination {
    margin-left: 16px;
    margin-right: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  .mock-panel-bar {
    padding: 16px 0 12px;
  }

  .mock-home-card,
  .mock-candidate-card,
  .mock-election-shell {
    padding-bottom: 14px;
  }

  .top-election-grid {
    grid-template-columns: 1fr;
  }

  .mock-results-table {
    display: none;
  }

  .results-cards {
    display: grid;
    padding: 0 24px;
  }
}

/* full-width layout override */

.shell {
  max-width: 1480px;
  padding: 0 28px;
}

.page-wrap {
  gap: 0;
  padding-top: 18px;
}

.mock-home-card,
.mock-candidate-card,
.mock-election-shell {
  margin: 0 auto;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.mock-home-card {
  max-width: 1080px;
}

.mock-election-shell {
  max-width: 1080px;
}

.mock-candidate-card {
  max-width: 1080px;
}

.mock-home-card {
  padding-bottom: 24px;
}

.mock-candidate-card,
.mock-election-shell {
  padding-bottom: 24px;
}

@media (max-width: 720px) {
  .shell {
    padding: 0 14px;
  }

  .page-wrap {
    padding-top: 6px;
  }

  .mock-panel-bar,
  .mock-search-bar,
  .mock-section,
  .mock-election-meta-line,
  .mock-pagination {
    margin-left: 0;
    margin-right: 0;
  }
}

/* responsive section alignment overrides */

.mock-home-card,
.mock-candidate-card,
.mock-election-shell {
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
}

.mock-section + .mock-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 18px;
}

.mock-results-table .card {
  background: #f8fafc;
}

.mock-election-meta-line + .mock-section {
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .mock-home-card {
    max-width: 1080px;
  }

  .top-election-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mock-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-issues-grid,
  .candidate-banner,
  .candidate-about-row {
    grid-template-columns: 1fr;
  }

  .mock-breakdown-row {
    grid-template-columns: 1fr;
  }

  .mock-candidate-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .mock-candidate-votes {
    grid-column: 2;
    font-size: 0.95rem;
  }

  .mock-results-table {
    display: none;
  }

  .results-cards {
    display: grid;
    padding: 0 24px;
  }
}

@media (max-width: 640px) {
  .top-election-grid,
  .mock-filter-row,
  .candidate-issues-grid {
    grid-template-columns: 1fr;
  }

  .mock-panel-heading {
    gap: 12px;
  }

  .mock-brand-title,
  .mock-page-title {
    font-size: 1.8rem;
  }

  .mock-election-winner {
    font-size: 1.55rem;
  }

  .mock-detail-footer {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .mock-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .mock-panel-bar {
    padding: 16px 18px 12px;
  }

  .mock-panel-heading {
    width: 100%;
    align-items: flex-start;
  }

  .mock-panel-logo-mark {
    width: 38px;
    height: 38px;
  }

  .mock-search-bar {
    margin-left: 18px;
    margin-right: 18px;
  }

  .mock-chip-row,
  .results-cards {
    padding-left: 18px;
    padding-right: 18px;
  }

  .mock-election-meta-line,
  .mock-pagination {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* full-bleed mock page wrappers with centered content sections */

body.page-home-mock .shell,
body.page-candidate-mock .shell,
body.page-election-mock .shell {
  max-width: none;
  width: 100%;
  padding-left: clamp(16px, 2.4vw, 32px);
  padding-right: clamp(16px, 2.4vw, 32px);
}

.mock-home-card.site-panel,
.mock-candidate-card.site-panel,
.mock-election-shell.site-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-bottom: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.mock-home-card,
.mock-candidate-card,
.mock-election-shell {
  display: block;
  background: transparent !important;
}

.mock-home-card > .mock-panel-bar,
.mock-home-card > .mock-search-bar,
.mock-home-card > .mock-chip-row,
.mock-home-card > .mock-section,
.mock-home-card > .mock-pagination {
  max-width: 1080px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.mock-election-shell > .mock-panel-bar,
.mock-election-shell > .mock-election-meta-line,
.mock-election-shell > .mock-section {
  max-width: 1080px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.mock-candidate-card > .mock-panel-bar,
.mock-candidate-card > .candidate-banner,
.mock-candidate-card > .mock-section {
  max-width: 1080px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.mock-candidate-card > .candidate-banner {
  margin-top: 12px;
}

@media (max-width: 720px) {
  body.page-home-mock .shell,
  body.page-candidate-mock .shell,
  body.page-election-mock .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mock-home-card > .mock-panel-bar,
  .mock-home-card > .mock-search-bar,
  .mock-home-card > .mock-chip-row,
  .mock-home-card > .mock-section,
  .mock-home-card > .mock-pagination,
  .mock-election-shell > .mock-panel-bar,
  .mock-election-shell > .mock-election-meta-line,
  .mock-election-shell > .mock-section,
  .mock-candidate-card > .mock-panel-bar,
  .mock-candidate-card > .candidate-banner,
  .mock-candidate-card > .mock-section {
    max-width: none;
  }
}

body.page-home-mock,
body.page-election-mock,
body.page-candidate-mock {
  background: #dfe5ec;
}

.mock-home-card > .mock-panel-bar,
.mock-home-card > .mock-search-bar,
.mock-home-card > .mock-chip-row,
.mock-home-card > .mock-section,
.mock-home-card > .mock-pagination,
.mock-election-shell > .mock-panel-bar,
.mock-election-shell > .mock-election-meta-line,
.mock-election-shell > .mock-section,
.mock-candidate-card > .mock-panel-bar,
.mock-candidate-card > .candidate-banner,
.mock-candidate-card > .mock-section {
  position: relative;
  z-index: 0;
}

.mock-home-card > .mock-panel-bar::before,
.mock-home-card > .mock-search-bar::before,
.mock-home-card > .mock-chip-row::before,
.mock-home-card > .mock-section::before,
.mock-home-card > .mock-pagination::before,
.mock-election-shell > .mock-panel-bar::before,
.mock-election-shell > .mock-election-meta-line::before,
.mock-election-shell > .mock-section::before,
.mock-candidate-card > .mock-panel-bar::before,
.mock-candidate-card > .candidate-banner::before,
.mock-candidate-card > .mock-section::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #f3f5f8;
  border-top: 1px solid #d3dbe5;
  border-bottom: 1px solid #d3dbe5;
  z-index: -1;
}

.mock-home-card > .mock-panel-bar::before,
.mock-election-shell > .mock-panel-bar::before,
.mock-candidate-card > .mock-panel-bar::before {
  top: -18px;
  bottom: -1px;
  background: #f5f7fa;
  border-top: 0;
}

.mock-home-card > .mock-search-bar {
  width: calc(100% - 48px);
  max-width: 1032px;
  margin-top: 14px;
  margin-bottom: 10px;
}

.mock-home-card > .mock-search-bar::before {
  top: -1px;
  bottom: -14px;
  background: #eef3f8;
}

.mock-home-card > .mock-chip-row {
  padding-top: 14px;
  padding-bottom: 16px;
}

.mock-home-card > .mock-chip-row::before {
  top: -1px;
  bottom: -1px;
  background: #eef3f8;
}

.mock-home-card > .mock-section,
.mock-election-shell > .mock-section,
.mock-candidate-card > .mock-section {
  margin-top: 0;
  padding-top: 24px;
  padding-bottom: 24px;
}

.mock-home-card > .mock-section::before,
.mock-election-shell > .mock-section::before,
.mock-candidate-card > .mock-section::before {
  top: 0;
  bottom: 0;
  background: #f5f7fa;
}

.mock-home-card > .mock-pagination {
  margin-top: 0;
  padding-top: 18px;
  padding-bottom: 22px;
}

.mock-home-card > .mock-pagination::before {
  top: 0;
  bottom: -22px;
  background: #f5f7fa;
}

.mock-election-shell > .mock-election-meta-line {
  padding-top: 18px;
  padding-bottom: 18px;
}

.mock-election-shell > .mock-election-meta-line::before {
  top: -1px;
  bottom: -1px;
  background: #f1f4f8;
}

.mock-candidate-card > .candidate-banner {
  padding-top: 18px;
  padding-bottom: 18px;
  margin-top: 0;
}

.mock-candidate-card > .candidate-banner::before {
  top: -1px;
  bottom: -1px;
  background: #f1f4f8;
}

.mock-section + .mock-section {
  border-top: 0;
  padding-top: 24px;
  margin-top: 0;
}

.mock-election-meta-line + .mock-section {
  margin-top: 0;
}

@media (max-width: 720px) {
  .mock-home-card > .mock-panel-bar::before,
  .mock-home-card > .mock-search-bar::before,
  .mock-home-card > .mock-chip-row::before,
  .mock-home-card > .mock-section::before,
  .mock-home-card > .mock-pagination::before,
  .mock-election-shell > .mock-panel-bar::before,
  .mock-election-shell > .mock-election-meta-line::before,
  .mock-election-shell > .mock-section::before,
  .mock-candidate-card > .mock-panel-bar::before,
  .mock-candidate-card > .candidate-banner::before,
  .mock-candidate-card > .mock-section::before {
    width: calc(100vw - 24px);
  }
}

/* Shared data-table pages. */
.vote-nav{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 4%;background:#fff;border-bottom:1px solid #ddd;flex-wrap:wrap}.vote-nav nav{display:flex;gap:1rem;flex-wrap:wrap}.vote-brand{font-weight:800;font-size:1.4rem}.vote-content{padding:1.5rem}.vote-content section{margin:1.5rem 0}.vote-content h2{margin:1.5rem 0 .75rem}.vote-table{overflow-x:auto;margin:1rem 0}.vote-table table{width:100%;border-collapse:collapse}.vote-content input,.vote-content button{padding:.5rem;margin:.25rem}.vote-content form{margin:1rem 0}

/* VoteDataCA adapters for the shared VoteWiki presentation components.
   Typography, colours, .table, .mock-section-heading and .summary-stat-* above
   are the same components used by VoteWiki; these rules adapt page structure. */
.votecan-ui {font-family:var(--font-body);font-size:16px;line-height:1.6;color:var(--text);background:#dfe5ec;}
.votecan-ui a {color:var(--accent);text-decoration:none;}
.votecan-ui a:hover {text-decoration:underline;}
.votecan-ui :is(a,button,input,select):focus-visible {outline:3px solid var(--border-strong);outline-offset:3px;}
.votecan-ui [hidden] {display:none!important;}
.votecan-ui .shell {width:100%;max-width:none;padding:0 clamp(16px,2.4vw,32px);margin:auto;}
.votecan-ui .page {padding:18px 0 40px;}
.vc-page {max-width:1080px;margin:0 auto;padding:24px;background:#f5f7fa;border:0;border-radius:0;min-height:64vh;}
.votecan-ui h1 {font-family:var(--font-body);font-size:clamp(1.54rem,2.35vw,1.92rem);line-height:1.08;letter-spacing:-.02em;font-weight:700;color:var(--navy);margin:0 0 14px;}
.votecan-ui :is(h2,h3) {color:var(--navy);font-size:.98rem;font-weight:700;line-height:1.6;margin:0 0 14px;display:flex;align-items:center;gap:12px;}
.votecan-ui :is(h2,h3):not(.mock-section-heading)::after {content:'';height:1px;flex:1;background:var(--border);}
.votecan-ui p {margin:0 0 14px;}
.votecan-ui section {margin:24px 0;}
.votecan-ui svg {width:21px;height:21px;flex-shrink:0;}
.vc-title {margin-bottom:24px;}
.vc-heading {display:flex;justify-content:space-between;align-items:center;gap:24px;margin:-24px -24px 24px;padding:24px;background:#f1f4f8;border-bottom:1px solid var(--border);}
.vc-heading p {color:var(--text-muted);font-size:.95rem;margin:0;}
.vc-header {background:#f1f4f8;border-bottom:1px solid var(--border);}
.vc-header-inner {max-width:1080px;margin:auto;padding:18px 24px;display:flex;gap:28px;align-items:center;}
.vc-brand {display:flex;gap:9px;align-items:center;font-size:1.3rem;font-weight:700;color:var(--navy)!important;white-space:nowrap;}
.vc-brand svg {width:29px;height:29px;color:#ed1c24;}
.vc-header nav {display:flex;gap:20px;align-items:center;flex:1;}
.vc-header nav a {font-size:.88rem;font-weight:600;}
.vc-header nav a.is-active {color:var(--accent-strong);}
.vc-search {display:flex;align-items:stretch;border:1px solid var(--border);border-radius:4px;background:var(--surface);overflow:hidden;margin:0;}
.vc-search input {border:0;min-width:0;width:100%;padding:11px 12px;font:inherit;font-size:.9rem;color:var(--text);background:transparent;outline:none;}
.vc-search input::placeholder {color:var(--text-subtle);}
.vc-search button {display:flex;align-items:center;justify-content:center;border:0;background:var(--accent);color:#fff;padding:0 15px;cursor:pointer;}
.vc-search button:hover {background:var(--accent-strong);}
.vc-search.header {width:200px;flex-shrink:0;}
.vc-search.header input {font-size:.8rem;padding:9px 12px;}
.vc-search.header button {background:transparent;color:var(--text-muted);padding:0 10px;}
.vc-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.vc-breadcrumbs {display:flex;align-items:center;gap:8px;color:var(--text-subtle);font-size:.8rem;margin-bottom:18px;flex-wrap:wrap;}
.vc-breadcrumbs svg {width:11px;height:11px;}
.vc-kicker {text-transform:uppercase;font-size:.78rem;letter-spacing:.04em;font-weight:700;color:var(--text-subtle);margin-bottom:10px;}
.vc-metrics {margin:16px 0 24px;}
.vc-section-heading {display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px;}
.vc-section-heading h2 {margin:0;flex:1;}
.vc-section-heading a {font-size:.88rem;}
.vc-muted {color:var(--text-muted);font-size:.9rem;}
.vc-note {background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:16px;color:var(--text-muted);font-size:.9rem;}
.votecan-ui .vote-table {margin:14px 0 16px;overflow-x:auto;border:0;border-radius:0;}
.votecan-ui .vote-table table {min-width:100%;}
.votecan-ui .vote-table th {white-space:nowrap;}
.votecan-ui .vote-table td.num {font-variant-numeric:tabular-nums;}
.votecan-ui [data-contest-toggle] {font-weight:700;}
.vc-badge {display:inline-block;background:var(--accent-soft);color:var(--accent-strong);font-size:.78rem;font-weight:700;border-radius:4px;padding:3px 8px;white-space:nowrap;}
.vc-badge-acclaimed {background:#e3eee7;color:#315c44;}
.vc-sources {padding:20px 0;border-top:1px solid var(--border);font-size:.9rem;}
.vc-sources ul {padding-left:18px;margin:0;}
.vc-sources li {margin:5px 0;}
.vc-sources span {color:var(--text-muted);}
.vc-filter-bar {display:flex;gap:12px;margin:14px 0;align-items:center;}
.vc-filter-bar .vc-search {flex:1;}
.votecan-ui select {font:inherit;font-size:.9rem;padding:11px 12px;border:1px solid var(--border);background:var(--surface);border-radius:4px;color:var(--text);max-width:100%;}
.vc-filter-bar .vc-search>svg {align-self:center;margin:0 12px;color:var(--text-subtle);}
.vc-filter-bar button.vc-submit {border:1px solid var(--accent);border-radius:4px;background:var(--accent);color:white;padding:11px 16px;font:inherit;cursor:pointer;}
.vc-pagination {display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:.88rem;margin:14px 0 24px;border:1px solid var(--border);background:#f8fafc;padding:12px 16px;}
.vc-pagination a {display:inline-block;border:1px solid var(--border);padding:5px 10px;border-radius:4px;margin-right:5px;background:var(--surface);font-weight:600;}
.vc-pagination span {color:var(--text-muted);}
.votecan-ui .vc-election-event {margin:0;padding:24px 0;border-top:1px solid var(--border);}
.votecan-ui .vc-election-event>h2 {font-size:1.15rem;margin-bottom:14px;}
.votecan-ui .vote-table .vc-party-toggle-cell {padding:0;border-top:1px solid var(--border);}
.vc-party-toggle {display:block;width:100%;margin:0;padding:12px 16px;text-align:left;font:inherit;font-size:.85rem;color:var(--accent);background:var(--surface-alt);border:0;cursor:pointer;}
.vc-party-toggle:hover {background:var(--accent-soft);}
.vc-contest-detail {padding:18px;background:var(--surface);border:1px solid var(--border);border-radius:8px;white-space:normal;}
.vc-contest-detail>button {float:right;padding:7px 12px;font:inherit;font-size:.85rem;color:var(--accent);border:1px solid var(--border);border-radius:4px;background:var(--surface);cursor:pointer;}
.votecan-ui .vc-contest-detail h4 {font-size:1rem;font-weight:700;margin:0 0 14px;color:var(--navy);}
.votecan-ui [data-results-list][aria-busy="true"] {opacity:.65;}
.votecan-ui [data-results-status]:empty {display:none;}
.votecan-ui section[id] {scroll-margin-top:24px;}
/* Content-specific arrangements share the same colours and type scale. */
.vc-hero {background:linear-gradient(90deg,rgba(9,49,98,.88),rgba(9,49,98,.72)),url('/assets/toronto.jpg') center 12%/cover;color:white;padding:48px 32px 70px;margin:-24px -24px 0;min-height:340px;}
.votecan-ui .vc-hero h1 {font-size:clamp(2rem,3vw,2.65rem);max-width:570px;color:white;}
.vc-hero .vc-search {max-width:690px;margin-top:26px;}
.vc-shortcuts {display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--border);background:var(--surface);margin:-33px 0 32px;position:relative;padding:20px 0;}
.vc-shortcut {text-align:center;padding:2px 14px;border-right:1px solid var(--border);display:block;}
.vc-shortcut:last-child {border:0;}
.vc-shortcut svg {width:31px;height:31px;margin:0 auto 9px;display:block;}
.vc-shortcut strong {font-size:.88rem;display:block;margin-bottom:5px;}
.vc-shortcut span {display:block;font-size:.8rem;color:var(--text-muted);}
.vc-cards {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;}
.vc-place-card {border:1px solid var(--border);border-radius:8px;overflow:hidden;display:block;background:var(--surface);}
.vc-cover {height:133px;background:var(--navy-soft);display:flex;align-items:center;justify-content:center;}
.vc-cover svg {width:53px;height:53px;color:var(--text-subtle);}
.vc-cover img {width:100%;height:100%;object-fit:cover;object-position:center 40%;}
.vc-place-card-info {padding:12px 14px;}
.vc-place-card strong {font-size:.9rem;}
.vc-place-card p {font-size:.8rem;color:var(--text-muted);margin:5px 0 0;}
.vc-latest {display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.vc-latest a {border:1px solid var(--border);border-radius:8px;padding:16px;display:flex;gap:14px;align-items:center;background:var(--surface);}
.vc-latest strong {display:block;font-size:.95rem;}
.vc-latest span {color:var(--text-muted);font-size:.85rem;}
.vc-place-symbol {background:var(--accent-soft);border:1px solid var(--border);padding:18px;border-radius:8px;color:var(--accent);}
.vc-place-symbol svg {width:42px;height:42px;}
.vc-profile {display:flex;gap:24px;align-items:center;margin-bottom:24px;}
.vc-avatar {width:105px;height:105px;display:flex;align-items:center;justify-content:center;background:var(--navy-soft);color:var(--navy);font-size:2rem;font-weight:700;border-radius:8px;flex-shrink:0;}
.vc-profile h1 {display:flex;gap:14px;align-items:center;flex-wrap:wrap;}
.vc-profile p {margin:3px 0;color:var(--text-muted);}
.vc-profile-layout {display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;}
.vc-profile-aside {border-right:1px solid var(--border);padding-right:24px;}
.vc-profile-aside dl {margin:0;}
.vc-profile-aside dt {font-size:.8rem;color:var(--text-subtle);margin-top:18px;}
.vc-profile-aside dd {margin:5px 0;font-size:.9rem;}
.vc-profile-aside .vc-muted {margin-top:20px;}
.vc-result-list {display:grid;gap:10px;}
.vc-result-card {border:1px solid var(--border);border-radius:8px;padding:12px 14px;display:flex;gap:14px;align-items:center;background:var(--surface);}
.vc-result-card>.vc-avatar {width:42px;height:42px;font-size:1rem;}
.vc-result-card>svg:first-child {color:var(--accent);}
.vc-result-card strong {font-size:.95rem;display:block;}
.vc-result-card span {font-size:.85rem;color:var(--text-muted);}
.vc-result-card>svg:last-child {margin-left:auto;width:16px;}
.vc-result-card:hover {background:var(--accent-soft);}
.vc-details {border-top:1px solid var(--border);padding:16px 0;}
.vc-details summary {font-size:.95rem;font-weight:600;cursor:pointer;}
.votecan-ui .home-footer {margin:0;}
@media(max-width:900px){.vc-header-inner{gap:20px;flex-wrap:wrap;}.vc-header nav{gap:16px;}.vc-cards{grid-template-columns:repeat(3,minmax(0,1fr));}.vc-profile-layout{grid-template-columns:175px minmax(0,1fr);}}
@media(max-width:720px){
 .votecan-ui .shell{padding:0 12px;}.votecan-ui .page{padding:6px 0 24px;}.vc-page{padding:18px;}.vc-heading{margin:-18px -18px 18px;padding:18px;gap:14px;}.vc-header-inner{padding:14px 18px;gap:14px;}.vc-brand{font-size:1.15rem;}.vc-header nav{order:3;flex-basis:100%;justify-content:space-between;gap:8px;}.vc-header nav a{font-size:.78rem;}.vc-search.header{margin-left:auto;width:140px;}.vc-place-symbol{padding:12px;}.vc-place-symbol svg{width:30px;height:30px;}
 .vc-filter-bar{flex-wrap:wrap;}.vc-filter-bar .vc-search{flex-basis:100%;}.vc-filter-bar select{width:100%;}.vc-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.vc-metrics .summary-stat{padding:10px 12px;}.vc-metrics .summary-stat-label{font-size:.7rem;}.vc-metrics .summary-stat-value{font-size:1.05rem;}.vc-pagination{padding:10px 12px;}.vc-contest-detail{padding:14px;}
 .vc-hero{margin:-18px -18px 0;padding:32px 24px 65px;}.vc-shortcuts{grid-template-columns:1fr 1fr;margin:-30px 0 24px;padding:12px 0;}.vc-shortcut{padding:14px 10px;}.vc-shortcut:nth-child(2){border:0;}.vc-shortcut:nth-child(-n+2){border-bottom:1px solid var(--border);}.vc-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}.vc-cover{height:110px;}.vc-latest{grid-template-columns:1fr;}.vc-profile{gap:16px;}.vc-avatar{width:78px;height:78px;font-size:1.6rem;}.vc-profile-layout{grid-template-columns:1fr;}.vc-profile-aside{border:0;border-bottom:1px solid var(--border);padding:0 0 20px;}
}
.vc-profile-layout > *, .vc-profile > div {min-width:0;}
.votecan-ui .vote-table {max-width:100%;}
.votecan-ui .vote-table .vc-candidate-toggle-cell {padding:0;border-top:1px solid var(--border);}

/* Compact results on phones; the complete desktop comparison remains available. */
.vc-mobile-only {display:none;}
@media(max-width:600px){
 .votecan-ui .vc-mobile-only {display:block;}
 .vc-cell-secondary {font-size:.8rem;color:var(--text-muted);line-height:1.5;margin-top:3px;}
 .vc-table-hint {font-size:.8rem;color:var(--text-muted);margin:10px 0 0;}
 .votecan-ui .vc-stacked-table,
 .votecan-ui .vc-party-results .vote-table,
 .votecan-ui .vc-candidate-results .vote-table,
 .votecan-ui [data-winner-district-table] .vote-table {overflow:visible;}
 .votecan-ui .vc-stacked-table table,
 .votecan-ui .vc-party-results table,
 .votecan-ui .vc-candidate-results table,
 .votecan-ui [data-winner-district-table] table {display:block;}
 .votecan-ui .vc-stacked-table thead,
 .votecan-ui .vc-party-results thead,
 .votecan-ui .vc-candidate-results thead,
 .votecan-ui [data-winner-district-table] thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
 .votecan-ui .vc-stacked-table tbody,
 .votecan-ui .vc-party-results tbody,
 .votecan-ui .vc-candidate-results tbody,
 .votecan-ui [data-winner-district-table] tbody {display:block;}
 .votecan-ui .vc-stacked-table tbody>tr,
 .votecan-ui .vc-party-results tbody>tr,
 .votecan-ui .vc-candidate-results tbody>tr,
 .votecan-ui [data-winner-district-table] tbody>tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--border);padding:10px 0;gap:8px 14px;}
 .votecan-ui .vc-party-results tbody>tr {grid-template-columns:repeat(4,minmax(0,1fr));}
 .votecan-ui .vc-stacked-table tbody>tr>td,
 .votecan-ui .vc-party-results tbody>tr>td,
 .votecan-ui .vc-candidate-results tbody>tr>td,
 .votecan-ui [data-winner-district-table] tbody>tr>td {display:block;min-width:0;padding:0;border:0;text-align:left;overflow-wrap:anywhere;white-space:normal;}
 .votecan-ui .vc-stacked-table tbody>tr>td:first-child,
 .votecan-ui .vc-party-results tbody>tr>td:first-child,
 .votecan-ui .vc-candidate-results tbody>tr>td:first-child,
 .votecan-ui .vc-candidate-results td[data-label="Party"],
 .votecan-ui .vc-candidate-results td[data-label="Result"],
 .votecan-ui [data-winner-district-table] tbody>tr>td:first-child,
 .votecan-ui tbody>tr>td[colspan] {grid-column:1/-1;}
 .votecan-ui .vc-stacked-table td[data-label]:not(:first-child)::before,
 .votecan-ui .vc-party-results td[data-label]::before,
 .votecan-ui .vc-candidate-results td[data-label]:not(:first-child)::before,
 .votecan-ui [data-winner-district-table] td[data-label="Elected"]::before,
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"]::before {content:attr(data-label);display:block;color:var(--text-muted);font-size:.72rem;font-weight:400;margin-bottom:3px;}
 .votecan-ui tr[hidden] {display:none!important;}
 .votecan-ui .vc-party-results tfoot,
 .votecan-ui .vc-candidate-results tfoot,
 .votecan-ui .vc-party-results tfoot tr,
 .votecan-ui .vc-candidate-results tfoot tr,
 .votecan-ui .vc-party-results tfoot td,
 .votecan-ui .vc-candidate-results tfoot td {display:block;}
 .votecan-ui .vc-contest-detail {padding:12px;min-width:0;}
 .votecan-ui .vc-party-comparison {border:1px solid var(--border);}
 .votecan-ui .vc-party-comparison > table {width:max-content;min-width:100%;}
 .votecan-ui .vc-party-comparison > table > thead,
 .votecan-ui .vc-party-comparison > table > tbody {display:block;}
 .votecan-ui .vc-party-comparison > table > :is(thead,tbody) > tr {display:flex;}
 .votecan-ui .vc-party-comparison > table > :is(thead,tbody) > tr > th,
 .votecan-ui .vc-party-comparison > table > :is(thead,tbody) > tr > td {box-sizing:border-box;flex:0 0 88px;width:88px;padding:10px 8px;white-space:normal;}
 .votecan-ui .vc-party-comparison > table > thead > tr > th:first-child,
 .votecan-ui .vc-party-comparison > table > tbody > tr:not([data-detail-row]) > td:first-child {flex-basis:125px;width:125px;position:sticky;left:0;background:var(--surface);z-index:1;border-right:1px solid var(--border);}
 .votecan-ui .vc-party-comparison > table > thead > tr:first-child > th {background:var(--surface-alt);}
 .votecan-ui .vc-party-comparison > table > thead > tr:nth-child(2),
 .votecan-ui .vc-party-comparison .vc-vote-percent {display:none;}
 .votecan-ui .vc-party-comparison > table > tbody > [data-detail-row] > td {width:calc(100vw - 64px);flex-basis:calc(100vw - 64px);position:sticky;left:0;padding:8px;}
}

@media(max-width:600px){.votecan-ui [data-winner-district-table] tbody>tr:not([data-detail-row])>td:nth-child(10){grid-column:1/-1;font-size:.8rem;color:var(--text-muted);}.votecan-ui [data-winner-district-table] td:nth-child(10)::before{display:inline;margin-right:6px;}}
@media(max-width:380px){.votecan-ui .vc-party-results tbody>tr{grid-template-columns:repeat(2,minmax(0,1fr));}}
/* Inactive parties retain searchable history without a public party URL. */
.vc-party-disclosure{border-bottom:1px solid #dee2e6;padding:10px 0;margin:0;}
.vc-party-disclosure>summary{color:#0066cc;cursor:pointer;font-weight:500;}
.vc-party-detail{padding:12px 0 4px;min-width:0;}
.vc-party-detail h3{margin-top:0;}
.vc-party-detail .vc-pagination{margin-bottom:0;}

/* Election events and coverage use the shared VoteWiki border/type scale. */
.votecan-ui .vc-election-event > .mock-section-heading {margin-top:0;}
.votecan-ui .vc-source-note {font-size:.8rem;line-height:1.6;margin:8px 0 14px;}
.votecan-ui .vc-metric-note {font-size:.85rem;margin:10px 0 16px;max-width:80ch;}
.votecan-ui .vc-party-comparison:focus-visible,
.votecan-ui .vc-coverage-province > summary:focus-visible {outline:2px solid var(--accent);outline-offset:3px;}
.votecan-ui .vc-coverage-list {margin:24px 0;border-top:1px solid var(--border);}
.votecan-ui .vc-coverage-province {border-bottom:1px solid var(--border);}
.votecan-ui .vc-coverage-province > summary {position:relative;display:grid;grid-template-columns:minmax(160px,1fr) minmax(210px,1.4fr) minmax(180px,1.1fr);gap:6px 20px;padding:18px 28px 18px 0;cursor:pointer;list-style:none;}
.votecan-ui .vc-coverage-province > summary::-webkit-details-marker {display:none;}
.votecan-ui .vc-coverage-province > summary::after {content:'+';position:absolute;right:4px;top:18px;color:var(--accent);font-weight:600;}
.votecan-ui .vc-coverage-province[open] > summary::after {content:'−';}
.votecan-ui .vc-coverage-name {font-weight:600;}
.votecan-ui .vc-coverage-overview {display:grid;gap:3px;font-size:.85rem;}
.votecan-ui .vc-coverage-status,.votecan-ui .vc-coverage-checked {font-size:.8rem;color:var(--text-muted);}
.votecan-ui .vc-coverage-checked {grid-column:2/-1;}
.votecan-ui .vc-coverage-detail {padding:0 0 18px;}
.votecan-ui .vc-coverage-detail h2 {font-size:1rem;margin:18px 0 10px;}
.votecan-ui .vc-coverage-detail dl {display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px 20px;margin:12px 0;}
.votecan-ui .vc-coverage-detail dt {font-size:.9rem;font-weight:600;}
.votecan-ui .vc-coverage-detail dd {margin:0;font-size:.9rem;}
.votecan-ui .vc-coverage-dates {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:6px 16px;list-style:none;padding:0;margin:0;}
@media(max-width:720px){
 .votecan-ui .vc-coverage-province > summary {grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 26px 16px 0;}
 .votecan-ui .vc-coverage-checked {grid-column:auto;}
 .votecan-ui .vc-coverage-detail dl {grid-template-columns:minmax(0,1fr);gap:6px;}
 .votecan-ui .vc-coverage-detail dd {margin-bottom:10px;}
}
@media(max-width:600px){
 .votecan-ui [data-winner-district-table] tbody > tr:not([data-detail-row]) {grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0;}
 .votecan-ui [data-winner-district-table] td[data-label="Elected"],
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"] {position:relative;padding-left:76px;}
 .votecan-ui [data-winner-district-table] td[data-label="Elected"]::before,
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"]::before {position:absolute;left:0;top:1px;}
 .votecan-ui .vc-party-comparison {overscroll-behavior-x:contain;}
 .votecan-ui .vc-coverage-dates {grid-template-columns:minmax(0,1fr);}
}
@media(min-width:381px) and (max-width:600px){
 .votecan-ui .vc-party-results td.num {font-size:.8rem;white-space:nowrap;}
}

/* District details share the inline content/API on desktop and phones. */
.votecan-ui.vc-sheet-open {overflow:hidden;}
.votecan-ui .vc-district-sheet {position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:88vh;max-height:88dvh;margin:0;padding:0;border:1px solid var(--border);border-bottom:0;border-radius:12px 12px 0 0;background:var(--surface);color:var(--text);font:inherit;overflow:auto;overscroll-behavior:contain;}
.votecan-ui .vc-district-sheet::backdrop {background:rgba(19,35,58,.45);}
.votecan-ui .vc-sheet-header {position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 18px;background:var(--surface);border-bottom:1px solid var(--border);}
.votecan-ui .vc-sheet-header button,.votecan-ui [data-results-status] button {font:inherit;font-size:.85rem;color:var(--accent);border:1px solid var(--border);border-radius:4px;padding:7px 12px;background:var(--surface);cursor:pointer;}
.votecan-ui .vc-sheet-content {padding:18px 18px max(18px,env(safe-area-inset-bottom));min-height:140px;}
.votecan-ui .vc-sheet-content h4 {font-size:1rem;margin:0 0 12px;}
.votecan-ui .vc-metric-note > summary {font-size:.85rem;color:var(--accent);cursor:pointer;}
.votecan-ui .vc-metric-note > p {font-size:.85rem;margin:8px 0 0;padding-left:14px;border-left:2px solid var(--border);}
.votecan-ui [data-results-status] {min-height:1.5em;font-size:.85rem;margin:8px 0;}
.votecan-ui [data-results-list][aria-busy="true"] {cursor:progress;}

/* Place-first home and consistent disclosure/numeric styling. */
.votecan-ui .vc-hero-label {display:block;font-weight:600;font-size:.95rem;margin:20px 0 8px;}
.votecan-ui .vc-hero .vc-search {margin-top:0;}
.votecan-ui .vc-hero-links {display:flex;flex-wrap:wrap;gap:10px 24px;font-size:.85rem;margin:14px 0 0;}
.votecan-ui .vc-hero-links a {color:white;text-decoration:underline;text-underline-offset:3px;}
.votecan-ui .vc-latest a > div {min-width:0;}
.votecan-ui .vc-latest a > svg {flex-shrink:0;}
.votecan-ui .vc-latest-checked {display:block;margin-top:5px;font-size:.8rem;}
.votecan-ui .vote-table :is(th,td).num,.votecan-ui .summary-stat-value {font-variant-numeric:tabular-nums;}
.votecan-ui .vc-party-toggle {min-height:44px;display:flex;justify-content:space-between;align-items:center;gap:12px;}
.votecan-ui .vc-party-toggle::after {content:'+';font-weight:600;}
.votecan-ui .vc-party-toggle[aria-expanded="true"]::after {content:'−';}
.votecan-ui :is(.vc-party-disclosure,.vc-metric-note) > summary {position:relative;list-style:none;padding:10px 28px 10px 12px;border:1px solid var(--border);background:var(--surface-alt);color:var(--accent);font-size:.85rem;font-weight:500;min-height:44px;}
.votecan-ui :is(.vc-party-disclosure,.vc-metric-note) > summary::-webkit-details-marker {display:none;}
.votecan-ui :is(.vc-party-disclosure,.vc-metric-note) > summary::after {content:'+';position:absolute;right:12px;top:10px;font-weight:600;}
.votecan-ui :is(.vc-party-disclosure,.vc-metric-note)[open] > summary::after {content:'−';}
.votecan-ui :is(.vc-party-toggle,.vc-party-disclosure > summary,.vc-metric-note > summary):focus-visible {outline:2px solid var(--accent);outline-offset:2px;}
@media(max-width:600px){
 .votecan-ui .vc-place-explore-heading {flex-wrap:wrap;gap:6px;}
 .votecan-ui .vc-place-explore-heading h2 {flex-basis:100%;}
}

/* Search type navigation and Place history remain usable without JavaScript. */
.votecan-ui .vc-search-types {display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 10px;}
.votecan-ui .vc-search-types a {display:flex;align-items:center;gap:8px;min-height:40px;padding:7px 12px;border:1px solid var(--border);border-radius:4px;font-size:.85rem;}
.votecan-ui .vc-search-types a[aria-current="page"] {border-color:var(--accent);background:var(--accent-soft);font-weight:600;}
.votecan-ui .vc-search-types span {font-size:.75rem;color:var(--text-muted);font-variant-numeric:tabular-nums;}
.votecan-ui .vc-search-count {font-size:.85rem;margin:10px 0 20px;}
.votecan-ui .vc-result-card > div {min-width:0;overflow-wrap:anywhere;}
.votecan-ui .vc-place-jumps {display:flex;flex-wrap:wrap;gap:10px 20px;margin:24px 0;padding:12px 0;border-block:1px solid var(--border);font-size:.85rem;}
.votecan-ui .vc-latest-local-results > summary {position:relative;padding:12px 28px 12px 12px;background:var(--surface-alt);border:1px solid var(--border);list-style:none;font-size:.85rem;color:var(--accent);}
.votecan-ui .vc-latest-local-results > summary::-webkit-details-marker {display:none;}
.votecan-ui .vc-latest-local-results > summary::after {content:'+';position:absolute;right:12px;}
.votecan-ui .vc-latest-local-results[open] > summary::after {content:'−';}
.votecan-ui .vc-search-types a:focus-visible,.votecan-ui .vc-latest-local-results > summary:focus-visible {outline:2px solid var(--accent);outline-offset:2px;}
@media(max-width:600px){
 .votecan-ui .vc-search-types {gap:6px;}
 .votecan-ui .vc-search-types a {padding:7px 9px;}
}
@media(max-width:600px){
 .votecan-ui .vc-place-history-table .vote-table {overflow:visible;}
 .votecan-ui .vc-place-history-table :is(table,tbody) {display:block;}
 .votecan-ui .vc-place-history-table thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
 .votecan-ui .vc-place-history-table tbody > tr {display:grid;grid-template-columns:minmax(0,1fr) 65px;gap:8px 12px;padding:12px 0;border-bottom:1px solid var(--border);}
 .votecan-ui .vc-place-history-table td {display:block;border:0;padding:0;min-width:0;white-space:normal;}
 .votecan-ui .vc-place-history-table td:first-child {grid-column:1/-1;}
 .votecan-ui .vc-place-history-table td[data-label="Turnout"] {text-align:right;}
 .votecan-ui .vc-place-history-table td:not(:first-child)::before {content:attr(data-label);display:block;color:var(--text-muted);font-size:.72rem;}
}

/* Person/Party history shares the complete desktop table and compact phone rows. */
.votecan-ui .vc-entity-context {border-block:1px solid var(--border);padding:12px 0;margin:20px 0;}
.votecan-ui .vc-entity-context > summary {color:var(--accent);cursor:pointer;font-size:.9rem;font-weight:500;min-height:32px;}
.votecan-ui .vc-entity-context dl {display:grid;grid-template-columns:150px minmax(0,1fr);gap:8px 16px;font-size:.9rem;}
.votecan-ui .vc-entity-context dd {margin:0;}
.votecan-ui .vc-entity-context > p {font-size:.85rem;color:var(--text-muted);}
@media(max-width:600px){
 .votecan-ui .vc-entity-context dl {grid-template-columns:100px minmax(0,1fr);}
 .votecan-ui .vc-entity-history .vote-table {overflow:visible;}
 .votecan-ui .vc-entity-history :is(table,tbody) {display:block;}
 .votecan-ui .vc-entity-history thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
 .votecan-ui .vc-entity-history tbody > tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;padding:14px 0;border-bottom:1px solid var(--border);}
 .votecan-ui .vc-entity-history td {display:block;min-width:0;white-space:normal;border:0;padding:0;text-align:left;overflow-wrap:anywhere;}
 .votecan-ui .vc-entity-history td:first-child,.votecan-ui .vc-entity-history td[data-label="District"],.votecan-ui .vc-entity-history td[data-label="Result"] {grid-column:1/-1;}
 .votecan-ui .vc-entity-history td[data-label]:not(:first-child)::before {content:attr(data-label);display:block;color:var(--text-muted);font-size:.72rem;margin-bottom:3px;}
}
.votecan-ui [data-party-detail-status]:empty {display:none;}
.votecan-ui .vc-party-detail-status {font-size:.8rem;margin:10px 0 0;}
.votecan-ui [data-party-detail-status] button {font:inherit;font-size:.85rem;color:var(--accent);background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:7px 12px;cursor:pointer;}
.votecan-ui [data-party-detail-content][aria-busy="true"] {opacity:.65;cursor:progress;}
@media(max-width:600px){
 .votecan-ui .vc-entity-history td[data-label="Party"]:has(.vc-nonpartisan-party),
 .votecan-ui .vc-entity-history td[data-label="Result"]:empty {display:none;}
}

/* Finish: readable source/footer disclosures, visible focus and touch targets. */
.votecan-ui {--text-subtle:#526783;}
.votecan-ui :is(a,button,input,select,summary):focus-visible {outline:2px solid var(--accent-strong);outline-offset:3px;}
.votecan-ui .vc-search:focus-within {outline:2px solid var(--accent-strong);outline-offset:2px;}
.votecan-ui .skip-link {color:#fff;}
.votecan-ui .skip-link:focus {top:12px;z-index:100;}
.votecan-ui .vc-sources {padding:16px 0;font-size:.85rem;}
.votecan-ui .vc-sources summary {cursor:pointer;display:flex;align-items:center;gap:12px;padding:10px 0;min-height:44px;color:var(--accent);font-weight:600;list-style:none;}
.votecan-ui .vc-sources summary::before {content:'+';}
.votecan-ui .vc-sources details[open] summary::before {content:'−';}
.votecan-ui .vc-sources summary::-webkit-details-marker {display:none;}
.votecan-ui .vc-sources summary span {font-size:.8rem;font-weight:400;}
.votecan-ui .vc-sources > p {font-size:.8rem;margin:4px 0 0;}
.votecan-ui .vc-sources li {padding:4px 0;}
.votecan-ui .vc-party-context {display:block;font-size:.8rem;font-weight:400;color:var(--text-muted);margin-top:4px;}
.votecan-ui .vc-compact-footer .home-footer-inner {display:block;max-width:1080px;margin:auto;padding:24px;}
.votecan-ui .vc-compact-footer strong {color:#fff;font-size:1rem;}
.votecan-ui .vc-compact-footer p {font-size:.85rem;color:#d7e1ef;margin:8px 0;}
.votecan-ui .vc-compact-footer nav {display:flex;flex-wrap:wrap;gap:4px 20px;margin:10px 0;}
.votecan-ui .vc-compact-footer a {display:inline-flex;align-items:center;min-height:44px;color:#dceaff;font-size:.85rem;}
.votecan-ui .vc-compact-footer summary {font-size:.85rem;color:#dceaff;cursor:pointer;padding:10px 0;min-height:44px;}
.votecan-ui .vc-compact-footer :is(a,summary):focus-visible {outline-color:#fff;}
.votecan-ui .vc-compact-footer {padding:0;text-align:left;}
.votecan-ui .vc-pagination a {min-height:44px;display:inline-flex;align-items:center;}
.votecan-ui .vc-search button {min-width:44px;min-height:44px;}
.votecan-ui .vc-search-types a {min-height:44px;}
.votecan-ui .vc-sheet-header button,.votecan-ui .vc-contest-detail > button {min-height:44px;}
@media(max-width:600px){
 .votecan-ui .vc-header nav a {display:inline-flex;align-items:center;min-height:44px;}
 .votecan-ui .vc-compact-footer .home-footer-inner {padding:18px;}
 .votecan-ui .vc-breadcrumbs {line-height:1.8;}
}
@media(prefers-reduced-motion:reduce){
 .votecan-ui *, .votecan-ui *::before,.votecan-ui *::after {scroll-behavior:auto!important;animation:none!important;transition:none!important;}
}
.votecan-ui .vc-compact-footer {background:#182a41;}

/* Polling results stay inside district details and load on demand. */
.votecan-ui .vc-breakdown { margin-top:16px; min-width:0; }
.votecan-ui .vc-breakdown-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
.votecan-ui .vc-breakdown-scroll table { width:100%; min-width:680px; }
.votecan-ui .vc-breakdown-scroll th,.votecan-ui .vc-breakdown-scroll td { padding:8px; }
.votecan-ui .vc-breakdown-scroll [hidden] { display:none!important; }
.votecan-ui .vc-breakdown-scroll .vc-cell-secondary { display:block; font-weight:400; font-size:12px; }
.votecan-ui .vc-breakdown-scroll th:first-child { position:sticky;left:0;background:var(--surface);min-width:140px; }
.votecan-ui [data-breakdown-panel] { min-width:0; }

/* Polling divisions open separately; an existing mobile district dialog is reused. */
.votecan-ui .vc-polling-dialog {width:calc(100vw - 48px);max-width:1200px;max-height:90vh;max-height:90dvh;margin:auto;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;overflow:auto;overscroll-behavior:contain;}
.votecan-ui .vc-polling-dialog::backdrop {background:rgba(19,35,58,.45);}
@media (max-width:600px) {
 .votecan-ui .vc-polling-dialog,.votecan-ui .vc-district-sheet.vc-polling-mode {position:fixed;inset:0;width:100%;max-width:100%;height:100vh;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;}
 .votecan-ui .vc-polling-mode .vc-sheet-header {flex-wrap:wrap;}
}

/* Keep controls outside the scrolling polling table and remove inherited filter spacing. */
.votecan-ui .vc-polling-dialog[open],.votecan-ui .vc-polling-mode[open] {display:flex;flex-direction:column;height:min(820px,90dvh);overflow:hidden;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-sheet-header {flex:none;padding:10px 14px;align-items:flex-start;}
.votecan-ui .vc-polling-title {display:block;min-width:0;font-size:1rem;line-height:1.35;}
.votecan-ui .vc-polling-title span {display:block;overflow-wrap:anywhere;}
.votecan-ui .vc-polling-title small {display:block;margin-top:3px;font-size:.8rem;font-weight:400;color:var(--text-muted);}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) > .vc-sheet-content:not([hidden]) {display:flex;flex-direction:column;flex:1;min-height:0;padding:10px 14px;overflow:hidden;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) [data-breakdown-panel] {display:flex;flex-direction:column;flex:1;min-height:0;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) [data-breakdown-filter] {flex:none;margin:0;padding:0;border:0;background:none;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) [data-breakdown-status] {flex:none;margin:6px 0;font-size:.8rem;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) [data-breakdown-content] {display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-breakdown-scroll {flex:1;min-height:0;overflow:auto;border:1px solid var(--border);}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-breakdown-scroll table {margin:0;border-collapse:separate;border-spacing:0;font-size:.8rem;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-breakdown-scroll :is(th,td) {padding:5px 7px;line-height:1.25;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-breakdown-scroll thead th {position:sticky;top:0;z-index:3;background:var(--surface);box-shadow:0 1px 0 var(--border);vertical-align:top;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-breakdown-scroll thead th:first-child {z-index:4;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-cell-secondary {font-size:.7rem;margin-top:2px;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-pagination {flex:none;margin:6px 0 0;padding:4px 0;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) [data-breakdown-candidates] {flex:none;align-self:flex-start;margin-top:5px;}
@media (max-width:600px) {
 .votecan-ui .vc-polling-dialog[open],.votecan-ui .vc-polling-mode[open] {height:100dvh;max-height:100dvh;}
 .votecan-ui .vc-polling-mode .vc-sheet-header {flex-wrap:nowrap;gap:8px;}
 .votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-sheet-header button {flex:none;max-width:130px;}
 .votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) > .vc-sheet-content:not([hidden]) {padding:8px 10px max(8px,env(safe-area-inset-bottom));}
}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) > .vc-sheet-content:not([hidden]) {margin:0;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-pagination {display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-pagination .vc-party-toggle {width:auto;padding:6px 10px;border:1px solid var(--border);border-radius:4px;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-pagination .vc-party-toggle::after {content:none;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-pagination span {margin-left:auto;font-size:.8rem;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) [data-breakdown-candidates] {width:auto;padding:6px 10px;font-size:.8rem;}
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-breakdown-scroll,
.votecan-ui :is(.vc-polling-dialog,.vc-polling-mode) .vc-pagination {border:0;box-shadow:none;border-radius:0;background:transparent;}

/* Election result views and compact visual summaries. */
.votecan-ui .vc-results-tabs{display:flex;gap:4px;border-bottom:1px solid #d8dee7;margin:12px 0 16px}
.votecan-ui .vc-results-tabs button{background:transparent;border:0;border-bottom:3px solid transparent;padding:10px 14px;min-height:44px;color:#526174;font:inherit;cursor:pointer}
.votecan-ui .vc-results-tabs button[aria-selected="true"]{border-bottom-color:#1769bd;color:#12579d;font-weight:600}
.votecan-ui .vc-results-tabs button:focus-visible{outline:2px solid #1769bd;outline-offset:2px}
.votecan-ui [role="tabpanel"][hidden]{display:none!important}
.votecan-ui .vc-table-note{font-size:.8rem;margin:8px 0}
.votecan-ui .vc-result-lead{padding:12px 16px;margin:12px 0;border-left:3px solid #278247;background:#f3f8f5}
.votecan-ui .vc-result-lead strong{font-size:1.1rem}
.votecan-ui .vc-result-lead p{margin:4px 0 0}
.votecan-ui .vc-vote-meter{display:block;height:4px;background:#e8edf3;border-radius:2px;margin-top:5px;overflow:hidden}
.votecan-ui .vc-vote-meter span{display:block;height:100%;background:#7796b6}
.votecan-ui .vc-vote-meter.vc-winner span{background:#278247}
.votecan-ui .vc-party-results .num,.votecan-ui .vc-candidate-results .num{font-variant-numeric:tabular-nums}
@media(max-width:600px){.votecan-ui .vc-results-tabs button{font-size:.8rem;padding:10px 8px;flex:1}}

.votecan-ui meter.vc-vote-meter{appearance:none;-webkit-appearance:none;width:100%;border:0;background:none;height:4px}
.votecan-ui meter.vc-vote-meter::-webkit-meter-bar{background:#e8edf3;border:0;border-radius:2px;height:4px}
.votecan-ui meter.vc-vote-meter::-webkit-meter-optimum-value{background:#7796b6}
.votecan-ui meter.vc-vote-meter.vc-winner::-webkit-meter-optimum-value{background:#278247}
.votecan-ui meter.vc-vote-meter::-moz-meter-bar{background:#7796b6}
.votecan-ui meter.vc-vote-meter.vc-winner::-moz-meter-bar{background:#278247}

/* Winner/runner-up results fit phones and narrow tablet columns. */
@media(max-width:900px){
 .votecan-ui [data-winner-district-table] .vote-table{width:100%;min-width:0;overflow:visible}
 .votecan-ui [data-winner-district-table] table{display:block;width:100%;min-width:0;table-layout:auto}
 .votecan-ui [data-winner-district-table] thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .votecan-ui [data-winner-district-table] tbody{display:block;width:100%}
 .votecan-ui [data-winner-district-table] tbody>tr:not([data-detail-row]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;padding:14px 0;border-bottom:1px solid var(--border)}
 .votecan-ui [data-winner-district-table] tbody>tr:not([data-detail-row])>td{display:block;min-width:0;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;text-align:left}
 .votecan-ui [data-winner-district-table] tbody>tr:not([data-detail-row])>td:first-child{grid-column:1/-1;font-weight:600}
 .votecan-ui [data-winner-district-table] td[data-label="Elected"],
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"]{position:static;padding:0;line-height:1.5}
 .votecan-ui [data-winner-district-table] td[data-label="Elected"]::before,
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"]::before{content:attr(data-label);position:static;display:block;font-size:.72rem;color:var(--text-muted);margin-bottom:3px}
 .votecan-ui [data-winner-district-table] .vc-mobile-only{display:block}
 .votecan-ui [data-winner-district-table] .vc-cell-secondary{display:block;font-size:.8rem;line-height:1.5;color:var(--text-muted);margin-top:2px}
 .votecan-ui [data-winner-district-table] td[data-label="Margin (pp)"]{grid-column:1/-1;font-size:.8rem;color:var(--text-muted)}
 .votecan-ui [data-winner-district-table] td[data-label="Margin (pp)"]::before{content:'Lead: ';display:inline}
 .votecan-ui [data-winner-district-table] [data-detail-row]{display:block}
 .votecan-ui [data-winner-district-table] [data-detail-row]>td{display:block;width:100%;box-sizing:border-box}
}
@media(max-width:420px){
 .votecan-ui [data-winner-district-table] tbody>tr:not([data-detail-row]){grid-template-columns:minmax(0,1fr);gap:10px}
}
@media(max-width:900px){.votecan-ui [data-winner-district-table] td[data-label="Margin (pp)"] .vc-mobile-only{display:inline;margin-left:4px}}

/* One compact candidate cell on every screen size. */
.votecan-ui [data-winner-district-table] table{width:100%;table-layout:fixed}
.votecan-ui [data-winner-district-table] td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.votecan-ui [data-winner-district-table] th:first-child{width:25%}
.votecan-ui [data-winner-district-table] th:last-child{width:12%}
.votecan-ui .vc-comparison-name,.votecan-ui .vc-comparison-party,.votecan-ui .vc-comparison-votes{display:block;line-height:1.4}
.votecan-ui .vc-comparison-party{font-size:.78rem;color:var(--text-muted);margin:2px 0}
.votecan-ui .vc-comparison-votes{font-size:.8rem;font-variant-numeric:tabular-nums}
@media(max-width:900px){.votecan-ui [data-winner-district-table] table{table-layout:auto}}

.votecan-ui .vc-comparison-identity{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
.votecan-ui .vc-comparison-identity .vc-comparison-name,.votecan-ui .vc-comparison-identity .vc-comparison-party{display:inline;margin:0}

.votecan-ui .vc-election-map{height:500px;width:100%;background:#e9eff4;border:1px solid var(--border);border-radius:4px}
.votecan-ui .vc-map-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:10px 0}
.votecan-ui .vc-map-toolbar label{display:flex;gap:8px;align-items:center;min-width:0}
.votecan-ui .vc-map-toolbar select{max-width:360px;min-height:44px;min-width:0}
.votecan-ui .vc-map-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin:12px 0;font-size:.8rem}
.votecan-ui .vc-map-legend>span{display:flex;gap:6px;align-items:center}
.votecan-ui .vc-map-legend i{width:12px;height:12px;display:inline-block;border-radius:2px}
.votecan-ui .vc-map-colour-0{background:#c82f3c}.votecan-ui .vc-map-colour-1{background:#2463a6}.votecan-ui .vc-map-colour-2{background:#d57916}.votecan-ui .vc-map-colour-3{background:#28794c}.votecan-ui .vc-map-colour-4{background:#4b91b7}.votecan-ui .vc-map-colour-5{background:#8365a0}.votecan-ui .vc-map-colour-6{background:#707d8d}.votecan-ui .vc-map-colour-7{background:#005841}
.votecan-ui .vc-map-selection{border-left:3px solid #2463a6;padding:10px 14px;background:var(--surface-alt);margin:12px 0}
.votecan-ui .vc-map-selection p{margin:6px 0}
@media(max-width:600px){.votecan-ui .vc-election-map{height:360px}.votecan-ui .vc-map-toolbar{align-items:stretch}.votecan-ui .vc-map-toolbar label{flex:1}.votecan-ui .vc-map-toolbar select{width:100%}.votecan-ui .vc-map-toolbar label{font-size:0}.votecan-ui .vc-map-toolbar select{font-size:.85rem}.votecan-ui .vc-map-toolbar button{font-size:.8rem}}
.votecan-ui .vc-map-toolbar .vc-party-toggle{width:auto;flex:0 0 auto;padding:10px 12px;white-space:nowrap}
.votecan-ui :is(.vc-map-toolbar,.vc-map-selection) .vc-party-toggle::after{content:none}
.votecan-ui .vc-map-selection .vc-party-toggle{width:auto;padding:8px 12px}

/* Prebuilt SVG district maps: shared rendering, no tile/map library. */
.vc-election-map { position:relative; overflow:hidden; background:#f2f6f9; }
.votecan-ui .vc-district-svg { width:100%; height:100%; display:block; touch-action:pan-y; }
.vc-district-svg path { stroke:#fff; stroke-width:.65; vector-effect:non-scaling-stroke; cursor:pointer; fill-opacity:.85; }
.vc-district-svg path:hover,.vc-district-svg path:focus,.vc-district-svg path.is-selected { stroke:#142838; stroke-width:2.5; fill-opacity:1; outline:none; }
.vc-svg-controls { position:absolute; top:12px; left:12px; display:flex; flex-direction:column; gap:4px; }
.vc-svg-controls button { width:44px; height:44px; padding:0; border:1px solid #b7c5d1; border-radius:4px; background:#fff; color:#142838; font-size:24px; cursor:pointer; }
.votecan-ui [data-election-map-panel] { margin:0 0 28px; }
.votecan-ui .vc-map-popup { position:absolute; z-index:3; width:280px; max-width:calc(100% - 16px); padding:14px 16px; background:#fff; border:1px solid #b7c5d1; border-radius:6px; box-shadow:0 3px 16px #14283826; font-size:.85rem; }
.votecan-ui .vc-map-popup strong { display:block; padding-right:22px; }
.votecan-ui .vc-map-popup p { margin:10px 0; }
.votecan-ui .vc-map-popup-close { position:absolute; right:4px; top:2px; min-width:36px; min-height:36px; border:0; background:transparent; color:#142838; font-size:22px; cursor:pointer; }
.votecan-ui .vc-map-tip { position:absolute; z-index:4; padding:5px 9px; border-radius:4px; background:#142838; color:#fff; font-size:.8rem; pointer-events:none; max-width:calc(100% - 16px); }

/* Read the election outcome before exploring the detailed tables. */
.votecan-ui .vc-result-summary { max-width:75ch; margin:0 0 20px; padding:4px 0 4px 14px; border-left:3px solid var(--accent); color:var(--text); font-size:1rem; line-height:1.65; }
.votecan-ui .vc-result-summary strong { font-weight:650; }
@media(max-width:600px) { .votecan-ui .vc-result-summary { padding-left:12px; font-size:.94rem; margin-bottom:16px; } }

/* Seat overview and direct entry points before the detailed result tables. */
.votecan-ui .vc-seat-chart { margin:14px 0 20px; }
.votecan-ui .vc-seat-chart figcaption { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; font-size:.85rem; font-weight:600; }
.votecan-ui .vc-seat-chart figcaption span { font-weight:400; color:var(--text-muted); }
.votecan-ui .vc-seat-chart > svg { display:block; width:100%; height:52px; }
.votecan-ui .vc-seat-chart ul { display:flex; flex-wrap:wrap; gap:8px 20px; margin:0; padding:0; list-style:none; font-size:.85rem; }
.votecan-ui .vc-seat-chart li { display:flex; align-items:center; gap:6px; }
.votecan-ui .vc-seat-chart .vc-seat-dot { width:10px; height:10px; }
.votecan-ui .vc-map-locate { display:block; min-height:44px; border:0; padding:8px 0; background:transparent; color:var(--accent); font:inherit; font-size:.8rem; cursor:pointer; }
.votecan-ui .vc-runner-mobile { display:none; }
/* Horizontal rules retain row alignment without boxing every cell. */
.votecan-ui .vc-election-event .vote-table { border:0; border-radius:0; }
.votecan-ui .vc-election-event .table { font-variant-numeric:tabular-nums; }
.votecan-ui .vc-election-event .table :is(th,td) { border-left:0; border-right:0; }
.votecan-ui .vc-election-event .table tbody > tr:not([data-detail-row]):hover { background:var(--surface-alt); }
@media(min-width:901px) {
 .votecan-ui .vc-election-event .table :is(th,td) { padding:11px 12px; }
 .votecan-ui .vc-election-event .table thead th { font-size:.8rem; font-weight:600; }
 .votecan-ui .vc-election-event .table td.num { text-align:right; }
}
@media(max-width:600px) {
 .votecan-ui .vc-runner-desktop { display:none; }
 .votecan-ui .vc-runner-mobile { display:block; }
 .votecan-ui .vc-runner-mobile summary { min-height:44px; display:flex; align-items:center; color:var(--accent); cursor:pointer; font-size:.82rem; }
 .votecan-ui .vc-runner-mobile summary::after { content:'+'; margin-left:8px; }
 .votecan-ui .vc-runner-mobile[open] summary::after { content:'−'; }
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"] { grid-column:1/-1; padding-left:0; }
 .votecan-ui [data-winner-district-table] td[data-label="Runner-up"]::before { display:none; }
}
.votecan-ui .vc-margin-sort { border:0; background:transparent; color:inherit; padding:0; font:inherit; font-weight:600; cursor:pointer; white-space:nowrap; min-height:36px; }
.votecan-ui .vc-margin-sort:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.votecan-ui .vc-margin-sort-mobile { display:none; }
@media(max-width:900px) { .votecan-ui .vc-margin-sort-mobile { display:flex; justify-content:flex-end; margin:6px 0; font-size:.8rem; color:var(--accent); } .votecan-ui .vc-margin-sort-mobile[hidden] { display:none; } }
.votecan-ui .vc-map-locate:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.votecan-ui .vc-party-comparison .vc-margin-sort { white-space:normal; line-height:1.4; }
.votecan-ui .vc-turnout { font-variant-numeric:tabular-nums; }
@media(max-width:900px) { .votecan-ui .vc-party-comparison thead th { overflow-wrap:anywhere; } }

/* Status before the election, distinct from the elected result badge. */
.vc-incumbent-badge {display:inline-block;vertical-align:middle;margin-left:6px;padding:1px 5px;border:1px solid #cbd5e1;border-radius:3px;background:#f1f5f9;color:#475569;font-size:10px;font-weight:500;line-height:1.4;white-space:nowrap;}

/* Compact election directory: geography supplies context for year-only links. */
.vc-election-directory { margin: 0 0 28px; }
.vc-election-directory-row { display: grid; grid-template-columns: minmax(180px, 28%) 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.vc-election-directory-row h3 { margin: 0; font-size: 1rem; line-height: 1.5; }
.vc-election-directory-years { display: grid; gap: 4px; }
.vc-election-directory-kind { display: grid; grid-template-columns: 100px 1fr; align-items: baseline; gap: 12px; }
.vc-election-directory-kind > span { font-size: .875rem; }
.vc-election-directory-kind > div { display: flex; flex-wrap: wrap; column-gap: 16px; }
.vc-election-directory-kind a { display: inline-flex; align-items: center; min-height: 32px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
 .vc-election-directory-row { grid-template-columns: 1fr; gap: 4px; }
 .vc-election-directory-kind { grid-template-columns: 88px 1fr; gap: 8px; }
 .vc-election-directory-kind a { min-height: 44px; }
}

.vc-place-directory { margin-bottom: 28px; }
.vc-place-directory-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 24px; list-style: none; padding: 0; margin: 0 0 20px; }
.vc-place-directory-list li { min-width: 0; }
.vc-place-directory-list a { display: inline-block; padding: 6px 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .vc-place-directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .vc-place-directory-list { grid-template-columns: 1fr; gap: 0; } .vc-place-directory-list a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; } }

.vc-history-results { display: inline-block; padding: 4px 0; }
.vc-history-detail-actions { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-bottom: 12px; }
.vc-person-history table { min-width: 0; }
@media (max-width: 600px) {
 .vc-history-results { min-height: 44px; display: inline-flex; align-items: center; }
 .vc-history-detail-actions { flex-wrap: wrap; justify-content: space-between; gap: 8px; }
 .vc-person-history [data-history-row] td { display: block; }
 .vc-person-history [data-history-row] td::before { display: none; }
}

.vc-place-district-list { list-style: none; padding: 0; margin: 0 0 24px; }
.vc-place-district-list > li { border-bottom: 1px solid #e2e8f0; }
.vc-place-district-list .vc-party-disclosure { margin: 0; }

/* District names form a compact grid; opened histories use the whole row. */
.vc-place-district-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.vc-place-district-list > li { min-width: 0; }
.vc-place-district-list > li:has(details[open]) { grid-column: 1 / -1; }
.votecan-ui .vc-place-district-list .vc-party-disclosure { padding: 0; border: 0; }
.votecan-ui .vc-place-district-list .vc-party-disclosure > summary { border: 0; background: transparent; padding: 7px 20px 7px 0; min-height: 0; font-size: .875rem; }
.votecan-ui .vc-place-district-list .vc-party-disclosure > summary::after { right: 0; top: 7px; }
.votecan-ui .vc-place-district-list .vc-party-context { display: inline; font-size: .75rem; margin: 0 0 0 8px; }
.vc-place-district-list [data-district-detail-status]:empty { display: none; }
@media (min-width: 1400px) { .vc-place-district-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .vc-place-district-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
 .vc-place-district-list { grid-template-columns: 1fr; }
 .votecan-ui .vc-place-district-list .vc-party-disclosure > summary { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; }
 .votecan-ui .vc-place-district-list .vc-party-disclosure > summary::after { top: 12px; }
}

.vc-candidate-highlight > td { background: #eaf3ff; }
.vc-candidate-highlight > td:first-child { box-shadow: inset 3px 0 #0066cc; }
.vc-place-list-filter { max-width: 360px; margin: 8px 0; }
.vc-list-status, .vc-coverage-note { font-size: .82rem; margin: 6px 0 12px; }
.votecan-ui .vc-party-disclosure > summary::after { content: '▾'; }
.votecan-ui .vc-party-disclosure[open] > summary::after { content: '▴'; }
.vc-history-results:focus-visible, [data-place-filter]:focus-visible { outline: 2px solid #0066cc; outline-offset: 2px; }

/* Place browsing: concise context and source-backed municipal coverage. */
.vc-place-browser { margin: 20px 0 28px; }
.vc-place-browser > .vc-filter-bar { margin-bottom: 8px; }
.vc-place-live { margin: 4px 0 12px; font-size: .86rem; }
.vc-place-live:empty { display: none; }
.vc-place-provinces { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px 24px; padding: 0; margin: 0 0 24px; list-style: none; }
.vc-place-provinces a { display: inline-flex; align-items: center; min-height: 40px; }
.vc-place-directory-list .vc-place-entry { padding: 9px 0; border-bottom: 1px solid var(--border-color,#e4e8ed); }
.vc-place-entry > a { display: block; padding: 2px 0; font-weight: 600; }
.vc-place-context,.vc-place-years { display: block; color: #586475; font-size: .84rem; line-height: 1.5; }
.vc-place-years sup { font-size: .8em; }
.vc-place-count { font-size: .8em; font-weight: 400; }
.vc-place-results-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.vc-place-results-footer > p { margin: 8px 0; font-size: .85rem; }
.vc-place-results-footer .vc-pagination { margin: 8px 0; }
.vc-place-results-footer [aria-current="page"] { color: #fff; background: #1468c8; border-radius: 3px; padding: 6px 10px; }
.vc-place-legend { font-size: .82rem; margin: 6px 0 16px; }
.vc-place-district-group { border-top: 1px solid var(--border-color,#e4e8ed); padding-top: 12px; }
.vc-place-district-group > summary { cursor:pointer; display:list-item; padding: 4px 0; }
.vc-place-district-group > summary h2 { display:inline; margin:0 12px 0 0; font-size:1.1rem; }
.vc-place-district-group > summary > span { font-size:.85rem; }
.vc-election-directory-years .vc-year-latest { font-weight:700; }
.vc-election-directory-years sup { font-size:.7em; margin-left:1px; }
[data-place-results][aria-busy="true"] { opacity:.6; }
[data-place-featured][hidden] { display:none; }
@media(max-width:600px) {
 .vc-place-provinces { grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 14px; }
 .vc-place-major-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 14px; }
 .vc-place-entry > a { min-height:44px; }
 .vc-place-context,.vc-place-years { font-size:.8rem; }
 .vc-place-results-footer { align-items:flex-start; }
 .vc-place-browser .vc-filter-bar select { width:100%; max-width:none; }
}

/* Expand local entities within their directory, rather than opening detail URLs. */
.vc-place-entry > .vc-party-disclosure { margin: 0; padding: 0; }
.vc-place-entry > .vc-party-disclosure > summary { background: transparent; border: 0; padding-left: 0; }
.vc-place-entry:has(>details[open]) { grid-column: 1 / -1; }
.vc-place-entry [data-browse-content] { min-width: 0; }
.vc-place-entry [data-browse-content] table { min-width: 0; }
.votecan-ui [data-browse-content] > .vc-party-disclosure { margin: 8px 0; }
.votecan-ui td > [data-municipal-election-details][open] { min-width: 0; }
@media (max-width:600px) {
 .votecan-ui [data-browse-content] .vote-table { overflow: visible; }
 .votecan-ui [data-browse-content] table { min-width: 0; }
}
.votecan-ui [data-browse-row] > td { padding: 12px; }
.votecan-ui [data-browse-row] > td > [data-browse-content] { white-space: normal; }
.votecan-ui .vc-candidate-results td > [data-person-details] { margin: 0; padding: 0; }
.votecan-ui .vc-candidate-results td > [data-person-details] > summary { background: transparent; border: 0; padding: 4px 24px 4px 0; min-height: 0; font: inherit; }
.votecan-ui .vc-candidate-results td > [data-person-details] > summary::after { right: 4px; top: 4px; }

/* Annual by-election results stay within the directory. */
.vc-election-directory-kind > div > .vc-by-election-disclosure { margin: 0; min-width: 0; }
.vc-election-directory-kind .vc-by-election-disclosure > summary { min-height: 32px; display: flex; align-items: center; gap: 5px; color: var(--link-color, #0066cc); font-variant-numeric: tabular-nums; }
.vc-election-directory-kind .vc-by-election-disclosure[open] { flex-basis: 100%; }
.vc-by-election-disclosure > [data-browse-content] { min-width: 0; }
@media(max-width:600px) { .vc-election-directory-kind .vc-by-election-disclosure > summary { min-height: 44px; } }
.votecan-ui .vc-election-directory-kind .vc-by-election-disclosure > summary { border: 0; background: transparent; padding: 4px 18px 4px 0; font-size: inherit; }
.votecan-ui .vc-election-directory-kind .vc-by-election-disclosure > summary::after { right: 0; top: 50%; transform: translateY(-50%); }
.vc-election-directory-years, .vc-election-directory-kind > div { min-width: 0; }
.vc-coverage-region > .vc-coverage-detail { padding: 0 12px 12px; }
.vc-coverage-region .vc-coverage-detail > section { padding: 10px 0; border-bottom: 1px solid var(--border); }
.vc-coverage-region .vc-coverage-detail > section:last-child { border-bottom: 0; }
.vc-coverage-years { line-height: 1.8; overflow-wrap: anywhere; }
.vc-deferred-by-elections { margin-top: 24px; }
.vc-election-directory-kind > div > .vc-by-election-disclosure { padding: 0; border: 0; }
#history-year { width: 150px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; }
@media(max-width:600px) { .vc-filter-bar > label[for="history-year"] { flex-basis: 100%; } #history-year { flex: 1; width: auto; min-width: 0; } }

/* Province context is already supplied by the page title. */
.vc-election-directory-row.vc-election-directory-local { grid-template-columns: minmax(0,1fr); }
.vc-election-directory-local .vc-election-directory-kind { grid-template-columns: 110px minmax(0,1fr); }
.vc-event-context { max-width: 75ch; }
/* One heading and one close control across expanded contest results. */
.vc-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin: 0 0 16px; }
.vc-result-heading > div:first-child { min-width: 0; }
.votecan-ui .vc-result-heading h4 { margin: 0; font-size: 1rem; line-height: 1.45; }
.vc-result-heading p { margin: 4px 0 0; font-size: .85rem; color: var(--text-muted); }
.vc-result-heading .vc-history-detail-actions { flex-shrink: 0; margin: 0; gap: 12px; }
.vc-result-heading .vc-history-detail-actions a { font-size: .82rem; }
.vc-result-heading button { min-height: 44px; padding: 6px 10px; font: inherit; font-size: .85rem; color: var(--accent); border: 1px solid var(--border); border-radius: 4px; background: var(--surface); cursor: pointer; }
.votecan-ui .vc-contest-detail { border: 0; border-left: 3px solid var(--border); border-radius: 0; padding: 16px; background: var(--surface-alt); }
.votecan-ui .vc-contest-detail .vc-contest-detail { border: 0; padding: 0; background: transparent; }
.votecan-ui [data-history-row] > td, .votecan-ui [data-detail-row] > td { padding: 12px 0; }
@media(max-width:600px) {
 .vc-election-directory-local .vc-election-directory-kind { grid-template-columns: 100px minmax(0,1fr); gap: 8px; }
 .vc-result-heading { position: relative; flex-direction: column; padding-right: 54px; gap: 6px; }
 .vc-result-heading > button, .vc-result-heading .vc-history-detail-actions button { position: absolute; top: 0; right: 0; }
 .vc-result-heading .vc-history-detail-actions { flex-wrap: wrap; gap: 6px; }
 .votecan-ui .vc-contest-detail { padding: 12px; }
}

/* Keep evidence visible without putting the complete source list above results. */
.vc-source-disclosure { margin: 10px 0 14px; color: var(--text-muted); font-size: .8rem; }
.vc-source-disclosure > summary { cursor: pointer; line-height: 1.7; }
.vc-source-disclosure > summary > span + span::before { content: ' · '; padding: 0 3px; }
.vc-source-disclosure > div { margin: 8px 0 0; padding-left: 14px; border-left: 2px solid var(--border); }
.vc-source-disclosure ul { margin: 5px 0; padding-left: 18px; }
.votecan-ui details.vc-metric-note { margin: 8px 0 16px; }
.votecan-ui details.vc-metric-note > summary { border: 0; background: transparent; padding: 4px 22px 4px 0; min-height: 32px; font-size: .82rem; }
.votecan-ui details.vc-metric-note > summary::after { top: 4px; right: 3px; }
.vc-metric-note > p { max-width: 75ch; margin: 6px 0; font-size: .82rem; line-height: 1.65; color: var(--text-muted); }
.votecan-ui .table td.num { font-variant-numeric: tabular-nums; }
.votecan-ui [data-winner-district-table] td:first-child a { font-weight: 600; }
.votecan-ui [data-winner-district-table] td[data-label="Elected"] .vc-comparison-name { font-weight: 600; }
.votecan-ui .vc-party-results .vc-vote-meter { height: 3px; opacity: .7; }
.vc-candidate-party-mobile, .vc-candidate-result-mobile { display: none; }
/* Coverage markers sit beside links, never inside another interactive control. */
.vc-year-entry { display: inline-flex; align-items: baseline; gap: 2px; min-width: 0; }
.vc-place-years .vc-year-entry { display: inline-flex; }
.vc-year-entry > .vc-by-election-disclosure { margin: 0; padding: 0; border: 0; min-width: 0; }
.vc-year-entry:has(> [data-by-election-details][open]) { flex-basis: 100%; align-items: flex-start; }
.vc-year-entry > [data-by-election-details][open] { flex: 1; }
.vc-coverage-marker { display: inline-block; position: relative; font-size: .8rem; vertical-align: super; }
.vc-coverage-marker > summary { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 32px; list-style: none; color: var(--accent); cursor: pointer; font-weight: 600; }
.vc-coverage-marker > summary::-webkit-details-marker { display: none; }
.vc-coverage-marker > span { display: block; position: absolute; z-index: 10; top: 100%; right: 0; width: min(240px,65vw); padding: 12px; color: var(--text); font-size: .82rem; font-weight: 400; line-height: 1.6; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 3px 12px #0002; }
.vc-coverage-guide { margin: 4px 0 16px; color: var(--text-muted); font-size: .82rem; }
.vc-coverage-guide > summary { cursor: pointer; min-height: 32px; }
.vc-coverage-guide > p { max-width: 75ch; line-height: 1.6; margin: 4px 0; }
@media(max-width:600px) {
 .vc-source-disclosure { font-size: .76rem; }
 .vc-source-disclosure > summary { line-height: 1.8; }
 .vc-coverage-marker > summary { min-height: 44px; }
 .votecan-ui [data-winner-district-table] tbody > tr > td[data-label="Runner-up"] { display: none; }
 .votecan-ui [data-winner-district-table] td[data-label="Margin (pp)"] { text-align: right; font-variant-numeric: tabular-nums; }
 .votecan-ui .vc-runner-mobile summary { min-height: 36px; font-size: .76rem; }
 .votecan-ui .vc-candidate-results tbody > tr { padding: 10px 0; gap: 6px 14px; }
 .votecan-ui .vc-candidate-results tbody > tr > td[data-label="Party"], .votecan-ui .vc-candidate-results tbody > tr > td[data-label="Result"] { display: none; }
 .vc-candidate-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
 .vc-candidate-party-mobile, .vc-candidate-result-mobile { display: inline; }
 .vc-candidate-party-mobile { color: var(--text-muted); font-size: .78rem; }
 .vc-candidate-result-mobile .vc-badge { font-size: .67rem; padding: 2px 4px; }
 .votecan-ui .vc-candidate-results tbody > tr > td.num { text-align: right; }
 .votecan-ui .vc-candidate-results tbody > tr > td.num::before { font-size: .67rem; margin-bottom: 1px; }
 .votecan-ui .vc-candidate-results .vc-vote-meter { display: none; }
}
.vc-coverage-marker [data-coverage-close] { float: right; margin: -4px -4px 4px 8px; min-height: 32px; border: 0; background: transparent; color: var(--accent); font: inherit; cursor: pointer; }
@media(max-width:600px) {
 .vc-coverage-marker > span { position: fixed; left: 16px; right: 16px; top: auto; bottom: 20px; width: auto; z-index: 30; }
 .vc-coverage-marker [data-coverage-close] { min-height: 44px; }
}

/* Search-led homepage: real directory links rather than unsupported level filters. */
.vc-home-intro { display: grid; grid-template-columns: 3fr 2fr; background: #f3f6fa; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.vc-home-intro-content { padding: 34px; }
.vc-home-eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.votecan-ui .vc-home-intro h1 { margin: 0 0 14px; font-size: clamp(2rem,3.5vw,3rem); line-height: 1.12; letter-spacing: -.025em; }
.vc-home-description { max-width: 42ch; color: var(--text-muted); line-height: 1.6; margin: 0 0 22px; }
.vc-home-intro .vc-search { width: 100%; max-width: none; background: var(--surface); }
.vc-home-intro .vc-search input { min-width: 0; }
.vc-home-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: .87rem; font-weight: 600; }
.vc-home-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.vc-home-photo { background: url('/assets/toronto.jpg') center / cover; min-height: 260px; }
.vc-home-section { margin-top: 32px; }
.vc-home-elections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.vc-home-election { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); }
.vc-home-election:hover { border-color: var(--accent); background: var(--surface-alt); text-decoration: none; }
.vc-home-election-level { color: var(--text-muted); font-size: .73rem; }
.votecan-ui .vc-home-election h3 { font-size: 1.02rem; margin: 6px 0 8px; line-height: 1.45; color: var(--navy); }
.vc-home-election p { margin: 0 0 14px; color: var(--text-muted); font-size: .8rem; }
.vc-home-election-action { display: flex; justify-content: space-between; width: 100%; margin-top: auto; color: var(--accent); font-size: .8rem; font-weight: 600; }
.vc-home-regions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 24px; }
.vc-home-regions a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.vc-home-regions a span { color: var(--text-muted); }
.vc-home-coverage { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 30px; padding: 18px 0 0; border-top: 1px solid var(--border); font-size: .85rem; }
.vc-home-coverage p { color: var(--text-muted); margin: 5px 0 0; }
.vc-home-coverage > a { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; }
@media(max-width:750px) {
 .vc-home-intro { grid-template-columns: 1fr; }
 .vc-home-intro-content { padding: 24px; }
 .vc-home-photo { display: none; }
 .vc-home-regions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
}
@media(max-width:480px) {
 .vc-home-intro-content { padding: 22px 16px; }
 .vc-home-elections { grid-template-columns: 1fr; }
 .vc-home-election { padding: 16px; }
 .vc-home-regions { grid-template-columns: 1fr; }
 .vc-home-coverage { display: block; }
 .vc-home-section .vc-section-heading { align-items: baseline; gap: 12px; }
 .vc-home-section .vc-section-heading h2 { font-size: 1.05rem; }
 .vc-home-section .vc-section-heading > a { font-size: .78rem; flex-shrink: 0; }
}

/* Candidate names in fetched results are text controls, with history in a dialog. */
.votecan-ui .vc-candidate-name { appearance: none; border: 0; border-radius: 0; padding: 0; margin: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.votecan-ui .vc-candidate-name:hover { color: var(--accent); text-decoration: underline; }
.votecan-ui .vc-candidate-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.vc-candidate-dialog { width: min(880px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); overflow: auto; }
.vc-candidate-dialog::backdrop { background: #10243880; }
.votecan-ui .vc-candidate-dialog .vc-sheet-header h2 { margin: 0; font-size: 1.1rem; }
.vc-candidate-dialog [data-person-detail-status]:empty { display: none; }
@media(max-width:600px) {
 .vc-candidate-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 24px); }
 .vc-candidate-name { min-height: 36px; }
}
.vc-search-place-districts { margin: -1px 0 12px; padding: 12px 18px; border: 1px solid var(--border); border-top: 0; }
.votecan-ui .vc-search-place-districts h3 { font-size: .88rem; margin: 8px 0 6px; }
.vc-search-place-districts .vc-place-district-list { margin-bottom: 12px; }

.votecan-ui [data-district-details] > summary::after { content: none; }
.vc-history-dialog .vc-sheet-header p { color: var(--text-muted); font-size: .8rem; margin: 5px 0 0; }
.votecan-ui .vc-search-types button { display:flex;align-items:center;gap:8px;min-height:44px;padding:7px 12px;border:1px solid var(--border);border-radius:4px;font:inherit;font-size:.85rem;color:var(--accent);background:var(--surface);cursor:pointer; }
.votecan-ui .vc-search-types button[aria-pressed="true"] { border-color:var(--accent);background:var(--accent-soft);font-weight:600; }
.votecan-ui .vc-search-types button:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
@media(max-width:600px){.votecan-ui .vc-search-types button{padding:7px 9px;}}
.votecan-ui .vc-place-district-list .vc-district-historical > summary { color: var(--text-muted); }
.votecan-ui .vc-place-district-list .vc-district-historical > summary:hover { color: var(--accent); }
.votecan-ui [data-municipality-details] > summary::after { content: none; }
.vc-history-dialog .vc-result-lead > .vc-cell-secondary { display: block; margin-bottom: 3px; }
.votecan-ui [data-by-election-modal] > summary::after { content: none; }
/* Keep coverage stars visually attached to their year while retaining the hit area. */
.vc-year-entry { gap: 1px; }
.vc-year-entry > .vc-coverage-marker > summary { justify-content: flex-start; padding: 0; position: relative; top: -.25em; }
.votecan-ui .vc-year-entry > [data-by-election-modal] > summary { padding-right: 0; }
.vc-person-list-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.votecan-ui .vc-person-name { appearance: none; background: transparent; border: 0; padding: 0; margin: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.votecan-ui .vc-person-name:hover { color: var(--accent); text-decoration: underline; }
.votecan-ui .vc-person-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.vc-person-latest-election { margin: 5px 0; font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.vc-person-latest-result { color: var(--text); }
mark.vc-search-match { background: #fff0b3; color: inherit; padding: 0; }

.vc-person-latest { display: grid; grid-template-columns: minmax(0,1fr) 105px 65px 80px; align-items: baseline; gap: 6px 16px; margin-top: 5px; font-size: .8rem; color: var(--text-muted); }
.vc-person-latest .vc-person-latest-election { margin: 0; min-width: 0; }
.vc-person-latest-votes, .vc-person-latest-percent { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media(max-width:650px) {
 .vc-person-latest { grid-template-columns: minmax(0,1fr) 65px 80px; gap: 6px 12px; }
 .vc-person-latest .vc-person-latest-election { grid-column: 1 / -1; }
 .vc-person-latest-votes { text-align: left; }
}
.vc-party-list-scope { margin-left: 12px; color: var(--text-muted); font-size: .8rem; }
.vc-party-province-group { margin: 20px 0 28px; }
.votecan-ui .vc-party-province-group > h3 { font-size: 1rem; margin: 0 0 6px; }

.vc-home-party-results { display: grid; gap: 7px; width: 100%; margin: 0 0 16px; font-size: .8rem; }
.vc-home-party-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: baseline; }
.vc-home-party-name { overflow-wrap: anywhere; }
.vc-home-party-seats, .vc-home-party-votes { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.vc-home-party-votes { color: var(--text-muted); }
@media (max-width: 380px) { .vc-home-party-row { gap: 7px; font-size: .75rem; } }

/* Keep filters and dialogs steady as asynchronous results change. */
.votecan-ui { scrollbar-gutter: stable; }
.votecan-ui :is(.vc-candidate-dialog,.vc-history-dialog,.vc-district-sheet,.vc-polling-dialog) { overscroll-behavior: contain; }
.votecan-ui .vc-sheet-header :is(h2,strong) { overflow-wrap: anywhere; }
.votecan-ui .vc-sheet-header button { flex-shrink: 0; min-height: 44px; }
.votecan-ui [data-results-status], .votecan-ui [data-place-status], .votecan-ui [data-search-status] { min-height: 1.5em; }
.votecan-ui [aria-busy="true"] { cursor: progress; }
.vc-home-party-name { line-height: 1.4; }
@media (max-width: 600px) {
 .vc-home-party-row { grid-template-columns: minmax(0,1fr) auto; row-gap: 2px; }
 .vc-home-party-votes { grid-column: 1 / -1; text-align: right; }
}

.votecan-ui [data-results-list], .votecan-ui [data-place-results] { overflow-anchor: none; }

.vc-home-party-colour { display: inline-block; margin-right: 6px; flex: none; }
.votecan-ui [data-map-status] { min-height: 1.5em; }
.votecan-ui [data-map-legend] { min-height: 2em; }

.vc-source-region-content { padding: 0 0 8px 16px; }
.vc-source-entry { padding: 12px 0; border-bottom: 1px solid var(--border); }
.vc-source-entry:last-child { border-bottom: 0; }
.votecan-ui .vc-source-entry h4 { margin: 0 0 6px; font-size: .95rem; }
.vc-source-entry p { margin: 5px 0; font-size: .85rem; overflow-wrap: anywhere; }
[data-map-source] { overflow-wrap: anywhere; }

.vc-compact-footer .vc-required-attribution { margin: 6px 0; font-size: .75rem; line-height: 1.5; max-width: 110ch; }

.votecan-ui .vc-source-coverage table { table-layout: fixed; width: 100%; }
.vc-source-coverage thead th:nth-child(1) { width:18%; }
.vc-source-coverage thead th:nth-child(2) { width:39%; }
.vc-source-coverage thead th:nth-child(3) { width:43%; }
.votecan-ui .vc-source-coverage .vc-source-group th { background:var(--surface-alt, #f3f6f8); font-weight:700; font-size:.88rem; padding:9px 8px; }
.votecan-ui .vc-source-coverage :is(th,td) { vertical-align: top; font-size: .8rem; overflow-wrap: anywhere; }
.vc-source-provider { display: block; margin-bottom: 6px; }
.vc-source-provider:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
 .votecan-ui .vc-source-coverage { overflow: visible; }
 .votecan-ui .vc-source-coverage :is(table,tbody) { display: block; min-width: 0; }
 .votecan-ui .vc-source-coverage thead { display: none; }
 .votecan-ui .vc-source-coverage tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
 .votecan-ui .vc-source-coverage tbody th { display: block; width: auto; border: 0; padding: 4px 8px; }
 .votecan-ui .vc-source-coverage td { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 0 8px; padding: 4px 8px; border: 0; }
 .votecan-ui .vc-source-coverage td::before { content: attr(data-label); color: var(--text-muted); font-size: .75rem; }
 .votecan-ui .vc-source-coverage td > * { grid-column: 2; }
}

/* History plots have their own dimensions rather than the shared icon size. */
:is(.votecan-ui,.vote-usa-ui) svg.vc-history-chart { display:block; width:100%; max-width:800px; height:auto; aspect-ratio:8 / 3; margin:12px 0; }

.vc-history-interactive h3 select { font:inherit; color:inherit; border:1px solid var(--border, #cbd5df); border-radius:4px; padding:3px 24px 3px 8px; background-color:transparent; }
.vc-history-switch { display:flex; gap:4px; margin:10px 0; }
.vc-history-switch button { min-height:40px; padding:6px 16px; border:1px solid #b8c6d2; border-radius:4px; background:white; color:#21364b; cursor:pointer; }
.vc-history-switch button[aria-pressed="true"] { background:#185c9b; color:white; border-color:#185c9b; }
.vc-chart-tooltip { position:fixed; z-index:1000; pointer-events:none; max-width:min(320px, calc(100vw - 16px)); padding:8px 10px; background:#172b40; color:#fff; border-radius:4px; font-size:.8rem; box-shadow:0 2px 8px #0003; }
.vc-history-chart circle:hover,.vc-history-chart circle:focus { stroke:currentColor; stroke-width:2; outline:none; }


.vc-grouped-seat-scroll { overflow-x:auto; margin:12px 0; }
:is(.votecan-ui,.vote-usa-ui) svg.vc-grouped-seat-chart { display:block; width:100%; max-width:960px; min-width:540px; height:auto; aspect-ratio:38 / 17; }
.vc-grouped-seat-chart g:focus-visible { outline:none; }
.vc-grouped-seat-chart g:hover rect:not([fill="transparent"]),.vc-grouped-seat-chart g:focus-visible rect:not([fill="transparent"]) { stroke:#21364b; stroke-width:1.5; }
.vc-chart-tooltip { white-space:pre-line; }

/* Compact Canadian wordmark; parts touch without inserting whitespace. */
.vc-brand-wordmark { font-weight:750; letter-spacing:-.65px; line-height:1.15; }
.vc-brand-country { color:#526174; font-weight:600; }
.vc-brand:has(.vc-brand-wordmark) { gap:7px; text-decoration:none; }
.vc-brand:has(.vc-brand-wordmark) svg { width:25px; height:25px; color:#843b43; }
@media(max-width:600px) {
 .vc-brand-wordmark { font-size:1.05rem; letter-spacing:-.5px; }
 .vc-brand:has(.vc-brand-wordmark) svg { width:22px; height:22px; }
 .vc-header:has(.vc-brand-wordmark) .vc-search.header { flex:1; width:110px; min-width:80px; max-width:140px; }
}

.vc-home-by-meta,.vc-home-by-districts { display:block; font-weight:400; line-height:1.5; font-size:.82rem; margin-top:4px; }
.vc-home-by-meta { color:var(--text-muted); }
.vc-home-by-districts { color:var(--text); }

.vc-home-by-elections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.vc-home-by-elections > details { min-width:0; margin:0; }
@media(max-width:600px) {
 .vc-home-by-elections { grid-template-columns:1fr; }
}

.vc-coverage-line { margin-bottom:5px; line-height:1.5; }
.vc-coverage-label { color:var(--text-muted); }

/* Coverage markers occupy only the star width, without a trailing button-sized gap. */
.votecan-ui .vc-year-entry > .vc-coverage-marker > summary {
 display:inline-block; width:auto; min-width:0; min-height:0; height:auto;
 margin:0; padding:0; line-height:1; font-size:.8rem;
}
.votecan-ui .vc-year-entry > .vc-coverage-marker > summary::after { content:none; }

/* Country-neutral directory and result-browser components. */
.vd-country-mark { display:inline-flex; align-items:center; justify-content:center; width:29px; height:28px; border-radius:3px; background:#253c59; border-bottom:3px solid #924653; color:white; font-size:.65rem; letter-spacing:.03em; font-weight:800; }
.vd-text-button { padding:0; border:0; background:transparent; color:var(--accent); font:inherit; text-align:left; cursor:pointer; }
.vd-text-button:hover { text-decoration:underline; }
.vd-text-button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.vd-list-row { display:block; padding:12px 0; border-bottom:1px solid var(--border); color:var(--text); }
.vd-list-row > span { display:block; color:var(--text-muted); font-size:.82rem; margin-top:4px; }
.vd-filter-form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; margin:16px 0 24px; }
.vd-filter-form label { display:grid; gap:4px; flex:1 1 140px; font-size:.8rem; color:var(--text-muted); }
.vd-filter-form :is(input,select) { width:100%; min-height:40px; border:1px solid var(--border); border-radius:4px; padding:7px 9px; background:white; color:var(--text); font:inherit; }
.vd-filter-form button { min-height:40px; border:0; border-radius:4px; padding:8px 18px; background:var(--accent); color:white; cursor:pointer; }
.vd-home-intro { padding:20px 0 28px; max-width:740px; }
.vd-home-intro h1 { font-size:clamp(1.8rem,4vw,2.7rem); line-height:1.2; margin:12px 0; }
.vd-home-intro .vc-search { max-width:600px; margin:20px 0; }
.vd-election-link { display:inline-block; margin-top:4px; font-size:.75rem; }
.vd-result-dialog { width:min(960px,calc(100vw - 32px)); max-height:90dvh; border:1px solid var(--border); border-radius:6px; padding:0; color:var(--text); background:var(--surface); }
.vd-result-dialog::backdrop { background:#14283880; }
.vd-dialog-heading { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; gap:12px; justify-content:space-between; padding:16px 20px; background:var(--surface); border-bottom:1px solid var(--border); }
.vd-dialog-heading h2 { margin:0; font-size:1.1rem; }
.vd-dialog-heading button { min-width:40px; min-height:40px; border:0; border-radius:4px; background:var(--surface-alt); font-size:1.4rem; cursor:pointer; }
.vd-dialog-body { padding:16px 20px; }
.vd-dialog-body summary { cursor:pointer; padding:8px 0; }
.vd-result-dialog .vote-table { max-width:100%; overflow-x:auto; }
.vd-result-dialog .table { min-width:420px; }
.vd-result-dialog .vd-breakdown-table { min-width:600px; }
.vd-result-dialog [data-candidate-extra][hidden] { display:none; }
.vd-mini-badge { font-size:.7rem; color:var(--text-muted); margin-left:6px; }
.vd-chart-bar { display:block; height:3px; margin-top:4px; background:#416b96; border-radius:2px; max-width:100%; }
@media(max-width:600px) {
 .vd-result-dialog { width:calc(100vw - 16px); max-height:92dvh; }
 .vd-dialog-heading,.vd-dialog-body { padding:12px; }
 .vd-filter-form label { flex-basis:calc(50% - 10px); min-width:0; }
 .vote-usa-ui .vc-header .vc-search.header { min-width:80px; max-width:140px; flex:1; }
}
.vd-stored-map-canvas { position:relative; min-height:300px; background:var(--surface-alt); border-radius:4px; overflow:hidden; }
.votecan-ui svg.vd-stored-map { display:block; width:100%; height:430px; touch-action:pan-y; }
.vd-stored-map path { stroke:#fff; stroke-width:.6; vector-effect:non-scaling-stroke; }
.vd-stored-map [data-result-id] { cursor:pointer; }
.vd-stored-map [data-result-id]:hover,.vd-stored-map [data-result-id]:focus { fill-opacity:.7; outline:none; }
@media(max-width:600px) { .votecan-ui svg.vd-stored-map { height:320px; } }

/* Court sections keep competitive seats and nonpartisan retention ballots distinct. */
.vc-judicial-court { margin:24px 0; }
.vc-judicial-court + .vc-judicial-court { border-top:1px solid var(--border); padding-top:20px; }
.vc-judicial-court > h3 { margin:0 0 14px; font-size:1.15rem; }
.vc-judicial-court [data-result-browser] { margin:18px 0 24px; }
.vc-judicial-court h4 { margin:0 0 10px; font-size:.95rem; }
.vc-judicial-court [data-result-status] { margin:8px 0; font-size:.8rem; }
.vc-retention-results .num { font-variant-numeric:tabular-nums; }
@media(max-width:600px) {
 .votecan-ui .vc-retention-results :is(.vote-table,table,tbody) { display:block; min-width:0; width:100%; overflow:visible; }
 .votecan-ui .vc-retention-results thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .votecan-ui .vc-retention-results tbody > tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px 10px; padding:12px 0; border-bottom:1px solid var(--border); }
 .votecan-ui .vc-retention-results tbody > tr > td { display:block; min-width:0; border:0; padding:0; text-align:left; white-space:normal; overflow-wrap:anywhere; }
 .votecan-ui .vc-retention-results td[data-label="Judge"],.votecan-ui .vc-retention-results td[data-label="District"],.votecan-ui .vc-retention-results td[data-label="Result"] { grid-column:1/-1; }
 .votecan-ui .vc-retention-results td[data-label="Judge"] { font-weight:600; }
 .votecan-ui .vc-retention-results td[data-label="District"] { color:var(--text-muted); font-size:.75rem; }
 .votecan-ui .vc-retention-results td[data-label]:not(:first-child)::before { content:attr(data-label); display:block; color:var(--text-muted); font-size:.72rem; }
 .votecan-ui .vc-retention-results :is(td[data-label="District"],td[data-label="Result"])::before { content:none; }
 .votecan-ui .vc-retention-results td[data-label="Result"] { font-size:.8rem; }
}

/* Court navigation keeps one court and one ballot type on screen. */
.vc-court-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:26px; align-items:start; }
.vc-court-nav { position:sticky; top:16px; display:grid; gap:4px; }
.vc-court-nav a { display:block; padding:10px 12px; border-left:3px solid transparent; line-height:1.4; text-decoration:none; }
.vc-court-nav a > span { font-weight:600; font-size:.85rem; }
.vc-court-nav small { display:block; margin-top:4px; color:var(--text-muted); font-size:.73rem; }
.vc-court-nav a[aria-current] { border-left-color:var(--accent); background:var(--surface-alt); }
.vc-court-nav a:hover { background:var(--surface-alt); }
.vc-court-nav a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.vc-court-mobile-select { display:none; }
.vc-court-layout > div { min-width:0; }
[data-court-content] .vc-judicial-court { margin-top:0; }
[data-court-status]:empty { display:none; }
.vc-tab-count { margin-left:5px; font-size:.78em; font-weight:400; color:var(--text-muted); }
@media(max-width:800px) {
 .vc-court-layout { grid-template-columns:minmax(0,1fr); gap:0; }
 .vc-court-nav { display:none; }
 .vc-court-mobile-select { display:flex; align-items:center; gap:10px; margin:12px 0 18px; }
 .vc-court-mobile-select label { font-size:.8rem; color:var(--text-muted); }
 .vc-court-mobile-select select { flex:1; min-width:0; width:100%; min-height:44px; padding:8px; border:1px solid var(--border); border-radius:4px; background:var(--surface); color:var(--text); font:inherit; }
}
.vc-judicial-court > .vc-results-tabs { position:sticky; top:0; z-index:3; background:var(--surface); }
@media(max-width:800px) {
 .vc-court-mobile-select { position:sticky; top:0; z-index:5; padding:8px 0; background:var(--surface); }
 .vc-judicial-court > .vc-results-tabs { top:60px; }
}
