* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #FFFCF0;
  --surface: #F2F0E5;
  --surface-hover: #E6E4D9;
  --border: #CECDC3;
  --text: #100F0F;
  --text-muted: #6F6E69;
  --accent: #AF3029;
  --accent-glow: rgba(175, 48, 41, 0.15);
  --yellow: #AD8301;
  --green: #66800B;
  --blue: #205EA6;
  --purple: #5E409D;
  --orange: #BC5215;
  --cyan: #24837B;
  --magenta: #A02F6F;
  --radius: 6px;
  --shadow: rgba(0,0,0,0.04);
  --header-bg: #100F0F;
  --header-subtitle: #B7B5AC;
  --header-date: #878580;
}

[data-theme="dark"] {
  --bg: #100F0F;
  --surface: #1C1B1A;
  --surface-hover: #282726;
  --border: #343331;
  --text: #CECDC3;
  --text-muted: #878580;
  --accent: #D14D41;
  --accent-glow: rgba(209, 77, 65, 0.2);
  --yellow: #D0A215;
  --green: #879A39;
  --blue: #4385BE;
  --purple: #8B7EC8;
  --orange: #DA702C;
  --cyan: #3AA99F;
  --magenta: #CE5D97;
  --shadow: rgba(0,0,0,0.3);
  --header-bg: #100F0F;
  --header-subtitle: #878580;
  --header-date: #6F6E69;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: rgb(44,36,23);
  position: relative;
  overflow: hidden;
}
.hero-image {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, rgba(44,36,23,0) 0%, rgba(44,36,23,0.6) 50%, rgba(44,36,23,1) 100%);
  pointer-events: none;
}
.header-inner {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  padding: 0 1.5rem 0.8rem;
  margin-top: -100px;
  z-index: 1;
  text-align: center;
}
.site-nav {
  display: flex;
  gap: 0;
  background: var(--bg);
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}
.nav-link {
  padding: 0.7rem 2.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s, border-color 0.15s;
  border-bottom: 3px solid transparent;
}
.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-link.active {
  color: var(--text);
  border-bottom-color: #6F5938;
}
h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 3.4rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #faf7f2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  line-height: 1.15;
}
.header-inner .hero-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #faf7f2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  margin: 0.6rem 0 0;
  text-align: center;
  line-height: 1.2;
}
.last-updated {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.3rem 0 0.5rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Theme toggle */
.theme-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* Stats Strip */
.stats-strip {
  max-width: 900px;
  margin: 1.5rem auto 2rem;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.stat-number {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.3;
}
.partisan-r { color: var(--accent); font-weight: 700; }
.partisan-d { color: var(--blue); font-weight: 700; }
.stat-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 9px;
  font-weight: 700;
  font-style: normal;
  border: 1.5px solid var(--text-muted);
  border-radius: 50%;
  opacity: 0.4;
  cursor: help;
  vertical-align: middle;
  margin-left: 2px;
  position: relative;
}
.stat-info:hover { opacity: 0.7; }
.stat-info:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: normal;
  line-height: 1.4;
  width: max-content;
  max-width: 240px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Outcome progress bar */
/* Legislation strip (shows when state filtered) */
.legislation-strip {
  max-width: 1100px;
  margin: 0.75rem auto 0;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
}
.leg-strip-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.leg-strip-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.leg-strip-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
}
.leg-strip-tag.enacted { background: rgba(102,128,11,0.15); color: #66800B; }
.leg-strip-tag.pending { background: rgba(173,131,1,0.15); color: #AD8301; }
.leg-strip-tag.defeated { background: rgba(135,133,128,0.15); color: #878580; }
.leg-strip-bills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.leg-strip-bill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.leg-strip-bill:hover {
  background: var(--surface-hover);
}
.leg-strip-status {
  font-size: 0.65rem;
  font-weight: 600;
}
.leg-strip-more {
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0.25rem 0.6rem;
}
.leg-strip-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.outcome-bar {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}
.outcome-labels {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.outcome-label {
  font-size: 0.78rem;
  font-weight: 600;
}
.outcome-track {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.outcome-segment {
  transition: width 0.4s ease;
  min-width: 0;
}

/* Hyperscaler chips bar */
.hyperscaler-bar {
  max-width: 1100px;
  margin: 0.75rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.hs-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}
.hs-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.hs-chip:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}
.hs-chip.hs-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.hs-chip .hs-count {
  font-weight: 400;
  opacity: 0.7;
}
.hs-toggle {
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}
.hs-toggle:hover {
  color: var(--text);
  text-decoration: underline;
}
.hs-chip.hs-active {
  border-width: 1.5px;
  box-shadow: 0 0 8px rgba(255,255,255,0.08);
}

/* Map */
.map-container {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 2rem 1.5rem 0;
  border-top: 2px solid var(--border);
}
/* Hide MapLibre's in-map attribution box and show a small caption below the map instead */
.maplibregl-ctrl-attrib {
  display: none !important;
}
.map-attribution {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  margin: 0.3rem 0 0;
  padding-right: 0.25rem;
}
.map-attribution a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-style: dotted;
}
.filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  height: fit-content;
  align-self: flex-end;
}
.filters-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.filters-toggle[aria-expanded="true"] .filters-toggle-icon {
  transform: rotate(90deg);
}
.filters-toggle-icon {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.85rem;
  line-height: 1;
}
.filters-active-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 700;
}
.filters-active-count[hidden] {
  display: none !important;
}
.filters-wrapper[hidden] {
  display: none;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem 0.6rem;
  margin-bottom: 0.75rem;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.filter-group select {
  width: 100%;
  min-width: 0;
}
.filter-group label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 0.15rem;
  opacity: 0.75;
}
.filters select, .filters button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.filters select:hover, .filters button:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}
.filters select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
#filter-hyperscaler {
  font-size: 0.78rem;
}
.filters-footer {
  display: flex;
  justify-content: flex-end;
  margin: -0.25rem 0 0.75rem;
}
.btn-clear {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  cursor: pointer;
  padding: 0.25rem 0.4rem !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  transition: all 0.15s ease;
  width: fit-content;
}
.btn-clear:hover {
  color: var(--text) !important;
  background: transparent !important;
}
.map-controls {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.size-by-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
/* Row: dropdown on the left, reference circles on the right */
.size-by-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.filters-column {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.filters-column .filters-toggle {
  align-self: flex-start;
}
.filters-column .filters-wrapper[hidden] {
  display: none;
}
.filters-column .filters-wrapper {
  width: 100%;
}
.size-legend-count-footer {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.1rem;
}
.size-by-label-text {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 0.15rem;
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.size-by-icon {
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.75;
}
.size-by-group select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.size-by-group select:hover {
  border-color: var(--text-muted);
}
.size-by-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
#map {
  height: 580px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  z-index: 1;
  box-shadow: 0 4px 20px var(--shadow);
}

/* MapLibre dark mode overrides */
[data-theme="dark"] .maplibregl-popup-content {
  background: rgba(30, 30, 35, 0.95) !important;
  color: #e8e4df !important;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .maplibregl-popup-tip {
  border-top-color: rgba(30, 30, 35, 0.95) !important;
}
[data-theme="dark"] .maplibregl-popup-content h3 {
  color: #ffffff;
}
[data-theme="dark"] .maplibregl-popup-close-button {
  color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .map-tooltip {
  background: rgba(20, 20, 25, 0.92);
  color: #e8e4df;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .map-legend {
  background: rgba(20, 20, 25, 0.88);
  border: 1px solid rgba(255,255,255,0.12);
  color: #d0ccc6;
}
[data-theme="dark"] .legend-size-note {
  border-top-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
}
[data-theme="dark"] .maplibregl-ctrl-attrib {
  background: rgba(0,0,0,0.5) !important;
  color: rgba(255,255,255,0.4) !important;
}
[data-theme="dark"] .maplibregl-ctrl-attrib a {
  color: rgba(255,255,255,0.5) !important;
}
[data-theme="dark"] .maplibregl-ctrl button {
  background: rgba(30,30,35,0.85) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
[data-theme="dark"] .maplibregl-ctrl button .maplibregl-ctrl-icon {
  filter: invert(0.8);
}
[data-theme="dark"] .maplibregl-ctrl button:hover {
  background: rgba(50,50,55,0.95) !important;
}
[data-theme="dark"] .group-card {
  background: rgba(255,255,255,0.03);
}

/* MapLibre popup/tooltip — light mode (base) */
.maplibregl-popup-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 300px;
}
.maplibregl-popup-tip {
  border-top-color: var(--surface);
}
.maplibregl-popup-content h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.maplibregl-popup-close-button {
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 4px 8px;
}
.map-tooltip {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.82rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  white-space: nowrap;
  pointer-events: none;
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -100%);
  margin-top: -12px;
}

/* Map legend */
.map-legend {
  position: absolute;
  bottom: 30px;
  right: 10px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text);
  backdrop-filter: blur(8px);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-size-note {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}


/* Legislation Tracker */
.legislation-tracker {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}
.legislation-header {
  margin-bottom: 1.25rem;
}
.legislation-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
}
.legislation-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}
.leg-controls {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 1.5rem 0 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.leg-controls-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  flex: 1;
}
/* Clear button inside the legislation filter row: align it to the bottom of the dropdowns */
.leg-controls-filters .btn-clear {
  align-self: flex-end;
  margin-bottom: 0.45rem;
}
.leg-controls-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 0.5rem;
}
.leg-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.leg-control-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.leg-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.leg-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.leg-pill:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.leg-pill.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.leg-select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  min-width: 160px;
}
.leg-select:hover { border-color: var(--text-muted); }
.leg-select:focus { outline: none; border-color: var(--accent); }

