:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1d2330; --muted: #6b7280;
  --line: #e4e7ec; --primary: #1b5e9b; --primary-ink: #fff;
  --warn: #b54708; --ok: #067647; --err: #b42318;
  --brand: #212f64; --brand-gold: #ffd700;   /* PANDA "Perfect 10 Ring" */
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 1.25rem; background: var(--brand); color: #fff; }
.topbar .brand { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; }
.topbar .brand-logo { display: block; }
.topbar .brand-name { font-weight: 800; letter-spacing: .04em; }
.topbar .brand-sub { color: #aeb8d6; font-weight: 500; font-size: .9rem;
  border-left: 1px solid rgba(255,255,255,.25); padding-left: .5rem; }
.topbar .brand:hover { text-decoration: none; }

/* Login screen */
.login-card { text-align: center; }
.login-logo { margin: .25rem auto .4rem; display: block; }
.login-card h1 { font-size: 1.6rem; letter-spacing: .06em; color: var(--brand); margin: 0; }
.login-card .tagline { font-weight: 600; color: var(--ink); margin: .2rem 0 .1rem; }
.login-card .brand-expand { font-size: .82rem; margin: 0 0 1.1rem; }
.login-card form { text-align: left; margin-top: .6rem; }
.topbar .who { color: #c9d2dd; margin-right: 1rem; }
.topbar nav { display: flex; align-items: center; gap: 1rem; }
.topbar .navlink { color: #c9d2dd; }
.topbar .navlink:hover { color: #fff; }
.role-badge { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  background: rgba(255,255,255,.16); padding: .05rem .4rem; border-radius: 999px; }

/* login: SSO button + break-glass separator */
.btn.block, .primary.block, button.block { display: block; width: 100%; text-align: center;
  box-sizing: border-box; margin-bottom: .6rem; }
.or-sep { text-align: center; margin: .7rem 0 .5rem; font-size: .85rem; }

/* Visually-hidden label kept for screen readers (the date input is self-evident sighted). */
.sr-inline { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

main { max-width: 1040px; margin: 1.5rem auto; padding: 0 1.25rem; }
.page-head h1, .card h1 { margin: 0 0 .25rem; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.1rem 1.25rem; margin-bottom: 1.1rem; }
.card.narrow { max-width: 360px; margin: 3rem auto; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .9rem; margin: 0; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; }

table.grid { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.grid th, .grid td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.grid th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }

button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 7px; padding: .45rem .8rem; }
.btn:hover { background: #f0f2f5; text-decoration: none; }
button.primary, .primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
button.warn, .warn { background: #fff; color: var(--warn); border-color: #f0c8a0; }
button.ghost { background: #fff; color: var(--muted); }
button.small, .small { padding: .3rem .6rem; font-size: .9rem; }
button.link { background: none; border: none; color: #c9d2dd; padding: 0; }
button.link:hover { color: #fff; text-decoration: underline; }

form.inline { display: inline; } form.actions { display: flex; gap: .6rem; flex-wrap: wrap;
  align-items: center; margin-top: 1rem; }
form.search { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
input[type=text], input[type=password] { font: inherit; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 7px; }
form.search input[type=text], input.note { flex: 1; min-width: 220px; }
.card.narrow label { display: block; margin: .5rem 0 .25rem; }
.card.narrow input { width: 100%; margin-bottom: .8rem; }

/* UC1b registered: party breakdown chips */
.party-breakdown { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.party-breakdown .chip { font-size: .85rem; padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); }
.party-breakdown .chip strong { color: var(--ink); }

/* UC3 venues: tabs, status badges, add/edit form */
.tabs { display: flex; gap: .4rem; align-items: center; margin: .5rem 0 1rem; flex-wrap: wrap; }
.tabs .tab { padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); background: #fff; }
.tabs .tab.on { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.tabs .tab:hover { text-decoration: none; }
.tabs-actions { margin-left: auto; display: flex; gap: .5rem; }

.badge { font-size: .78rem; padding: .12rem .5rem; border-radius: 999px; border: 1px solid; text-transform: capitalize; }
.badge.b-held        { color: var(--ok);   border-color: #a6f0c6; background: #ecfdf3; }
.badge.b-prospective { color: var(--primary); border-color: #bcd7f5; background: #eff6ff; }
.badge.b-archived    { color: var(--muted); border-color: var(--line); background: #f6f7f9; }
.badge.reason-both               { color: var(--ok); border-color: #a6f0c6; background: #ecfdf3; }
.badge.reason-moved-in           { color: var(--primary); border-color: #bcd7f5; background: #eff6ff; }
.badge.reason-recently-registered { color: var(--warn); border-color: #f0c8a0; background: #fff7ed; }

.venue-form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.1rem; align-items: start; }
.venue-form .fld { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
.venue-form .fld.wide { grid-column: 1 / -1; }
.venue-form input, .venue-form select, .venue-form textarea { font: inherit; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 7px; width: 100%; }
.venue-form .form-actions { grid-column: 1 / -1; display: flex; gap: .6rem; }
@media (max-width: 640px) { .venue-form { grid-template-columns: 1fr; } }

/* UC2 mailer-radius map + form */
.map { height: 380px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 1rem; }
.radius-form { flex-wrap: wrap; align-items: flex-end; }
.radius-form .modes { border: 0; padding: 0; margin: 0; display: flex; gap: .9rem; }
.radius-form .modes label { display: inline-flex; align-items: center; gap: .3rem; }
.radius-form .fld { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem;
  color: var(--muted); flex: 0 0 auto; }
.radius-form .fld input, .radius-form .fld select { min-width: 6.5rem; }
.radius-form #lat, .radius-form #lon { min-width: 8rem; }
.radius-form input[type=range] { width: 12rem; vertical-align: middle; }
.radius-form #radius_ft_out { font-weight: 600; color: var(--ink); }
.live-count { font-size: 1rem; color: var(--ink); font-weight: 500; }
.spinner { display: inline-block; width: .85em; height: .85em; vertical-align: -1px;
  margin-right: .4rem; border: 2px solid var(--line); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.6s; } }

.flash { padding: .6rem .9rem; border-radius: 8px; margin-bottom: .9rem; border: 1px solid; }
.flash-info { background: #eff6ff; border-color: #bcd7f5; }
.flash-success { background: #ecfdf3; border-color: #a6f0c6; color: var(--ok); }
.flash-error { background: #fef3f2; border-color: #fda29b; color: var(--err); }

.score { font-family: ui-monospace, monospace; padding: .05rem .4rem; border-radius: 5px;
  background: #eee; }
.score.s9, .score.s10 { background: #d1fadf; color: #05603a; }
.score.s7, .score.s8 { background: #e6f4d7; color: #3b6212; }
.score.s5, .score.s6 { background: #fef7c3; color: #854a0e; }
.score.s0, .score.s1, .score.s2, .score.s3, .score.s4 { background: #fee4e2; color: #912018; }

.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

/* ---- Tools-menu top nav (screen 06) ---- */
.topbar { justify-content: flex-start; gap: .75rem; }   /* override earlier space-between */
.page-context { color: #aeb8d6; font-size: .95rem; font-weight: 500;
  border-left: 1px solid rgba(255,255,255,.25); padding-left: .75rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.tools-menu { position: relative; }
.tools-menu > summary { list-style: none; cursor: pointer; }
.tools-menu > summary::-webkit-details-marker { display: none; }
.tools-btn { display: inline-block; background: #fff; color: var(--brand); font-weight: 700;
  font-size: .85rem; padding: .3rem .7rem; border-radius: 7px; }
.tools-btn:hover { background: #eef0f5; }
.tools-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; min-width: 252px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 34px rgba(28,35,51,.20); padding: .35rem; }
.tools-panel a, .tools-item { display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; padding: .5rem .7rem; border-radius: 7px; color: var(--ink); font-size: .95rem;
  text-decoration: none; }
.tools-panel a:hover { background: #f0f2f8; text-decoration: none; }
.tools-panel a.on { background: #f0f2f8; color: var(--brand); font-weight: 700; }
.tools-item.disabled { color: #b8bcc6; cursor: default; }
.tools-section { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #9aa0ad; padding: .55rem .7rem .2rem; border-top: 1px solid var(--line); margin-top: .3rem; }
.badge-count { font-size: .72rem; font-weight: 700; color: var(--err); background: #fee4e2;
  padding: .02rem .4rem; border-radius: 999px; }

/* ---- Audience Builder (screen 05) ---- */
.builder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem; }
.builder-head h1 { margin: 0 0 .2rem; }
.live-badge { flex: 0 0 auto; background: var(--brand); color: #fff; font-weight: 700; font-size: 1rem;
  padding: .5rem .9rem; border-radius: 8px; white-space: nowrap; }
a.live-badge { text-decoration: none; cursor: pointer; }
a.live-badge:hover { filter: brightness(1.08); }
.live-badge.disabled { opacity: .55; pointer-events: none; }
.builder { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.1rem; align-items: start; }
@media (max-width: 820px) { .builder { grid-template-columns: 1fr; } }
.builder-left, .builder-right { display: flex; flex-direction: column; gap: 1rem; }
.source-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem;
  border: 1.5px solid var(--border, #c9c5bb); border-radius: 999px; background: #fff; font-size: .9rem;
  cursor: pointer; }
.chip input { accent-color: var(--brand); }
.chip:has(input:checked) { border-color: var(--brand); background: rgba(33,47,100,.08);
  color: var(--brand); font-weight: 600; }
.chip.disabled { color: #b8bcc6; border-style: dashed; cursor: default; }
.source-controls { display: flex; flex-direction: column; gap: .7rem; align-items: stretch; }
.source-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.source-controls .fld { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); }
.source-controls input[type=range] { width: 100%; vertical-align: middle; }
#fld-radius, #fld-count, #fld-neighborhood { flex: 1 1 100%; }
#fld-neighborhood select { padding: .35rem .4rem; font-size: .95rem; }
#latlon-row .fld { flex: 1 1 10rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; }
.toggle-row { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; font-size: .95rem; }
.toggle-row > .muted { margin-left: auto; }
.toggle-row.supp-row { cursor: pointer; }
.toggle-row.locked { color: var(--muted); }
.toggle { width: 30px; height: 18px; border-radius: 999px; background: var(--brand); position: relative;
  flex: 0 0 auto; }
.toggle.on::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; }
.supp-row input { accent-color: var(--brand); flex: 0 0 auto; }
.supp-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.cost-lines { margin: 0; }
.cost-lines > div { display: flex; justify-content: space-between; padding: .3rem 0;
  border-bottom: 1px solid var(--line); }
.cost-lines dt { color: var(--muted); margin: 0; }
.cost-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.cost-lines .cost-total { border-bottom: 0; font-weight: 700; font-size: 1.05rem; }
.cost-lines .cost-total dt, .cost-lines .cost-total dd { color: var(--ink); }
.cost-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }
.save-form { display: flex; gap: .5rem; align-items: center; flex: 1 1 auto; }
.audience-name { flex: 1 1 auto; min-width: 8rem; }
.saved-list { margin-top: 1.1rem; }
.audience-rows { list-style: none; margin: 0; padding: 0; }
.audience-rows li { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem 0;
  border-top: 1px solid var(--line); }
.audience-rows li:first-child { border-top: 0; }

/* ---- Settings page ---- */
.rate-form { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.rate-form .fld, .official-form .fld { display: flex; flex-direction: column; gap: .2rem;
  font-size: .85rem; color: var(--muted); }
.form-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.of-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem 1rem; align-items: end; }
.of-grid .fld.wide { grid-column: span 2; }
.of-grid .fld.chk { flex-direction: row; align-items: center; gap: .4rem; }
.official-form input, .official-form select, .rate-form input { font: inherit; padding: .4rem .55rem;
  border: 1px solid var(--line); border-radius: 7px; }
.officials-table { margin-top: 1rem; }
.of-actions { display: flex; gap: .4rem; white-space: nowrap; }
@media (max-width: 720px) { .of-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Data health page ---- */
.health { font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid;
  text-transform: capitalize; }
.health.h-ok { color: var(--ok); border-color: #a6f0c6; background: #ecfdf3; }
.health.h-stale { color: var(--warn); border-color: #f0c8a0; background: #fff7ed; }
.health.h-failing, .health.h-never_succeeded { color: var(--err); border-color: #fda29b; background: #fef3f2; }
.coverage-num { font-size: 2rem; font-weight: 800; color: var(--brand); margin: .2rem 0; }

/* ---- Home: gold avatar + ADMIN badge in the top bar ---- */
.topbar .avatar { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-gold); color: var(--brand);
  font-weight: 800; font-size: .78rem; letter-spacing: .02em; }
.role-badge.admin { background: var(--brand-gold); color: var(--brand); font-weight: 800; }

/* ---- Home: freshness banner (admin-only, full-bleed, ONE line — screens 07/08) ---- */
.freshness-banner { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.25rem;
  background: #fdf3e4; border-bottom: 1px solid #eeddc0; }
.freshness-banner.sev-red { background: #fbeaea; border-bottom-color: #e8c4c4; }
.freshness-banner .fresh-bang { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--err); color: #fff; font-weight: 800; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center; }
.freshness-banner .fresh-lead { margin: 0; font-weight: 700; color: var(--ink); min-width: 0;
  flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.freshness-banner .fresh-norm { font-weight: 400; color: var(--muted); }
.freshness-banner .fresh-cta { flex: 0 0 auto; background: #fff; color: var(--brand);
  border: 1.5px solid var(--border, #c9c5bb); font-weight: 700; }
.stale-pill { display: inline-block; margin: 0 auto; margin-top: 1rem; padding: .3rem .8rem;
  font-size: .88rem; color: var(--warn); background: #fff7ed; border: 1px solid #f0c8a0;
  border-radius: 999px; }
.stale-pill strong { color: var(--warn); }

/* ---- Home: search-first hero ---- */
.hero { text-align: center; padding: 3.5rem 0 1.5rem; }
.hero-q { font-size: 1.85rem; font-weight: 800; color: var(--brand); margin: 0 0 1.4rem; }
.omnibox { position: relative; max-width: 560px; margin: 0 auto; display: flex; align-items: center; }
.omnibox .omni-icon { position: absolute; left: .85rem; color: var(--muted); pointer-events: none; }
.omnibox input[type=text] { width: 100%; padding: .7rem 2.8rem; font-size: 1rem;
  border: 1.5px solid var(--border, #c9c5bb); border-radius: 10px; background: #fff; }
.omnibox input[type=text]:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(33,47,100,.12); }
.omnibox .slash-hint { position: absolute; right: .8rem; font-family: ui-monospace, monospace;
  font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 5px;
  padding: .05rem .4rem; background: #fafafa; }

.stat-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem;
  margin-top: 1.1rem; font-size: .92rem; color: var(--muted); }
.stat-strip .stat { color: var(--muted); }
.stat-strip a.stat:hover { text-decoration: none; color: var(--brand); }
.stat-strip .stat strong { color: var(--ink); font-weight: 700; }

/* ---- Home: recent lookups card ---- */
.recent-card { max-width: 560px; margin: 0 auto 2rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.section-label { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #9aa0ad; margin-bottom: .6rem; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: flex; align-items: baseline; gap: .5rem; padding: .35rem 0;
  border-top: 1px solid var(--line); }
.recent-list li:first-child { border-top: 0; }
.recent-when { margin-left: auto; color: #9aa0ad; font-size: .85rem; }
.recent-empty { margin: 0; font-size: .92rem; }

/* ---- Verdict page (search → "is this person a constituent?") ---- */
.verdict-search { position: relative; display: flex; align-items: center; max-width: 780px;
  margin: 0 auto 1.1rem; }
.verdict-search .omni-icon { position: absolute; left: .8rem; color: var(--muted); pointer-events: none; }
.verdict-search input[type=text] { width: 100%; padding: .55rem 1rem .55rem 2.4rem; font-size: .98rem;
  border: 1.5px solid var(--border, #c9c5bb); border-radius: 9px; background: #fff; }
.verdict-search input[type=text]:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(33,47,100,.12); }

.verdict-card, .also-represented, .near-matches { max-width: 780px; margin-left: auto; margin-right: auto; }
.verdict-card { background: #fff; border: 1px solid #e3e1db; border-left: 5px solid var(--muted);
  border-radius: 10px; padding: 1.15rem 1.3rem; margin-bottom: 1rem; }
.verdict-card.v-constituent { border-left-color: #1f7a3d; }
.verdict-card.v-moved_out   { border-left-color: #b4690e; }
.verdict-card.v-none, .verdict-card.v-not_d10 { border-left-color: #bd1f3d; }
.verdict-card.v-info        { border-left-color: var(--primary); }

.verdict-main { display: flex; gap: 1.2rem; align-items: flex-start; justify-content: space-between; }
.verdict-body { flex: 1 1 auto; min-width: 0; }
.verdict-head { display: flex; align-items: center; gap: .55rem; }
.verdict-head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.v-icon { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; }
.v-icon.i-constituent { background: #1f7a3d; }
.v-icon.i-moved_out   { background: #b4690e; }
.v-icon.i-none, .v-icon.i-not_d10 { background: #bd1f3d; }
.v-icon.i-info { background: var(--primary); }
.v-constituent .verdict-head h2 { color: #1f7a3d; }
.v-moved_out .verdict-head h2   { color: #b4690e; }
.v-none .verdict-head h2, .v-not_d10 .verdict-head h2 { color: #bd1f3d; }

.conf-banner { margin: .7rem 0 0; padding: .45rem .7rem; border-radius: 7px; font-size: .9rem;
  background: #fff7ed; border: 1px solid #f0c8a0; color: var(--warn); }
.identity { margin-top: .8rem; }
.identity .name { font-weight: 700; font-size: 1rem; }
.party-chip { margin-left: .5rem; font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--brand); background: rgba(33,47,100,.09);
  padding: .1rem .45rem; border-radius: 999px; vertical-align: middle; }
.identity-line { margin-top: .3rem; font-size: .92rem; }
.verdict-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; align-items: center; }
.verdict-actions .btn.chip { background: #f6f7f9; color: var(--muted); cursor: default; }
.verdict-actions .btn.chip:hover { background: #f6f7f9; }

.map-panel { position: relative; flex: 0 0 auto; width: 230px; height: 172px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--line); }
#verdict-map { width: 100%; height: 100%; }
.map-badge { position: absolute; bottom: 8px; left: 8px; z-index: 1; font-size: .66rem; font-weight: 800;
  letter-spacing: .04em; color: #fff; background: var(--brand); padding: .16rem .45rem; border-radius: 5px; }
.map-badge.outside { background: #bd1f3d; }
@media (max-width: 640px) { .verdict-main { flex-direction: column; } .map-panel { width: 100%; } }

.also-represented { padding: .7rem 1.1rem; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 1rem; font-size: .95rem; }
.near-matches { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: .9rem 1.1rem; margin-bottom: 1rem; }
.near-matches ul { list-style: none; margin: 0; padding: 0; }
.near-matches li { display: flex; align-items: baseline; gap: .5rem; padding: .35rem 0;
  border-top: 1px solid var(--line); }
.near-matches li:first-child { border-top: 0; }
.verdict-back { max-width: 780px; margin: .5rem auto 0; }

/* ---- Address referral card (mock 04) ---- */
.addr-line { margin: .4rem 0 .8rem; font-size: .95rem; }
table.referral { width: 100%; border-collapse: collapse; margin-top: .3rem; }
table.referral td { padding: .5rem .5rem; border-top: 1px solid var(--line); vertical-align: top; }
table.referral tr:first-child td { border-top: 0; }
.ref-jur { width: 96px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: #9aa0ad;
  text-transform: uppercase; white-space: nowrap; padding-top: .62rem; }
.ref-who { font-size: .95rem; }
.ref-phone { white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: .58rem; }
.ref-copy { width: 1%; white-space: nowrap; text-align: right; }
.copy-btn { cursor: pointer; }
.unverified { color: var(--warn); cursor: help; }
.map-caption { max-width: 780px; margin: -.4rem auto .8rem; font-size: .88rem; }
.referral-foot { max-width: 780px; margin: .3rem auto 0; }
.referral-foot code { background: #f2f2f0; padding: .05rem .3rem; border-radius: 4px; }

/* ---- Data health v2 (triage) ------------------------------------------------------- */
.dh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1rem; }
.dh-head h1 { margin: 0 0 .2rem; }
.dh-checked { font-size: .85rem; white-space: nowrap; }

/* verdict banner — always the first line */
.verdict-banner { display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem;
  border-radius: 10px; border: 1px solid; margin-bottom: 1.1rem; }
.verdict-banner.warn { background: #fdf3e4; border-color: #eeddc0; color: #8a5a1c; }
.verdict-banner.ok { background: #eef5ef; border-color: #cfe6d5; color: #1f7a3d; }
.verdict-banner p { margin: 0; font-size: .98rem; }
.verdict-disc { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: #bd1f3d; }
.verdict-banner.ok .verdict-disc { background: #1f7a3d; }

/* needs-attention grid */
.attention-grid { display: flex; flex-direction: column; }
.att-row { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr 1.6fr; gap: .6rem 1rem;
  align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.att-row:last-child { border-bottom: 0; }
@media (max-width: 780px) { .att-row { grid-template-columns: 1fr 1fr; } }
.chip-stale { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  padding: .12rem .5rem; border-radius: 999px; color: #bd1f3d; background: #fbeaea; }
.att-remedy .remedy-link { font-weight: 700; color: var(--primary); text-decoration: none; }
.att-remedy .remedy-link:hover { text-decoration: underline; }
.att-remedy .link { border: 0; background: none; padding: 0; color: var(--primary);
  font-weight: 700; text-decoration: underline; cursor: pointer; }
.test-slot .test-result { display: inline-block; margin-left: .4rem; font-size: .85rem; }

/* voter-file cards */
.voter-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: .3rem 0 1rem; }
@media (max-width: 640px) { .voter-cards { grid-template-columns: 1fr; } }
.voter-card { border: 1px solid var(--line); border-radius: 9px; padding: .7rem .8rem; background: #fff; }
.voter-card.vc-due { background: #fdf3e4; border-color: #eeddc0; }
.voter-card.vc-stale { background: #fbeaea; border-color: #f3cccc; }
.vc-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.vc-chip { font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: .1rem .45rem;
  border-radius: 999px; }
.vc-chip-fresh { color: #1f7a3d; background: #eef5ef; }
.vc-chip-due { color: #8a5a1c; background: #f8e6c8; }
.vc-chip-stale { color: #bd1f3d; background: #f3cccc; }
.vc-chip-unknown { color: var(--muted); background: #f0f1f3; }

/* recent uploads list */
.upload-list { list-style: none; margin: .3rem 0 0; padding: 0; }
.upload-list li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0;
  border-bottom: 1px solid var(--line); font-size: .9rem; flex-wrap: wrap; }
.upload-list li:last-child { border-bottom: 0; }
.ul-src { font-weight: 700; font-size: .72rem; letter-spacing: .03em; color: var(--brand);
  background: #f0f2f8; border-radius: 5px; padding: .05rem .4rem; }
.ul-file { flex: 1 1 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ul-status { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: #1f7a3d; } .dot.red { background: #bd1f3d; }
.dot.pulse { background: #8a5a1c; animation: dh-pulse 1.1s ease-in-out infinite; }
@keyframes dh-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* dropzone */
.dropzone-form { margin-top: .5rem; }
.dropzone { border: 1.5px dashed #c9c5bb; border-radius: 10px; padding: 1.1rem; text-align: center;
  background: #faf9f7; color: var(--ink); }
.dropzone.drag { border-color: var(--primary); background: #eef4fb; }
.dz-browse { color: var(--primary); font-weight: 700; cursor: pointer; text-decoration: underline; }
.dz-browse input { display: none; }
.dz-parsed { margin: .6rem 0; font-size: .9rem; }
.dz-parsed .dz-fix { color: var(--primary); }
.dz-manual { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin-top: .7rem; }
.dz-manual label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); }

/* healthy collapsed */
.healthy-details { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem 1.1rem; margin: 1.1rem 0; }
.healthy-details summary { display: flex; align-items: center; gap: .6rem; cursor: pointer;
  list-style: none; }
.healthy-details summary::-webkit-details-marker { display: none; }
.healthy-details .show-all { margin-left: auto; color: var(--primary); font-weight: 600; font-size: .85rem; }
.healthy-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0; }
.chip-ok { font-size: .82rem; font-weight: 600; color: #1f7a3d; background: #eef5ef;
  border: 1px solid #cfe6d5; border-radius: 999px; padding: .18rem .6rem; }
.dh-full { margin-top: .5rem; }
.on-demand-sep { border-top: 2px solid var(--line); padding-top: .6rem; font-size: .85rem; }

/* geocode progress bar */
.progress { height: 8px; background: #eceef1; border-radius: 999px; overflow: hidden; margin: .4rem 0 .6rem; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
