/* ==========================================================================
   DEMOCRATIC SOCIALISTS OF AMERICA (DSA)
   Congressional & Electoral Legislative Scorecard
   Compliant with Official DSA Design Tokens & Editorial Guidelines
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  /* Official DSA Brand Colors */
  --dsa-red: #EC1F27;
  --dsa-red-hover: #D3151D;
  --dsa-red-dark: #B8141B;
  --dsa-red-subtle: #FFF1F2;
  --dsa-red-light: #FEE2E2;

  --dsa-black: #1A1A1A;
  --dsa-black-muted: #2E2E2E;
  --dsa-gray-dark: #4B5563;
  --dsa-gray-med: #9CA3AF;
  --dsa-gray-light: #E5E7EB;
  --dsa-gray-subtle: #F3F4F6;
  --dsa-white: #FFFFFF;

  /* Surfaces */
  --canvas-bg: #F8F7F4;
  --canvas-card: #FFFFFF;
  --canvas-card-alt: #F4F2EC;
  --canvas-header: #14171A;

  /* Grades */
  --grade-aplus: #15803D;
  --grade-aplus-bg: #DCFCE7;
  --grade-a: #16A34A;
  --grade-a-bg: #DCFCE7;
  --grade-aminus: #22C55E;
  --grade-aminus-bg: #F0FDF4;
  --grade-b: #2563EB;
  --grade-b-bg: #EFF6FF;
  --grade-c: #D97706;
  --grade-c-bg: #FEF3C7;
  --grade-d: #EA580C;
  --grade-d-bg: #FFEDD5;
  --grade-f: #DC2626;
  --grade-f-bg: #FEE2E2;

  /* Domain Accents */
  --domain-labor: #16A34A;
  --domain-health: #0284C7;
  --domain-housing: #7C3AED;
  --domain-climate: #059669;
  --domain-peace: #EA580C;
  --domain-economy: #D97706;
  --domain-justice: #4F46E5;

  /* Typography */
  --font-display: "Space Grotesk", "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Neo-Brutalist & Editorial Borders / Shadows */
  --border-thick: 2px solid var(--dsa-black);
  --border-red: 2px solid var(--dsa-red);
  --border-light: 1px solid var(--dsa-gray-light);
  --shadow-solid: 4px 4px 0px var(--dsa-black);
  --shadow-solid-sm: 2px 2px 0px var(--dsa-black);
  --shadow-solid-red: 4px 4px 0px var(--dsa-red);
  --shadow-solid-lg: 6px 6px 0px var(--dsa-black);
  --shadow-hover: 6px 6px 0px var(--dsa-black);

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --container-max: 1320px;
  --header-height: 72px;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--canvas-bg);
  color: var(--dsa-black);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--canvas-header);
  color: var(--dsa-white);
  border-bottom: 3px solid var(--dsa-red);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--dsa-white);
  flex-shrink: 0;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--dsa-red);
  padding: 2px;
  border: 2px solid var(--dsa-white);
  box-shadow: var(--shadow-solid-sm);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: var(--dsa-red);
  color: var(--dsa-white);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--dsa-gray-med);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dsa-gray-light);
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--dsa-white);
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--dsa-red);
  color: var(--dsa-white);
  padding: 0.5rem 1rem;
  border: 2px solid var(--dsa-white);
  box-shadow: 2px 2px 0px var(--dsa-white);
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--dsa-white);
  background: var(--dsa-red-hover);
}

/* --------------------------------------------------------------------------
   4. Hero Banner & Methodology Announcement
   -------------------------------------------------------------------------- */
.hero-section {
  background: linear-gradient(180deg, #1A1D20 0%, #111316 100%);
  color: var(--dsa-white);
  padding: 3.5rem 0 3rem;
  border-bottom: 2px solid var(--dsa-black);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 100%;
  background: radial-gradient(circle, rgba(236, 31, 39, 0.12) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: center;
  gap: 2.75rem;
  margin-bottom: 2rem;
}

.hero-content {
  min-width: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-artwork-frame {
  width: 100%;
  max-width: 520px;
  background: #14171A;
  border: 2px solid #2D333B;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(236, 31, 39, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-artwork-frame:hover {
  transform: translateY(-2px);
  border-color: var(--dsa-red);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.55), 0 0 36px rgba(236, 31, 39, 0.28);
}

.hero-crowd-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(236, 31, 39, 0.2);
  border: 1px solid var(--dsa-red);
  color: #FCA5A5;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hero-title span {
  color: var(--dsa-red);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #D1D5DB;
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Methodology Callout Card */
.methodology-callout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 4px solid var(--dsa-red);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
}

.methodology-text h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dsa-white);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.methodology-text p {
  font-size: 0.875rem;
  color: #9CA3AF;
  line-height: 1.45;
}

.methodology-link-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dsa-white);
  background: rgba(236, 31, 39, 0.9);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--dsa-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.methodology-link-btn:hover {
  background: var(--dsa-red);
  transform: translateY(-1px);
}

/* Live Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: #1E2328;
  border: 2px solid #2D333B;
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  transition: all 0.2s ease;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.4);
}

.stat-card:hover {
  border-color: var(--dsa-red);
  transform: translateY(-2px);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--dsa-white);
  line-height: 1;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-value.highlight-red {
  color: var(--dsa-red);
}

.stat-value.highlight-green {
  color: #34D399;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   5. Interactive View Toolbar & Controls
   -------------------------------------------------------------------------- */
.control-hub-section {
  background: var(--canvas-card-alt);
  border-bottom: 2px solid var(--dsa-black);
  padding: 1.25rem 0;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.control-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* View Mode Toggles (List vs Map vs Bills) */
.view-mode-tabs {
  display: inline-flex;
  background: var(--dsa-white);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid-sm);
  padding: 3px;
  gap: 3px;
}

