.map-layout.map-layout--dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
}

.site-banner.site-banner--topbar {
  background: #e0ede6;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.site-banner.site-banner--topbar .site-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px var(--layout-gutter);
  padding-right: var(--layout-gutter);
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.site-topbar__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: clamp(-26px, -2vw, -14px);
}

.site-topbar__logo img {
  height: clamp(31px, 3.2vw, 44px);
  width: auto;
  max-width: clamp(236px, 27vw, 380px);
}

.site-topbar__nav {
  justify-content: flex-end;
}

.site-topbar__nav.nav-links a {
  font-size: 19px;
}

.political-page .viz-content {
  padding-top: 6px;
  max-width: none;
}

.political-page .insight-header {
  padding-top: 8px;
}

.political-mrp-body .viewport-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.political-mrp-body .viewport-shell > .page--wide.political-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.political-mrp-body .viewport-shell > .page--wide.political-page > main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.political-mrp-body .viewport-shell .map-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.political-mrp-body .viewport-shell .viz-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.political-mrp-body .viewport-shell .filters-drawer,
.political-mrp-body .viewport-shell .filters-drawer__panel {
  height: 100%;
  min-height: 0;
}

.political-mrp-body .viewport-shell .viz-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.political-page .layout-summary {
  margin-top: 4px;
  margin-bottom: 14px;
  width: 100%;
  max-width: none;
  font-size: clamp(15px, 2vw, 17px);
  color: rgba(15, 23, 42, 0.72);
}

.political-page #filters-summary:empty {
  display: none;
}

.political-page .filter-summary {
  margin-bottom: 14px;
}

.political-page .section-footnote {
  padding-top: 14px;
  padding-bottom: 18px;
}

.political-mrp-body .filters-drawer.filters-drawer--always-open .filters-drawer__heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #001c3b;
  margin: 0 0 10px;
}

.political-mrp-body .filters-drawer.filters-drawer--always-open .filters-group__heading {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #001c3b;
  margin: 0 0 8px;
}

.political-mrp-body .filters-drawer.filters-drawer--always-open details.filter-tile > summary {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(15, 23, 42, 0.78);
  padding-bottom: 2px;
}

.political-mrp-body .filters-drawer.filters-drawer--always-open details.filter-tile.filter-tile--range > summary {
  display: none;
}

.political-mrp-body .filters-drawer.filters-drawer--always-open details.filter-tile.filter-tile--range > :not(summary) {
  padding: 0 2px 6px;
}

.political-mrp-body .filters-drawer #win-margin-range {
  width: 100%;
  max-width: none;
  gap: 6px;
  padding-top: 62px;
  --win-margin-track-top: 35px;
  --range-thumb-size: 15px;
  --range-track-height: 15px;
  --range-track-muted: rgba(0, 28, 59, 0.08);
  --range-track-active: rgba(0, 28, 59, 0.14);
}

.political-mrp-body .filters-drawer #win-margin-range::before {
  top: var(--win-margin-track-top);
  height: var(--range-thumb-size);
  border: 0;
  outline: 0;
  box-shadow: none;
}

.political-mrp-body .filters-drawer #win-margin-range input[type="range"] {
  top: var(--win-margin-track-top);
  height: var(--range-thumb-size);
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  -webkit-appearance: none;
  appearance: none;
}

.political-mrp-body .filters-drawer #win-margin-range input[type="range"]::-webkit-slider-runnable-track {
  height: var(--range-thumb-size);
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.political-mrp-body .filters-drawer #win-margin-range input[type="range"]::-moz-range-track {
  height: var(--range-thumb-size);
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.political-mrp-body .filters-drawer #win-margin-range .range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 12px;
  line-height: 1.2;
}

.political-mrp-body .filters-drawer #win-margin-range .range-header__title {
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(15, 23, 42, 0.78);
  white-space: nowrap;
}

.political-mrp-body .filters-drawer #win-margin-range .range-header__value {
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #001c3b;
  background: rgba(0, 28, 59, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  border: 0;
  box-shadow: none;
}

.political-mrp-body .filters-drawer #win-margin-range.is-active .range-header__value {
  background: rgba(0, 28, 59, 0.18);
}

