/* Decoration only, shared by React and standalone pages. Never change slot
   geometry, eligibility, targets, provider children, or loading/refresh. */
:root {
  --fs-ad-placeholder-surface:#f4f6f8;
  --fs-ad-placeholder-edge:#e6eaee;
  --fs-ad-placeholder-label:#818b96;
}
html:not([data-fs-theme="light"]):is([data-fs-theme="dark"],[data-fs-page-theme="dark"],[data-index-tone="dark"]),
html:not([data-fs-theme]):has([data-player-profile][data-player-mode="dark"]) {
  --fs-ad-placeholder-surface:#142330;
  --fs-ad-placeholder-edge:#243340;
  --fs-ad-placeholder-label:#7b8d9d;
}

/* Only existing content reservations. Exclude both skyscraper widths, tall
   sidebar formats, video, and every pinned rail/sidebar container. Explicit
   sticky/fixed utilities and inline positions are excluded on the slot AND
   its ancestors. No rule below reveals, moves, clips, or resizes an ad. */
html:root body :is(.fs-shared-ad-creative,.fs-content-ad-creative,.fs-raptive-slot[data-fs-ad-layout="true"]):not(:where(
  [data-fs-ad-format*="skyscraper"],[data-ad-size*="skyscraper"],
  [data-fs-ad-format="half-page"],[data-fs-ad-format="video"],[data-fs-ad-format="outstream"],
  .fs-editorial-ad-track *,.fs-sim-ad-rail *,.fs-sim-ad-sidebar *,
  .cb-guide-sticky *,.nfl-matchup-column *,.finish-preview-column *,
  [data-setup-ad-sidebar] *,[data-otc-results-ad-rail] *,
  .sticky,.fixed,
  [class*=":sticky"],[class*=":fixed"],
  [style*="position:sticky"],[style*="position: sticky"],
  [style*="position:fixed"],[style*="position: fixed"],
  :is(.sticky,.fixed,[class*=":sticky"],[class*=":fixed"],
    [style*="position:sticky"],[style*="position: sticky"],
    [style*="position:fixed"],[style*="position: fixed"]) *
)) {
  background:transparent!important;
  outline:none!important;

  /* Hide Fanspeak captions only, never descendants of the ad target. */
  & > :is(.fs-shared-ad-label,.fs-shared-ad-dimensions,.fs-raptive-label),
  &.fs-shared-ad-creative > small,
  &.fs-content-ad-creative > span:nth-child(-n+3) {
    display:none!important;
  }
  &::after { content:none!important; }

  /* Empty provider wrappers are not creatives. Decoration gives way when
     media or a native-ad link arrives, including during subsequent refreshes. */
  &:not(:has(.fs-ad-target :is(iframe,img,video,canvas,object,embed,a))) {
    background:var(--fs-ad-placeholder-surface)!important;
    outline:1px solid var(--fs-ad-placeholder-edge)!important;
    outline-offset:-1px;
    border-radius:6px;
    &::after {
      content:"AD"!important;
      position:absolute;
      inset:0;
      display:grid;
      place-items:center;
      color:var(--fs-ad-placeholder-label);
      font:500 9px/1 system-ui,sans-serif;
      letter-spacing:.18em;
      pointer-events:none;
    }
  }
}
