/*
 * The page reaches the right edge of the window, and the scrollbar appears only when it is real.
 *
 * Tabler 1.5 sets `scrollbar-gutter: stable` on the root. Its intent is to stop content shifting
 * sideways as a scrollbar comes and goes between pages, and it does that by reserving the
 * scrollbar's width on every page whether or not one scrolls.
 *
 * WHICH IS A NO-OP OR A DEFECT DEPENDING ENTIRELY ON THE BROWSER, AND THAT IS WHY IT LOOKED WRONG.
 *
 * scrollbar-gutter reserves space only for a classic, space-consuming scrollbar. Where the platform
 * draws overlay scrollbars - Firefox on this desktop, Safari, most touch platforms - there is no
 * width to reserve, `stable` does nothing, and the page fills the window. Chrome on the same
 * desktop draws classic scrollbars, so the same declaration takes fifteen pixels off every page.
 * Measured at a 1081px viewport on a page that does not scroll: content ending at 1066 with no
 * scrollbar anywhere to explain the gap.
 *
 * So the same stylesheet gives one browser a correct page and the other a permanently short one,
 * and it reads as broken rather than as margin.
 *
 * `auto` is the initial value, which is what makes this one declaration rather than a Chrome hack:
 * it changes nothing on a browser with overlay scrollbars, because there was nothing to reserve
 * there in the first place. Only the classic-scrollbar browsers move, and they move to the
 * behaviour the overlay ones already had.
 *
 * WHAT THIS COSTS, STATED SO IT IS A CHOICE: navigating from a page that does not scroll to one
 * that does shifts the content fifteen pixels on a classic-scrollbar browser. That is the reflow
 * Tabler was avoiding, it is how the web has behaved since before overlay scrollbars existed, and
 * it does not arise at all on the platforms that overlay.
 *
 * An overlay scrollbar in Chrome was considered and is not available. `overflow: overlay` was
 * non-standard and has been removed - it now aliases to `auto` - and hiding the bar with
 * `::-webkit-scrollbar { width: 0 }` takes the scroll position and the "there is more below" cue
 * with it, which trades a cosmetic problem for a usability one.
 *
 * BOTH OF TABLER'S RULES HAVE TO BE UNDONE, and the second is the one that is easy to miss. It
 * ships the declaration twice:
 *
 *     html { scrollbar-gutter: stable; }
 *     @supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
 *
 * On a browser too old for the property - Safari before 18.2, which is the only one still plausible
 * - the first rule is discarded and the second forces a permanent scrollbar instead. That is the
 * same reserved strip by a cruder route, and overriding only the first leaves it in place: our
 * `scrollbar-gutter: auto` is itself unsupported there, so it parses to nothing and changes
 * nothing. The @supports block below is the half that reaches those browsers.
 *
 * Note both of ours use `:root` against Tabler's `html`. They select the same element, but `:root`
 * is (0,1,0) against a type selector's (0,0,1), so these win on specificity and would win even
 * rendered first. Order is asserted anyway by TablerTest, because specificity is not something to
 * leave resting on an unstated coincidence of spelling.
 */
:root {
	scrollbar-gutter: auto;
}

@supports not (scrollbar-gutter: stable) {
	:root {
		overflow-y: auto;
	}
}
