html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

@font-face {
    font-family: liberation monospace;
    font-style: normal;
    font-weight: 400;
    font-display: auto;
    src: local("Liberation Monospace"), url(https://fonts.cdnfonts.com/s/276/LiberationMono-Regular.woff)format("woff")
}

@font-face {
    font-family: liberation monospace;
    font-style: normal;
    font-weight: 700;
    font-display: auto;
    src: local("Liberation Monospace"), url(https://fonts.cdnfonts.com/s/276/LiberationMono-Bold.woff)format("woff")
}

:root {
    --background-primary: #181818;
    --foreground-primary: #f0f0f0;
    --background-secondary: #204080;
    --foreground-secondary: #f0f0f0;
    --background-secondary-shadow: #20408080;
    --background-tertiary: #101010;
    --background-accent: #183060;
    --foreground-accent: #f0f0f0;
    --foreground-link: #4080f0;
}

@media(prefers-color-scheme: light) {
    :root {
        --background-primary: #d8d8d8;
        --foreground-primary: #101010;
        --foreground-secondary: #f0f0f0;
        --background-secondary: #204080;
        --background-secondary-shadow: #20408080;
        --background-tertiary: #f0f0f0;
        --background-accent: #183060;
        --foreground-accent: #f0f0f0;
        --foreground-link: #204080;
    }
}

body {
    background-color: var(--background-tertiary);
    font-family: 'Liberation Monospace', 'Courier New', monospace, sans-serif;
    line-height: 1.25;
}

header, footer {
    display: flex;
    align-items: center;
    border-radius: 4px;
    color: var(--foreground-secondary);
    background-color: var(--background-secondary);
    box-shadow: 0 2px 4px var(--background-secondary-shadow);

    & a {
        color: var(--foreground-secondary);

        &:visited {
            color: var(--foreground-secondary);
        }
    }
}

main {
    background-color: var(--background-primary);
    color: var(--foreground-primary);
}

header, footer, main {
    max-width: 80rem;
    margin: 1rem .5rem
}

@media(min-width: 81rem) {
    header, footer, main {
        margin: 1rem auto !important
    }
}

header {
    h1, h2, h3, h4, h5, h6 {
        border-radius: 4px 0 0 4px;
        padding: 1rem 1.5rem;
        background-color: var(--background-accent);
        color: var(--foreground-accent);
    }

    & nav {
        margin-left: 0.5rem;
    }

    & a {
        padding: 1rem;

        &.active {
            font-weight: bold;
            text-decoration: none;
        }
    }
}

footer {
    & > * {
        padding: 0.5rem 1rem;
    }
}

main {
    h1 {
        font-size: 2.00rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.50rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.875rem;
    }

    h1, h2, h3 {
        border-bottom: var(--foreground-primary) solid 2px;
        margin-bottom: 0.5rem;
        display: inline-block;
    }

    h4, h5, h6 {
        display: inline;
    }

    & row {
        display: block;

        & column {
            display: block;
            border: 4px double var(--background-secondary);
            padding: 1rem;
            flex-grow: 1;
            flex-shrink: 1;
        }
    }

    @media (min-width: 60rem) {
        & row {
            display: flex !important;
            flex-wrap: nowrap;
            flex-direction: row;
        }
    }
}

small {
    font-size: 0.75rem;
}

p {
    margin: 1rem 0;

    &:last-child {
        margin-bottom: 0;
    }
}

flex-spacer {
    flex-grow: 1;
}

flex-line {
    display: flex;
    align-items: baseline;
}

ul {
    list-style: none;
    padding: 0;
}

dt {
    font-weight: bold;
}

a {
    color: var(--foreground-link);

    &:visited {
        color: var(--foreground-link);
    }
}