/* Match YIVO's green and pale surfaces without changing native scrollbar widths. */
:root {
    --yivo-scrollbar-thumb: #4c7f37;
    --yivo-scrollbar-track: #f1f6eb;
    scrollbar-color: var(--yivo-scrollbar-thumb) var(--yivo-scrollbar-track);
}

/* Older WebKit engines keep their native dimensions and scrolling behaviour. */
@supports not (scrollbar-color: #4c7f37 #f1f6eb) {
    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-corner {
        background-color: #f1f6eb;
    }
    ::-webkit-scrollbar-thumb {
        background-color: #4c7f37;
        background-clip: padding-box;
        border: 2px solid #f1f6eb;
        border-radius: 999px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background-color: #2f7c25;
    }
}

/* Let the operating system provide high-contrast colours when requested. */
@media (forced-colors: active) {
    :root {
        scrollbar-color: auto;
    }
    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-corner,
    ::-webkit-scrollbar-thumb {
        background-color: revert;
        border-color: revert;
    }
}
