@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}

:root {
  --forest: #0e6b3a;
  --forest-deep: #07351f;
  --forest-soft: #e8f1e8;
  --gold: #d5ae45;
  --gold-soft: #f4e2ab;
  --cream: #f7f2e4;
  --paper: #fffdf7;
  --ink: #14241d;
  --muted: #5b6b60;
  --line: rgba(7, 53, 31, 0.13);
  --line-soft: rgba(7, 53, 31, 0.07);
  --west: #0e6b3a;
  --central: #b88621;
  --east: #2f6f8f;
  --shadow: 0 26px 60px -42px rgba(7, 53, 31, 0.45);
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(rgba(7, 53, 31, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--gold-soft); color: var(--forest-deep); }
img, svg { max-width: 100%; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.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; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--paper); border-radius: 8px; }
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 53, 31, 0.97);
  color: #fffdf7;
  border-bottom: 1px solid rgba(213, 174, 69, 0.3);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: rgba(255,253,247,.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 13px; font-weight: 750; letter-spacing: .15px; }
.brand-text small { margin-top: 4px; font-size: 9px; font-weight: 600; letter-spacing: 1.9px; text-transform: uppercase; color: var(--gold-soft); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 8px 11px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; color: rgba(255,253,247,.72); white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: #fffdf7; background: rgba(255,253,247,.09); }
.snapshot-pill {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 6px 10px; border: 1px solid rgba(213,174,69,.32); border-radius: 999px;
  font-size: 9.5px; letter-spacing: .35px; color: rgba(255,253,247,.72);
}
.snapshot-pill b { color: var(--gold-soft); font-weight: 650; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(213,174,69,.16); }

/* Shared */
main { display: block; }
.section { max-width: 1280px; margin: 0 auto; padding: 52px 28px 0; scroll-margin-top: 76px; }
.hero-section { padding-top: 44px; }
.eyebrow { margin: 0 0 9px; font-size: 9.5px; font-weight: 750; letter-spacing: 2.1px; text-transform: uppercase; color: var(--gold); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.section-heading h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.08; letter-spacing: -1px; color: var(--forest-deep); font-weight: 750; }
.section-intro { max-width: 460px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 0; }
.card-head h3 { font-size: 16px; line-height: 1.2; color: var(--forest-deep); letter-spacing: -.2px; }
.card-kicker { font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.card-note { padding: 0 20px 18px; font-size: 10px; line-height: 1.55; color: var(--muted); }

/* Hero */
.hero-copy { max-width: 900px; }
.hero-copy h1 {
  max-width: 950px;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.02; letter-spacing: -2.6px; font-weight: 750; color: var(--forest-deep);
}
.hero-copy h1 em { font-style: normal; color: var(--forest); }
.hero-lead { max-width: 680px; margin-top: 18px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1px; transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fffdf7; }
.btn-primary:hover { background: #0b5730; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--forest-deep); }
.btn-ghost:hover { background: var(--paper); border-color: rgba(14,107,58,.35); }
.btn-small { height: 30px; padding: 0 10px; font-size: 10px; border-color: var(--line); background: var(--paper); }
.hero-mark {
  position: absolute; right: 28px; top: 54px; width: 150px; height: 150px; border-radius: 50%;
  border: 1px solid rgba(14,107,58,.18); display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--forest); opacity: .8; pointer-events: none;
}
.hero-mark-number { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -2px; }
.hero-mark-label { margin-top: 5px; font-size: 8px; line-height: 1.4; letter-spacing: 1.4px; text-transform: uppercase; text-align: center; }
.hero-section { position: relative; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 34px; }
.kpi-card { position: relative; overflow: hidden; padding: 16px 16px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.kpi-value { display: block; font-size: clamp(22px, 2.4vw, 29px); line-height: 1.05; letter-spacing: -1px; font-weight: 750; color: var(--forest-deep); }
.kpi-label { display: block; margin-top: 5px; font-size: 9px; line-height: 1.35; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.kpi-sub { display: block; margin-top: 4px; font-size: 9.5px; color: var(--muted); }

.coverage-banner {
  max-width: 1224px; margin: 18px auto 0; padding: 13px 18px;
  display: flex; gap: 12px; align-items: flex-start;
  background: #fdf6e4; border: 1px solid rgba(213,174,69,.42); border-radius: 12px;
  font-size: 11.5px; line-height: 1.55; color: #614b10;
}
.coverage-banner strong { color: #3f3109; }
.coverage-icon { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: #614b10; font-weight: 800; font-size: 12px; }
.coverage-banner a { color: #614b10; text-decoration: underline; text-underline-offset: 2px; }

/* Overview */
.overview-section { padding-top: 44px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .75fr); gap: 14px; }
.map-card { min-width: 0; }
.map-wrap { position: relative; min-height: 360px; padding: 4px 14px 0; }
.map-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-label { font-size: 8px; font-weight: 700; fill: var(--forest-deep); pointer-events: none; }
.map-grid { stroke: rgba(7,53,31,.08); stroke-width: 1; }
.map-axis { font-size: 8px; fill: var(--muted); }
.map-bubble { cursor: pointer; transition: opacity .15s; }
.map-bubble:hover { opacity: .78; }
.legend { display: flex; gap: 10px; font-size: 9px; color: var(--muted); padding-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.west { background: var(--west); }
.dot.central { background: var(--central); }
.dot.east { background: var(--east); }
.rank-list { padding: 13px 20px 20px; display: grid; gap: 10px; }
.rank-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; cursor: pointer; }
.rank-index { font-size: 9px; font-weight: 700; color: rgba(7,53,31,.35); }
.rank-main { min-width: 0; }
.rank-name { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; font-weight: 650; color: var(--forest-deep); }
.rank-name span:last-child { color: var(--muted); font-weight: 500; }
.rank-track { height: 5px; margin-top: 5px; border-radius: 99px; background: var(--forest-soft); overflow: hidden; }
.rank-fill { height: 100%; border-radius: inherit; background: var(--forest); }
.rank-pct { font-size: 9px; color: var(--muted); min-width: 30px; text-align: right; }

/* LGA grid */
.lga-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lga-card {
  padding: 15px 15px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.lga-card:hover { border-color: rgba(14,107,58,.35); transform: translateY(-2px); box-shadow: 0 16px 32px -30px rgba(7,53,31,.55); }
.lga-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lga-code { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--forest); background: var(--forest-soft); border-radius: 99px; padding: 3px 6px; }
.lga-district { font-size: 8px; font-weight: 650; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.lga-name { margin-top: 9px; font-size: 15px; line-height: 1.2; letter-spacing: -.25px; font-weight: 750; color: var(--forest-deep); }
.lga-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 11px; }
.lga-stat { display: flex; flex-direction: column; gap: 1px; }
.lga-stat b { font-size: 13px; color: var(--forest-deep); line-height: 1.2; }
.lga-stat span { font-size: 8px; text-transform: uppercase; letter-spacing: .55px; color: var(--muted); }
.lga-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); font-size: 9px; color: var(--muted); }
.lga-foot b { color: var(--forest); font-weight: 700; }

/* Tabs/tables */
.tab-row { display: flex; gap: 5px; margin-bottom: 10px; }
.tab { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; height: 34px; padding: 0 12px; font-size: 10.5px; font-weight: 650; color: var(--muted); }
.tab span { margin-left: 5px; font-size: 9px; color: rgba(7,53,31,.45); }
.tab.active { background: var(--forest); border-color: var(--forest); color: #fffdf7; }
.tab.active span { color: var(--gold-soft); }
.table-card { overflow: hidden; }
.table-tools { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.table-tools .table-meta { margin-left: auto; }
.table-scroll { overflow: auto; max-height: 620px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
thead th {
  position: sticky; top: 0; z-index: 1;
  padding: 9px 12px; text-align: left; background: #fbf8ef; border-bottom: 1px solid var(--line);
  font-size: 8.5px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
thead th.num, tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); color: #33453b; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbf8ef; }
tbody tr.clickable { cursor: pointer; }
.table-meta { font-size: 9.5px; color: var(--muted); }
.cell-strong { font-weight: 650; color: var(--forest-deep); }
.cell-muted { color: #96a196; }
.chip { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 99px; background: var(--forest-soft); color: var(--forest); font-size: 8px; font-weight: 700; letter-spacing: .25px; white-space: nowrap; }
.chip.gold { background: #fdf6e4; color: #8a6512; }
.chip.east { background: #eaf3f7; color: #275d77; }
.empty-row { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 11px; }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.search-field, .select-field {
  display: inline-flex; align-items: center; height: 34px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 10px;
}
.search-field input, .select-field select { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10.5px; min-width: 0; }
.search-field input { width: 240px; }
.search-field.grow { flex: 1 1 260px; }
.search-field.grow input { width: 100%; }
.select-field select { max-width: 210px; }
.check-field { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); padding: 0 2px; }
.check-field input { accent-color: var(--forest); }
.section-tools { display: flex; gap: 8px; }

/* Councillors */
.councillor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.councillor-card {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 11px; align-items: start;
  padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px;
  text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.councillor-card:hover { border-color: rgba(14,107,58,.35); transform: translateY(-2px); box-shadow: 0 16px 32px -30px rgba(7,53,31,.55); }
.councillor-photo { width: 58px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--forest-soft); display: block; }
.councillor-photo.fallback { display: grid; place-items: center; color: var(--forest); font-weight: 800; font-size: 17px; }
.councillor-name { font-size: 12px; font-weight: 750; line-height: 1.25; color: var(--forest-deep); }
.councillor-role { margin-top: 3px; font-size: 8.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gold); }
.councillor-place { margin-top: 4px; font-size: 9.5px; line-height: 1.4; color: var(--muted); }
.councillor-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.load-row { display: flex; justify-content: center; margin-top: 14px; }
.pager { display: inline-flex; align-items: center; gap: 8px; font-size: 9.5px; color: var(--muted); }

/* Notes */
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note-card { padding: 18px; }
.note-card h3 { font-size: 14px; color: var(--forest-deep); letter-spacing: -.15px; }
.note-card p { margin-top: 7px; font-size: 11px; line-height: 1.65; color: var(--muted); }
.note-card b { color: #33453b; }
#notes .table-card { margin-top: 12px; }
.footnote { max-width: 1000px; margin: 14px 0 0; font-size: 10px; line-height: 1.65; color: var(--muted); }

/* Footer */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--forest-deep); color: rgba(255,253,247,.68); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 7px; }
.footer-brand strong { display: block; color: #fffdf7; font-size: 11px; }
.footer-brand small { display: block; margin-top: 2px; color: var(--gold-soft); font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; }
.site-footer p { font-size: 9.5px; text-align: right; }
.site-footer b { color: var(--gold-soft); font-weight: 600; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7,53,31,.58); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(7,53,31,.7); animation: modal-in .18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(7,53,31,.06); color: var(--forest-deep); font-size: 22px; line-height: 1; display: grid; place-items: center; }
.modal-close:hover { background: var(--forest-soft); }
.modal-body { padding: 24px; }
.modal-eyebrow { font-size: 9px; font-weight: 750; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold); }
.modal-title { margin-top: 5px; font-size: 26px; line-height: 1.12; letter-spacing: -.8px; color: var(--forest-deep); }
.modal-sub { margin-top: 5px; font-size: 11px; color: var(--muted); }
.modal-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 16px; }
.modal-kpi { padding: 9px 10px; background: #fbf8ef; border: 1px solid var(--line-soft); border-radius: 9px; }
.modal-kpi b { display: block; font-size: 16px; color: var(--forest-deep); }
.modal-kpi span { display: block; margin-top: 2px; font-size: 7.5px; text-transform: uppercase; letter-spacing: .55px; color: var(--muted); }
.modal-section { margin-top: 20px; }
.modal-section h3 { font-size: 12px; font-weight: 750; color: var(--forest-deep); margin-bottom: 7px; }
.modal-section .table-scroll { max-height: 320px; border: 1px solid var(--line-soft); border-radius: 9px; }
.modal-profile { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; }
.modal-portrait { width: 128px; height: 160px; border-radius: 10px; object-fit: cover; background: var(--forest-soft); }
.modal-portrait.fallback { display: grid; place-items: center; color: var(--forest); font-weight: 800; font-size: 36px; }
.modal-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.modal-list li { display: grid; grid-template-columns: 78px 1fr; gap: 8px; font-size: 10.5px; line-height: 1.45; color: #33453b; }
.modal-list span:first-child { font-size: 8px; font-weight: 750; letter-spacing: .55px; text-transform: uppercase; color: var(--muted); padding-top: 1px; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--cream); padding: 24px; z-index: 100; }

@media (max-width: 1100px) {
  .lga-grid, .councillor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .rank-list { grid-template-columns: 1fr 1fr; }
  .hero-mark { display: none; }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 10px 18px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; padding-bottom: 3px; }
  .snapshot-pill { margin-left: auto; }
  .section { padding: 38px 18px 0; }
  .hero-section { padding-top: 30px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lga-grid, .councillor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .site-footer p { text-align: left; }
  .modal-profile { grid-template-columns: 92px minmax(0, 1fr); }
  .modal-portrait { width: 92px; height: 115px; }
  .modal-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .brand-text strong { font-size: 11px; }
  .brand-text small { font-size: 8px; }
  .snapshot-pill { display: none; }
  .hero-copy h1 { font-size: 37px; letter-spacing: -1.6px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .lga-grid, .councillor-grid { grid-template-columns: 1fr; }
  .rank-list { grid-template-columns: 1fr; }
  .table-tools { align-items: flex-start; }
  .table-tools .table-meta { margin-left: 0; }
  .search-field input { width: 100%; }
  .filter-bar > * { width: 100%; }
  .search-field, .select-field { width: 100%; }
  .select-field select { width: 100%; max-width: none; }
  .modal-body { padding: 20px 16px; }
  .modal-title { font-size: 22px; }
  .modal-profile { grid-template-columns: 1fr; }
  .modal-portrait { width: 96px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
