html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: 'IBM Plex Mono', monospace;
}

.flex-container {
    display: flex;
    align-items: center;

    flex-direction: column;
}

header {
    display: block;
    width: min(900px, calc(100% - 22px));
    padding: 10px;
    border: 1px solid #aaa;
    border-top: none;
    background: #f3f3f3;
}
label {
    user-select: none;
}

main {
    border: 1px solid #aaa;

    border-top: none;

    height: fit-content;

    /* max-width: 900px; */
    width: min(900px, calc(100% - 22px));
    padding: 10px;

    p {
        text-wrap: pretty;
    }
}

h1 {
    font-size: 4rem;
    margin: 0;
    font-weight: 300;
}

h2 {
    font-size: 2rem;
    border-bottom: 1px solid #aaa;
    display: inline;
    padding-right: 5ch;
}

h3 {
    font-size: 1.5rem;
}

p, ul {
    font-size: 1.1rem;
}

ul li {
    margin-bottom: 1rem;
}

img {
    margin: 5px;
}

.float-left {
    float: left;
}
.float-right {
    float: right;
}

.header-clear {
    display: block;
    width: fit-content;
    clear: both;
}
.header-clear.full-width {
    width: 100%;
    padding-right: 0;
}

.infobox {
    border: 1px solid #aaa;
    padding: 5px;
    background: #f3f3f3;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.infobox-header {
    /* margin-top: 20px; */
    margin-top: -4rem;
}
.infobox.float-left {
    margin-right: 20px;
}
.infobox.float-right {
    margin-left: 20px;
}
.infobox.w-256 {
    width: 256px;
}
.infobox.w-128 {
    width: 128px;
}

.clear {
    clear: both;
}

.infobox p, .infobox table {
    font-size: 0.9rem;
    margin: 0;
}
.infobox p {
    font-size: 0.9rem;
}
.infobox img {
    width: calc(100% - 2px);
    margin: 0;
    border: 1px solid #aaa;
}
.infobox th {
    text-align: left;
    padding-right: 10px;
    vertical-align: top;
}

.footnotes {
    padding-left: 2rem;
    padding-right: 2rem;
}
.footnotes p {
    font-size: 1rem;
}

.footnote-list, .footnote-ref {    
    text-decoration: none;
}
.footnote-list:hover, .footnote-ref:hover {
    text-decoration: underline;
}
.footnote-ref {
    font-size: 0.8rem;
    vertical-align: super;
}

.cw {
    display: none;
}
.cw-showing {
    display: revert;
}
/* p.cw-showing {
    display: block;
}
span.cw-showing {
    display: inline;
} */

@media (max-width: 40em) {
    h1 {
        clear: both;
        text-align: center;
    }

    p, span {
        clear: both;
    }

    section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
        height: min-content;
    }

    section ul {
        align-self: flex-start;
    }

    section p {
        align-self: flex-start;
        margin-bottom: 0;
    }
    
    .infobox {
        margin: 20px;
    }
    .infobox-header {        
        margin-top: 20px;
    }

    h2 {
        width: 100%;
        padding: 0;
    }
    h3 {
        align-self: start;
    }

    .infobox-header {
        float: none;
    }
}

:target {
    background: rgb(209, 209, 255);
}

.footnote-popup {
    visibility: hidden;
    position: fixed;

    border: 1px solid #aaa;
    background: #fff;

    font-size: 0.9rem;

    max-width: 350px;

    padding: 5px;


    /* left: 99999999999999999999px;
    top: 99999999999999999999px; */
}
.footnote-popup-visible {
    visibility: visible;
}