:root {
  --paper: #eef4f8;
  --paper-soft: #f9fcff;
  --ink: #0f172a;
  --muted: #334155;
  --teal: #0f766e;
  --amber: #d97706;
  --line: rgba(15, 23, 42, 0.26);
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.32) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.32);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.44);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

h1,
h2,
h3 {
  font-family: "Merriweather", Georgia, serif;
  margin: 0;
}

a {
  color: inherit;
}

.site-wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 2.2rem 0 2.5rem;
}

.homepage {
  padding-top: 1.8rem;
  padding-bottom: 2rem;
}

.site-kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font: 700 0.82rem/1 "DM Sans", "Segoe UI", sans-serif;
  color: var(--teal);
}

.site-title {
  margin-top: 0.55rem;
  font-size: clamp(2.4rem, 5.8vw, 4.2rem);
  line-height: 1.08;
}

.home-title {
  margin-top: 0;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.home-title-icon {
  width: clamp(2.2rem, 5vw, 3rem);
  height: auto;
  flex-shrink: 0;
  animation: fish-bob 2.6s ease-in-out infinite;
  transform-origin: 52% 52%;
}

@keyframes fish-bob {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(6deg) translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-title-icon {
    animation: none;
  }
}

.site-lead {
  margin-top: 0.75rem;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1.04rem;
}

.top-rule {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.1rem;
}

.homepage-top {
  margin-top: 1rem;
}

.section-title {
  font-size: 1.4rem;
}

.card-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
}

.editorial-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  border-radius: 10px;
  padding: 1.05rem;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.editorial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.card-tag {
  margin: 0;
  font: 700 0.8rem/1 "DM Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.card-tag.game {
  color: var(--amber);
}

.card-title {
  margin-top: 0.35rem;
  font-size: 1.36rem;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.card-head .card-title {
  margin-top: 0;
}

.card-icon,
.card-icon-image {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.25);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 0.78rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.card-icon-bio {
  background: #d9f0ea;
  color: #0f766e;
}

.card-icon-game {
  background: #fff1dc;
  color: #b45309;
}

.card-icon-image {
  object-fit: cover;
  display: block;
}

.card-copy {
  margin-top: 0.4rem;
  color: var(--muted);
  line-height: 1.45;
}

.card-cta {
  margin-top: auto;
  padding-top: 0.7rem;
  font: 700 0.9rem/1 "DM Sans", "Segoe UI", sans-serif;
  color: var(--teal);
}

.page-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--teal);
  font: 700 0.9rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.page-link-fish {
  width: auto;
  height: 0.95rem;
}

.page-link:hover {
  text-decoration: underline;
}

.subpage-panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  border-radius: 12px;
  padding: 1rem;
}

.maps-page {
  position: relative;
  min-height: 100vh;
  background: #e6eef5;
}

.maps-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, rgba(14, 116, 144, 0.2), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.2), transparent 40%),
    linear-gradient(155deg, #e6eef5 0%, #dbe8f2 58%, #e9f1f7 100%);
}

.maps-topbar {
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(249, 252, 255, 0.86);
  backdrop-filter: blur(8px);
}

.maps-topbar-inner {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.maps-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--teal);
  font: 700 0.92rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-back-fish {
  width: auto;
  height: 1rem;
}

.maps-back-link:hover {
  text-decoration: underline;
}

