/* Styles for HTML fragments generated by tools/build_tex_blog.py. */

.tex-blog {
    --tex-blog-border: #bac6d3;
    --tex-blog-background: #f5f8ff;
}

.tex-blog > :first-child {
    margin-top: 0;
}

.tex-blog [id] {
    scroll-margin-top: 1rem;
}

.tex-blog .displaymath,
.tex-blog .equation {
    margin: 1.5rem 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.tex-blog .equation_content {
    min-width: max-content;
    text-align: center;
}

.tex-blog .equation_label {
    /* MathJax renders the equation number from the preserved TeX source. */
    display: none;
}

.tex-blog [class*="_thmwrapper"] {
    background: var(--tex-blog-background);
    border-left: 3px solid var(--tex-blog-border);
    border-radius: 3px;
    margin: 2rem 0;
    padding: 1rem 1.25rem;
}

.tex-blog [class*="_thmheading"],
.tex-blog .proof_heading {
    font-weight: bold;
    margin-bottom: 0.35rem;
}

.tex-blog .proof_heading[role="button"] {
    align-items: center;
    color: green;
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    padding: 0.15rem 0;
}

.tex-blog .proof_heading[role="button"]:focus-visible {
    border-radius: 2px;
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.tex-blog [class*="_thmlabel"]::after,
.tex-blog .proof_caption::after {
    content: ".";
}

.tex-blog [class*="_thmcontent"] > :first-child,
.tex-blog .proof_content > :first-child {
    margin-top: 0;
}

.tex-blog .proof_wrapper {
    margin: 2rem 0;
}

.tex-blog .expand-proof {
    display: inline-block;
    font-size: 0.7em;
    transition: transform 0.2s ease;
}

.tex-blog .proof_heading[aria-expanded="true"] .expand-proof {
    transform: rotate(180deg);
}

.tex-blog .proof_content {
    margin-top: 0.5rem;
}

.tex-blog ul.itemize,
.tex-blog ol.enumerate {
    margin-bottom: 1rem;
    margin-top: 0.75rem;
}

.tex-blog .bibliography dt {
    font-weight: bold;
    margin-top: 1rem;
}

.tex-blog .bibliography dd {
    margin-left: 1.5rem;
}

.tex-blog table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 600px) {
    .tex-blog [class*="_thmwrapper"] {
        padding: 0.8rem 1rem;
    }
}
