/* Widen furo's content column by ~50% (46em -> 69em).

   Furo fixes the readable width with the SASS variable $content-width (variables/_layout.scss), compiled into
   `.content { width: 46em }`, and derives $full-width = $content-width + 2*$content-padding + 2*$sidebar-width = 82em,
   which centers the layout via the .sidebar-drawer calc and drives the responsive breakpoints. None of these are CSS
   custom properties, so the only override is to re-set the compiled rules here with the new widths:
   content-width 69em, content-padded-width 75em, sidebar-width 15em, full-width 105em. */

.content {
    width: 69em;
}

/* keep the block centered: .sidebar-drawer eats the left margin around the new $full-width (105em) */
.sidebar-drawer {
    width: calc((100% - 105em) / 2 + 15em);
}

/* below the new full width, fold the table of contents into its icon and re-centre (furo did this at 82em) */
@media (max-width: 105em) {
    .toc-content-icon {
        display: flex;
    }
    .toc-drawer {
        position: fixed;
        height: 100vh;
        top: 0;
        right: -15em;
        border-left: 1px solid var(--color-background-muted);
    }
    .sidebar-drawer {
        width: calc((100% - 90em) / 2 + 15em);
    }
}

/* center the page once the content column no longer fits beside the navigation (furo did this at 67em) */
@media (max-width: 90em) {
    .content {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Console prompts render as an accented "❯". The reStructuredText source keeps Pygments' literal "$ " prompt so the
   command after it still gets shell highlighting and sphinx-copybutton can strip it on copy; only the shown glyph and
   its colour change here. font-size:0 collapses the "$ " text so ::before can stand in; the glyph is sized in rem
   rather than furo's --code-font-size, whose 81.25% would resolve against the zeroed parent to 0. */
.highlight .gp {
    font-size: 0;
    user-select: none;
}

.highlight .gp::before {
    content: "❯ ";
    font-size: 0.8125rem;
}

/* Accent the prompt in the pipx brand colour (::before inherits it). furo's pygments sheet colours the prompt grey
   through higher-specificity "body[data-theme=…]" selectors that also fire in OS-default light, so mirror them to win
   the accent across explicit-light, explicit-dark, and no-preference states. */
.highlight .gp,
body[data-theme="dark"] .highlight .gp,
body:not([data-theme="light"]) .highlight .gp {
    color: var(--color-brand-content);
}