.maps-topbar-label {
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font: 700 0.8rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-contact-link {
  color: #334155;
  text-decoration: none;
  font: 700 0.82rem/1 "DM Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  opacity: 0.88;
}

.maps-contact-link:hover {
  text-decoration: underline;
  opacity: 1;
}

.maps-wrap {
  width: min(1680px, 98vw);
  padding-top: 1rem;
}

.maps-header {
  margin-bottom: 0.85rem;
}

.maps-title {
  margin-top: 0.35rem;
  font-size: clamp(1.9rem, 4.8vw, 2.9rem);
}

.maps-subtitle {
  margin: 0.35rem 0 0;
  color: #334155;
  font: 700 1.02rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  display: grid;
  gap: 0.18rem;
  line-height: 1.28;
}

.maps-subtitle-main,
.maps-subtitle-latest {
  max-width: 100%;
}

.maps-subtitle-has-latest .maps-subtitle-latest::before {
  content: none;
}

.maps-app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.maps-main {
  display: grid;
  grid-template-columns: minmax(640px, 60vw) minmax(360px, 40vw);
  gap: 0.85rem;
  align-items: start;
  justify-content: start;
  width: fit-content;
  max-width: 100%;
}

.maps-panel,
.maps-stage {
  border: 1px solid rgba(15, 23, 42, 0.32);
  border-radius: 10px;
  background: rgba(250, 253, 255, 0.92);
}

.maps-panel {
  padding: 0.65rem;
}

.maps-panel-title {
  margin: 0;
  font: 700 1rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  color: #10243b;
}

.maps-election-list {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.45rem;
}

.maps-predict-window {
  position: relative;
  width: 100%;
  max-height: none;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 9px;
  background: #fbfdff;
  box-shadow: none;
  z-index: auto;
  overflow: hidden;
}

.maps-predict-window-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  background: #fbfdff;
  color: #10243b;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  padding: 0.36rem 0.55rem;
  position: relative;
  z-index: 3;
}

.maps-predict-window-title {
  margin: 0;
  font: 700 1rem/1.15 "DM Sans", "Segoe UI", sans-serif;
}

.maps-predict-window-body {
  padding: 0.55rem 0.62rem 0.68rem;
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
  min-height: 0;
}

.maps-predict-grid {
  overflow: visible;
  max-height: none;
  border: 1px solid rgba(15, 23, 42, 0.17);
  border-radius: 8px;
  background: #f7fbff;
  padding: 0.38rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.32) transparent;
}

.maps-predict-grid::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.maps-predict-grid::-webkit-scrollbar-track {
  background: transparent;
}

.maps-predict-grid::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.32);
  border-radius: 999px;
}

.maps-predict-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.44);
}

.maps-predict-window.maps-predict-window-compact {
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.maps-predict-window.maps-predict-window-compact .maps-predict-window-body {
  flex: 1;
}

.maps-predict-window.maps-predict-window-compact .maps-predict-grid {
  flex: 0 1 auto;
  max-height: none;
}

.maps-predict-window.maps-predict-window-fill {
  flex: 1;
  min-height: 0;
}

.maps-predict-window.maps-predict-window-fill .maps-predict-grid {
  flex: 1;
  max-height: none;
}

.maps-predict-window.maps-predict-window-force-scroll .maps-predict-grid {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: none;
  min-height: 0;
}

.maps-predict-window.maps-predict-window-force-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.maps-predict-window.maps-predict-window-force-scroll .maps-predict-window-body {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: min(52vh, 430px);
  min-height: 0;
}

.maps-predict-window.maps-predict-window-force-scroll .maps-predict-window-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-top: 0.32rem;
  padding-top: 0.36rem;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
  background: #fbfdff;
}

.maps-predict-grid-table {
  width: 100%;
  border-collapse: collapse;
}

.maps-predict-grid-table th,
.maps-predict-grid-table td {
  padding: 0.2rem 0.24rem;
  text-align: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.09);
  background: #f7fbff;
}

.maps-predict-grid-table th:first-child,
.maps-predict-grid-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #f7fbff;
}

.maps-predict-grid-table th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #eef4fb;
  color: #1e293b;
  font: 700 0.73rem/1.1 "DM Sans", "Segoe UI", sans-serif;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.1);
}

.maps-predict-grid-table th:first-child {
  z-index: 7;
  background: #eef4fb;
}

.maps-predict-grid-table td:first-child {
  z-index: 2;
}