/* Collapsible federal section */
.leg-federal-collapsed {
  max-height: 280px;
  overflow: hidden;
  position: relative;
}
.leg-federal-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.leg-federal-toggle {
  display: block;
  width: 100%;
  padding: 0.6rem;
  margin: 0.5rem 0 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.leg-federal-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.leg-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 0;
  font-style: italic;
}
.leg-card-jurisdiction {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.leg-group-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.leg-state-count {
  font-weight: 400;
  font-size: 0.75rem;
  background: var(--accent);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}
.leg-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.leg-grid {
  /* Multi-column layout — short groups get bumped up, no blank space */
  column-width: 320px;
  column-gap: 0.75rem;
}
.leg-state-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* Prevent state groups from being split across columns */
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 0.75rem;
}
.leg-state-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.5rem;
  margin: -0.75rem -0.75rem 0.25rem;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
  border-radius: var(--radius) var(--radius) 0 0;
}
.leg-card {
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.leg-card:hover {
  background: var(--surface-hover);
}
.leg-cards .leg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.leg-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.leg-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}
.leg-enacted { background: rgba(32,94,166,0.12); color: var(--blue); }
.leg-active { background: rgba(74,127,181,0.12); color: var(--blue); }
.leg-pending { background: rgba(196,149,37,0.12); color: var(--yellow); }
.leg-defeated { background: rgba(188,82,21,0.12); color: var(--orange); }
.leg-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}
.leg-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.leg-card-sponsors {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leg-card-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.leg-card-bill {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.leg-card-bill:hover {
  text-decoration: underline;
}
.bill-link-section .bill-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 0.3rem 0;
}
.bill-link-section .bill-link:hover {
  text-decoration: underline;
}

/* Fights List */
.fights-list {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.list-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
}
.list-actions {
  display: flex;
  gap: 0.5rem;
}
.btn-action {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-action:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-muted);
}
.btn-action.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.count-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  vertical-align: middle;
}
.search-bar {
  margin-bottom: 1rem;
  position: relative;
}
.search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.search-bar input::placeholder {
  color: var(--text-muted);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--border);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}
