.jg-toc {
    display: block;
    margin-top: 22px;
    margin-bottom: 44px;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(30, 131, 180, .08);
    overflow: hidden;
}

.jg-toc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    background: linear-gradient(90deg, #1e83b4 0%, #2a9fd6 100%);
    color: #fff;
    user-select: none;
}

.jg-toc__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
}

.jg-toc__icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.jg-toc__toggle {
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    transition: transform .2s ease;
}

.jg-toc__toggle::before,
.jg-toc__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform: translate(-50%, -50%);
}

.jg-toc__toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: opacity .2s ease;
}

.jg-toc.is-collapsed .jg-toc__toggle::after {
    opacity: 1;
}

.jg-toc.is-collapsed .jg-toc__body {
    display: none;
}

.jg-toc:not(.is-collapsed) .jg-toc__toggle::after {
    opacity: 0;
}

.jg-toc__body {
    padding: 14px 20px 18px;
}

.jg-toc .table-of-content {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: jgtoc;
}

@media (min-width: 768px) {
    .jg-toc__body > .table-of-content {
        column-count: 2;
        column-gap: 36px;
    }
}

.jg-toc .table-of-content li {
    break-inside: avoid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jg-toc .table-of-content li > div > span,
.jg-toc .table-of-content li > span {
    display: none;
}

.jg-toc .table-of-content li > div {
    display: flex;
    align-items: baseline;
}

.jg-toc__body > .table-of-content > li > div {
    counter-increment: jgtoc;
    padding: 6px 0;
}

.jg-toc__body > .table-of-content > li > div::before {
    content: counter(jgtoc);
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #1e83b4;
    background: #e8f4fb;
    border-radius: 50%;
}

.jg-toc .table-of-content a {
    color: #21506b;
    text-decoration: none;
    line-height: 1.45;
    transition: color .15s ease;
}

.jg-toc .table-of-content a:hover,
.jg-toc .table-of-content a:focus {
    color: #1e83b4;
    text-decoration: underline;
}

.jg-toc .table-of-content .table-of-content {
    column-count: 1;
    margin: 2px 0 8px 34px;
}

.jg-toc .table-of-content .table-of-content li > div {
    padding: 3px 0;
}

.jg-toc .table-of-content .table-of-content li > div::before {
    content: "";
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    margin: 8px 12px 0 0;
    background: #9bc4da;
    border-radius: 50%;
}

.jg-toc .table-of-content .table-of-content a {
    font-size: 14px;
    color: #4a6a7d;
}

.jg-toc .table-of-content li.haschildren > div {
    cursor: pointer;
}

.jg-toc .table-of-content li.haschildren.closed > .table-of-content {
    display: none;
}