.view-tab-btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dsa-black);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.view-tab-btn:hover {
  background: var(--dsa-gray-subtle);
}

.view-tab-btn.active {
  background: var(--dsa-black);
  color: var(--dsa-white);
}

/* Search Box */
.search-box-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-input {
  width: 100%;
  height: 42px;
  background: var(--dsa-white);
  border: var(--border-thick);
  box-shadow: var(--shadow-solid-sm);
  border-radius: var(--radius-sm);
  padding: 0 2.5rem 0 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dsa-black);
  outline: none;
  transition: all 0.15s ease;
}

.search-input:focus {
  border-color: var(--dsa-red);
  box-shadow: 3px 3px 0px var(--dsa-red);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dsa-gray-dark);
  font-size: 1.1rem;
  padding: 4px;
  line-height: 1;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

/* Filter Controls Row */
.filter-controls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-select {
  height: 38px;
  background: var(--dsa-white);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  padding: 0 2rem 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dsa-black);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem;
  box-shadow: var(--shadow-solid-sm);
  transition: all 0.15s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--dsa-red);
}

.reset-filters-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dsa-red);
  background: var(--dsa-red-subtle);
  border: 1px solid var(--dsa-red);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.reset-filters-btn:hover {
  background: var(--dsa-red);
  color: var(--dsa-white);
}

.active-count-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--dsa-gray-dark);
  margin-left: auto;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Main Content Area & Politician Grid (List View)
   -------------------------------------------------------------------------- */
.main-scorecard-section {
  padding: 2.5rem 0 4rem;
  flex: 1;
}

.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Politician Card */
.member-card {
  background: var(--canvas-card);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.member-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--dsa-black);
}

.member-card.featured-spotlight {
  border: 3px solid var(--dsa-red);
  box-shadow: var(--shadow-solid-red);
}

.spotlight-banner {
  background: var(--dsa-red);
  color: var(--dsa-white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  padding: 0.3rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-top-media {
  position: relative;
  height: 220px;
  background: #181B1F;
  overflow: hidden;
}

.card-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

.member-card:hover .card-portrait-img {
  transform: scale(1.03);
}

.chamber-badge-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(20, 23, 26, 0.9);
  color: var(--dsa-white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.grade-badge-float {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
  border: 2px solid var(--dsa-black);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.grade-badge-float .grade-percent {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 1px;
}

/* Card Body */
.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.member-header-info {
  margin-bottom: 0.75rem;
}

.member-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dsa-black);
  margin-bottom: 0.25rem;
}

.member-district-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--dsa-gray-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Status / Affiliation Pill */
.affiliation-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
  border: 1px solid transparent;
  width: fit-content;
}

.affiliation-pill.dsa-member {
  background: var(--dsa-red-subtle);
  color: var(--dsa-red-dark);
  border-color: var(--dsa-red);
}

.affiliation-pill.dsa-ally {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #93C5FD;
}

.affiliation-pill.establishment {
  background: #FEF3C7;
  color: #B45309;
  border-color: #FCD34D;
}

.affiliation-pill.anti-labor {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FCA5A5;
}

/* Alignment Progress Bar */
.alignment-ratio-box {
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-gray-light);
  border-radius: var(--radius-xs);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.alignment-text-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 8px;
  background: var(--dsa-gray-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Badges List */
.tags-scroll-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: var(--dsa-gray-subtle);
  color: var(--dsa-black-muted);
  border: 1px solid var(--dsa-gray-light);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.card-cta-btn {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  padding: 0.65rem;
  background: var(--dsa-black);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-black);
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.member-card:hover .card-cta-btn {
  background: var(--dsa-red);
  border-color: var(--dsa-red);
}

/* --------------------------------------------------------------------------
   7. Interactive US Map View
   -------------------------------------------------------------------------- */
.map-view-container {
  display: none;
  background: var(--dsa-white);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.map-view-container.active {
  display: block;
}

.map-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--dsa-gray-light);
}

.map-title-area h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.map-title-area p {
  font-size: 0.95rem;
  color: var(--dsa-gray-dark);
}

/* Map Legend */
.map-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--dsa-black);
}

.map-svg-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

#us-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* State Path SVG Styles */
.state-path, .state-group path {
  fill: #E2E8F0;
  stroke: #FFFFFF;
  stroke-width: 1.5;
  transition: all 0.2s ease;
  cursor: pointer;
}

.state-path:hover, .state-group:hover path {
  opacity: 0.85;
  stroke: var(--dsa-black);
  stroke-width: 2.5;
}

.state-path.selected, .state-group.selected path {
  stroke: var(--dsa-black);
  stroke-width: 3;
}

