/* Fonts (self-hosted, SIL Open Font License; fonts/*-LICENSE.txt). Makeover ticket 156: 3D Chicago look. */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-display: swap; src: url("../fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("../fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* Colours. Dark is the main look (3D Chicago); light is kept for the toggle. Chicago flag: blue #b3ddf2, star red #ef3340. */
:root {
  --font-head: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: Barlow, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --bg: #0b0f16; --surface: #131a26; --glass: rgba(12, 16, 24, .72); --text: #f3efe4; --cream: #fff6e0; --muted: #a9b2c1; --line: rgba(255, 255, 255, .11);
  --accent: #b3ddf2; --accent-ink: #0b0f16; --star: #ef3340; --focus: #b3ddf2; --warn-bg: #2b2112; --warn: #f3c37a;
  --dem: #3d8bfd; --dem-bg: #17345e; --dem-ink: #d8e7ff; --rep: #f0505f; --rep-bg: #5c1820; --rep-ink: #ffdfe2;
  --map-bg: #0b0f16; --map-fill: #1b2433; --map-line: #0b0f16; --field-line: rgba(255, 255, 255, .22); --ctrl-icon-filter: invert(1);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3efe4; --surface: #ffffff; --glass: rgba(255, 252, 244, .80); --text: #0e1726; --cream: #0e1726; --muted: #4f5868; --line: rgba(14, 23, 38, .12);
  --accent: #0b5d8c; --accent-ink: #ffffff; --star: #c8102e; --focus: #0b5d8c; --warn-bg: #fff4e5; --warn: #7a4300;
  --dem: #1f6fd6; --dem-bg: #dbe8ff; --dem-ink: #123e78; --rep: #d63445; --rep-bg: #ffe0e3; --rep-ink: #7c1622;
  --map-bg: #f3efe4; --map-fill: #ffffff; --map-line: #1c2433; --field-line: rgba(14, 23, 38, .28); --ctrl-icon-filter: none;
  --shadow: 0 10px 30px -12px rgba(14, 23, 38, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font-body); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }


.brand { margin: 0; padding: 14px 0; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.star { color: var(--star); font-size: 20px; line-height: 1; }
.tag { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

h1 { margin: 0 0 10px; font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; }
.lede { margin: 0 0 24px; color: var(--muted); font-size: 18px; }

input[type="text"] {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--field-line); background: var(--surface); color: var(--text);
}
input[type="text"]:focus-visible { border-color: var(--focus); outline-offset: 0; }
button { font: inherit; cursor: pointer; }
.primary { padding: 12px 20px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 650; white-space: nowrap; }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .6; cursor: progress; }
.link-btn { margin-top: 4px; min-height: 44px; padding: 10px 0; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.privacy { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.status { margin: 8px 0 0; font-weight: 500; }
.status:empty { display: none; }
.status.error { color: var(--warn); background: var(--warn-bg); padding: 10px 14px; border-radius: 10px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.suggestions .secondary { box-shadow: none; text-align: left; }

.results { padding: 0 0 8px; }
.summary { padding: 8px 0 4px; }
.summary h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.matched { margin: 0 0 12px; color: var(--muted); }
.districts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.districts li { display: flex; }
.chip { font: inherit; font-size: 14px; color: var(--text); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; min-height: 44px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip::after { content: " ↗"; color: var(--muted); }

.level { margin-top: 20px; }
.level h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@container (min-width: 680px) { .cards { grid-template-columns: 1fr 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 14px; display: flex; flex-direction: column; }
.card .office { margin: 0; font-size: 14px; font-weight: 600; color: var(--accent); }
.card .name { margin: 2px 0 2px; font-size: 21px; letter-spacing: -.015em; line-height: 1.25; }
.card .party { margin: 0; font-size: 14px; color: var(--muted); }
.card dl { margin: 12px 0 0; display: grid; gap: 10px; }
.card dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }
.card .na { color: var(--muted); font-style: italic; }
.card .note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
/* Town kit (ticket 142): a council or board as one compact list */
.member-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.member-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line); }
.member-list li:first-child { border-top: 0; }
.member-name { font-weight: 600; }
.member-seat { color: var(--muted); font-size: 14px; }
.card .source { margin: auto 0 0; padding-top: 14px; font-size: 13px; color: var(--muted); }
.card .source a { color: var(--muted); }
.card .report { margin: 2px 0 0; font-size: 13px; }
.card .report a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }

/* Who takes over next (ticket 119) */
.incoming { margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--accent); font-size: 14px; }
.incoming p { margin: 0 0 4px; }
.incoming-title { font-weight: 700; color: var(--accent); }

/* Voting record (phase 3) */
.record { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.record > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 15px; min-height: 44px; display: list-item; padding-top: 10px; }
.record-title { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.record-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.record-list li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.record-list li:first-child { border-top: 0; }
@container (min-width: 560px) { .record-list li { grid-template-columns: 6.5rem 1fr auto; gap: 2px 10px; } }
.record-date { color: var(--muted); }
.record-meta { color: var(--muted); }
.record-vote { font-weight: 650; white-space: nowrap; }
.money { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 6px 0 0; font-size: 14px; }
.money dt { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 14px; }
.money dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.record + .record { margin-top: 0; }
.record-source { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.record-source a { color: var(--muted); }

/* Map-first layout (ticket 135): street map + officials panel */
body.app-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 3; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 16px; }
.head-row .brand { padding: 4px 0; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; font-weight: 650; }
.lookup { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; max-width: 680px; margin: 0; }
@media (max-width: 560px) {
  .lookup { flex-basis: 100%; }
  .lookup .primary { padding: 10px 14px; }
  .head-row { padding: 6px 12px 8px; }
}
.lookup input[type="text"] { padding: 10px 14px; font-size: 16px; }
.lookup .primary { padding: 10px 18px; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; border: 1.5px solid var(--field-line); background: var(--surface); color: var(--text); font-size: 20px; line-height: 1; }
.icon-btn:hover { border-color: var(--accent); }

.app { flex: 1; min-height: 0; position: relative; }
.map-pane { position: absolute; inset: 0 0 var(--peek, 42%) 0; }
.map { position: absolute; inset: 0; background: var(--map-bg); }
.map-tabs { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.map-tabs button, .secondary {
  pointer-events: auto; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; box-shadow: 0 1px 4px rgb(0 0 0 / .12);
}
.map-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 640px) {
  .map-tabs { flex-wrap: nowrap; overflow-x: auto; pointer-events: auto; scrollbar-width: none; padding-bottom: 4px; }
  .map-tabs button { flex: 0 0 auto; padding: 8px 12px; }
  .map-zoom-out .secondary { padding: 8px 12px; }
}
.map-zoom-out { position: absolute; left: 10px; bottom: 34px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.map-status { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 2; margin: 0; max-width: 90%;
  font-size: 14px; color: var(--text); background: var(--surface); border-radius: 10px; padding: 0 10px; }
.map-status:empty { display: none; }

.panel { position: absolute; left: 0; right: 0; bottom: 0; height: var(--peek, 42%); z-index: 4; display: flex; flex-direction: column;
  background: var(--bg); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 20px rgb(0 0 0 / .14); }
.panel[data-open="true"] { height: 88%; }
@media (prefers-reduced-motion: no-preference) { .panel { transition: height .25s ease-out; } }
.panel-toggle { flex: 0 0 auto; min-height: 44px; margin: 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--accent); font-weight: 650; border-radius: 16px 16px 0 0; }
.panel-toggle::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 6px; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 24px; container-type: inline-size; }

@media (min-width: 1024px) {
  .map-pane { inset: 0 440px 0 0; }
  .panel { top: 0; left: auto; width: 440px; height: auto; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); box-shadow: none; }
  .panel[data-open="true"] { height: auto; }
  .panel-toggle { display: none; }
  .panel-body { padding: 8px 22px 32px; }
}

