@font-face {
    font-family: "Berkeley Mono";
    src: url("fonts/BerkeleyMonoVariable-Regular.woff2") format("woff2"),
        url("fonts/BerkeleyMonoVariable-Regular.woff") format("woff"),
        url("fonts/BerkeleyMonoVariable-Italic.woff2") format("woff2"),
        url("fonts/BerkeleyMonoVariable-Italic.woff") format("woff");
}

html {
    font-family: "Berkeley Mono", monospace;
    font-weight: lighter;
    min-height: 100vh;
    width: 100vw
}

body {
    background-color: #f8f8f8;
    color: #333;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 800px;
    padding: 0.5em 1em 3em;
    box-sizing: border-box;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
    counter-reset: math-counter;
}

p {
    margin: 0;
    padding: 0.5em 0;
}

li {
    padding-bottom: 0.5em;
}

a {
    color: #333;
}

header {
    margin: 0.5em 0;
}

footer {
    text-align: center;
    font-size: 0.7em;
    margin-top: auto;
    padding-top: 5em;
    bottom: 0;
}

.section {
    margin: 0 1em;
}

.section-title {
    margin: 0 0 -25px;
}

.section-title span {
    background-color: #f8f8f8;
    padding: 0 5px;
    margin-left: -5px;
}

.section-content {
    margin: 0 -10px;
    border: 1px solid #676767;
    padding: 0 10px;
}

.summary {
    margin: 0 1em;
}

.summary-title {
    margin: 0 0 -25px;
}

.summary-title span {
    background-color: #f8f8f8;
    padding: 0 5px;
    margin-left: -5px;
}

.summary-content {
    margin: 0 -10px;
    border: 1px solid #676767;
    padding: 1em 10px;
}

#links-content div {
    margin: 1em 0;
}

.preview {
    margin: 1em 0;
}

.preview * {
    margin: 0;
}

.preview-content {
    color: #676767;
}

hr {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border: none;
    height: 1px;
    background-color: #676767;
}

#footnotes hr {
    width: 100%;
    margin: 1em 0;
    left: 0;
    right: 0;
}

.clipboard {
    font-size: 2em;
    position: absolute;
    margin: -0.35em 0.3em 0;
    cursor: pointer;
}

abbr {
    text-decoration-thickness: 0.05em;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

th, td {
    border: 1px solid #676767;
    padding: 0.5em;
}

th {
    background-color: #e0e0e0;
}

math {
    font-family: "Cambria Math", serif;
    font-size: 1.2em;
    line-height: 1.5;
}

p:has(> math[display="block"]) {
    position: relative;
}

p:has(> math[display="block"])::after {
    counter-increment: math-counter;
    content: "(" counter(math-counter) ")";
    font-size: 0.8em;
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
}

blockquote {
    margin: 0;
    padding: 0.5em 1em;
    border-left: 0.25em solid #676767;
    font-style: italic;
}

code {
    margin: 1em 0;
    position: relative;
    font-family: "Berkeley Mono", monospace;
}

.hljs {
    background-color: #f8f8f8 !important;
    border: 1px solid #676767;
}

img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    cursor: pointer;
    border: 1px solid #676767;
}

#fullscreen-image-container {
    position: fixed;
    visibility: hidden;
    background-color: #000D;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    text-align: center;
    align-content: center;
    cursor: pointer;
}

#fullscreen-image {
    max-width: 95%;
    max-height: 95%;
    display: inline-block;
    vertical-align: middle;
    border: none;
}

figcaption {
    font-size: 0.8em;
    text-align: center;
    margin: 0.5em 0;
    color: #676767;
}