.article-toc {
    margin: 28px 0;
    border: 1px solid #dce6ef;
    border-radius: 12px;
    background: #ffffffd9;
    box-shadow: 0 4px 20px #d9e5ef40;
    color: #5c6b72;
    font-size: 14px;
    line-height: 1.6;
}
.article-toc[hidden] {
    display: none;
}
.article-toc summary {
    padding: 16px 20px;
    color: #1e3e3f;
    font-weight: 700;
    cursor: pointer;
}
.article-toc nav {
    max-height: 45vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px 14px;
}
.article-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.article-toc a {
    display: block;
    padding: 7px 10px;
    border-left: 3px solid transparent;
    border-radius: 0 6px 6px 0;
    color: #5c6b72;
    overflow-wrap: anywhere;
    transition: color 0.2s, background 0.2s;
}
.article-toc .toc-level-2 a {
    padding-left: 24px;
    font-size: 13px;
}
.article-toc .toc-level-3 a {
    padding-left: 38px;
    font-size: 13px;
}
.article-toc a:hover,
.article-toc a[aria-current="location"] {
    color: #2879b9;
    background: #eaf4ff;
}
.article-toc a[aria-current="location"] {
    border-left-color: #92cafa;
    font-weight: 700;
}
.article-toc a:focus-visible,
.article-toc summary:focus-visible {
    outline: 2px solid #66afef;
    outline-offset: 2px;
}
.article .content :is(h1, h2, h3) {
    scroll-margin-top: 90px;
}
@media (min-width: 1340px) {
    .article-toc {
        position: fixed;
        top: 88px;
        left: max(24px, calc(50vw - 810px));
        width: min(320px, calc(50vw - 498px));
        margin: 0;
        z-index: 10;
    }
    .article-toc nav {
        max-height: calc(100vh - 190px);
    }
}
@media print {
    .article-toc {
        display: none;
    }
}