.political-mrp-body .filters-drawer #win-margin-range input[type="range"]::-webkit-slider-thumb {
  width: var(--range-thumb-size);
  height: var(--range-thumb-size);
  margin-top: 0 !important;
  background: #001c3b;
}

.political-mrp-body .filters-drawer #win-margin-range input[type="range"]::-moz-range-thumb {
  width: var(--range-thumb-size);
  height: var(--range-thumb-size);
  margin-top: 0 !important;
  background: #001c3b;
}

.political-mrp-body .filters-drawer #win-margin-range.is-active .range-label {
  color: #001c3b;
  font-weight: 600;
}

.political-mrp-body .filters-drawer #win-margin-range .range-ticks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.01em;
  color: rgba(15, 23, 42, 0.55);
  user-select: none;
}

.political-mrp-body .filters-drawer #win-margin-range .range-ticks span {
  line-height: 1;
}

.seat-plot {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0 4px;
}

.seat-plot.is-empty {
  padding-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.seat-plot__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seat-plot__header {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 44px minmax(0, 1fr);
  gap: 6px;
  align-items: end;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
  padding-bottom: 2px;
}

.seat-plot__header-seats {
  grid-column: 2 / -1;
  text-align: left;
}

.seat-plot__row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 44px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.seat-plot__row.is-dim {
  opacity: 0.22;
}

.seat-plot__party {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.seat-plot__seats {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.8);
  text-align: left;
  flex: 0 0 auto;
}

.seat-plot__icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
  letter-spacing: 0.02em;
  user-select: none;
}

.seat-plot__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seat-plot__label {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-plot__bar-wrap {
  height: 12px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.seat-plot__bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.seat-plot__value {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.8);
}

.seat-plot-tooltip {
  position: fixed;
  z-index: 1400;
  max-width: min(280px, calc(100vw - 24px));
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(243, 244, 246, 0.94);
  color: #10223a;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: pre-line;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 1;
  transform: none;
  transition: opacity 0.12s ease;
}

.seat-plot-tooltip.hidden {
  opacity: 0;
}

.political-mrp-body .map-tooltip {
  max-width: min(360px, 72vw);
}

@media (max-width: 720px) {
  .seat-plot__row {
    grid-template-columns: minmax(140px, 200px) 38px minmax(0, 1fr);
    gap: 8px;
  }
  .seat-plot__header {
    grid-template-columns: minmax(140px, 200px) 38px minmax(0, 1fr);
    gap: 8px;
  }
  .seat-plot__icon {
    width: 22px;
    height: 22px;
  }
}

.map-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.map-pane__title {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-primary);
}

.political-mrp-body .viewport-shell .map-layout.map-layout--dual {
  flex: 1 1 auto;
  min-height: 0;
  align-content: stretch;
}

.political-mrp-body .viewport-shell .map-pane .map-wrapper {
  flex: 1 1 auto;
  min-height: 0;
}

.political-mrp-body .viewport-shell #constituency-map,
.political-mrp-body .viewport-shell #region-map {
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.region-seat-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.region-seat-overlay.is-ready {
  opacity: 1;
}

.region-seat-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.region-seat-panel {
  position: absolute;
  padding: 10px 12px;
  background: rgba(241, 241, 241, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 14px 40px -30px rgba(15, 23, 42, 0.5);
  border-radius: 0;
  opacity: 1;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  pointer-events: auto;
}

.region-seat-panel.is-dim {
  opacity: 0.22;
}

.region-seat-panel.is-selected {
  opacity: 1;
  z-index: 4;
}

.region-seat-grid {
  display: grid;
  grid-template-columns: repeat(4, 12px);
  grid-auto-rows: 12px;
  gap: 6px;
  align-items: center;
  justify-items: center;
  line-height: 0;
}

.region-seat-dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 12px;
  opacity: 1;
  transition: opacity 0.18s ease, transform 0.18s ease, outline-color 0.18s ease;
}

.region-seat-dot.is-dim {
  opacity: 0.22;
}

.region-seat-dot.is-party-match {
  opacity: 1;
  transform: none;
}

.map-wrapper .map-status {
  z-index: 3;
}

