:root {
  --bg: #ffffff; --card: #ffffff; --ink: #14213d; --muted: #5a6478; --line: #dde3ee;
  --blue: #3c3b6e; --red: #b22234; --accent: #2a4d9b; --accent-ink: #1f3f85; --mark: #b22234; --bar-bg: #eef2f8;
  --ok-bg: #e8f1ff; --alert-bg: #fdecef; --map: #c9d3e6; --map-line: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1630; --card: #171f3d; --ink: #eef1f8; --muted: #a9b2c9; --line: #2a3458;
    --blue: #8a93d8; --red: #e0636f; --accent: #8fb0ff; --accent-ink: #b3c8ff; --mark: #e0636f; --bar-bg: #222c52;
    --ok-bg: #1b2a4d; --alert-bg: #4a1f28; --map: #243058; --map-line: #0f1630;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent-ink); }
.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; max-width: 46rem; margin: 0 auto; padding: 1rem; border-bottom: 3px solid var(--blue); position: relative; }
.top::after { content: ""; position: absolute; left: 1rem; right: 1rem; bottom: -6px; height: 3px; background: var(--red); }
.brandwrap { display: flex; flex-direction: column; line-height: 1.2; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--red); }
.tagline { font-size: .85rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.top nav a { font-weight: 600; text-decoration: none; }
.top nav a[aria-current] { text-decoration: underline; text-underline-offset: .3em; }
main { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
.lede { font-size: 1.05rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0 0; }
.tag { font-style: normal; font-size: .7rem; font-weight: 700; background: var(--mark); color: #fff; padding: .1rem .45rem; border-radius: 6px; vertical-align: middle; white-space: nowrap; }
fieldset { border: 0; padding: 0; margin: 1.25rem 0 0; }
.field { display: block; margin-bottom: 1rem; font-weight: 600; }
.field input, .field select, .field textarea { display: block; width: 100%; margin-top: .35rem; font: inherit; font-weight: 400; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
button, .button { display: inline-block; margin-top: 1rem; font: inherit; font-weight: 700; padding: .75rem 1.3rem; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; }
.alert, .ok { border-radius: 10px; padding: .25rem 1rem; margin: 1rem 0; }
.alert { background: var(--alert-bg); } .ok { background: var(--ok-bg); }
.res { list-style: none; padding: 0; margin: 0; }
.res li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.res li:last-child { border-bottom: 0; }
.res a { font-weight: 700; }
.res p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.foot { max-width: 46rem; margin: 0 auto; padding: 0 1rem 2rem; color: var(--muted); font-size: .85rem; }
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: 2.2rem; }
.hero p { margin: .4rem 0; }
.soon { opacity: .7; }

/* Map backdrop: lower 48 behind the page, swapped for the state after a lookup. Muted on purpose. */
.backdrop { position: fixed; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; }
.backdrop svg { width: min(120vw, 1400px); height: auto; opacity: .26; }
.backdrop path { fill: var(--map); stroke: var(--map-line); stroke-width: .6; }
.backdrop .c-dem-1 { fill: #9fb6e6; } .backdrop .c-dem-2 { fill: #6f90d9; } .backdrop .c-dem-3 { fill: #3f67c7; }
.backdrop .c-rep-1 { fill: #e6a6ad; } .backdrop .c-rep-2 { fill: #d97782; } .backdrop .c-rep-3 { fill: #c24a58; }
.backdrop .c-none { fill: var(--map); }
.backdrop svg.map-state { width: min(100vw, 1100px); opacity: .22; }
.footsrc { margin: .5rem 0 0; } .footsrc a { margin-right: .75rem; white-space: nowrap; }

/* lookup form, representative list, vote list */
.lookup .row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem; }
.lookup input[type=text] { flex: 1 1 18rem; font: inherit; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.lookup button { margin-top: 0; }
.lookup .field { text-align: left; margin: 1rem 0 0; }
.reps { list-style: none; padding: 0; margin: 1rem 0 0; }
.reps li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.reps li:last-child { border-bottom: 0; }
.rep-level { font-size: .85rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
.rep-name { font-size: 1.2rem; font-weight: 700; margin: .15rem 0; }
.rep-name a { text-decoration: none; color: var(--ink); }
.rep-links { font-size: .95rem; }
.votes { list-style: none; padding: 0; margin: .5rem 0 0; }
.votes li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.votes li:last-child { border-bottom: 0; }
.v-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.v-date { font-variant-numeric: tabular-nums; font-weight: 700; }
.v-badge { margin-left: auto; font-size: .8rem; font-weight: 800; padding: .1rem .55rem; border-radius: 999px; color: #fff; background: var(--muted); }
.v-yes { background: var(--blue); } .v-no { background: var(--red); } .v-mid { background: var(--muted); }
.v-bill { margin: .25rem 0; }
.v-meta { font-size: .88rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; margin-top: 1.25rem; font-weight: 700; }
.more { margin: 0; padding: 0 .1rem; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; text-decoration: underline; }
.rep { display: flex; gap: 1rem; align-items: flex-start; }
.rep-photo { width: 72px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: 0 0 auto; background: var(--bar-bg); }
.rep-photo.lg { width: 110px; height: 135px; }
.rep-body { flex: 1 1 auto; }
.cands { padding-left: 1.2rem; } .cands li { margin: .35rem 0; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
/* official page: main + right-hand explainer column */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 980px) { main:has(.with-aside) { max-width: 72rem; } .with-aside { grid-template-columns: minmax(0, 46rem) minmax(16rem, 22rem); align-items: start; } }
.side .card + .card { margin-top: 1rem; }
.side h2 { font-size: 1rem; margin: 1rem 0 .3rem; } .side h2:first-child { margin-top: 0; }
.side p { font-size: .93rem; margin: .3rem 0; }
.legend { list-style: none; padding: 0; margin: .5rem 0; font-size: .9rem; }
.legend li { padding: .4rem .6rem; margin: .35rem 0; border-radius: 8px; }
.votes li, .legend li { border-left: 5px solid transparent; }
.votes li { padding-left: .7rem; }
.loc-in { border-left-color: var(--blue) !important; }
.loc-out { border-left-color: var(--red) !important; }
.loc-none { border-left-color: var(--line) !important; }
.votes-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.votes-head h2 { margin: 1.25rem 0 .25rem; }
.toggle { margin: 1rem 0 0; padding: .45rem .9rem; font-size: .9rem; background: var(--bar-bg); color: var(--ink); border: 1px solid var(--line); }
.toggle[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.src { font-size: .85rem; }
.loc-why { color: var(--muted); }
abbr[title] { text-decoration: underline dotted; cursor: help; }

.term { margin-top: .35rem; }
.term-badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: var(--bar-bg); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.term-badge.up { border-color: var(--red); color: var(--red); }
.cand { padding: .8rem 0; border-bottom: 1px solid var(--line); } .cand:last-child { border-bottom: 0; }
.cand-name { font-weight: 700; font-size: 1.1rem; }
.says { border: 1px dashed var(--line); border-radius: 10px; padding: .75rem 1rem; margin: 1rem 0; background: var(--bar-bg); }