/* State colors based on score tiers */
.state-tier-aplus { fill: #15803D !important; }
.state-tier-a { fill: #16A34A !important; }
.state-tier-b { fill: #2563EB !important; }
.state-tier-c { fill: #D97706 !important; }
.state-tier-d { fill: #EA580C !important; }
.state-tier-f { fill: #DC2626 !important; }
.state-tier-none { fill: #E5E7EB !important; }

/* Map Tooltip */
.map-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: var(--dsa-black);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-white);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
  border-radius: var(--radius-xs);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  max-width: 280px;
  display: none;
  backdrop-filter: blur(4px);
}

.tooltip-state-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--dsa-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tooltip-member-row {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #D1D5DB;
  margin-top: 0.25rem;
  border-top: 1px solid #374151;
  padding-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   8. Landmark Legislation Directory View
   -------------------------------------------------------------------------- */
.bills-view-container {
  display: none;
  margin-bottom: 3rem;
}

.bills-view-container.active {
  display: block;
}

.bills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

.bill-card {
  background: var(--canvas-card);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.bill-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.bill-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bill-number-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--dsa-black);
  color: var(--dsa-white);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}

.bill-domain-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-gray-light);
}

.bill-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dsa-black);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.bill-desc {
  font-size: 0.875rem;
  color: var(--dsa-black-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.bill-dsa-callout {
  background: var(--dsa-red-subtle);
  border-left: 3px solid var(--dsa-red);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-xs);
  margin-bottom: 1rem;
}

.bill-dsa-callout-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--dsa-red-dark);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.bill-dsa-callout-text {
  font-size: 0.8rem;
  color: #7F1D1D;
  line-height: 1.4;
}

.bill-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dsa-gray-dark);
  border-top: 1px solid var(--dsa-gray-light);
  padding-top: 0.75rem;
}

.bill-link {
  color: var(--dsa-red);
  font-weight: 700;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   9. Methodology View
   -------------------------------------------------------------------------- */
.methodology-view-container {
  display: none;
  background: var(--dsa-white);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.methodology-view-container.active {
  display: block;
}

.methodology-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.methodology-article h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.methodology-article p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--dsa-black-muted);
  margin-bottom: 1.5rem;
}

.methodology-article h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 1.75rem 0 0.75rem;
  color: var(--dsa-black);
}

.scale-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 1rem;
  border: var(--border-thick);
}

.scale-table th, .scale-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--dsa-gray-light);
  text-align: left;
}

.scale-table th {
  background: var(--dsa-black);
  color: var(--dsa-white);
}

/* --------------------------------------------------------------------------
   10. Deep Politician Dossier Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 18, 22, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.dossier-modal {
  background: var(--dsa-white);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: 10px 10px 0px var(--dsa-black);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 36px;
  height: 36px;
  background: var(--dsa-black);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-white);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: var(--dsa-red);
  transform: rotate(90deg);
}

.modal-scrollable-body {
  overflow-y: auto;
  padding: 2rem;
}

/* Dossier Header */
.dossier-hero {
  display: flex;
  gap: 2rem;
  border-bottom: 2px solid var(--dsa-gray-light);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.dossier-portrait-wrap {
  position: relative;
  width: 180px;
  height: 220px;
  flex-shrink: 0;
  border: var(--border-thick);
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: var(--shadow-solid-sm);
}

.dossier-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dossier-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dossier-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.dossier-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--dsa-black);
  line-height: 1.1;
}

.dossier-grade-box {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  border: 3px solid var(--dsa-black);
  box-shadow: 3px 3px 0px var(--dsa-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}

.dossier-grade-box .sub-pct {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.dossier-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--dsa-gray-dark);
  margin-bottom: 1rem;
}

.dossier-meta-item {
  background: var(--canvas-card-alt);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--dsa-gray-light);
}

.dossier-bio {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--dsa-black-muted);
  margin-bottom: 1rem;
}

.pac-ethics-box {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.pac-ethics-box.clean {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.pac-ethics-box.dirty {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Domain Score Gauges */
.dossier-domains-section {
  margin-bottom: 2rem;
}

.section-heading-sm {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.domain-bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.domain-gauge-card {
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-gray-light);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.85rem;
}

.domain-gauge-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* Bill By Bill Voting Record Table */
.voting-record-section {
  border-top: 2px solid var(--dsa-gray-light);
  padding-top: 1.75rem;
}

.record-controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.record-search-input {
  flex: 1;
  max-width: 320px;
  height: 36px;
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-black);
  border-radius: var(--radius-xs);
  padding: 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.vote-bills-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.vote-bills-table th {
  background: var(--dsa-black);
  color: var(--dsa-white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  text-align: left;
}

.vote-bills-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--dsa-gray-light);
  vertical-align: top;
}

.vote-bills-table tr:hover {
  background: var(--canvas-card-alt);
}

.vote-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  white-space: nowrap;
}

.vote-status-badge.aligned {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.vote-status-badge.not-aligned {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

/* Dossier Footer / Action Bar */
.dossier-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--dsa-gray-light);
  padding: 1rem 2rem;
  background: var(--canvas-card-alt);
}

.share-action-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  background: var(--dsa-white);
  border: var(--border-thick);
  box-shadow: var(--shadow-solid-sm);
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.share-action-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--dsa-black);
}

/* --------------------------------------------------------------------------
   11. Toast Notifications & Alerts
   -------------------------------------------------------------------------- */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: var(--dsa-black);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-red);
  box-shadow: 4px 4px 0px var(--dsa-red);
  border-radius: var(--radius-xs);
  padding: 0.85rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   12. Site Footer (America First Pattern with DSA Branding)
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  border-top: 3px solid var(--dsa-red);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

.footer-signup-pane {
  background: var(--dsa-red);
  color: var(--dsa-white);
  padding: 3.5rem clamp(1.5rem, 5vw, 4rem);
}

.footer-signup-pane h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.footer-signup-pane p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: #FEE2E2;
}

.signup-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
}

.signup-input {
  flex: 1;
  height: 48px;
  background: var(--canvas-bg);
  border: 2px solid var(--dsa-black);
  border-radius: var(--radius-xs);
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--dsa-black);
  outline: none;
}

.signup-submit-btn {
  height: 48px;
  background: var(--dsa-black);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-black);
  border-radius: var(--radius-xs);
  padding: 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.signup-submit-btn:hover {
  background: var(--dsa-white);
  color: var(--dsa-black);
}

