body {
    display: grid;
    grid-template-columns: 1fr 5fr;
    padding-left: 20px;
    padding-right: 50px;
    font-family: "Noto Sans", sans-serif;
    background-color: #121212;
    color: #ffffff;
}

@media (max-width: 768px) {
    .side #toc {
        display: none;
    }

    body {
        display: block;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 768px) {
    .article-header .title {
        font-size: 18px;
    }
}

.side {
    order: 1;
    border-right: solid 1px #555;
    padding-right: 20px;
}

.side-sticky {
    position: sticky;
    top: 20px;
}

.article-header {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 50px;
}

.article-header .thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    filter: blur(3px);
}

.article-header .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-header .title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    border-bottom: solid 1px #555;
    font-weight: bold;
    background-color: #333333aa;
}

.date {
    font-size: 14px;
    text-align: center;
}

.date::before {
    content: "\f073";
    font-family: "Font Awesome 5 Free";
}

.tag {
    font-size: 14px;
    text-align: center;
}

.content {
    order: 2;
    padding: 20px;
}

.toc_title {
    display: none;
}

.math-block {
    overflow-x: auto;
    overflow-y: hidden;
}

.math-inline {
    display: inline-grid;
    overflow-x: hidden;
}

mjx-container {
    display: inline-block;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

h2 {
    border-left: solid 5px #4a90e2;
    padding-left: 10px;
}

img {
    max-width: 100% !important;
    height: auto;
}

@media (max-width: 768px) {
    figure {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        overflow: hidden;
        padding: 20px;
    }
}

h3 {
    margin-bottom: 0;
    padding-bottom: 0;
}

pre {
    padding: 10px;
    background-color: #1e1e1e;
    color: #ffffff;
}

.tex-equations {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

th,
td {
    border: 1px solid #555;
    padding: 8px;
    color: #ffffff;
}

@media (max-width: 768px) {
    .exec_plot {
        width: 100%;
        overflow-x: auto;
    }
}

#toc {
    background-color: transparent;
    border-radius: 4px;
    padding: 15px;
    list-style: none;
    border-left: solid 1px #555;
}

#toc a {
    text-decoration: none;
    color: #999;
    display: block;
    margin: 5px 0;
    transition: color 0.2s;
}

#toc a::before {
    content: "▶";
    margin-right: 5px;
}

#toc a:hover {
    color: #4a90e2;
}

#toc .active {
    font-weight: bold;
    color: #4a90e2;
    font-size: 16px;
}

.toc_H1 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a90e2;
}

.toc_H2 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a90e2;
    padding-left: 10px;
}

.toc_H3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #4a90e2;
    padding-left: 20px;
}

.content_list_h1 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: solid 1px #4a90e2;
    color: #4a90e2;
}

.content_list_h2 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a90e2;
}

.content_list_problem {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a90e2;
}

.badge {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    color: #999;
    border: 1px solid #333;
    margin: 0 8px;
    float: left;
}

.runbutton,
.submitbutton {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.runbutton {
    background-color: #4a90e2;
}

.runbutton:hover {
    background-color: #336699;
}

.submitbutton {
    background-color: #008000;
}

.submitbutton:hover {
    background-color: #006400;
}

.problem_title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.editor {
    width: 100%;
    height: 300px;
    font-size: 16px;
    font-family: monospace;
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 10px;
    border: solid 1px #555;
}

.output,
.expect_out,
.sample_in,
.sample_out {
    width: 100%;
    padding: 5px 5px;
    overflow-x: auto;
    font-size: 16px;
    font-family: monospace;
    background-color: #1e1e1e;
    color: #ffffff;
    border: solid 1px #555;
}

.box-title,
.problem_list {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #999;
}

.inline-code,
.code-block {
    font-family: monospace;
    line-height: 1.5;
    background-color: #1e1e1e;
    color: #ffffff;
}

.success,
.info,
.warning,
.danger {
    padding: 12px;
    border: 1px solid;
    border-radius: 4px;
}

.success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}

.danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}


.definition {
    counter-increment: definition;
    border: #31708f 3px dotted;
    border-left: #31708fa1 5px solid;
}

.definition::before {
    content: "Definition " counter(definition) ".";
}

.theorem {
    counter-increment: theorem;
    border: #318f5a 3px dotted;
    border-left: #318f4fa1 5px solid;
}

.theorem::before {
    content: "Theorem " counter(theorem) ".";
}

.lemma {
    counter-increment: lemma;
    border: #ab5b64 3px dotted;
    border-left: #d071a4a1 5px solid;
}

.lemma::before {
    content: "Lemma " counter(lemma) ".";
}

.proof {
    counter-increment: proof;
    border: #5b64ab 3px dotted;
    border-left: #8cc1e7a1 5px solid;
}

.proof::before {
    content: "Proof " counter(proof) ".";
}

.definition::before,
.theorem::before,
.proof::before,
.lemma::before {
    font-family: serif;
    font-size: large;
    font-weight: 600;
    font-style: italic;
    display: block;
}


.definition,
.theorem,
.proof,
.lemma {
    padding: 12px;
    margin: 12px;
}

.proof::after {
    content: "∎";
    margin-left: auto;
    display: block;
}

iframe {
    width: 100%;
}


a {
    color: #007bff;
    word-break: break-all;
}

.footnote {
    border-top: solid 1px #555;
    font-style: italic;
}

.footnote > * {
    display: block;
    margin-bottom: 10px;
}