.search-clear:hover {
  background: var(--text-muted);
  color: var(--bg);
}
.search-bar.has-text .search-clear {
  display: inline-flex;
}

#fights-table-container {
  overflow-x: auto;
}
#fights-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
/* Column widths — sized to fit on a 1100px max-width container (6 columns) */
#fights-table th:nth-child(1), #fights-table td:nth-child(1) { width: 70px; }   /* Date */
#fights-table th:nth-child(2), #fights-table td:nth-child(2) { width: 270px; }  /* Jurisdiction */
#fights-table th:nth-child(3), #fights-table td:nth-child(3) { width: 56px; }   /* State */
#fights-table th:nth-child(4), #fights-table td:nth-child(4) { width: 115px; }  /* Action */
#fights-table th:nth-child(5), #fights-table td:nth-child(5) { width: 180px; }  /* Issue */
#fights-table th:nth-child(6), #fights-table td:nth-child(6) { width: 210px; }  /* Status (long labels) */

/* Truncate long jurisdiction/county names with ellipsis */
.jurisdiction-cell, .county-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#fights-table thead th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
}
#fights-table thead th:hover {
  color: var(--text);
}
#fights-table thead th.sorted-asc::after { content: ' \2191'; }
#fights-table thead th.sorted-desc::after { content: ' \2193'; }
#fights-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
#fights-table tbody tr:hover {
  background: var(--surface-hover);
}
#fights-table td {
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  vertical-align: top;
}

