* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
}

body {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    color: #ddd;
    background: #111;
}

a {
    color: #8ab4f8;
}

header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

header a {
    color: inherit;
    text-decoration: none;
}

header a:hover {
    text-decoration: underline;
}

nav {
    display: flex;
    gap: 20px;
}

main {
    margin-top: 30px;
}

code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

pre {
    overflow-x: auto;
    padding: 12px 16px;
    background: #1e1e1e;
    border: 1px solid #333;
}

:not(pre) > code {
    padding: 1px 4px;
    background: #1e1e1e;
    border: 1px solid #333;
}

table {
    border-collapse: collapse;
}

th,
td {
    padding: 6px 12px;
    border: 1px solid #333;
    text-align: left;
}

footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid #333;
    font-size: 0.9em;
    color: #999;
}

footer a {
    color: inherit;
}


/* Links that leave the site get an arrow (a mask, so it follows link color).
   Links within the site are relative, so every http link is external. */
a[href^="http"]::after {
    --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M7 7h10v10'/%3E%3C/svg%3E");
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.2em;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask: var(--arrow) no-repeat center / contain;
    mask: var(--arrow) no-repeat center / contain;
}

.menu-toggle,
.menu-button {
    display: none;
}

@media (max-width: 600px) {
    .menu-button {
        display: block;
        font-size: 1.5em;
        line-height: 1;
        cursor: pointer;
        user-select: none;
    }

    nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 12px;
        padding-top: 10px;
    }

    .menu-toggle:checked ~ nav {
        display: flex;
    }
}