.panel-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 6px; position: sticky; top: -4px; background: var(--bg); z-index: 1; }
.panel-tabs [role="tab"] { min-height: 44px; padding: 8px 14px; border: 0; background: none; color: var(--muted); font-weight: 650; border-bottom: 3px solid transparent; }
.panel-tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.intro { padding: 10px 0 4px; }
.intro h2 { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: -.03em; line-height: 1.1; }
.intro .lede { font-size: 16px; margin: 0 0 8px; }
.district-view h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.02em; }
.district-view .level { margin-top: 12px; }
.map-list { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.map-list label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.map-list select {
  width: 100%; min-height: 44px; font: inherit; font-size: 15px; padding: 8px 12px;
  border-radius: 10px; border: 1.5px solid var(--field-line); background: var(--surface); color: var(--text);
}
.map-source { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.map-source a { color: var(--muted); }
.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; }

/* Map engine controls, themed and 44px */
.maplibregl-ctrl-group { background: var(--surface) !important; box-shadow: 0 1px 4px rgb(0 0 0 / .18) !important; }
.maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: var(--ctrl-icon-filter, none); }
.maplibregl-ctrl-attrib { font-size: 11px; }
/* Key dates (phase 5) */
.dates { padding: 8px 0 24px; }
.dates h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.dates-lede { margin: 0 0 8px; color: var(--muted); max-width: 44rem; }
.dates-sub { margin: 28px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.election { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.election + .election { margin-top: 14px; }
.election-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.election-name { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.election-day { color: var(--accent); font-weight: 600; }
.election-what { margin: 6px 0 4px; color: var(--muted); font-size: 15px; }
details.election-collapsed > summary { cursor: pointer; list-style-position: outside; margin-left: 18px; min-height: 44px; display: list-item; padding-top: 10px; }
details.election-collapsed > summary .election-name { font-size: 17px; }
details.election-collapsed > summary .election-day { margin-left: 10px; }
.date-list { list-style: none; margin: 8px 0 0; padding: 0; }
.date-row { display: grid; grid-template-columns: 1fr; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.date-row:first-child { border-top: 0; }
@container (min-width: 560px) { .date-row { grid-template-columns: 11rem 1fr auto; align-items: start; } }
.date-when { margin: 0; font-weight: 650; }
.date-name { margin: 0; font-weight: 600; }
.date-meta { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.date-official { margin-top: 2px; font-size: 14px; color: var(--muted); }
.date-official summary { cursor: pointer; color: var(--accent); min-height: 44px; display: list-item; padding-top: 10px; width: fit-content; }
.date-official p { margin: 6px 0 0; }
.date-official a { color: var(--text); }
.doc-links { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; }
.doc-links a:hover { border-color: var(--accent); }
.cal-btn {
  justify-self: start; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.cal-btn:hover { border-color: var(--accent); }
.dates-source, .dates-meta-line { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.dates-meta-line { font-size: 15px; }
.dates-source a { color: var(--muted); }

.site-foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 18px 0 8px; color: var(--muted); font-size: 14px; }
.site-foot h2 { font-size: 15px; color: var(--text); margin: 0 0 8px; }
.site-foot p { max-width: 48rem; margin: 0 0 10px; }
.site-foot .fine { font-size: 12.5px; }

@media (prefers-reduced-motion: no-preference) {
  .results:not([hidden]) { animation: fade .25s ease-out; }
  @keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* Coverage page (ticket 142) */
.coverage { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.coverage h1 { font-size: 30px; letter-spacing: -.02em; margin: 8px 0 8px; }
.coverage h2 { font-size: 20px; margin: 28px 0 4px; }
.coverage .lede { color: var(--muted); }
.coverage-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 18px 0 0; }
.coverage-grid dt { font-weight: 600; }
.coverage-grid dd { margin: 0; color: var(--muted); }
.coverage-page .brand a { color: inherit; text-decoration: none; }

/* Cards with photo (tickets 153-154) */
.card-head { display: flex; gap: 14px; align-items: flex-start; }
.card-who { min-width: 0; }
.photo { flex: none; width: 64px; height: 80px; border-radius: 10px; object-fit: cover; background: var(--line); }
.photo-none { display: grid; place-items: center; font-weight: 700; font-size: 20px; color: var(--muted); border: 1px solid var(--line); background: var(--bg); }
.card .map-btn { align-self: flex-start; margin-top: 6px; padding: 10px 0; }
.card .fact { margin: 8px 0 0; font-size: 14px; }
.card .fact-label { color: var(--muted); }
.more { margin-top: 12px; border-top: 1px solid var(--line); }
.more > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 15px; min-height: 44px; display: list-item; padding-top: 10px; }
.more .record { border-top: 0; }
.more .record > summary { color: var(--text); font-size: 14px; }

/* Map pop-up with the official's photo (ticket 155) */
.who-pop .maplibregl-popup-content { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 4px 16px rgba(0,0,0,.18); font: inherit; }
.who-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .who-pop.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .who-pop.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface); }
.who-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip, .who-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .who-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.who-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.who-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.who-pop .maplibregl-popup-close-button { color: var(--muted); font-size: 20px; width: 32px; height: 32px; }
.pop { display: flex; gap: 10px; align-items: flex-start; padding-right: 18px; }
.pop p { margin: 0; }
.pop-photo { width: 48px; height: 60px; border-radius: 8px; object-fit: cover; flex: none; }
.pop-unit { font-size: 12px; color: var(--accent); font-weight: 600; }
.pop-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.pop-party { font-size: 13px; color: var(--muted); }
.pop-more { margin-top: 4px; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
@media (hover: hover) { .pop-more { display: none; } .pop { padding-right: 0; } }
.card .fact-source { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.card .fact-source a { color: var(--muted); }

/* =====================  Makeover (tickets 156-158): 3D Chicago look  ===================== */
h1, h2, .intro h2, .summary h2, .dates h2, .district-view h2 { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--cream); }
.intro h2 { font-size: 2.3rem; line-height: 1; }
.summary h2, .dates h2, .district-view h2 { font-size: 30px; line-height: 1.05; }
.level h3, .dates-sub { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; color: var(--accent); }
.lede { color: var(--muted); }
.lede .example, .matched, .date-when, .election-day, .record-date, .money dd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Header: slim frosted bar, red Chicago star, condensed wordmark */
.site-head { background: var(--glass); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) { .site-head { backdrop-filter: blur(12px) saturate(1.2); } }
.head-row .brand { font-family: var(--font-head); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: .02em; color: var(--cream); gap: 8px; }
.logo { width: 26px; height: 26px; fill: var(--star); flex: none; filter: drop-shadow(0 0 6px rgba(239, 51, 64, .35)); }
.tag { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.theme-btn { margin-left: auto; }
@media (max-width: 560px) { .theme-btn { position: absolute; top: 6px; right: 12px; } .head-row { position: relative; } }
input[type="text"] { background: color-mix(in srgb, var(--surface) 85%, transparent); border-radius: 12px; }
.primary { border-radius: 12px; font-weight: 700; letter-spacing: .02em; }
.icon-btn { border-radius: 12px; background: color-mix(in srgb, var(--surface) 85%, transparent); }

/* Map buttons: chunky game-style pills */
.map-tabs button, .secondary {
  font-family: var(--font-head); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .03em;
  border: 2px solid var(--line); background: var(--glass); color: var(--cream); box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(1px)) { .map-tabs button, .secondary { backdrop-filter: blur(8px); } }
.map-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.secondary { font-size: 15px; }

/* Panel: a frosted card floating over the full map on desktop; bottom sheet on phones */
.panel { background: var(--glass); border-top-color: var(--line); }
@supports (backdrop-filter: blur(1px)) { .panel { backdrop-filter: blur(14px) saturate(1.15); } }
.panel-tabs { background: transparent; }
.panel-tabs [role="tab"] { font-family: var(--font-head); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .03em; }
@media (min-width: 1024px) {
  .map-pane { inset: 0; }
  .panel { top: 12px; right: 12px; bottom: 12px; width: 440px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
}
@media (prefers-reduced-transparency: reduce) { .site-head, .panel, .map-tabs button, .secondary { background: var(--bg); backdrop-filter: none; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 12px; }
.card .office { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.card .name { font-family: var(--font-head); font-weight: 800; font-size: 27px; text-transform: uppercase; letter-spacing: .01em; line-height: 1; margin: 4px 0 6px; color: var(--cream); }
.photo { width: 72px; height: 90px; border-radius: 12px; box-shadow: 0 0 0 2px var(--line); }
.photo-none { font-family: var(--font-head); font-size: 26px; }
.party { display: inline-block; margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); }
.party-dem { background: var(--dem-bg); color: var(--dem-ink); border-color: transparent; }
.party-rep { background: var(--rep-bg); color: var(--rep-ink); border-color: transparent; }
.chip { font-family: var(--font-mono); font-size: 13px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.chip:hover { border-color: var(--accent); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card, .chip, .map-tabs button, .secondary, .primary { transition: transform .25s var(--ease), opacity .25s var(--ease), border-color .15s, box-shadow .25s var(--ease); }
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
  .cards:has(.card:hover) .card:not(:hover) { opacity: .62; }
  .map-tabs button:hover, .secondary:hover, .primary:hover { transform: translateY(-1px); }
}
.cards:has(.card:focus-within) .card:not(:focus-within) { opacity: .75; }
.election, .incoming { border-radius: 16px; }
.election { background: var(--surface); }
.election-name { font-family: var(--font-head); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .01em; }
.site-foot h2 { font-family: var(--font-head); font-size: 18px; }
/* Headings that only receive focus so screen readers announce them: no visible ring */
[tabindex="-1"]:focus { outline: none; }
.matched { font-size: 13px; letter-spacing: -.01em; }

/* =====================  Game map (tickets 157-158)  ===================== */
:root {
  --ink: rgba(255, 246, 224, .55); --edge: rgba(255, 255, 255, .28); --tile-opacity: .55;
  --tile-dem: #2f6fd1; --tile-rep: #d94455; --tile-none: #5b6577;
  --tile-ward: #3a4558;
}
:root[data-theme="light"] { --ink: rgba(28, 36, 51, .55); --edge: rgba(255, 255, 255, .7); --tile-opacity: .5; --tile-ward: #aeb6c2; --tile-dem: #2f7de1; --tile-rep: #e04a5a; --tile-none: #8b93a3; }

/* Faces on the map */
.dpin { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; pointer-events: auto; }
.dpin[data-mode="off"] { display: none; }
.dpin-face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 3px solid var(--ring, var(--cream));
  background: var(--surface); box-shadow: 0 3px 0 var(--ink), 0 6px 14px rgba(0, 0, 0, .45); display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--cream); }
.dpin-tag { font-family: var(--font-head); font-weight: 800; font-size: 14px; line-height: 1; text-transform: uppercase; letter-spacing: .02em;
  color: #fff6e0; background: #05080d; border: 2px solid var(--ring, #fff6e0); border-radius: 8px; padding: 3px 7px 2px; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.dpin-tag b { color: var(--ring, #b3ddf2); font-weight: 800; }
.dpin[data-mode="small"] .dpin-face, .dpin[data-mode="small"] .dpin-tag span { display: none; }
.ring-dem { --ring: #6aa8ff; } .ring-rep { --ring: #ff7b88; } .ring-none, .ring-ward { --ring: #fff6e0; }
.dpin.is-mine .dpin-face { box-shadow: 0 0 0 4px var(--accent), 0 3px 0 var(--ink), 0 0 22px var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .dpin { transition: transform .2s var(--ease); }
}
.dpin.is-hover { transform: scale(1.18) translateY(-3px); z-index: 5; }

/* "You live here" */
.you-badge { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.you-text { font-family: var(--font-head); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; color: #0b0f16;
  background: #b3ddf2; border: 2px solid #05080d; border-radius: 10px; padding: 3px 9px 2px; box-shadow: 0 3px 0 #05080d; white-space: nowrap; margin-bottom: 4px; }
.you-dot { width: 16px; height: 16px; border-radius: 50%; background: #ef3340; border: 3px solid #fff6e0; box-shadow: 0 0 0 3px #05080d, 0 0 16px #ef3340; }

/* Legend */
.map-legend { position: absolute; left: 10px; bottom: 92px; z-index: 2; max-width: min(360px, calc(100% - 80px)); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  font-size: 12.5px; color: var(--text); background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; box-shadow: var(--shadow); }
.map-legend:empty { display: none; }
@supports (backdrop-filter: blur(1px)) { .map-legend { backdrop-filter: blur(8px); } }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lg-swatch { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ink); display: inline-block; }
.lg-dem { background: var(--tile-dem); } .lg-rep { background: var(--tile-rep); }

/* The big hover card (HUD) */
.hud { position: absolute; z-index: 3; left: 12px; top: 68px; width: min(340px, calc(100% - 24px)); background: var(--glass); color: var(--text);
  border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; }
@supports (backdrop-filter: blur(1px)) { .hud { backdrop-filter: blur(14px) saturate(1.15); } }
.hud.is-pinned { border-color: var(--accent); }
@media (max-width: 1023px) { .hud { top: auto; bottom: 10px; left: 10px; width: calc(100% - 20px); } }
@media (prefers-reduced-motion: no-preference) { .hud:not([hidden]) { animation: hud-in .2s var(--ease); } @keyframes hud-in { from { opacity: 0; transform: translateY(6px); } } }
.hud-head { display: flex; gap: 12px; align-items: flex-start; }
.hud-photo { width: 84px; height: 105px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--line); display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 30px; color: var(--muted); background: var(--surface); }
.hud-who { min-width: 0; flex: 1; }
.hud-who p { margin: 0; }
.hud-unit { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.hud-name { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; color: var(--cream); margin: 4px 0 4px !important; }
.hud-role { font-size: 14px; color: var(--muted); margin-bottom: 6px !important; }
.hud-role.is-mine { color: var(--accent); font-weight: 700; }
.hud-close { flex: none; width: 44px; height: 44px; margin: -8px -8px 0 0; border: 0; background: none; color: var(--muted); font-size: 18px; border-radius: 12px; }
.hud-close:hover { color: var(--text); }
@media (hover: hover) { .hud:not(.is-pinned) .hud-close { visibility: hidden; } }
.hud-fact { margin: 10px 0 0; font-size: 14px; }
.hud-fact span { color: var(--muted); }
.hud-fact + .hud-fact { margin-top: 2px; }
.hud-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hud-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.hud-btn:hover { border-color: var(--accent); }
.hud-more { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .hud:not(.is-pinned) .hud-actions::after { content: "Click to keep this card open"; flex-basis: 100%; font-size: 12px; color: var(--muted); } }
.maplibregl-marker { z-index: 1; }
/* Keep everything drawn on the map (photo pins, "You live here") in the map's own layer, so a raised pin never
   covers the panel or the map card (ticket 198). */
.map { isolation: isolate; }
@media (min-width: 1024px) { .hud.hud-right { left: auto; right: 472px; } }
.map-legend { pointer-events: none; } /* information only: taps go to the map */
@media (max-width: 640px) { .map-legend { bottom: 84px; font-size: 11px; padding: 5px 8px; gap: 2px 8px; max-width: calc(100% - 72px); } .lg-swatch { width: 11px; height: 11px; } }
/* Legend text must stay readable over any map colour (a11y audit 2026-11-18): nearly solid background */
.map-legend { background: color-mix(in srgb, var(--bg) 94%, transparent); }

/* =====================  Calling cards (ticket 160)  ===================== */
.callcard { padding: 0; overflow: hidden; }
.cc-toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 10px 12px; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; border-radius: 16px; }
.cc-toggle:focus-visible { outline-offset: -3px; }
.callcard .photo { width: 56px; height: 70px; border-radius: 10px; }
.callcard .photo-none { font-size: 20px; }
.callcard .card-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.callcard .name { font-family: var(--font-head); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; color: var(--cream); margin: 0; }
.callcard .office { font-family: var(--font-mono); font-weight: 500; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0; }
.cc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.cc-meta .party { font-size: 12px; padding: 1px 8px; }
.cc-term { font-size: 13px; color: var(--muted); }
.cc-chev { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
.cc-chev::before { content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.callcard.is-open .cc-chev::before { transform: translateY(2px) rotate(-135deg); }
.callcard.is-open { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.cc-body { padding: 0 16px 12px; border-top: 1px solid var(--line); }
.cc-body > :first-child { margin-top: 8px; }
.cc-toggle:hover .cc-chev { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .cc-chev::before { transition: transform .25s var(--ease); }
  .callcard.is-open .cc-body { animation: cc-open .28s var(--ease); }
  @keyframes cc-open { from { opacity: 0; transform: translateY(-6px); } }
}
/* closed cards no longer need the lift/dim on hover (they are short); keep it subtle */
.cards:has(.card:hover) .card:not(:hover) { opacity: 1; }
.cards { gap: 10px; }
.callcard { scroll-margin-top: 64px; scroll-margin-bottom: 12px; } /* keep an opened card's header clear of the sticky tabs */
.panel-tabs { background: color-mix(in srgb, var(--bg) 96%, transparent); } /* sticky tabs: nothing shows through */
/* District chips moved under the officials (Jairo 2026-11-18): compact, out of the way */
.districts-wrap { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.districts-wrap:has(.districts:empty) { display: none; }
.districts-title { margin: 0 0 8px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.districts { gap: 6px; }
.chip { font-size: 12px; padding: 6px 12px; }

/* Recent votes (ticket 128): as recorded, newest first; the vote word is always written out */
.votes { margin-top: 10px; }
.votes-title { margin: 0 0 6px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.vote-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.vote-row { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: 2px 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.vote-row:first-child { border-top: 0; }
.vote-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.vote-what a { color: var(--text); }
.vote-badge { font-family: var(--font-head); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; padding: 1px 8px; border-radius: 8px; border: 2px solid var(--line); white-space: nowrap; }
.vote-yes { border-color: var(--accent); color: var(--accent); }
.vote-no { border-color: var(--text); color: var(--text); }
.cc-latest { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); letter-spacing: -.01em; }

/* =====================  Calling card + profile (ticket 161)  ===================== */
.callcard .cc-chev::before { transform: rotate(-45deg); } /* › : opens the profile */
.cc-toggle:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.cc-meta { gap: 4px 6px; }
.cc-term { font-size: 13px; color: var(--muted); }

.profile-view { padding: 4px 0 12px; }
.profile-back { margin: 0 0 6px; padding: 10px 0; font-weight: 700; text-decoration: none; }
.profile-back:hover { text-decoration: underline; }
.profile { display: flex; flex-direction: column; gap: 14px; }
.profile-head { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.profile-photo { width: 104px !important; height: 130px !important; border-radius: 14px !important; flex: none; }
.profile-photo.photo-none { font-size: 34px; }
.profile-who { min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.profile-who .office { margin: 0; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.profile-name { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 34px; line-height: .95; text-transform: uppercase; color: var(--cream); }
.profile-name:focus { outline: none; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.pbtn:hover { border-color: var(--accent); }
.pbtn:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.psec { padding-top: 12px; border-top: 1px solid var(--line); }
.psec-title { margin: 0 0 8px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.psec .votes { margin-top: 0; }
.pdl { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; }
.pdl dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.pdl dt:first-child { margin-top: 0; }
.pdl dd { margin: 0; overflow-wrap: anywhere; }
.pdl-inline { grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: baseline; }
.pdl-inline dt { margin: 0; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.pchip-lead { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--text); font-weight: 600; }
.pchips-more { width: 100%; }
.pchips-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; min-height: 44px; display: list-item; padding-top: 10px; }
.pchips-more .pchips { margin-top: 4px; }
.psources { border-top: 1px solid var(--line); padding-top: 8px; }
.psources .source { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.psources .source a { color: var(--muted); }
.profile .more { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .profile-view:not([hidden]) { animation: prof-in .28s var(--ease); }
  @keyframes prof-in { from { opacity: 0; transform: translateX(14px); } }
}

/* =====================  Profile insides (ticket 169): calm, sectioned, plain words first  ===================== */
.profile { gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tile-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile-value { font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: 1.05; text-transform: uppercase; color: var(--cream); }
.tile-sub { font-size: 12px; color: var(--muted); }
.psec { padding-top: 14px; }
.psec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.psec-title { margin: 0; }
.psec-aside { font-size: 12px; color: var(--muted); }
.psec-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; text-decoration: none; }
.psec-link:hover { text-decoration: underline; }
/* votes */
.vlist { list-style: none; margin: 0; padding: 0; }
.vrow { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.vrow:first-child { border-top: 0; padding-top: 2px; }
.vrow .vote-badge { min-width: 48px; text-align: center; margin-top: 1px; }
.vtop { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.vtitle { color: var(--text); font-weight: 600; text-decoration: none; line-height: 1.3; }
.vtitle:hover { text-decoration: underline; color: var(--accent); }
.vdate { flex: none; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.vmeta { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.vbar { margin-top: 6px; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--muted) 35%, transparent); overflow: hidden; max-width: 220px; }
.vbar-yes { display: block; height: 100%; background: var(--accent); }
.vofficial { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); opacity: .85; font-style: italic; }
.vote-not-voting, .vote-present, .vote-absent { color: var(--muted); }
/* contact */
.contact { list-style: none; margin: 0; padding: 0; }
.contact-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.contact-row:first-child { border-top: 0; padding-top: 0; }
.contact-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.contact-label { font-weight: 700; font-size: 14px; }
.contact-addr { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.contact-phone { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); font-family: var(--font-mono); font-size: 13px; text-decoration: none; color: var(--text); white-space: nowrap; }
.contact-phone:hover { border-color: var(--accent); }
/* money */
.money-committee { margin: 0 0 8px; font-size: 14px; }
.figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.fig { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.fig-value { font-family: var(--font-head); font-weight: 800; font-size: 21px; color: var(--cream); font-variant-numeric: tabular-nums; }
.fig-label { font-size: 12px; color: var(--muted); }
.money-block .record-list li { grid-template-columns: 1fr auto; }
.pnote { margin: 0; font-size: 14px; color: var(--muted); }
/* footer */
.pfoot { border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; }
.psources { flex: 1 1 auto; }
.psources > summary { cursor: pointer; min-height: 44px; display: list-item; padding-top: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.src-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; display: grid; gap: 6px; }
.src-list li { display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--muted); }
.src-what { color: var(--text); font-weight: 600; min-width: 9rem; }
.src-list a { color: var(--muted); }
.pfoot .report { margin: 0; }
.money-block > .record-meta, .money-block p.record-meta { font-size: 12px; line-height: 1.45; margin-top: 8px; }
.money-block .record-title { margin-top: 4px; }

/* =====================  Key dates makeover (ticket 170)  ===================== */
.dates-lede { margin: 0 0 12px; }
#kd-tiles { margin-bottom: 4px; }
.tile-strong { color: var(--text); font-weight: 600; font-size: 13px; }
#kd-elections { display: grid; gap: 10px; }
.edate { flex: none; width: 58px; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); line-height: 1; }
.edate-m { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.edate-d { font-family: var(--font-head); font-weight: 800; font-size: 28px; }
.edate-y { font-family: var(--font-mono); font-size: 10px; opacity: .8; }
.edate-big { width: 92px; height: 104px; border-radius: 16px; }
.edate-big .edate-d { font-size: 46px; }
.edate-big .edate-m { font-size: 13px; }
.ecount { font-weight: 700; font-size: 13px; color: var(--accent); }
.ehead-sub { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }
.ehead-what { margin: 0; font-size: 13.5px; color: var(--muted); }
/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-month { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 0 6px 64px; }
.tl-month:first-child { padding-top: 0; }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-det > summary { list-style: none; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 0; cursor: pointer; }
.tl-det > summary::-webkit-details-marker { display: none; }
.tl-date { position: relative; z-index: 1; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.tl-dnum { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--cream); }
.tl-dwk { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; color: var(--muted); }
.tl-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tl-name { font-weight: 600; line-height: 1.3; }
.tl-when { font-size: 12.5px; color: var(--muted); }
.tl-det > summary:hover .tl-name { color: var(--accent); }
.tl-det[open] > summary .tl-date { border-color: var(--accent); }
.tl-official { margin: 0 0 10px 66px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.tl-day .tl-date { background: var(--star); border-color: var(--star); }
.tl-day .tl-dnum, .tl-day .tl-dwk { color: #fff; }
.tl-day .tl-name { font-family: var(--font-head); font-weight: 800; font-size: 20px; text-transform: uppercase; color: var(--cream); letter-spacing: .01em; }
/* meetings */
.meet-list { list-style: none; margin: 0; padding: 0; }
.meet-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.meet-row:first-child { border-top: 0; padding-top: 0; }
.meet-text { display: flex; flex-direction: column; gap: 1px; }
.meet-when { font-weight: 700; }
.meet-next .meet-when { color: var(--accent); }
.meet-what { font-size: 13px; color: var(--muted); }
.meet-docs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
#dates-authority .psec { margin-top: 18px; }
#kd-sources { margin-top: 14px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) { #kd-detail:not([hidden]) { animation: prof-in .28s var(--ease); } }

/* Key dates tidy-up (ticket 171): one line per meeting, documents inside; "Good to know" box */
.meet-row { display: block; padding: 0; }
.meet-det > summary, .info-det > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 0; cursor: pointer; }
.meet-det > summary::-webkit-details-marker, .info-det > summary::-webkit-details-marker { display: none; }
.meet-det .cc-chev::before, .info-det .cc-chev::before { transform: translateY(-2px) rotate(45deg); }
.meet-det[open] .cc-chev::before, .info-det[open] .cc-chev::before { transform: translateY(2px) rotate(-135deg); }
.meet-body, .info-body { padding: 0 0 10px; font-size: 14px; color: var(--muted); }
.meet-body p, .info-body p { margin: 0 0 6px; }
.meet-docs { display: block; justify-content: initial; }
.meet-docs a, .info-body a { color: var(--accent); }
.kd-good { margin-top: 22px; }
.info-list { list-style: none; margin: 0; padding: 4px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-det > summary .contact-text { flex: 1; }
.info-det > summary .contact-phone { margin-left: auto; }
#kd-meetings > .record-meta { font-size: 12.5px; margin: 6px 0 0; }

/* Who takes over next (ticket 172) */
.cc-next { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); max-width: 100%; }
.cc-next.is-same { padding-left: 10px; }
.cc-next-text { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-next-text b { color: var(--accent); font-weight: 700; }
.callcard .cc-next-photo { width: 26px !important; height: 26px !important; border-radius: 50% !important; font-size: 10px !important; object-position: 50% 20%; box-shadow: 0 0 0 2px var(--accent); }
.next-sec { padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.next-row { display: flex; gap: 14px; align-items: center; }
.next-photo { width: 64px !important; height: 80px !important; border-radius: 12px !important; flex: none; font-size: 22px !important; }
.next-text { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.next-name { font-family: var(--font-head); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; color: var(--cream); }
.next-when { font-size: 14px; font-weight: 600; }
.next-votes { font-size: 12.5px; color: var(--muted); }
.next-sec .record-source { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.sample-bar { position: sticky; top: 0; z-index: 9999; padding: 8px 16px; background: var(--star); color: #fff; font-weight: 700; font-size: 13px; text-align: center; }
.cc-next.is-unofficial { border-style: dashed; }
.next-sec.is-unofficial { border-style: dashed; }
.next-final { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--text); }
.cc-next-text { white-space: normal; }
.cc-next { border-radius: 14px; }

/* Logo goes home (ticket 174): star, name, tag and the space around them are one link to the start */
.brand-link { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; margin: -8px -12px; padding: 8px 12px; border-radius: 12px; }
.brand-link:hover .wordmark { color: var(--accent); }
.brand-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .brand-link .logo { transition: transform .25s var(--ease); } .brand-link:hover .logo { transform: rotate(30deg); } }

/* =====================  Search bar makeover (ticket 176)  ===================== */
.lookup { display: block; position: relative; }
.search-field { position: relative; display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 14px; border-radius: 16px;
  border: 1.5px solid var(--field-line); background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-ico { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.search-field:focus-within .search-ico { stroke: var(--accent); }
.lookup .search-field input[type="text"] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 6px; font-size: 16px; box-shadow: none; outline: none; }
.lookup .search-field input[type="text"]::placeholder { color: var(--muted); }
.field-btn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.field-btn:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.field-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
#addr-clear { font-size: 15px; }
.lookup .find-btn { position: relative; flex: none; min-height: 44px; padding: 0 20px; border-radius: 12px; font-family: var(--font-head); font-weight: 800; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.lookup.is-busy .find-label { visibility: hidden; }
.lookup.is-busy .find-btn::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: find-spin .7s linear infinite; }
@keyframes find-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lookup.is-busy .find-btn::after { animation: none; border-right-color: currentColor; opacity: .6; } }
/* suggestions */
.addr-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 6px; list-style: none; max-height: min(60vh, 380px); overflow-y: auto;
  border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.addr-opt { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main note" "sub note"; align-items: center; column-gap: 12px;
  min-height: 48px; padding: 8px 12px; border-radius: 12px; cursor: pointer; }
.addr-opt[aria-selected="true"], .addr-opt:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.addr-main { grid-area: main; font-weight: 600; color: var(--text); }
.addr-main b { color: var(--accent); font-weight: 800; }
.addr-sub { grid-area: sub; font-size: 12.5px; color: var(--muted); }
.addr-note { grid-area: note; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.addr-note.is-ok { color: var(--accent); }
@media (max-width: 640px) {
  .search-field { padding-left: 12px; }
  .lookup .find-btn { padding: 0 14px; }
  .addr-note { display: none; }
  .addr-opt.is-address .addr-main::after { content: " ✓"; color: var(--accent); }
}

/* =====================  Desktop balance (ticket 188): panel on the LEFT, map controls to its right, search centered  ===================== */
@media (min-width: 1024px) {
  .head-row { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, 680px) minmax(max-content, 1fr); align-items: center; }
  .head-row .brand, .brand-link { white-space: nowrap; }
  .head-row .brand { justify-self: start; }
  .head-row .lookup { grid-column: 2; width: 100%; max-width: none; }
  .head-row .theme-btn { grid-column: 3; justify-self: end; margin-left: 0; }
  .panel { left: 12px; right: auto; }
  .map-tabs, .map-legend, .map-zoom-out { left: 466px; }
  .map-tabs { right: 64px; }
  .hud { left: 466px; }
  .hud.hud-right { left: auto; right: 64px; }
  .map-status { left: calc(50% + 227px); }
  .map-pane .maplibregl-ctrl-bottom-left { left: 454px; }
}

/* Calmer map (ticket 190): dim everything outside Illinois; a clear state border */
:root { --map-mask: rgba(3, 5, 9, .62); --map-border: #fff6e0; }
:root[data-theme="light"] { --map-mask: rgba(40, 44, 54, .38); --map-border: #1c2433; }
/* Ticket 191: clear state lines around Illinois, a little more dimming outside */
:root { --map-states: rgba(255, 246, 224, .5); --map-mask: rgba(3, 5, 9, .68); }
:root[data-theme="light"] { --map-states: rgba(28, 36, 51, .5); --map-mask: rgba(40, 44, 54, .42); }

/* =====================  Start screen makeover (ticket 192)  ===================== */
.intro .lede { font-size: 16px; color: var(--text); margin: 0 0 4px; }
.privacy-line { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 0 0 6px; }
.intro-sub { margin: 20px 0 8px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.try-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.try-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 12px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.try-chip:hover { border-color: var(--accent); }
.try-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.try-main { font-weight: 700; font-size: 14px; }
.try-sub { font-size: 12px; color: var(--muted); }
.see-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.see-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.see-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.see-what { font-family: var(--font-head); font-weight: 800; font-size: 18px; line-height: 1.05; text-transform: uppercase; color: var(--cream); }
.see-note { font-size: 12px; color: var(--muted); }
.map-list { margin-top: 4px; }
.map-list .map-source { font-size: 11.5px; line-height: 1.4; }
/* About: folded away at the bottom */
.site-foot { margin-top: 20px; padding: 0; }
.about > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 12px 0;
  font-family: var(--font-head); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.about > summary::-webkit-details-marker { display: none; }
.about > summary::after { content: "›"; font-size: 22px; }
.about[open] > summary::after { transform: rotate(90deg); }
@media (prefers-reduced-motion: no-preference) { .about > summary::after { transition: transform .2s var(--ease); } }
.about > summary:hover { color: var(--text); }
.about-list { margin: 0 0 12px; display: grid; gap: 12px; }
.about-list > div { display: grid; gap: 2px; }
.about-list dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.about-list dd { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.about-list .fine { margin: 0 0 6px; font-size: 11.5px; }
@media (max-width: 360px) { .try-row, .see-tiles { grid-template-columns: 1fr; } }

/* =====================  App-style controls (ticket 196, design brief from 195)  =====================
   The Chicago poster voice (Big Shoulders capitals) stays on the site name, the panel headline and the
   labels on the map. Everything you press or read in a list is Barlow in normal case.
   Three corner sizes: pill = press or type, 14 = cards, 12 = small controls. One shadow, only for things
   floating over the map. Accent colour means "press me" or "selected" and nothing else. */
:root {
  --r-pill: 999px; --r-card: 14px; --r-ctl: 12px;
  --float: 0 1px 2px rgba(0, 0, 0, .30), 0 4px 14px -2px rgba(0, 0, 0, .35);
  --hair: rgba(255, 255, 255, .10);
}
:root[data-theme="light"] { --float: 0 1px 2px rgba(14, 23, 38, .18), 0 4px 14px -2px rgba(14, 23, 38, .16); --hair: rgba(14, 23, 38, .10); }

/* Things you press */
.map-tabs button, .secondary {
  font-family: var(--font-body); font-weight: 600; font-size: 15px; text-transform: none; letter-spacing: 0;
  border: 1px solid var(--hair); border-radius: var(--r-pill); box-shadow: var(--float); color: var(--text);
}
.secondary { font-size: 14px; }
.map-tabs button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-ink); }
.lookup .find-btn { font-family: var(--font-body); font-weight: 700; font-size: 15px; text-transform: none; letter-spacing: 0; border-radius: var(--r-pill); padding: 0 22px; }
.search-field { border-radius: var(--r-pill); }
.panel-tabs { border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
.panel-tabs [role="tab"] { font-family: var(--font-body); font-weight: 600; font-size: 15px; text-transform: none; letter-spacing: 0; }
.about > summary { font-family: var(--font-body); font-weight: 600; font-size: 15px; text-transform: none; letter-spacing: 0; }
.map-list select { border-radius: var(--r-pill); padding-left: 16px; }
.maplibregl-ctrl-group { border-radius: var(--r-ctl) !important; overflow: hidden; box-shadow: var(--float) !important; }

/* Headline keeps the poster voice, one size on every panel view */
.intro h2, .summary h2, .dates h2, .district-view h2 { font-size: 30px; line-height: 1; letter-spacing: .01em; }

/* Labels: one quiet style */
.level h3, .dates-sub, .intro-sub, .districts-title, .psec-title, .votes-title {
  font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.tag { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
.see-label { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
.matched { font-family: var(--font-body); font-size: 13.5px; letter-spacing: 0; color: var(--muted); }
.try-sub, .see-sub, .map-source, .map-list .map-source { font-size: 12.5px; }

/* Official cards: 18 / 13 / 13, flat, one hairline, round photo like the faces on the map */
.card { border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: none; }
.card:hover, .callcard:hover { box-shadow: none; }
.card .name, .callcard .name { font-family: var(--font-body); font-weight: 700; font-size: 18px; line-height: 1.2; text-transform: none; letter-spacing: -.005em; color: var(--text); }
.card .office, .callcard .office { font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text); }
.callcard .photo { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 1px var(--hair); object-position: 50% 18%; }
.cc-toggle { border-radius: var(--r-card); min-height: 72px; }
.cc-next, .next-sec { border-radius: var(--r-ctl); }
.party { font-size: 12.5px; padding: 1px 9px; }

/* First-screen tiles */
.try-chip { border-radius: var(--r-ctl); border-color: var(--hair); }
.see-what { font-family: var(--font-body); font-weight: 700; font-size: 15.5px; line-height: 1.2; text-transform: none; color: var(--text); }

/* Floating surfaces share one edge and one shadow */
.panel { box-shadow: var(--float); }
.map-legend { border: 1px solid var(--hair); border-radius: var(--r-ctl); box-shadow: var(--float); font-size: 12.5px; }

@media (max-width: 640px) {
  .map-tabs button { font-size: 14px; }
  .map-legend { font-size: 12.5px; padding: 4px 8px; }
  .intro h2, .summary h2, .dates h2, .district-view h2 { font-size: 26px; }
}

/* Leftovers found by the design review (ticket 196): labels in the quiet style everywhere, map credit matches the theme */
.tile-label, .hud-unit, .profile-who .office { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
.profile-who .office { color: var(--muted); }
.tag { color: var(--muted); border-color: var(--hair); }
.maplibregl-ctrl-attrib.maplibregl-compact, .maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--surface) 92%, transparent) !important; color: var(--muted); font-family: var(--font-body); font-size: 12.5px; }
.maplibregl-ctrl-attrib a { color: var(--muted); }
:root:not([data-theme="light"]) .maplibregl-ctrl-attrib-button { filter: invert(1); }

/* =====================  Redesign step 2 (ticket 197): search over the map, new cards, simpler start, roomier phone map  ===================== */
:root { --panel-bg: rgba(13, 18, 28, .90); --card-bg: #1a2332; --card-bg-hover: #202b3d; }
:root[data-theme="light"] { --panel-bg: rgba(251, 249, 243, .93); --card-bg: #ffffff; --card-bg-hover: #f4f8fc; }

/* Depth: the panel is one step off the map, cards one step off the panel */
.panel { background: var(--panel-bg); }
.card, .try-chip, .tile { background: var(--card-bg); }
@media (prefers-reduced-transparency: reduce) { .panel, .app-page .site-head { background: var(--bg); } }

/* The answer under the search field */
.search-answer { margin: 8px 4px 0; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.search-answer::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Wide screens: no header bar. Name, theme button and search sit in one card over the map; the panel hangs under it. */
@media (min-width: 1024px) {
  .app-page .site-head { position: absolute; top: 12px; left: 12px; width: 440px; z-index: 6; background: var(--panel-bg); border: 1px solid var(--hair); border-radius: 18px; box-shadow: var(--float); }
  @supports (backdrop-filter: blur(1px)) { .app-page .site-head { -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); } }
  .app-page .head-row { grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px 12px 14px; }
  .app-page .head-row .brand { grid-column: 1; grid-row: 1; }
  .app-page .head-row .theme-btn { grid-column: 2; grid-row: 1; }
  .app-page .head-row .lookup { grid-column: 1 / -1; grid-row: 2; }
  .panel { top: calc(12px + var(--head-h, 128px) + 8px); }
  .map-tabs { top: 12px; }
}

/* Official cards: bigger face, name, then things you can do right away */
.callcard .photo { width: 64px; height: 64px; }
.cc-toggle { align-items: flex-start; gap: 14px; padding: 14px 12px 10px 14px; }
.cc-toggle .cc-chev { align-self: center; }
.callcard .name { font-size: 18.5px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px 92px; }
.cc-act { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.cc-act:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cc-act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.callcard:hover, .callcard.is-lit { background: var(--card-bg-hover); }
.callcard.is-lit { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }   /* same blue as its outline on the map */
@container (max-width: 360px) { .cc-actions { padding-left: 14px; } }

/* First screen: one job. The checklist says what the address gets you. */
.intro h2 { margin-bottom: 4px; }
.try-row { grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.try-chip { min-height: 52px; padding: 8px 16px; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; border-radius: var(--r-pill); }
.try-chip.try-locate { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.try-chip.try-locate .try-sub { color: var(--accent-ink); opacity: .8; }
.try-chip.try-locate:hover { filter: brightness(1.06); }
.see-tiles { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--hair); }
.see-tile { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 11px 0 11px 28px; position: relative; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none; }
.see-tile::before { content: "✓"; position: absolute; left: 4px; top: 10px; color: var(--accent); font-weight: 700; }
.see-tile .see-label { display: none; }
.see-tile .see-note { font-size: 13px; }

/* While a search is running: results (or the start screen) step back so the change is not a jump */
.app-page:has(.lookup.is-busy) #results, .app-page:has(.lookup.is-busy) #intro { opacity: .45; }
@media (prefers-reduced-motion: no-preference) { #results, #intro { transition: opacity .2s var(--ease); } }

/* Phones and tablets: the map gets more of the screen, the sheet starts smaller */
@media (max-width: 1023px) { .app { --peek: 38%; } }
@media (max-width: 640px) {
  .app { --peek: 34%; }
  .app-page .head-row { padding: 4px 12px 8px; gap: 4px 12px; }
  .app-page .head-row .brand { font-size: 22px; padding: 2px 0; }
  .app-page .tag { display: none; }
  /* the layer row scrolls sideways: fade both ends so a cut-off chip reads as "more this way" */
  .map-tabs { left: 0; right: 0; padding: 0 12px 4px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); }
  /* legend: swatches and the source line only; the note about other states is in the panel's "About" */
  .map-legend { bottom: 82px; max-width: calc(100% - 76px); padding: 4px 8px; gap: 0 10px; line-height: 1.35; }
  .map-legend > span:last-child:not(:first-child) { display: none; }
  .cc-actions { padding-left: 14px; }
}

/* The matched address now sits under the search field, so the panel does not repeat it */
.summary .matched { display: none; }
.summary { margin-bottom: 0; }
@media (max-width: 640px) {
  /* the ward note ("every ward is one colour") is a hint, not a key: on phones it only hid faces on the map */
  .map-legend:has(> span:only-child) { display: none; }
  .level h3 { margin-top: 14px; }
}

/* After the design review of step 2 (ticket 197) */
/* profile buttons match the buttons on the cards */
.pbtn { border-radius: var(--r-pill); border: 1px solid var(--hair); }
.pbtn:first-child { border-color: var(--accent); }
/* profile header follows the same ladder as the rest */
.profile-who .office { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
.profile-name { font-size: 30px; line-height: 1; }
/* accent only means "press me" or "selected": dates, counts, votes and ticks use the text colour */
.edate { background: var(--card-bg-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); }
.ecount, .meet-next .meet-when { color: var(--text); }
.see-tile::before, .search-answer::before { color: var(--muted); }
/* nothing readable under 12.5px */
.edate-m, .edate-y, .vote-date, .vdate, .tile-sub, .cc-meta .party, .cc-term { font-size: 12.5px; }
.edate-m { letter-spacing: .04em; } .edate-y { opacity: 1; }
.edate { width: 62px; height: 72px; }
/* pointing at a card is a hint, not a selection */
.see-tile:last-child { border-bottom: 0; }
/* the ward colour note hides faces on anything narrower than the desktop layout */
@media (max-width: 1023px) { .map-legend:has(> span:only-child) { display: none; } }
@media (max-width: 640px) {
  /* first screen: the main button comes straight after the headline, inside the resting sheet */
  .intro { display: flex; flex-direction: column; }
  .intro h2 { order: -2; } .intro .try-row { order: -1; margin: 6px 0 12px; }
  .profile-name { font-size: 26px; }
  /* legend: one flowing line or two, not three */
  .map-legend { display: block; }
  .map-legend .lg-item { margin-right: 10px; }
  /* theme button sits on the name's row, clear of the search field */
  .app-page .head-row .brand { min-height: 44px; display: flex; align-items: center; }
  .app-page .theme-btn { top: 4px; }
  .app-page .head-row .lookup { margin-top: 2px; }
}
/* Votes are records, not buttons: plain text colour, no accent (ticket 197 review) */
.vote-yes { border-color: var(--hair); color: var(--text); }
.vote-badge { border-width: 1px; }
.vbar-yes { background: var(--muted); }
.card .office, .callcard .office { color: var(--text); }

/* =====================  Small leftovers (ticket 200)  ===================== */
/* Legend: the long note on wide screens, a short one on phones so it fits on one line */
.map-legend .lg-short { display: none; }
@media (max-width: 640px) {
  .map-legend { white-space: nowrap; bottom: 34px; }
  .map-legend .lg-long { display: none; }
  .map-legend .lg-short { display: inline; color: var(--muted); }
  /* "All of Chicago / All of Illinois" join the zoom buttons on the right, as one stack */
  .map-zoom-out { left: auto; right: 10px; bottom: 104px; flex-direction: column; flex-wrap: nowrap; gap: 0;
    border-radius: var(--r-ctl); overflow: hidden; box-shadow: var(--float); }
  .map-zoom-out .secondary { min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 0; box-shadow: none; font-size: 13px; }
  .map-zoom-out .secondary + .secondary { border-top: 1px solid var(--hair); }
  .zo-all { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* The official you opened stays marked when you come back to the list */
.callcard.is-selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
/* Placeholder cards while a lookup runs */
.skel-list { display: grid; gap: 10px; margin: 8px 0; }
.skel-card { height: 92px; border-radius: 16px; border: 1px solid var(--hair); background: var(--card-bg, var(--surface)); position: relative; overflow: hidden; }
.skel-card::before { content: ""; position: absolute; left: 14px; top: 14px; width: 64px; height: 64px; border-radius: 50%; background: var(--card-bg-hover, var(--line)); }
.skel-card::after { content: ""; position: absolute; left: 92px; top: 26px; width: 55%; height: 12px; border-radius: 6px; background: var(--card-bg-hover, var(--line));
  box-shadow: 0 22px 0 -2px var(--card-bg-hover, var(--line)); }
@media (prefers-reduced-motion: no-preference) {
  .skel-card { animation: skel 1.2s ease-in-out infinite alternate; }
  @keyframes skel { from { opacity: 1; } to { opacity: .55; } }
}

/* Placeholder cards easy to see in both themes (ticket 206) */
.skel-card { background: var(--card-bg, var(--surface)); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
.skel-card::before, .skel-card::after { background: color-mix(in srgb, var(--text) 16%, transparent); }
.skel-card::after { box-shadow: 0 22px 0 -2px color-mix(in srgb, var(--text) 16%, transparent); }

/* =====================  First screen: controls on the right (ticket 214)  ===================== */
/* Legend pieces: the ⓘ button and the short ward note show on wide screens */
.map-legend .lg-info, .map-legend .lg-ward-short { display: none; }
@media (max-width: 1023px) {
  .map-legend .lg-later { display: none; }
  .map-legend.is-ward { display: none; }   /* the ward note is a hint, not a key: phones keep the faces visible */
}

@media (min-width: 1024px) {
  /* Short legend: "● Democratic ● Republican ⓘ"; the ⓘ opens the full note */
  .app-page .map-legend { left: auto; right: 12px; bottom: auto; max-width: none; width: max-content; pointer-events: auto;
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 6px 6px 12px; border-radius: 999px; font-size: 13px; }
  .app-page .map-legend .lg-long, .app-page .map-legend .lg-later, .app-page .map-legend .lg-short { display: none; }
  .app-page .map-legend .lg-ward-short { display: inline; font-weight: 600; }
  .app-page .map-legend .lg-info { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--hair); background: transparent; color: var(--muted); font: italic 700 14px/1 Georgia, serif; cursor: pointer; }
  .app-page .map-legend .lg-info:hover { color: var(--text); border-color: var(--accent); }
  .app-page .map-legend .lg-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .app-page .map-legend.show-note { border-radius: 16px; width: 220px; box-sizing: border-box; padding: 8px 8px 10px 12px; }
  .app-page .map-legend.show-note .lg-long, .app-page .map-legend.show-note .lg-later { display: block; flex-basis: 100%; order: 5; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
  .app-page .map-legend.is-ward { display: flex; }

  /* Layers: one slim pill bar top right (Jairo picked this over a side card, 2026-11-18) */
  .app-page .map-tabs { left: auto; right: 12px; top: 12px; width: auto; flex-wrap: nowrap; gap: 2px; padding: 4px;
    background: var(--panel-bg); border: 1px solid var(--hair); border-radius: 999px; box-shadow: var(--float); pointer-events: auto; }
  @supports (backdrop-filter: blur(1px)) { .app-page .map-tabs { -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); } }
  .app-page .map-tabs button { height: 38px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 14.5px; }
  .app-page .map-tabs button:hover { background: var(--card-bg-hover); transform: none; }
  .app-page .map-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
  .app-page .map-legend { top: 68px; }
  .app-page .hud { top: 112px; }
}
@media (min-width: 1024px) {
  .app-page .map-legend:not(.show-note) { flex-wrap: nowrap; gap: 10px; white-space: nowrap; }
}

/* Chicago, Illinois, + and − as ONE control, bottom right (ticket 214) */
.map-zoom-out:empty { display: none; }
.maplibregl-ctrl-group.has-places { display: flex; flex-direction: column; min-width: 76px; }
.maplibregl-ctrl-group.has-places button { width: 100% !important; }
.maplibregl-ctrl-group .zo-btn { height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--text); font: 600 13px/1 var(--font-body);
  white-space: nowrap; cursor: pointer; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; transform: none; }
.maplibregl-ctrl-group .zo-btn:hover { background: var(--card-bg-hover) !important; transform: none; }
.maplibregl-ctrl-group .zo-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.zo-all { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 641px) and (max-width: 1023px) {
  /* tablets: the same one-line legend as phones (ticket 214) */
  .map-legend { white-space: nowrap; }
  .map-legend .lg-long { display: none; }
  .map-legend .lg-short { display: inline; color: var(--muted); }
}

/* Start screen, plainer (ticket 215): one location button, the example as a small text link */
.try-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.try-locate .try-main { width: 100%; text-align: center; }
.try-link { align-self: center; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.try-link:hover { color: var(--text); }
.try-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Map sources live in "About this information" (ticket 216) */
.about-list .map-source { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* Wide screens: the panel is as tall as what it holds, up to the full height (ticket 217) */
@media (min-width: 1024px) {
  .app-page .panel { bottom: auto; max-height: calc(100% - (12px + var(--head-h, 128px) + 8px) - 12px); }
}

/* "Explore the map" district list in the site's style (ticket 218): a pill like the search field, pin + chevron icons */
.map-list #map-pick { -webkit-appearance: none; appearance: none; width: 100%; min-height: 48px; padding: 0 44px 0 42px; cursor: pointer;
  border-radius: var(--r-pill); border: 1.5px solid var(--field-line); color: var(--text); font: 600 15px/1.2 var(--font-body);
  background-color: color-mix(in srgb, var(--surface) 88%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b2c1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b2c1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat; background-position: left 16px center, right 16px center; background-size: 18px 18px, 16px 16px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease); }
:root[data-theme="light"] .map-list #map-pick {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5868' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5868' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.map-list #map-pick:hover { border-color: var(--accent); background-color: var(--card-bg-hover); }
.map-list #map-pick:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.map-list #map-pick option { background: var(--surface); color: var(--text); }
/* Browsers that allow it (Chrome, Edge): the open list matches too, a rounded card instead of the system menu */
@supports (appearance: base-select) {
  .map-list #map-pick, .map-list #map-pick::picker(select) { appearance: base-select; }
  .map-list #map-pick { display: flex; align-items: center; }
  .map-list #map-pick::picker-icon { display: none; }
  .map-list #map-pick::picker(select) { margin-top: 6px; padding: 6px; max-height: min(360px, 60vh); border: 1px solid var(--hair); border-radius: 16px;
    background: var(--surface); color: var(--text); box-shadow: var(--float); }
  .map-list #map-pick option { padding: 10px 12px; border-radius: 10px; font: 500 14px/1.3 var(--font-body); background: transparent; }
  .map-list #map-pick option:hover, .map-list #map-pick option:focus-visible { background: var(--card-bg-hover); outline: none; }
  .map-list #map-pick option:checked { background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 600; }
  .map-list #map-pick option::checkmark { display: none; }
}

/* =====================  "See full details", plainer (ticket 219)  ===================== */
/* Election status: one short line */
.next-status { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 14px; font-weight: 600; color: var(--text); }
.next-status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.next-final { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* Votes: one small card each */
.vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vcard { padding: 12px 14px; border-radius: 14px; background: var(--card-bg, var(--surface)); border: 1px solid var(--hair); }
.vc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.vc-vote { font-family: var(--font-head); font-weight: 800; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; padding: 2px 10px;
  border-radius: 999px; border: 1px solid var(--hair); color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.vc-vote.vote-yes { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.vc-vote.vote-no { border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.vc-date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.vc-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); }
.vc-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.vc-more { margin-top: 6px; }
.vc-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
.vc-more > summary:hover { color: var(--text); }
.vc-line { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.vc-more .vbar { max-width: none; }
.vc-link { display: inline-block; margin-top: 6px; font-size: 13px; }

/* Campaign money */
.money-committee { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.money-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.msplit { margin-top: 16px; }
.msplit-title { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.msplit-bar { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; }
.msplit-seg { min-width: 4px; height: 100%; }
.msplit-rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.msplit-rows li { display: grid; grid-template-columns: 12px 1fr auto 3.2em; align-items: center; gap: 10px; font-size: 14px; }
.msplit-sw { width: 12px; height: 12px; border-radius: 3px; }
.msplit-label { color: var(--text); line-height: 1.3; }
.msplit-amt { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.msplit-pct { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
/* category colours: checked for colour-blind separation and contrast (dataviz validator, light on #fff, dark on #1a2332) */
.c1 { background: #3987e5; } .c2 { background: #d95926; } .c3 { background: #199e70; } .c4 { background: #c98500; } .c5 { background: #d55181; }
.c0 { background: color-mix(in srgb, var(--text) 35%, transparent); }
:root[data-theme="light"] .c1 { background: #2a78d6; } :root[data-theme="light"] .c2 { background: #eb6834; } :root[data-theme="light"] .c3 { background: #1baf7a; }
:root[data-theme="light"] .c4 { background: #eda100; } :root[data-theme="light"] .c5 { background: #e87ba4; }
.donors { margin-top: 18px; }
.donor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.donor { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--card-bg, var(--surface)); border: 1px solid var(--hair); }
.donor-who { display: grid; gap: 2px; min-width: 0; }
.donor-name { font-weight: 600; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.donor-type { font-size: 12.5px; color: var(--muted); }
.donor-amt { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.money-block .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.money-block .fig-value { font-size: clamp(16px, 4.6vw, 22px); overflow-wrap: anywhere; }
.vc-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Vote cards, one line (ticket 219, Jairo): YES · bill · date, "Details" bottom right */
.vcard { padding: 10px 12px 6px; }
.vc-row { display: flex; align-items: center; gap: 12px; }
.vc-row .vc-vote { flex: none; min-width: 52px; text-align: center; padding: 3px 8px; font-size: 14px; }
.vc-row .vc-title { flex: 1; min-width: 0; margin: 0; font-size: 14.5px; -webkit-line-clamp: 2; }
.vc-row .vc-date { flex: none; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.vc-more { margin-top: 0; display: flex; flex-direction: column; }
.vc-more > summary { align-self: flex-end; list-style: none; min-height: 28px; font-size: 12.5px; padding: 0 2px; }
.vc-more > summary::-webkit-details-marker { display: none; }
.vc-more > summary::after { content: " ›"; }
.vc-more[open] > summary::after { content: " ‹"; }
.vc-more[open] > summary { order: 2; }
.vc-body { order: 1; padding: 6px 0 2px; border-top: 1px solid var(--hair); margin-top: 8px; }
/* Yes green, No red (Jairo 2026-11-18). The word is always shown, so colour is never the only signal. AA-checked. */
.vc-vote.vote-yes { color: #4ade80; border-color: color-mix(in srgb, #4ade80 55%, transparent); background: color-mix(in srgb, #4ade80 14%, transparent); }
.vc-vote.vote-no { color: #f87171; border-color: color-mix(in srgb, #f87171 55%, transparent); background: color-mix(in srgb, #f87171 14%, transparent); }
:root[data-theme="light"] .vc-vote.vote-yes { color: #166534; border-color: color-mix(in srgb, #166534 45%, transparent); background: color-mix(in srgb, #166534 10%, transparent); }
:root[data-theme="light"] .vc-vote.vote-no { color: #b91c1c; border-color: color-mix(in srgb, #b91c1c 45%, transparent); background: color-mix(in srgb, #b91c1c 9%, transparent); }
/* Call / Show on map inside the profile's top card (ticket 219) */
.profile-who .profile-actions { margin: 10px 0 0; gap: 6px; flex-wrap: wrap; }
.profile-who .pbtn { min-height: 44px; padding: 0 14px; font-size: 14px; }

/* Money parts you can open (ticket 221) */
.msplit-rows { gap: 2px; }
.msplit-row { display: grid; grid-template-columns: 12px 1fr auto 3.2em 14px; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 4px 8px; margin: 0 -8px; box-sizing: content-box; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; }
div.msplit-row { grid-template-columns: 12px 1fr auto 3.2em 14px; }
button.msplit-row { cursor: pointer; }
button.msplit-row:hover, button.msplit-row[aria-expanded="true"] { background: var(--card-bg-hover); }
button.msplit-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.msplit-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); justify-self: center; }
button.msplit-row[aria-expanded="true"] .msplit-chev { transform: rotate(-135deg) translate(-2px, -2px); }
@media (prefers-reduced-motion: no-preference) { .msplit-chev { transition: transform .15s var(--ease); } }
.msplit-seg.is-tap { cursor: pointer; }
.msplit-bar.has-on .msplit-seg:not(.is-on) { opacity: .35; }
.msplit-more { margin: 4px 0 8px 22px; padding: 10px 12px; border-radius: 12px; background: var(--card-bg, var(--surface)); border: 1px solid var(--hair); }
.giver-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.giver-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; font-size: 13.5px; }
.giver-name { color: var(--text); overflow-wrap: anywhere; }
.giver-amt { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.giver-n { grid-column: 1; font-size: 12px; color: var(--muted); }
.giver-rest { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.giver-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.giver-split { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-size: 13.5px; color: var(--text); }
.msplit-rows > li { display: block; }
.msplit-rows .giver-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
.msplit-more { margin-left: 0; }
.giver-name { font-size: 13px; line-height: 1.35; }
/* Outcome under the date: "Passed 51–3" (neutral, so their own YES/NO stays the colour signal) */
.vc-side { flex: none; display: grid; justify-items: end; gap: 2px; }
.vc-outcome { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text); white-space: nowrap;
  padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 8%, transparent); font-variant-numeric: tabular-nums; }
/* Outcome: bigger, green when it passed, red when it failed (Jairo 2026-11-18); same AA-checked colours as YES / NO */
.vc-outcome { font-size: 13px; padding: 2px 8px; border-radius: 8px; border: 1px solid transparent; }
.vc-outcome.is-passed { color: #4ade80; border-color: color-mix(in srgb, #4ade80 50%, transparent); background: color-mix(in srgb, #4ade80 14%, transparent); }
.vc-outcome.is-failed { color: #f87171; border-color: color-mix(in srgb, #f87171 50%, transparent); background: color-mix(in srgb, #f87171 14%, transparent); }
:root[data-theme="light"] .vc-outcome.is-passed { color: #166534; border-color: color-mix(in srgb, #166534 40%, transparent); background: color-mix(in srgb, #166534 10%, transparent); }
:root[data-theme="light"] .vc-outcome.is-failed { color: #b91c1c; border-color: color-mix(in srgb, #b91c1c 40%, transparent); background: color-mix(in srgb, #b91c1c 9%, transparent); }
/* YES / NO badge: bigger and centred top-to-bottom in the card (Jairo 2026-11-18) */
.vcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.vc-row { display: contents; }
.vc-row .vc-vote { grid-column: 1; grid-row: 1 / span 2; align-self: center; font-size: 17px; min-width: 64px; padding: 6px 12px; border-radius: 12px; }
.vc-row .vc-title { grid-column: 2; grid-row: 1; }
.vc-row .vc-side { grid-column: 3; grid-row: 1; }
.vcard > .vc-more { grid-column: 2 / 4; grid-row: 2; }
.vcard:has(> .vc-more[open]) .vc-row .vc-vote { align-self: start; margin-top: 2px; }
/* Bill name centred top-to-bottom too; "Details" sits under the date/outcome (Jairo 2026-11-18) */
.vc-row .vc-title { grid-row: 1 / span 2; align-self: center; }
.vcard > .vc-more { grid-column: 3; grid-row: 2; }
.vcard:has(> .vc-more[open]) > .vc-more { grid-column: 1 / -1; grid-row: 3; }
.vcard:has(> .vc-more[open]) .vc-row .vc-title { align-self: start; }

/* "What it's about" inside a vote's Details (ticket 222) */
.vc-about { margin: 2px 0 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.vc-about-title { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.vc-about-text { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text); }
.vc-about-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); font-style: italic; }
.vc-official { margin-top: 6px; }
.vc-official > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); min-height: 28px; display: inline-flex; align-items: center; }
.vc-official > summary:hover { color: var(--text); }

/* A profile's sources and "Report an error", moved to the very end of the panel (ticket 228) */
.end-slot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.end-slot .pfoot { margin: 0; padding: 0; border: 0; }

/* Hovering an official's card lights the whole card as one, not just its top part (ticket 230) */
.callcard .cc-toggle:hover, .callcard .cc-toggle:focus-visible { background: transparent; }
.callcard .cc-toggle:focus-visible { outline: none; }
.callcard:has(.cc-toggle:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.callcard:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--hair)); }

/* Small standalone links get a full tap area on touch screens (ticket 239) */
@media (pointer: coarse), (max-width: 1023px) {
  .vc-link, .psec-link, .src-list a, .vc-official > summary, .vc-more > summary { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Link to the ward and district pages (ticket 243) */
.site-foot .foot-links { margin: 0 0 10px; }
.site-foot .foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* New York (ticket 245): other ballot lines under the party pill (fusion voting), and what a state doesn't have yet */
.profile-who .party-lines { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.coming-soon { margin: 4px 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }

/* Ticket 255: a calm opening screen. Only the address box over the map until the first search, district or message;
   then the panel (officials, key dates, the district list, about) appears and stays. */
.app-page.is-start .panel { display: none; }
.app-page.is-start .app { --peek: 0px; }

/* The state picker by the logo (ticket 255): the old badge, now a real choice. A native select, so it works with
   touch, keyboard and screen readers everywhere; styled like the badge with a small arrow. */
.state-pick { appearance: none; -webkit-appearance: none; margin: 0; font: 600 12.5px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase;
  color: var(--text); background-color: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid var(--hair); border-radius: 999px;
  min-height: 32px; padding: 0 28px 0 12px; cursor: pointer; white-space: nowrap; max-width: 210px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.state-pick:hover { border-color: var(--accent); }
.state-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.state-pick option { color: initial; background: initial; text-transform: none; }
@media (max-width: 640px) { .state-pick { min-height: 44px; font-size: 12px; padding-left: 12px; } } /* a full-size tap target on phones */
