/* =====================================================================
   SCROLLBARS — dark, thin, and quiet.
   Two layers:
     1. color-scheme: dark so native controls (scrollbars, selects,
        date pickers, resize handles) stop rendering as bright Chrome.
     2. custom webkit scrollbars so the thumb is a faint line of signal,
        not a white slab.
   ===================================================================== */

:root {
  color-scheme: dark;
}

/* Firefox + newer Chromium */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 154, 167, 0.26) transparent;
}

/* Chromium / WebKit */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background: transparent;
}
::-webkit-scrollbar-track {
  background: transparent;
  border: 0;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(139, 154, 167, 0.22);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  min-height: 28px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(76, 201, 240, 0.42);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:active {
  background-color: rgba(76, 201, 240, 0.6);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* The three monitor panes get an even quieter thumb until hovered. */
.monitor .rail::-webkit-scrollbar-thumb,
.monitor .feed::-webkit-scrollbar-thumb,
.editor-main::-webkit-scrollbar-thumb,
.editor-side::-webkit-scrollbar-thumb {
  background-color: rgba(139, 154, 167, 0.16);
  background-clip: padding-box;
}
.monitor .rail:hover::-webkit-scrollbar-thumb,
.monitor .feed:hover::-webkit-scrollbar-thumb,
.editor-main:hover::-webkit-scrollbar-thumb,
.editor-side:hover::-webkit-scrollbar-thumb {
  background-color: rgba(139, 154, 167, 0.3);
  background-clip: padding-box;
}
.monitor .rail,
.monitor .feed,
.editor-main,
.editor-side,
.archive-view,
.sources-view,
.settings-view,
.briefs-view {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 154, 167, 0.2) transparent;
}

/* Keep panes from shifting when the thumb appears. */
.monitor .feed,
.archive-view,
.sources-view,
.settings-view,
.briefs-view {
  scrollbar-gutter: stable;
}

/* The paper editor scrolls inside a dark pane; a warm thumb reads better there. */
.editor-main::-webkit-scrollbar-thumb {
  background-color: rgba(244, 239, 227, 0.14);
  background-clip: padding-box;
}
.editor-main::-webkit-scrollbar-thumb:hover {
  background-color: rgba(224, 164, 88, 0.4);
  background-clip: padding-box;
}

@media print {
  ::-webkit-scrollbar { display: none; }
}