.footer-links-pane {
  background: #E5E7EB;
  color: var(--dsa-black);
  padding: 3.5rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.footer-nav-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--dsa-black);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-list a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--dsa-black-muted);
  transition: color 0.15s ease;
}

.footer-links-list a:hover {
  color: var(--dsa-red);
  text-decoration: underline;
}

.footer-bottom-bar {
  background: #111316;
  color: #9CA3AF;
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid #1F242C;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.bottom-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   13. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-artwork-frame {
    max-width: 480px;
    margin: 0 auto;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .dossier-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .dossier-portrait-wrap {
    width: 140px;
    height: 175px;
  }

  .dossier-title-row {
    flex-direction: column;
    align-items: center;
  }

  .dossier-meta-list {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .hero-section {
    padding: 2.5rem 0 2rem;
  }

  .methodology-callout {
    flex-direction: column;
    align-items: flex-start;
  }

  .control-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .view-mode-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .view-tab-btn {
    flex: 1;
    justify-content: center;
  }

  .signup-form {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   14. Live Auto-Update Pipeline & Sync Bar
   -------------------------------------------------------------------------- */
.auto-update-bar {
  background: #14171A;
  color: var(--dsa-white);
  border-bottom: 2px solid var(--dsa-black);
  padding: 0.65rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.update-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pipeline-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pipeline-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pipeline-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--dsa-white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pipeline-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--dsa-white);
  transform: translateY(-1px);
}

.pipeline-btn.highlight {
  background: var(--dsa-red);
  border-color: var(--dsa-red);
  color: var(--dsa-white);
}

.pipeline-btn.highlight:hover {
  background: var(--dsa-red-hover);
}

.pipeline-btn.subtle {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: #9CA3AF;
}

.pipeline-btn.subtle:hover {
  color: #F87171;
  border-color: #F87171;
}

/* Add Bill Form Modal */
.form-modal-card {
  background: var(--dsa-white);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: 10px 10px 0px var(--dsa-black);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--dsa-black);
}

.form-input, .form-textarea, .form-select-custom {
  width: 100%;
  background: var(--canvas-card-alt);
  border: 2px solid var(--dsa-black);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select-custom:focus {
  border-color: var(--dsa-red);
  background: var(--dsa-white);
  box-shadow: 3px 3px 0px var(--dsa-red);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-submit-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 2px solid var(--dsa-gray-light);
  padding-top: 1.25rem;
}

/* ==========================================================================
   V3 — Verified dataset UI additions
   ========================================================================== */

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  background: var(--dsa-white);
  color: var(--dsa-black);
  border: var(--border-thick);
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  box-shadow: var(--shadow-solid-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

.muted { color: var(--dsa-gray-dark); }

/* Header additions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-cta-secondary {
  background: transparent;
  color: var(--dsa-white);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  font-size: 0.75rem;
  padding: 0.45rem 0.75rem;
}

.nav-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--dsa-white);
  box-shadow: none;
  transform: none;
}

/* Stats */
.stat-sub {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #9CA3AF;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

/* List summary + pagination */
.list-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dsa-gray-dark);
  margin-bottom: 1.35rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--dsa-gray-light);
}

.summary-dot { color: var(--dsa-gray-med); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--dsa-black);
}

.page-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dsa-gray-dark);
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.page-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 36px;
  height: 34px;
  padding: 0 0.55rem;
  border: 1px solid var(--dsa-gray-light);
  background: var(--dsa-white);
  color: var(--dsa-black);
  border-radius: var(--radius-xs);
  transition: all 0.12s ease;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--dsa-black);
  background: var(--canvas-card-alt);
}

.page-btn.active {
  background: var(--dsa-black);
  color: var(--dsa-white);
  border-color: var(--dsa-black);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 0.3rem;
  color: var(--dsa-gray-med);
  font-family: var(--font-mono);
}

/* Cards: fallback portraits, delegates, tier pills */
.card-top-media::before,
.dossier-portrait-wrap::before {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2A2F35, #14171A);
  color: var(--dsa-white);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  z-index: 0;
}

.card-top-media img,
.dossier-portrait-wrap img {
  position: relative;
  z-index: 1;
}

.dossier-portrait-wrap::before { font-size: 3rem; }

.delegate-float {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: #111827;
  color: #F9FAFB;
  border: 1px solid #6B7280;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-xs);
}

.affiliation-pill.tier-champion { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.affiliation-pill.tier-ally { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.affiliation-pill.tier-progressive { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.affiliation-pill.tier-mixed { background: #FFEDD5; color: #9A3412; border-color: #FED7AA; }
.affiliation-pill.tier-opposed { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.affiliation-pill.tier-delegate { background: #F3F4F6; color: #374151; border-color: #D1D5DB; }

.card-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--dsa-gray-dark);
  padding: 0.55rem 0;
  border-top: 1px dashed var(--dsa-gray-light);
  border-bottom: 1px dashed var(--dsa-gray-light);
  margin: 0.65rem 0;
}

.card-mini-stats strong { color: var(--dsa-black); }

.coverage-tag {
  margin-left: auto;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.coverage-high { background: #DCFCE7; color: #166534; }
.coverage-medium { background: #FEF3C7; color: #92400E; }
.coverage-low { background: #FFEDD5; color: #9A3412; }
.coverage-none { background: #F3F4F6; color: #4B5563; }

.domain-chip {
  background: var(--canvas-card-alt);
  border-color: var(--dsa-gray-light);
  color: var(--dsa-black);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--canvas-card);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid-sm);
}

.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--dsa-gray-dark);
  margin-bottom: 1.25rem;
}

.empty-state .reset-filters-btn { margin: 0 auto; }

/* View headings */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dsa-red);
  margin-bottom: 0.35rem;
}

.view-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1.1fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--dsa-black);
}

.view-heading h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
}

