/* Enable viewport-based sticky positioning despite the site's overflow-x reset. */
html.has-case-study-sidebar,
body.has-case-study-sidebar {
    overflow-x: clip !important;
}

.case-study-with-sidebar {
    --case-study-sticky-top: 140px;
}

.case-study-with-sidebar > .case-study-sidebar,
.case-study-with-sidebar > .case-study-main-content {
    min-width: 0;
}

.case-study-with-sidebar > .case-study-sidebar {
    align-self: stretch;
}

.case-study-sidebar-sticky {
    overflow-wrap: anywhere;
}

.case-study-sidebar .toc {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #f5f5f5;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 22px;
}

.case-study-sidebar .toc .toc-h {
    display: none;
}

.case-study-sidebar .toc ol,
.case-study-sidebar .toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.case-study-sidebar .toc ol {
    counter-reset: case-study-section;
}

.case-study-sidebar .toc li {
    margin: 0;
    padding: 0;
}

.case-study-sidebar .toc ol > li {
    counter-increment: case-study-section;
}

.case-study-sidebar .toc li:not(:last-child) {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.case-study-sidebar .toc a {
    display: block;
    padding: 0;
    color: #fff !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 22px !important;
    letter-spacing: 0 !important;
    text-align: left;
    text-decoration: underline !important;
}

.case-study-sidebar .toc ol > li > a::before {
    content: counter(case-study-section) ". ";
}

.case-study-sidebar .toc a:hover,
.case-study-sidebar .toc a:focus-visible {
    color: #fff !important;
    text-decoration: underline !important;
}

@media (min-width: 992px) {
    .case-study-sidebar-sticky {
        position: sticky;
        top: var(--case-study-sticky-top);
        max-height: calc(100vh - var(--case-study-sticky-top) - 16px);
        overflow-y: auto;
    }

    .case-study-with-sidebar > .case-study-main-content > .casestudymt5 {
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    .case-study-with-sidebar > .case-study-sidebar {
        width: 100%;
    }
}
