@import "normalize.css";
@import "fonts.css";

:root {
    --accent-color: #6f00ff;
    --font-sans: OpenMoji, Atkinson Hyperlegible Next, ui-sans-serif, sans-serif;
    --font-serif: OpenMoji, Libertinus, ui-serif, serif;
    --font-mono:
        OpenMoji, Fantasque Sans Mono, Atkinson Hyperlegible Mono, Julia Mono, ui-monospace,
        monospace;
    --grey-borders: rgb(233, 235, 238);
    --blockquote-grey: rgb(4, 35, 11);
}

html {
    height: 100%;
}

body {
    container: page / inline-size;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    height: 100%;
    hyphens: auto;
    justify-content: space-between;
    line-height: 1.5;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 100rex;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: justify;
    word-wrap: break-word;
}

#main {
    margin-top: 2rem;
}

#banner {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    padding-bottom: 0.3em;
    row-gap: 1em;
    white-space: nowrap;

    #navbar {
        .nav-item {
            font-size: x-large;
            margin-inline: 0.25em;
        }
    }

    #subtitle {
        font-size: large;
        max-width: 28em;
        text-align: left;
    }
    #title {
        font-size: xx-large;
        a {
            text-decoration: none;
            &:hover,
            &:focus {
                text-decoration: none;
            }
        }
    }
}

#content {
    p {
        min-width: 30ex;
    }
}

#page-footer {
    border-top: 1px solid var(--grey-borders);
    column-gap: 3ex;
    display: flex;
    filter: grayscale(0.25);
    font-size: small;
    justify-content: space-between;
    margin-bottom: 1rem;
    opacity: 0.625;
    padding: 1.5em;
    text-align: left;
}

body > *:first-child {
    margin-top: 0;
}
body > *:last-child {
    margin-bottom: 0;
}

p {
    margin-bottom: 0.75em;
    margin-top: 0;
}

blockquote {
    margin: 0;
    padding: 0 1em;
    color: var(--blockquote-grey);
    border-left: 0.25em solid var(--grey-borders);

    > :first-child {
        margin-top: 0;
    }

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

ul,
ol {
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

ol ol,
ul ol {
    list-style-type: lower-roman;
}

ul ul ol,
ul ol ol,
ol ul ol,
ol ol ol {
    list-style-type: lower-alpha;
}

dd {
    margin-left: 0;
}

tt,
code {
    font-family: var(--font-mono);
}

kbd {
    display: inline-block;
    padding: 0.125em 0.125em;
    color: #444d56;
    vertical-align: middle;
    background-color: #fafbfc;
    border: solid 1px rgb(197, 202, 209);
    border-bottom-color: #959da5;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 #959da5;
}

pre {
    border-radius: 3px;
    font-family: var(--font-mono);
    margin-top: 0;
    margin-bottom: 0;
    overflow: auto;
    padding: 0.5em;
    word-wrap: normal;
}

pre code,
pre tt {
    background-color: transparent;
    border: 0;
    display: inline;
    max-width: auto;
    margin: 0;
    overflow: visible;
    padding: 0;
    white-space: pre;
}

a {
    color: var(--accent-color);
    text-decoration: underline dotted;

    &:hover,
    &:focus {
        text-decoration: underline;
    }
}

body a:not([href]) {
    color: inherit;
    text-decoration: none;
}

p,
blockquote,
ul,
ol,
dl,
table,
pre {
    margin-top: 0;
    margin-bottom: 1em;
}
hr {
    background-color: #e1e4e8;
    border: 0;
    height: 0.25rem;
    margin: 2rem 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    margin-top: 1.25rem;
}

h1 tt,
h1 code,
h2 tt,
h2 code,
h3 tt,
h3 code,
h4 tt,
h4 code,
h5 tt,
h5 code,
h6 tt,
h6 code {
    font-size: inherit;
}

h1 {
    border-bottom: 1px solid var(--grey-borders);
    font-size: xx-large;
    padding-bottom: 0.3em;
}
h2 {
    border-bottom: 1px solid var(--grey-borders);
    font-size: x-large;
    padding-bottom: 0.3em;
}
h3 {
    font-size: larger;
}
h4 {
    font-size: large
}
h5 {
    font-size: medium;
}
h6 {
    font-size: medium;
    color: #6a737d;
}

ul,
ol {
    padding-left: 2em;
}

ul ul,
ul ol,
ol ol,
ol ul {
    margin-bottom: 0;
    margin-top: 0;
}
li {
    word-wrap: break-all;
}
li > p {
    margin-top: 1em;
}
li + li {
    margin-top: 0.25rem;
}
dl {
    padding: 0;
}
dl dt {
    font-style: italic;
    font-weight: 600;
    margin-top: 1em;
    padding: 0;
}
dl dd {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

table {
    display: block;
    overflow: auto;
    width: 100%;
}
table th {
    font-weight: 600;
}
table th,
table td {
    border: 1px solid rgb(223, 226, 229);
    padding: 0.5em 1em;
}
table tr {
    background-color: #fff;
    border-top: 1px solid rgb(198, 203, 209);
}
table tr:nth-child(2n) {
    background-color: #f6f8fa;
}
table img {
    background-color: transparent;
}

img {
    background-color: white;
    box-sizing: content-box;
    max-width: 100%;
}
img[align="right"] {
    padding-left: 1.25rem;
}
img[align="left"] {
    padding-right: 1.25rem;
}

code,
tt {
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    margin: 0;
    padding: 0.125em 0.25em;
}
code br,
tt br {
    display: none;
}
del code {
    text-decoration: inherit;
}

.inline-badge {
    max-height: 2em;
    vertical-align: middle;
}