.view-heading p {
  color: var(--dsa-gray-dark);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Bill cards */
.bill-official-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--dsa-gray-dark);
  line-height: 1.4;
  margin: -0.15rem 0 0.65rem;
}

.bill-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1rem;
  margin: 0.9rem 0;
  padding: 0.85rem;
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-gray-light);
  border-radius: var(--radius-xs);
}

.bill-facts dt {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dsa-gray-dark);
  margin-bottom: 0.15rem;
}

.bill-facts dd {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.bill-facts > div:nth-child(5),
.bill-facts > div:nth-child(6) {
  grid-column: 1 / -1;
}

.stance-pill {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.45rem;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
}

.stance-pill.support { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.stance-pill.oppose { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }

.party-split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
}

.split-d, .split-r {
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
}

.split-d { background: #EFF6FF; color: #1D4ED8; }
.split-r { background: #FEF2F2; color: #B91C1C; }

.bill-law {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--dsa-gray-dark);
}

/* Map additions */
.map-state-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--canvas-card-alt);
  border: 2px solid var(--dsa-black);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.dark-btn {
  background: var(--dsa-black);
  color: var(--dsa-white);
  border-color: var(--dsa-black);
}

.dark-btn:hover { background: var(--dsa-red); border-color: var(--dsa-red); }

.map-footnote {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--dsa-gray-dark);
  margin-top: 1rem;
  line-height: 1.5;
}

.tooltip-grade { font-family: var(--font-mono); font-weight: 800; }
.tooltip-sub { font-family: var(--font-mono); font-size: 0.68rem; color: #9CA3AF; margin: 0.2rem 0 0.35rem; }
.tooltip-empty { font-size: 0.75rem; color: #9CA3AF; }
.tooltip-hint { font-size: 0.65rem; color: #6B7280; margin-top: 0.4rem; font-style: italic; }

.tooltip-member-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  padding: 0.16rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Dossier additions */
.dossier-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--dsa-gray-dark);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.dossier-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.dossier-links a { color: var(--dsa-red); text-decoration: underline; }

.coverage-box {
  border: 1px solid var(--dsa-gray-light);
  border-left: 4px solid var(--dsa-gray-med);
  background: var(--canvas-card-alt);
  padding: 0.6rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--dsa-black-muted);
  margin-top: 0.35rem;
}

.coverage-box.coverage-high { border-left-color: #16A34A; background: #F0FDF4; color: #14532D; }
.coverage-box.coverage-medium { border-left-color: #D97706; background: #FFFBEB; color: #78350F; }
.coverage-box.coverage-low { border-left-color: #EA580C; background: #FFF7ED; color: #7C2D12; }
.coverage-box.coverage-none { border-left-color: #6B7280; }

.dossier-section { margin-bottom: 2rem; }

.score-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(150px, 0.6fr);
  gap: 1rem;
  align-items: stretch;
}

.score-component {
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-gray-light);
  padding: 0.85rem;
  border-radius: var(--radius-xs);
}

.score-component-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.score-component-note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--dsa-gray-dark);
  margin-top: 0.35rem;
}

.score-math {
  background: var(--dsa-black);
  color: var(--dsa-white);
  padding: 0.85rem;
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.score-math-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.score-math-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #D1D5DB;
  margin-top: 0.35rem;
}

.domain-gauge-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--dsa-gray-dark);
  margin-top: 0.35rem;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-heading-row .section-heading-sm { margin-bottom: 0; }

.record-search-input {
  height: 34px;
  min-width: 200px;
  border: 1px solid var(--dsa-gray-light);
  border-radius: var(--radius-xs);
  padding: 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--dsa-white);
}

.record-search-input:focus { outline: 2px solid var(--dsa-red); outline-offset: 1px; }

.record-table-wrap { overflow-x: auto; border: 1px solid var(--dsa-gray-light); }

.record-bill-number {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--dsa-black);
  white-space: nowrap;
}

.record-bill-title { font-size: 0.75rem; color: var(--dsa-gray-dark); line-height: 1.35; max-width: 260px; }

.record-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--dsa-gray-dark);
  white-space: nowrap;
}

.record-result {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
}

.record-result span { color: var(--dsa-gray-dark); }

.record-source-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--dsa-red);
  text-decoration: underline;
  white-space: nowrap;
}

.vote-position { font-family: var(--font-mono); font-size: 0.75rem; }

.vote-status-badge.not-scored { background: #F3F4F6; color: #4B5563; border: 1px solid #D1D5DB; }

.cosponsor-status {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.4rem;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
}

.status-sponsor { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.status-cosponsor { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.status-none { background: #F9FAFB; color: #6B7280; border-color: #E5E7EB; }

.compact-table td { padding: 0.55rem 0.7rem; }

.empty-cell { text-align: center; padding: 1.5rem !important; color: var(--dsa-gray-dark); }

/* Methodology additions */
.lede {
  font-size: 1.05rem !important;
  color: var(--dsa-black) !important;
  border-left: 3px solid var(--dsa-red);
  padding-left: 1rem;
}

.methodology-article ul {
  padding-left: 1.4rem;
  margin-bottom: 1.5rem;
  line-height: 1.65;
  color: var(--dsa-black-muted);
}

.methodology-article li { margin-bottom: 0.4rem; }

.methodology-article code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--canvas-card-alt);
  border: 1px solid var(--dsa-gray-light);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

.inline-link { color: var(--dsa-red); font-weight: 700; text-decoration: underline; }

.formula-box {
  background: var(--dsa-black);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-black);
  border-radius: var(--radius-xs);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow-solid-sm);
}

.formula-line {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #86EFAC;
}

.formula-note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #D1D5DB;
  margin-top: 0.35rem;
}

