/* Fonts: Spectral (headings) and Work Sans (body), self-hosted in fonts/ (SIL OFL 1.1). */

@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/work-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/work-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #141418;
  --text: #f2f2f4;
  --muted: #9a9ca5;
  --border: #2a2b31;
  --accent: #9db8ea;

  --rep: #c8313a;
  --dem: #2a5cb8;
  --tie: #f2c12e;
  --none: #45474d;
  --neon-rep: #ff2a4f;
  --neon-dem: #2b7fff;
  --neon-ind: #b45cff;
  --neon-tie: #ffd23f;
  --neon-orange: #ff9a2e;
  --passed: #5fe0a0;
  --neon-yea: #39ff7a;
  --neon-nay: #ff2a4f;
  /* Supreme Court alignment (deliberately not the party colors). */
  --neon-con: #ff8a3d;
  --neon-pro: #2ee6c0;
  --card-border: #b4b5ba;
  --card-bg: #1c1c20;
  --card-bg-hover: #26262b;
  --card-bg-selected: #eeebe4;
  --card-stripe: #d9d6cf;
  --failed: #ffa24c;
  --state-stroke: #000000;

  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px rgb(0 0 0 / 0.6);
  --font-head: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--font-body);
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Every page sits on a black and dark gray grid; the top bar stays solid black. */
body, .bill-view {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgb(255 255 255 / 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}

body {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Page changes slide sideways (see transitions.js, which sets data-slide on
   <html> to "forward" or "backward" by top-bar order). With cross-document view
   transitions both pages slide together; without them the old page slides out
   (.slide-out) and the new one slides in (.slide-in). Pages are black from the
   first moment and hold their first paint until drawn (blocking="render"), so
   nothing flashes. The top bar stays still. */
html { background: #000000; }
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
::view-transition-group(topbar) { animation: none; z-index: 1; }
::view-transition-group(nav-indicator) { z-index: 2; animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.65, 0, 0.25, 1); }
::view-transition-old(nav-indicator), ::view-transition-new(nav-indicator) { animation: none; height: 100%; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }

html[data-slide="forward"]::view-transition-old(root) { animation: slide-to-left 0.6s cubic-bezier(0.65, 0, 0.25, 1) both; }
html[data-slide="forward"]::view-transition-new(root) { animation: slide-from-right 0.6s cubic-bezier(0.65, 0, 0.25, 1) both; }
html[data-slide="backward"]::view-transition-old(root) { animation: slide-to-right 0.6s cubic-bezier(0.65, 0, 0.25, 1) both; }
html[data-slide="backward"]::view-transition-new(root) { animation: slide-from-left 0.6s cubic-bezier(0.65, 0, 0.25, 1) both; }

html.slide-in, html.slide-out { overflow-x: hidden; }
html.slide-in[data-slide="forward"] body > :not(.topbar) { animation: slide-from-right 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
html.slide-in[data-slide="backward"] body > :not(.topbar) { animation: slide-from-left 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
html.slide-out[data-slide="forward"] body > :not(.topbar) { animation: slide-to-left 0.28s cubic-bezier(0.6, 0, 0.9, 0.5) both; }
html.slide-out[data-slide="backward"] body > :not(.topbar) { animation: slide-to-right 0.28s cubic-bezier(0.6, 0, 0.9, 0.5) both; }

@keyframes slide-to-left { to { transform: translateX(-100vw); } }
@keyframes slide-from-right { from { transform: translateX(100vw); } }
@keyframes slide-to-right { to { transform: translateX(100vw); } }
@keyframes slide-from-left { from { transform: translateX(-100vw); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root),
  html.slide-in body > *, html.slide-out body > * { animation: none !important; }
}

/* Top bar: flat black with a grey rule along the bottom. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #000000;
  border-bottom: 1px solid #3a3b40;
}
/* Tabs sit at the left, leaving the right end to the search box, and tighten on
   narrower screens so they fit without scrolling; only on phones (when they still
   don't fit) does the bar scroll sideways rather than wrap. */
.topbar nav {
  display: flex;
  gap: 24px;
  padding: 14px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar nav::-webkit-scrollbar { display: none; }
.topbar a {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 4px 6px;
  white-space: nowrap;
  flex: none;
}
/* The current page's underline is a real element so it can glide between
   tabs when the page changes (its own view-transition group; transitions.js
   animates it when there's no view transition). */
.topbar a { position: relative; }
.nav-indicator {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
  view-transition-name: nav-indicator;
}
.topbar a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Footer */

.site-footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Intro */

.intro { padding-top: 40px; }
h1 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0 0 4px;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.lede { margin: 0; color: var(--muted); }

/* Toolbar: chamber toggle and totals */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 24px 0 28px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  box-shadow:
    -6px -2px 16px -4px var(--neon-rep),
    6px 2px 16px -4px var(--neon-dem);
}
.segmented button {
  font: inherit;
  font-weight: 600;
  min-width: 96px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.segmented button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.totals {
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.totals-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.totals .party { font-weight: 600; white-space: nowrap; }
.totals .rep { color: #ef6b72; }
.totals .dem { color: #7ea6f0; }
.seat-bar {
  display: flex;
  gap: 3px;
  width: 100%;
  height: 10px;
}
.seat-bar span {
  display: block;
  height: 100%;
  flex: 0 1 0;
  transition: flex-grow 0.4s ease;
}
.seat-bar .rep {
  border-radius: 999px 0 0 999px;
  background: var(--neon-rep);
  box-shadow: 0 0 10px var(--neon-rep), 0 0 24px -2px var(--neon-rep);
}
.seat-bar .dem {
  border-radius: 0 999px 999px 0;
  background: var(--neon-dem);
  box-shadow: 0 0 10px var(--neon-dem), 0 0 24px -2px var(--neon-dem);
}

/* National Map */

/* The map lies on a globe drawn in its own SVG (map-globe.js); the time-zone clock sits
   bottom right. */
body.map-page > :not(.globe-readout):not(.topbar) { position: relative; z-index: 1; }
.globe-readout {
  position: fixed;
  right: 20px;
  bottom: 12px;
  z-index: 0;
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgb(201 201 255 / 0.7);
  text-shadow: 0 0 8px rgb(90 120 255 / 0.8);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.wrap.wide { max-width: 1320px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ZIP box: needs a visible field, so it gets the toggle's neon split border. */
.zip-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 16px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
}
.zip-form input {
  width: 15.5em;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}
.zip-form input::placeholder { color: var(--muted); }
.zip-form button {
  font: inherit;
  font-weight: 600;
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
}
.zip-form:focus-within { box-shadow: 0 0 14px -2px var(--neon-dem); }
.zip-status { margin: -6px 0 0; font-size: 0.85rem; color: var(--muted); }
.zip-status:empty { display: none; }

/* One-screen layout: controls | the map on its globe | members panel. */
.map-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  max-width: 1680px;
  height: calc(100vh - 61px - 36px);
  margin: 0 auto;
  padding: 20px 24px 0;
}
.map-main.state-open { grid-template-columns: 300px minmax(0, 1fr) minmax(300px, 360px); }
.map-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
}
.map-controls h1 { margin: 0; }
.map-controls .lede { font-size: 0.9rem; }
.map-controls .segmented { align-self: flex-start; }
.map-controls .zip-form input { width: 100%; min-width: 0; }
.map-controls .totals { margin: 4px 0 0; }
.map-controls .map-legend, .map-controls .note { margin: 0; }
.map-sources { margin: 0; font-size: 0.75rem; color: var(--muted); }
.map-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.map-wrap { position: relative; flex: 1; min-height: 0; }
/* The globe sits in a frame with the toggles' red/blue split neon border, so it's clipped by a
   deliberate edge rather than the page's (administrator's request). */
.map-page .map-wrap {
  overflow: hidden;
  border: 1.5px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(#000, #000) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  box-shadow: -4px -2px 16px -6px var(--neon-rep), 4px 2px 16px -6px var(--neon-dem);
}
.map-page .map-wrap .zoom-controls { top: 12px; right: 12px; }

#map {
  display: block;
  width: 100%;
  height: 100%;
}

.back-button {
  font: inherit;
  font-weight: 600;
  margin: 0 0 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
}

/* Neon shapes: a translucent party-colored fill, a bright party-colored line,
   and a wider faint line under it for the glow. Lines never scale with zoom. */
#map path { vector-effect: non-scaling-stroke; transition: opacity 0.4s ease, fill-opacity 0.2s; }
/* The globe (globe-map.js): face, graticule, other countries' outlines, rim light, glow. */
#map { cursor: grab; touch-action: none; }
#map.spinning { cursor: grabbing; }
#map .globe-layer, #map .globe-rim, #map .globe-rim-glow { pointer-events: none; }
#map .globe-grid { fill: none; stroke: #6b78c8; stroke-opacity: 0.14; stroke-width: 0.7; }
#map .globe-land { fill: #0d0f1c; stroke: #5a6390; stroke-opacity: 0.5; stroke-width: 0.6; }
#map .globe-rim { fill: none; stroke-width: 1.6; }
#map .globe-rim-glow { fill: none; stroke-width: 7; stroke-opacity: 0.35; filter: blur(4px); }
#map .globe-layer circle, #map .globe-layer path, #map .globe-rim, #map .globe-rim-glow { vector-effect: non-scaling-stroke; }
.state-fill { fill: #000000; stroke: none; cursor: pointer; outline: none; }
.district { fill: transparent; stroke: transparent; cursor: pointer; }
.state-border { fill: none; pointer-events: none; }

/* House: districts carry the color; state lines are thin and white. */
#map[data-chamber="house"] .district,
#map.zoomed .district { fill-opacity: 0.24; stroke-width: 0.7; stroke-opacity: 0.95; paint-order: stroke; }
#map[data-chamber="house"] .district[data-party="R"],
#map.zoomed .district[data-party="R"] { fill: var(--neon-rep); stroke: var(--neon-rep); }
#map[data-chamber="house"] .district[data-party="D"],
#map.zoomed .district[data-party="D"] { fill: var(--neon-dem); stroke: var(--neon-dem); }
#map[data-chamber="house"] .district[data-party="I"],
#map.zoomed .district[data-party="I"] { fill: var(--neon-ind); stroke: var(--neon-ind); }
#map[data-chamber="house"] .district[data-party="none"],
#map.zoomed .district[data-party="none"] { fill: var(--none); stroke: var(--none); }
#map[data-chamber="house"] .district:hover,
#map.zoomed .district:hover,
#map .district.highlight { fill-opacity: 0.55; }
#map .district.highlight { stroke: #ffffff; stroke-width: 2; }
#map[data-chamber="house"] .state-border,
#map.zoomed .state-border { stroke: #f2f2f4; stroke-width: 1.1; stroke-opacity: 0.9; }

/* Senate: states carry the color; districts show as faint lines. */
#map[data-chamber="senate"]:not(.zoomed) .district { stroke: rgb(255 255 255 / 0.16); stroke-width: 0.5; }
#map[data-chamber="senate"]:not(.zoomed) .state-fill { fill-opacity: 0.26; }
#map[data-chamber="senate"]:not(.zoomed) .state-fill:hover,
#map[data-chamber="senate"]:not(.zoomed) .state-fill:focus-visible { fill-opacity: 0.5; }
.state-fill[data-party="R"] { fill: var(--neon-rep); }
.state-fill[data-party="D"] { fill: var(--neon-dem); }
.state-fill[data-party="tie"] { fill: var(--neon-tie); }
.state-fill[data-party="none"] { fill: var(--none); }
#map[data-chamber="house"] .state-fill,
#map.zoomed .state-fill { fill: #000000; fill-opacity: 1; }
#map[data-chamber="senate"]:not(.zoomed) .state-border { stroke-width: 1.4; }
#map[data-chamber="senate"]:not(.zoomed) .state-border[data-party="R"] { stroke: var(--neon-rep); }
#map[data-chamber="senate"]:not(.zoomed) .state-border[data-party="D"] { stroke: var(--neon-dem); }
#map[data-chamber="senate"]:not(.zoomed) .state-border[data-party="tie"] { stroke: var(--neon-tie); }
#map[data-chamber="senate"]:not(.zoomed) .state-border[data-party="none"] { stroke: var(--none); }

/* Glow: a soft drop-shadow on the line layers (static, so it's cheap). */
#map .districts, #map .state-borders { filter: drop-shadow(0 0 2px rgb(255 255 255 / 0.15)); }
#map[data-chamber="house"] .districts,
#map.zoomed .districts { filter: drop-shadow(0 0 3px rgb(120 140 255 / 0.35)) drop-shadow(0 0 1.5px rgb(255 60 90 / 0.3)); }

/* Zoomed in: other states fade away. */
#map .other-state { opacity: 0.06; pointer-events: none; }
#map .state-fill:focus-visible { stroke: #ffffff; stroke-width: 2; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}
.map-legend li { display: flex; align-items: center; gap: 8px; }
.dot-tie { background: var(--neon-tie); box-shadow: 0 0 8px var(--neon-tie); }
.dot-none { border: 1.5px solid var(--none); }

.tooltip {
  position: absolute;
  z-index: 2;
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  pointer-events: none;
}
.tooltip h2 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.tooltip p { margin: 0; color: var(--muted); }
.tooltip ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.tooltip li { display: flex; gap: 6px; align-items: baseline; }
.tooltip .tag {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 1.5em;
}
.tooltip .tag.R { color: var(--rep); }
.tooltip .tag.D { color: var(--dem); }
.tooltip .tag.I { color: var(--neon-ind); }

.tooltip .tag.I { color: var(--neon-ind); }
.tooltip .mini-portrait { width: 28px; height: 28px; flex: none; }
.tooltip ul li { align-items: center; margin-top: 4px; }

.note {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* State panel: members as floating rows, portraits in neon rings. */
.state-panel {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px 24px 4px;
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
}

.state-panel h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0;
  line-height: 1.2;
}
.state-summary { margin: 4px 0 18px; color: var(--muted); font-size: 0.9rem; }
.member-group-title {
  margin: 18px 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.member-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.member-list .empty { color: var(--muted); font-size: 0.9rem; }
.member-link, .member-card.vacant {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.member-card.highlight .member-link,
.member-link:hover,
.member-link:focus-visible { background: rgb(255 255 255 / 0.07); }
.member-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.member-portrait, .mini-portrait {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2.5px solid var(--none);
  background: #000000;
  overflow: hidden;
}
.member-portrait img, .mini-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini-portrait { border-width: 1.5px; }
.ring-D { border-color: var(--neon-dem); box-shadow: 0 0 10px var(--neon-dem), inset 0 0 6px rgb(43 127 255 / 0.5); }
.ring-R { border-color: var(--neon-rep); box-shadow: 0 0 10px var(--neon-rep), inset 0 0 6px rgb(255 42 79 / 0.5); }
.ring-I { border-color: var(--neon-ind); box-shadow: 0 0 10px var(--neon-ind), inset 0 0 6px rgb(180 92 255 / 0.5); }
.member-text { display: grid; gap: 1px; min-width: 0; }
.member-role { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.member-name { font-weight: 600; font-size: 1rem; }
.member-party, .member-facts { font-size: 0.82rem; color: var(--muted); }

/* Narrow screens: one scrolling column (room at the end for the clock; hidden on phones). */
@media (max-width: 600px) { .globe-readout { display: none; } }
@media (max-width: 900px) {
  .map-main, .map-main.state-open { display: block; height: auto; padding-bottom: 48px; }
  .map-controls { overflow: visible; margin-bottom: 16px; }
  #map { height: auto; }
  .state-panel { overflow: visible; margin-top: 16px; }
}

/* Congress Tracker: the chamber (seat chart) at the top left with every search in one card
   under it; the two bill lists side by side at the right; metrics below. */

.tracker {
  display: grid;
  /* The chart, search and metrics take 3/5; the two bill lists 1/5 each. */
  grid-template-columns: minmax(0, 3fr) repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 24px;
}
.tracker-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; padding-top: 28px; min-width: 0; }
.chamber-view .toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.chamber-lede { margin: 0; font-size: 0.88rem; color: var(--muted); text-align: right; }
.tracker-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* the one-line chip row scrolls instead of widening the card */
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #2c2d33;
  border-radius: 16px;
  background: rgb(14 14 18 / 0.88);
}
.search-label { display: block; margin: 0 0 6px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tracker-search .bill-search, .tracker-search .member-search { margin: 0; max-width: none; }
.tracker-search .zip-form input { width: 100%; }
.tracker-search input { box-sizing: border-box; }
.tracker-search .member-search { justify-items: stretch; gap: 0; }
.tracker-search .member-search .zip-form { padding: 6px 16px; }
.tracker-search .member-found { justify-content: flex-start; margin-top: 6px; }
.tracker-search .member-found:empty { display: none; }
.tracker-search .category-chips { margin: 0; justify-content: flex-start; }

.bill-column {
  position: sticky;
  top: 61px; /* top bar height */
  align-self: start;
  max-height: calc(100vh - 61px);
  overflow-y: auto;
  /* The scroll area clips its contents, so it extends 20px past the column on
     each side (pulled back with negative margins): room for a selected card
     to lift and cast its extruded edge and glow without being cut off. */
  margin: 0 -20px;
  padding: 40px 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
}
.bill-column h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0;
}
.column-note {
  margin: 4px 0 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

.bill-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.bill-list .empty { color: var(--muted); font-size: 0.9rem; }

/* Bill cards: a requested exception to the floating layout.
   The card is drawn in two layers behind its content: ::after is the face
   (background and border) and ::before is the extruded edge. When selected,
   the card lifts toward the chart by --lift and the edge fills the space back
   to where it sat (down-left in the left column, down-right in the right),
   like the side of a raised block, striped white and light gray. */

@property --lift {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.bill {
  --lift: 0px;
  position: relative;
  isolation: isolate;
  display: grid;
  border: 1px solid transparent; /* the face (::after) draws the visible border */
  border-radius: 10px;
  cursor: pointer;
  transition: --lift 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.bill.selected { --lift: 6px; }
/* Both lists sit right of the chart, so a selected card lifts left toward it. */
.bill-list .bill { transform: translate(calc(var(--lift) * -1), calc(var(--lift) * -1)); }

.bill::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border: 1px solid var(--card-border);
  border-radius: inherit;
  background: var(--card-bg);
  pointer-events: none;
  transition: background 0.25s, border-color 0.15s;
}
.bill:hover::after { background: var(--card-bg-hover); }
.bill.selected::after {
  border-color: #ffffff;
  background: var(--card-bg-selected);
}

/* The edge spans the card and its old spot; the clip cuts the two far corners
   diagonally so the sides run straight back. Stripes and gaps are equal widths. */
.bill::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -1px;
  border-radius: inherit;
  pointer-events: none;
}
#upcoming .bill::before, #voted .bill::before {
  left: -1px;
  right: calc(-1px - var(--lift));
  bottom: calc(-1px - var(--lift));
  background: repeating-linear-gradient(45deg, #ffffff 0 4px, var(--card-stripe) 4px 8px);
  clip-path: polygon(0 0, calc(100% - var(--lift)) 0, 100% var(--lift),
    100% 100%, var(--lift) 100%, 0 calc(100% - var(--lift)));
}
.bill-select, .bill-link { position: relative; }

/* Dark text on the off-white card. */
.bill.selected .bill-select { color: #141418; }
.bill.selected .bill-meta,
.bill.selected .bill-status,
.bill.selected .bill-question,
.bill.selected .bill-link { color: #55565e; }
.bill.selected .bill-num { color: #24489a; }
.bill.selected .tally { color: #141418; }
.bill.selected .stage-passed { color: #12804a; }
.bill.selected .stage-failed { color: #b0500a; }
.bill.selected .tag.R { color: #c8102e; }
.bill.selected .tag.D { color: #1d4fc4; }
.bill.selected .tag.I { color: #7a2ed1; }
@media (prefers-reduced-motion: reduce) {
  .bill { transition: none; }
}
.bill-select { color: #141418; }
.bill.selected .bill-meta,
.bill.selected .bill-status,
.bill.selected .bill-question,
.bill.selected .bill-link { color: #55565e; }
.bill.selected .bill-num { color: #24489a; }
.bill.selected .tally { color: #141418; }
.bill.selected .stage-passed { color: #12804a; }
.bill.selected .stage-failed { color: #b0500a; }
.bill.selected .tag.R { color: #c8102e; }
.bill.selected .tag.D { color: #1d4fc4; }
.bill.selected .tag.I { color: #7a2ed1; }
#upcoming .bill.selected {
  transform: translate(6px, -6px);
  box-shadow:
    -1px 1px 0 #ffffff, -2px 2px 0 #ffffff, -3px 3px 0 #ffffff,
    -4px 4px 0 #ffffff, -5px 5px 0 #ffffff, -6px 6px 0 #ffffff,
    -6px 8px 18px -4px rgb(255 255 255 / 0.35);
}
#voted .bill.selected {
  transform: translate(-6px, -6px);
  box-shadow:
    1px 1px 0 #ffffff, 2px 2px 0 #ffffff, 3px 3px 0 #ffffff,
    4px 4px 0 #ffffff, 5px 5px 0 #ffffff, 6px 6px 0 #ffffff,
    6px 8px 18px -4px rgb(255 255 255 / 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .bill { transition: background 0.15s, border-color 0.15s; }
}
.bill-select {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px 6px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bill-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bill-link {
  justify-self: start;
  margin: 0 14px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}
.bill-link:hover, .bill-link:focus-visible { color: var(--accent); text-decoration: underline; }
.bill-question { font-size: 0.78rem; color: var(--muted); }
.bill-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bill-num { font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.bill-title {
  font-size: 0.92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bill-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.stage { font-weight: 600; }
.stage-passed { color: var(--passed); }
.stage-failed { color: var(--failed); }
.tally { color: var(--text); font-variant-numeric: tabular-nums; }
.party-tally { font-variant-numeric: tabular-nums; }
.tag { font-weight: 600; }
.tag.R { color: var(--neon-rep); }
.tag.D { color: var(--neon-dem); }
.tag.I { color: var(--neon-ind); }

.chamber-view {
  padding-top: 40px;
  text-align: center;
}
.chamber-view .toolbar { justify-content: center; }

.seat-wrap { position: relative; }
#seats {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
}
.seat-D { fill: var(--neon-dem); }
.seat-R { fill: var(--neon-rep); }
.seat-I { fill: var(--neon-ind); }
.seat-V { fill: none; stroke: var(--none); stroke-width: 1.5; }
.seat-outline { fill: #000000; }
.seat-outline-D { stroke: var(--neon-dem); }
.seat-outline-R { stroke: var(--neon-rep); }
.seat-outline-I { stroke: var(--neon-ind); }
/* Seats move between the half-circle and the YEA / NAY areas. */
.seat-move {
  transform-box: view-box;
  transform-origin: 0 0;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.25, 1), opacity 0.4s ease;
}
#seats.instant .seat-move { transition: none; }
.vote-areas { opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
#seats.voting .vote-areas { opacity: 1; transition-delay: 0.25s; }
.vote-area { fill: none; stroke-width: 2.5; }
.vote-area.yea { stroke: var(--neon-yea); }
.vote-area.nay { stroke: var(--neon-nay); }
.vote-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.12em;
}
.vote-label.yea { fill: var(--neon-yea); filter: drop-shadow(0 0 6px var(--neon-yea)); }
.vote-label.nay { fill: var(--neon-nay); filter: drop-shadow(0 0 6px var(--neon-nay)); }
.vote-label.other { fill: var(--muted); font-size: 15px; }
.vote-count { font-size: 0.6em; letter-spacing: 0.02em; fill-opacity: 0.85; }
@media (prefers-reduced-motion: reduce) {
  .seat-move { transition-duration: 0.01s; }
}

/* Fixed two-line height, so a long caption never pushes the chart down. */
.vote-caption {
  height: 3em;
  margin: -12px 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.vote-caption strong { color: var(--text); }
.tooltip-vote { font-weight: 600; margin-top: 2px !important; }
.tooltip-vote.yea { color: var(--neon-yea) !important; }
.tooltip-vote.nay { color: var(--neon-nay) !important; }

.seat-ring { fill: none; stroke: #ffffff; stroke-width: 2; pointer-events: none; }
.seat-wrap .tooltip { text-align: left; }
.tooltip-portrait {
  float: left;
  width: 64px;
  height: 64px;
  margin: 0 12px 0 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: #000000;
  object-fit: cover;
}
.tooltip-portrait.D { color: var(--neon-dem); box-shadow: 0 0 10px var(--neon-dem); }
.tooltip-portrait.R { color: var(--neon-rep); box-shadow: 0 0 10px var(--neon-rep); }
.tooltip-portrait.I { color: var(--neon-ind); box-shadow: 0 0 10px var(--neon-ind); }
.seat-wrap .tooltip { min-width: 240px; }
.seat-wrap .tooltip:not([hidden]) { display: flow-root; }
.tooltip h3 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0 0 2px;
  font-size: 0.95rem;
}

.seat-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.seat-legend li { display: flex; align-items: center; gap: 8px; }
.seat-legend strong { color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-D { background: var(--neon-dem); box-shadow: 0 0 8px var(--neon-dem); }
.dot-R { background: var(--neon-rep); box-shadow: 0 0 8px var(--neon-rep); }
.dot-I { background: var(--neon-ind); box-shadow: 0 0 8px var(--neon-ind); }
.dot-V { border: 1.5px solid var(--none); }

@media (max-width: 1250px) {
  .tracker { grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .tracker-left { grid-column: 1 / -1; }
  .bill-column { position: static; max-height: none; overflow: visible; margin: 0; padding: 32px 0 24px; }
}

@media (max-width: 700px) {
  .tracker { grid-template-columns: 1fr; padding: 0 16px; }
  .vote-caption { height: 4.5em; -webkit-line-clamp: 3; }
}

@media (max-width: 600px) {
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
}

/* Legislator profile */

.profile { padding-top: 28px; }
.profile .back-button { display: inline-block; text-decoration: none; }
.profile-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 12px 0 32px;
}
.profile-head h1 { margin: 2px 0 4px; }
.profile-portrait {
  flex: none;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid var(--none);
  background: #000000;
  overflow: hidden;
}
.profile-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-portrait.ring-D { box-shadow: 0 0 22px var(--neon-dem), inset 0 0 10px rgb(43 127 255 / 0.5); }
.profile-portrait.ring-R { box-shadow: 0 0 22px var(--neon-rep), inset 0 0 10px rgb(255 42 79 / 0.5); }
.profile-portrait.ring-I { box-shadow: 0 0 22px var(--neon-ind), inset 0 0 10px rgb(180 92 255 / 0.5); }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 56px;
  margin-bottom: 32px;
}
.stat-label { margin: 0; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat-value {
  margin: 2px 0 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 3rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.neon-D { color: var(--neon-dem); text-shadow: 0 0 18px var(--neon-dem); }
.neon-R { color: var(--neon-rep); text-shadow: 0 0 18px var(--neon-rep); }
.neon-I { color: var(--neon-ind); text-shadow: 0 0 18px var(--neon-ind); }
.neon-muted { color: var(--text); text-shadow: 0 0 14px rgb(255 255 255 / 0.35); }
.stat-bar {
  display: flex;
  gap: 3px;
  height: 10px;
}
.stat-bar span { display: block; height: 100%; border-radius: 999px; }
.stat-bar .against { background: #2a2b31; }
.bar-D { background: var(--neon-dem); box-shadow: 0 0 10px var(--neon-dem), 0 0 22px -2px var(--neon-dem); }
.bar-R { background: var(--neon-rep); box-shadow: 0 0 10px var(--neon-rep), 0 0 22px -2px var(--neon-rep); }
.bar-I { background: var(--neon-ind); box-shadow: 0 0 10px var(--neon-ind), 0 0 22px -2px var(--neon-ind); }
.bar-muted { background: #f2f2f4; box-shadow: 0 0 10px rgb(255 255 255 / 0.5); }
.stat-note { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); }

.profile-facts dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 40px;
  margin: 0 0 40px;
}
.profile-facts dt { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.profile-facts dd { margin: 2px 0 0; }

.vote-feed h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; margin: 0; }
.vote-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 64px;
}
.vote-column {
  position: relative;
  padding: 16px;
  border: 2px solid;
  border-radius: 14px;
}
.vote-column.yea { border-color: var(--neon-yea); box-shadow: 0 0 16px -4px var(--neon-yea), inset 0 0 16px -8px var(--neon-yea); }
.vote-column.nay { border-color: var(--neon-nay); box-shadow: 0 0 16px -4px var(--neon-nay), inset 0 0 16px -8px var(--neon-nay); }
.vote-column h3 {
  position: absolute;
  top: -2.1em;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
}
.vote-column.yea h3 { color: var(--neon-yea); text-shadow: 0 0 10px var(--neon-yea); }
.vote-column.nay h3 { color: var(--neon-nay); text-shadow: 0 0 10px var(--neon-nay); }
.vote-column h3 .vote-count { font-size: 0.6em; letter-spacing: 0.02em; opacity: 0.85; }
.feed-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feed-list .empty { color: var(--muted); }
.feed-item .bill-select { padding-bottom: 12px; text-decoration: none; border-radius: 10px; }
.feed-more button {
  width: 100%;
  font: inherit;
  padding: 8px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.feed-more button:hover { color: var(--text); }

@media (max-width: 760px) {
  .vote-columns { grid-template-columns: 1fr; gap: 56px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}

/* Bill Tracker: search and category filter */

.bill-search { position: relative; max-width: 560px; margin: 18px auto 12px; text-align: left; }
.bill-search input {
  width: 100%;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  color: var(--text);
  font: inherit;
  outline: none;
}
.bill-search input::placeholder { color: var(--muted); }
.bill-search input:focus { box-shadow: 0 0 14px -2px var(--neon-dem); }
.search-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.search-result { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.search-result:hover, .search-result[aria-selected="true"] { background: var(--card-bg-hover); }
.search-result .bill-title { -webkit-line-clamp: 2; }
.search-empty { padding: 8px 10px; color: var(--muted); }

/* One row that scrolls sideways, so the chart stays put. */
.category-chips {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.chip { flex: none; }
.chip {
  font: inherit;
  font-size: 0.78rem;
  padding: 4px 11px;
  border: 1px solid #3a3b40;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--card-border); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.bill-category { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bill.selected .bill-category { color: #55565e; }
.bill-links { display: flex; gap: 14px; margin: 0 14px 10px; }
.bill-links .bill-link { margin: 0; }

/* Full bill view: covers the page below the top bar and fades in. */

body.bill-open { overflow: hidden; }
.bill-view {
  position: fixed;
  inset: 61px 0 0;
  z-index: 8;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bill-view.visible { opacity: 1; transform: none; }
.bill-view-inner { max-width: 1240px; margin: 0 auto; padding: 24px 24px 64px; }
.bv-head { margin: 8px 0 28px; }
.bv-label { margin: 0; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; }
.bv-head h1 { margin: 6px 0 8px; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.bv-meta, .bv-latest { margin: 0 0 6px; color: var(--muted); font-size: 0.92rem; }
.bv-latest strong { color: var(--text); }
.bv-category { color: var(--text); }

.bv-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 18px 0 14px;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
}
.bv-progress li { display: flex; align-items: center; gap: 8px; }
.bv-progress li + li::before {
  content: "";
  width: 36px;
  height: 2px;
  margin: 0 10px 0 4px;
  background: #2a2b31;
}
.bv-progress li.done + li.done::before { background: var(--neon-yea); box-shadow: 0 0 8px var(--neon-yea); }
.bv-step-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #3a3b40; }
.bv-progress li.done { color: var(--text); }
.bv-progress li.done .bv-step-dot { border-color: var(--neon-yea); background: var(--neon-yea); box-shadow: 0 0 10px var(--neon-yea); }
/* The step a bill is on now (yellow) and where it was defeated (red). */
.bv-progress li.current { color: var(--neon-tie); font-weight: 600; }
.bv-progress li.current .bv-step-dot { border-color: var(--neon-tie); background: var(--neon-tie); box-shadow: 0 0 10px var(--neon-tie); }
.bv-progress li.done + li.current::before { background: linear-gradient(90deg, var(--neon-yea), var(--neon-tie)); box-shadow: 0 0 8px var(--neon-tie); }
.bv-progress li.failed { color: var(--neon-nay); font-weight: 600; }
.bv-progress li.failed .bv-step-dot { border-color: var(--neon-nay); background: var(--neon-nay); box-shadow: 0 0 10px var(--neon-nay); }
.bv-progress li.done + li.failed::before { background: linear-gradient(90deg, var(--neon-yea), var(--neon-nay)); box-shadow: 0 0 8px var(--neon-nay); }
/* Stalled in committee (orange, while the Congress sits); "Died in committee" uses .failed. */
.bv-progress li.stalled { color: var(--neon-orange); font-weight: 600; }
.bv-progress li.stalled .bv-step-dot { border-color: var(--neon-orange); background: var(--neon-orange); box-shadow: 0 0 10px var(--neon-orange); }
.bv-progress li.done + li.stalled::before { background: linear-gradient(90deg, var(--neon-yea), var(--neon-orange)); box-shadow: 0 0 8px var(--neon-orange); }
.bv-stage-note { margin: -6px 0 12px; }
.stage-stalled { color: var(--neon-orange); }
.stage-died { color: var(--neon-nay); }

.bv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 48px; }
.bv-section { margin-bottom: 36px; }
.bv-section h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 12px;
}
.bv-count { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); margin-left: 4px; }
.bv-muted, .bv-note, .bv-empty { color: var(--muted); font-size: 0.85rem; }
.bv-muted { margin: 0 0 8px; }
.bv-summary { line-height: 1.6; max-width: 70ch; }

.bv-vote { border-bottom: 1px solid #1f2025; padding: 10px 0; }
.bv-vote summary { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; cursor: pointer; }
.bv-vote-date { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.bv-vote-chamber { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bv-vote-q { flex: 1 1 260px; }
.bv-vote-chart { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 34px 0 6px; }
.bv-vote-box { position: relative; padding: 12px; border: 2px solid; border-radius: 12px; }
.bv-vote-box.yea { border-color: var(--neon-yea); box-shadow: 0 0 14px -4px var(--neon-yea); }
.bv-vote-box.nay { border-color: var(--neon-nay); box-shadow: 0 0 14px -4px var(--neon-nay); }
.bv-vote-box h4 {
  position: absolute;
  top: -1.9em;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}
.bv-vote-box.yea h4 { color: var(--neon-yea); text-shadow: 0 0 8px var(--neon-yea); }
.bv-vote-box.nay h4 { color: var(--neon-nay); text-shadow: 0 0 8px var(--neon-nay); }
.bv-vote-box p { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }
.bv-dots { display: flex; flex-wrap: wrap; gap: 3px; min-height: 8px; }
.bv-dots i { width: 7px; height: 7px; border-radius: 50%; }
.bv-dots .d-D { background: var(--neon-dem); box-shadow: 0 0 4px var(--neon-dem); }
.bv-dots .d-R { background: var(--neon-rep); box-shadow: 0 0 4px var(--neon-rep); }
.bv-dots .d-I { background: var(--neon-ind); box-shadow: 0 0 4px var(--neon-ind); }
.bv-dots .d-V { background: var(--none); }

.bv-timeline { margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 2px solid #26272d; }
.bv-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 16px 12px; }
.bv-timeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3b40;
}
.bv-timeline li.has-vote::before { background: var(--neon-yea); box-shadow: 0 0 8px var(--neon-yea); }
.bv-timeline time { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bv-action-source { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.bv-member { display: flex; gap: 12px; align-items: center; padding: 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
a.bv-member:hover { background: rgb(255 255 255 / 0.07); }
.bv-member .mini-portrait { width: 40px; height: 40px; border-width: 2px; }
.bv-member > span:last-child { display: grid; }
.bv-cosponsors.collapsed .bv-member:nth-child(n + 13) { display: none; }
.bv-cosponsors.expanded .bv-member { display: flex; }
.bv-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 0.9rem; }
.bv-list li { display: grid; gap: 2px; }
.bv-sub { display: block; font-size: 0.85rem; }
.bv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bv-tags li { font-size: 0.78rem; padding: 3px 10px; border: 1px solid #3a3b40; border-radius: 999px; color: var(--muted); }
.bv-button {
  font: inherit;
  font-size: 0.85rem;
  margin-top: 8px;
  padding: 6px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.bv-button:hover { background: rgb(255 255 255 / 0.07); }
.bv-text {
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid #26272d;
  border-radius: 10px;
  background: #07070a;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .bv-grid { grid-template-columns: minmax(0, 1fr); }
  .bv-vote-chart { grid-template-columns: 1fr; gap: 40px; }
}

/* Track by Issue */

.issues .intro { padding-top: 28px; }
.issue-chips { justify-content: flex-start; margin: 20px 0 0; mask-image: none; flex-wrap: wrap; overflow: visible; }
.issue-chips .chip { font-size: 0.95rem; padding: 7px 16px; }
.issue-head { margin: 4px 0 24px; }
.issue-head h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.8rem; margin: 0 0 4px; }
.issue-head .lede { max-width: 80ch; }

.strength {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 32px 56px;
  align-items: start;
  margin-bottom: 64px;
}
.strength-rows { display: grid; gap: 32px; }

/* Members bar: under each position's segment, a neon mini bar a third as tall,
   centered on the segment's bottom edge: Democrats (blue) from the left,
   Republicans (red) from the right, blending over a short stretch where they
   meet (--dem-share = Democrats' share). ::before is the bar, ::after its glow. */
.tri-bar.tall { height: 21px; margin-bottom: 4px; }
.tri-bar.tall > span { position: relative; min-width: 0; }
.party-mini {
  --blend: 7%;
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -3.5px;
  height: 7px;
  border-radius: 999px;
  isolation: isolate;
  box-shadow: 0 0 0 2px #000000;
}
.party-mini::before, .party-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg,
    var(--neon-dem) calc(var(--dem-share) - var(--blend)),
    var(--neon-rep) calc(var(--dem-share) + var(--blend)));
}
.party-mini::before { z-index: 1; }
.party-mini::after { z-index: 0; inset: -2px; filter: blur(5px); opacity: 0.95; }

/* Mini state map: neon fills from red (against) through yellow to green (support). */
.issue-map { margin: 0; }
.issue-map-wrap { position: relative; margin-top: 8px; }
#issue-map { display: block; width: 100%; height: auto; }
.issue-states path, .issue-small-states [data-state] rect {
  fill: var(--state-color, #15151a);
  fill-opacity: 0.5;
  stroke: var(--state-color, #3a3b40);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 0.4s, stroke 0.4s;
}
.issue-states { filter: drop-shadow(0 0 3px rgb(255 255 255 / 0.18)); }
.issue-states path:hover, .issue-small-states [data-state]:hover rect { fill-opacity: 0.75; }
.issue-states .no-record, .issue-small-states .no-record rect { fill: #15151a; stroke: #3a3b40; }
.issue-small-states line { stroke: #3a3b40; stroke-width: 1; vector-effect: non-scaling-stroke; }
.issue-small-states [data-state] rect { fill-opacity: 0.5; }
.issue-small-states text { fill: var(--text); font-size: 11px; font-weight: 600; text-anchor: middle; pointer-events: none; }
.issue-map-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.issue-map-scale { width: 140px; height: 8px; border-radius: 999px; }
.issue-map-none { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.issue-map-none i { width: 10px; height: 10px; border-radius: 3px; background: #15151a; border: 1px solid #3a3b40; }
@media (max-width: 900px) {
  .strength { grid-template-columns: minmax(0, 1fr); }
}
.strength-numbers { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 6px 0 10px; font-size: 0.95rem; }
.strength-numbers strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; margin-right: 4px; }
.neon-support { color: var(--neon-yea); text-shadow: 0 0 14px rgb(57 255 122 / 0.6); }
.neon-middle { color: var(--neon-tie); text-shadow: 0 0 14px rgb(255 210 63 / 0.6); }
.neon-oppose { color: var(--neon-nay); text-shadow: 0 0 14px rgb(255 42 79 / 0.6); }
.tri-bar { display: flex; gap: 3px; height: 10px; }
.tri-bar > span { display: block; height: 100%; flex: 0 1 0; border-radius: 999px; transition: flex-grow 0.4s ease; }
.bar-support { background: var(--neon-yea); box-shadow: 0 0 10px var(--neon-yea); }
.bar-middle { background: var(--neon-tie); box-shadow: 0 0 10px var(--neon-tie); }
.bar-oppose { background: var(--neon-nay); box-shadow: 0 0 10px var(--neon-nay); }

.side-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 48px; }
.side-column { position: relative; padding: 14px; border: 2px solid; border-radius: 14px; }
.side-column.support { border-color: var(--neon-yea); box-shadow: 0 0 16px -4px var(--neon-yea), inset 0 0 16px -8px var(--neon-yea); }
.side-column.middle { border-color: var(--neon-tie); box-shadow: 0 0 16px -4px var(--neon-tie), inset 0 0 16px -8px var(--neon-tie); }
.side-column.oppose { border-color: var(--neon-nay); box-shadow: 0 0 16px -4px var(--neon-nay), inset 0 0 16px -8px var(--neon-nay); }
.side-column h3 {
  position: absolute;
  top: -2.1em;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
}
.side-column.support h3 { color: var(--neon-yea); text-shadow: 0 0 10px var(--neon-yea); }
.side-column.middle h3 { color: var(--neon-tie); text-shadow: 0 0 10px var(--neon-tie); }
.side-column.oppose h3 { color: var(--neon-nay); text-shadow: 0 0 10px var(--neon-nay); }
.side-column h3 .vote-count { font-size: 0.6em; opacity: 0.85; }
.side-label { margin: 0; font-weight: 600; }
.side-split { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; font-size: 0.82rem; color: var(--muted); }
.party-filter {
  font: inherit;
  padding: 2px 9px;
  border: 1px solid #3a3b40;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.party-filter:hover { color: var(--text); border-color: var(--card-border); }
.party-filter[aria-pressed="true"] { color: var(--text); background: rgb(255 255 255 / 0.1); border-color: #ffffff; }
.party-filter[aria-pressed="true"][data-party="R"] { border-color: var(--neon-rep); box-shadow: 0 0 8px -1px var(--neon-rep); }
.party-filter[aria-pressed="true"][data-party="D"] { border-color: var(--neon-dem); box-shadow: 0 0 8px -1px var(--neon-dem); }
.party-filter[aria-pressed="true"][data-party="I"] { border-color: var(--neon-ind); box-shadow: 0 0 8px -1px var(--neon-ind); }
.side-members {
  margin: 0;
  padding: 0 4px 0 0;
  list-style: none;
  display: grid;
  gap: 2px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
}
.side-members .empty { color: var(--muted); font-size: 0.9rem; }
.side-member { display: flex; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
.side-member:hover, .side-member:focus-visible { background: rgb(255 255 255 / 0.07); }
.side-member .mini-portrait { width: 36px; height: 36px; border-width: 2px; }
.side-member > span:last-child { display: grid; min-width: 0; }
.side-member .member-name { font-size: 0.9rem; }
.side-member .member-party { font-size: 0.76rem; }

.issue-bills h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; margin: 0 0 12px; }
.segmented.small button { min-width: 0; padding: 5px 14px; font-size: 0.85rem; }
.issue-bill-list { margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.side-badge { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.side-badge.support { color: var(--neon-yea); }
.side-badge.oppose { color: var(--neon-nay); }
.method { margin: 40px 0 0; max-width: 85ch; color: var(--muted); font-size: 0.9rem; }
.method summary { cursor: pointer; color: var(--text); font-weight: 600; }

@media (max-width: 900px) {
  .side-columns { grid-template-columns: 1fr; gap: 56px; }
}

/* Your Congress (/you/): answers on the left, matching bills on the right.
   The form floats on the page (no panel); choices are chips. */

.you-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 56px;
  margin-top: 28px;
  align-items: start;
}
.you-form {
  position: sticky;
  top: 61px; /* top bar height */
  max-height: calc(100vh - 61px);
  overflow-y: auto;
  padding: 12px 8px 24px 0;
  display: grid;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
}
.you-field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.you-field legend { padding: 0; margin-bottom: 8px; }
.you-field .zip-form input { width: 100%; padding: 6px 0; }
.you-field .zip-status { margin: 0; }
.you-hint { letter-spacing: 0.02em; text-transform: none; opacity: 0.7; }
.you-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#choice-groups { display: grid; gap: 20px; }
.you-remember { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.you-remember input { accent-color: var(--neon-dem); }
.you-clear {
  justify-self: start;
  font: inherit;
  font-size: 0.85rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
}
.you-clear:hover { text-decoration: underline; }
.you-privacy { margin: 0; font-size: 0.78rem; color: var(--muted); }

.you-results { min-width: 0; padding-top: 12px; }
.you-members { margin-bottom: 24px; }
.you-members .stat-label { margin-bottom: 8px; }
.you-member-row { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.you-member-row .side-member .mini-portrait { width: 44px; height: 44px; }
.you-summary { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; }
.you-bills { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.you-bill { cursor: default; }
.you-bill .bill-select { cursor: default; gap: 6px; }
.you-why { display: flex; flex-wrap: wrap; gap: 4px; }
.you-why span {
  font-size: 0.7rem;
  padding: 1px 8px;
  border: 1px solid #3a3b40;
  border-radius: 999px;
  color: var(--muted);
}
.you-vote-lines { margin: 4px 0 0; padding: 8px 0 0; list-style: none; display: grid; gap: 8px; border-top: 1px solid #2f3036; }
.you-vote-line { display: grid; gap: 2px; font-size: 0.8rem; }
.you-votes { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.you-vote { color: var(--muted); text-decoration: none; font-weight: 600; }
.you-vote:hover { text-decoration: underline; }
.you-vote.yea { color: var(--neon-yea); }
.you-vote.nay { color: var(--neon-nay); }
.you-introduced { margin-top: 36px; }
.you-introduced summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; }
.you-introduced .lede { margin: 6px 0 16px; font-size: 0.9rem; }

@media (max-width: 900px) {
  .you-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .you-form { position: static; max-height: none; overflow: visible; }
}

/* Congress Tracker: each party's share on a vote, and the legislator search. */
.party-pcts { font-family: var(--font-body); font-size: 17px; font-weight: 600; fill: var(--muted); }
.party-pct { font-size: 22px; }
.party-pct.D { fill: var(--neon-dem); filter: drop-shadow(0 0 5px var(--neon-dem)); }
.party-pct.R { fill: var(--neon-rep); filter: drop-shadow(0 0 5px var(--neon-rep)); }
.party-pct-name { font-weight: 400; }

.member-search { display: grid; justify-items: center; gap: 6px; margin: -12px 0 14px; }
.member-search .zip-form { padding: 6px 16px; }
.member-search input { width: 17em; }
.member-search input::-webkit-search-cancel-button { filter: invert(1); }
.member-found { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 0; min-height: 1.4em; font-size: 0.85rem; }
.found-where, .found-more { color: var(--muted); }
.found-vote { font-weight: 600; color: var(--muted); }
.found-vote.yea { color: var(--neon-yea); }
.found-vote.nay { color: var(--neon-nay); }

.search-shade { fill: #000000; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
#seats.searching .search-shade { opacity: 0.72; }
.seat-mark { display: none; pointer-events: none; }
.seat-mark.on { display: inline; }
.seat-mark-ring { fill: none; stroke: #ffffff; filter: drop-shadow(0 0 4px #ffffff); }

/* Track by Issue: a state zoomed in on the map, with its districts. */
.issue-states path, .issue-small-states [data-state] { cursor: pointer; }
.issue-states path { transition: fill 0.4s, stroke 0.4s, opacity 0.4s; }
#issue-map.zoomed .issue-small-states { display: none; }
#issue-map.zoomed .issue-states .other-state { opacity: 0.15; }
#issue-map.zoomed .issue-states path:not(.other-state) { fill-opacity: 0.12; cursor: default; }
.issue-districts path {
  cursor: pointer; /* opens the representative's profile */
  fill: var(--district-color, #15151a);
  fill-opacity: 0.55;
  stroke: #000000;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transition: fill 0.4s, fill-opacity 0.15s;
}
.issue-districts path.no-record { fill: #15151a; }
.issue-districts path:hover, .issue-districts path.lit { fill-opacity: 0.9; stroke: #ffffff; }
.issue-state-panel { margin-top: 14px; }
.issue-state-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.issue-state-head h3 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; }
.issue-state-panel .side-members { max-height: 360px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tip-hint { color: var(--muted); font-size: 0.78rem; }

/* Congress Tracker cards: short official summary under the title. */
.bill-summary { font-size: 0.8rem; line-height: 1.4; color: var(--muted); }
.bill.selected .bill-summary { color: #55565e; }

/* Today's Status (home page). Cards here were requested by the administrator:
   the House / Senate cards, the funding countdown, the world map, and the three
   neon board columns. Everything else floats on the grid. */

.today { padding-top: 28px; }
.today section { margin-top: 40px; }
.today-top > section, .today-stack > section, .board > section { margin-top: 0; }
.today-h { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; margin: 0 0 6px; }
.today .lede { font-size: 0.9rem; }
.session-note { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }

/* Top: chamber cards stacked on the left, the map card on the right half. */
/* The left stack is as tall as the map card: the chamber cards grow to fill it
   (their rows spread out), so there's no empty space under them. */
.today-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.today-stack { display: flex; flex-direction: column; gap: 14px; }
.today-stack .chambers-card { flex: 1; display: flex; flex-direction: column; padding: 0; }
.today-stack .chamber-card { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 14px 18px; }
/* Neon divider between House and Senate, in the border's red-to-blue. */
.today-stack .chamber-card + .chamber-card { position: relative; }
.today-stack .chamber-card + .chamber-card::before {
  content: "";
  position: absolute;
  top: -0.75px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--neon-rep) 44%, var(--neon-dem) 56%);
  box-shadow: -4px 0 10px -1px var(--neon-rep), 4px 0 10px -1px var(--neon-dem);
}
.today-stack .chamber-card .chamber-control { margin-top: auto; }
.today-card {
  position: relative;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgb(14 14 18 / 0.88);
  border: 1px solid #2c2d33;
}
.card-h { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.card-note { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }
.today-date { margin: 0; font-size: 0.78rem; color: var(--muted); }
.hotspots-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
/* The map card is as tall as the chamber stack; its content spreads over it. */
.today-top .hotspots { display: flex; flex-direction: column; }
.today-top .hotspots .hotspot-map-wrap { flex: 1; display: flex; align-items: center; }

/* House and Senate share one card with the toggles' red-blue neon split border. */
.chambers-card {
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgb(14 14 18), rgb(14 14 18)) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  box-shadow: -4px -2px 14px -6px var(--neon-rep), 4px 2px 14px -6px var(--neon-dem);
}
/* Centered caps titles with a red-blue neon glow, like the card's border. */
.chamber-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: #ffffff;
  text-shadow: -3px 0 12px var(--neon-rep), 3px 0 12px var(--neon-dem), 0 0 4px rgb(255 255 255 / 0.6);
}
.chamber-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.session-state { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.session-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--none); flex: none; }
.session-state.live { color: var(--neon-yea); }
.session-state.live .session-dot { background: var(--neon-yea); box-shadow: 0 0 10px var(--neon-yea); animation: session-pulse 1.6s ease-in-out infinite; }
@keyframes session-pulse { 50% { opacity: 0.35; } }
.chamber-control { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 10px; }
.chamber-control .seat-bar { height: 7px; }
.chamber-control .card-note { margin: 0; white-space: nowrap; }
.control-lead { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.pill {
  display: inline-block;
  justify-self: start;
  padding: 0 8px;
  border: 1px solid #3a3b40;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

/* Funding countdown card: only near the deadline. */
.deadline { display: flex; align-items: center; gap: 18px; border-color: var(--neon-orange); box-shadow: 0 0 18px -6px var(--neon-orange), inset 0 0 18px -10px var(--neon-orange); }
.deadline-count { margin: 0; color: var(--neon-orange); font-family: var(--font-head); font-size: 1.1rem; text-shadow: 0 0 16px rgb(255 154 46 / 0.6); white-space: nowrap; }
.deadline-count strong { font-size: 2.4rem; line-height: 1; }
.deadline-what { margin: 0; font-weight: 600; font-size: 0.92rem; }

/* World hotspot map card */
.hotspot-map-wrap { position: relative; margin-top: 8px; }
#hotspot-map { display: block; width: 100%; height: auto; overflow: visible; }
.hm-grid { fill: none; stroke: rgb(255 255 255 / 0.06); stroke-width: 1; }
.hm-land { fill: none; stroke: #6f7a99; stroke-width: 0.8; stroke-linejoin: round; filter: drop-shadow(0 0 2px rgb(157 184 234 / 0.35)); }
.hm-us { stroke: #9db8ea; }
.hm-spot { cursor: pointer; }
.hm-dot { fill: var(--neon-nay); filter: drop-shadow(0 0 4px var(--neon-nay)) drop-shadow(0 0 10px var(--neon-nay)); }
.hm-pulse { fill: none; stroke: var(--neon-nay); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: hm-pulse 2.2s ease-out infinite; }
@keyframes hm-pulse { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }
.hm-hit { fill: transparent; }
.hm-spot text { fill: var(--text); font-family: var(--font-body); font-size: 17px; font-weight: 600; paint-order: stroke; stroke: #0e0e12; stroke-width: 4px; }
.hm-spot:hover .hm-dot, .hm-spot:focus-visible .hm-dot { fill: #ffffff; }
.hm-spot:focus-visible { outline: none; }
.hm-spot:focus-visible text { fill: var(--accent); }
.hotspot-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
a.chip { text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  .hm-pulse, .session-state.live .session-dot { animation: none; }
}

/* The board: three neon-bordered columns, each item on a glowing timeline. */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 64px; }
.board-col {
  --c: var(--accent);
  position: relative;
  padding: 26px 18px 18px;
  border: 1.5px solid var(--c);
  border-radius: 16px;
  box-shadow: 0 0 18px -6px var(--c), inset 0 0 22px -14px var(--c);
}
.board-col.floor { --c: var(--neon-yea); }
.board-col.passed { --c: #3ff0ff; }
.board-col.orders { --c: var(--neon-tie); }
.board-col h2 {
  position: absolute;
  top: -0.8em;
  left: 16px;
  margin: 0;
  padding: 0 10px;
  background: var(--bg);
  color: var(--c);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-shadow: 0 0 10px var(--c);
}
.board-sub { margin: 16px 0 8px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.board-col > div > .board-sub:first-child { margin-top: 0; }
.board-sub { margin-top: 20px; }
.deadline[hidden] { display: none; }
.timeline { margin: 0; padding: 0 0 0 18px; list-style: none; display: grid; gap: 14px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--c), transparent);
  opacity: 0.6;
}
.tl-item { position: relative; display: grid; gap: 3px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--c);
  box-shadow: 0 0 8px var(--c);
}
.tl-item.quiet::before { border-color: var(--none); box-shadow: none; }
.tl-date { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); }
.tl-badge {
  justify-self: start;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.06);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}
a.tl-badge:hover { background: var(--c); color: var(--bg); }
.tl-title { font-size: 0.9rem; line-height: 1.35; }
.tl-item.quiet .tl-title { color: var(--muted); }
.tl-more a { font-size: 0.8rem; color: var(--muted); }
.pill.stage-law { color: var(--bg); background: var(--neon-yea); border-color: var(--neon-yea); box-shadow: 0 0 8px -2px var(--neon-yea); }
.pill.stage-both { color: #3ff0ff; border-color: #3ff0ff; }
.pill.stage-one { color: var(--text); }
.pill.stage-veto { color: var(--neon-nay); border-color: var(--neon-nay); }

/* Votes, momentum, missed votes */
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; }
.today-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.today-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.today-list li { display: grid; gap: 1px; }
.today-list .empty { color: var(--muted); font-size: 0.9rem; }
.today-list a.bill-num { text-decoration: none; }
.today-list a.bill-num:hover { text-decoration: underline; }
.today-item-title { font-size: 0.92rem; line-height: 1.35; }
.momentum-n { color: var(--neon-yea); }
.today-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; margin-top: 12px; }
.today-vote p { margin: 0 0 4px; }
.party-pct-line { display: block; font-size: 0.9rem; margin-top: 4px; }
.party-pct-line .neon-D, .party-pct-line .neon-R { font-weight: 600; font-size: 1.3rem; }
.today-missed { max-height: none; }
.today-missed .side-member { display: grid; grid-template-columns: auto 1fr auto; }
.missed-pct { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--failed); }

@media (max-width: 1000px) {
  .today-top, .board, .today-votes, .today-grid, .today-grid.two { grid-template-columns: minmax(0, 1fr); }
  .board { gap: 40px; }
  .today-grid > section, .today-grid.two > section { margin-top: 32px; }
}

/* Narrow screens: the top bar's tabs scroll sideways instead of widening the page. */
@media (max-width: 1320px) {
  .topbar nav { gap: 18px; }
}
@media (max-width: 1100px) {
  .topbar nav { gap: 12px; }
  .topbar a { font-size: 0.92rem; }
}
@media (max-width: 960px) {
  .topbar nav { gap: 4px; }
  .topbar a { font-size: 0.84rem; }
}
@media (max-width: 560px) {
  .chamber-control { grid-template-columns: auto minmax(0, 1fr); }
  .chamber-control .card-note { grid-column: 1 / -1; }
}

/* Site-wide search, at the right end of the top bar (site-search.js). The field
   has the toggles' neon split border; results are a dropdown (both requested). */
.topbar { position: sticky; }
.site-search { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 20; }
.site-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.site-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 210px;
  padding: 5px 12px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  transition: width 0.2s ease, box-shadow 0.2s;
}
.site-search-field:focus-within { box-shadow: 0 0 14px -2px var(--neon-dem); color: var(--text); }
.site-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.88rem; outline: none; }
.site-search input::placeholder { color: var(--muted); }
.site-search input::-webkit-search-cancel-button { filter: invert(1); }
.site-search-toggle { display: none; padding: 6px; border: 0; border-radius: 50%; background: none; color: #ffffff; cursor: pointer; }
.site-search-toggle svg { width: 20px; height: 20px; }
.site-search-results {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(440px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #3a3b40;
  border-radius: 12px;
  background: #0c0c10;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.7);
  scrollbar-width: thin;
  scrollbar-color: #3a3b40 transparent;
}
.ss-group { margin: 8px 8px 4px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ss-item { display: grid; gap: 1px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.ss-item[aria-selected="true"] { background: rgb(255 255 255 / 0.08); }
.ss-title { font-size: 0.9rem; font-weight: 600; }
.ss-detail { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-loading { margin: 6px 8px; font-size: 0.82rem; color: var(--muted); }

/* Narrower screens: a magnifier at the right; tapping it opens the field over the bar. */
/* Wide screens: the full search field at the right, clear of the tabs. */
@media (min-width: 1321px) {
  .topbar nav { padding-right: 250px; }
}
@media (max-width: 1320px) {
  .topbar nav { padding-right: 52px; }
  .site-search-toggle { display: block; }
  .site-search-field { display: none; }
  .site-search.open { left: 8px; right: 8px; }
  .site-search.open .site-search-toggle { display: none; }
  .site-search.open .site-search-field { display: flex; width: 100%; }
  .site-search.open .site-search-field:focus-within { width: 100%; }
  .site-search.open .site-search-results { width: 100%; }
}

/* Supreme Court (/court/). Justices' rings and cards are colored by general
   alignment: neon orange = conservative, neon teal = progressive. The justice
   cards (3×3) and the rulings/docket table card are requested exceptions to the
   floating layout. */

.neon-con { color: var(--neon-con); text-shadow: 0 0 14px rgb(255 138 61 / 0.55); }
.neon-pro { color: var(--neon-pro); text-shadow: 0 0 14px rgb(46 230 192 / 0.55); }
.court section { margin-top: 40px; }
.court .board > section { margin-top: 0; }

.bench-balance { max-width: 520px; margin: 0 auto 28px; text-align: center; }
.bench-counts { display: flex; justify-content: center; gap: 28px; margin: 0 0 8px; font-weight: 600; }
.bench-counts strong { font-family: var(--font-head); font-size: 1.6rem; margin-right: 4px; }
.align-bar { display: flex; gap: 3px; height: 8px; }
.align-bar span { display: block; height: 100%; flex: 0 1 0; }
.align-bar .con { border-radius: 999px 0 0 999px; background: var(--neon-con); box-shadow: 0 0 10px var(--neon-con); }
.align-bar .pro { border-radius: 0 999px 999px 0; background: var(--neon-pro); box-shadow: 0 0 10px var(--neon-pro); }

.justice-ring { transform: translateY(-4px); }

.justice-ring {
  display: block;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--none);
  background: #000;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.justice-ring img { display: block; width: 100%; height: 100%; object-fit: cover; }
.justice-ring.medium { width: 72px; height: 72px; border-width: 2.5px; }
.justice-ring.conservative { border-color: var(--neon-con); box-shadow: 0 0 14px var(--neon-con), 0 0 30px -6px var(--neon-con), inset 0 0 8px rgb(255 138 61 / 0.5); }
.justice-ring.progressive { border-color: var(--neon-pro); box-shadow: 0 0 14px var(--neon-pro), 0 0 30px -6px var(--neon-pro), inset 0 0 8px rgb(46 230 192 / 0.5); }

/* Inline pills on justice profiles. */
.align-pill { display: inline-block; margin-top: 6px; padding: 1px 10px; border: 1px solid var(--c, currentColor); border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.align-pill.conservative { color: var(--neon-con); border-color: var(--neon-con); }
.align-pill.progressive { color: var(--neon-pro); border-color: var(--neon-pro); }
.court-note { margin-top: 18px; max-width: 85ch; }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { background: rgb(255 255 255 / 0.12); } 100% { background: transparent; } }

/* Map zoom (map-zoom.js): buttons in the map's top-right corner, a hint when a
   plain scroll lands on the map, and a grab cursor once zoomed in. */
.zoom-controls { position: absolute; top: 8px; right: 8px; display: grid; gap: 4px; z-index: 5; }
.zoom-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid #3a3b40;
  border-radius: 8px;
  background: rgb(10 10 14 / 0.85);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.zoom-controls button:hover { border-color: var(--card-border); background: #1c1c22; }
.zoom-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.zoom-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(10 10 14 / 0.9);
  border: 1px solid #3a3b40;
  font-size: 0.8rem;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}
svg.zoomed-in { cursor: grab; }
svg.zoomed-in.panning { cursor: grabbing; }

/* Congress Tracker metrics (bills.js, metrics.json): bipartisanship and productivity cards. */
.congress-metrics { margin: 12px 0 0; }
.metrics-h { margin: 0 0 16px; font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: 0.18em; color: #ffffff;
  text-shadow: -3px 0 12px var(--neon-rep), 3px 0 12px var(--neon-dem), 0 0 4px rgb(255 255 255 / 0.5); }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 20px; }
.metric-card { padding: 18px 20px; border: 1.5px solid transparent; border-radius: 16px;
  background: linear-gradient(rgb(14 14 18), rgb(14 14 18)) padding-box, linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  box-shadow: -4px -2px 14px -8px var(--neon-rep), 4px 2px 14px -8px var(--neon-dem); }
.metric-card h3 { margin: 0 0 4px; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; }
.metric-card > .card-note:first-of-type { margin-top: 0; }
.metric-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.metric-big { font-family: var(--font-head); font-size: 2.2rem; line-height: 1; }
.metric-big small { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); margin-left: 6px; }
.metric-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.neon-bi { color: #c58bff; text-shadow: 0 0 14px rgb(180 92 255 / 0.6); }
.bi-bar { display: flex; height: 8px; gap: 2px; margin: 10px 0 6px; }
.bi-bar span { display: block; height: 100%; }
.bi-bar .bi { background: #b45cff; box-shadow: 0 0 8px #b45cff; border-radius: 999px 0 0 999px; }
.bi-bar .pl { background: linear-gradient(90deg, var(--neon-dem), var(--neon-rep)); border-radius: 0 999px 999px 0; opacity: 0.75; }
.bi-months { display: flex; align-items: flex-end; gap: 2px; height: 46px; margin-top: 10px; }
.bi-months i { flex: 1; min-width: 3px; background: #b45cff; opacity: 0.8; border-radius: 2px 2px 0 0; }
.bi-months i.few { opacity: 0.3; }
.prod-bars { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.prod-bars li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr) 3.4em; gap: 10px; align-items: center; font-size: 0.82rem; }
.prod-track { position: relative; height: 12px; }
.prod-track .total { position: absolute; inset: 0 auto 0 0; border: 1px dashed #4a4b55; border-radius: 4px; }
.prod-track .now { position: absolute; inset: 1px auto 1px 0; border-radius: 3px; background: #6b6d78; }
.prod-bars li.current .prod-track .now { background: var(--neon-yea); box-shadow: 0 0 10px var(--neon-yea); }
.prod-bars li.current { font-weight: 600; }
.prod-bars strong { text-align: right; }
.metric-sub { margin-top: 14px; }
.metric-people { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.metric-people li { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; border-bottom: 1px solid #1f2026; font-size: 0.85rem; min-width: 0; }
.metric-people li > a { color: var(--text); white-space: nowrap; }
.metric-people li > .card-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.metric-people li > strong { margin-left: auto; white-space: nowrap; }
.metric-unity { display: grid; gap: 2px; }
.metric-unity strong { font-family: var(--font-head); font-size: 1.6rem; margin-right: 6px; }
.metric-committees { margin: 12px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; }
.metric-committees li { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr) 5.4em; gap: 10px; align-items: center; font-size: 0.8rem; }
.metric-committees li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-committees strong { text-align: right; }
.prod-track .now.stalled { background: var(--neon-orange); box-shadow: 0 0 8px var(--neon-orange); }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.funnel div { padding: 8px 10px; border-left: 2px solid #2c2d33; }
.funnel strong { display: block; font-family: var(--font-head); font-size: 1.4rem; }
.funnel span { font-size: 0.74rem; color: var(--muted); }

/* Supreme Court (/court/): the bench as one row of nine (progressives left, conservatives
   right, longest-serving at each end) over the balance bar; then rulings and docket as two
   large neon-bordered columns, the main part of the page (requested card layout). */
.wrap.court-wide { max-width: 1500px; }
.court .bench-row { margin-top: 28px; }
.bench-term { margin: 0 0 14px; text-align: center; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bench-seats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.bench-seat { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 14px; color: var(--text); text-decoration: none; text-align: center; transition: background 0.2s; }
.bench-seat:hover, .bench-seat:focus-visible { background: rgb(255 255 255 / 0.05); }
.bench-seat:hover .justice-ring { transform: translateY(-6px) scale(1.05); }
.bench-seat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.justice-ring.bench { width: 76px; height: 76px; border-width: 2.5px; }
.bench-name { font-weight: 600; font-size: 0.92rem; }
.bench-chief { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 999px; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--neon-con); border: 1px solid var(--neon-con); vertical-align: 2px; }
.bench-since { font-size: 0.72rem; color: var(--muted); }
.bench-balance { margin: 10px 0 0; max-width: none; text-align: left; }
.bench-counts { display: flex; justify-content: space-between; margin: 8px 0 0; font-weight: 600; font-size: 0.85rem; }
.bench-counts strong { font-family: var(--font-head); font-size: 1.3rem; margin-right: 4px; }
.align-bar .pro { border-radius: 999px 0 0 999px; }
.align-bar .con { border-radius: 0 999px 999px 0; }

.court-main { margin-top: 36px; }
.court-tools { display: flex; justify-content: center; margin-bottom: 18px; }
.court-find { width: min(100%, 560px); }
.court-find input { width: 100%; }
.court-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.court-col { --c: #c4a7ff; margin: 0 !important; padding: 0 22px 18px; border: 1.5px solid var(--c); border-radius: 18px; background: rgb(14 14 18 / 0.88);
  box-shadow: 0 0 18px -8px var(--c), inset 0 0 22px -16px var(--c); }
.court-col.docket { --c: var(--neon-tie); }
.court-col-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 0 12px; border-bottom: 1px solid #2c2b36; }
.court-col-head h2 { margin: 0; color: var(--c); font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: 0.16em; text-shadow: 0 0 10px var(--c); }
.court-list { margin: 0; padding: 0; list-style: none; }
.court-list > li { padding: 16px 0; border-bottom: 1px solid #1f1f27; scroll-margin-top: 90px; }
.court-list > li:last-child { border-bottom: 0; }
.court-list h3 { margin: 4px 0 6px; font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.court-list h3 a { color: var(--text); text-decoration: none; }
.court-list h3 a:hover { color: var(--c, var(--accent)); }
.ruling-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 0.78rem; color: var(--muted); }
.ruling-holding { margin: 0; font-size: 0.92rem; line-height: 1.5; color: #d6d6dc; }
.docket-desc { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--muted); }
.docket-note { margin: 12px 0 0; }
.court-empty { color: var(--muted); }
.court-more { margin-top: 6px; }
.ruling-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.ruling-split { padding: 1px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid #4a4a55; color: var(--text); }
.ruling-vote.unanimous .ruling-split { border-color: var(--neon-yea); color: var(--neon-yea); }
.ruling-vote.divided .ruling-split { border-color: #c4a7ff; color: #c4a7ff; }
.ruling-rings { display: flex; gap: 3px; }
.ruling-vs { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 2px 0 6px; }
.justice-ring.tiny { width: 26px; height: 26px; border-width: 1.5px; transform: none; box-shadow: 0 0 6px -1px currentColor; }
.justice-ring.tiny.conservative { box-shadow: 0 0 7px -1px var(--neon-con); }
.justice-ring.tiny.progressive { box-shadow: 0 0 7px -1px var(--neon-pro); }

/* Justice profile (#justice/<key>), on the bill view's styles. */
.jv-head { display: flex; align-items: center; gap: 22px; }
.justice-ring.large { width: 120px; height: 120px; border-width: 3px; transform: none; }
.jv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 30px; }
.jv-stats div { padding: 12px 14px; border-left: 2px solid #2c2d33; }
.jv-stats strong { display: block; font-family: var(--font-head); font-size: 1.8rem; }
.jv-stats span { font-size: 0.78rem; color: var(--muted); }
.jv-votes { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.jv-votes li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #1f2026; font-size: 0.85rem; }
.jv-votes a { color: var(--text); }
.jv-vote { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; padding: 1px 8px; border-radius: 999px; border: 1px solid; }
.jv-vote.yea { color: var(--neon-yea); border-color: var(--neon-yea); }
.jv-vote.nay { color: var(--neon-nay); border-color: var(--neon-nay); }

@media (max-width: 1100px) {
  .court-cols { grid-template-columns: minmax(0, 1fr); }
  .bench-seats { grid-template-columns: repeat(9, minmax(64px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}
@media (max-width: 700px) {
  .justice-ring.bench { width: 54px; height: 54px; }
  .bench-name { font-size: 0.78rem; }
  .bench-since { display: none; }
  .jv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jv-head { flex-direction: column; align-items: flex-start; }
}

/* Chamber cards: last vote and this Congress's numbers fill the card. */
.chamber-notes { display: flex; flex-wrap: wrap; gap: 0 18px; }
.chamber-last { display: grid; gap: 3px; padding: 8px 0; border-top: 1px solid #2c2d33; border-bottom: 1px solid #2c2d33; }
.chamber-last-what { font-size: 0.88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.chamber-last .tl-badge { --c: var(--accent); }
.chamber-stats { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 0.8rem; color: var(--muted); }
.chamber-stats strong { color: var(--text); font-weight: 600; }
.chamber-stats a { color: var(--muted); text-decoration: none; }
.chamber-stats a:hover strong { color: var(--accent); }

/* Supreme Court case view (case-view.js), built on the bill view's styles. */
.bv-step-date { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 400; }
.cv-holding { font-size: 1.05rem; line-height: 1.5; }
/* The question before the Court (from Oyez), first in the case view. */
.cv-question { padding: 14px 18px; border-left: 3px solid #c4a7ff; border-radius: 0 12px 12px 0; background: rgb(196 167 255 / 0.07);
  font-size: 1.05rem; line-height: 1.55; box-shadow: -4px 0 14px -8px #c4a7ff; }
.cv-credit { margin: -20px 0 36px; font-size: 0.8rem; color: var(--muted); }
.cv-credit a { color: var(--accent); }
.cv-vote-chart .bv-vote-box { min-height: 0; }
.cv-justices { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 10px; }
.cv-justice { display: grid; justify-items: center; gap: 4px; font-size: 0.75rem; font-weight: 600; color: var(--text); text-decoration: none; }
.cv-justice:hover span:last-child { color: var(--accent); }
.justice-ring.small { width: 46px; height: 46px; border-width: 2px; }
.cv-opinions li { font-size: 0.88rem; }
.cv-docs { display: block; margin-top: 2px; font-size: 0.78rem; }
.cv-docs a { color: var(--accent); }
.cv-docket.collapsed > li:nth-child(n+16) { display: none; }
.expanded > .cv-docket.collapsed > li { display: grid; }

/* Election Tracker (/elections/). Forecasts from ElectIt (credited on the page).
   The chamber cards, race cards and map card are requested card layouts. */
.elections-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.el-countdown { margin: 0; color: var(--neon-orange); font-family: var(--font-head); font-size: 1.1rem; text-shadow: 0 0 16px rgb(255 154 46 / 0.55); }
.el-countdown strong { font-size: 2.4rem; margin-right: 6px; }
/* Top: the House and Senate cards stacked at the left, the national race map beside them. */
.el-top { display: grid; grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.7fr); gap: 24px; margin-top: 28px; align-items: stretch; }
.el-control { display: grid; gap: 20px; align-content: start; }
.el-chamber {
  display: grid;
  gap: 10px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgb(14 14 18), rgb(14 14 18)) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  box-shadow: -4px -2px 14px -6px var(--neon-rep), 4px 2px 14px -6px var(--neon-dem);
}
.el-odds { display: flex; justify-content: space-between; margin: 4px 0 0; font-size: 0.95rem; }
.el-odds strong { font-family: var(--font-head); font-size: 2.2rem; margin-right: 6px; }
.el-odds-bar .dem { border-radius: 999px 0 0 999px; }
.el-odds-bar .rep { border-radius: 0 999px 999px 0; }
.el-range { width: 100%; height: 56px; overflow: visible; }
.el-range .axis { fill: #1f2026; }
.el-range .band { fill: var(--neon-dem); fill-opacity: 0.45; stroke: var(--neon-dem); stroke-width: 1.2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px var(--neon-dem)); }
.el-range line.need { stroke: #ffffff; stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.el-range line.median { stroke: #ffffff; stroke-width: 3; vector-effect: non-scaling-stroke; }
.el-range text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.el-ballot { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }
.el-ballot .neon-D, .el-ballot .neon-R { font-weight: 600; }

.el-section { margin-top: 48px; }
.el-h { margin: 0 0 6px; font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: 0.18em; color: #ffffff;
  text-shadow: -3px 0 12px var(--neon-rep), 3px 0 12px var(--neon-dem), 0 0 4px rgb(255 255 255 / 0.5); }


.neon-tie { color: var(--neon-tie); text-shadow: 0 0 14px rgb(255 210 63 / 0.6); }

/* The national race map: House districts, or states for Senate / governors; current holders or the forecast. */
.el-map-card { margin: 0; padding: 14px 16px; border-radius: 16px; border: 1px solid #2c2d33; background: rgb(14 14 18 / 0.88);
  display: flex; flex-direction: column; min-width: 0; }
.el-map-bar { display: flex; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.el-map-head { display: flex; align-items: baseline; gap: 14px; margin-top: 12px; min-height: 1.6em; }
.el-map-head .back-button { margin: 0; padding: 0; }
.el-map-title { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--text); }
.el-map-wrap { position: relative; margin-top: 6px; flex: 1; display: flex; align-items: center; }
#el-map { display: block; width: 100%; height: auto; }
#el-map path { vector-effect: non-scaling-stroke; transition: opacity 0.4s ease, fill 0.25s, fill-opacity 0.25s, stroke 0.25s; }
.el-state-fill { fill: var(--fill); fill-opacity: var(--op); stroke: var(--fill); stroke-width: 1; cursor: pointer; }
.el-state-fill.no-race { stroke: #3a3b40; }
.el-districts path { fill: transparent; stroke: rgb(255 255 255 / 0.12); stroke-width: 0.4; cursor: pointer; }
#el-map.kind-house .el-state-fill { fill: transparent; stroke: none; }
#el-map.kind-house .el-districts path { fill: var(--fill); fill-opacity: var(--op); stroke: #000; stroke-width: 0.6; }
#el-map:not(.kind-house):not(.zoomed) .el-districts path { stroke: transparent; }
.el-districts path:hover, .el-state-fill:hover { fill-opacity: calc(var(--op) + 0.15); }
#el-map.kind-house .el-districts path:hover { stroke: #ffffff; stroke-width: 1.4; }
.el-states path { fill: none; stroke: rgb(255 255 255 / 0.55); stroke-width: 0.8; pointer-events: none; }
#el-map .other-state { opacity: 0.18; }
#el-map.zoomed .el-states path:not(.other-state) { stroke: #ffffff; stroke-width: 1.4; }
.el-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.8rem; color: var(--muted); }
.el-legend li { display: flex; align-items: center; gap: 6px; }
.el-legend strong { color: var(--text); }
.el-legend i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--fill) calc(var(--op) * 100%), #000); border: 1px solid var(--fill); }
.el-map-card > .card-note { margin: 8px 0 0; }

.el-find input { width: 15em; }

.el-credit { margin-top: 48px; padding: 18px 22px; border-radius: 16px; border: 1px solid #2c2d33; background: rgb(14 14 18 / 0.88); max-width: 980px; }
.el-credit p { margin: 8px 0 0; line-height: 1.55; }

@media (max-width: 1100px) {
  .el-top { grid-template-columns: minmax(0, 1fr); }
  .el-control { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
}
@media (max-width: 560px) {
    }

/* Election Tracker: investigate a race (search + quick picks; the race cards were removed). */
.el-inv-search { position: relative; max-width: 640px; margin-top: 12px; }
.el-inv-search .el-find input { width: 100%; }
.el-inv-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; margin: 0; padding: 6px; list-style: none;
  border: 1px solid #3a3b40; border-radius: 12px; background: #0c0c10; box-shadow: 0 12px 40px rgb(0 0 0 / 0.7); max-height: 420px; overflow-y: auto; }
.el-inv-results .empty { padding: 8px; color: var(--muted); }
.el-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 8px 40px; margin-top: 8px; }
.el-pick-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.el-pick-list a, .el-inv-results a { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.88rem; }
.el-pick-list a:hover, .el-inv-results a:hover, .el-inv-results a:focus-visible { background: #17181d; }
.el-pick-id { font-weight: 600; }
.el-pick-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-pick-odds { font-weight: 600; white-space: nowrap; }
.el-pick-odds.neon-money { color: var(--neon-yea); }
/* "Click for the full race": white, in a pill with the toggles' red/blue split neon border. */
.tooltip .tip-hint {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 12px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #ffffff;
  background:
    linear-gradient(#0c0c10, #0c0c10) padding-box,
    linear-gradient(135deg, var(--neon-rep) 44%, var(--neon-dem) 56%) border-box;
  box-shadow: -3px -1px 10px -3px var(--neon-rep), 3px 1px 10px -3px var(--neon-dem);
  text-shadow: 0 0 8px rgb(255 255 255 / 0.6);
}

/* Race view (race-view.js): the bill view's layout plus these pieces. */
.rv-cands { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 16px; }
.rv-cand { display: flex; align-items: center; gap: 12px; }
.rv-cand p { margin: 0; }
.rv-cand-name { font-weight: 600; font-size: 1.05rem; }
.rv-cand-name a { color: inherit; }
.rv-ring { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 2.5px solid; overflow: hidden; display: grid; place-items: center;
  font-weight: 600; color: var(--muted); background: #0c0c10; text-decoration: none; }
.rv-ring img { width: 100%; height: 100%; object-fit: cover; }
.rv-ring.D { border-color: var(--neon-dem); box-shadow: 0 0 12px var(--neon-dem), inset 0 0 6px rgb(43 127 255 / 0.5); }
.rv-ring.R { border-color: var(--neon-rep); box-shadow: 0 0 12px var(--neon-rep), inset 0 0 6px rgb(255 42 79 / 0.5); }
.rv-ring.empty { box-shadow: none; opacity: 0.8; }
.rv-odds { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.rv-odds strong { font-family: var(--font-head); font-size: 2rem; margin-right: 6px; }
.rv-rating { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; }
.rv-margin { margin: 12px 0 0; }
.rv-total { margin-bottom: 18px; }
.rv-outside-line { margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); }
/* Race view side column: one card each for how the place voted, past results and polls;
   sources across the bottom. */
.rv-side { display: grid; gap: 18px; align-content: start; }
.rv-card { padding: 16px 18px; border: 1px solid #2c2d33; border-radius: 14px; background: rgb(14 14 18 / 0.88); }
.rv-card > h2 { margin: 0 0 10px; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.rv-card .bv-note { margin: 10px 0 0; }
.rv-polls { margin: 0; padding: 0; list-style: none; max-height: 520px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3b40 transparent; }
.rv-polls li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 7px 0; border-bottom: 1px solid #1f2026; font-size: 0.85rem; }
.rv-polls strong { text-shadow: none; align-self: center; grid-row: span 2; }
.rv-poll-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-poll-when { font-size: 0.74rem; color: var(--muted); }
.rv-onecol { grid-template-columns: minmax(0, 860px); }
.rv-sources-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid #2c2d33; }
.rv-sources-foot h2 { margin: 0 0 8px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); }
.rv-sources-foot ul { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.rv-funders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px 28px; }
.rv-funder p { margin: 0 0 4px; font-size: 0.85rem; }
.rv-funder p a { color: var(--text); }
.rv-funder .rv-list li { font-size: 0.82rem; padding: 4px 0; }
.rv-outside-line strong { color: var(--text); }
.rv-total > p:first-child { margin: 0 0 10px; }
.rv-total > p:first-child strong { font-family: var(--font-head); font-size: 1.6rem; margin-right: 4px; }
.rv-h3, .rv-money-col h4 { margin: 18px 0 6px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rv-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rv-table th { text-align: left; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid #2c2d33; }
.rv-table td { padding: 7px 8px; border-bottom: 1px solid #1f2026; }
.rv-table td.neon-D, .rv-table td.neon-R, .rv-table td.neon-tie { font-weight: 600; text-shadow: none; }
.rv-lags, .rv-history, .rv-list, .rv-bars, .rv-legend { margin: 0; padding: 0; list-style: none; }
.rv-lags li, .rv-history li, .rv-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid #1f2026; font-size: 0.88rem; }
.rv-lags strong, .rv-history strong { text-shadow: none; }
.rv-history time { font-weight: 600; width: 3.2em; flex: none; }
.rv-history li > span { flex: 1; }
.rv-list li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rv-list li > strong { flex: none; }
.rv-list .tag { flex: none; }
.rv-outside li { justify-content: flex-start; }
.rv-outside li > strong { margin-left: auto; }
.rv-outside li.rv-primary { opacity: 0.75; }
.rv-outside .tag:not(.D):not(.R) { color: var(--muted); }
.rv-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rv-money-col { padding: 14px 16px; border-radius: 14px; border: 1.5px solid; background: rgb(14 14 18 / 0.88); min-width: 0; }
.rv-money-col.D { border-color: var(--neon-dem); box-shadow: 0 0 14px -6px var(--neon-dem); }
.rv-money-col.R { border-color: var(--neon-rep); box-shadow: 0 0 14px -6px var(--neon-rep); }
.rv-money-col > h3 { margin: 0 0 10px; font-size: 1.05rem; }
.rv-money-col p { margin: 6px 0 0; font-size: 0.82rem; }
.rv-money-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rv-money-big strong { display: block; font-family: var(--font-head); font-size: 1.5rem; }
.rv-money-big span { font-size: 0.75rem; color: var(--muted); }
.rv-sources { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; }
.rv-sources span { flex: 0 1 0; background: var(--c); box-shadow: 0 0 8px var(--c); }
.rv-legend { display: grid; gap: 3px; margin-top: 8px; font-size: 0.8rem; }
.rv-legend li { display: flex; align-items: center; gap: 6px; }
.rv-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.rv-legend strong { margin-left: auto; }
.rv-bars li { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 4.2em; gap: 8px; align-items: center; font-size: 0.8rem; padding: 2px 0; }
.rv-bars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-bars i { display: block; height: 6px; width: var(--w); border-radius: 999px; background: currentColor; }
.rv-money-col.D .rv-bars i { color: var(--neon-dem); box-shadow: 0 0 6px var(--neon-dem); }
.rv-money-col.R .rv-bars i { color: var(--neon-rep); box-shadow: 0 0 6px var(--neon-rep); }
.rv-bars strong { text-align: right; }
.rv-instate { margin: 0 0 6px; }
.rv-loading { margin-top: 12px; }
@media (max-width: 900px) {
  .rv-money { grid-template-columns: minmax(0, 1fr); }
}

/* Track by Issue: too few members with a record to give percentages. */
.strength-thin { margin: 6px 0 8px; font-family: var(--font-head); font-size: 1.4rem; color: var(--muted); }
.tri-bar.thin { opacity: 0.35; filter: grayscale(0.6); }

/* Track by Issue: each bill's state (counts / pending / inactive). */
.bill-state { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.bill-state.passed, .bill-state.rejected { color: var(--neon-yea); }
.bill-state.inactive { color: #6b6d75; }
.tab-n { opacity: 0.7; font-weight: 400; margin-left: 2px; }
