
.toc-desktop *{transition:var(--us-transition);}
.toc-desktop h3.toc-headline{color:var(--us-text-weak)!important;margin-bottom:16px;opacity:.66;}
.toc-desktop:hover h3.toc-headline{opacity:1;}
.toc-desktop .toc-list{list-style-type:none;padding-left:0;margin:0;display:flex;flex-direction:column;gap:6px;}
.toc-desktop .toc-list li a{color:var(--us-text-weak);text-decoration:none;display:inline-block;cursor:pointer;}

.toc-desktop .toc-list li.level-3{padding-left:0}
.toc-desktop .toc-list li.level-4{padding-left:1em;}
.toc-desktop .toc-list li.level-5{padding-left:2em;}
.toc-desktop .toc-list li.level-6{padding-left:3em;}

.toc-desktop .toc-list:has(.level-2) li.level-3{padding-left:1em;}
.toc-desktop .toc-list:has(.level-2) li.level-4{padding-left:2em;}
.toc-desktop .toc-list:has(.level-2) li.level-5{padding-left:3em;}
.toc-desktop .toc-list:has(.level-2) li.level-6{padding-left:4em;}

.block-toc::-webkit-scrollbar{display:none;}
.block-toc{scrollbar-width:none;}

@media only screen and (max-width:1439px) {
    .block-toc{
        margin-left:auto!important;
        margin-right:auto!important;
        margin-bottom:var(--us-gap);
        max-width:var(--us-text-width)!important;
    }
    .block-toc:has(.toc-desktop){
        padding:var(--us-gap) 0;
        border-top:1px solid var(--us-stroke-weak);border-bottom:1px solid var(--us-stroke-weak);
    }
    .toc-desktop .toc-list li a{color:var(--us-primary-color);}
}

@media only screen and (min-width:1440px) {
    .content-area:has(.toc-desktop){position:relative!important;}
    .content-area:has(.toc-desktop) .block{z-index:2;}
    .content-area:has(.toc-desktop) .block-toc{
        float:left;
        position:sticky!important;
        top:calc( var(--us-header-height) + var(--us-gap));
        max-height:calc(100vh - var(--us-header-height) - var(--us-gap) - var(--us-gap));
        overflow-y:auto;
        overflow-x:hidden;
        width:calc( ( 100vw - var(--us-text-width) - ( 2 * var(--us-gap)) ) / 2 );
        padding:0 var(--us-gap);
        z-index:0!important;
    }
    .toc-list:hover li a{color:var(--us-primary-color);}
    .toc-list:hover li a:hover{text-decoration:underline;}

    .toc-desktop .toc-list li.level-3 + li.level-2,
    .toc-desktop .toc-list li.level-4 + li.level-2,
    .toc-desktop .toc-list li.level-5 + li.level-2,
    .toc-desktop .toc-list li.level-6 + li.level-2{padding-top:16px;}

    .toc-desktop .toc-list li.level-3,
    .toc-desktop .toc-list li.level-4,
    .toc-desktop .toc-list li.level-5,
    .toc-desktop .toc-list li.level-6{font-size:82%;}
}


@media only screen and (min-width:1680px) {
     .block-toc{
        padding-right:32px;
    }
}


@media only screen and (min-width:1760px) {
     .block-toc{
        margin:0!important;
        padding: 0 32px;
        padding-left: 5%;
        width: 25%;
    }
}


@media only screen and (min-width:2000px) {
     .block-toc{
        margin:0!important;
        padding: 0 32px;
        padding-left: 10%;
        width: 25%;
    }
}



.block-toc:has(.toc-expandable){
        margin-left:auto!important;
        margin-right:auto!important;
        margin-bottom:var(--us-gap);
        max-width:var(--us-text-width)!important;
    }
.toc-expandable{display:block;position:relative;/*left:-24px;
right: -24px!important;
width: calc(100% + var(--us-box-padding) + var(--us-box-padding) );*/
border:1px solid var(--us-stroke-weak);border-radius:var(--us-radius);background:var(--us-bg-surface);transition:var(--us-transition);
}
.toc-expandable:not(.open):hover{border-color:var(--us-primary-color);}
.toc-expandable:not(.open):hover .toc-headline{color:var(--us-primary-color)!important;}

.toc-expandable *{transition:var(--us-transition);}
.toc-expandable .toc-headline{position:relative;padding:16px 20px 16px 16px;color:var(--us-text-weak)!important;margin-bottom:0;cursor:pointer;display:flex;align-items:center;justify-content:space-between;}
.toc-expandable.open .toc-headline::before{content:"";display:block;height:1px;background:var(--us-stroke-weak);position:absolute;left:16px;bottom:0px;right:16px;}
.toc-expandable .toc-headline::after{content:"";display:block;
width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
transform:rotate(45deg) translateY(-2px);transform-origin:center;transition:var(--us-transition);}
.toc-expandable.open .toc-headline::after{transform:rotate(-135deg) translateY(0);}
.toc-expandable .toc-list{list-style-type:none;padding-left:16px;padding-right:16px;margin:0;display:flex;flex-direction:column;gap:6px;max-height:0;overflow:hidden;opacity:0;}
.toc-expandable.open .toc-list{margin-top:16px;max-height:100vh;opacity:1;padding:0 16px 16px;}
.toc-expandable .toc-list li a{color:var(--us-primary-color);text-decoration:none;display:inline-block;cursor:pointer;}
.toc-expandable .toc-list li.level-3{padding-left:0;}
.toc-expandable .toc-list li.level-4{padding-left:1em;}
.toc-expandable .toc-list li.level-5{padding-left:2em;}
.toc-expandable .toc-list li.level-6{padding-left:3em;}
.toc-expandable .toc-list:has(.level-2) li.level-3{padding-left:1em;}
.toc-expandable .toc-list:has(.level-2) li.level-4{padding-left:2em;}
.toc-expandable .toc-list:has(.level-2) li.level-5{padding-left:3em;}
.toc-expandable .toc-list:has(.level-2) li.level-6{padding-left:4em;}



@media only screen and (min-width:1440px) {
.block-toc.toc-expandable{float:none;position:relative!important;top:auto;max-height:none;overflow:visible;width:auto;padding:0;z-index:auto!important;}
.toc-expandable .toc-list:hover li a{color:var(--us-primary-color);}
.toc-expandable .toc-list:hover li a:hover{text-decoration:underline;}
.toc-expandable .toc-list li.level-3 + li.level-2,.toc-expandable .toc-list li.level-4 + li.level-2,.toc-expandable .toc-list li.level-5 + li.level-2,.toc-expandable .toc-list li.level-6 + li.level-2{padding-top:16px;}
/*.toc-expandable .toc-list li.level-3,.toc-expandable .toc-list li.level-4,.toc-expandable .toc-list li.level-5,.toc-expandable .toc-list li.level-6{font-size:82%;}*/
}
