/* Ultra-thin scrollbars that only show while the pointer is over the scrollable area.
   Loaded on every page.

   IMPORTANT: Chrome/Edge ignore ::-webkit-scrollbar sizing as soon as the standard
   `scrollbar-width` / `scrollbar-color` properties are set, and `scrollbar-width: thin`
   is still ~10px wide on Windows. So the standard properties are used ONLY for Firefox
   (which has no pseudo-elements); Chrome, Edge, Safari and Opera use the pseudo-elements
   below, which can go much thinner (6px gutter, 4px visible thumb). */

/* Chrome, Edge, Safari, Opera, Samsung Internet */
::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb {
  background-color: transparent;
  border: 1px solid transparent;      /* 6px gutter - 2px border = 4px visible thumb */
  background-clip: padding-box;
  border-radius: 99px;
  transition: background-color .25s ease;
}
*:hover::-webkit-scrollbar-thumb { background-color: rgba(100, 110, 140, .45); }
::-webkit-scrollbar-thumb:hover  { background-color: rgba(100, 110, 140, .75); }

/* Firefox (its thinnest allowed size is the "thin" keyword) */
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: transparent transparent; }
  *:hover { scrollbar-color: rgba(100, 110, 140, .5) transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
