:root {
  --layout-gutter: clamp(24px, 3.2vw, 56px);
  --filters-column-width: 320px;
  --viz-column-gap: clamp(18px, 3vw, 36px);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page--wide {
  width: 100%;
  max-width: 1700px;
  padding-left: 0;
  padding-right: var(--layout-gutter);
  padding-bottom: 0;
}

.page--wide .explorer-section {
  padding-left: 0;
  padding-right: 0;
}

body {
  margin: 0;
  background: #ffffff;
  overflow-x: hidden;
}

header.hero {
  background: transparent;
  border-radius: 0;
  padding: 6px 0 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  padding: 12px var(--layout-gutter);
  min-height: 52px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: -26px;
}

.site-header__logo img {
  height: clamp(24px, 2.6vw, 32px);
  width: auto;
  max-width: clamp(128px, 16vw, 170px);
}

.site-header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-banner {
  background: #e0ede6;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}

.site-banner__inner {
  max-width: 1700px;
  margin: 0 auto;
  padding: 26px var(--layout-gutter);
  padding-right: clamp(130px, 12vw, 220px);
}

.site-banner__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.site-banner__desc {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
  max-width: 1100px;
}

.site-banner__desc--suite {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(30, 41, 59, 0.86);
}

.site-banner__desc--view {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
}

.site-banner__corner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: 280px;
  pointer-events: none;
  user-select: none;
  opacity: 0.95;
}

.hero-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-top .logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-top img {
  width: clamp(140px, 22vw, 220px);
}

.hero-top h1 {
  font-weight: 600;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.02em;
  margin: 0;
}

.hero-top p {
  margin: 0;
  max-width: 680px;
  font-size: clamp(16px, 2.4vw, 18px);
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-top .hero-kicker {
  margin: 0 0 6px;
  max-width: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(22px, 3vw, 54px);
  justify-content: center;
  align-items: center;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 2px;
  border-radius: 0;
  border: none;
  font-size: 18px;
  font-weight: 500;
  color: #0f172a;
  transition: color 0.18s ease;
  line-height: 1.15;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: transparent;
  color: #0f172a;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  outline: none;
}
.nav-links a.is-current-page {
  background: transparent;
  color: #0f172a;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page--wide main {
  gap: 0;
}

section {
  background: transparent;
  border-radius: 0;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: none;
}

section h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.6vw, 30px);
  font-weight: 500;
}

section p {
  margin: 0 0 12px;
  color: var(--text-muted);
  max-width: 960px;
  line-height: 1.6;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.insight-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.insight-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.insight-card .insight-question {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.insight-card .insight-metric {
  margin: 8px 0 0;
  font-size: 38px;
  font-weight: 600;
  color: var(--accent);
}

.insight-card .insight-metric span {
  display: inline-block;
}

.insight-card .insight-meta {
  margin-top: auto;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insight-card .card-link {
  margin-top: 12px;
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-strong);
  color: #fff;
  font-size: 14px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.insight-card .card-link:hover,
.insight-card .card-link:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
  outline: none;
}


.map-section {
  position: relative;
  overflow: visible;
  border-radius: 0;
  background: #ffffff;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page--wide .map-section {
  --filters-column-end: var(--filters-column-width);
}

.viz-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 3vw, 36px);
  align-items: stretch;
  width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: var(--layout-gutter);
  box-sizing: border-box;
}

.page--wide .viz-shell,
.page--wide .section-footnote {
  background: linear-gradient(
    to right,
    #f1f1f1 0,
    #f1f1f1 var(--filters-column-end),
    #ffffff var(--filters-column-end),
    #ffffff 100%
  );
}

.viz-content {
  min-width: 0;
  width: 100%;
  max-width: 1700px;
  padding-right: 0;
  padding-top: 14px;
}

.filters-drawer {
  width: 56px;
  background: #f1f1f1;
  padding: 0;
  overflow: hidden;
  position: relative;
  align-self: stretch;
  transition: width 0.18s ease;
  min-height: 0;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  --drawer-control-height: 34px;
  --drawer-control-radius: 12px;
  --drawer-control-pad-x: 12px;
  --drawer-control-pad-right: 32px;
}

.filters-drawer:hover,
.filters-drawer:focus-within,
.filters-drawer.is-open {
  width: 320px;
}

.filters-drawer__toggle {
  appearance: none;
  border: 0;
  background: transparent;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  margin: 10px 0 0 12px;
}

.filters-drawer__panel {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 12px 14px;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.filters-drawer:hover .filters-drawer__panel,
.filters-drawer:focus-within .filters-drawer__panel,
.filters-drawer.is-open .filters-drawer__panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.filters-drawer__heading {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 2px 0 10px;
}

.filters-group + .filters-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.filters-group__heading {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #4b5565;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.filters-group__heading-text {
  min-width: 0;
}

.filters-group__info {
  appearance: none;
  border: 0;
  background: #001c3b;
  color: rgba(255, 255, 255, 0.92);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  position: relative;
  cursor: help;
  flex: 0 0 auto;
}

.filters-group__info::after {
  content: "";
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, 70vw);
  background: rgba(0, 28, 59, 0.96);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 40;
}

.filters-group__info:hover::after,
.filters-group__info:focus-visible::after {
  opacity: 0;
  transform: translateY(4px);
}

.filters-group__info:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 28, 59, 0.22);
}

.filters-group-info-tooltip {
  position: fixed;
  z-index: 1400;
  max-width: min(280px, calc(100vw - 20px));
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 28, 59, 0.96);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.filters-group-info-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.filters-drawer .map-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  min-height: auto;
}