.maps-predict-grid-th-label {
  margin-left: 0.22rem;
  font: 700 0.68rem/1 "DM Sans", "Segoe UI", sans-serif;
  color: #1e293b;
  white-space: nowrap;
}

.maps-predict-grid-swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid rgba(15, 23, 42, 0.24);
}

.maps-predict-grid-swatch-nat {
  background: linear-gradient(90deg, #fdf38e 0%, #fdf38e 50%, #005b54 50%, #005b54 100%);
}

.maps-predict-grid-swatch-other {
  background: #9ca3af;
}

.maps-predict-grid-region {
  font: 700 0.77rem/1.15 "Source Sans 3", "Segoe UI", sans-serif;
  color: #0f172a;
  white-space: nowrap;
}

.maps-predict-grid-region-child {
  padding-left: 0.8rem;
  color: #334155;
}

.maps-predict-region-label-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.maps-predict-expand-btn {
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #173253;
  font: 700 0.68rem/1 "DM Sans", "Segoe UI", sans-serif;
  padding: 0.16rem 0.45rem;
  cursor: pointer;
}

.maps-predict-expand-btn:hover {
  background: #edf4fb;
}

.maps-predict-grid-input {
  width: 3.6rem;
  border: 1px solid rgba(15, 23, 42, 0.24);
  border-radius: 6px;
  padding: 0.16rem 0.2rem;
  font: 700 0.75rem/1 "DM Sans", "Segoe UI", sans-serif;
  text-align: center;
  color: #0f172a;
  background: #ffffff;
}

.maps-predict-grid-input:focus {
  outline: none;
  border-color: #1f3b5a;
  box-shadow: 0 0 0 2px rgba(31, 59, 90, 0.15);
}

.maps-predict-grid-total {
  color: #334155;
  font: 700 0.77rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-predict-grid-total.maps-predict-grid-total-over {
  color: #d93025;
}

.maps-predict-window-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.42rem;
}

.maps-election-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #f5f9fc;
  color: #173253;
  border-radius: 8px;
  padding: 0.48rem 0.55rem;
  font: 600 0.93rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.maps-election-item.active,
.maps-election-item:hover {
  background: #15314f;
  border-color: #15314f;
  color: #fff;
}

.maps-stage {
  display: flex;
  flex-direction: column;
  padding: 0.65rem;
  position: relative;
}

.maps-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.maps-popups-wrap {
  position: absolute;
  top: 3.75rem;
  left: 1rem;
  right: 1rem;
  z-index: 7;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.maps-control-popup {
  width: min(270px, 42vw);
  border: 1px solid rgba(15, 23, 42, 0.24);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.maps-control-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(135deg, #173253 0%, #1f3b5a 62%, #234565 100%);
  color: #ffffff;
  padding: 0.48rem 0.68rem;
}

.maps-control-popup-title {
  margin: 0;
  font: 700 1.02rem/1 "DM Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.maps-control-popup-close {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font: 700 0.9rem/1 "DM Sans", "Segoe UI", sans-serif;
  cursor: pointer;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0;
}

.maps-control-popup-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.maps-control-popup-body {
  padding: 0.62rem 0.68rem 0.7rem;
  display: grid;
  gap: 0.44rem;
}

.maps-control-popup-body select,
.maps-control-popup-body input {
  border: 1px solid rgba(15, 23, 42, 0.23);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: 600 0.88rem/1.2 "Source Sans 3", "Segoe UI", sans-serif;
  color: #0f172a;
  background: #ffffff;
}

.maps-control-popup-body select:focus,
.maps-control-popup-body input:focus {
  outline: none;
  border-color: #1f3b5a;
  box-shadow: 0 0 0 2px rgba(31, 59, 90, 0.16);
}

.maps-range-row {
  margin-top: 0.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: #0f172a;
  font: 700 0.81rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-range-row input {
  width: 4.4rem;
}

.maps-control-note {
  margin: 0.18rem 0 0;
  color: #1f2937;
  font: 600 0.8rem/1.28 "Source Sans 3", "Segoe UI", sans-serif;
}

.maps-apply-btn.is-active {
  background: #0f2f4d;
  border-color: #0f2f4d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.maps-choropleth-legend {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 6;
  border: 1px solid rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.94);
  padding: 0.42rem 0.52rem;
  color: #0f172a;
  font: 700 0.74rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  min-width: 210px;
}

.maps-choropleth-legend-title {
  font: 700 0.74rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  margin-bottom: 0.22rem;
}

.maps-choropleth-legend-bar {
  height: 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.22);
}

.maps-choropleth-legend-labels {
  margin-top: 0.18rem;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font: 700 0.68rem/1.1 "DM Sans", "Segoe UI", sans-serif;
  color: #334155;
}

.maps-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.maps-tool-btn,
.maps-icon-btn,
.maps-apply-btn {
  border: 1px solid #163451;
  background: #1f3b5a;
  color: #fff;
  border-radius: 8px;
  padding: 0.42rem 0.65rem;
  font: 700 0.86rem/1 "DM Sans", "Segoe UI", sans-serif;
  cursor: pointer;
}

.maps-icon-btn {
  min-width: 2rem;
  padding: 0.42rem 0.5rem;
}

.maps-tool-btn:hover,
.maps-icon-btn:hover,
.maps-apply-btn:hover {
  background: #102c48;
}

.maps-search-label {
  color: #334155;
  font: 600 0.85rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-toolbar input,
.maps-controls-grid select {
  border: 1px solid rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: 600 0.86rem/1.2 "Source Sans 3", "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f8fbff;
}

.maps-zoom-value {
  color: #334155;
  font: 700 0.82rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-zoom-overlay {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.maps-viewport {
  position: relative;
  margin-top: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.24);
  background: #dce4ea;
  min-height: 760px;
  overflow: hidden;
  cursor: grab;
}

.maps-viewport:active {
  cursor: grabbing;
}

.maps-svg {
  width: 100%;
  height: 100%;
  min-height: 760px;
}

.maps-map-content {
  transform-origin: center;
}

.maps-water {
  fill: #dce4ea;
}

.maps-map-bg {
  fill: #dce4ea;
}

.maps-region-path {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 0.9;
  cursor: pointer;
}

.maps-region-path:hover {
  stroke: #0f172a;
  stroke-width: 1.35;
}

.maps-region-path.maps-region-path-active {
  stroke: #0f172a;
  stroke-width: 1.35;
  animation: maps-seat-selected-pulse 2.6s ease-in-out infinite;
}

@keyframes maps-seat-selected-pulse {
  0%,
  100% {
    fill-opacity: 1;
  }
  50% {
    fill-opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .maps-region-path.maps-region-path-active {
    animation: none;
  }
}

.maps-region-boundary {
  fill: none;
  stroke: rgba(15, 23, 42, 0.34);
  stroke-width: 1.25;
  stroke-linejoin: round;
  pointer-events: none;
}

.maps-seat-popup {
  position: absolute;
  top: 3.9rem;
  right: 1rem;
  width: min(460px, calc(100% - 2rem));
  max-height: min(58vh, 520px);
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.28);
  border-radius: 9px;
  background: rgba(251, 253, 255, 0.98);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.2);
  z-index: 8;
  padding: 0.55rem;
}

.maps-seat-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.maps-seat-popup-title {
  margin: 0;
  color: #10243b;
  font: 700 1rem/1.2 "DM Sans", "Segoe UI", sans-serif;
}

.maps-seat-popup-close {
  border: 1px solid rgba(15, 23, 42, 0.25);
  border-radius: 7px;
  background: #f5f9fc;
  color: #173253;
  font: 700 0.9rem/1 "DM Sans", "Segoe UI", sans-serif;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
}

.maps-seat-popup-meta {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  color: #1f2937;
  font: 600 0.78rem/1.2 "Source Sans 3", "Segoe UI", sans-serif;
}

.maps-popup-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.maps-seat-popup-list {
  margin-top: 0.45rem;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  padding-top: 0.35rem;
}

.maps-popup-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.24rem 0.28rem;
  border-radius: 4px;
  border-bottom: 1px dotted rgba(15, 23, 42, 0.15);
}

.maps-popup-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--maps-popup-bar-width, 0%);
  background: var(--maps-popup-bar-colour, transparent);
  opacity: 0.46;
  pointer-events: none;
}

