/*
 * back-to-top.css: a round button bottom-right that appears once the reader
 * has scrolled a screen down. Docs pages with the right-rail index show the
 * index's own "Back to top" link instead on wide screens.
 */
.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.12);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}
.back-to-top.is-visible { visibility: visible; opacity: 1; transform: none; }
@media (min-width: 1440px) {
    body:has(.toc-back) .back-to-top { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: none; }
}