.filters-drawer details.filter-tile {
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.filters-drawer details.filter-tile > summary {
  list-style: none;
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

.filters-drawer .filter-tile__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters-drawer .filter-tile__value {
  min-width: 0;
  flex: 0 1 auto;
  margin-left: auto;
  max-width: 52%;
  font-size: 12px;
  font-weight: 550;
  color: rgba(15, 23, 42, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.filters-drawer details.filter-tile > summary::-webkit-details-marker {
  display: none;
}

.filters-drawer details.filter-tile > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(77, 38, 245, 0.08);
  background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYgOGw0IDQgNC00IiBmaWxsPSJub25lIiBzdHJva2U9IiM0RDI2RjUiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  transform: rotate(0deg);
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.filters-drawer details.filter-tile[open] > summary::after {
  transform: rotate(180deg);
}

.filters-drawer details.filter-tile[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.filters-drawer details.filter-tile > :not(summary) {
  padding: 10px 12px 12px;
}

.filters-drawer details.filter-tile:focus-within {
  border-color: rgba(77, 38, 245, 0.45);
  box-shadow: 0 0 0 2px rgba(77, 38, 245, 0.08);
}

.filters-drawer details.filter-tile:hover {
  border-color: rgba(77, 38, 245, 0.22);
}

.filters-drawer details.filter-tile > summary:focus-visible {
  outline: none;
}

.filters-drawer .filter-select,
.filters-drawer .scenario-select,
.filters-drawer .scenario-rank-select {
  min-width: 0;
  width: 100%;
}

.filters-drawer .filter-select__trigger,
.filters-drawer .map-filters input {
  font-size: 13px;
  height: var(--drawer-control-height);
  padding: 0 var(--drawer-control-pad-x);
  min-width: 0;
  width: 100%;
  border-radius: var(--drawer-control-radius);
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
}

.filters-drawer .filter-select__trigger {
  display: flex;
  align-items: center;
  padding-right: var(--drawer-control-pad-right);
  background-position: right 10px center;
  background-size: 11px;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: flex-start;
}

.filters-drawer .map-filters input {
  padding-right: var(--drawer-control-pad-right);
  line-height: calc(var(--drawer-control-height) - 2px);
}

.filters-drawer .filter-select.is-active .filter-select__trigger,
.filters-drawer .map-filters input.is-active {
  background: #001c3b;
  color: rgba(255, 255, 255, 0.96);
  border-color: #001c3b;
  box-shadow: none;
}

.filters-drawer .filter-select__list {
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.filters-drawer .filter-select__item button {
  font-size: 13px;
  padding: 7px 12px;
}

.filters-drawer .range-dual {
  min-width: 0;
  max-width: none;
  padding-top: 14px;
  padding-left: calc(var(--range-thumb-size, 11px) / 2);
  padding-right: calc(var(--range-thumb-size, 11px) / 2);
  --range-thumb-size: 11px;
  --range-track-height: 4px;
  --range-track-active: rgba(15, 23, 42, 0.55);
}

.filters-drawer .range-dual::before {
  top: 7px;
  left: 0;
  right: 0;
}

.filters-drawer .range-dual input[type="range"] {
  top: 5px;
  left: 0;
  right: 0;
  width: 100%;
}

.filters-drawer .range-dual .range-label {
  font-size: 11px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-muted);
}

.filters-drawer .range-label {
  margin-top: 2px;
  line-height: 1.2;
}

.page--wide:not(.mrp-page) .filters-drawer .range-dual {
  padding-top: 20px;
  --range-thumb-size: 13px;
  --range-track-height: 5px;
}

.page--wide:not(.mrp-page) .filters-drawer .range-dual::before {
  top: 10px;
}

.page--wide:not(.mrp-page) .filters-drawer .range-dual input[type="range"] {
  top: 8px;
}

.page--wide:not(.mrp-page) .filters-drawer .range-dual .range-label {
  font-size: 12px;
}

.page--wide:not(.mrp-page) .filters-drawer .range-label {
  margin-top: 8px;
}

.filters-drawer.filters-drawer--always-open {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  overflow: visible;
}

.filters-drawer.filters-drawer--always-open:hover,
.filters-drawer.filters-drawer--always-open:focus-within,
.filters-drawer.filters-drawer--always-open.is-open {
  width: 320px;
}

.filters-drawer.filters-drawer--always-open .filters-drawer__toggle {
  display: none;
}

.filters-drawer.filters-drawer--always-open .filters-drawer__panel {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  padding: 10px 14px 14px var(--layout-gutter);
  opacity: 1;
  transform: none;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: visible;
}

.page--wide:not(.mrp-page) .filters-drawer.filters-drawer--always-open .filters-drawer__panel {
  overflow-y: visible;
  overflow-x: visible;
}

.filters-drawer.filters-drawer--always-open .map-filters {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}

.filters-drawer.filters-drawer--always-open .map-filters .filter-field {
  min-width: 0;
}

.filters-drawer.filters-drawer--always-open details.filter-tile {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.filters-drawer.filters-drawer--always-open details.filter-tile > summary {
  height: auto;
  padding: 0 0 4px;
  font-size: 10px;
  font-weight: 640;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.66);
  cursor: default;
}

.filters-drawer.filters-drawer--always-open .filters-drawer__heading,
.filters-drawer.filters-drawer--always-open .filters-group__heading {
  padding-left: 0;
}

.filters-drawer.filters-drawer--always-open details.filter-tile > summary::after,
.filters-drawer.filters-drawer--always-open .filter-tile__value {
  display: none;
}

.filters-drawer.filters-drawer--always-open details.filter-tile[open] > summary {
  border: 0;
  border-radius: 0;
}

.filters-drawer.filters-drawer--always-open details.filter-tile > :not(summary) {
  padding: 0;
}

.filters-drawer.filters-drawer--always-open .filter-select__trigger,
.filters-drawer.filters-drawer--always-open .map-filters input:not([type="range"]) {
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
}

.viz-content .insight-header {
  margin-bottom: 8px;
}
@media (max-width: 900px) {
  .viz-shell {
    grid-template-columns: 1fr;
  }

  .filters-drawer {
    width: 100%;
  }

  .filters-drawer__toggle {
    display: none;
  }

  .filters-drawer__panel {
    position: static;
    padding: 12px 16px 16px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: visible;
  }
}

.deep-dive-section {
  background: #f1f1f1;
}

.deep-dive-subtitle-row {
  margin: 6px 0 4px;
  display: flex;
  align-items: center;
}

.deep-dive-subtitle {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.deep-dive-filters {
  margin-top: 6px;
  gap: 8px;
}

.shared-filters-note {
  font-size: 13px;
  color: var(--text-muted);
}

.deep-dive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--text-primary);
}

.deep-dive-toggle input {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid #0f172a;
  appearance: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.deep-dive-toggle.is-active {
  color: #101828;
  font-weight: 600;
}

.deep-dive-toggle.is-active input {
  background: #0f172a;
  border-color: #0f172a;
}

.deep-dive-toggle span {
  display: inline-block;
  white-space: normal;
  line-height: 1.2;
}

.deep-dive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.05fr);
  gap: clamp(16px, 3vw, 24px);
  align-items: start;
  margin-top: 8px;
}

.deep-dive-map-wrapper {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

#deepdive-map {
  width: 100%;
  height: clamp(340px, 52vh, 520px);
}

.deep-dive-list {
  background: #f1f1f1;
  border-radius: 10px;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: clamp(340px, 52vh, 520px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
}

.deep-dive-list::-webkit-scrollbar {
  width: 8px;
}

.deep-dive-list::-webkit-scrollbar-track {
  background: transparent;
}

.deep-dive-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

.deep-dive-list::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.85);
}

.deep-dive-empty {
  margin: 0;
  color: var(--text-muted);
}

.deep-dive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px 8px;
  border-radius: 8px;
  background: transparent;
  border: none;
}

.deep-dive-row.is-active {
  border: none;
}

.deep-dive-row .deep-dive-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deep-dive-row .deep-dive-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.deep-dive-row .deep-dive-region {
  font-size: 12px;
  color: var(--text-muted);
}

.deep-dive-row .deep-dive-track {
  position: relative;
  height: 28px;
  margin-top: 4px;
}

.deep-dive-row .deep-dive-track-line {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(16, 34, 58, 0.18);
  transform: translateY(-50%);
}

.deep-dive-row .deep-dive-dot {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: none;
  cursor: pointer;
  opacity: 1;
}

.deep-dive-row.is-active .deep-dive-dot {
  opacity: 1;
}

.deep-dive-list.deep-dive-has-active .deep-dive-row:not(.is-active) .deep-dive-dot {
  opacity: 0.25;
}

.deep-dive-list.deep-dive-has-active .deep-dive-row:not(.is-active) .deep-dive-name,
.deep-dive-list.deep-dive-has-active .deep-dive-row:not(.is-active) .deep-dive-region {
  opacity: 0.4;
}

.deep-dive-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.deep-dive-tooltip.hidden {
  opacity: 0;
  display: none;
}

.deep-dive-row .deep-dive-percent-row {
  display: none;
}

@media (max-width: 960px) {
  .deep-dive-grid {
    grid-template-columns: 1fr;
  }
  #deepdive-map {
    height: clamp(260px, 50vh, 360px);
  }
}