.methodology-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--canvas-card);
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  box-shadow: var(--shadow-solid-sm);
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--dsa-black);
}

.fact-list { display: flex; flex-direction: column; gap: 0.45rem; }

.fact-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-bottom: 1px dashed var(--dsa-gray-light);
  padding-bottom: 0.4rem;
}

.fact-list dt { color: var(--dsa-gray-dark); }
.fact-list dd { font-weight: 700; text-align: right; }

.sidebar-note p { font-size: 0.8rem; line-height: 1.55; color: var(--dsa-gray-dark); }
.sidebar-note a { color: var(--dsa-red); text-decoration: underline; font-weight: 600; }

.grade-a { color: #15803D; font-weight: 800; }
.grade-b { color: #1D4ED8; font-weight: 800; }
.grade-c { color: #B45309; font-weight: 800; }
.grade-d { color: #C2410C; font-weight: 800; }
.grade-f { color: #B91C1C; font-weight: 800; }

.source-list {
  border: 1px solid var(--dsa-gray-light);
  background: var(--canvas-card);
  border-radius: var(--radius-xs);
  margin: 1rem 0 1.5rem;
  overflow: hidden;
}

.source-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--dsa-gray-light);
  font-size: 0.78rem;
  align-items: flex-start;
}

.source-row:last-child { border-bottom: 0; }

.source-row a { font-weight: 700; color: var(--dsa-black); text-decoration: underline; }

.source-url {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--dsa-gray-med);
  margin-top: 0.2rem;
  word-break: break-all;
  max-width: 520px;
}

.source-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--dsa-gray-dark);
  white-space: nowrap;
}

.source-state {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
}

