.sah-lesson-sidebar {
    width: var(--sah-sidebar-width);
    min-width: 0;
    background: #fff;
    border: 1px solid var(--sah-border);
    border-radius: 7px;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 24px;
    z-index: 300;
}

.sah-lesson-sidebar__header {
    min-height: 74px;
    padding: 13px 12px 11px;
    border-bottom: 1px solid var(--sah-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.sah-lesson-sidebar__eyebrow {
    margin-bottom: 2px;
    color: var(--sah-purple);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: .08em;
}

.sah-lesson-sidebar__header h2 {
    margin: 0;
    color: #24202f;
    font-size: 16px;
    line-height: 1.35;
}

.sah-lesson-sidebar__close {
    display: none;
    border: 0;
    background: transparent;
    color: #625b6e;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 0;
}

.sah-lesson-sidebar__chapter {
    border-bottom: 1px solid var(--sah-border);
}

.sah-lesson-sidebar__chapter:last-child {
    border-bottom: 0;
}

.sah-lesson-sidebar__chapter summary {
    min-height: 42px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    color: #292532;
    font-size: 14px;
    font-weight: 700;
    user-select: none;
}

.sah-lesson-sidebar__chapter summary::-webkit-details-marker {
    display: none;
}

.sah-lesson-sidebar__chapter summary:hover {
    background: #fbf8fd;
}

.sah-lesson-sidebar__chevron {
    flex: 0 0 auto;
    font-size: 14px;
    color: #514a5b;
    transition: transform .16s ease;
}

.sah-lesson-sidebar__chapter[open] .sah-lesson-sidebar__chevron {
    transform: rotate(180deg);
}

.sah-lesson-sidebar__lessons {
    padding: 2px 7px 9px;
}

.sah-lesson-sidebar__lessons a {
    min-height: 35px;
    margin: 1px 0;
    padding: 7px 9px;
    border-left: 3px solid transparent;
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #5c5666;
    font-size: 14px;
    line-height: 1.35;
}

.sah-lesson-sidebar__lessons a:hover {
    color: var(--sah-purple);
    background: #fbf7ff;
}

.sah-lesson-sidebar__lessons a.is-active {
    border-left-color: var(--sah-purple);
    background: #f2d8ff;
    color: #5f00dc;
    font-weight: 750;
}

.sah-sidebar-overlay {
    display: none;
}

@media (max-width: 760px) {
    .sah-lesson-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(330px, 86vw);
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border-width: 0 1px 0 0;
        transform: translateX(-105%);
        transition: transform .22s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 12px 0 30px rgba(24, 9, 38, .16);
        z-index: 1200;
        position: fixed;
        top: 0;
    }

    .sah-lesson-sidebar.is-mobile-open {
        transform: translateX(0);
    }

    .sah-lesson-sidebar__header {
        position: sticky;
        top: 0;
        z-index: 2;
        min-height: 68px;
        background: #fff;
        padding: 13px 14px;
    }

    .sah-lesson-sidebar__close {
        display: block;
    }

    .sah-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgba(20, 10, 28, .42);
    }

    .sah-sidebar-overlay.is-visible {
        display: block;
    }

    .sah-lesson-sidebar__chapter summary {
        min-height: 46px;
        font-size: 14px;
    }

    .sah-lesson-sidebar__lessons a {
        min-height: 38px;
        font-size: 14px;
    }
}