.insight-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 15px 0;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.insight-legend .legend-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insight-legend .legend-scale {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insight-legend .legend-scale::after {
  content: "";
}
.insight-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight-header h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 500;
}

.insight-header h2 #insight-question-heading {
  color: var(--text-muted);
  font-size: 0.92em;
}

.layout-summary {
  margin: 12px 0 0;
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 500;
  color: var(--text-primary);
  padding: 0;
}

.filter-summary {
  margin: 6px 0 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: none;
  width: 100%;
}

.impact-context {
  margin: -8px 0 14px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 550;
  color: rgba(15, 23, 42, 0.84);
  max-width: none;
  width: 100%;
}

.layout-summary + .filter-summary {
  margin-top: 6px;
}

.winner-circles-block {
  margin-top: 0;
  margin-left: 0;
  padding-left: 0;
  width: 100%;
}

.winner-circles-block.is-empty {
  display: none;
}

.winner-circles-header {
  margin: 0 0 4px;
  padding: 0;
  text-align: left;
}

.winner-circles-title.layout-summary {
  margin: 0;
  padding: 0;
  text-align: left;
}

.winner-circles-subtitle {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted);
  padding: 0;
  text-align: left;
}

.topical-page .filter-summary {
  margin: 4px 0 0;
}

.topical-page #layout-summary {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.topical-page .winner-circles-title.layout-summary {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 8px 0 8px;
}

.topical-page .winner-circles-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.topical-page .winner-circles-block {
  margin-top: 8px;
  padding-top: 0;
}

.topical-page .winner-circles-header {
  margin: 0 0 2px;
}

.topical-page .filter-summary + .winner-circles-block {
  margin-top: 16px !important;
  padding-top: 0 !important;
}

.topical-page .winner-circles-title.layout-summary {
  margin-top: 0 !important;
}

.winner-circles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 14px;
  align-items: start;
  width: 100%;
  margin: 0 0 6px;
}

.winner-circle-wrap {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
}

.winner-circle-wrap:disabled {
  cursor: default;
}

.winner-circle-wrap.is-selected .winner-circle {
  outline: 3px solid rgba(15, 23, 42, 0.22);
  outline-offset: 3px;
}

.winner-circle-wrap:focus-visible .winner-circle {
  outline: 3px solid rgba(15, 23, 42, 0.28);
  outline-offset: 3px;
}

.winner-circle-wrap.is-zero .winner-circle {
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.winner-circle-wrap:disabled .winner-circle {
  opacity: 0.72;
}

.winner-circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.winner-circle-name {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topical-page .party-breakdown {
  margin-top: 12px;
  width: 100%;
  height: 64px;
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

.topical-page .party-breakdown:empty {
  display: none;
}

.topical-page .party-breakdown__segment {
  flex: 1 1 0;
  min-width: 8px;
  border: none;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
  background: var(--surface-strong);
  color: var(--text-primary);
  font: inherit;
  position: relative;
}

.topical-page .party-breakdown__segment + .party-breakdown__segment {
  border-left: 2px solid #ffffff;
}

.topical-page .party-breakdown__segment:hover {
  filter: brightness(0.98);
}

.topical-page .party-breakdown__segment.is-selected {
  box-shadow: none;
}

.topical-page .party-breakdown__segment:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.85);
  outline-offset: -2px;
}

.topical-page .party-breakdown.has-selection .party-breakdown__segment {
  opacity: 0.35;
}

.topical-page .party-breakdown.has-selection .party-breakdown__segment.is-selected {
  opacity: 1;
}

.topical-page .party-breakdown__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
}

