:root {
    --manual-header-height: 80px;
    --manual-sidebar-width: 290px;
    --manual-header-color: #161635;
    --manual-accent-color: #6e6fcf;
    --manual-sidebar-color: #f4f4f4;
}

body.manual-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.manual-header,
.manual-header *,
.manual-shell,
.manual-sidebar,
.manual-sidebar *,
.manual-menu-overlay {
    box-sizing: border-box;
}

.manual-header {
    position: sticky;
    z-index: 1100;
    top: 0;
    display: flex;
    flex: 0 0 var(--manual-header-height);
    align-items: center;
    width: 100%;
    height: var(--manual-header-height);
    padding: 0 20px;
    color: #fff;
    background: var(--manual-header-color);
}

.manual-menu-toggle {
    display: none;
    margin: -4px 15px 0 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.manual-brand,
.manual-brand:link,
.manual-brand:visited,
.manual-brand:hover,
.manual-brand:active {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    color: #fff;
    background: transparent;
    text-decoration: none;
}

.manual-brand svg {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-right: 15px;
}

.manual-brand-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
}

.manual-shell {
    display: flex;
    flex: 1 0 auto;
    align-items: stretch;
    min-width: 0;
}

.manual-sidebar {
    position: sticky;
    z-index: 1000;
    top: var(--manual-header-height);
    flex: 0 0 var(--manual-sidebar-width);
    width: var(--manual-sidebar-width);
    height: calc(100vh - var(--manual-header-height));
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--manual-sidebar-color);
}

.manual-sidebar-heading {
    margin: 0 0 14px;
    color: #111;
    font-size: 24px;
    line-height: 1.3;
}

.manual-sidebar a,
.manual-sidebar a:link,
.manual-sidebar a:visited {
    display: block;
    margin: 0;
    padding: 8px;
    color: #333;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
}

.manual-sidebar a:hover,
.manual-sidebar a:focus-visible {
    background: #ddd;
}

.manual-sidebar a[aria-current="page"] {
    color: #111;
    background: #e2e2f4;
    font-weight: 600;
}

.manual-sidebar .manual-sidebar-heading a,
.manual-sidebar .manual-sidebar-heading a:link,
.manual-sidebar .manual-sidebar-heading a:visited {
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
}

.manual-content {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 20px;
}

.manual-content [id] {
    scroll-margin-top: calc(var(--manual-header-height) + 16px);
}

.manual-menu-overlay {
    display: none;
}

@media (max-width: 768px) {
    .manual-menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .manual-header {
        padding: 0 15px;
    }

    .manual-brand-title {
        font-size: 20px;
    }

    .manual-sidebar {
        position: fixed;
        top: var(--manual-header-height);
        bottom: 0;
        left: 0;
        width: min(85vw, 320px);
        height: auto;
        padding: 20px 20px 40px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.25);
        transform: translateX(-105%);
        transition: transform 0.25s ease-in-out;
    }

    .manual-sidebar.open {
        transform: translateX(0);
    }

    .manual-menu-overlay {
        position: fixed;
        z-index: 900;
        top: var(--manual-header-height);
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        visibility: hidden;
        border: 0;
        opacity: 0;
        background: rgba(0, 0, 0, 0.25);
        transition: opacity 0.25s ease-in-out, visibility 0.25s;
    }

    .manual-menu-overlay.open {
        visibility: visible;
        opacity: 1;
    }

    .manual-content {
        width: 100%;
        padding: 20px;
    }

    body.manual-menu-open {
        overflow: hidden;
    }
}