.maps-popup-row > * {
  position: relative;
  z-index: 1;
}

.maps-popup-party {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  text-align: left;
  min-width: 0;
  gap: 0.35rem;
  font: 700 0.83rem/1.2 "Source Sans 3", "Segoe UI", sans-serif;
  color: #0f172a;
}

.maps-popup-values {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 0.45rem;
  font: 700 0.8rem/1.1 "DM Sans", "Segoe UI", sans-serif;
  color: #0f172a;
}

.seat {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 2;
}

.seat-lab {
  fill: #e40046;
}

.seat-con {
  fill: #1f84d1;
}

.seat-lib {
  fill: #ffb619;
}

.seat-snp {
  fill: #efe67a;
}

.seat-pc {
  fill: #007064;
}

.seat-ni {
  fill: #43a047;
}

.maps-region:hover .seat {
  stroke: #0f172a;
  stroke-width: 3;
}

.maps-panel-right {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.maps-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.maps-inline-btn {
  border: 1px solid rgba(15, 23, 42, 0.28);
  background: #f5f9fc;
  color: #173253;
  border-radius: 7px;
  padding: 0.25rem 0.5rem;
  font: 700 0.78rem/1 "DM Sans", "Segoe UI", sans-serif;
  cursor: pointer;
}

.maps-inline-btn:hover {
  background: #e9f1f8;
}

.maps-card {
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 9px;
  background: #fbfdff;
  padding: 0.55rem;
}

.maps-meta {
  margin: 0.35rem 0 0.5rem;
  color: #475569;
  font: 600 0.85rem/1.25 "Source Sans 3", "Segoe UI", sans-serif;
}

.maps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.maps-table th,
.maps-table td {
  padding: 0.22rem 0.3rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  text-align: left;
}

.maps-table th[data-sort-key] {
  cursor: pointer;
}

.maps-table .vote-pct-col {
  white-space: nowrap;
}

.maps-table.hide-comparison-cols .comparison-col {
  display: none;
}

.maps-table.hide-vote-total-col .vote-total-col {
  display: none;
}

.maps-party-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.maps-party-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.25);
}