.source-fresh { background: #DCFCE7; color: #166534; }
.source-downloaded { background: #DBEAFE; color: #1E40AF; }
.source-stale { background: #FEF3C7; color: #92400E; }
.source-offline { background: #F3F4F6; color: #374151; }
.source-not-modified { background: #F3F4F6; color: #374151; }
.source-recorded { background: #F3F4F6; color: #374151; }

.source-details { border-top: 1px solid var(--dsa-gray-light); }
.source-details summary {
  cursor: pointer;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--canvas-card-alt);
}

.source-note {
  padding: 0.7rem 0.8rem;
  font-size: 0.72rem;
  color: var(--dsa-gray-dark);
  line-height: 1.5;
  border-top: 1px solid var(--dsa-gray-light);
  background: #FAFAF9;
}

/* Footer additions */
.footer-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.footer-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--dsa-red);
  color: var(--dsa-white);
  border: 2px solid var(--dsa-white);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-xs);
  box-shadow: 2px 2px 0 var(--dsa-white);
}

.footer-btn-light {
  background: transparent;
  color: var(--dsa-white);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.footer-brand-row img { border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 3px; }

/* Responsive */
@media (max-width: 1180px) {
  .header-nav { display: none; }
}

@media (max-width: 980px) {
  .view-heading { grid-template-columns: 1fr; gap: 0.75rem; }
  .score-breakdown { grid-template-columns: 1fr 1fr; }
  .score-math { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 0.75rem; }
  .score-math-label { margin-top: 0; }
}

@media (max-width: 820px) {
  .header-actions .nav-cta-secondary { display: none; }
  .data-actions { width: 100%; }
  .scorecard-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
  .pagination { align-items: flex-start; }
  .page-controls { width: 100%; }
  .bill-facts { grid-template-columns: 1fr; }
  .bill-facts > div:nth-child(5), .bill-facts > div:nth-child(6) { grid-column: auto; }
  .dossier-hero { flex-direction: column; }
  .dossier-portrait-wrap { width: 130px; height: 160px; }
  .dossier-name { font-size: 1.5rem; }
}

@media (max-width: 560px) {
  .scorecard-grid { grid-template-columns: 1fr; }
  .view-tab-btn { padding: 0.4rem 0.55rem; font-size: 0.72rem; }
  .view-tab-btn span:first-child { display: none; }
  .score-breakdown { grid-template-columns: 1fr; }
  .score-math { grid-column: auto; }
  .filter-select { flex: 1 1 calc(50% - 0.5rem); min-width: 0; }
  .active-count-badge { margin-left: 0; }
}

/* Print */
@media print {
  .site-header, .hero-section, .control-hub-section, .site-footer,
  .modal-close-btn, .dossier-actions-bar, .record-search-input, #toast-notification {
    display: none !important;
  }
  .modal-overlay { position: static; display: block !important; background: none; padding: 0; }
  .dossier-modal { max-width: none; max-height: none; box-shadow: none; border: 0; }
  .modal-scrollable-body { overflow: visible; padding: 0; }
  body { background: #fff; }
  .dossier-section { break-inside: avoid; }
  .record-table-wrap { overflow: visible; }
  .vote-bills-table { font-size: 9pt; }
}

/* Sticky only on the member list; hidden on reading views */
.control-hub-section { position: relative; top: auto; }
.control-hub-section.is-sticky { position: sticky; top: var(--header-height); }
.control-hub-section.compact { padding: 0.7rem 0; }
.control-hub-section.compact .search-box-wrapper,
.control-hub-section.compact .filter-controls-row { display: none; }

.bill-header-row { flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.bill-number-badge, .bill-domain-pill { white-space: nowrap; }
.bills-grid { align-items: start; }
.dossier-title-row { padding-right: 44px; }

[hidden] { display: none !important; }

.coverage-cosponsor-only { background: #E0F2FE; color: #075985; }
.coverage-box.coverage-cosponsor-only { border-left-color: #0284C7; background: #F0F9FF; color: #0C4A6E; }
.domain-gauge-card.no-evidence { opacity: 0.62; }
.domain-gauge-card.no-evidence .domain-gauge-header span:last-child { color: #9CA3AF !important; }

/* Coverage describes evidence quantity, not ideological quality: keep it neutral. */
.coverage-high { background: #E0F2FE; color: #075985; }
.coverage-box.coverage-high { border-left-color: #0284C7; background: #F0F9FF; color: #0C4A6E; }

@media (max-width: 992px) {
  .dossier-hero { align-items: flex-start; text-align: left; }
  .dossier-title-row { align-items: flex-start; }
  .dossier-meta-list { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .modal-overlay { padding: 0.5rem; }
  .modal-scrollable-body { padding: 1rem; }
  .dossier-grade-box { width: 60px; height: 60px; font-size: 1.7rem; }
}

@media (max-width: 560px) {
  html, body { overflow-x: hidden; }
  .header-inner { gap: 0.5rem; }
  .brand-logo-img { width: 36px; height: 36px; }
  .brand-title { font-size: 0.92rem; gap: 0.35rem; }
  .brand-badge { font-size: 0.55rem; padding: 0.12rem 0.3rem; }
  .brand-sub { display: none; }
  .header-actions .nav-cta { font-size: 0.66rem; padding: 0.35rem 0.5rem; box-shadow: 1px 1px 0 var(--dsa-white); }
  .brand-text { min-width: 0; }
  .brand-title span:first-child { white-space: nowrap; }
}

@media (max-width: 820px) {
  .control-hub-section.is-sticky { position: relative; top: auto; }
}

/* Overlay badges must sit above the portrait (which has z-index 1 for the
   initials fallback behind it). */
.chamber-badge-pill, .grade-badge-float { z-index: 2; }
.delegate-float { z-index: 3; }

/* Compact hero links (replaces the old status bar + build callout) */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.4rem;
  margin: 1.1rem 0 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.hero-link {
  color: var(--dsa-white);
  font-weight: 700;
  border-bottom: 1px solid var(--dsa-red);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hero-link:hover { color: #FCA5A5; border-color: #FCA5A5; }

.hero-updated { color: #9CA3AF; margin-left: auto; }

@media (max-width: 560px) {
  .hero-updated { margin-left: 0; width: 100%; }
}

/* AIPAC-linked money panel */
.aipac-tag {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #991B1B;
  font-weight: 800;
}

.money-panel {
  border: 1px solid var(--dsa-gray-light);
  border-left: 4px solid #6B7280;
  background: #FAFAF9;
  padding: 0.75rem 0.85rem;
  margin-top: 0.85rem;
  border-radius: var(--radius-xs);
}

.money-panel.has-penalty {
  border-left-color: #DC2626;
  background: #FEF2F2;
}

.money-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dsa-black);
  margin-bottom: 0.55rem;
}

.money-penalty {
  background: #DC2626;
  color: #fff;
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
  font-size: 0.62rem;
}

.money-penalty.zero { background: #E5E7EB; color: #4B5563; }

.money-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.money-stats > div {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 0.45rem 0.55rem;
  border-radius: 2px;
}

.money-stats span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dsa-gray-dark);
  margin-bottom: 0.15rem;
}

.money-stats strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.money-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--dsa-gray-dark);
  margin-top: 0.55rem;
}

.money-note a { color: var(--dsa-red); text-decoration: underline; font-weight: 700; }

@media (max-width: 560px) {
  .money-stats { grid-template-columns: 1fr; }
}

/* Portrait crop: official portraits are 450x550, so a 240px-tall media box
   with a 28% vertical anchor keeps the face in frame. */
.card-top-media { height: 240px; }
.card-portrait-img { object-position: center 28%; }

.section-note {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.5;
  color: var(--dsa-gray-dark);
  margin: -0.35rem 0 0.9rem;
}

.affiliation-pill { flex-wrap: wrap; line-height: 1.35; }

/* Campaign-finance context panel (CIV.IQ / FEC) */
.finance-panel {
  border: 1px solid var(--dsa-gray-light);
  border-left: 4px solid #2563EB;
  background: #F8FAFC;
  padding: 0.75rem 0.85rem;
  margin-top: 0.85rem;
  border-radius: var(--radius-xs);
}

.finance-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dsa-black);
  margin-bottom: 0.55rem;
}

.finance-source {
  background: #DBEAFE;
  color: #1E40AF;
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
  font-size: 0.58rem;
}

.finance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.finance-stats > div {
  background: var(--dsa-white);
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 0.42rem 0.5rem;
  border-radius: 2px;
}

.finance-stats span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dsa-gray-dark);
  margin-bottom: 0.12rem;
}

.finance-stats strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
}

.finance-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--dsa-gray-dark);
  margin-top: 0.55rem;
}

@media (max-width: 560px) {
  .finance-stats { grid-template-columns: 1fr 1fr; }
}

.civiq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.civiq-card {
  background: var(--canvas-card);
  border: 1px solid var(--dsa-gray-light);
  border-left: 4px solid #2563EB;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-xs);
}

.civiq-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dsa-gray-dark);
  margin-bottom: 0.25rem;
}

.civiq-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
}

.civiq-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--dsa-gray-dark);
  margin-top: 0.25rem;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .civiq-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Hero v3 — red poster banner with HTML type + custom SVG illustration
   ========================================================================== */
.hero-section.hero-v3 {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.10), transparent 42%),
    linear-gradient(135deg, #C62828 0%, #A61B1B 55%, #7F1D1D 100%);
  padding: 3.25rem 0 2.75rem;
  border-bottom: 4px solid var(--dsa-black);
}