.topical-page .party-breakdown__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topical-page .party-breakdown__count {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.topical-page.is-exporting .party-breakdown__segment {
  padding: 10px 16px;
  align-items: center;
}

.topical-page.is-exporting .party-breakdown__label,
.topical-page.is-exporting .party-breakdown__count {
  line-height: 1.35;
}

.topical-page.is-exporting .party-breakdown__text {
  gap: 4px;
}

.topical-page .party-breakdown__segment.is-compact .party-breakdown__text {
  display: none;
}

.topical-overview-page .topic-leaderboard {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.topical-overview-page .topic-row {
  width: 100%;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 16px;
  align-items: center;
  text-align: left;
  color: inherit;
  transition: background 0.15s ease;
}

.topical-overview-page .topic-row + .topic-row {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.topical-overview-page .topic-row:hover {
  background: rgba(15, 23, 42, 0.02);
}

.topical-overview-page .topic-row__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.topical-overview-page .topic-row__label strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topical-overview-page .topic-row__meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}

.topical-overview-page.is-exporting .topic-row__label strong,
.topical-overview-page.is-exporting .topic-row__meta {
  line-height: 1.4;
  padding-top: 2px;
  padding-bottom: 1px;
}

.topical-overview-page .topic-row__chevron {
  font-size: 12px;
  font-weight: 600;
  color: var(--surface-strong);
  opacity: 0.85;
}

.topical-overview-page .topic-bar {
  height: 28px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

.topical-overview-page .topic-bar__segment {
  min-width: 4px;
  transition: filter 0.12s ease;
}

.topical-overview-page .topic-bar__segment + .topic-bar__segment {
  border-left: 2px solid #ffffff;
}

.topical-overview-page .topic-bar__segment:hover {
  filter: brightness(0.98);
}

.leaderboard-tooltip.topic-tooltip em {
  font-style: italic;
}

.topical-overview-page .map-filters {
  padding: 12px;
  min-height: 0;
  gap: 12px;
}

.topical-overview-page .map-filters .filter-field {
  gap: 6px;
  min-width: 160px;
}

.topical-overview-page .map-section {
  padding: 0;
}

.topical-overview-page .layout-summary {
  margin-top: 10px;
  font-size: 16px;
}

.topical-overview-page .section-footnote {
  margin-top: 0;
}

.section-footnote {
  margin: 0;
  padding-top: 10px;
  padding-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.page--wide .section-footnote {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: calc(var(--filters-column-width) + var(--viz-column-gap));
  padding-right: var(--layout-gutter);
  box-sizing: border-box;
}

.section-source {
  margin: 0;
  font-size: 13px;
  line-height: 1;
  color: var(--text-muted);
  position: relative;
  top: 2px;
}

.section-logo {
  display: block;
  height: clamp(16px, 2.4vw, 24px);
  width: auto;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  align-content: flex-start;
  margin: 0;
  padding: 18px;
  background: #f1f1f1;
  border: 1px;
  border-color: #ffffff;
  border-radius: 0px;
  min-height: 120px;
}

.map-filters .filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 170px;
}

.range-dual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
  max-width: 210px;
  position: relative;
  padding-top: 26px;
  padding-left: 0;
  padding-right: 0;
  --range-start: 0%;
  --range-end: 100%;
  --range-thumb-size: 15px;
  --range-thumb-radius: calc(var(--range-thumb-size) / 2);
  --range-track-height: 6px;
  --range-track-muted: rgba(217, 225, 236, 0.5);
  --range-track-active: rgba(15, 23, 42, 0.65);
}

.range-dual::before {
  content: "";
  position: absolute;
  left: calc(var(--range-thumb-radius, 9px) * -1);
  right: calc(var(--range-thumb-radius, 9px) * -1);
  top: 12px;
  height: var(--range-track-height, var(--range-thumb-size));
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--range-track-muted) 0%,
    var(--range-track-muted) var(--range-start),
    var(--range-track-active) var(--range-start),
    var(--range-track-active) var(--range-end),
    var(--range-track-muted) var(--range-end),
    var(--range-track-muted) 100%
  );
  pointer-events: none;
}

.range-dual input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: calc(100% + var(--range-thumb-size, 18px));
  height: var(--range-track-height, var(--range-thumb-size, 18px));
  background: transparent;
  position: absolute;
  left: calc(var(--range-thumb-radius, 9px) * -1);
  right: calc(var(--range-thumb-radius, 9px) * -1);
  top: 10px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  z-index: 1;
}

.range-dual input[type="range"]::-webkit-slider-runnable-track {
  height: var(--range-track-height, var(--range-thumb-size, 18px));
  background: transparent;
}

.range-dual input[type="range"]::-moz-range-track {
  height: var(--range-track-height, var(--range-thumb-size, 18px));
  background: transparent;
}

.range-dual input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--range-thumb-size, 18px);
  height: var(--range-thumb-size, 18px);
  border-radius: 50%;
  background: #0f172a;
  border: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  margin-top: calc((var(--range-track-height, var(--range-thumb-size, 18px)) - var(--range-thumb-size, 18px)) / 2);
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.range-dual input[type="range"]::-moz-range-thumb {
  width: var(--range-thumb-size, 18px);
  height: var(--range-thumb-size, 18px);
  border-radius: 50%;
  background: #0f172a;
  border: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  margin-top: calc((var(--range-track-height, var(--range-thumb-size, 18px)) - var(--range-thumb-size, 18px)) / 2);
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.range-dual input[type="range"]:first-of-type::-webkit-slider-thumb,
.range-dual input[type="range"]:first-of-type::-moz-range-thumb {
  z-index: 4;
}

.range-dual .range-label {
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Slightly smaller label for the vote-delta slider so it stays on one line */
.mrp-page #impact-range .range-label {
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Slightly slimmer win-margin slider on the MRP page only */

.map-filters .filter-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.map-filters .filter-row--secondary .filter-field {
  min-width: 180px;
}

.deep-dive-top-row {
  align-items: flex-end;
  gap: 12px;
}

.scenario-page .map-filters {
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.mrp-page .map-filters {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* Tighter filter sizing on the MRP page to keep the win-margin slider beside the scenario pill */
.mrp-page .map-filters .filter-field {
  min-width: 150px;
}

.mrp-page .map-filters #win-margin-range {
  min-width: 170px;
  padding-left: 0;
  padding-right: 0;
  --range-end-adjust: 0%;
}

.mrp-page .map-filters #win-margin-range::before {
  left: calc(var(--range-thumb-radius, 9px) * -1);
  right: calc(var(--range-thumb-radius, 9px) * -1);
  --range-end-visual: var(--range-end);
  background: linear-gradient(
    90deg,
    var(--range-track-muted) 0%,
    var(--range-track-muted) var(--range-start),
    var(--range-track-active) var(--range-start),
    var(--range-track-active) var(--range-end-visual),
    var(--range-track-muted) var(--range-end-visual),
    var(--range-track-muted) 100%
  );
}

.mrp-page .map-filters #win-margin-range input[type="range"] {
  left: calc(var(--range-thumb-radius, 9px) * -1);
  right: calc(var(--range-thumb-radius, 9px) * -1);
  width: calc(100% + var(--range-thumb-size, 18px));
}

.mrp-page .filters-drawer details.filter-tile {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.mrp-page .filters-drawer {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  overflow: visible;
}

.mrp-page .filters-drawer:hover,
.mrp-page .filters-drawer:focus-within,
.mrp-page .filters-drawer.is-open {
  width: 320px;
}

.mrp-page .filters-drawer__toggle {
  display: none;
}

.mrp-page .filters-drawer__panel {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  padding: 10px 14px 14px var(--layout-gutter);
  opacity: 1;
  transform: none;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: visible;
}

.mrp-page .filters-drawer .map-filters {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}

.mrp-page .filters-drawer .map-filters .filter-field {
  min-width: 0;
}

.mrp-page .filters-drawer details.filter-tile > summary {
  height: auto;
  padding: 0 0 4px;
  font-size: 10px;
  font-weight: 640;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.66);
  cursor: default;
}

.mrp-page .filters-drawer .filters-drawer__heading,
.mrp-page .filters-drawer .filters-group__heading {
  padding-left: 0;
}

.mrp-page .filters-drawer details.filter-tile > summary::after,
.mrp-page .filters-drawer .filter-tile__value {
  display: none;
}

.mrp-page .filters-drawer details.filter-tile[open] > summary {
  border: 0;
  border-radius: 0;
}

.mrp-page .filters-drawer details.filter-tile > :not(summary) {
  padding: 0;
}

.mrp-page .filters-drawer details.filter-tile.filter-tile--range > :not(summary) {
  padding: 2px 2px 6px;
}

.mrp-page .filters-drawer .filter-select__trigger,
.mrp-page .filters-drawer .map-filters input:not([type="range"]) {
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
}

.mrp-page .filters-drawer #impact-range {
  min-width: 0;
  max-width: none;
  width: 100%;
  padding-top: 16px;
  padding-left: calc(var(--range-thumb-size, 11px) / 2);
  padding-right: calc(var(--range-thumb-size, 11px) / 2);
}