/* Spreadsheet mode */
.spreadsheet-mode #fights-table-container {
  max-height: 95vh;
  overflow: auto;
  position: relative;
}
.spreadsheet-mode #fights-table td {
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}
.spreadsheet-mode #fights-table thead th {
  font-size: 0.72rem;
  padding: 0.5rem 0.5rem;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}
.spreadsheet-mode #fights-table {
  table-layout: fixed;
}
.spreadsheet-mode .summary-cell {
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spreadsheet-mode .groups-cell {
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spreadsheet-mode .truncate-cell {
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spreadsheet-mode .links-cell {
  white-space: nowrap;
}
.spreadsheet-mode .links-cell a,
.spreadsheet-mode .petition-cell a {
  color: var(--blue);
  font-size: 0.75rem;
  margin-right: 0.3rem;
}
.spreadsheet-mode .sources-cell {
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spreadsheet-mode .sources-cell a {
  display: inline;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-right: 0.25rem;
}
.spreadsheet-mode .sources-cell a:hover {
  color: var(--blue);
}

/* Column filter inputs in spreadsheet mode */
.spreadsheet-mode .col-filter-row th {
  padding: 0.2rem 0.3rem;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 27px;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}
.col-filter-input {
  width: 100%;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
}
.col-filter-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}
.col-filter-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Action type badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-moratorium { background: rgba(173, 131, 1, 0.12); color: var(--yellow); }
.badge-zoning_restriction { background: rgba(94, 64, 157, 0.12); color: var(--purple); }
.badge-legislation { background: rgba(94, 64, 157, 0.12); color: var(--purple); }
.badge-lawsuit { background: rgba(175, 48, 41, 0.12); color: var(--accent); }
.badge-public_comment { background: rgba(32, 94, 166, 0.12); color: var(--blue); }
.badge-project_withdrawal { background: rgba(102, 128, 11, 0.12); color: var(--green); }
.badge-utility_regulation { background: rgba(36, 131, 123, 0.12); color: var(--cyan); }
.badge-executive_order { background: rgba(160, 47, 111, 0.12); color: var(--magenta); }
.badge-other { background: rgba(135, 133, 128, 0.12); color: var(--text-muted); }

.status-badge {
  font-size: 0.75rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 3px;
}
.status-badge:hover {
  background: transparent;
}
[data-theme="dark"] .status-badge:hover {
  background: rgba(255,255,255,0.08);
}
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  font-size: 8px;
  font-weight: 700;
  font-style: normal;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.3;
  flex-shrink: 0;
}
.status-badge:hover .info-icon {
  opacity: 0.6;
}
.status-badge .status-tip {
  display: none;
  position: fixed;
  background: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* Status badge colors — aligned with map legend community framing */
.status-active { color: var(--green); }
.status-passed { color: var(--green); }
.status-defeated { color: var(--green); }
.status-cancelled { color: var(--green); }
.status-approved { color: var(--accent); }
.status-delayed { color: var(--yellow); }
.status-expired { color: var(--text-muted); }
.status-mixed { color: var(--text-muted); }
.status-ongoing { color: var(--green); }
.status-pending { color: var(--yellow); }

/* Opposition links */
.opp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.opp-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--text);
  transition: all 0.15s;
}
.opp-link a:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  text-decoration: none;
}

