* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

html {
    font-size: 20px;
    font-family: "Source Sans Pro", sans-serif;
    line-height: 1.5;
}

body {
    max-width: 1000px;
    margin: 0 auto;
}

a {
    color: #000;
    text-decoration: underline;
}

a:hover {
    color: #fff;
    background-color: #54008c;
}

main,
header,
footer {
    margin: 1rem;
}

hr {
    border-top: 1px solid black;
}

ul,
ol {
    padding-left: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: bold;
}

main
    :is(
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        ul,
        ol,
        a,
        blockquote,
        hr,
        div:has(.highlight)
    ) {
    margin: 1rem 0;
}

main p {
    margin: 1rem 0;
}

blockquote p {
    margin: 0;
}

li {
    margin-bottom: 0.5rem;
}

pre,
code {
    font-family: "Source Code Pro", monospace;
}

code {
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    font-size: 0.8em;
}

pre {
    background-color: #f9f9f9;
    color: #000;
    padding: 0.5rem 0.7rem;
    border: 1px dashed #444;
    overflow-x: auto;
    user-select: all;
}

pre code {
    background: none;
    padding: 0;
}

video,
img {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
}

figcaption {
    text-align: center;
    font-size: 0.8rem;
}

table {
    display: block;
    max-width: fit-content;
    margin: 1rem auto;
    overflow-x: auto;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid black;
    padding: 0 0.25rem;
}

math {
    font-family: "Latin Modern Math", "Cambria Math";
}

.center-math {
    font-size: 1.2rem;
    text-align: center;
}

header {
    display: flex;
    align-items: center;
    flex-direction: column;
}

header nav a {
    margin: 0 0.5rem;
}

footer {
    text-align: center;
    font-size: 0.8rem;
}

blockquote {
    padding: 0.5rem;
    background-color: hsl(197, 37%, 96%);
    border: 1px solid hsl(197, 37%, 91%);
}

div:has(.highlight) {
    position: relative;
}

div:has(.highlight) button {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.6rem;
    padding: 0.2rem;
    background-color: #a3a3a3;
    border-width: 0;
}

div:has(.highlight) button:hover {
    background-color: #bcbabb;
}

.footnotes {
    border-top: 1px solid black;
    font-size: 0.8rem;
}

.task-list {
    list-style-type: none;
}

.task-list-item-checkbox {
    margin-right: 0.5rem;
}

@media (width < 1000px) {
    body {
        width: 100%;
    }
}

@media print {
    header,
    footer,
    div:has(.highlight) button,
    hr {
        display: none;
    }
}