.mrp-page .filters-drawer #impact-range::before {
  top: 8px;
  left: 0;
  right: 0;
}

.mrp-page .filters-drawer #impact-range input[type="range"] {
  top: 6px;
  left: 0;
  right: 0;
  width: 100%;
}

.map-filters #concern-range {
  display: none;
}


.map-filters .filter-field label {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-filters input,
.filter-select__trigger {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 3px ;
  border-color: #ffffff;
  background: #ffffff;
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  min-width: 200px;
}

.map-filters input {
  cursor: text;
}

.map-filters input.is-active,
.filter-select.is-active .filter-select__trigger {
  background: #001c3b;
  color: #ffffff;
  border-color: transparent;
}

.map-filters input.is-active::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.map-filters input:focus-visible,
.filter-select__trigger:focus-visible {
  outline: none;
  border-color: var(--surface-strong);
}

.map-filters input.is-mismatch {
  border-color: #ffc7c7;
  color: #ffc7c7;
}

.map-filters .filter-highlight input {
  min-width: 210px;
}

.filter-select {
  position: relative;
}

.filter-select__trigger {
  width: 100%;
  cursor: pointer;
  text-align: left;
  padding-right: 48px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYgOGw0IDQgNC00IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px;
}

.filter-select:not(.is-active) .filter-select__trigger {
  color: var(--text-muted);
}

.filter-select__trigger::placeholder {
  color: var(--text-muted);
}

.filter-select__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.15);
  padding: 6px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.filter-select.is-open .filter-select__list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.filter-select__item button {
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
}

.filter-select__item button:hover,
.filter-select__item button:focus-visible,
.filter-select__item button.is-selected {
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}

.filter-select__item button.is-selected {
  font-weight: 600;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 0;
}

.topical-page .inview-panel,
.mrp-page .inview-panel {
  margin-top: 22px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 16px 16px 10px;
}

.topical-page .inview-panel {
  display: none;
}

.topical-page .inview-panel__header,
.mrp-page .inview-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.topical-page .inview-panel__title,
.mrp-page .inview-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.topical-page .inview-panel__summary,
.mrp-page .inview-panel__summary {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.topical-page .inview-panel__actions,
.mrp-page .inview-panel__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topical-page .inview-panel__export,
.mrp-page .inview-panel__export {
  padding: 10px 16px;
  font-size: 14px;
}

.topical-page .inview-panel__table-wrap,
.mrp-page .inview-panel__table-wrap {
  margin-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  overflow: auto;
  max-height: 380px;
}

.topical-page .inview-table,
.mrp-page .inview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 980px;
}

.topical-page .inview-table th,
.topical-page .inview-table td,
.mrp-page .inview-table th,
.mrp-page .inview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: top;
  white-space: nowrap;
}

.topical-page .inview-table th,
.mrp-page .inview-table th {
  position: sticky;
  top: 0;
  background: #f1f1f1;
  text-align: left;
  font-weight: 600;
  z-index: 2;
}

.topical-page .inview-table td:first-child,
.mrp-page .inview-table td:first-child {
  white-space: normal;
  min-width: 220px;
}

.topical-page .inview-table a,
.mrp-page .inview-table a {
  color: var(--surface-strong);
  text-decoration: none;
  font-weight: 500;
}

.topical-page .inview-table a:hover,
.topical-page .inview-table a:focus-visible,
.mrp-page .inview-table a:hover,
.mrp-page .inview-table a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.topical-page .inview-table__empty,
.mrp-page .inview-table__empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 18px 12px;
}

.topical-page .inview-row:hover td,
.mrp-page .inview-row:hover td {
  background: rgba(15, 23, 42, 0.03);
}

.topical-page .inview-row.is-highlight td,
.mrp-page .inview-row.is-highlight td {
  background: rgba(254, 237, 1, 0.18);
}

.constituency-leaderboard {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(68vh, 640px);
  overflow: hidden;
}

