/*
 * Senate + Governor + House hub — mobile rounded panels (trial redesign).
 * Also: race forecast pages opt-in via body.race-forecast-mob-panels
 * (Iowa Senate forecast trial).
 *
 * REVERT hub: Remove the stylesheet + script links from 2026-us-senate/index.html,
 * governor/index.html, and 2026-us-house/index.html (search "HUB MOBILE PANELS").
 * REVERT forecast: Remove body.race-forecast-mob-panels + the same 2 links from
 * the opted-in state forecast index.html.
 */

@media (max-width: 767px) {
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) {
    --senate-hub-panel-bg: #0d0f14;
    --senate-hub-panel-border: rgba(32, 40, 55, 0.95);
    --senate-hub-panel-radius: 14px;
    /* Between panels: 10px below higher + 20px above lower.
       Hero blue line → map: 10px under the rule + 10px panel-above = 20px. */
    --senate-hub-panel-gap-below: 10px;
    --senate-hub-panel-gap-above: 20px;
    --senate-hub-hero-gap-below-line: 20px;
    --senate-hub-panel-gap: calc(
      var(--senate-hub-panel-gap-below) + var(--senate-hub-panel-gap-above)
    );
    --senate-hub-panel-pad-x: 0.95rem;
    --senate-hub-panel-pad-y: 30px;
    /* Inherited by mid-ads (siblings of chart host) — must live on body, not only charts. */
    --senate-hub-panel-channel-w: var(
      --et-mob-channel-w,
      var(
        --et-mobile-standard-width,
        var(
          --et-mobile-poll-box-width,
          calc(
            100% - var(--et-mob-channel-pl, max(1rem, env(safe-area-inset-left))) -
              var(--et-mob-channel-pr, max(1rem, env(safe-area-inset-right)))
          )
        )
      )
    );
  }

  html[data-pollsmax-theme="light"] body:is(.senate-hub-page, .gov-hub-page, .house-hub-page),
  html[data-theme="light"] body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) {
    --senate-hub-panel-bg: #ffffff;
    --senate-hub-panel-border: #b0bbc9;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel {
    background: var(--senate-hub-panel-bg);
    border: 1px solid var(--senate-hub-panel-border);
    border-radius: var(--senate-hub-panel-radius);
    box-sizing: border-box;
    overflow: visible;
    padding-top: var(--senate-hub-panel-pad-y) !important;
    padding-bottom: var(--senate-hub-panel-pad-y) !important;
  }

  /*
   * .senate-right-divider-inset sets border-bottom: none !important (legacy full-bleed
   * rule). Reassert the panel outline on every side, especially Search Senate Polls.
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel.senate-right-divider-inset,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races {
    border: 1px solid var(--senate-hub-panel-border) !important;
    border-bottom: 1px solid var(--senate-hub-panel-border) !important;
    border-radius: var(--senate-hub-panel-radius) !important;
  }

  /* —— Map (seat bar + map + legend/toolbar) —— */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .sleek-maps.senate-hub-mob-panel--map {
    margin-left: var(--et-mob-channel-pl, max(1rem, env(safe-area-inset-left)));
    margin-right: var(--et-mob-channel-pr, max(1rem, env(safe-area-inset-right)));
    /* +10px above map; with hero’s 10px under blue line → 20px total */
    margin-top: var(--senate-hub-panel-gap-below) !important;
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
    padding: var(--senate-hub-panel-pad-y) 0.85rem !important;
    width: auto;
    max-width: none;
  }

  /* Countdown boxes → Election Overview: +3px vs hero default gap. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head--forecast-hero .rf-head-summary.forecast-hub-head-election-details {
    margin-top: 3px !important;
  }

  /* Senate Forecast title — slightly larger than hub hero default. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head--forecast-hero .rf-head-flag-row {
    font-size: clamp(2.05rem, 4.1vw, 2.5rem) !important;
  }

  /* 10px under the bold blue hero rule (pairs with map’s extra 10px → 20px). */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #forecastHubPageHeadMount,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head--forecast-hero {
    margin-bottom: var(--senate-hub-hero-gap-below-line) !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head--forecast-hero[data-forecast-hub-accent="senate"],
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head.forecast-hub-page-head--forecast-hero {
    padding-bottom: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-head-area {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0.2rem !important;
  }

  /*
   * Beat theme-boot’s injected
   *   html.et-mobile-active body… .senate-right-content .forecast-hub-map-head-area
   *   { padding-top: 2rem !important }
   * which out-specs the panel-only rule and stacks ~32px on top of pad-y.
   * Match charts-host specificity (html.et-mobile-active + right-content).
   */
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .forecast-hub-map-head-area,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .sleek-maps .forecast-hub-map-head-area,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .senate-hub-mob-panel--map .forecast-hub-map-head-area,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .sleek-maps.senate-hub-mob-panel--map .forecast-hub-map-head-area,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .sleek-map-pane > .forecast-hub-map-head-area,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .sleek-map-pane > :first-child.forecast-hub-map-head-area {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
  }

  /*
   * Map: kill legacy head pt-8 / 2rem gap above the first item; keep seat-bar
   * mt-7 and other mid-panel gaps. Flush legend/toolbar to pad-y bottom only.
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-head-area,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .sleek-map-pane > :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-legend-shell,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-toolbar,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .sleek-map-pane > :last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-seat-block,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .pl-4.pr-0,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map [class*="pl-4"][class*="pr-0"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-stage {
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-toolbar::after {
    display: none !important;
    content: none !important;
    margin: 0 !important;
    height: 0 !important;
  }

  /* True 30px pad-y only — kill title/button nudges that stacked on top. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-title-row {
    position: relative !important;
    top: 0 !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-title {
    top: 0 !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-head-slot {
    margin-top: 0 !important;
    align-self: center !important;
  }

  /* Key + Show Flips / More Detail: center in the map panel (not left-aligned). */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-toolbar {
    align-items: center !important;
    /* Under map: +10px vs hub default calc(0.35rem + 5px). Key↔sliders: +5px vs 0.6rem. */
    margin-top: calc(0.35rem + 15px) !important;
    gap: calc(0.6rem + 5px) !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-key {
    align-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-map-controls {
    width: auto !important;
    max-width: 100% !important;
    align-self: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* —— Simulation charts: each title+chart is its own panel —— */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section {
    --senate-hub-panel-channel-w: var(
      --et-mob-channel-w,
      var(
        --et-mobile-standard-width,
        var(
          --et-mobile-poll-box-width,
          calc(
            100% - var(--et-mob-channel-pl, max(1rem, env(safe-area-inset-left))) -
              var(--et-mob-channel-pr, max(1rem, env(safe-area-inset-right)))
          )
        )
      )
    );
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    /* Margins on each chart panel own the 10-below / 20-above rhythm */
    gap: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /*
   * Beat theme-boot’s et-mob-standard-vertical-gap (~2rem) on the charts host.
   */
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content .hub-simulation-charts-section,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .hub-simulation-charts-section,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    gap: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section > .senate-right-content-nudge-up {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    width: 100%;
    gap: 0 !important;
    transform: none !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart {
    width: var(--senate-hub-panel-channel-w) !important;
    max-width: var(--senate-hub-panel-channel-w) !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: var(--senate-hub-panel-gap-above) !important;
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
    align-self: center !important;
    box-sizing: border-box !important;
    padding: var(--senate-hub-panel-pad-y) var(--senate-hub-panel-pad-x) !important;
  }

  /* Gray header blurbs under Simulated / Projected / Control — slightly under text-sm */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > .border-b > p.text-slate-400,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > .border-b > p.text-sm {
    font-size: 0.8125rem !important; /* was text-sm (0.875rem) */
    line-height: 1.45 !important;
  }

  /*
   * Mid display ads between panels: same centered channel width.
   * Critical: flex + contain:size on waiting shells collapses width to 0 unless
   * width/min-width are real lengths (not an undefined custom property).
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .pollsmax-ad-shell,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .pollsmax-ad-banner,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile) {
    width: var(--senate-hub-panel-channel-w) !important;
    max-width: var(--senate-hub-panel-channel-w) !important;
    min-width: min(100%, var(--senate-hub-panel-channel-w)) !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
    box-sizing: border-box !important;
    border-radius: var(--senate-hub-panel-radius);
    overflow: hidden;
  }

  /*
   * Only filled hub mids take the inter-panel gap. Unfilled/waiting used to keep
   * 15px margins while height oscillated → races jump (~gov mobile CLS).
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(
    #senateHubAdAfterMapMobile,
    #govHubAdAfterMapMobile,
    #houseHubAdAfterMapMobile,
    #senateHubAdBeforeRacesMobile,
    #govHubAdBeforeRacesMobile,
    #houseHubAdBeforeRacesMobile
  ):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) {
    margin-top: calc(var(--senate-hub-panel-gap) / 2) !important;
    margin-bottom: calc(var(--senate-hub-panel-gap) / 2) !important;
  }

  /*
   * Hub mid ads own the inter-panel gap only when the unit is actually showing.
   * Unfilled/waiting shells collapse to height 0 — if we still zero map/chart
   * facing margins, spacing under the map becomes ~0 on Senate/Gov mobile.
   */
  body:is(.senate-hub-page, .gov-hub-page) .sleek-maps.senate-hub-mob-panel--map:has(+ :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) {
    margin-bottom: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #senateHubSimulationChartsSection,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #govHubSimulationChartsSection {
    margin-top: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #senateHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #govHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #senateHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #govHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child {
    margin-top: 0 !important;
  }

  /* House keeps prior ad-adjacent collapse (house mid-ad path differs). */
  body.house-hub-page .sleek-maps.senate-hub-mob-panel--map:has(+ #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) {
    margin-bottom: 0 !important;
  }
  body.house-hub-page #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section,
  body.house-hub-page #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #houseHubSimulationChartsSection {
    margin-top: 0 !important;
  }
  body.house-hub-page #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section > .senate-hub-mob-panel--chart:first-child,
  body.house-hub-page #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #houseHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body.house-hub-page #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body.house-hub-page #houseHubAdAfterMapMobile:is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #houseHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child {
    margin-top: 0 !important;
  }

  /* Senate/Gov: always keep a real gap under the map when no filled mid-ad follows. */
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > .sleek-maps.senate-hub-mob-panel--map:not(:has(+ :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])))) {
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
  }
  /* Collapsed after-map stubs must not eat the map→chart gap. */
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):not([data-ad-state="filled"]):not(:has(ins.adsbygoogle[data-ad-status="filled"])) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
  }
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > .hub-simulation-charts-section > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > #senateHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > #govHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > .hub-simulation-charts-section .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > #senateHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) .senate-right-content > #govHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child {
    margin-top: var(--senate-hub-panel-gap-above) !important;
  }
  /* Filled after-map ad still owns that gap (overrides the restore above). */
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #senateHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #govHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #senateHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #govHubSimulationChartsSection .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child {
    margin-top: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart:has(+ :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) {
    margin-bottom: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #hubMobileRacesSection,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + #hubMobileRacesSection,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #senateHubSimulationChartsSection:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #senateHubSimulationChartsSection:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + #hubMobileRacesSection,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #govHubSimulationChartsSection:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #houseHubSimulationChartsSection:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #govHubSimulationChartsSection:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + #hubMobileRacesSection,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #houseHubSimulationChartsSection:has(> :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + #hubMobileRacesSection {
    margin-top: 0 !important;
  }

  /*
   * Mobile hub mids: never leave a 1px+margin probe in flow (gov BeforeRaces was
   * oscillating live↔empty every few seconds → ~0.08 CLS). Stay fully collapsed
   * until Google marks filled; PC desktop placements are unchanged.
   */
  #senateHubAdAfterMapMobile:not(:has(ins.adsbygoogle[data-ad-status="filled"])),
  #senateHubAdBeforeRacesMobile:not(:has(ins.adsbygoogle[data-ad-status="filled"])),
  #govHubAdAfterMapMobile:not(:has(ins.adsbygoogle[data-ad-status="filled"])),
  #govHubAdBeforeRacesMobile:not(:has(ins.adsbygoogle[data-ad-status="filled"])),
  #houseHubAdAfterMapMobile:not(:has(ins.adsbygoogle[data-ad-status="filled"])),
  #houseHubAdBeforeRacesMobile:not(:has(ins.adsbygoogle[data-ad-status="filled"])) {
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* Never show the old under-map-key display unit */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubAdAfterMapKeyMobile {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* Nothing paints above the map block (stray shells / Auto ads). */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .pollsmax-ad-shell:has(+ .sleek-maps),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .pollsmax-ad-single:has(+ .sleek-maps),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .google-auto-placed:has(+ .sleek-maps),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .google-auto-placed[data-pollsmax-hub-ad-scrubbed="1"],
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head + .google-auto-placed,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head + .pollsmax-ad-shell,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-head + .pollsmax-ad-single {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /*
   * Chart panels: beat pollsmax-lazy-charts ID rules that add huge title
   * margin-top / margin-bottom and stage padding-bottom on top of pad-y.
   * Keep title↔chart inner gap; flush first/last to the 30px shell only.
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .border-b,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > .border-b,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .border-b:has(+ .hub-sim-hist-stage),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > .border-b:has(+ .hub-sim-hist-stage) {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .hub-sim-hist-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .race-forecast-sim-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > .hub-sim-hist-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > .hub-sim-hist-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > .race-forecast-sim-stage {
    /* Inner gap under title rule; no extra below the chart into pad-y */
    margin-top: 0.35rem !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    top: 0 !important;
    transform: none !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) .senate-hub-mob-panel--chart > .hub-sim-hist-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .senate-hub-mob-panel--chart > .hub-sim-hist-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart > .hub-sim-hist-stage {
    /* +10px down from prior (53px → 63px); left pin from JS (−20px). */
    margin-top: calc(0.35rem + 63px) !important;
    /* Beat lazy-charts shorthand (… 0.1rem …) so bottom is panel pad-y only (30). */
    padding: 0.35rem calc(0.45rem - 8px) 0 0.45rem !important;
  }

  /* Simulated Results hist: left pin comes from JS (−20px vs title-rule). */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart .hub-sim-hist-stage {
    margin-right: 0 !important;
    align-self: flex-start !important;
  }

  /* Chart stages = title-rule width (panel content / standard in-panel width). */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--search .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart .hub-sim-hist-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--search .senate-search-chart-stage {
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart .sleek-chart-stage > .relative,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--search .sleek-chart-stage > .relative,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--chart .sleek-chart-stage canvas,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--search .sleek-chart-stage canvas {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* Square chart-stage boxes only — keep rounded panel outlines. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .hub-sim-hist-stage.sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-simulation-charts-section .race-forecast-sim-stage.sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section .sleek-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section .senate-search-chart-stage.sleek-chart-stage {
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }

  /*
   * All Races + Search Polls: lock to root standard channel width
   * (same as Odds / Projected Seats panels). Prefer :root metrics — do NOT
   * use the section's own --et-mob-channel-w from poll-box sync (padding helper).
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search {
    --senate-hub-panel-channel-w: var(
      --et-mobile-standard-width,
      var(
        --et-mobile-poll-box-width,
        calc(
          100vw - var(--et-mobile-standard-width-left, max(1rem, env(safe-area-inset-left))) -
            var(--et-mobile-standard-width-right, max(1rem, env(safe-area-inset-right)))
        )
      )
    );
    width: var(--senate-hub-panel-channel-w) !important;
    max-width: var(--senate-hub-panel-channel-w) !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    align-self: center !important;
    justify-self: center !important;
  }

  /* Kill full-bleed pl-4 / pr-0 utilities on Search Senate Polls */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search.pl-4,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search[class*="pl-"],
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search[class*="pr-"] {
    padding-left: var(--senate-hub-panel-pad-x) !important;
    padding-right: var(--senate-hub-panel-pad-x) !important;
    padding-top: var(--senate-hub-panel-pad-y) !important;
    padding-bottom: var(--senate-hub-panel-pad-y) !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races {
    margin-top: var(--senate-hub-panel-gap-above) !important;
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
    /* Top stays 30px; bottom 10px tighter than other panels (20px). */
    padding: var(--senate-hub-panel-pad-y) var(--senate-hub-panel-pad-x)
      calc(var(--senate-hub-panel-pad-y) - 10px) !important;
  }

  /*
   * CLS: #hubMobileRacesSection exists before panel classes are applied.
   * Match final pad-y immediately so 8px→30px does not shove the list.
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection:not(.senate-hub-mob-panel--races) {
    margin-top: var(--senate-hub-panel-gap-above) !important;
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
    padding: var(--senate-hub-panel-pad-y) var(--senate-hub-panel-pad-x)
      calc(var(--senate-hub-panel-pad-y) - 10px) !important;
    box-sizing: border-box !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races::before,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races::before {
    content: none !important;
    display: none !important;
  }

  /* All Races: flush first heading / last row to pad-y only. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-inner,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-inner,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-head-area,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-head-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races > :last-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races > :last-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-scroll-wrap,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-scroll-wrap,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-rows,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-rows,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .senate-race-row:last-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .senate-race-row:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* State-name edge fade: match panel bg (#0d0f14), not page bg (#050608) */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section .senate-race-state,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection .senate-race-state {
    background-color: var(--senate-hub-panel-bg) !important;
    box-shadow: 8px 0 12px 8px var(--senate-hub-panel-bg) !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section .senate-race-row:hover .senate-race-state,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection .senate-race-row:hover .senate-race-state {
    background-color: var(--senate-hub-panel-bg) !important;
    box-shadow: 8px 0 12px 8px var(--senate-hub-panel-bg) !important;
  }

  /* —— Search Senate Polls (chart + filters only; no All Polls list) —— */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search {
    display: block !important;
    margin-top: var(--senate-hub-panel-gap-above) !important;
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: var(--senate-hub-panel-pad-y) var(--senate-hub-panel-pad-x) !important;
    /* overflow-x:hidden forces overflow-y to auto and clips the bottom border */
    overflow: visible !important;
    /* Match chart panel channel; JS also pins width from :root */
    width: var(
      --et-mobile-standard-width,
      var(--et-mobile-poll-box-width, var(--senate-hub-panel-channel-w))
    ) !important;
    max-width: var(
      --et-mobile-standard-width,
      var(--et-mobile-poll-box-width, var(--senate-hub-panel-channel-w))
    ) !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /*
   * forecast-hub-map-ui sets map order:1 / charts order:3. Ads default to
   * order:0 and otherwise appear above the map panel — pin them in the gap.
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .sleek-maps.senate-hub-mob-panel--map,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .senate-map-divider {
    order: 1 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile) {
    order: 2 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .hub-simulation-charts-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection) {
    order: 3 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile) {
    order: 4 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > #hubMobileRacesSection {
    order: 5 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .senate-search-polls-section {
    order: 6 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .sleek-maps.senate-hub-mob-panel--map,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .hub-simulation-charts-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .senate-search-polls-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > #hubMobileRacesSection,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile) {
    width: var(
      --et-mobile-standard-width,
      var(--et-mobile-poll-box-width, var(--senate-hub-panel-channel-w, 100%))
    ) !important;
    max-width: var(
      --et-mobile-standard-width,
      var(--et-mobile-poll-box-width, var(--senate-hub-panel-channel-w, 100%))
    ) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
    box-sizing: border-box !important;
  }

  /* Simulation section is a full-width host; its child panels are channel-sized */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .hub-simulation-charts-section {
    width: 100% !important;
    max-width: 100% !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search::before,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-rule-wrap,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-rule-wrap::after,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .gov-search-polls-rule-wrap,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .gov-search-polls-rule-wrap::after {
    content: none !important;
    display: none !important;
    margin: 0 !important;
    height: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-left-col + div,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-poll-sidebar {
    display: none !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-content-nudge {
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-content-nudge > .max-w-4xl {
    max-width: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-content-nudge > .max-w-4xl > h2,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-content-nudge > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search > :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Search: last chart flush to pad-y (no stage bottom pad / leftover list space). */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-left-col,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .sleek-chart-stage.senate-search-chart-stage {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-polls-content-nudge > div:has(> .senate-search-left-col) {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    /* Space under State/Type dropdowns (+10px) */
    margin-top: calc(0.75rem + 10px) !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-left-col {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .search-poll-head-wrap .border-b {
    margin-bottom: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  /*
   * Search Senate Polls chart stage: match Odds / Projected Seats centering +
   * spacing (JS applies left −28 / width +21 vs race-head rule).
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-chart-stage,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .sleek-chart-stage.senate-search-chart-stage {
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    /* Internal gap above chart only; bottom flush to panel pad-y */
    margin-top: calc(0.35rem + 40px) !important;
    margin-bottom: 0 !important;
    /* Override hub Search padding-right: 0.85rem + 47px top margin */
    padding: 0.35rem calc(0.45rem - 8px) 0 !important;
    box-sizing: border-box !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-left-col {
    overflow: visible !important;
    align-items: stretch !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .search-poll-head-wrap {
    width: 100% !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .senate-search-chart-stage > .relative,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-search-polls-section.senate-hub-mob-panel--search .sleek-chart-stage.senate-search-chart-stage > .relative {
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    flex: none !important;
  }
}

/* ==========================================================================
 * Race forecast pages (opt-in: body.race-forecast-mob-panels)
 * Same rounded panel chrome as hub charts — sim / vote / odds / EH / polls.
 * ========================================================================== */
@media (max-width: 767px) {
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) {
    --senate-hub-panel-bg: #0d0f14;
    --senate-hub-panel-border: rgba(32, 40, 55, 0.95);
    --senate-hub-panel-radius: 14px;
    --senate-hub-panel-gap-below: 10px;
    --senate-hub-panel-gap-above: 20px;
    --senate-hub-hero-gap-below-line: 20px;
    --senate-hub-panel-gap: calc(
      var(--senate-hub-panel-gap-below) + var(--senate-hub-panel-gap-above)
    );
    --senate-hub-panel-pad-x: 0.95rem;
    --senate-hub-panel-pad-y: 30px;
    --senate-hub-panel-channel-w: var(
      --et-mob-channel-w,
      var(
        --et-mobile-standard-width,
        var(
          --et-mobile-poll-box-width,
          calc(
            100% - var(--et-mob-channel-pl, max(1rem, env(safe-area-inset-left))) -
              var(--et-mob-channel-pr, max(1rem, env(safe-area-inset-right)))
          )
        )
      )
    );
  }

  html[data-pollsmax-theme="light"] body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium),
  html[data-theme="light"] body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) {
    --senate-hub-panel-bg: #ffffff;
    --senate-hub-panel-border: #b0bbc9;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel {
    background: var(--senate-hub-panel-bg);
    border: 1px solid var(--senate-hub-panel-border);
    border-radius: var(--senate-hub-panel-radius);
    box-sizing: border-box;
    overflow: visible;
  }

  /* Hero → first chart: same rhythm as hub hero → map */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .state-race-page-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #stateRacePageHeadMount .state-race-page-head {
    margin-bottom: var(--senate-hub-hero-gap-below-line) !important;
  }

  /* Section chrome: panels own channel + vertical rhythm */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-section-pad {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-section-pad > .w-full {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-rule {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-sim-block.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trend-card.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-eh-results.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-polling-data.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart {
    width: var(--senate-hub-panel-channel-w) !important;
    max-width: var(--senate-hub-panel-channel-w) !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: var(--senate-hub-panel-gap-above) !important;
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
    align-self: center !important;
    box-sizing: border-box !important;
    padding: var(--senate-hub-panel-pad-y) var(--senate-hub-panel-pad-x) !important;
  }

  /*
   * Sim = first panel under hero (same as hub map):
   * hero margin-bottom hero-gap-below-line (20) + sim margin-top gap-below (10).
   * Below: same as other panels — next sibling owns the full 30px gap.
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-sim-block.senate-hub-mob-panel--chart {
    margin-top: var(--senate-hub-panel-gap-below) !important;
    margin-bottom: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block {
    margin-bottom: 0 !important;
  }

  /*
   * Full 30px inter-panel gap above Vote / Odds / Polling (prior siblings use mb:0).
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.senate-hub-mob-panel--chart:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastVoteCanvas),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.senate-hub-mob-panel--chart:last-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastOddsCanvas),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-polling-data.senate-hub-mob-panel--chart {
    margin-top: var(--senate-hub-panel-gap) !important; /* 30px */
  }

  /* Polling owns the full gap above — don’t stack EH’s gap-below on top */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-eh-results.senate-hub-mob-panel--chart {
    margin-bottom: 0 !important;
  }

  /*
   * Polling Data: kill legacy .race-forecast-polling-data { margin-top: 32px }
   * so title sits on panel pad-y like Vote Share (not 30+32).
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart > .race-forecast-polling-data,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Legacy EH→polls divider — panels own inter-panel gap */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-eh-bottom-rule {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  /* Title rule ↔ chart: same as hub chart panels */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .race-forecast-polling-data-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart .race-related-races-head {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  /*
   * Match hub panel chart stages (senate-hub-mobile-panels hub rules):
   *  - Sim hist: chip room via margin-top calc(0.35rem + 63px), same height formula
   *  - Vote / Odds: 250px plot box, 0.35rem under title rule, no stage border
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-stage.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trend-card.senate-hub-mob-panel--chart .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block:first-child .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block:last-child .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senLineViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govLineViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseLineViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senBarViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govBarViz.sleek-chart-stage {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    top: 0 !important;
    transform: none !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    /* Width / margin-left / align-self come from JS (same hub stretch + left nudge). */
    margin-right: 0 !important;
  }

  /* Simulated Results — hub hist panel rhythm (chip room above plot); beat race-forecast-page.css */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage {
    margin-top: calc(0.35rem + 63px) !important;
    /* Symmetric side pad so the canvas/dot cluster isn't pinched on one side. */
    padding: 0.35rem 0.45rem 0 0.45rem !important;
    padding-bottom: 0 !important;
    --sim-hist-canvas-pad-top: 0.35rem;
    /*
     * Fixed height (no 58vw): mobile chrome show/hide was changing vw and
     * re-firing ResizeObserver → beeswarm re-stack jitter on senate/gov.
     */
    height: calc(328px * 2 / 3 * 1.25 - 10px) !important;
    min-height: calc(328px * 2 / 3 * 1.25 - 10px) !important;
    max-height: calc(328px * 2 / 3 * 1.25 - 10px) !important;
    align-self: flex-start !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage > .relative,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-stage canvas.race-forecast-sim-canvas {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
  }

  /* Vote Share / Odds / Polling Data line — same gap under title rule (0.35rem) */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-stage:not(.race-forecast-sim-stage),
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trend-card.senate-hub-mob-panel--chart .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-stage:not(.race-forecast-sim-stage),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trend-card.senate-hub-mob-panel--chart .race-forecast-chart-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senLineViz.sleek-chart-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govLineViz.sleek-chart-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseLineViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senLineViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govLineViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseLineViz.sleek-chart-stage {
    margin-top: 0.35rem !important;
    margin-bottom: 0 !important;
    padding: 0.35rem calc(0.45rem - 8px) 0.4rem 0.45rem !important;
    align-self: flex-start !important;
  }

  /*
   * Vote / Odds: force hub title↔chart rhythm. race-forecast-page.css otherwise
   * wins with ~61px / ~34px stage margins (and tighter odds head margins).
   * No −Npx nudges here — those were wiping most of the gap.
   */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:first-child .race-forecast-chart-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:last-child .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:first-child .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:last-child .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastVoteCanvas) .race-forecast-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastOddsCanvas) .race-forecast-chart-stage {
    margin-top: 0.35rem !important;
  }

  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:first-child > .border-b,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:last-child > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:first-child > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:last-child > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastVoteCanvas) > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastOddsCanvas) > .border-b {
    /* +14px under the title rule (space above chart) */
    margin-bottom: calc(0.65rem + 14px) !important;
    padding-bottom: 0.65rem !important;
  }

  /* Projected Vote Share: +23px more under title rule than Odds (+14 → +37) */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:first-child > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid > .race-forecast-trend-card.race-forecast-chart-block.senate-hub-mob-panel--chart:first-child > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(#raceForecastVoteCanvas) > .border-b {
    margin-bottom: calc(0.65rem + 37px) !important;
  }

  /* Polling Data: +11px more under title rule than Vote Share (+37 → +48) */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data-head {
    margin-bottom: calc(0.65rem + 48px) !important;
  }

  /* Bar chart (e.g. Montana): 63px tighter under title rule → bars */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels.et-state-poll-bar-chart-active:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data-head,
  body.race-view-forecast.race-forecast-mob-panels.et-state-poll-bar-chart-active:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data-head {
    margin-bottom: calc(0.65rem + 48px - 63px) !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-stage:not(.race-forecast-sim-stage) .relative.w-full,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-trend-chart-inner,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trend-card.senate-hub-mob-panel--chart .race-forecast-trend-chart-inner {
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .sleek-chart-stage > .relative,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .sleek-chart-stage canvas {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* trends-grid used to reserve 50px + 30px for old translateY layout */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid {
    margin-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Hero → first panel (Race Overview rule → sim card) */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .state-race-page-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #stateRacePageHeadMount .state-race-page-head {
    margin-bottom: var(--senate-hub-hero-gap-below-line) !important;
    padding-bottom: 0 !important;
  }

  /* Keep Projected Margin chip inside the stage box */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-sim-avg-tip {
    z-index: 25;
  }

  /*
   * Gray blurbs under panel titles — match hub (text-sm 0.875 → 0.8125).
   * Beat race-forecast-page.css polling-head 0.875rem + clamp preferred size.
   */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .border-b > p.race-forecast-chart-sub,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .border-b > p,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-sub,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-polling-data-head .race-forecast-chart-sub,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-related-races-head .race-forecast-chart-sub,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .border-b > p.race-forecast-chart-sub,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart > .border-b > p,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-chart-sub,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-polling-data-head .race-forecast-chart-sub,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-related-races-head .race-forecast-chart-sub,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData .race-forecast-chart-sub,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces .race-forecast-chart-sub {
    font-size: 0.8125rem !important; /* was text-sm / 0.875rem */
    line-height: 1.45 !important;
    /* Use full title-rule width — kill text-wrap:pretty early wraps ("100,000" on next line). */
    max-width: 100% !important;
    width: 100% !important;
    text-wrap: wrap !important;
    overflow-wrap: break-word !important;
  }

  /* EH / polls: no leftover full-bleed rules under the panel */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData.senate-hub-mob-panel--chart .race-forecast-polling-data-rule,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-polling-data-rule {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Poll chart nested into Polling Data panel — kill full-bleed section chrome */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData [data-forecast-panel-poll-chart="1"],
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData [data-forecast-panel-poll-chart="1"] > div {
    border: none !important;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senLineViz.sleek-chart-stage .relative.w-full,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govLineViz.sleek-chart-stage .relative.w-full,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseLineViz.sleek-chart-stage .relative.w-full {
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
  }

  /*
   * Polling Data bars (≤2 polls): no sleek-chart-stage box — bars sit at panel
   * standard (title-rule) width. Line charts keep their stage chrome.
   */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senBarViz.sleek-chart-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govBarViz.sleek-chart-stage,
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseBarViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senBarViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govBarViz.sleek-chart-stage,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseBarViz.sleek-chart-stage {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin-top: 0.35rem !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #senBarViz .et-poll-bar-chart-inner,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #govBarViz .et-poll-bar-chart-inner,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #houseBarViz .et-poll-bar-chart-inner {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hide poll table on mobile panels; hide leftover bottom shell after chart nests */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #racePollingBottom #pollsTableShell,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #racePollingBottom .state-polls-shell,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #racePollingBottom > section:has(#pollsTableShell) {
    display: none !important;
  }

  body.race-view-forecast.race-forecast-mob-panels.race-forecast-mob-panels-poll-nested:not(.race-forecast-premium) #racePollingBottom {
    display: none !important;
  }

  /* Related Races panel — full outline (all sides), including top+bottom */
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart {
    border-style: solid !important;
    border-width: 1px !important;
    border-color: var(--senate-hub-panel-border) !important;
    border-top-width: 1px !important;
    border-bottom-width: 1px !important;
    border-top-style: solid !important;
    border-bottom-style: solid !important;
    border-top-color: var(--senate-hub-panel-border) !important;
    border-bottom-color: var(--senate-hub-panel-border) !important;
    border-radius: var(--senate-hub-panel-radius) !important;
    background: var(--senate-hub-panel-bg) !important;
    overflow: visible !important;
    margin-top: var(--senate-hub-panel-gap-above) !important;
    /* Top 30px; bottom 28px (pad-y − 2). */
    padding-bottom: calc(var(--senate-hub-panel-pad-y) - 2px) !important;
  }

  /* Match hub All Races: flush last row to panel pad only */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart .race-related-races__list,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart .race-related-races__list,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart .race-related-races__item:last-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart .race-related-races__item:last-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart .race-related-races__item:last-child .race-related-races__link,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart .race-related-races__item:last-child .race-related-races__link {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart > div,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart .race-related-races-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart .race-related-races-head {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceRelatedRaces.senate-hub-mob-panel--chart .race-related-races-rule,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-related-races.senate-hub-mob-panel--chart .race-related-races-rule {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /*
   * Mid ads between forecast panels: channel-centered.
   * Empty/waiting shells must NOT collapse the 30px panel gap (that caused
   * Sim → Vote Share to go to 0). Only filled/live units own the gap.
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPageMount .pollsmax-ad-shell,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPageMount .pollsmax-ad-single,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  ) {
    width: var(--senate-hub-panel-channel-w) !important;
    max-width: var(--senate-hub-panel-channel-w) !important;
    min-width: min(100%, var(--senate-hub-panel-channel-w)) !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
    box-sizing: border-box !important;
    border-radius: var(--senate-hub-panel-radius);
    overflow: hidden;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  ):not([data-ad-state="filled"]):not([data-ad-state="live"]) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  )[data-ad-state="filled"],
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  )[data-ad-state="live"],
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  ):has(ins.adsbygoogle[data-ad-status="filled"]) {
    /* Beat pm-ads 1.25rem (20px) — equal 15px air above/below the creative. */
    margin-top: calc(var(--senate-hub-panel-gap) / 2) !important;
    margin-bottom: calc(var(--senate-hub-panel-gap) / 2) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    pointer-events: auto !important;
  }

  /*
   * Filled mid owns the gap — drop facing panel margins.
   * Include :has(ins filled): shell can stay waiting/live while Google marks the ins.
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="filled"]),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="live"]),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile):has(ins.adsbygoogle[data-ad-status="filled"])),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="filled"]),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="live"]),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile):has(ins.adsbygoogle[data-ad-status="filled"])) {
    margin-bottom: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="filled"] + .senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="live"] + .senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile):has(ins.adsbygoogle[data-ad-status="filled"]) + .senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="filled"] + .race-forecast-trends-grid,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile)[data-ad-state="live"] + .race-forecast-trends-grid,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile, #raceForecastAdUnderPollsMobile):has(ins.adsbygoogle[data-ad-status="filled"]) + .race-forecast-trends-grid,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdTopOfSimMobile[data-ad-state="filled"] + .race-forecast-trends-grid > .senate-hub-mob-panel--chart:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdTopOfSimMobile[data-ad-state="live"] + .race-forecast-trends-grid > .senate-hub-mob-panel--chart:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdTopOfSimMobile:has(ins.adsbygoogle[data-ad-status="filled"]) + .race-forecast-trends-grid > .senate-hub-mob-panel--chart:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdTopOfSimMobile[data-ad-state="filled"] + .race-forecast-trends-grid > .race-forecast-trend-card:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdTopOfSimMobile[data-ad-state="live"] + .race-forecast-trends-grid > .race-forecast-trend-card:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdTopOfSimMobile:has(ins.adsbygoogle[data-ad-status="filled"]) + .race-forecast-trends-grid > .race-forecast-trend-card:first-child,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-ad-state="filled"] + .race-forecast-trends-rule + .race-forecast-eh-results,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-ad-state="live"] + .race-forecast-trends-rule + .race-forecast-eh-results,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile:has(ins.adsbygoogle[data-ad-status="filled"]) + .race-forecast-trends-rule + .race-forecast-eh-results,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-ad-state="filled"] ~ .race-forecast-eh-results,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-ad-state="live"] ~ .race-forecast-eh-results,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile:has(ins.adsbygoogle[data-ad-status="filled"]) ~ .race-forecast-eh-results {
    margin-top: 0 !important;
  }

  /*
   * Footer multiplex must never inherit panel mid-ad collapse (height:0).
   * Keep it full-size on forecast panels pages.
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) aside.pollsmax-site-multiplex,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #pollsmaxSiteMultiplex,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #homeAdMultiplex {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 560px !important;
    max-height: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    flex: none !important;
    align-self: stretch !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) aside.pollsmax-site-multiplex[data-pollsmax-ad-empty="1"],
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #pollsmaxSiteMultiplex[data-pollsmax-ad-empty="1"] {
    display: none !important;
    min-height: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile
  )[data-ad-state="filled"],
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile
  )[data-ad-state="live"],
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile
  ):has(ins.adsbygoogle[data-ad-status="filled"]) {
    overflow: visible !important;
  }

  /*
   * Forecast pages only: hide reformatting regions until panel chrome locks.
   * Chamber hubs (Senate / Gov / House) keep prerendered map/bar/races visible
   * immediately — same first-paint path as desktop.
   */
  html.pm-mob-panels-pending:not(.pm-mob-panels-ready) body.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastPageMount,
    #raceForecastPollingData,
    #raceElectoralHistory,
    #raceRelatedRaces,
    main > .race-related-races,
    main > .race-forecast-eh-section,
    main > section:has(#senLineViz),
    main > section:has(#govLineViz),
    main > section:has(#houseLineViz),
    main > section:has(#senBarViz),
    main > section:has(#govBarViz),
    main > section:has(#houseBarViz)
  ) {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Hubs: never blank the right column waiting on panels JS. */
  html.pm-mob-panels-pending body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content,
  html.pm-mob-panels-ready body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content {
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none;
  }

  /*
   * House: empty charts host (no canvas yet) takes no space.
   * Once static shells or live panels exist, keep layout reserved.
   */
  body.house-hub-page #houseHubSimulationChartsSection[data-house-charts-placeholder="1"]:not(:has(canvas)):not(:has(.senate-hub-mob-panel--chart)),
  body.house-hub-page .hub-simulation-charts-section:not(:has(canvas)):not(:has(.senate-hub-mob-panel--chart)) {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
  }

  body.house-hub-page .hub-simulation-charts-section:has(canvas),
  body.house-hub-page .hub-simulation-charts-section:has(.senate-hub-mob-panel--chart),
  body.house-hub-page #houseHubSimulationChartsSection:has(canvas),
  body.house-hub-page #houseHubSimulationChartsSection:has(.senate-hub-mob-panel--chart) {
    display: block !important;
    opacity: 1;
    min-height: 0;
    height: auto;
  }
}


/* —— House hub: keep CD zoom usable; neutralize legacy mobile rules under panels —— */
@media (max-width: 767px) {
  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-toolbar {
    align-items: center !important;
    justify-content: center !important;
  }

  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-key,
  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-controls {
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Panel pad owns vertical spacing — drop House’s 2rem map-head gap. */
  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-head-area {
    padding-top: 0 !important;
  }

  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-toolbar::after,
  body.house-hub-page .senate-hub-mob-panel--search::before,
  body.house-hub-page .senate-hub-mob-panel--races::before,
  body.house-hub-page .senate-hub-mob-panel--search .senate-search-polls-rule-wrap::after {
    display: none !important;
    content: none !important;
  }

  /* Keep buckets hidden on mobile (same as pre-panels House). */
  body.house-hub-page #houseForecastBucketsSection {
    display: none !important;
  }

  /* CD map zoom viewport stays interactive inside the rounded map panel. */
  body.house-hub-page .senate-hub-mob-panel--map #houseHubMapZoomViewport,
  body.house-hub-page .senate-hub-mob-panel--map .house-hub-map-zoom-viewport--mobile {
    max-width: 100%;
  }

  /* Belt-and-suspenders: never keep desktop map height inside the mobile panel. */
  body.house-hub-page .senate-hub-mob-panel--map #houseCdMap,
  body.house-hub-page .senate-hub-mob-panel--map #houseHubMapStage #houseCdMap {
    height: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 1000 / 600;
  }

  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-stage {
    top: 0 !important;
  }

  /*
   * House CD map CLS (mobile): desktop prerender uses absolute 664px clip, but
   * phones previously forced relative+auto until zoom JS added --mobile (~6s),
   * then jumped ~294→213. Reserve measured post-JS geometry from first paint.
   * Once --mobile is on, zoom JS owns top/left/width/height (no !important lock).
   */
  body.house-hub-page #houseHubMapZoomViewport:not(.house-hub-map-zoom-viewport--mobile),
  body.house-hub-page .senate-hub-mob-panel--map #houseHubMapZoomViewport:not(.house-hub-map-zoom-viewport--mobile) {
    position: absolute !important;
    top: 14px !important;
    left: 0 !important;
    width: 100% !important;
    height: 213px !important;
    max-width: 100%;
    overflow: hidden;
  }

  body.house-hub-page #houseHubMapZoomViewport.house-hub-map-zoom-viewport--mobile,
  body.house-hub-page .senate-hub-mob-panel--map #houseHubMapZoomViewport.house-hub-map-zoom-viewport--mobile {
    position: absolute !important;
    max-width: 100%;
    overflow: hidden;
  }

  body.house-hub-page #houseHubMapZoomSpacer,
  body.house-hub-page .senate-hub-mob-panel--map #houseHubMapZoomSpacer {
    display: block !important;
    height: 227px;
    min-height: 227px;
    aspect-ratio: auto;
  }

  body.house-hub-page .house-hub-map-flow-box,
  body.house-hub-page .senate-hub-mob-panel--map .house-hub-map-flow-box {
    position: relative !important;
    width: 100% !important;
  }

  /* Empty races shell reserved in HTML — keep scroll area from collapsing. */
  body.house-hub-page #hubMobileRacesSection .hub-mobile-races-scroll-wrap:not(.hub-mobile-races-scroll-wrap--ready),
  body.senate-hub-page #hubMobileRacesSection .hub-mobile-races-scroll-wrap:not(.hub-mobile-races-scroll-wrap--ready),
  body.gov-hub-page #hubMobileRacesSection .hub-mobile-races-scroll-wrap:not(.hub-mobile-races-scroll-wrap--ready) {
    min-height: 22rem;
  }

  /* Ad under map key: reserve slot so fill/unfill doesn't shove Search up. */
  body.house-hub-page #hubAdAfterMapKeyMobile {
    min-height: 90px;
    box-sizing: border-box;
  }

  /*
   * Beat et-mobile-poll-box-sync channel padding that double-pads under panels
   * and squashes House chart stages.
   */
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-right-content .hub-simulation-charts-section,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-right-content > #houseHubSimulationChartsSection,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-head-area,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--map .sleek-map-pane > div[class*="pl-4"],
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--search.senate-search-polls-section,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-right-content .senate-search-polls-section.senate-hub-mob-panel--search {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-head-area,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-right-content .hub-simulation-charts-section,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-right-content > #houseHubSimulationChartsSection {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /*
   * Gray blurbs under white panel titles — match Senate hub (text-sm → 0.8125).
   * Beat house map-ui / Tailwind without relying on panel-wrap child combinators.
   */
  body.house-hub-page .senate-hub-mob-panel--chart .border-b > p,
  body.house-hub-page .senate-hub-mob-panel--chart .border-b > p.text-sm,
  body.house-hub-page .senate-hub-mob-panel--chart .border-b > p.text-slate-400,
  body.house-hub-page .hub-simulation-charts-section .senate-hub-mob-panel--chart .text-sm.text-slate-400,
  body.house-hub-page .senate-hub-mob-panel--search .search-poll-head-wrap .border-b p,
  body.house-hub-page .senate-hub-mob-panel--search .search-poll-head-wrap .text-sm.text-slate-400 {
    font-size: 0.8125rem !important;
    line-height: 1.45 !important;
  }

  /*
   * In-panel title rules: poll-box-sync sets border transparent + full-bleed ::after.
   * Use a solid border on the title block (panel content width) and kill the ::after.
   * Prior house override hid ::after but lost to transparent border — lines vanished.
   */
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .hub-simulation-charts-section .senate-hub-mob-panel--chart > .border-b,
  html.et-mobile-active body.house-hub-page .hub-simulation-charts-section .senate-hub-mob-panel--chart > .border-b,
  body.house-hub-page .senate-hub-mob-panel--chart > .border-b,
  body.house-hub-page .senate-hub-mob-panel--search .search-poll-head-wrap > .border-b {
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    border-bottom-color: rgba(30, 41, 59, 0.8) !important;
  }

  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .hub-simulation-charts-section .senate-hub-mob-panel--chart > .border-b::after,
  body.house-hub-page .senate-hub-mob-panel--chart > .border-b::after,
  body.house-hub-page .senate-hub-mob-panel--search .search-poll-head-wrap > .border-b::after {
    display: none !important;
    content: none !important;
  }

  /* Map / All Races: pin head-area rule to panel content (not channel bleed vars). */
  body.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-head-area::after,
  body.house-hub-page .senate-hub-mob-panel--races .forecast-hub-map-head-area::after,
  body.house-hub-page .senate-hub-mob-panel--races .hub-mobile-races-head-area::after {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    transform: none !important;
  }

  /* Legend/key left-align from poll-box-sync fights panel centering. */
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-legend-shell .forecast-hub-map-toolbar,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-legend-shell .forecast-hub-map-key,
  html.et-mobile-active body.et-mobile-poll-box-sync.house-hub-page .senate-hub-mob-panel--map .forecast-hub-map-legend-shell .forecast-hub-map-controls {
    margin-left: auto !important;
    align-self: center !important;
  }
}

/* Desktop: static mobile races shell must not show; charts placeholder stays empty until filled. */
@media (min-width: 768px) {
  body.house-hub-page #hubMobileRacesSection,
  body.house-hub-page .hub-mobile-races-section,
  body.senate-hub-page #hubMobileRacesSection,
  body.senate-hub-page .hub-mobile-races-section,
  body.gov-hub-page #hubMobileRacesSection,
  body.gov-hub-page .hub-mobile-races-section {
    display: none !important;
  }

  body.house-hub-page #houseHubSimulationChartsSection[data-house-charts-placeholder="1"]:not(:has(canvas)):not(:has(.senate-hub-mob-panel--chart)) {
    display: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
