/*
 * 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;
    /* Title → rule (padding under title/subtitle). */
    --senate-hub-title-rule-gap-below: 0.65rem;
    /*
     * Rule → first content baseline (was 0.65rem head mb + 0.35rem chart mt).
     * Per-panel deltas applied via the tokens below.
     */
    --senate-hub-title-rule-to-content: 1rem;
    --senate-hub-map-rule-to-content: calc(1rem + 6px);
    /* Hub mobile rule→content: dist +21, seats/odds +30, races +8, search header +10. */
    --senate-hub-sim-dist-rule-to-content: calc(1rem + 21px);
    --senate-hub-seats-odds-rule-to-content: calc(1rem + 30px);
    --senate-hub-races-rule-to-content: calc(1rem + 8px);
    --senate-hub-search-header-rule-to-content: calc(1rem + 10px);
    --senate-hub-search-flag-rule-to-content: calc(1rem - 3px);
    /* Inherited by mid-ads (siblings of chart host) — must live on body, not only charts. */
    --senate-hub-panel-channel-w: var(
      --et-mobile-standard-width,
      var(
        --et-mobile-poll-box-width,
        var(
          --et-mob-channel-w,
          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)))
          )
        )
      )
    );
  }

  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;
  }

  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .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 .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:not(.hub-mobile-races-head-area),
  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) .sleek-maps.senate-hub-mob-panel--map .forecast-hub-map-head-area:not(.hub-mobile-races-head-area) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    /* Title → rule; rule → seat bar (+6px vs baseline). */
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
    margin-bottom: var(--senate-hub-map-rule-to-content) !important;
  }

  /*
   * Seat bar Tailwind mt-7 / forecast-hub mb 0.35rem must not stack.
   * Head margin owns the full rule→content gap.
   */
  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 .forecast-hub-seat-bar-wrap,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .pollsmax-hub-seat-bar,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map #senateHubSeatBar,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map #govHubSeatBar,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map #houseHubSeatBar,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-hub-mob-panel--map .forecast-hub-seat-block {
    margin-top: 0 !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 {
    /* Prefer panel OUTER standard width (same as All Races), not poll-box in-panel. */
    --senate-hub-panel-channel-w: var(
      --et-mobile-standard-width,
      var(
        --et-mobile-poll-box-width,
        var(
          --et-mob-channel-w,
          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)))
          )
        )
      )
    );
    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, #hubAdAfterMapKeyMobile),
  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, #hubAdAfterMapKeyMobile),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile) {
    /*
     * Panel OUTER width — same formula as All Races / Search panels.
     * Do NOT use --et-mob-channel-w (poll-box sync = in-panel / narrower).
     */
    --senate-hub-mid-ad-w: var(--et-mobile-standard-width, calc(100vw - 2rem));
    width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    max-width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    min-width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !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: 0;
    overflow: visible !important;
    background: transparent !important;
  }

  /*
   * 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,
    #hubAdAfterMapKeyMobile,
    #senateHubAdBeforeRacesMobile,
    #govHubAdBeforeRacesMobile,
    #houseHubAdBeforeRacesMobile
  ):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])) {
    /* Equal full panel↔panel gap via padding (collapse-proof). */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: var(--pm-mobile-ad-gap, 24px) !important;
    padding-bottom: var(--pm-mobile-ad-gap, 24px) !important;
    overflow: visible !important;
    background: transparent !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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #senateHubSimulationChartsSection,
  body:is(.senate-hub-page, .gov-hub-page) :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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: mid sits after map panel (same as senate/gov), never inside it. */
  body.house-hub-page .sleek-maps.senate-hub-mob-panel--map:has(+ :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) {
    margin-bottom: 0 !important;
  }
  body.house-hub-page :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section,
  body.house-hub-page :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #houseHubSimulationChartsSection {
    margin-top: 0 !important;
  }
  body.house-hub-page :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])) + .hub-simulation-charts-section > .senate-hub-mob-panel--chart:first-child,
  body.house-hub-page :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])) + #houseHubSimulationChartsSection > .senate-hub-mob-panel--chart:first-child,
  body.house-hub-page :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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 :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])))) {
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
  }
  /* Waiting after-map mids keep a real 250px white slot (do not collapse). */
  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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) {
    margin-bottom: 0 !important;
  }

  /*
   * Races panel sits OUTSIDE the charts host; the mid-ad is often nested inside
   * .senate-right-content-nudge-up — use :has(ad) (not :has(> ad)) so margin-top
   * is zeroed and the ad padding alone owns the equal gap.
   */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) + #hubMobileRacesSection,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content:has(:is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) > .hub-mobile-races-section,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content:has(:is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) > #hubMobileRacesSection {
    margin-top: 0 !important;
  }

  /*
   * Collapse hub mids only after unfilled. Waiting/loading keep a 250px floor
   * so AdSense can push (see pm-ads-20260714bl.css).
   */
  #senateHubAdAfterMapMobile[data-ad-state="unfilled"],
  #senateHubAdBeforeRacesMobile[data-ad-state="unfilled"],
  #govHubAdAfterMapMobile[data-ad-state="unfilled"],
  #govHubAdBeforeRacesMobile[data-ad-state="unfilled"],
  #houseHubAdAfterMapMobile[data-ad-state="unfilled"],
  #houseHubAdBeforeRacesMobile[data-ad-state="unfilled"],
  #senateHubAdAfterMapMobile[data-pollsmax-ad-empty="1"],
  #senateHubAdBeforeRacesMobile[data-pollsmax-ad-empty="1"],
  #govHubAdAfterMapMobile[data-pollsmax-ad-empty="1"],
  #govHubAdBeforeRacesMobile[data-pollsmax-ad-empty="1"],
  #houseHubAdAfterMapMobile[data-pollsmax-ad-empty="1"],
  #houseHubAdBeforeRacesMobile[data-pollsmax-ad-empty="1"] {
    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;
  }

  /* Senate/Gov: never show the old under-map-key unit (House uses it between panels). */
  body:is(.senate-hub-page, .gov-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).
   * Do NOT hide the intended hub mids — they can sit before the map in the DOM
   * while flex order:2 paints them under it. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .pollsmax-ad-shell:not(#senateHubAdAfterMapMobile):not(#govHubAdAfterMapMobile):not(#houseHubAdAfterMapMobile):not(#senateHubAdBeforeRacesMobile):not(#govHubAdBeforeRacesMobile):not(#houseHubAdBeforeRacesMobile):has(+ .sleek-maps),
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content > .pollsmax-ad-single:not(#senateHubAdAfterMapMobile):not(#govHubAdAfterMapMobile):not(#houseHubAdAfterMapMobile):not(#senateHubAdBeforeRacesMobile):not(#govHubAdBeforeRacesMobile):not(#houseHubAdBeforeRacesMobile):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;
    /* Full rule→chart gap in one place (was 0.65 mb + 0.35 mt). */
    margin-bottom: var(--senate-hub-title-rule-to-content) !important;
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
  }

  /* Simulated Distribution / Seat Distribution: +21px under title rule. */
  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(+ .hub-sim-hist-stage) {
    margin-bottom: var(--senate-hub-sim-dist-rule-to-content) !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 {
    /* Gap owned by title head margin; no stacked stage mt. */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    top: 0 !important;
    transform: none !important;
  }

  /*
   * Beat pollsmax-lazy-charts ID/:has rules that still stacked
   * margin-top: calc(0.25rem + 30px) under Projected Seats / Odds — that made
   * “match Projected Seats 0.65rem” impossible for map / All Races / Search.
   */
  html.et-mobile-active body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#senateHubExpectedSeatsChart),
  html.et-mobile-active body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#senateHubControlOddsChart),
  html.et-mobile-active body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#govHubExpectedSeatsChart),
  html.et-mobile-active body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#govHubControlOddsChart),
  html.et-mobile-active body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#houseHubExpectedSeatsChart),
  html.et-mobile-active body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#houseHubControlOddsChart),
  body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#senateHubExpectedSeatsChart),
  body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#senateHubControlOddsChart),
  body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#govHubExpectedSeatsChart),
  body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#govHubControlOddsChart),
  body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#houseHubExpectedSeatsChart),
  body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .sleek-chart-stage:has(#houseHubControlOddsChart) {
    margin-top: 0 !important;
    top: 0 !important;
    transform: none !important;
  }

  /* Projected Seats/Governorships + Odds (senate/house): +30px under title rule. */
  html.et-mobile-active body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#senateHubExpectedSeatsChart)),
  html.et-mobile-active body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#senateHubControlOddsChart)),
  html.et-mobile-active body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#govHubExpectedSeatsChart)),
  html.et-mobile-active body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#houseHubExpectedSeatsChart)),
  html.et-mobile-active body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#houseHubControlOddsChart)),
  body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#senateHubExpectedSeatsChart)),
  body.senate-hub-page #senateHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#senateHubControlOddsChart)),
  body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#govHubExpectedSeatsChart)),
  body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#houseHubExpectedSeatsChart)),
  body.house-hub-page #houseHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#houseHubControlOddsChart)) {
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
    margin-bottom: var(--senate-hub-seats-odds-rule-to-content) !important;
  }

  /* Gov Odds: was baseline; +15px larger (same bump as other Odds panels). */
  html.et-mobile-active body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#govHubControlOddsChart)),
  body.gov-hub-page #govHubSimulationChartsSection .senate-hub-mob-panel--chart > .border-b:has(+ .sleek-chart-stage:has(#govHubControlOddsChart)) {
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
    margin-bottom: calc(1rem + 15px) !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 {
    /*
     * Hist canvas offset only (was 0.35rem + 63px). The 0.35rem content
     * nudge now lives in the title head’s 1rem margin-bottom.
     */
    margin-top: 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;
    /* Mobile: restore theme panel/chart fill; desktop keeps #0a0b0f */
    background-color: #0c0f14 !important;
    background: #0c0f14 !important;
  }

  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 {
    background-color: #0c0f14 !important;
    background: #0c0f14 !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;
  }
  /*
   * All Races: beat forecast-hub-map-ui padding-bottom: calc(0.5rem + 8px).
   * ::after rule sits on the head-area bottom — pb = title→rule, mb = rule→filters/sort.
   */
  html.et-mobile-active 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.forecast-hub-map-head-area,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-head-area.forecast-hub-map-head-area,
  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.forecast-hub-map-head-area,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-head-area.forecast-hub-map-head-area,
  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 {
    /* Same title/toggle → rule gap as map panel (0.65rem). */
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
    margin-bottom: var(--senate-hub-races-rule-to-content) !important;
  }

  /*
   * All Races Forecast/Polling: poll-box-sync uses align-self:flex-end + 2px mt on
   * .forecast-hub-map-head-slot, which drops the toggle closer to the rule than Map.
   * Match map panel slot centering so button→rule spacing matches.
   */
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
    .hub-mobile-races-section
    .hub-mobile-races-head-slot.forecast-hub-map-head-slot,
  html.et-mobile-active body:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
    #hubMobileRacesSection
    .hub-mobile-races-head-slot.forecast-hub-map-head-slot,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
    .hub-mobile-races-section
    .hub-mobile-races-head-slot,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
    #hubMobileRacesSection
    .hub-mobile-races-head-slot {
    align-self: center !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) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-body,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  /* No extra nudge above SEARCH/STATE or sort headers under the title rule. */
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-body > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-body > :first-child,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .house-hub-races-filter-row,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .house-hub-races-filter-row,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .hub-mobile-races-sort-row,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .hub-mobile-races-sort-row,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .hub-mobile-races-section.senate-hub-mob-panel--races .senate-races-sort-row,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) #hubMobileRacesSection.senate-hub-mob-panel--races .senate-races-sort-row {
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0 !important;
  }
  /* House mobile: SEARCH/STATE span panel width; gap under search/filter row. */
  body.house-hub-page .hub-mobile-races-section.senate-hub-mob-panel--races .house-hub-races-filter-row,
  body.house-hub-page #hubMobileRacesSection.senate-hub-mob-panel--races .house-hub-races-filter-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 1.05rem !important;
    margin-bottom: calc(1.75rem + 2px) !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 {
    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;
  }

  /*
   * Search Polls: horizontal rule under panel title ("Search … Polls"),
   * and under the flag + state/district name row. Content-width (not full-bleed).
   */
  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:has(> 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
    > .max-w-4xl {
    border-bottom: 1px solid rgba(30, 41, 59, 0.8) !important;
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
    /* Higher Search rule (under panel header): +10px. */
    margin-bottom: var(--senate-hub-search-header-rule-to-content) !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* Title rule owns the 0.65rem gap — kill filter row mt-1 / inline top:3px. */
  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
    + div,
  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:has(> h2)
    + div {
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0 !important;
    position: relative !important;
  }

  html[data-pollsmax-theme="light"] 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:has(> h2),
  html[data-theme="light"] 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:has(> h2) {
    border-bottom-color: var(--senate-hub-panel-border, #b0bbc9) !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,
  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 {
    position: relative !important;
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    border-bottom-color: rgba(30, 41, 59, 0.8) !important;
    /* Lower Search rule (under flag): 3px tighter. */
    margin-bottom: var(--senate-hub-search-flag-rule-to-content) !important;
    padding-bottom: var(--senate-hub-title-rule-gap-below) !important;
  }

  html[data-pollsmax-theme="light"] 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,
  html[data-theme="light"] 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 {
    border-bottom-color: var(--senate-hub-panel-border, #b0bbc9) !important;
  }

  /* Page CSS paints the flag/state rule with ::after on PC only; hide on mobile. */
  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::after {
    display: none !important;
    content: none !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;
    /* Flag-rule → chart (3px tighter than prior 0.35rem + 40px). */
    margin-top: calc(0.35rem + 37px) !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) #raceForecastMethodology.senate-hub-mob-panel--chart,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.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;
  }

  /* Simulated Distribution: +12px under title rule. */
  body.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-sim-block.senate-hub-mob-panel--chart > .border-b,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-sim-block.senate-hub-mob-panel--chart > .border-b {
    margin-bottom: calc(0.65rem + 12px) !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;
    /* Mobile: restore theme panel/chart fill; desktop keeps #0a0b0f */
    background-color: #0c0f14 !important;
    background: #0c0f14 !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 {
    /* Odds baseline under title rule (+1px vs prior +14). */
    margin-bottom: calc(0.65rem + 15px) !important;
    padding-bottom: 0.65rem !important;
  }

  /* Projected Vote Share: +1px vs prior (+37 → +38). */
  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 + 38px) !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.sleek-home.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .senate-hub-mob-panel--chart .race-forecast-methodology-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) .senate-hub-mob-panel--chart .race-forecast-methodology-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) #raceForecastMethodology .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;
  }

  /* After chart+table nest into Polling Data, hide the empty leftover bottom shell. */
  body.race-view-forecast.race-forecast-mob-panels.race-forecast-mob-panels-poll-nested:not(.race-forecast-premium) #racePollingBottom {
    display: none !important;
  }

  /* Nested forecast poll table: hidden on mobile (chart-only Polling Data). */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData #pollsTableShell,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData .state-polls-shell,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData > section:has(#pollsTableShell),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPollingData [data-forecast-panel-poll-table="1"] {
    display: none !important;
  }

  /* Methodology + Related Races panels — full outline (all sides), including top+bottom */
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastMethodology.senate-hub-mob-panel,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastMethodology.senate-hub-mob-panel--chart,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.senate-hub-mob-panel,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.senate-hub-mob-panel--chart,
  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;
    /*
     * Next panel owns the full 30px gap (same as Vote/Odds). Prior mb:0 so
     * main-sibling margins don’t collapse to gap-above (~20px).
     */
    margin-top: var(--senate-hub-panel-gap) !important;
    /* Top 30px; bottom 28px (pad-y − 2). */
    padding-bottom: calc(var(--senate-hub-panel-pad-y) - 2px) !important;
  }

  /* Methodology: no bottom margin so Related’s full panel-gap isn’t collapsed away. */
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastMethodology.senate-hub-mob-panel,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastMethodology.senate-hub-mob-panel--chart,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.senate-hub-mob-panel,
  html body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.senate-hub-mob-panel--chart {
    margin-bottom: 0 !important;
  }

  /*
   * Panel above Methodology (Polling, or Odds when polling is hidden) uses mb:0.
   * Methodology owns the 30px no-ad gap — same as Vote/Odds/Polling.
   * With a visible AfterOdds ad and no polling panel, ad pad (24+24) owns the gap.
   */
  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-bottom: 0 !important;
  }
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-trends-grid {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPageMount {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])):not(:has(#raceForecastPollingData.senate-hub-mob-panel--chart)):not(:has(.race-forecast-polling-data.senate-hub-mob-panel--chart))
    + #raceForecastMethodology,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])):not(:has(#raceForecastPollingData.senate-hub-mob-panel--chart)):not(:has(.race-forecast-polling-data.senate-hub-mob-panel--chart))
    + .race-forecast-methodology,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])
    + #raceForecastMethodology,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])
    + .race-forecast-methodology {
    margin-top: 0 !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastMethodology.senate-hub-mob-panel--chart > div,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.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) #raceForecastMethodology.senate-hub-mob-panel--chart .race-forecast-methodology-head,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology.senate-hub-mob-panel--chart .race-forecast-methodology-head {
    margin-top: 0 !important;
    padding-top: 0 !important;
    /* Methodology: +10px under title rule. */
    margin-bottom: calc(0.65rem + 10px) !important;
    padding-bottom: 0.65rem !important;
  }

  /* Panel chrome already separates Methodology from Related Races. */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastMethodology .race-forecast-methodology-bottom-rule,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) .race-forecast-methodology .race-forecast-methodology-bottom-rule {
    display: none !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:not(.pollsmax-site-multiplex),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastPageMount .pollsmax-ad-single:not(.pollsmax-site-multiplex),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  ) {
    /* Panel OUTER width (same as forecast panels), not in-panel content width. */
    width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    max-width: 100% !important;
    min-width: 0 !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: 0;
    overflow: visible !important;
    background: transparent !important;
  }

  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  ):is([data-ad-state="unfilled"], [data-pollsmax-ad-empty="1"]) {
    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"]),
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) :is(
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile,
    #raceForecastAdUnderPollsMobile
  )[data-pollsmax-ad-mock="1"] {
    /* Equal full panel↔panel gap via padding (collapse-proof). */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: var(--pm-mobile-ad-gap, 24px) !important;
    padding-bottom: var(--pm-mobile-ad-gap, 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    pointer-events: auto !important;
    overflow: visible !important;
    background: transparent !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):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :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,
  /*
   * Mobile hides EH, so Polling Data is the next visible panel after AfterOdds.
   * Adjacent-sibling rules miss it (trends-rule + empty EH sit in between) and
   * its panel margin-top was stacking under the ad (24 + 30).
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-ad-state="filled"] ~ #raceForecastPollingData,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-ad-state="live"] ~ #raceForecastPollingData,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile:has(ins.adsbygoogle[data-ad-status="filled"]) ~ #raceForecastPollingData,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-pollsmax-ad-mock="1"] ~ #raceForecastPollingData,
  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 + #raceForecastPollingData,
  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 + #raceForecastPollingData,
  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 + #raceForecastPollingData,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium) #raceForecastAdAfterOddsMobile[data-pollsmax-ad-mock="1"] + .race-forecast-trends-rule + .race-forecast-eh-results + #raceForecastPollingData {
    margin-top: 0 !important;
  }

  /*
   * AfterOdds lives inside #raceForecastPageMount; Methodology is the next main sibling.
   * When there’s no Polling panel after the ad, ad padding-bottom alone owns the gap —
   * Methodology’s margin-top was stacking (24 + 30). Mirror Polling’s after-ad zero.
   * If Polling exists, leave Methodology’s full panel-gap (Polling → Methodology).
   */
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:is(
      [data-ad-state="filled"],
      [data-ad-state="live"],
      [data-pollsmax-ad-mock="1"],
      :has(ins.adsbygoogle[data-ad-status="filled"])
    )):not(:has(#raceForecastPollingData)) + #raceForecastMethodology,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:is(
      [data-ad-state="filled"],
      [data-ad-state="live"],
      [data-pollsmax-ad-mock="1"],
      :has(ins.adsbygoogle[data-ad-status="filled"])
    )):not(:has(#raceForecastPollingData)) + .race-forecast-methodology,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:is(
      [data-ad-state="filled"],
      [data-ad-state="live"],
      [data-pollsmax-ad-mock="1"],
      :has(ins.adsbygoogle[data-ad-status="filled"])
    )):not(:has(.race-forecast-polling-data.senate-hub-mob-panel--chart)) + #raceForecastMethodology,
  body.race-view-forecast.race-forecast-mob-panels:not(.race-forecast-premium)
    #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:is(
      [data-ad-state="filled"],
      [data-ad-state="live"],
      [data-pollsmax-ad-mock="1"],
      :has(ins.adsbygoogle[data-ad-status="filled"])
    )):not(:has(.race-forecast-polling-data.senate-hub-mob-panel--chart)) + .race-forecast-methodology {
    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: 0 !important;
    max-height: none !important;
    width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
    flex: none !important;
    align-self: center !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)),
  body.senate-hub-page .hub-simulation-charts-section:not(:has(canvas)):not(:has(.senate-hub-mob-panel--chart)),
  body.gov-hub-page .hub-simulation-charts-section:not(:has(canvas)):not(:has(.senate-hub-mob-panel--chart)),
  body.senate-hub-page #senateHubSimulationChartsSection:not(:has(canvas)):not(:has(.senate-hub-mob-panel--chart)),
  body.gov-hub-page #govHubSimulationChartsSection: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) {
    /* Flex matches shared chart-panel channel layout (not block — that fought panels). */
    display: flex !important;
    opacity: 1;
    /* Keep house-hub-mobile-perf / inline CLS floor (1449) — do not collapse. */
    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;
  }

  /* Legacy under-map-key unit — House now uses #houseHubAdAfterMapMobile / BeforeRaces. */
  body.house-hub-page #hubAdAfterMapKeyMobile {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /*
   * Charts CLS floor is first-paint only. Once panels exist, drop it so unused
   * min-height cannot open a fake gap above All House Races / the before-races ad.
   */
  body.house-hub-page #houseHubSimulationChartsSection:has(.senate-hub-mob-panel--chart),
  body.house-hub-page .hub-simulation-charts-section:has(.senate-hub-mob-panel--chart) {
    min-height: 0 !important;
  }

  /* House: keep map→charts gap when after-map mid is missing/unfilled. */
  body.house-hub-page .senate-right-content > .sleek-maps.senate-hub-mob-panel--map:not(:has(+ :is(#houseHubAdAfterMapMobile, #hubAdAfterMapKeyMobile):is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"])))) {
    margin-bottom: var(--senate-hub-panel-gap-below) !important;
  }

  /* House: last chart → before-races ad (sibling of charts host) owns the gap. */
  body.house-hub-page #houseHubSimulationChartsSection:has(+ #houseHubAdBeforeRacesMobile:is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) .senate-hub-mob-panel--chart:last-child,
  body.house-hub-page .hub-simulation-charts-section:has(+ #houseHubAdBeforeRacesMobile:is([data-ad-state="filled"], [data-ad-state="live"], [data-pollsmax-ad-mock="1"], :has(ins.adsbygoogle[data-ad-status="filled"]))) .senate-hub-mob-panel--chart:last-child {
    margin-bottom: 0 !important;
  }

  /*
   * 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;
  }
}

/* Last-wins: hub/forecast mids match homepage width + 24px gaps; multiplex unclipped. */
@media (max-width: 767px) {
  :is(
    #senateHubAdAfterMapMobile,
    #senateHubAdBeforeRacesMobile,
    #govHubAdAfterMapMobile,
    #govHubAdBeforeRacesMobile,
    #houseHubAdAfterMapMobile,
    #houseHubAdBeforeRacesMobile,
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile
  ):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
    box-sizing: border-box !important;
    width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    max-width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    min-width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: var(--pm-mobile-ad-gap, 24px) !important;
    padding-bottom: var(--pm-mobile-ad-gap, 24px) !important;
    background: transparent !important;
  }
  :is(
    #senateHubAdAfterMapMobile,
    #senateHubAdBeforeRacesMobile,
    #govHubAdAfterMapMobile,
    #govHubAdBeforeRacesMobile,
    #houseHubAdAfterMapMobile,
    #houseHubAdBeforeRacesMobile,
    #raceForecastAdTopOfSimMobile,
    #raceForecastAdAfterOddsMobile
  ):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])
    :is(.pollsmax-ad-single__inner, ins.adsbygoogle, .pollsmax-ad-mock-box) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 250px !important;
    height: 250px !important;
    max-height: 250px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
  }

  /* Ad padding alone owns the 24px home-style gap — drop stacked panel margins. */
  .sleek-maps.senate-hub-mob-panel--map:has(+ :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])),
  .senate-hub-mob-panel--chart:has(+ :is(#raceForecastAdTopOfSimMobile, #raceForecastAdAfterOddsMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])),
  .race-forecast-sim-block:has(+ #raceForecastAdTopOfSimMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])),
  .race-forecast-trends-grid:has(+ #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])) {
    margin-bottom: 0 !important;
  }
  :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .hub-simulation-charts-section,
  :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + :is(#senateHubSimulationChartsSection, #govHubSimulationChartsSection, #houseHubSimulationChartsSection),
  :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .hub-simulation-charts-section > .senate-hub-mob-panel--chart:first-child,
  :is(#senateHubAdAfterMapMobile, #govHubAdAfterMapMobile, #houseHubAdAfterMapMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .hub-simulation-charts-section .senate-right-content-nudge-up > .senate-hub-mob-panel--chart:first-child,
  :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .hub-mobile-races-section,
  :is(#senateHubAdBeforeRacesMobile, #govHubAdBeforeRacesMobile, #houseHubAdBeforeRacesMobile):not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + #hubMobileRacesSection,
  #raceForecastAdTopOfSimMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .race-forecast-trends-grid,
  #raceForecastAdTopOfSimMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .senate-hub-mob-panel--chart,
  #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) ~ #raceForecastPollingData,
  #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) ~ .race-forecast-polling-data,
  #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])):not(:has(#raceForecastPollingData.senate-hub-mob-panel--chart)):not(:has(.race-forecast-polling-data.senate-hub-mob-panel--chart)) + #raceForecastMethodology,
  #raceForecastPageMount:has(#raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"])):not(:has(#raceForecastPollingData.senate-hub-mob-panel--chart)):not(:has(.race-forecast-polling-data.senate-hub-mob-panel--chart)) + .race-forecast-methodology,
  #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + #raceForecastMethodology,
  #raceForecastAdAfterOddsMobile:not([data-ad-state="unfilled"]):not([data-pollsmax-ad-empty="1"]) + .race-forecast-methodology {
    margin-top: 0 !important;
  }

  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) #pollsmaxSiteMultiplex,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) #homeAdMultiplex {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
    flex: none !important;
    align-self: center !important;
    width: var(--et-mobile-standard-width, calc(100vw - 2rem)) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    pointer-events: auto !important;
    background: transparent !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex .pollsmax-ad-single__inner,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex ins.adsbygoogle,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex iframe,
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex .pollsmax-ad-mock-box {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
    background: transparent !important;
  }
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex[data-pollsmax-ad-empty="1"],
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) #pollsmaxSiteMultiplex[data-pollsmax-ad-empty="1"] {
    display: none !important;
    min-height: 0 !important;
  }
}

@media (max-width: 767px) {
  body:is(.senate-hub-page, .gov-hub-page, .house-hub-page, .race-view-forecast) aside.pollsmax-site-multiplex iframe {
    min-height: 2200px !important;
    height: 2200px !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