.leaderboard-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 4px;
  margin: 6px 4px 0;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 0 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaderboard-item {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-item:hover {
  transform: none;
  box-shadow: none;
}

.topical-page .leaderboard-item {
  transition: opacity 0.15s ease;
}

.leaderboard-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-rank {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.leaderboard-top strong {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.leaderboard-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.leaderboard-meter {
  position: relative;
  height: 34px;
}

.leaderboard-meter .meter-track {
  position: absolute;
  top: 50%;
  left: 12px;
  right: 12px;
  height: 2px;
  background: rgba(148, 163, 184, 0.4);
  transform: translateY(-50%);
}

.leaderboard-meter .meter-dot {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.topical-page .leaderboard-meter {
  height: 40px;
}

.topical-page .leaderboard-meter .meter-dot {
  width: 16px;
  height: 16px;
  border: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  opacity: 0.78;
}

.leaderboard-meter .meter-label {
  position: absolute;
  top: calc(50% + 14px);
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.leaderboard-meter .meter-average {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s ease;
  display: none;
}

.leaderboard-meter .meter-average--national {
  background: var(--surface-strong);
}

.leaderboard-meter .meter-average--region {
  background: rgba(148, 163, 184, 0.9);
}

.leaderboard-item:hover .meter-average,
.leaderboard-item.is-highlight .meter-average {
  opacity: 1;
}

.leaderboard-item.is-highlight {
  box-shadow: none;
}

body:not(.topical-page) .leaderboard-item.is-highlight .meter-dot,
body:not(.topical-page) .leaderboard-item:hover .meter-dot {
  background: #FEED01 !important;
  opacity: 1;
}

.topical-page .leaderboard-list.has-hover .leaderboard-item {
  opacity: 0.35;
}

.topical-page .leaderboard-list.has-hover .leaderboard-item.is-hovered,
.topical-page .leaderboard-list.has-hover .leaderboard-item.is-highlight {
  opacity: 1;
}

.topical-page .leaderboard-list.has-highlight .leaderboard-item {
  opacity: 0.35;
}

.topical-page .leaderboard-list.has-highlight .leaderboard-item.is-highlight {
  opacity: 1;
}

.topical-page .leaderboard-list:has(.leaderboard-item.is-highlight) .leaderboard-item {
  opacity: 0.35;
}

.topical-page .leaderboard-list:has(.leaderboard-item.is-highlight) .leaderboard-item.is-highlight {
  opacity: 1;
}

.leaderboard-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 260px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.leaderboard-tooltip.hidden {
  display: none;
}

.leaderboard-tooltip strong {
  font-size: 13px;
  font-weight: 600;
}

.leaderboard-tooltip span {
  opacity: 0.85;
}
.leaderboard-tooltip .tooltip-dependent {
  font-weight: 600;
}
.leaderboard-tooltip .tooltip-average {
  opacity: 1;
  font-weight: 600;
}
.leaderboard-tooltip .tooltip-average--national {
  color: var(--surface-strong);
}
.leaderboard-tooltip .tooltip-average--region {
  color: #94a3b8;
}

.leaderboard-empty {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.leaderboard-list::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: transparent;
}

.map-summary-panel {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: none;
  overflow: visible;
}

.mrp-page .map-summary-panel {
  padding: 0 8px 8px;
}

.map-summary-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-summary-header h3 {
  margin: 0;
  font-size: 18px;
}

.mrp-page .map-summary-header .filter-select {
  margin-left: auto;
}
.map-summary-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.party-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.party-summary-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.party-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.party-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.party-label strong {
  font-size: 15px;
  font-weight: 500;
}

.party-label span {
  font-size: 12px;
  color: var(--text-muted);
}

.party-count {
  font-weight: 600;
  font-size: 15px;
}

.party-summary-bar {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.party-summary-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.summary-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  padding: 8px 0 0;
  width: 100%;
}

.mrp-page .summary-columns {
  gap: 6px;
}

.summary-columns .summary-column {
  display: grid;
  grid-template-rows: 100px 34px 16px 36px;
  align-items: stretch;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.summary-columns .summary-column > * {
  width: 100%;
  box-sizing: border-box;
}

.summary-columns .summary-column-bar {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

.summary-columns .summary-column-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 12px 12px 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 9px;
  min-height: 6px;
  z-index: 2;
  padding: 2px 3px;
}

.summary-columns .summary-column-bar-fill.is-label-outside {
  color: var(--text-primary);
}

.summary-columns .summary-column-bar-fill.is-label-outside span {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -4px);
  color: inherit;
  white-space: nowrap;
}

.summary-column-bar-shadow {
  position: absolute;
  inset: auto 0 0 0;
  border-radius: 12px 12px 8px 8px;
  background: rgba(15, 23, 42, 0.08);
  z-index: 1;
}

.summary-columns .summary-column-label {
  font-weight: 600;
  text-align: center;
  font-size: 10px;
  line-height: 1.3;
  height: 34px;
  max-height: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.summary-columns .summary-column-share {
  font-size: 10px;
  color: var(--text-muted);
  min-height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.summary-columns .scenario-diff {
  margin-top: 2px;
  align-self: stretch;
  text-align: center;
  min-height: 32px;
  color: var(--text-muted);
  font-size: 11px;
}

.mrp-page .scenario-summary-list .summary-column {
  grid-template-rows: 100px 34px 16px minmax(44px, auto);
}

.mrp-page .scenario-summary-list .scenario-diff {
  min-height: 44px;
  line-height: 1.25;
  overflow: visible;
  text-wrap: pretty;
  padding-bottom: 2px;
}

.party-summary-empty {
  color: var(--text-muted);
  font-size: 14px;
}

.explorer-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 8px;
  width: 100%;
  align-items: start;
  position: relative;
  min-height: 220px;
}

.explorer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: stretch;
  margin-top: 8px;
  width: 100%;
}

.scenario-page .explorer-summary-grid {
  display: none;
}

.scenario-page .explorer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.5vw, 24px);
  align-items: stretch;
}

.mrp-page .explorer-summary-grid {
  gap: 20px;
  margin-top: 0;
}

.summary-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 8px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #d6dce5;
  background: #eef2f7;
}

.summary-view-toggle__button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5565;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.summary-view-toggle__button:hover {
  background: rgba(77, 38, 245, 0.1);
  color: #1f2937;
}

.summary-view-toggle__button.is-active {
  background: #4d26f5;
  color: #ffffff;
}

.summary-sankey {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
}

.summary-sankey__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}

.summary-sankey__title {
  fill: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.summary-sankey__helper {
  fill: #475569;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.summary-sankey__chip {
  fill: rgba(226, 232, 240, 0.72);
  stroke: rgba(71, 85, 105, 0.2);
  stroke-width: 0.8;
}

.summary-sankey__chip-text {
  fill: #1e293b;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.summary-sankey__annotation {
  fill: rgba(51, 65, 85, 0.86);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.summary-sankey__annotation--detail {
  font-size: 8px;
  fill: rgba(71, 85, 105, 0.9);
  font-weight: 600;
}

.summary-sankey__annotation--gain {
  fill: #166534;
}

.summary-sankey__annotation--loss {
  fill: #b91c1c;
}

.summary-sankey__annotation--neutral {
  fill: #475569;
}

.summary-sankey__label {
  fill: rgba(15, 23, 42, 0.9);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: opacity 0.12s ease, fill 0.12s ease;
}

.summary-sankey__link {
  transition: stroke-opacity 0.12s ease, stroke-width 0.12s ease;
  stroke-opacity: 1;
}

.summary-sankey__node {
  transition: opacity 0.12s ease;
}

.summary-sankey__link.is-dimmed,
.summary-sankey__node.is-dimmed,
.summary-sankey__label.is-dimmed {
  opacity: 0.38;
  stroke-opacity: 0.38;
}

.summary-sankey__link.is-active {
  stroke-opacity: 0.96;
}

.summary-sankey__node.is-active,
.summary-sankey__label.is-active {
  opacity: 1;
}

.summary-sankey__tooltip {
  position: absolute;
  z-index: 4;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.96);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.summary-sankey__tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.summary-hover-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.97);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.summary-hover-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mrp-page .explorer-summary-grid.is-sankey .summary-sankey {
  display: block;
}

.mrp-page .explorer-summary-grid.is-sankey {
  min-height: 280px;
}

.mrp-page .explorer-summary-grid.is-sankey .map-summary-panel {
  opacity: 0;
  pointer-events: none;
}

.mrp-page .explorer-grid {
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: 0;
  align-items: flex-start;
}

.scenario-page .explorer-column--baseline,
.scenario-page .explorer-column--scenario {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.scenario-page .explorer-grid .map-card-header {
  min-height: 90px;
}

.scenario-page .explorer-column--baseline .map-card-header {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 11px;
}

.scenario-page .explorer-column--scenario .map-card-header {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 15px;
}

.mrp-page .map-summary-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.explorer-summary-grid .map-summary-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mrp-page .map-summary-panel:first-child .map-summary-header::after {
  content: "";
  flex: 0 0 180px;
}

.map-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: nowrap;
}

.map-card-header h3 {
  margin: 0;
}

.map-card-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.summary-under-map {
  padding: 12px 0 0;
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.summary-under-map .party-summary-list {
  gap: 10px;
  width: 100%;
}

.summary-under-map .party-summary-item {
  min-width: 0;
}

.scenario-side-panel {
  width: 100%;
}

.scenario-summary-bars {
  gap: 10px;
  width: 100%;
}

@media (max-width: 900px) {
  .scenario-page .explorer-grid {
    grid-template-columns: 1fr;
  }
}

.scenario-map-wrapper {
  position: relative;
}

.scenario-control-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 5;
}

.layout-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.scenario-select {
  min-width: 220px;
}

.scenario-rank-select {
  min-width: 200px;
}

/* Slightly tighter scenario pill in the MRP map filters */
.mrp-page .map-filters .scenario-select {
  min-width: 190px;
}

.mrp-page .map-filters .scenario-select .filter-select__trigger {
  min-width: 176px;
  padding-left: 12px;
  padding-right: 26px;
}

.scenario-summary-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.mrp-page .scenario-summary-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.scenario-summary-text {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  align-self: flex-start;
}
.scenario-summary-text h3 {
  margin: 0;
  text-align: left;
}

.baseline-map-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.baseline-summary-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  align-self: flex-start;
}

.mrp-page .scenario-summary-text {
  gap: 6px;
}

.scenario-select--inline {
  align-self: flex-start;
  flex-shrink: 0;
}

.scenario-header-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: auto;
  align-self: flex-start;
}

