/* ============================================================
   ResultsDesk.nz — final compatibility layer
   Keep this deliberately short. The authoritative design system
   now lives in style-dashboard.css.
   ============================================================ */

/* Prevent old theme rules from reintroducing unreadable light-mode text. */
body.dashboard-body.light-mode,
body.dashboard-body[data-theme-choice="light"] {
  color: var(--rd-text) !important;
}

body.dashboard-body.light-mode .results-identity-card,
body.dashboard-body[data-theme-choice="light"] .results-identity-card,
body.dashboard-body.light-mode .votes-seats-card,
body.dashboard-body[data-theme-choice="light"] .votes-seats-card {
  color: var(--rd-text) !important;
  background: var(--rd-panel) !important;
}

/* Keep the movement colours explicit even inside numeric table cells. */
body.dashboard-body .seat-table td .change-indicator.change-up,
body.dashboard-body .popup-table td .change-indicator.change-up,
body.dashboard-body .map-data-table td .change-indicator.change-up,
body.dashboard-body .seat-table td .change-indicator.change-up .change-arrow,
body.dashboard-body .popup-table td .change-indicator.change-up .change-arrow {
  color: var(--rd-positive) !important;
}
body.dashboard-body .seat-table td .change-indicator.change-down,
body.dashboard-body .popup-table td .change-indicator.change-down,
body.dashboard-body .map-data-table td .change-indicator.change-down,
body.dashboard-body .seat-table td .change-indicator.change-down .change-arrow,
body.dashboard-body .popup-table td .change-indicator.change-down .change-arrow {
  color: var(--rd-negative) !important;
}