.maps-delta-positive {
  color: #0f9d58;
  font-weight: 700;
}

.maps-delta-negative {
  color: #d93025;
  font-weight: 700;
}

.maps-delta-neutral {
  color: #0f172a;
}

.maps-seat-list {
  flex: 1;
  min-height: 220px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  background: #f6fbff;
}

.maps-seat-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.maps-polltracker-view {
  width: 100%;
}

.maps-polltracker-card {
  min-height: 760px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.5rem;
}

.maps-polltracker-status {
  margin: 0;
}

.maps-polltracker-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.maps-polltracker-range-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}

.maps-polltracker-range-btn {
  padding: 0.28rem 0.48rem;
  font-size: 0.74rem;
}

.maps-polltracker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  background: #f8fbff;
  color: #173253;
  font: 700 0.78rem/1 "DM Sans", "Segoe UI", sans-serif;
  padding: 0.2rem 0.5rem;
}

.maps-polltracker-party-controls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.32rem;
}

.maps-polltracker-party-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #1f2937;
  font: 700 0.78rem/1.1 "Source Sans 3", "Segoe UI", sans-serif;
}

.maps-polltracker-chart-wrap {
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.45rem;
  min-height: 560px;
}

.maps-polltracker-chart-wrap svg {
  width: 100%;
  height: 540px;
  display: block;
}

