.loco-toc {
    background: var(--card-bg);
    border-radius: 16px;
    color: var(--card-text);
    padding: 18px;
    position: relative;
    width: 100%
}

.loco-toc__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 140%;
    width: calc(100% - 88px)
}

.loco-toc__button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    gap: 8px;
    outline: none;
    position: absolute;
    right: 24px;
    top: -10px;
    -webkit-transition-duration: 1s;
    transition-duration: 1s
}

.loco-toc.dropdown-list_open .loco-toc__button-dropdown svg {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg)
}

.loco-toc__button-dropdown {
    background: var(--contrast-bg);
    border-radius: 8px;
    color: var(--contrast-color);
    height: 40px;
    padding: 8px;
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
    width: 40px;
    -ms-flex-negative: 0;
    flex-shrink: 0
}

.loco-toc__button-dropdown svg {
    height: 24px;
    width: 24px
}

.loco-toc__menu {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    counter-reset: toc-counter;
    -ms-flex-flow: column nowrap;
    flex-flow: column nowrap;
    gap: 12px;
    height: 0;
    overflow: hidden;
    -webkit-transition: height .3s ease;
    transition: height .3s ease
}

.loco-toc__menu_child,.loco-toc__menu_grandchild {
    gap: 16px;
    margin-top: 12px;
    padding: 0 32px
}

.loco-toc__menu-item {
    counter-increment: toc-counter;
    list-style: none
}

.loco-toc__menu-item:first-child {
    padding-top: 24px
}

.loco-toc__menu-link {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 2px;
    text-decoration: none;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content
}

.loco-toc__menu-link,.loco-toc__menu-link:before {
    color: var(--links-color);
    font-size: 16px;
    font-weight: 400;
    line-height: 150%
}

.loco-toc__menu-link:before {
    content: counter(toc-counter) "."
}

.loco-toc__menu-link span,.loco-toc__menu-link:before {
    -webkit-transition: all .3s ease-in-out;
    transition: all .3s ease-in-out
}

.loco-toc__menu-link span {
    color: inherit
}

@media (max-width: 768px) {
    .loco-toc {
        padding:16px
    }
}

@media not all and (pointer: coarse) {
    .loco-toc__menu-link:hover {
        color:var(--card-text-secondary)
    }

    .loco-toc__menu-link:hover span {
        text-decoration: underline;
        text-underline-offset: 3px
    }

    .loco-toc__menu-link:hover:before {
        color: var(--card-text-secondary)
    }
}