.hero-section.hero-v3::before {
  width: 100%;
  background-image: radial-gradient(rgba(0, 0, 0, 0.18) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.45;
  mix-blend-mode: multiply;
}

.hero-v3 .hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFE4E6;
  margin-bottom: 1.15rem;
}

.hero-kicker-mark { font-size: 1rem; }
.hero-kicker-sep { color: rgba(255, 255, 255, 0.45); }

.hero-v3-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--dsa-white);
  margin: 0 0 1rem;
}

.hero-v3-title span {
  display: inline-block;
  background: var(--dsa-white);
  color: var(--dsa-black);
  padding: 0 0.1em 0.04em;
  margin-top: 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-v3-lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
  color: var(--dsa-white);
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

.hero-v3 .hero-subtitle {
  color: #FEE2E2;
  max-width: 680px;
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
}

.hero-v3 .hero-subtitle strong { color: var(--dsa-white); }

.hero-v3 .hero-disclaimer-note {
  display: block;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #FCA5A5;
}

.hero-v3-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.hero-v3-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--dsa-black);
  background: var(--dsa-white);
  border: 2px solid var(--dsa-black);
  padding: 0.7rem 1.05rem;
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--dsa-black);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-v3-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--dsa-black);
}

.hero-v3-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dsa-white);
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-xs);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hero-v3-cta-secondary:hover {
  background: var(--dsa-white);
  color: var(--dsa-black);
  border-color: var(--dsa-white);
}

.hero-v3 .hero-updated {
  margin-left: 0;
  color: #FCA5A5;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
}

.hero-v3 .hero-artwork-frame {
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.55);
  background: #14171A;
}

.hero-v3 .hero-artwork-frame:hover {
  border-color: var(--dsa-white);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.65);
}

.hero-v3 .stats-ribbon {
  position: relative;
  z-index: 1;
  margin-top: 1.6rem;
}

.hero-v3 .stat-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.hero-v3 .stat-card:hover {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.55);
  transform: none;
}

.hero-v3 .stat-value { color: var(--dsa-white); }
.hero-v3 .stat-value.highlight-green { color: #BBF7D0; }
.hero-v3 .stat-label { color: #FEE2E2; }
.hero-v3 .stat-sub { color: #FCA5A5; }

#scorecard-members-grid { scroll-margin-top: 268px; }
#view-map-container,
#view-bills-container,
#view-methodology-container { scroll-margin-top: 86px; }

@media (max-width: 980px) {
  .hero-v3 .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .hero-v3 .hero-visual { max-width: 560px; width: 100%; }
  .hero-v3-title { font-size: clamp(2.8rem, 8vw, 4.6rem); }
}

@media (max-width: 560px) {
  .hero-section.hero-v3 { padding: 2rem 0 1.75rem; }
  .hero-v3-title { font-size: 2.7rem; }
  .hero-v3-cta,
  .hero-v3-cta-secondary { width: 100%; }
  .hero-v3 .stats-ribbon { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  #scorecard-members-grid { scroll-margin-top: 86px; }
}

/* Hero illustration / banner container */
.hero-artwork-frame {
  position: relative;
  aspect-ratio: 2042 / 664;
}

.hero-crowd-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.hero-art-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 75% 20%, rgba(236, 31, 39, 0.28), transparent 55%),
    #14171A;
  color: var(--dsa-white);
}

.hero-artwork-frame.art-missing .hero-art-fallback {
  display: flex;
}

.hero-fallback-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FCA5A5;
}

.hero-fallback-grade {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--dsa-white);
  margin: 0.45rem 0 0.55rem;
}

.hero-fallback-grade span { color: var(--dsa-red); }

.hero-fallback-rule {
  width: 64px;
  height: 3px;
  background: var(--dsa-red);
  margin-bottom: 1rem;
}

.hero-fallback-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #D1D5DB;
}

.hero-fallback-lines span::before {
  content: "—";
  color: var(--dsa-red);
  margin-right: 0.5rem;
}

.hero-fallback-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #9CA3AF;
}

/* Keep the section heading visible under the sticky site header when a nav
   tab scrolls to Map / Legislation / Methodology. */
#view-map-container,
#view-bills-container,
#view-methodology-container {
  scroll-margin-top: 88px;
}

#scorecard-members-grid {
  scroll-margin-top: 270px;
}

@media (max-width: 820px) {
  #view-map-container,
  #view-bills-container,
  #view-methodology-container {
    scroll-margin-top: 84px;
  }
  #scorecard-members-grid {
    scroll-margin-top: 20px;
  }
}

/* Calmer hero: charcoal surface, red reserved for the artwork and accents. */
.hero-section.hero-v3 {
  background:
    radial-gradient(circle at 18% 8%, rgba(236, 31, 39, 0.22), transparent 46%),
    linear-gradient(135deg, #171A1E 0%, #101214 100%);
}

.hero-section.hero-v3::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  opacity: 0.5;
  mix-blend-mode: normal;
}

.hero-kicker { color: #FCA5A5; }
.hero-kicker-sep { color: #6B7280; }
.hero-v3 .hero-subtitle { color: #D1D5DB; }
.hero-v3 .hero-updated { color: #9CA3AF; }

.hero-v3 .stat-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.hero-v3 .stat-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.32);
}

.hero-v3 .stat-label { color: #D1D5DB; }
.hero-v3 .stat-sub { color: #9CA3AF; }
.hero-v3 .stat-value { color: var(--dsa-white); }
.hero-v3 .stat-value.highlight-green { color: #BBF7D0; }
