/* ---------- hero: security-paper ground ---------- */
.hero {
  position: relative;
  padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--rule);
  background:
    repeating-radial-gradient(circle at 110% -10%, transparent 0 11px, color-mix(in srgb, var(--green) 7%, transparent) 11px 12px),
    repeating-radial-gradient(circle at -20% 120%, transparent 0 17px, color-mix(in srgb, var(--green) 5%, transparent) 17px 18px),
    var(--paper);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-top: 20px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .tilemap { gap: 3px; } .tile { padding: 2px 3px; border-radius: 4px; font-size: 8.5px; } .tile small { display: none; } .cd-box { min-width: 0; flex: 1; } .cd-box b { font-size: 32px; } }

/* countdown — set like the boxed figure fields on a result sheet */
.countdown { margin-top: 32px; }
.cd-label { font-weight: 650; margin: 0 0 10px; }
.cd-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-box { min-width: 78px; padding: 8px 12px 6px; border: 1.5px solid var(--ink); border-radius: var(--radius-s); background: var(--surface); }
.cd-box b { display: block; font-size: 40px; line-height: 1; font-stretch: 72%; font-weight: 750; font-variant-numeric: tabular-nums; }
.cd-box span { font-size: 12.5px; color: var(--ink-soft); }
.cd-live { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 20px; color: var(--green); }
.cd-live::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--stamp); box-shadow: 0 0 0 0 var(--stamp); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--stamp) 60%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.cd-next { margin-top: 10px; }

.hero-map { margin: 0; }
.hero-map figcaption { margin-top: 12px; }

/* ---------- election switcher ---------- */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--paper-deep); border-radius: 999px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--ink-soft); }
.seg button[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- tally ---------- */
.results-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .results-grid { grid-template-columns: minmax(0, 1fr); } }
.stackbar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--paper-deep); margin-bottom: 20px; }
.stackbar i { display: block; height: 100%; }
.tally-row { display: grid; grid-template-columns: 28px 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.tally-row:last-child { border-bottom: 0; }
.tally-row .rank { color: var(--ink-faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.tally-row .badge { display: grid; place-items: center; height: 34px; border-radius: 6px; font-weight: 850; font-stretch: 88%; font-size: 15px; }
.tally-row .name { min-width: 0; }
.tally-row .name b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tally-row .bar { height: 6px; border-radius: 3px; background: var(--paper-deep); margin-top: 6px; overflow: hidden; }
.tally-row .bar i { display: block; height: 100%; border-radius: 3px; }
.tally-row .votes { text-align: right; }
.tally-row .votes b { display: block; font-size: 24px; line-height: 1; font-stretch: 72%; font-weight: 750; font-variant-numeric: tabular-nums; }
.tally-row .votes span { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tally-row.lead .votes b { color: var(--green); }
.more-parties { margin-top: 12px; }
.empty { padding: 28px 8px; text-align: center; color: var(--ink-soft); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }

.reporting h3 { margin-bottom: 4px; }
.big-fig { font-size: 56px; line-height: 1; font-stretch: 70%; font-weight: 800; font-variant-numeric: tabular-nums; margin: 14px 0 4px; }
.progress { height: 10px; background: var(--paper-deep); border-radius: 5px; overflow: hidden; margin: 12px 0; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 5px; min-width: 2px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14.5px; margin-top: 16px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-stretch: 85%; font-weight: 700; }

/* ---------- state explorer ---------- */
.state-pick { min-width: 240px; }
.state-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .state-grid { grid-template-columns: minmax(0, 1fr); } }
.officials { display: grid; gap: 12px; }
.official { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-left: 5px solid var(--party, var(--rule-strong)); border-radius: var(--radius-s) var(--radius-m) var(--radius-m) var(--radius-s); }
.official .role { font-size: 13px; color: var(--ink-soft); }
.official h3 { margin: 2px 0 4px; }
.official .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.official details { grid-column: 1 / -1; font-size: 13.5px; }
.official summary { cursor: pointer; color: var(--green); font-weight: 600; }
.lga-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lga-chips span { padding: 2px 8px; border-radius: 999px; background: var(--paper-deep); }
.source-note { font-size: 12.5px; color: var(--ink-faint); }
.gov-official { border-left-width: 8px; }

/* ---------- latest ---------- */
#latest .row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--rule); }
#latest .row:last-child { border-bottom: 0; }
#latest .pu b { display: block; }
#latest .pu span { font-size: 13px; color: var(--ink-soft); }
@media (max-width: 600px) { #latest .row { grid-template-columns: 1fr auto; } #latest .row .when { display: none; } }

/* ---------- finder ---------- */
.finder { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .finder { grid-template-columns: minmax(0, 1fr); } }
.finder-form { display: grid; gap: 14px; }
.finder-results { display: grid; gap: 0; max-height: 420px; overflow: auto; }
.pu-hit { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.pu-hit code { font-family: inherit; font-weight: 750; font-stretch: 80%; font-variant-numeric: tabular-nums; color: var(--green); }
.pu-hit span { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- steps (a genuine sequence) ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; padding: 20px 20px 8px 0; position: relative; }
.steps li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.steps li::before { content: counter(s); display: block; font-size: 44px; line-height: 1; font-weight: 800; font-stretch: 70%; color: var(--green); margin-bottom: 12px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

.support { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-left: 6px solid var(--green); }
.support p { margin: 8px 0 0; }
