/* Hide page and redundant navigation tracks without changing scroll behavior. */
:root {
  --scrollbar-thumb: #7898aa;
  --scrollbar-hover: #356e91;
}
* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

/* These independently scrolling regions retain a narrow position indicator. */
:is(dialog, .reading-toc, .publication-layout aside nav, .table-scroll,
    .prose table, .publication-body table, .detail-sidebar,
    .lawyer-profile-sidebar, .lt-detail aside) {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
#menu-dialog {
  --scrollbar-thumb: #a8c7d8;
  --scrollbar-hover: #dceaf1;
}

/* WebKit sizing gives Chromium and Safari an exact six-pixel track. */
@supports selector(::-webkit-scrollbar) {
  :is(dialog, .reading-toc, .publication-layout aside nav, .table-scroll,
      .prose table, .publication-body table, .detail-sidebar,
      .lawyer-profile-sidebar, .lt-detail aside) {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
  :is(dialog, .reading-toc, .publication-layout aside nav, .table-scroll,
      .prose table, .publication-body table, .detail-sidebar,
      .lawyer-profile-sidebar, .lt-detail aside)::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  *::-webkit-scrollbar-track,
  *::-webkit-scrollbar-corner { background: transparent; }
  *::-webkit-scrollbar-thumb {
    min-height: 28px;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
  }
  *::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
  *::-webkit-scrollbar-button { display: none; }
}
@media (forced-colors: active) {
  :root, #menu-dialog {
    --scrollbar-thumb: ButtonText;
    --scrollbar-hover: Highlight;
  }
}
