/* Code blocks keep Alabaster's line height and vertical padding, but use a narrow
   horizontal inset and a smaller font. The theme's 30px sides and 0.9em code size shrink
   the code column to about 69 characters, and its line-highlight rule already assumes a
   12px inset. At 0.8em the desktop column fits 77 characters. */
pre {
    font-size: 0.8em;
    padding: 7px 12px;
}

.version-warning {
    background: #fcc;
    border: 1px solid #faa;
    padding: 0.6em 0.8em;
    margin-bottom: 1.2em;
}

/* The chooser appears once a release tag gives it a second entry. The list inside
   <noscript> carries the same links for a reader without JavaScript. */
.version-switcher label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.version-switcher select {
    width: 100%;
    padding: 2px;
    font-size: 0.9em;
}

.version-switcher .version-list {
    margin: 0;
    padding-left: 1.2em;
}

.version-switcher .version-list .current {
    font-weight: bold;
}

/* The page outline sits inside the right margin of the page container, outside the text
   column, so the column keeps its width. Above the breakpoint the container widens by the
   outline's footprint, which leaves equal window margins and gives the outline a gutter of
   its own rather than the window edge. Below it the outline is hidden and the sidebar shows
   the page headings instead. */
aside.righttoc {
    position: fixed;
    top: 30px;
    left: calc(50% + 335px);
    width: 290px;
    box-sizing: border-box;
    padding: 0 14px;
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid #ddd;
    font-size: 14px;
    line-height: 1.5;
}

aside.righttoc .localtoc {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

aside.righttoc .toc {
    overflow-y: auto;
    min-height: 0;
    /* A short window makes the outline scroll, and a visible bar inside the padding reads
       as a second gutter. Wheel and keyboard scrolling still reach every entry. */
    scrollbar-width: none;
}

aside.righttoc .toc::-webkit-scrollbar {
    display: none;
}

aside.righttoc .totop {
    flex: none;
    margin: 10px 0 0 0;
    padding-top: 8px;
    border-top: 1px solid #ddd;
    font-size: 13px;
}

aside.righttoc h3 {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: normal;
    color: #444;
    margin: 0 0 6px 0;
}

aside.righttoc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

aside.righttoc ul ul {
    padding-left: 12px;
}

/* The toc starts with the page title, which the heading above already names. */
aside.righttoc .localtoc .toc > ul > li > a {
    display: none;
}

@media screen and (max-width: 1319px) {
    aside.righttoc {
        display: none;
    }
}

@media screen and (min-width: 1320px) {
    div.document,
    div.footer {
        width: 1250px;
    }

    div.bodywrapper {
        margin-right: 310px;
    }

    div.sphinxsidebar li.toctree-l2 {
        display: none;
    }
}

/* The landing page renders its toctree in the body. The sidebar already carries
   the same navigation, and the Markdown copy keeps the body tree as the index an
   agent reads. Hiding it here leaves the browser page ending after the intro. */
div.body .toctree-wrapper {
    display: none;
}