/* Make party bars fill their intended visual width without hiding labels. */
body.dashboard-body .seat-table td.party-name-cell::before {
  left: 6px !important;
  right: auto !important;
  width: calc((100% - 6px) * var(--party-row-width-value, 0)) !important;
}
body.dashboard-body .seat-table .seat-minor-row .party-line {
  background: var(--party-row-color, currentColor) !important;
  width: 6px !important;
  min-width: 6px !important;
}
body.dashboard-body .seat-table td.party-name-cell .party-name-text {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Popup labels must not sit underneath their vertical party bar. */
body.dashboard-body .popup-table .candidate-cell {
  padding-left: 20px !important;
}
body.dashboard-body .popup-table .vertical-party-bar {
  left: 0 !important;
  width: 6px !important;
}

/* Keep the Electorates tab usable at every viewport size. The card clips
   overflow, so the table itself needs the scroll container. */
body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap {
  max-height: calc(100dvh - 220px) !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}
body.dashboard-body[data-dashboard-view="electorates"] .map-data-table {
  min-width: 650px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-electorate { width: 25% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-result { width: 27% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-party { width: 13% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-votes { width: 12% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-pct { width: 9% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-change { width: 14% !important; }

body.dashboard-body .map-data-result-cell {
  min-width: 0 !important;
}
body.dashboard-body .map-data-party-bar {
  display: inline-block !important;
  width: 5px !important;
  height: 1.25em !important;
  margin-right: 7px !important;
  border-radius: 999px !important;
  background: var(--map-data-party-color, var(--rd-border-strong)) !important;
  vertical-align: -0.2em !important;
}
body.dashboard-body .map-data-leader-label {
  min-width: 0 !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-chart-stack {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 22px !important;
}
body.dashboard-body .mobile-map-unavailable {
  display: none !important;
}
body.dashboard-body[data-dashboard-view="trends"] .map-card,
body.dashboard-body[data-dashboard-view="trends"] .map-card-body,
body.dashboard-body[data-dashboard-view="trends"] .map-wrap,
body.dashboard-body[data-dashboard-view="trends"] #voteShareCard,
body.dashboard-body[data-dashboard-view="trends"] .vote-share-card {
  min-height: 0 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-overview {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-overview > div,
body.dashboard-body[data-dashboard-view="trends"] .trend-chart-panel {
  min-width: 0 !important;
  padding: 14px !important;
  border: 1px solid var(--rd-border) !important;
  border-radius: var(--rd-radius) !important;
  background: linear-gradient(180deg, rgba(96, 165, 250, .045), rgba(96, 165, 250, .012)) !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-overview strong {
  display: block !important;
  margin-top: 4px !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: 18px !important;
  font-weight: 750 !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-kicker,
body.dashboard-body[data-dashboard-view="trends"] .trend-panel-head span {
  color: var(--rd-muted) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-chart-panel {
  min-width: 0 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-stack {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 22px !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-panel {
  min-width: 0 !important;
  padding: 14px !important;
  border: 1px solid var(--rd-border) !important;
  border-radius: var(--rd-radius) !important;
  background: linear-gradient(180deg, rgba(96, 165, 250, .045), rgba(96, 165, 250, .012)) !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-status-note,
body.dashboard-body[data-dashboard-view="trends"] .trend-single-note {
  margin: 0 0 12px !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-status-note {
  padding: 10px 12px !important;
  border: 1px solid var(--rd-border) !important;
  border-radius: var(--rd-radius) !important;
  background: rgba(96, 165, 250, .06) !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-status-note strong {
  color: var(--rd-text) !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-svg {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 260px !important;
  overflow: visible !important;
}

body.dashboard-body[data-dashboard-view="trends"] #voteShareChart {
  position: relative !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-snapshot-hit {
  fill: transparent !important;
  cursor: crosshair !important;
  pointer-events: all !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-snapshot-hit:focus {
  outline: none !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-snapshot-hit:focus-visible {
  stroke: var(--rd-accent) !important;
  stroke-width: 1.5 !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-hover-tooltip {
  position: absolute !important;
  z-index: 20 !important;
  max-width: min(280px, calc(100% - 24px)) !important;
  padding: 10px 12px !important;
  border: 1px solid var(--rd-border-strong) !important;
  border-radius: var(--rd-radius-sm) !important;
  background: color-mix(in srgb, var(--rd-panel) 94%, #000 6%) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28) !important;
  color: var(--rd-text-soft) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.4 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateZ(0) !important;
  transition: opacity .12s ease !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-hover-tooltip.visible {
  opacity: 1 !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-tooltip-line {
  display: block !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-tooltip-line:first-child {
  margin-bottom: 4px !important;
  color: var(--rd-text) !important;
  font-weight: 850 !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-grid-line {
  stroke: var(--rd-rule) !important;
  stroke-width: 1 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-grid-line-vertical {
  opacity: .42 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-axis-line {
  stroke: var(--rd-border-strong) !important;
  stroke-width: 1.2 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-axis-label {
  fill: var(--rd-muted) !important;
  font-family: var(--rd-active-font) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-point-label {
  font-family: var(--rd-active-font) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  paint-order: stroke !important;
  stroke: var(--rd-panel) !important;
  stroke-linejoin: round !important;
  stroke-width: 4px !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px 12px !important;
  margin-top: 10px !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: var(--rd-text-soft) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend-item i {
  width: 8px !important;
  height: 8px !important;
  border-radius: 999px !important;
  flex: 0 0 auto !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend-item strong {
  color: var(--rd-text) !important;
  font-weight: 750 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-panel-head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-panel-head h3 {
  margin: 0 !important;
  color: var(--rd-text) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-row {
  display: grid !important;
  grid-template-columns: minmax(96px, .9fr) minmax(120px, 2fr) minmax(48px, auto) !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 28px !important;
  color: var(--rd-text-soft) !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-row > span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-weight: 600 !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-row strong {
  color: var(--rd-text) !important;
  font-weight: 700 !important;
  text-align: right !important;
  white-space: nowrap !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-bar {
  height: 12px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: var(--rd-panel-3) !important;
  box-shadow: inset 0 0 0 1px var(--rd-rule) !important;
}
body.dashboard-body[data-dashboard-view="trends"] .trend-bar i {
  display: block !important;
  height: 100% !important;
  min-width: 2px !important;
  border-radius: inherit !important;
}

/* Dashboard mobile tabs keep their content inside #mapWrap. The legacy mobile
   layout hides .map-wrap globally, so restore it for dashboard tab views. */
@media (max-width: 900px) {
  body.dashboard-body[data-dashboard-view="home"] .dashboard-shell > .dashboard-view-tabs {
    display: grid !important;
    margin-bottom: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-dashboard-view-tabs {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapWrap,
  body.dashboard-body[data-dashboard-view="electorates"] #mapWrap,
  body.dashboard-body[data-dashboard-view="trends"] #mapWrap {
    display: block !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] #mapWrap,
  body.dashboard-body[data-dashboard-view="trends"] #mapWrap {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] #mapDataView,
  body.dashboard-body[data-dashboard-view="trends"] #voteShareCard {
    width: 100% !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] {
    overflow-y: auto !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-card,
  body.dashboard-body[data-dashboard-view="electorates"] .map-card-body,
  body.dashboard-body[data-dashboard-view="electorates"] #mapWrap,
  body.dashboard-body[data-dashboard-view="electorates"] #mapDataView {
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap {
    max-height: calc(100dvh - 235px) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    width: min(360px, calc(100% - 190px)) !important;
    max-width: 360px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
    padding: 12px 12px 9px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
    font-size: 20px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table th,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table td {
    padding: 6px 7px !important;
    font-size: 10px !important;
  }

  body.dashboard-body .bloc-toggle-groups {
    grid-template-columns: 1fr !important;
  }

  body.dashboard-body .bloc-toggle-divider {
    width: 100% !important;
    min-height: 1px !important;
    height: 1px !important;
  }
}

@media (max-width: 660px) {
  body.dashboard-body .dashboard-view-tabs {
    gap: 5px !important;
    padding: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-card {
    padding: 13px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-block {
    padding: 8px 0 13px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .app-title-main,
  body.dashboard-body[data-dashboard-view="home"] .app-header-title-main {
    font-size: 34px !important;
    line-height: .98 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .overall-big {
    font-size: 48px !important;
    line-height: .92 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .overall-label {
    font-size: 15px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-grid {
    gap: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat {
    padding: 8px 4px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .votes-seats-card > .card-head {
    align-items: stretch !important;
    gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-seat-party-toggle {
    width: 146px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table th,
  body.dashboard-body[data-dashboard-view="home"] .seat-table td,
  body.dashboard-body[data-dashboard-view="home"] .seat-table .party-name-text {
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 10px !important;
    line-height: 1.08 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table th {
    font-size: 8px !important;
    letter-spacing: .045em !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td.party-name-cell {
    padding-left: 14px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table .change-indicator {
    gap: 1px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-change,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(4),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(4) {
    display: none !important;
    width: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-party { width: 36% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-votes { width: 18% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-pct { width: 10% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-elec { width: 8% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-seats { width: 9% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-seat-change { width: 19% !important; }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(5),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7) {
    font-size: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(5)::after,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6)::after,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7)::after {
    color: var(--rd-muted) !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    letter-spacing: .045em !important;
    line-height: 1.05 !important;
    white-space: pre-line !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(5)::after { content: "EL."; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6)::after { content: "SEATS"; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7)::after { content: "SEATS\a CHG"; }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    display: table !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table thead {
    display: table-header-group !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table colgroup {
    display: table-column-group !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-electorate { width: 20% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-result { width: 25% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-party { width: 13% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-votes { width: 14% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-pct { width: 12% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-change { width: 16% !important; }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
    background: var(--rd-panel) !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table th:first-child,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 2 !important;
    background: var(--rd-panel) !important;
    box-shadow: 1px 0 0 var(--rd-rule) !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table thead th:first-child {
    z-index: 4 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table th,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td {
    height: auto !important;
    min-height: 34px !important;
    padding: 6px 3px !important;
    font-size: 10px !important;
    line-height: 1.16 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table th {
    font-size: 7.5px !important;
    letter-spacing: .02em !important;
    line-height: 1.05 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td {
    font-size: 9.5px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-result-cell {
    padding-left: 3px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-leader-label {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-bar {
    width: 4px !important;
    margin-right: 3px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-result-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-cell {
    white-space: normal !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-votes-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-pct-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-change-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-votes-head,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-pct-head,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-change-head,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-change-cell .change-indicator {
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-bar {
    display: inline-block !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row {
    display: table-row !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row > td {
    display: table-cell !important;
    padding: 8px 7px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] #voteShareCard,
  body.dashboard-body[data-dashboard-view="trends"] .vote-share-card {
    padding: 14px !important;
    min-height: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-overview,
  body.dashboard-body[data-dashboard-view="trends"] .trend-chart-stack,
  body.dashboard-body[data-dashboard-view="trends"] .trend-line-stack {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-overview > div,
  body.dashboard-body[data-dashboard-view="trends"] .trend-chart-panel {
    padding: 12px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-overview strong {
    font-size: 15px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-panel-head {
    margin-bottom: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-row {
    grid-template-columns: minmax(88px, 1fr) minmax(96px, 1.35fr) minmax(42px, auto) !important;
    gap: 8px !important;
    min-height: 27px !important;
    font-size: 12px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-bar {
    height: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .map-card {
    min-height: 420px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #map,
  body.dashboard-body[data-dashboard-view="map"] .map-stage-texture,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel,
  body.dashboard-body[data-dashboard-view="map"] .map-legend {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .mobile-map-unavailable {
    display: grid !important;
    min-height: 360px !important;
    padding: 28px !important;
    place-content: center !important;
    text-align: center !important;
    color: var(--rd-text) !important;
    background:
      linear-gradient(180deg, rgba(96, 165, 250, .055), rgba(96, 165, 250, .018)),
      var(--rd-panel) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .mobile-map-unavailable h2 {
    margin: 0 !important;
    color: var(--rd-text) !important;
    font-size: 22px !important;
    line-height: 1.08 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .mobile-map-unavailable p {
    max-width: 280px !important;
    margin: 10px auto 0 !important;
    color: var(--rd-muted) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    left: 12px !important;
    top: 12px !important;
    width: 176px !important;
    max-width: 176px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
    display: block !important;
    min-height: 0 !important;
    padding: 10px 10px 8px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
    font-size: 21px !important;
    line-height: 1 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table .col-pct,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table th.col-pct,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table td.col-pct {
    display: none !important;
    width: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table col.col-name { width: 48% !important; }
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table col.col-votes { width: 33% !important; }
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table col.col-seats { width: 19% !important; }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table th.col-seats {
    font-size: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-national-table th.col-seats::after {
    content: "S." !important;
    color: var(--rd-muted) !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    letter-spacing: .04em !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table th,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table td {
    padding: 5px 4px !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table th {
    font-size: 8px !important;
    letter-spacing: .04em !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .candidate-cell {
    padding-left: 20px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .vertical-party-bar {
    width: 4px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-footer {
    padding: 6px 9px 8px !important;
    font-size: 9px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
    right: 10px !important;
    bottom: 10px !important;
    width: 150px !important;
    max-width: 150px !important;
    padding: 7px !important;
    border-radius: var(--rd-radius) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .toggle-btn,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .region-btn {
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
  }
}

/* Map election-wall composition */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel {
  top: 22px !important;
  left: 22px !important;
  z-index: 760 !important;
  width: clamp(500px, 38vw, 580px) !important;
  max-width: calc(100% - 340px) !important;
  max-height: calc(100% - 44px) !important;
  overflow: hidden !important;
  border-radius: var(--rd-radius-lg) !important;
  border: 1px solid var(--rd-border-strong) !important;
  background: color-mix(in srgb, var(--rd-panel) 94%, transparent) !important;
  box-shadow: var(--rd-shadow-float) !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
  width: clamp(500px, 38vw, 580px) !important;
  max-width: calc(100% - 340px) !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content {
  max-height: calc(100vh - var(--dd-header-h) - 190px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 0 !important;
  padding: 18px 20px 16px !important;
  gap: 6px !important;
  border-bottom: 1px solid var(--rd-border-strong) !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-selection-eyebrow {
  grid-column: 1 !important;
  grid-row: auto !important;
  min-width: 0 !important;
  color: var(--rd-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3 {
  grid-column: 1 !important;
  grid-row: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: clamp(27px, 2.05vw, 34px) !important;
  font-weight: 800 !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-context-label {
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-reporting-wrap {
  width: 100% !important;
  min-width: 0 !important;
  flex-basis: auto !important;
  margin-top: 7px !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: left !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-reporting-bar {
  height: 5px !important;
  margin-top: 7px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-list {
  width: 100% !important;
  background: transparent !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-row {
  display: grid !important;
  align-items: stretch !important;
  column-gap: 14px !important;
  min-width: 0 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row {
  grid-template-columns: minmax(0, 1fr) 92px 68px 58px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-no-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-no-change .candidate-result-row {
  grid-template-columns: minmax(0, 1fr) 92px 68px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-results .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-results .candidate-result-row,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-total-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 112px 70px 64px !important;
  align-items: stretch !important;
  column-gap: 14px !important;
  min-width: 0 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-head {
  padding: 10px 20px 9px !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-head > div:not(:first-child) {
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-note {
  padding: 10px 20px 12px !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .02em !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-row {
  position: relative !important;
  min-height: 70px !important;
  padding: 0 20px 0 0 !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  background-image: none !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-main {
  position: relative !important;
  min-width: 0 !important;
  padding: 13px 10px 11px 20px !important;
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-name {
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-party {
  margin-top: 6px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .03em !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-num {
  align-self: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-text-soft) !important;
  font-size: 17px !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-votes {
  padding-top: 2px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-winner-margin {
  margin-top: 4px !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-change .change-indicator {
  justify-content: flex-end !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-total-row {
  min-height: 44px !important;
  padding: 11px 20px !important;
  border-top: 1px solid var(--rd-border-strong) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-total-row > div:first-child {
  align-self: center !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .vertical-party-bar {
  inset: 0 auto 0 0 !important;
  width: 7px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 11px 20px 13px !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
  right: 20px !important;
  bottom: 20px !important;
  z-index: 730 !important;
  width: min(270px, calc(100% - 40px)) !important;
  max-width: 270px !important;
  padding: 9px !important;
  background: color-mix(in srgb, var(--rd-panel) 72%, transparent) !important;
  border-color: color-mix(in srgb, var(--rd-border-strong) 74%, transparent) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18) !important;
}

body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-options-section-menu {
  gap: 6px !important;
}

body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn {
  height: 30px !important;
  min-height: 30px !important;
  font-size: 11.5px !important;
}

body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .control-group {
  padding: 6px !important;
}

body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .toggle-btn,
body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .region-btn,
body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-control-select {
  min-height: 30px !important;
  height: 30px !important;
  font-size: 11.5px !important;
}

@media (max-width: 1200px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    width: clamp(430px, 42vw, 500px) !important;
    max-width: calc(100% - 304px) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3 {
    font-size: clamp(24px, 2.55vw, 29px) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row {
    grid-template-columns: minmax(0, 1fr) 84px 60px 52px !important;
    column-gap: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-results .candidate-results-head,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-results .candidate-result-row,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-total-row {
    grid-template-columns: minmax(0, 1fr) 96px 58px 50px !important;
    column-gap: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-name {
    font-size: 16px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-num {
    font-size: 15px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
    width: 248px !important;
    max-width: 248px !important;
  }
}

@media (max-width: 1040px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    width: 430px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-head-change,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-change {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row {
    grid-template-columns: minmax(0, 1fr) 88px 62px !important;
  }
}

@media (max-width: 900px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    left: 8px !important;
    top: 8px !important;
    width: calc(100% - 16px) !important;
    max-width: none !important;
  }
}

@media (max-width: 660px) {
  body.dashboard-body[data-dashboard-view="home"] .results-identity-card {
    padding: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-block {
    padding: 4px 0 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-block .app-title-main,
  body.dashboard-body[data-dashboard-view="home"] .results-identity-block .app-header-title-main {
    font-size: 28px !important;
    line-height: .98 !important;
    letter-spacing: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .app-header-status {
    margin-top: 10px !important;
    font-size: 10px !important;
    gap: 5px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .live-indicator {
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-current-block {
    padding-top: 9px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .overall-big {
    margin-top: 5px !important;
    font-size: 40px !important;
    line-height: .9 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .overall-label {
    margin-top: 2px !important;
    font-size: 13px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-meta {
    margin-top: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-card {
    padding-top: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stats {
    margin-top: 9px !important;
    padding-top: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat {
    padding: 5px 2px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat span {
    font-size: 7px !important;
    line-height: 1.08 !important;
    letter-spacing: .045em !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat strong {
    margin-top: 4px !important;
    font-size: 13px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .votes-seats-card > .card-head {
    align-items: center !important;
    gap: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-main-heading {
    font-size: 23px !important;
    line-height: .95 !important;
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-seat-party-toggle {
    width: 120px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-votes,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(2),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(2),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-change,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(4),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(4),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-elec,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(5),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(5) {
    display: none !important;
    width: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-party { width: 44% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-pct { width: 21% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-seats { width: 15% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-seat-change { width: 20% !important; }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td.party-name-cell {
    overflow: hidden !important;
    padding-right: 5px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td.party-name-cell::before {
    left: 6px !important;
    right: auto !important;
    max-width: calc(100% - 6px) !important;
    width: calc((100% - 6px) * var(--party-row-width-value, 0)) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(3),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(3),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(6),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(7) {
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change td:nth-child(7) {
    padding-right: 9px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6),
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7) {
    font-size: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6)::after,
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7)::after {
    color: var(--rd-muted) !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    letter-spacing: .045em !important;
    line-height: 1.05 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(6)::after { content: "SEATS"; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change th:nth-child(7)::after { content: "CHG"; }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-toolbar {
    padding: 8px !important;
    gap: 5px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-toolbar-group {
    gap: 4px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-filter-btn {
    min-height: 31px !important;
    height: 31px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table th,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-electorate-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-result-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-pct-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-change-cell {
    color: var(--rd-text) !important;
    font-weight: 750 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-votes-cell {
    color: var(--rd-muted) !important;
    font-weight: 650 !important;
  }
}

@media (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="home"] .dashboard-shell > .dashboard-view-tabs {
    display: grid !important;
    margin-bottom: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-dashboard-view-tabs {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .col-left {
    grid-template-rows: 1fr !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-card {
    grid-row: 1 !important;
    min-height: 508px !important;
    border-radius: var(--rd-radius) 0 0 var(--rd-radius) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .votes-seats-card {
    grid-row: 1 !important;
    min-height: 508px !important;
    border-radius: 0 var(--rd-radius) var(--rd-radius) 0 !important;
  }
}

@media (min-width: 661px) {
  body.dashboard-body[data-dashboard-view="map"] .map-card,
  body.dashboard-body[data-dashboard-view="map"] .map-card-body,
  body.dashboard-body[data-dashboard-view="map"] #mapWrap {
    height: min(760px, calc(100vh - 140px)) !important;
    min-height: 620px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .leaflet-control-attribution {
    opacity: .62 !important;
    font-size: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
    padding: 12px 13px 8px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
    font-size: 24px !important;
    line-height: .98 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table th,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
}

body.dashboard-body.dark-mode {
  --rd-muted: #aebbd0;
  --rd-faint: #8998ad;
}

body.dashboard-body.light-mode,
body.dashboard-body[data-theme-choice="light"] {
  --rd-muted: #526176;
  --rd-faint: #6b7a90;
}

@media (min-width: 901px) {
  body.dashboard-body .dashboard-shell,
  body.dashboard-body[data-dashboard-view="map"] .dashboard-shell {
    width: min(1404px, calc(100vw - 36px)) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-main-heading {
    font-size: 29px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table th {
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td,
  body.dashboard-body[data-dashboard-view="home"] .seat-table .party-name-text {
    height: auto !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 13px !important;
    line-height: 1.12 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td.num,
  body.dashboard-body[data-dashboard-view="home"] .seat-table td.num strong {
    font-weight: 750 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table th {
    padding: 8px 10px !important;
    font-size: 10.5px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table td {
    padding: 8px 10px !important;
    font-size: 12.5px !important;
    line-height: 1.18 !important;
  }
}

@media (min-width: 661px) and (max-width: 900px) {
  body.dashboard-body .dashboard-shell,
  body.dashboard-body[data-dashboard-view="map"] .dashboard-shell {
    width: min(100%, calc(100vw - 16px)) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table th {
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td,
  body.dashboard-body[data-dashboard-view="home"] .seat-table .party-name-text {
    font-size: 12.5px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table th {
    font-size: 9.5px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table td {
    padding: 7px 8px !important;
    font-size: 11.5px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table th {
    font-size: 9.5px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-table td {
    padding: 7px 8px !important;
    font-size: 11.5px !important;
  }
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .candidate-cell {
  padding-left: 20px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel {
  width: min(480px, 33.333vw) !important;
  max-width: 33.333vw !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
  width: min(480px, 33.333vw) !important;
  max-width: 33.333vw !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-header {
  min-height: 58px !important;
  padding: 12px 14px 10px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3 {
  font-size: 23px !important;
  line-height: 1.12 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-reporting-wrap {
  font-size: 12px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table th {
  padding: 9px 12px !important;
  font-size: 12px !important;
  line-height: 1.08 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table td {
  padding: 10px 12px !important;
  font-size: 15.5px !important;
  line-height: 1.12 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-name {
  width: 34% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-party {
  width: 22% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-votes {
  width: 18% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-pct {
  width: 12% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-change {
  width: 14% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .party-label-text {
  font-size: 13px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-winner-margin {
  font-size: 12px !important;
  line-height: 1.05 !important;
}

@media (max-width: 1100px) and (min-width: 661px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 7px 10px !important;
    min-height: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-selection-eyebrow {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3 {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-reporting-wrap {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 104px !important;
    min-width: 0 !important;
    flex-basis: auto !important;
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table th,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table td {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-table td {
    font-size: 13.5px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-party {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-name {
    width: 40% !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-votes {
    width: 23% !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-pct {
    width: 15% !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-candidate .col-change {
    width: 22% !important;
  }
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-electorate { width: 21% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-result { width: 22% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-party { width: 12% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-votes { width: 12% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-pct { width: 9% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-change { width: 11% !important; }
body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-reporting { width: 13% !important; }

body.dashboard-body .toggle-bar,
body.dashboard-body .year-toggle-bar,
body.dashboard-body .region-toggle-bar,
body.dashboard-body .home-seat-party-toggle,
body.dashboard-body .map-data-toolbar-group {
  padding: 3px !important;
  gap: 3px !important;
  border: 1px solid var(--rd-rule) !important;
  border-radius: var(--rd-radius-sm) !important;
  background: color-mix(in srgb, var(--rd-panel-3) 74%, transparent) !important;
}

body.dashboard-body .map-data-toolbar {
  gap: 9px !important;
}

body.dashboard-body .map-data-toolbar-group {
  position: relative !important;
  padding: 20px 4px 4px !important;
}

body.dashboard-body .map-data-toolbar-group::before {
  content: attr(aria-label) !important;
  position: absolute !important;
  top: 4px !important;
  right: 0 !important;
  left: 0 !important;
  text-align: center !important;
  color: var(--rd-muted) !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

body.dashboard-body .toggle-bar .toggle-btn,
body.dashboard-body .home-seat-party-toggle .toggle-btn,
body.dashboard-body .map-data-filter-btn {
  border-color: transparent !important;
}

body.dashboard-body .toggle-bar .toggle-btn.active,
body.dashboard-body .home-seat-party-toggle .toggle-btn.active,
body.dashboard-body .map-data-filter-btn.active {
  box-shadow: 0 0 0 1px var(--rd-border-strong), 0 1px 0 rgba(255, 255, 255, .08) inset !important;
}

body.dashboard-body[data-dashboard-view="home"] .results-current-block,
body.dashboard-body[data-dashboard-view="home"] .overall-primary {
  text-align: center !important;
}

body.dashboard-body[data-dashboard-view="home"] .results-current-block .card-head {
  justify-content: center !important;
}

body.dashboard-body[data-dashboard-view="home"] .results-current-block .card-title {
  width: 100% !important;
  text-align: center !important;
}

body.dashboard-body[data-dashboard-view="home"] .reporting-progress {
  display: block !important;
  width: min(300px, 72%) !important;
  max-width: none !important;
  height: 8px !important;
  margin: 12px auto 0 !important;
  padding: 1px !important;
  border: 1px solid color-mix(in srgb, var(--rd-border-strong) 84%, transparent) !important;
  border-radius: 2px !important;
  background: color-mix(in srgb, var(--rd-panel-3) 55%, transparent) !important;
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="home"] .reporting-progress-bar {
  height: 100% !important;
  border-radius: 1px !important;
  background: color-mix(in srgb, var(--rd-accent) 82%, white 18%) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rd-accent) 56%, transparent) !important;
}

body.dashboard-body[data-dashboard-view="home"] .reporting-progress-label {
  display: none !important;
}

body.dashboard-body[data-dashboard-view="home"] .seat-table tfoot tr {
  border-top: 1px solid var(--rd-border-strong) !important;
}

body.dashboard-body[data-dashboard-view="home"] .seat-table tfoot td,
body.dashboard-body[data-dashboard-view="home"] .seat-table tfoot td strong {
  border-top: 0 !important;
}

body.dashboard-body .bloc-summary {
  display: grid !important;
  gap: 8px !important;
  padding: 9px 11px 11px !important;
}

body.dashboard-body .bloc-summary-head {
  align-items: center !important;
}

body.dashboard-body .bloc-summary-head-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.dashboard-body .bloc-simple-grid {
  gap: 10px !important;
  margin-top: 0 !important;
}

body.dashboard-body .bloc-column {
  min-height: 0 !important;
  padding: 8px 9px !important;
  gap: 7px !important;
}

body.dashboard-body .bloc-column-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  white-space: normal !important;
}

body.dashboard-body .bloc-column-title {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  padding-top: 5px !important;
}

body.dashboard-body .bloc-column-metric {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: auto auto !important;
  grid-template-areas:
    "count label"
    "status status" !important;
  align-items: end !important;
  justify-items: end !important;
  gap: 1px 4px !important;
}

body.dashboard-body .bloc-column-metric strong {
  grid-area: count !important;
  font-size: 21px !important;
  line-height: .9 !important;
  text-align: right !important;
}

body.dashboard-body .bloc-column-metric > span {
  grid-area: label !important;
  color: var(--rd-muted) !important;
  font-size: 7.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

body.dashboard-body .bloc-column-metric em {
  grid-area: status !important;
  justify-self: end !important;
  padding: 1px 5px !important;
  border: 1px solid var(--rd-rule) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--rd-panel-3) 68%, transparent) !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
}

body.dashboard-body .bloc-column.is-majority .bloc-column-metric em {
  color: var(--rd-positive) !important;
  border-color: color-mix(in srgb, var(--rd-positive) 45%, var(--rd-rule)) !important;
}

body.dashboard-body .bloc-column .bloc-toggle-group {
  display: flex !important;
  align-content: flex-start !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 6px !important;
}

body.dashboard-body .bloc-column .bloc-toggle-btn {
  min-height: 27px !important;
  padding: 0 8px !important;
  gap: 6px !important;
}

body.dashboard-body .bloc-empty {
  width: 100% !important;
  min-height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px dashed var(--rd-rule) !important;
  border-radius: var(--rd-radius-sm) !important;
  color: var(--rd-faint) !important;
}

body.dashboard-body .bloc-reset-btn {
  min-height: 23px !important;
  padding: 0 9px !important;
  font-size: 9.5px !important;
}

@media (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="home"] .col-left {
    grid-template-columns: minmax(0, 47fr) minmax(0, 53fr) !important;
    column-gap: 14px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-card,
  body.dashboard-body[data-dashboard-view="home"] .votes-seats-card {
    border-radius: var(--rd-radius) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-card {
    border-right-color: var(--rd-border) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table th {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: 10.5px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table tbody td,
  body.dashboard-body[data-dashboard-view="home"] .seat-table tfoot td,
  body.dashboard-body[data-dashboard-view="home"] .seat-table .party-name-text {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-party { width: 32% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-votes { width: 16% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-pct { width: 12% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-change { width: 11% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-elec { width: 7% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-seats { width: 7% !important; }
  body.dashboard-body[data-dashboard-view="home"] .seat-table-expanded.seat-table-with-change col.seat-col-seat-change { width: 15% !important; }

  body.dashboard-body[data-dashboard-view="home"] .seat-table td.num {
    overflow: visible !important;
    text-overflow: clip !important;
  }

}

@media (max-width: 900px) {
  body.dashboard-body .bloc-simple-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 660px) {
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-electorate { width: 17% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-result { width: 21% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-party { width: 11% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-votes { width: 13% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-pct { width: 10% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-change { width: 14% !important; }
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-col-reporting { width: 14% !important; }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-electorate-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-result-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-cell {
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-leader-label {
    display: inline-block !important;
    max-width: calc(100% - 8px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    vertical-align: bottom !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table th {
    font-size: 7px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td {
    font-size: 9px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-reporting-head .map-data-sort-btn {
    font-size: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-reporting-head .map-data-sort-btn::after {
    content: "Rpt %" !important;
    font-size: 7px !important;
  }
}

/* Final Map election-wall overrides: keep these after legacy sizing patches. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
  top: 22px !important;
  left: 22px !important;
  width: clamp(500px, 38vw, 580px) !important;
  max-width: calc(100% - 340px) !important;
  max-height: calc(100% - 44px) !important;
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content {
  max-height: calc(100vh - var(--dd-header-h) - 190px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 0 !important;
  padding: 18px 20px 16px !important;
  gap: 6px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-selection-eyebrow,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-reporting-wrap {
  grid-column: 1 !important;
  grid-row: auto !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3 {
  font-size: clamp(27px, 2.05vw, 34px) !important;
  font-weight: 800 !important;
  line-height: 1.14 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-reporting-wrap {
  width: 100% !important;
  min-width: 0 !important;
  flex-basis: auto !important;
  margin-top: 7px !important;
  text-align: left !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-winner-margin {
  margin-top: 4px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 11px 20px 13px !important;
  font-size: 11px !important;
}

body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
  right: 20px !important;
  bottom: 20px !important;
  width: min(270px, calc(100% - 40px)) !important;
  max-width: 270px !important;
  padding: 9px !important;
}

@media (max-width: 1200px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    width: clamp(430px, 42vw, 500px) !important;
    max-width: calc(100% - 304px) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel h3 {
    font-size: clamp(24px, 2.55vw, 29px) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row {
    grid-template-columns: minmax(0, 1fr) 84px 60px 52px !important;
    column-gap: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-name {
    font-size: 16px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-num {
    font-size: 15px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
    width: 248px !important;
    max-width: 248px !important;
  }
}

/* Home broadcast-style vote and seat summary */
body.dashboard-body[data-dashboard-view="home"] .col-left {
  grid-template-columns: minmax(360px, 42fr) minmax(0, 58fr) !important;
  column-gap: 16px !important;
}

body.dashboard-body[data-dashboard-view="home"] .votes-seats-card {
  min-height: 560px !important;
}

body.dashboard-body[data-dashboard-view="home"] .votes-seats-card > .card-head {
  min-height: 48px !important;
  padding: 10px 14px !important;
}

body.dashboard-body[data-dashboard-view="home"] .seat-main-heading {
  font-size: 18px !important;
  letter-spacing: 0 !important;
}

body.dashboard-body[data-dashboard-view="home"] #seatSummary {
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results {
  width: 100% !important;
  background: transparent !important;
}

body.dashboard-body[data-dashboard-view="home"] .app-title-main,
body.dashboard-body[data-dashboard-view="home"] .app-header-title-main {
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
  padding-bottom: 10px !important;
}

body.dashboard-body[data-dashboard-view="home"] .overall-big {
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
  padding-bottom: 10px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
body.dashboard-body[data-dashboard-view="home"] .home-party-row,
body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 120px 74px 72px !important;
  align-items: stretch !important;
  column-gap: 12px !important;
  min-width: 0 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head {
  padding: 10px 16px 9px !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:not(:first-child) {
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-row {
  position: relative !important;
  min-height: 58px !important;
  padding: 0 16px 0 0 !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  background: transparent !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-main {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  padding: 0 12px 0 22px !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-strip {
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 7px !important;
  background: var(--party-row-color, transparent) !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-fill {
  position: absolute !important;
  inset: 0 auto 0 7px !important;
  z-index: -1 !important;
  width: var(--party-row-width, 0%) !important;
  max-width: calc(100% - 7px) !important;
  background: var(--party-row-bar, transparent) !important;
  opacity: .82 !important;
}

body.dashboard-body.light-mode[data-dashboard-view="home"] .home-party-fill,
body.dashboard-body[data-theme-choice="light"][data-dashboard-view="home"] .home-party-fill {
  opacity: .38 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-name {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-num {
  align-self: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-text-soft) !important;
  font-variant-numeric: tabular-nums !important;
  text-align: right !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-num strong {
  display: block !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-num .home-party-meta {
  display: grid !important;
  align-items: center !important;
  justify-content: stretch !important;
  justify-items: end !important;
  gap: 7px !important;
  margin-top: 4px !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-meta {
  grid-template-columns: minmax(0, 1fr) 42px !important;
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-pct {
  grid-column: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-vote-change {
  grid-column: 2 !important;
  justify-self: end !important;
  min-width: 42px !important;
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
  font-size: clamp(27px, 2.05vw, 34px) !important;
  font-weight: 800 !important;
  line-height: 1.14 !important;
  letter-spacing: 0 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-vote-change,
body.dashboard-body[data-dashboard-view="home"] .home-party-seat-change {
  display: inline-flex !important;
  margin-top: 0 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-vote-change .change-indicator,
body.dashboard-body[data-dashboard-view="home"] .home-party-seat-change .change-indicator {
  justify-content: flex-end !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
  min-height: 42px !important;
  padding: 10px 16px !important;
  border-top: 1px solid var(--rd-border-strong) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-total-row > div:first-child {
  align-self: center !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-total-row .home-party-num strong {
  font-size: 15px !important;
}

body.dashboard-body[data-dashboard-view="home"] .seat-footnote,
body.dashboard-body[data-dashboard-view="home"] .seat-comparison-hint {
  margin: 8px 16px 0 !important;
}

@media (max-width: 1180px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="home"] .col-left {
    grid-template-columns: minmax(320px, 40fr) minmax(0, 60fr) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
  body.dashboard-body[data-dashboard-view="home"] .home-party-row,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    grid-template-columns: minmax(0, 1fr) 108px 66px 66px !important;
    column-gap: 9px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-name,
  body.dashboard-body[data-dashboard-view="home"] .home-party-num strong {
    font-size: 16px !important;
  }
}

@media (max-width: 980px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
  body.dashboard-body[data-dashboard-view="home"] .home-party-row,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    grid-template-columns: minmax(0, 1fr) 104px 66px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(3),
  body.dashboard-body[data-dashboard-view="home"] .home-party-electorates,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row > div:nth-child(3) {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
  body.dashboard-body[data-dashboard-view="home"] .home-party-row,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    grid-template-columns: minmax(0, 1fr) 104px 64px !important;
    column-gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(3),
  body.dashboard-body[data-dashboard-view="home"] .home-party-electorates,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row > div:nth-child(3) {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-name,
  body.dashboard-body[data-dashboard-view="home"] .home-party-num strong {
    font-size: 15px !important;
  }
}

@media (max-width: 1040px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
    width: 430px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-head-change,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-change {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row {
    grid-template-columns: minmax(0, 1fr) 88px 62px !important;
  }
}

/* Latest Home composition overrides */
@media (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="home"] .dashboard-grid > .col-left {
    grid-template-columns: minmax(360px, 42fr) minmax(0, 58fr) !important;
    grid-template-rows: auto 1fr !important;
    gap: 0 16px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .dashboard-grid > .col-left > .home-controls-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 10px 8px !important;
    background: var(--rd-panel) !important;
    border: 1px solid var(--rd-border-strong) !important;
    border-bottom: 0 !important;
    border-radius: var(--rd-radius) var(--rd-radius) 0 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .dashboard-grid > .col-left > .results-identity-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-height: 650px !important;
    border-top: 0 !important;
    border-radius: 0 0 var(--rd-radius) var(--rd-radius) !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .dashboard-grid > .col-left > .votes-seats-card {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    min-height: 710px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .dashboard-grid > .col-left > .home-controls-card .control-label {
    margin: 0 0 6px !important;
    color: var(--rd-muted) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .055em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
  }
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
body.dashboard-body[data-dashboard-view="home"] .home-party-row,
body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
  grid-template-columns: minmax(0, 1fr) 148px 104px 86px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head {
  padding-right: 24px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-row {
  padding-right: 24px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
  padding-right: 24px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 46px !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  column-gap: 7px !important;
  row-gap: 3px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-meta {
  display: contents !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-pct {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  font-size: 19px !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-vote-change {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  font-size: 14px !important;
  line-height: 1.05 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-votes > .home-party-vote-count {
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  width: auto !important;
  max-width: 100% !important;
  color: var(--rd-text) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(2) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 46px !important;
  column-gap: 7px !important;
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(2)::before {
  content: "Vote" !important;
  grid-column: 1 !important;
  justify-self: end !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(2) {
  font-size: 0 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(2)::before {
  font-size: 11px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(4) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 32px !important;
  column-gap: 6px !important;
  text-align: right !important;
  font-size: 0 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(4)::before {
  content: "Seats" !important;
  grid-column: 1 !important;
  justify-self: end !important;
  font-size: 11px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-electorates {
  align-self: stretch !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  padding-top: 11px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-electorates > strong {
  font-size: 19px !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-seats {
  align-self: stretch !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 32px !important;
  align-content: start !important;
  align-items: start !important;
  column-gap: 6px !important;
  padding-top: 11px !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-seats > strong {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  width: auto !important;
  max-width: 100% !important;
  font-size: 19px !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-seats .home-party-meta {
  display: contents !important;
}

body.dashboard-body[data-dashboard-view="home"] .home-party-seats .home-party-seat-change {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  min-width: 32px !important;
  text-align: right !important;
  font-size: 14px !important;
  line-height: 1.05 !important;
}

body.dashboard-body .bloc-column-metric {
  grid-template-columns: auto auto auto !important;
  grid-template-areas: "status count label" !important;
  align-items: baseline !important;
  justify-items: end !important;
  gap: 0 5px !important;
}

@media (max-width: 1180px) and (min-width: 981px) {
  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
  body.dashboard-body[data-dashboard-view="home"] .home-party-row,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    grid-template-columns: minmax(0, 1fr) 138px 96px 78px !important;
  }
}

/* Slim Map controls bar */
@media (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
    right: 18px !important;
    bottom: 18px !important;
    width: auto !important;
    max-width: 78px !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .controls-body {
    display: block !important;
    margin: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-options-section-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    width: auto !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section {
    position: relative !important;
    width: auto !important;
    min-width: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn {
    width: 64px !important;
    min-width: 0 !important;
    height: 25px !important;
    min-height: 25px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    border-radius: 999px !important;
    border-color: color-mix(in srgb, var(--rd-border-strong) 38%, transparent) !important;
    background: color-mix(in srgb, var(--rd-panel-2) 58%, transparent) !important;
    color: var(--rd-muted) !important;
    font-size: 0 !important;
    font-weight: 750 !important;
    line-height: 1 !important;
    opacity: .78 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn::before {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[data-map-option-section="year"]::before {
    content: "Year" !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[data-map-option-section="electorate"]::before {
    content: "Type" !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[data-map-option-section="vote"]::before {
    content: "Vote" !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[data-map-option-section="parties"]::before {
    content: "Parties" !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[data-map-option-section="basemap"]::before {
    content: "Map" !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[data-map-option-section="zoom"]::before {
    content: "Zoom" !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn:hover,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn.active,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn[aria-expanded="true"] {
    opacity: 1 !important;
    color: var(--rd-text) !important;
    border-color: color-mix(in srgb, var(--rd-border-strong) 70%, transparent) !important;
    background: color-mix(in srgb, var(--rd-panel-2) 86%, transparent) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn::after {
    font-size: 10px !important;
    opacity: .55 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .control-group {
    position: absolute !important;
    right: calc(100% + 8px) !important;
    bottom: 0 !important;
    z-index: 2 !important;
    width: max-content !important;
    min-width: 174px !important;
    max-width: 310px !important;
    margin: 0 !important;
    padding: 6px !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--rd-panel) 88%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--rd-border-strong) 62%, transparent) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2) !important;
    backdrop-filter: blur(10px) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .control-group[hidden] {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .toggle-bar,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .year-toggle-bar,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .toggle-bar.toggle-bar-4 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(70px, 1fr)) !important;
    gap: 4px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .region-toggle-bar {
    grid-template-columns: repeat(2, minmax(92px, 1fr)) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .toggle-btn,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .region-btn,
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-control-select {
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card #resetZoomBtn {
    grid-column: 1 / -1 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-control-select {
    width: 190px !important;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card {
    max-width: 76px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #topLeftPanel.controls-card .map-option-section-btn {
    padding: 0 7px !important;
    font-size: 0 !important;
  }
}

/* Allow long dashboard views and result panels to scroll instead of clipping. */
html:has(body.dashboard-body),
body.dashboard-body {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
}

body.dashboard-body[data-dashboard-view="home"] .votes-seats-card,
body.dashboard-body[data-dashboard-view="home"] #seatSummary,
body.dashboard-body[data-dashboard-view="home"] .home-party-results {
  overflow: visible !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content {
  max-height: none !important;
  overflow: visible !important;
}

/* Keep the candidate note and footer metadata visually consistent. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-note,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer {
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
  letter-spacing: .02em !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer strong,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer span {
  color: inherit !important;
  font: inherit !important;
}

/* Let the Trends tab use the screen like a broadcast analysis wall. */
body.dashboard-body[data-dashboard-view="trends"] .dashboard-shell {
  width: min(1760px, calc(100vw - 32px)) !important;
  padding-bottom: 18px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .map-card,
body.dashboard-body[data-dashboard-view="trends"] .map-card-body,
body.dashboard-body[data-dashboard-view="trends"] .map-wrap,
body.dashboard-body[data-dashboard-view="trends"] #voteShareCard,
body.dashboard-body[data-dashboard-view="trends"] .vote-share-card {
  min-height: calc(100dvh - var(--dd-header-h) - 92px) !important;
}

body.dashboard-body[data-dashboard-view="trends"] #voteShareCard,
body.dashboard-body[data-dashboard-view="trends"] .vote-share-card {
  padding: clamp(16px, 1.4vw, 24px) !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-overview {
  gap: 14px !important;
  margin-bottom: 18px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-overview > div {
  min-height: 72px !important;
  padding: 16px 18px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-overview strong {
  font-size: 22px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-line-stack {
  gap: 24px !important;
  align-items: stretch !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-line-panel {
  display: flex !important;
  min-height: clamp(460px, 62dvh, 760px) !important;
  padding: clamp(16px, 1.25vw, 22px) !important;
  flex-direction: column !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-panel-head {
  margin-bottom: 14px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-panel-head h3 {
  font-size: 18px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-line-svg {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-axis-label,
body.dashboard-body[data-dashboard-view="trends"] .trend-point-label {
  font-size: 13px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend {
  gap: 9px 15px !important;
  margin-top: 14px !important;
}

body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend-item {
  font-size: 13px !important;
}

@media (max-width: 1480px) {
  body.dashboard-body[data-dashboard-view="trends"] .trend-line-stack {
    grid-template-columns: 1fr !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-panel {
    min-height: clamp(380px, 54dvh, 620px) !important;
  }
}

/* Electorate and national map popups should show totals in the result grid, not
   repeat the same number in the metadata footer. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-total-row {
  grid-template-columns: minmax(0, 1fr) 92px 68px 58px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-no-change .candidate-result-total-row {
  grid-template-columns: minmax(0, 1fr) 92px 68px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-total-row {
  display: grid !important;
  align-items: center !important;
  column-gap: 14px !important;
  min-height: 48px !important;
  padding: 11px 20px !important;
  border-top: 1px solid var(--rd-border-strong) !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-total-row > div:not(:first-child) {
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-total-row .candidate-result-num {
  color: var(--rd-text-soft) !important;
  font-size: 18px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-partyvote .popup-party-total-row td {
  border-top: 1px solid var(--rd-border-strong) !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-results-table-partyvote .popup-party-total-row .num {
  color: var(--rd-text-soft) !important;
  font-size: 18px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-national-row .candidate-result-main {
  display: flex !important;
  align-items: center !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer-updated-only {
  justify-content: flex-end !important;
}

/* Final popup polish: proportional colour bars should not constrain candidate
   text, and compact popups should not show a heavy always-visible scrollbar. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary {
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content {
  max-height: calc(100dvh - var(--dd-header-h) - 126px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148, 163, 184, .38) transparent !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content::-webkit-scrollbar {
  width: 6px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content::-webkit-scrollbar-track {
  background: transparent !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-detail-content::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(148, 163, 184, .34) !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-total-row {
  grid-template-columns: minmax(0, 1fr) 82px 58px 54px !important;
  column-gap: 12px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-no-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-no-change .candidate-result-row,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-no-change .candidate-result-total-row {
  grid-template-columns: minmax(0, 1fr) 82px 58px !important;
  column-gap: 12px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-main.popup-party-pct-cell {
  width: auto !important;
  max-width: none !important;
  flex-basis: auto !important;
  background-size: 100% 100% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-name {
  max-width: 100% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-row {
  min-height: 64px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-main {
  padding-top: 12px !important;
  padding-bottom: 10px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-note {
  padding: 10px 20px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-footer-updated-only {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 20px 12px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-party-pct-cell .candidate-result-party {
  color: color-mix(in srgb, var(--rd-text) 86%, transparent) !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-votes,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-pct,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-change,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-seats {
  align-self: start !important;
  padding-top: 20px !important;
  line-height: 1 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-votes {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-votes > div:first-child,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-pct,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-change .change-indicator,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-seats {
  line-height: 1 !important;
}

@media (max-width: 1480px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-head-change,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-change {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-results-head,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-row,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-with-change .candidate-result-total-row {
    grid-template-columns: minmax(0, 1fr) 82px 58px !important;
  }
}

/* Compact map popup header treatment, matching the broadcast-card mockup. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
  grid-template-columns: minmax(0, max-content) auto minmax(116px, 1fr) !important;
  align-items: center !important;
  column-gap: 16px !important;
  row-gap: 8px !important;
  padding: 18px 20px 17px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .map-selection-eyebrow {
  grid-column: 1 / -1 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
  grid-column: 1 !important;
  font-size: clamp(31px, 2.65vw, 36px) !important;
  line-height: .98 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-context-label {
  grid-column: 2 !important;
  align-self: center !important;
  padding-left: 12px !important;
  border-left: 1px solid color-mix(in srgb, var(--rd-border-strong) 78%, transparent) !important;
  color: var(--rd-text-soft) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: .04em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
  grid-column: 3 !important;
  display: grid !important;
  grid-template-columns: max-content 72px !important;
  align-items: center !important;
  justify-content: end !important;
  justify-self: end !important;
  gap: 6px !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-bar {
  width: 72px !important;
  height: 7px !important;
  margin: 0 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-head {
  min-height: 44px !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
  align-items: center !important;
  font-size: 13px !important;
  letter-spacing: .045em !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-header {
  grid-template-columns: minmax(0, max-content) auto minmax(116px, 1fr) !important;
  align-items: center !important;
  column-gap: 16px !important;
  row-gap: 8px !important;
  padding: 18px 20px 17px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .map-selection-eyebrow {
  grid-column: 1 / -1 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result h3 {
  grid-column: 1 !important;
  font-size: clamp(31px, 2.65vw, 36px) !important;
  line-height: .98 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-context-label {
  grid-column: 2 !important;
  align-self: center !important;
  padding-left: 12px !important;
  border-left: 1px solid color-mix(in srgb, var(--rd-border-strong) 78%, transparent) !important;
  color: var(--rd-text-soft) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: .04em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-reporting-wrap {
  grid-column: 3 !important;
  display: grid !important;
  grid-template-columns: max-content 72px !important;
  align-items: center !important;
  justify-content: end !important;
  justify-self: end !important;
  gap: 6px !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-reporting-bar {
  width: 72px !important;
  height: 7px !important;
  margin: 0 !important;
}

@media (max-width: 760px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-context-label,
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
    grid-column: 1 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-context-label {
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
    justify-self: stretch !important;
    justify-content: stretch !important;
  }
}

@media (max-width: 1480px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
    grid-template-columns: minmax(0, max-content) auto !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
    grid-column: 1 / -1 !important;
    justify-self: end !important;
    margin-top: -2px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-header {
    grid-template-columns: minmax(0, max-content) auto !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-reporting-wrap {
    grid-column: 1 / -1 !important;
    justify-self: end !important;
    margin-top: -2px !important;
  }
}

/* Selected-electorate headers must never let the title collide with metadata. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  row-gap: 8px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .map-selection-eyebrow {
  display: none !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result h3 {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  max-width: 100% !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-context-label {
  grid-column: 1 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-reporting-wrap {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  margin: 0 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
  grid-template-columns: minmax(0, max-content) auto minmax(116px, 1fr) !important;
  row-gap: 0 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-context-label {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

@media (max-width: 620px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-header {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-result .popup-reporting-wrap {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: stretch !important;
    justify-content: stretch !important;
  }
}

/* Electorates tab table: keep scrolling clean without sticky-column artifacts. */
body.dashboard-body[data-dashboard-view="electorates"] .map-card,
body.dashboard-body[data-dashboard-view="electorates"] .map-card-body,
body.dashboard-body[data-dashboard-view="electorates"] #mapWrap,
body.dashboard-body[data-dashboard-view="electorates"] #mapDataView {
  height: calc(100dvh - var(--dd-header-h, 46px) - 128px) !important;
  min-height: 560px !important;
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="electorates"] #mapDataView {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 14px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-toolbar {
  flex: 0 0 auto !important;
  margin: 0 !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: auto !important;
  border: 1px solid var(--rd-rule) !important;
  border-radius: var(--rd-radius-sm) !important;
  background: color-mix(in srgb, var(--rd-panel) 96%, transparent) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148, 163, 184, .42) transparent !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap::-webkit-scrollbar {
  width: 7px !important;
  height: 7px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap::-webkit-scrollbar-track {
  background: transparent !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(148, 163, 184, .36) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table {
  min-width: 980px !important;
  width: 100% !important;
  table-layout: fixed !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
  height: 38px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  background: var(--rd-panel) !important;
  box-shadow: 0 1px 0 var(--rd-border-strong) !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td:first-child {
  position: static !important;
  left: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table thead th:first-child {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  z-index: 5 !important;
  box-shadow: 0 1px 0 var(--rd-border-strong) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-table td {
  height: 42px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-note {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  min-height: 40px !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-updated {
  margin-left: auto !important;
  text-align: right !important;
  white-space: nowrap !important;
}

/* Footer attribution should sit on the page, not inside a separate strip. */
body.dashboard-body .dashboard-footer {
  margin-top: 8px !important;
  min-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.dashboard-body .dashboard-footer-inner {
  min-height: 0 !important;
  padding: 0 8px !important;
  background: transparent !important;
}

/* Electorates expanded rows reuse the map popup markup. Keep that inline detail
   on the same broadcast grid system instead of allowing the old stacked popup
   rules to leak through. */
body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row > td {
  padding: 0 12px 12px !important;
  overflow: visible !important;
  background: rgba(96, 165, 250, .04) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail {
  padding-top: 12px !important;
  border-top: 1px solid var(--rd-rule) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup {
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .map-selection-eyebrow {
  display: none !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-header {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 260px) !important;
  align-items: center !important;
  gap: 10px 22px !important;
  min-height: 0 !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--rd-border-strong) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-header h3 {
  grid-column: 1 !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--rd-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-context-label {
  grid-column: 2 !important;
  margin: 0 !important;
  min-width: 0 !important;
  padding-left: 18px !important;
  border-left: 1px solid var(--rd-border-strong) !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  line-height: 1 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-reporting-wrap {
  grid-column: 3 !important;
  display: grid !important;
  grid-template-columns: max-content minmax(90px, 1fr) !important;
  align-items: center !important;
  justify-self: end !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-reporting-text {
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-reporting-bar {
  width: 100% !important;
  min-width: 72px !important;
  height: 6px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(147, 197, 253, .28) !important;
  border-radius: 999px !important;
  background: rgba(148, 163, 184, .22) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-reporting-fill {
  height: 100% !important;
  border-radius: inherit !important;
  background: var(--rd-accent) !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-list {
  width: 100% !important;
  background: transparent !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-head,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-row,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-total-row {
  display: grid !important;
  align-items: stretch !important;
  min-width: 0 !important;
  column-gap: 18px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-result-row,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-result-total-row {
  grid-template-columns: minmax(0, 1fr) 118px 78px 82px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-no-change .candidate-results-head,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-no-change .candidate-result-row,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-no-change .candidate-result-total-row {
  grid-template-columns: minmax(0, 1fr) 118px 78px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-head {
  min-height: 42px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-head > div {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-head > div:not(:first-child) {
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-row {
  position: relative !important;
  min-height: 58px !important;
  padding: 0 12px 0 0 !important;
  overflow: hidden !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  background-image: none !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-main {
  position: relative !important;
  min-width: 0 !important;
  padding: 10px 10px 9px 18px !important;
  overflow: hidden !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-main.popup-party-pct-cell {
  width: auto !important;
  max-width: none !important;
  flex-basis: auto !important;
  background-size: 100% 100% !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .vertical-party-bar {
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 6px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-name,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-party {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-name {
  color: var(--rd-text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-party {
  margin-top: 5px !important;
  color: var(--rd-text) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .035em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-num {
  align-self: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--rd-text-soft) !important;
  font-size: 14px !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-votes {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 4px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-winner-margin {
  margin: 0 !important;
  color: var(--rd-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-change .change-indicator {
  justify-content: flex-end !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-total-row {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-top: 1px solid var(--rd-border-strong) !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-total-row > div:not(:first-child) {
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-total-row .candidate-result-num {
  color: var(--rd-text-soft) !important;
  font-size: 15px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-note {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  min-height: 38px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .02em !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-updated {
  margin-left: auto !important;
  text-align: right !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table th,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table td {
  height: 44px !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  border-bottom: 1px solid var(--rd-rule) !important;
  background: transparent !important;
  color: var(--rd-text-soft) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table th {
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table th.num,
body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table td.num {
  text-align: right !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table .candidate-cell {
  position: relative !important;
  padding-left: 24px !important;
  color: var(--rd-text) !important;
  font-weight: 800 !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table .popup-party-total-row td {
  border-top: 1px solid var(--rd-border-strong) !important;
  color: var(--rd-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-table .popup-party-total-row .num {
  color: var(--rd-text-soft) !important;
  font-size: 15px !important;
}

body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-footer {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  color: var(--rd-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
}

@media (max-width: 980px) {
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-header {
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-context-label {
    grid-column: 2 !important;
    justify-self: end !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-reporting-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: stretch !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-results-head,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-result-row,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-result-total-row {
    grid-template-columns: minmax(0, 1fr) 104px 70px 70px !important;
    column-gap: 12px !important;
  }
}

@media (max-width: 1480px) {
  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    row-gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary h3 {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-context-label {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel.has-national-summary .popup-reporting-wrap {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    margin: 0 !important;
  }
}

/* Phone layout pass: keep the app useful on narrow screens without squeezing
   the desktop election-wall composition into a phone viewport. */
@media (max-width: 660px) {
  html,
  body.dashboard-body {
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body.dashboard-body .app-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
  }

  body.dashboard-body .app-header-inner {
    min-height: 48px !important;
    padding: 0 10px !important;
  }

  body.dashboard-body .app-brand-text {
    font-size: 14px !important;
  }

  body.dashboard-body .top-links {
    gap: 14px !important;
    font-size: 10px !important;
  }

  body.dashboard-body .dashboard-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
  }

  body.dashboard-body .dashboard-shell > .dashboard-view-tabs {
    position: sticky !important;
    top: var(--dd-header-h, 48px) !important;
    z-index: 850 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    background: var(--rd-bg) !important;
  }

  body.dashboard-body .dashboard-view-tab {
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 4px !important;
    overflow: hidden !important;
    border-radius: 5px !important;
    font-size: 10px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.dashboard-body .card {
    border-radius: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .col-left {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-card,
  body.dashboard-body[data-dashboard-view="home"] .votes-seats-card,
  body.dashboard-body[data-dashboard-view="home"] .home-controls-card {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 0 !important;
    border-radius: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-card {
    padding: 12px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-identity-block {
    padding: 0 0 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .app-title-main,
  body.dashboard-body[data-dashboard-view="home"] .app-header-title-main {
    font-size: clamp(28px, 8.5vw, 38px) !important;
    line-height: .98 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .app-header-status {
    margin-top: 8px !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .results-current-block {
    padding-top: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .overall-big {
    font-size: clamp(42px, 14vw, 56px) !important;
    line-height: .92 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .overall-sub {
    margin-top: 6px !important;
    font-size: 15px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .reporting-progress {
    width: min(250px, 76vw) !important;
    height: 7px !important;
    margin-top: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    margin-top: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat {
    min-width: 0 !important;
    padding: 8px 5px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat span {
    font-size: 7.5px !important;
    line-height: 1.08 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .current-results-stat strong {
    margin-top: 5px !important;
    font-size: 15px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-controls-card {
    padding: 7px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-controls-grid,
  body.dashboard-body[data-dashboard-view="home"] .home-control-group,
  body.dashboard-body[data-dashboard-view="home"] .toggle-bar.toggle-bar-4 {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .toggle-bar.toggle-bar-4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .toggle-bar.toggle-bar-4 .toggle-btn {
    min-width: 0 !important;
    height: 34px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .votes-seats-card > .card-head {
    align-items: center !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .seat-main-heading {
    font-size: 19px !important;
    line-height: 1 !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-seat-actions {
    gap: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-seat-party-toggle {
    width: 118px !important;
    gap: 4px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-seat-party-toggle .toggle-btn {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
  body.dashboard-body[data-dashboard-view="home"] .home-party-row,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    grid-template-columns: minmax(92px, 1fr) 124px 58px !important;
    column-gap: 8px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head {
    min-height: 34px !important;
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head > div:nth-child(3),
  body.dashboard-body[data-dashboard-view="home"] .home-party-electorates,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row > div:nth-child(3) {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-row {
    min-height: 58px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-main {
    min-width: 0 !important;
    padding-left: 12px !important;
    overflow: hidden !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-name {
    position: relative !important;
    z-index: 3 !important;
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: 13.5px !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .28) !important;
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes {
    grid-template-columns: minmax(0, 1fr) 34px !important;
    column-gap: 5px !important;
    row-gap: 2px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-pct {
    font-size: 16px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-vote-change {
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes > .home-party-vote-count {
    font-size: 13.5px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-seats {
    grid-template-columns: minmax(0, 1fr) 24px !important;
    column-gap: 4px !important;
    padding-top: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-seats > strong {
    font-size: 16px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-seats .home-party-seat-change {
    min-width: 24px !important;
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    min-height: 44px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .bloc-summary {
    margin: 8px 10px 10px !important;
    padding: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .bloc-summary-head {
    align-items: center !important;
    gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .bloc-summary-head-actions {
    gap: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .bloc-simple-grid {
    grid-template-columns: 1fr !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .bloc-toggle-groups {
    grid-template-columns: 1fr !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .bloc-toggle-divider {
    width: 100% !important;
    min-height: 1px !important;
    height: 1px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .map-card {
    min-height: 420px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .mobile-map-unavailable {
    min-height: 380px !important;
    padding: 32px 24px !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .mobile-map-unavailable h2 {
    font-size: 22px !important;
    line-height: 1.04 !important;
  }

  body.dashboard-body[data-dashboard-view="map"] .mobile-map-unavailable p {
    max-width: 292px !important;
    font-size: 13px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-card,
  body.dashboard-body[data-dashboard-view="electorates"] .map-card-body,
  body.dashboard-body[data-dashboard-view="electorates"] #mapWrap,
  body.dashboard-body[data-dashboard-view="electorates"] #mapDataView,
  body.dashboard-body[data-dashboard-view="trends"] .map-card,
  body.dashboard-body[data-dashboard-view="trends"] .map-card-body,
  body.dashboard-body[data-dashboard-view="trends"] #mapWrap,
  body.dashboard-body[data-dashboard-view="trends"] #voteShareCard {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] #mapDataView {
    gap: 10px !important;
    padding: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-toolbar-group {
    min-width: 0 !important;
    width: 100% !important;
    padding: 20px 5px 5px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-toolbar-group::before {
    top: 6px !important;
    left: 6px !important;
    font-size: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-filter-btn {
    min-width: 0 !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 5px !important;
    font-size: 9.5px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: separate !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table colgroup,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table thead {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tbody {
    display: grid !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tr[data-code] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "electorate pct"
      "leader votes"
      "party change"
      "report reporting" !important;
    gap: 5px 12px !important;
    min-width: 0 !important;
    padding: 10px !important;
    border: 1px solid var(--rd-rule) !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--rd-panel) 96%, transparent) !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tr[data-code].selected {
    border-color: var(--rd-border-strong) !important;
    background: color-mix(in srgb, var(--rd-panel-2) 74%, var(--rd-panel)) !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tr[data-code] > td {
    display: block !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-electorate-cell {
    grid-area: electorate !important;
    color: var(--rd-text) !important;
    font-size: 13px !important;
    font-weight: 850 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-result-cell {
    grid-area: leader !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    color: var(--rd-text-soft) !important;
    font-size: 12px !important;
    font-weight: 750 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-bar {
    flex: 0 0 4px !important;
    width: 4px !important;
    height: 18px !important;
    border-radius: 999px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-leader-label {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-party-cell {
    grid-area: party !important;
    color: var(--rd-muted) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-votes-cell {
    grid-area: votes !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-pct-cell {
    grid-area: pct !important;
    color: var(--rd-text) !important;
    font-size: 15px !important;
    font-weight: 850 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-change-cell {
    grid-area: change !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-reporting-cell {
    grid-area: reporting !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-reporting-cell::before {
    content: "Reporting " !important;
    color: var(--rd-muted) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-votes-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-change-cell,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-reporting-cell {
    justify-self: end !important;
    color: var(--rd-text-soft) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row {
    display: block !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row > td {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail {
    margin: -1px 0 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    border: 1px solid var(--rd-rule) !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--rd-panel) 96%, transparent) !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-header {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
    padding-bottom: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-header h3 {
    grid-column: 1 !important;
    font-size: 22px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-context-label {
    grid-column: 1 !important;
    justify-self: start !important;
    padding-left: 0 !important;
    border-left: 0 !important;
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-reporting-wrap {
    grid-column: 1 !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    width: 100% !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-results-head,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-result-row,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-with-change .candidate-result-total-row {
    grid-template-columns: minmax(0, 1fr) 76px 52px !important;
    column-gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-head-change,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-change {
    display: none !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-head {
    padding: 8px 6px !important;
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-row {
    min-height: 54px !important;
    padding-right: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-main {
    padding: 9px 7px 8px 14px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-name {
    font-size: 13px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-party {
    font-size: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-result-num {
    font-size: 13px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-winner-margin {
    font-size: 9px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-note,
  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .popup-footer {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 9px 6px !important;
    font-size: 11px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail .candidate-results-updated {
    margin-left: 0 !important;
    text-align: left !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] #voteShareCard {
    padding: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-stack {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-panel {
    min-height: 420px !important;
    padding: 14px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-panel-head {
    align-items: flex-start !important;
    gap: 6px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-canvas-wrap {
    min-height: 210px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend {
    gap: 8px 10px !important;
  }

  body.dashboard-body[data-dashboard-view="trends"] .trend-line-legend-item {
    font-size: 12px !important;
  }

  body.dashboard-body .dashboard-footer {
    margin: 8px 0 0 !important;
    padding: 0 10px 8px !important;
  }

  body.dashboard-body .dashboard-footer-inner {
    justify-content: flex-start !important;
    padding: 0 !important;
    font-size: 10px !important;
  }

  body.dashboard-body .dashboard-footer-inner span:not(:last-child),
  body.dashboard-body .dashboard-footer-inner .footer-sep {
    display: none !important;
  }
}

/* Final phone corrections after the table-to-list conversion. */
@media (max-width: 660px) {
  body.dashboard-body[data-dashboard-view="home"] .home-party-results-head,
  body.dashboard-body[data-dashboard-view="home"] .home-party-row,
  body.dashboard-body[data-dashboard-view="home"] .home-party-total-row {
    grid-template-columns: minmax(90px, 1fr) 132px 52px !important;
    column-gap: 7px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes {
    grid-template-columns: minmax(0, 1fr) 38px !important;
    column-gap: 4px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-pct {
    font-size: 15.5px !important;
  }

  body.dashboard-body[data-dashboard-view="home"] .home-party-votes .home-party-vote-change {
    font-size: 10.5px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tr[data-code] {
    grid-template-areas:
      "electorate pct"
      "leader votes"
      "party change" !important;
    grid-auto-rows: min-content !important;
    align-items: center !important;
    min-height: 0 !important;
    padding: 9px 10px !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tr[data-code] > td {
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.12 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-pct-cell::after {
    content: "%" !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-table tr[data-code] > .map-data-reporting-cell {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-detail-row > td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.dashboard-body[data-dashboard-view="electorates"] .map-data-inline-detail {
    height: auto !important;
    min-height: 0 !important;
  }
}

/* Keep the broadcast hierarchy without making every primary result equally heavy. */
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .popup-header h3 {
  font-weight: 750 !important;
}

body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-results-head,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-name,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-party,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-num,
body.dashboard-body[data-dashboard-view="map"] #mapDetailPanel .candidate-result-total-row {
  font-weight: 700 !important;
}