/* Group cards in detail panel */
.groups-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.group-name {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}
.group-links {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.group-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(74,127,181,0.1);
  color: var(--blue);
  transition: all 0.15s;
}
.group-link-btn:hover {
  background: rgba(74,127,181,0.2);
  text-decoration: none;
}

/* Detail Panel */
.detail-panel {
  display: none;
  position: fixed;
  right: 0;
  top: 0;
  width: 460px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 2rem 1.5rem;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.detail-panel.open {
  display: block;
  animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.close-panel {
  position: sticky;
  top: 0.5rem;
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  margin-left: 2rem;
  margin-bottom: -1rem;
}
.close-panel:hover {
  color: var(--text);
}
#detail-content h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
#detail-content .detail-county {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
}
#detail-content .detail-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
#detail-content .detail-section {
  margin-bottom: 1.25rem;
}
#detail-content .detail-section h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
#detail-content .detail-section p,
#detail-content .detail-section ul {
  font-size: 0.95rem;
}
#detail-content .detail-section ul {
  list-style: none;
  padding: 0;
}
#detail-content .detail-section li {
  padding: 0.25rem 0;
}
#detail-content .source-link {
  display: block;
  padding: 0.3rem 0;
  word-break: break-all;
}

/* About Section */
.about-section {
  max-width: 1100px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}
.about-inner h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.about-byline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px var(--shadow);
}
.about-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.about-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

