/* Reset
/* ---------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* font-display: optional — once the woff2 is cached (after the first
   visit) it applies with no swap; if it isn't ready yet, the browser
   commits to the fallback font for that paint instead of swapping in
   later, so text never reflows mid-page-load. */
@font-face {
    font-family: Geist-Regular;
    src: url(../../fonts/Geist-Regular.woff2) format("woff2");
    font-display: optional;
}

@font-face {
    font-family: GeistMono-Regular;
    src: url(../../fonts/GeistMono-Regular.woff2) format("woff2");
    font-display: optional;
}

ol, ul {
    list-style: none;
}

ol {
    list-style: decimal;
}

ul {
    list-style-type: disc;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Geist-Regular';
    max-width: 50rem;
    min-height: 100vh;
    margin: 0 auto;
    background-color: var(--color-base);
    color: var(--color-font);
    line-height: 1.65;
    overflow-x: hidden;
}

::selection {
    background: var(--color-content-heading);
    color: var(--color-base);
}

@media (max-width: 980px) {
    body {
        max-width: unset;
        margin: 0 1rem;
    }
}

h1,
h2,
h3,
h4,
h5 {
    margin: 0;
    margin-bottom: 1rem;
}

main {
    flex: 1;
}

a {
    color: var(--color-link);
    overflow-wrap: break-word;
    word-break: break-word;
}

p,
li {
    overflow-wrap: break-word;
}

a:hover {
    color: var(--color-link-hover);
}

code {
    font-family: 'GeistMono-Regular';
    font-size: var(--font-code-size);
    color: var(--color-code);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

table {
    overflow-x: auto;
    width: 100%;
    display: inline-block;
}

input,
button {
    height: 30px;
    background: transparent;
    border: 0;
    font-family: 'Geist-Regular';
    font-size: var(--font-content-size);
    color: var(--color-content-font);
}

input {
    border-bottom: 2px solid var(--color-content-font);
}

button {
    cursor: pointer;

    :hover {
        color: var(--color-link-hover);
    }
}

#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    color: var(--color-content-heading);
    border: none;
    cursor: pointer;
    width: 60px;
    height: 60px;
}