/* Style the native page scrollbar, preserving OS behavior and keyboard scrolling. */
html {
  --scrollbar-thumb: #0068ff;
  --scrollbar-start: #8cc4ff;
  --scrollbar-hover: #0060ed;
  --scrollbar-track: #eaf1fb;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}
html[data-theme="dark"] { --scrollbar-track: #10253d; }
html.edilup-scrollbar-eco {
  --scrollbar-thumb: #24b96a;
  --scrollbar-start: #8de7ac;
  --scrollbar-hover: #168a4d;
  --scrollbar-track: #edf8f0;
}
html[data-theme="dark"].edilup-scrollbar-eco { --scrollbar-track: #102d24; }
::selection { background: #3e60ff; color: #fff; text-shadow: none; }
@supports selector(::-webkit-scrollbar) {
  html, html[data-theme="dark"] { scrollbar-color: auto; scrollbar-width: auto; }
  html::-webkit-scrollbar { width: 6px; height: 6px; }
  html::-webkit-scrollbar-track { background: var(--scrollbar-track); }
  html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--scrollbar-start), var(--scrollbar-thumb));
    border-radius: 8px;
    min-height: 36px;
  }
  html::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
  html::-webkit-scrollbar-corner { background: transparent; }
}
/* Keep the native gutter stable so hiding the thumb never shifts the page. */
@media (forced-colors: none) {
  @supports not selector(::-webkit-scrollbar) {
    html.edilup-scrollbar-auto:not(.edilup-is-scrolling) { scrollbar-color: transparent transparent; }
  }
  html.edilup-scrollbar-auto:not(.edilup-is-scrolling)::-webkit-scrollbar-track,
  html.edilup-scrollbar-auto:not(.edilup-is-scrolling)::-webkit-scrollbar-thumb,
  html.edilup-scrollbar-auto:not(.edilup-is-scrolling)::-webkit-scrollbar-thumb:hover { background: transparent; }
}
@media (forced-colors: active) {
  html, html[data-theme="dark"] { scrollbar-color: auto; scrollbar-width: auto; }
  html::-webkit-scrollbar-thumb { background: ButtonText; }
  html::-webkit-scrollbar-track { background: Canvas; }
  ::selection { background: Highlight; color: HighlightText; }
}
/* Reduced motion also applies to the shared page entrance animations. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
