.article-header {
    padding: 16px;
    background-color: #91d5ff30;
    border: 2px solid #91d5ff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#overdue-warning {
    margin-top: 8px;
    padding: 8px;
    background-color: #ffa39e30;
    border: 2px solid #ffa39e;
    display: none;
}

.article-title {
    font-size: 2em;
}

.article-info {
    /* line-height: 24px; */
}

.article-container {
    display: flex;
    flex-direction: column-reverse;
}

.article-nav {
    flex-grow: 0;
    flex-shrink: 0;
    margin-top: 16px;
    box-sizing: border-box;
    border: 2px var(--color-gray) solid;
    padding: 8px;
    display: none;
}

@media screen and (min-width: 768px) {
    .article-container {
        flex-direction: row;
        align-items: flex-start;
    }
    .article-nav {
        width: 200px;
        margin-left: 24px;
    }
}

.arrow {
    display: inline-block;
    vertical-align: middle;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #4f5959;
    transform: rotate(-90deg);
}

#toc {
    margin-top: 8px;
}

.toc-item span {
    cursor: pointer;
}

.toc-item-title {
    display: flex;
    flex-direction: row;
}

.toc-item-arrow {
    width: 12px;
    flex-shrink: 0;
}

.toc-item-arrow-none {
    visibility: hidden;
}

.toc-item-content {
    word-break: break-all;
}

.toc-item-children {
    display: none;
    /* max-height: 0px;
    overflow: hidden;
    transition: all ease 0.2s; */
}

.toc-item-active > .toc-item-title > .toc-item-arrow > .arrow {
    transform: rotate(0deg);
}

.toc-item-active > .toc-item-children {
    display: block;
    /* max-height: 500px; */
}

@media (any-hover: hover) {
    .toc-item span:hover {
        font-weight: bold;
    }
}

.toc-h1 > .toc-item-title {
    margin-left: 0;
}
.toc-h2 > .toc-item-title {
    margin-left: 12px;
}
.toc-h3 > .toc-item-title {
    margin-left: 24px;
}
.toc-h4 > .toc-item-title {
    margin-left: 36px;
}
.toc-h5 > .toc-item-title {
    margin-left: 48px;
}
.toc-h6 > .toc-item-title {
    margin-left: 60px;
}

.article-content {
    flex-grow: 1;
    min-width: 0;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 0.5em 0;
}

.article-content h1 {
    font-size: 2em;
}
.article-content h2 {
    font-size: 1.8em;
}
.article-content h3 {
    font-size: 1.6em;
}
.article-content h4 {
    font-size: 1.4em;
}
.article-content h5,
.article-content h6 {
    font-size: 1.2em;
}

.article-content h1::before,
.article-content h2::before,
.article-content h3::before,
.article-content h4::before,
.article-content h5::before,
.article-content h6::before {
    color: var(--color-gray);
}

.article-content h1::before {
    content: "#";
}
.article-content h2::before {
    content: "##";
}
.article-content h3::before {
    content: "###";
}
.article-content h4::before {
    content: "####";
}
.article-content h5::before {
    content: "#####";
}
.article-content h6::before {
    content: "######";
}

.article-content div.highlighter-rouge {
    border: 2px var(--color-gray) solid;
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 0 1em;
    overflow-x: auto;
}

.article-content code.highlighter-rouge {
    background-color: var(--color-light);
    border: 1px var(--color-gainsboro) solid;
    border-radius: 2px;
    padding: 0 2px;
}

@media (prefers-color-scheme: dark) {
    .article-content code.highlighter-rouge {
        background-color: var(--color-gray);
    }
}

.article-content img {
    width: 100%;
}

.article-content blockquote {
    margin: 1em 0;
    padding: 4px 40px;
    border-left: 4px var(--color-purple) solid;
    background-color: #9370db30;
}