.baseline-header-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: auto;
  align-self: flex-start;
}

/* Scenario overview specific layout: stack title then controls */
.scenario-overview-page .baseline-map-header,
.scenario-overview-page .scenario-summary-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.scenario-overview-page .baseline-header-controls,
.scenario-overview-page .scenario-header-controls {
  width: auto;
  align-self: flex-start;
  gap: 6px;
  margin-top: 0;
}

.scenario-overview-page .scenario-header-controls {
  margin-top: -4px;
}

.scenario-overview-page .scenario-header-controls .filter-select__trigger,
.scenario-overview-page .baseline-header-controls .filter-select__trigger {
  padding-top: 8px;
  padding-bottom: 8px;
}

.mrp-page .scenario-summary-header .scenario-select--inline {
  margin-left: auto;
}

.scenario-summary-text h3 {
  margin: 0;
  text-align: left;
}

.scenario-header-controls,
.baseline-header-controls {
  width: auto;
  align-self: flex-start;
}

.scenario-page .map-card-header h3 {
  margin: 0;
}

.scenario-page .map-card-header .filter-select {
  min-width: 150px;
  width: auto;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .scenario-summary-header,
  .baseline-map-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .scenario-header-controls,
  .baseline-header-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

.map-card-header .filter-select__trigger {
  width: auto;
  min-width: 150px;
}

.header-pill {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.header-pill .pill-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}

@media (max-width: 720px) {
  .scenario-summary-header {
    flex-wrap: wrap;
  }
}

.scenario-summary-list .scenario-diff {
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-muted);
  margin: 1px 0 0;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.mrp-page .summary-columns .scenario-diff {
  min-height: 56px;
  line-height: 1.24;
  white-space: normal;
  word-break: normal;
  overflow: visible;
  padding-bottom: 4px;
}

.mrp-page .scenario-summary-list .summary-column {
  grid-template-rows: 100px 34px 16px minmax(56px, auto);
}

.scenario-summary-list .scenario-diff.positive {
  color: #166534;
}

.scenario-summary-list .scenario-diff.negative {
  color: #b91c1c;
}

.map-wrapper {
  position: relative;
  margin-top: 0;
  overflow: hidden;
  border: none;
  background: #ffffff;
}

#map {
  width: 100%;
  height: min(68vh, 640px);
}

#baseline-map,
#scenario-map {
  width: 100%;
  height: min(60vh, 760px);
}


.scenario-page #baseline-map,
.scenario-page #scenario-map {
  height: clamp(320px, 65vh, 700px);
}

.map-status {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(6px);
}

.map-status.hidden {
  display: none;
}

.map-status.error {
  background: rgba(185, 28, 28, 0.9);
}

.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 12px 16px;
  border-radius: 0;
  border: 0px solid rgba(148, 163, 184, 0.6);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: none;
}

.legend-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.legend-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.legend-step .swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.legend-step span {
  font-size: 13px;
}