/* Size legend */
.size-legend {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}
.size-legend-visual {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.size-legend-title {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.size-legend-circles {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}
.size-legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.size-legend-circle {
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  border: 1px solid var(--accent);
}
.size-legend-circle.size-legend-nodata {
  background: var(--text-muted);
  opacity: 0.3;
  border-color: var(--text-muted);
}
.size-legend-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.size-legend-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Community outcome badges */
.outcome-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.outcome-win, .outcome-win_withdrawal { background: rgba(32,94,166,0.15); color: #205EA6; }
.outcome-loss { background: rgba(188,82,21,0.15); color: #BC5215; }
.outcome-pending { background: rgba(173,131,1,0.15); color: #AD8301; }
.outcome-mixed { background: rgba(135,133,128,0.15); color: #878580; }
.outcome-partial { background: rgba(188,82,21,0.15); color: #BC5215; }
.outcome-expired { background: rgba(135,133,128,0.15); color: #878580; }

/* Outcome badges (table) */
.outcome-badge-sm {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.outcome-badge-sm.outcome-win, .outcome-badge-sm.outcome-win_withdrawal { background: rgba(32,94,166,0.15); color: #205EA6; }
.outcome-badge-sm.outcome-loss { background: rgba(188,82,21,0.15); color: #BC5215; }
.outcome-badge-sm.outcome-pending { background: rgba(173,131,1,0.15); color: #AD8301; }
.outcome-badge-sm.outcome-mixed { background: rgba(135,133,128,0.15); color: #878580; }
.outcome-badge-sm.outcome-partial { background: rgba(188,82,21,0.15); color: #BC5215; }
.outcome-badge-sm.outcome-expired { background: rgba(135,133,128,0.15); color: #878580; }

/* Issue category tags (table view) */
.issue-cell {
  white-space: normal;
  line-height: 1.6;
  overflow: hidden;
}
.issue-tag-more {
  background: transparent !important;
  border: 1px solid var(--border);
  color: var(--text-muted) !important;
}
.issue-tag-sm {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  background: var(--border);
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: capitalize;
  white-space: nowrap;
  margin: 1px 0;
}
.action-cell {
  white-space: normal;
  line-height: 1.6;
  overflow: hidden;
}
.action-tag-sm {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background: var(--border);
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  margin: 1px 0;
}
.action-tag-more {
  background: transparent !important;
  border: 1px solid var(--border);
  color: var(--text-muted) !important;
}
/* Info icon shown next to badges in the detail panel (NOT in table) */
.info-icon-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  font-family: 'Georgia', 'Times New Roman', serif;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.55;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
}
.info-icon-detail:hover {
  opacity: 1;
}

/* Custom tooltip — replaces native browser title= */
#custom-tooltip {
  position: fixed;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  max-width: 280px;
  line-height: 1.45;
  pointer-events: none;
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.12s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
#custom-tooltip.visible {
  opacity: 1;
}
.objective-cell {
  max-width: 200px;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sponsor badges (detail panel) */
.sponsors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sponsor-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: rgba(67,133,190,0.12);
  border: 1px solid rgba(67,133,190,0.25);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

/* Issue category tags (detail panel) */
.issue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.issue-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  text-transform: capitalize;
}

/* Detail panel toolbar */
.detail-toolbar {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
  margin-right: 2.5rem;
  position: sticky;
  top: 0.5rem;
  z-index: 9;
}
.btn-share, .btn-expand {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-share:hover, .btn-expand:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.share-label { font-weight: 500; }

/* Fullscreen detail panel */
.detail-panel.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh;
  z-index: 2000;
  border-radius: 0;
  border-left: none;
  box-shadow: none;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  background: var(--bg);
}
.detail-panel.fullscreen #detail-content {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 1rem;
}
.detail-panel.fullscreen .close-panel {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 2001;
  font-size: 2rem;
}
body.detail-fullscreen header,
body.detail-fullscreen nav,
body.detail-fullscreen footer,
body.detail-fullscreen .about-section,
body.detail-fullscreen .stats-strip,
body.detail-fullscreen .outcome-bar,
body.detail-fullscreen .map-container,
body.detail-fullscreen .fights-list {
  display: none !important;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}
.footer-inner p {
  margin-bottom: 0.3rem;
}

/* Smooth transitions for dark mode toggling */
body {
  transition: background-color 0.3s, color 0.3s;
}
.detail-panel,
.about-card,
.leg-state-group,
#fights-table thead th,
.col-filter-input,
footer {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
/* Extend existing transitions with dark-mode properties */
.filters select,
.filters button,
.btn-action {
  transition: all 0.15s, background-color 0.3s, color 0.3s, border-color 0.3s;
}
.search-bar input {
  transition: border-color 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.2s;
}
.leg-card {
  transition: background 0.15s, color 0.3s, border-color 0.3s;
}
#fights-table tbody tr {
  transition: background 0.15s, color 0.3s;
}

/* Dark mode — additional interactive element overrides */
[data-theme="dark"] .filters select,
[data-theme="dark"] .size-by-label select {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .filters select:hover,
[data-theme="dark"] .size-by-label select:hover {
  border-color: var(--text-muted);
}
[data-theme="dark"] .filters select:focus,
[data-theme="dark"] .size-by-label select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
[data-theme="dark"] .search-bar input {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .search-bar input::placeholder {
  color: var(--text-muted);
}
[data-theme="dark"] .search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
[data-theme="dark"] .btn-action {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-muted);
}
[data-theme="dark"] .btn-action:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-muted);
}
[data-theme="dark"] .btn-action.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
[data-theme="dark"] .btn-clear {
  color: var(--text-muted);
}
[data-theme="dark"] .col-filter-input {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .col-filter-input:focus {
  border-color: var(--accent);
}

/* Responsive — Tablet */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.4rem;
  }
  .stat-number {
    font-size: 1.7rem;
  }
  #map {
    height: 500px;
  }
}

/* Responsive — Mobile */
@media (max-width: 768px) {
  .info-icon,
  .status-tip {
    display: none !important;
  }
  .hero-image {
    height: 160px;
  }
  .header-inner {
    margin-top: -50px;
    padding: 0 1rem 0.5rem;
  }
  h1 {
    font-size: 1.4rem;
    padding-right: 0;
  }
  .header-inner .hero-subtitle {
    font-size: 1rem;
  }
  .theme-toggle {
    position: static;
    transform: none;
    margin: 0.4rem auto 0;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
  .site-nav {
    width: 100%;
  }
  .nav-link {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.5rem;
    font-size: 0.78rem;
  }
  .last-updated {
    font-size: 0.75rem;
    padding: 0.3rem 0;
  }
  .stats-strip {
    gap: 1rem;
    padding: 0 1rem;
  }
  .stat-number {
    font-size: 1.4rem;
  }
  .outcome-bar {
    padding: 0 1rem;
  }
  .outcome-labels {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .outcome-label {
    font-size: 0.7rem;
  }
  .hyperscaler-bar {
    padding: 0 1rem;
  }
  .hs-chip {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  .map-controls {
    flex-wrap: wrap;
  }
  .size-by-label {
    font-size: 0.75rem;
  }
  .size-by-label select {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
  }
  #map {
    height: 350px;
  }
  .map-container {
    padding: 0 1rem;
  }
  .detail-panel {
    width: 100%;
    padding: 1.5rem 1rem;
  }
  .close-panel {
    top: 0.5rem;
    right: 0.5rem;
  }
  #detail-content h2 {
    font-size: 1.1rem;
    padding-right: 2rem;
  }
  .filters {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .filter-group {
    width: 100%;
  }
  .filters select, .filters button {
    width: 100%;
  }
  .search-bar input {
    font-size: 0.85rem;
  }
  .fights-list {
    padding: 0 1rem;
  }
  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .list-header h2 {
    font-size: 1.2rem;
  }
  .list-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .btn-action {
    flex: 1;
  }
  .legislation-tracker {
    padding: 0 1rem;
  }
  .legislation-header h2 {
    font-size: 1.2rem;
  }
  .leg-grid {
    grid-template-columns: 1fr;
  }
  .about-section {
    padding: 0 1rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 1.5rem 1rem;
  }
}

/* Responsive — Small phones */
@media (max-width: 400px) {
  h1 {
    font-size: 1.2rem;
  }
  .nav-link {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }
  .stat-number {
    font-size: 1.2rem;
  }
  .stat-label {
    font-size: 0.68rem;
  }
  #map {
    height: 280px;
  }
  .detail-panel {
    padding: 1rem 0.75rem;
  }
}

/* Print styles */
@media print {
  #map,
  .map-container .filters,
  .map-controls,
  .theme-toggle,
  .detail-panel,
  .hyperscaler-bar,
  .outcome-bar,
  .hero-image {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .stats-strip {
    break-inside: avoid;
  }
  #fights-table-container {
    overflow: visible;
    max-height: none;
    width: 100%;
  }
  #fights-table {
    width: 100%;
    font-size: 0.8rem;
  }
  #fights-table thead th {
    background: #eee;
    color: #333;
    position: static;
  }
  .detail-panel {
    display: none !important;
  }
  .search-bar,
  .list-actions {
    display: none !important;
  }
  header {
    background: #fff;
    border-bottom: 2px solid #333;
  }
  .site-nav {
    display: none;
  }
  h1 {
    color: #000;
    text-shadow: none;
  }
  footer {
    border-top: 1px solid #ccc;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}
