:root {
    --gap: 24px;
    --radius: 8px;
    --theme: rgb(255, 255, 255);
    --entry: rgb(255, 255, 255);
    --primary: rgb(30, 30, 30);
    --secondary: rgb(108, 108, 108);
    --tertiary: rgb(214, 214, 214);
    --content: rgb(31, 31, 31);
    --hljs-bg: rgb(28, 29, 33);
    --code-bg: rgb(245, 245, 245);
    --border: rgb(238, 238, 238);

    --article-width: 650px;
    --toc-width: 280px;
}

/*目录*/
.toc {
    margin: 5px 0 40px 0;
    border: 1.2px solid var(--border);
    background: var(--entry);
    border-radius: var(--radius);
    padding: 0.4em;
}

.toc-container.wide {
    position: absolute;
    height: 100%;
    /*border-right: 1px solid var(--border);*/
    left: calc((var(--toc-width) + var(--gap)) * -0.05);
    top: calc(var(--gap) * 2.5);
    width: var(--toc-width);
}

.wide .toc {
    position: fixed;
    top: var(--gap);
    border: unset;
    background: unset;
    border-radius: unset;
    width: var(--toc-width);
    margin: 0 2px 40px 2px;
}

.toc details summary {
    cursor: zoom-in;
    margin-inline-start: 20px;
    padding: 12px 0;
}

.toc details[open] summary {
    font-weight: 500;
}

.toc-container.wide .toc .inner {
    margin: 0;
}

.active {
    font-size: 100%;
    border-bottom: 1px solid transparent;
    padding-bottom: 0.1rem;
    border-bottom-color: var(--secondary);
    font-weight: 550;
}

.dark .active {
    color: var(--content);
    font-weight: 600;
}

.toc .inner {
    padding: 0 15px 15px 15px;
    font-size: 16px;

    max-height: 83vh;
    overflow-y: auto;
}

.toc .inner::-webkit-scrollbar-thumb {
    background: var(--border);
    border: 2px solid var(--theme);
    border-radius: var(--radius);
}

.toc ul {
    margin: 0 0 0 10px;
    padding-inline-start: 5px;
    list-style-type: circle;
}

.toc li {
    list-style: none;
    font-size: 0.90rem;
    /*padding-bottom: 5px;*/
    padding: 5px 0 0 0;
}

.toc li a {
    text-decoration: none;
    color: black;
}

.toc li a:hover {
    font-weight: 600;
}

.dark .toc li a:hover {
    font-weight: 600;
    color: var(--content);
}