.insight-legend .legend-scale--sequential {
  flex: 0 0 auto;
  width: clamp(220px, 24vw, 280px);
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.insight-legend .legend-scale--sequential .sequential-legend__bar {
  flex: 1;
  min-width: 140px;
  display: flex;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.insight-legend .legend-scale--sequential .sequential-legend__swatch {
  flex: 1;
  height: 100%;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: opacity 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.insight-legend .legend-scale--sequential .sequential-legend__swatch:hover,
.insight-legend .legend-scale--sequential .sequential-legend__swatch:focus-visible {
  transform: translateY(-1px);
  box-shadow: none;
  outline: none;
}

.insight-legend .legend-scale--sequential .sequential-legend__swatch.is-selected {
  opacity: 1;
  box-shadow: none;
}

.insight-legend .legend-scale--sequential .sequential-legend__swatch.is-dimmed {
  opacity: 0.28;
}

.insight-legend .legend-scale--sequential .sequential-legend__value {
  font-size: 13px;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 8;
  background: rgba(243, 244, 246, 0.94);
  color: #10223a;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  max-width: min(520px, 90vw);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  transform: none;
  transition: opacity 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
}

.map-tooltip.hidden {
  opacity: 0;
}

.map-tooltip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.map-tooltip span {
  display: block;
  line-height: 1.4;
}

.map-tooltip .tooltip-title {
  display: flex;
  flex-direction: row;
  gap: 6px;
  color: #000;
  font-weight: 600;
  font-size: 14px;
  flex-wrap: wrap;
}

.map-tooltip .tooltip-region {
  font-size: 12px;
  color: rgba(16, 34, 58, 0.7);
}

.map-tooltip .tooltip-meta,
.map-tooltip .tooltip-share,
.map-tooltip .tooltip-delta {
  font-size: 12px;
  line-height: 1.4;
}

.map-tooltip .tooltip-dependent {
  font-weight: 600;
}

.map-tooltip .tooltip-delta {
  color: #2e7d32;
}

.map-tooltip .tooltip-dots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.map-tooltip .tooltip-dotline {
  position: relative;
  width: 100%;
  height: 18px;
  margin-top: 2px;
}

.map-tooltip .tooltip-dotline-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
}

.map-tooltip .tooltip-dotline-point {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-tooltip .tooltip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-tooltip .tooltip-list.compact {
  gap: 4px;
}

.map-tooltip .tooltip-list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.map-tooltip .tooltip-list.compact .tooltip-list-row {
  gap: 6px;
}

.map-tooltip .tooltip-dot-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.map-tooltip .tooltip-list-row .tooltip-dot-label {
  font-size: 12px;
}

.map-tooltip .tooltip-list-row .tooltip-dot-share {
  font-size: 12px;
  text-align: right;
}

.map-tooltip .tooltip-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-tooltip .tooltip-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-tooltip .tooltip-bar-track {
  position: relative;
  width: 100%;
  height: 18px;
  border-radius: 12px;
  background: rgba(16, 34, 58, 0.1);
  overflow: hidden;
}

.map-tooltip .tooltip-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 12px;
}

.map-tooltip .tooltip-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #10223a;
  mix-blend-mode: multiply;
}

.map-tooltip .tooltip-bar-track.stacked {
  display: flex;
  align-items: stretch;
}

.map-tooltip .tooltip-bar-segment {
  display: block;
  height: 100%;
}

.map-tooltip .tooltip-percent-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.map-tooltip .tooltip-percent-chip {
  font-size: 12px;
  font-weight: 600;
}

.cta-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #001c3b;
  padding: 12px var(--layout-gutter) 8px;
  box-sizing: border-box;
}

.cta-section .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.export-layout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.export-layout__label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.export-layout__select {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  padding-right: 18px;
  min-width: 240px;
  line-height: 1.2;
  cursor: pointer;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYgOGw0IDQgNC00IiBmaWxsPSJub25lIiBzdHJva2U9IiM0RDI2RjUiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 14px;
}

.export-layout__select:focus-visible {
  outline: none;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.16s ease, opacity 0.16s ease, background-color 0.16s ease;
}

.cta-button.secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-1px);
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.cta-button[disabled],
.cta-button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.cta-button[disabled]:hover,
.cta-button[disabled]:focus-visible,
.cta-button[aria-disabled="true"]:hover,
.cta-button[aria-disabled="true"]:focus-visible {
  transform: none;
  opacity: 0.6;
}

footer {
  margin-top: 0;
  width: 100%;
  background: #001c3b;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  line-height: 1.2;
  padding: 48px var(--layout-gutter) 48px;
  border-radius: 0;
  box-sizing: border-box;
}

footer p {
  margin: 0;
  max-width: 1700px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .page--wide .viz-shell,
  .page--wide .section-footnote {
    background: #ffffff;
  }

  .page--wide .section-footnote {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .map-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .map-summary-panel {
    max-height: none;
  }

  .map-legend {
    position: static;
    margin: 12px;
  }
}

.maplibregl-ctrl.map-controls {
  margin: 16px 0 0 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-family: inherit;
}

.zoom-block {
  background: transparent;
  border: none;
  display: grid;
  gap: 8px;
}

.zoom-block--knob {
  display: grid;
  grid-template-rows: repeat(3, 36px);
}

.zoom-block + .zoom-block {
  margin-top: 10px;
}

.zoom-block__btn {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.zoom-block__btn:hover,
.zoom-block__btn:focus-visible {
  background: var(--surface-strong);
  color: #ffffff;
  border-color: transparent;
  outline: none;
}

.zoom-block__btn:active {
  transform: translateY(1px);
}

.zoom-block--single {
  display: grid;
}

.zoom-lock-btn {
  display: flex;
}

.zoom-lock-btn.is-active {
  background: var(--surface-strong);
  color: #ffffff;
  border-color: transparent;
}

.zoom-home__icon {
  font-size: 16px;
  line-height: 1;
  color: inherit;
}

.zoom-lock__icon {
  pointer-events: none;
  width: 18px;
  height: 18px;
  display: block;
}
.filters-group--export {
  margin-top: 2px;
}

.dashboard-export-panel {
  gap: 10px;
}

.dashboard-export-button {
  width: 100%;
  justify-content: flex-start;
  height: var(--drawer-control-height);
  padding: 0 var(--drawer-control-pad-right) 0 var(--drawer-control-pad-x);
  border-radius: var(--drawer-control-radius);
  border: 1px solid #4d26f5;
  background: #4d26f5;
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
}

.dashboard-export-button:hover,
.dashboard-export-button:focus-visible {
  transform: none;
  opacity: 1;
  background: #3e1fe0;
  color: #ffffff;
  border-color: #3e1fe0;
  box-shadow: none;
}

#export-explorer-table,
#export-explorer-image {
  background: #4d26f5;
  border-color: #4d26f5;
  color: #ffffff;
}

#export-explorer-table:hover,
#export-explorer-table:focus-visible,
#export-explorer-image:hover,
#export-explorer-image:focus-visible {
  background: #3e1fe0;
  border-color: #3e1fe0;
  color: #ffffff;
}

.dashboard-export-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.dashboard-export-label {
  font-size: 10px;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.66);
}

.dashboard-export-select {
  width: 100%;
  height: var(--drawer-control-height);
  border-radius: var(--drawer-control-radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  padding: 0 var(--drawer-control-pad-right) 0 var(--drawer-control-pad-x);
  appearance: none;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYgOGw0IDQgNC00IiBmaWxsPSJub25lIiBzdHJva2U9IiM0RDI2RjUiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.dashboard-export-select:focus-visible {
  outline: none;
  border-color: rgba(77, 38, 245, 0.5);
  box-shadow: none;
}

.filters-drawer .filter-select.is-active .filter-select__trigger,
.filters-drawer .map-filters input.is-active {
  background: #001c3b;
  color: rgba(255, 255, 255, 0.96);
  border-color: #001c3b;
}

.filters-drawer .map-filters input.is-active::placeholder {
  color: rgba(255, 255, 255, 0.78);
}