@media (max-width: 900px) {
  .region-seat-panel {
    padding: 8px 10px;
  }
  .region-seat-grid {
    grid-template-columns: repeat(4, 10px);
    grid-auto-rows: 10px;
    gap: 5px;
  }
  .region-seat-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    max-width: 10px;
    max-height: 10px;
    flex-basis: 10px;
  }
}

@media (max-width: 980px) {
  .map-layout.map-layout--dual {
    grid-template-columns: 1fr;
  }
}

.mrp-panel-toggle,
.mrp-panel-scrim,
.mrp-panel-close {
  display: none;
}

@media (max-width: 720px) {
  .site-banner.site-banner--topbar .site-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 14px var(--layout-gutter);
  }

  .site-banner.site-banner--topbar .site-topbar__nav.nav-links {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    width: auto;
    margin-left: auto;
  }

  .site-topbar__logo {
    margin-left: 0;
    flex: 0 1 auto;
  }

  .site-topbar__logo img {
    height: 30px;
    max-width: 182px;
  }

  .site-topbar__nav.nav-links a {
    font-size: 16px;
    padding: 3px 0;
    white-space: nowrap;
  }
}

@media (max-width: 1024px) {
  .political-mrp-body.mrp-panel-open {
    overflow: hidden;
  }

  .political-mrp-body .viewport-shell .viz-shell {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: var(--layout-gutter);
    padding-right: var(--layout-gutter);
    box-sizing: border-box;
    overflow-x: clip;
  }

  .political-mrp-body .viewport-shell .filters-drawer.filters-drawer--always-open {
    width: 0;
    min-width: 0;
    max-width: 0;
    border-right: 0;
    background: transparent;
    overflow: visible;
  }

  .political-mrp-body .viewport-shell .filters-drawer.filters-drawer--always-open .filters-drawer__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    width: min(640px, 100%);
    max-height: min(80vh, calc(100dvh - 108px));
    padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    background: #f1f1f1;
    box-shadow: 0 -18px 44px rgba(15, 23, 42, 0.3);
    transform: translateY(110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.2s ease;
    z-index: 1300;
    overflow-y: auto;
  }

  .political-mrp-body .viewport-shell .filters-drawer .filters-drawer__content,
  .political-mrp-body .viewport-shell .filters-drawer .filters-group,
  .political-mrp-body .viewport-shell .filters-drawer .map-filters,
  .political-mrp-body .viewport-shell .filters-drawer .filter-field {
    min-width: 0;
    overflow: visible;
  }

  .political-mrp-body .viewport-shell .filters-drawer details.filter-tile > summary {
    height: auto;
    min-height: 34px;
    padding-top: 2px;
    padding-bottom: 4px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.25;
  }

  .political-mrp-body .viewport-shell .filters-drawer .filter-select__trigger,
  .political-mrp-body .viewport-shell .filters-drawer .map-filters input:not([type="range"]) {
    height: auto;
    min-height: 34px;
    line-height: 1.25;
    padding-top: 6px;
    padding-bottom: 6px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .political-mrp-body .viewport-shell .filters-drawer .filter-select__list {
    max-width: min(100vw - 24px, 620px);
  }

  .political-mrp-body .viewport-shell .filters-drawer .filter-select__item button {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .political-mrp-body .viewport-shell .layout-summary,
  .political-mrp-body .viewport-shell .filter-summary {
    overflow-wrap: anywhere;
  }

  .political-mrp-body.mrp-panel-open .filters-drawer.filters-drawer--always-open .filters-drawer__panel {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .political-mrp-body .mrp-panel-toggle {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: 999px;
    background: #001c3b;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
    z-index: 1500;
  }

  .political-mrp-body .mrp-panel-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1200;
  }

  .political-mrp-body.mrp-panel-open .mrp-panel-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .political-mrp-body .mrp-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-bottom: 8px;
    padding: 0.35rem 0.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 28, 59, 0.12);
    color: #001c3b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .political-mrp-body .viewport-shell .viz-content {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow-x: clip;
  }

  .political-mrp-body .viewport-shell .map-section,
  .political-mrp-body .viewport-shell .map-layout,
  .political-mrp-body .viewport-shell .map-pane {
    min-width: 0;
  }
}