.maps-polltracker-grid-line {
  stroke: rgba(15, 23, 42, 0.1);
  stroke-width: 1;
}

.maps-polltracker-crosshair {
  stroke: rgba(15, 23, 42, 0.34);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
  pointer-events: none;
}

.maps-polltracker-axis text {
  fill: #334155;
  font: 700 0.69rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-polltracker-axis-label {
  fill: #1f2937;
  font: 700 0.74rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.maps-polltracker-axis path,
.maps-polltracker-axis line {
  stroke: rgba(15, 23, 42, 0.25);
}

.maps-polltracker-empty {
  color: #475569;
  font: 700 0.86rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  padding: 1rem;
}

.maps-polltracker-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(15, 23, 42, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  padding: 0.36rem 0.46rem;
  color: #0f172a;
  font: 700 0.72rem/1.2 "DM Sans", "Segoe UI", sans-serif;
  white-space: nowrap;
}

.maps-polltracker-tooltip-party {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-bottom: 0.18rem;
}

.maps-seat-row {
  width: 100%;
  margin: 0 0 0.3rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
}

.maps-seat-row:hover {
  border-color: rgba(30, 64, 175, 0.35);
  background: #f8fbff;
}

.maps-seat-row.is-selected {
  border-color: rgba(30, 64, 175, 0.55);
  background: #eef5ff;
}

.maps-seat-name {
  font-size: 0.82rem;
  color: #0f172a;
  line-height: 1.2;
}

.maps-seat-main {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.maps-seat-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.maps-seat-owner-icon {
  flex-shrink: 0;
}

.maps-seat-gain {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.maps-seat-gain-placeholder {
  width: 0;
  height: 0;
}

.maps-seat-icon {
  width: 0.72rem;
  height: 0.72rem;
  display: inline-block;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.25);
}

.maps-seat-gain-label {
  font: 700 0.63rem/1 "DM Sans", "Segoe UI", sans-serif;
  color: #475569;
  letter-spacing: 0.02em;
}

.maps-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.maps-control-label {
  display: block;
  margin: 0.28rem 0 0.2rem;
  color: #334155;
  font: 700 0.79rem/1 "DM Sans", "Segoe UI", sans-serif;
}

.bio-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  align-items: start;
}

.bio-rail {
  display: grid;
  gap: 0.75rem;
  position: sticky;
  top: 1rem;
}

.bio-rail img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.photo-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.photo-grid img {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.footer-note {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  color: var(--muted);
}

.footer-note p {
  margin: 0;
}

@media (max-width: 640px) {
  .site-wrap {
    padding-top: 1.8rem;
  }

  .site-lead {
    font-size: 1rem;
  }

  .bio-layout {
    grid-template-columns: 1fr;
  }

  .bio-rail {
    position: static;
  }

  .maps-topbar-inner {
    padding: 0.65rem 0;
  }

  .maps-subtitle {
    display: grid;
    gap: 0.18rem;
    line-height: 1.28;
  }

  .maps-subtitle-has-latest .maps-subtitle-latest::before {
    content: none;
  }
}

@media (max-width: 1400px) {
  .maps-app {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .maps-main {
    grid-template-columns: minmax(560px, 58vw) minmax(320px, 42vw);
  }
}

@media (min-width: 981px) {
  .maps-toolbar-group-search {
    order: 1;
    width: auto;
    margin-left: auto;
  }
}

@media (max-width: 980px) {
  .maps-app {
    grid-template-columns: 1fr;
  }

  .maps-main {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .maps-panel-right {
    display: grid;
    grid-template-columns: 1fr;
  }

  .maps-card.maps-controls-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .maps-panel-right {
    grid-template-columns: 1fr;
  }

  .maps-controls-grid {
    grid-template-columns: 1fr;
  }

  .maps-viewport,
  .maps-svg {
    min-height: 520px;
  }
}
