/*
 * Layout fix for the Writerside frontend 6.31+ (builder 2026.10.0423).
 * The new frontend puts the article and the "On this page" sidebar into one centered block of at most
 * --wh-max-width-content (about 1500px). On wide screens that leaves an empty strip right of the
 * sidebar, and the header actions end at the same point instead of at the window edge.
 *
 * Here the block spans the full width: the sidebar sits at the right edge, the article column keeps
 * its width and is centered in the remaining space. Below 1181px the frontend hides the sidebar anyway.
 *
 * Loaded on every page via <custom-css> in cfg/buildprofiles.xml.
 * The selectors are frontend class names: if a future builder renames them, this file simply stops
 * applying and the default layout comes back.
 */
@media screen and (min-width: 1181px) {
    .app__content-scroller > .layout--container-content {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding-right: 0 !important;
    }

    .app__content-scroller > .layout--container-content > .app__article-column {
        max-width: calc(var(--wh-max-width-content) - 280px);
        margin: 0 auto;
    }

    .wh-header {
        max-width: none !important;
    }
}

/* Wider "On this page" sidebar (frontend default 220px). */
:root {
    --wh-virtual-toc-width: 280px;
}

/* Left navigation: scrollbar only visible on hover. The gutter stays reserved, so nothing shifts. */
.app__nav {
    scrollbar-gutter: stable;
    scrollbar-color: transparent transparent;
}

.app__nav:hover {
    scrollbar-color: rgba(127, 127, 127, 0.5) transparent;
}
