/* V37 - Natural scrolling & lightweight dashboard rendering.
   The old wheel listener used preventDefault + window.scrollBy, which could
   make scroll gestures feel sticky around the four homepage dashboard cards.
   Let the browser naturally transfer wheel/touch scroll to the page. */

/* Do not force smooth behavior on programmatic scrolling near the dashboard. */
html:has(> body.public-site.page-index) {
  scroll-behavior: auto !important;
}

/* All scrollable lists use native momentum and allow page scrolling at edges. */
html body.public-site.page-index :is(
  .home-primary-dashboard-grid .home-live-score-board,
  .home-primary-dashboard-grid .live-now-list,
  .home-latest-result-card .home-result-list,
  .home-upcoming-card .home-upcoming-list
){
  scroll-behavior:auto !important;
  overscroll-behavior-y:auto !important;
  overscroll-behavior-x:auto !important;
  touch-action:pan-y !important;
  -webkit-overflow-scrolling:touch;
}

/* Empty lists should not be fake scroll containers for a few pixels. */
html body.public-site.page-index .home-primary-dashboard-grid :is(.home-live-score-board,.live-now-list):has(> .home-dashboard-empty){
  overflow-y:hidden !important;
}

/* The two recent/next panels scroll only when actual rows overflow. */
html body.public-site.page-index .home-discovery-grid :is(.home-result-list,.home-upcoming-list){
  overscroll-behavior-y:auto !important;
  scroll-behavior:auto !important;
}

/* Avoid an unnecessary compositor blur on large white cards while scrolling;
   this does not alter card color, size, border or the decorative banner. */
html body.public-site.page-index :is(
  .home-discovery-card,
  .premium-dashboard-card,
  .home-latest-result-card,
  .home-upcoming-card,
  .home-link-card,
  .stats-card
){
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Keep the page still for users who request reduced motion. */
@media(prefers-reduced-motion:reduce){
  html body.public-site.page-index *,
  html body.public-site.page-index *::before,
  html body.public-site.page-index *::after{
    scroll-behavior:auto !important;
  }
}
