html {
    color-scheme: dark light;
}

body {
    max-width: min(80ch, 100% - 4rem);
    margin-inline: auto;
    font-family: system-ui;
    font-size: 1.25rem;
    line-height: 1.5;
}

h2 {
    counter-increment: h2counter;
    counter-reset: h3counter;
}

h3 {
    counter-increment: h3counter;
    counter-reset: h4counter;
}

h4 {
    counter-increment: h4counter;
}

h2:before{
    content: counter(h2counter) "\00a0\00a0\00a0\00a0\00a0";
}

h3:before{
    content: counter(h2counter) "." counter(h3counter) "\00a0\00a0\00a0\00a0\00a0";
}

h4:before{
    content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "\00a0\00a0\00a0\00a0\00a0";
}

img {
    max-width: 100%;
    display: block;
}

figure {
    margin: 0;
}

figcaption {
    text-align: center;
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 1rem;
}

pre {
    background-color: #1F2937;
    color: #E5E7EB;
    border-radius: 20px;
    padding: 1.25rem;
    overflow-x: auto;
    line-height: 1.3;
}

code {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
}

footer {
    margin-top:2rem;
    margin-bottom:2rem;
    font-size: 0.95rem;
}

.logo {
    padding:0;
    object-fit: contain;
    flex-shrink: 0;
    width:2.4rem;
}

.github {
    padding:0;
    object-fit: contain;
    width:1.5rem;
}

header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top:2rem;
    margin-bottom:2rem;
    flex-wrap:wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    font-weight: bolder;
    color: inherit;
}

nav {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

nav a {
    text-decoration: none;
    font-weight: bolder;
    color: inherit;
}

.menu {
    font-size:2.3rem;
    font-weight:bolder;
}

.menu::before {
    content:"☰";
}

#nav-toggle, .menu {
    display: none;
    margin-left:auto;
}

#nav-toggle:checked + .menu::before {
    content:"✕";
}

/* Mobile */
@media (max-width: 768px) {
    .menu {
        display: block;
        cursor: pointer;
        order:1;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order:2;
    }

    #nav-toggle:checked ~ nav {
        display: flex;
        margin-top:1rem;
    }
}

a {
    color: #3B82F6;
}

a:hover {
    color: #60A5FA;
}

.block {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    font-size:1rem;
    animation: blink 1.5s steps(1, start) infinite;
}

.asciinema-player-theme-dracula {
    --term-color-background: #1F2937;
    --term-color-foreground: #E5E7EB;
}

@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    50.01%,
    100% {
        opacity: 0;
    }
}

table {
    width: 100%;
    border-spacing: 0;
}

table th,
table td {
    border-bottom: 1px solid light-dark(#e5e7eb, #374151);
    border-right: 1px solid light-dark(#e5e7eb, #374151);
    padding: 1.25rem;
}

table th {
    text-align: left;
    font-weight: bold;
}

/* top edge */
table tr:first-child th,
table tr:first-child td {
    border-top: 1px solid light-dark(#e5e7eb, #374151);
}

/* left edge */
table th:first-child,
table td:first-child {
    border-left: 1px solid light-dark(#e5e7eb, #374151);
}

/* corners - top */
table tr:first-child th:first-child {
    border-top-left-radius: 20px;
}

table tr:first-child th:last-child {
    border-top-right-radius: 20px;
}

/* corners - bottom */
table tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
}

table tr:last-child td:last-child {
    border-bottom-right-radius: 20px;
}
