body {
    margin: 0;
    padding: 0;
    min-height: 200vh;
    font-family: BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1.1em;
    background: rgba(0,0,0,0.55);
}

.content {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    color: black;
    border-radius: 16px;
    backdrop-filter: blur(6px);
}

.img-captioned {
    border: 1px solid gray;
}
.caption {
    display: block;
    font-style: italic;
    color: gray;
}

h2 {

    border-bottom: 1px solid #cedbe0;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* Zoomable images */

.zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.zoom-overlay.is-open {
    display: flex;
}

.zoom-overlay__panel {
    position: relative;
    max-width: min(95vw, 1400px);
    max-height: 95vh;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zoom-overlay__img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: white;
}

.zoom-overlay__caption {
    margin-top: 12px;
    max-width: 100%;
    color: #fff;
    font: 600 16px/1.35 BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    text-align: center;
}

.zoom-overlay__close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255,255,255,0.14);
    color: black;
    font-size: 22px;
    line-height: 40px;
}

img.zoomable {
    cursor: pointer;
}

:root {
    --nav-w: 280px;
}

/* Sidebar */

#toc {
    position: fixed;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    max-width: 40%;
    overflow: auto;
    border-radius: 12px;
    padding: 12px 10px;
}
#toc:hover {
    z-index: 100;
}

#toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#toc a:hover {
    background: #00000033;
}

#toc a.active {
    background: #0a1c442c;
    font-weight: 700;
}

/* Indentation by heading level */
#toc a[data-level="1"] {
    margin-left: 0;
}
#toc a[data-level="2"] {
    margin-left: 12px;
}
#toc a[data-level="3"] {
    margin-left: 24px;
}

main {
    min-width: 0;
}

/* Mobile */
@media (max-width: 900px) {
    /* hide navigation */
    #toc {
        position: absolute;
        display:none
    }

body {
    background: white
}

.content {
    position: relative;
    margin: 40px auto;
    padding: 0.5em 2em;
    background: white;
    color: black;
    border-radius: 0px;
    backdrop-filter: none;
}


}
