* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --text: #1a1a2e;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --accent: #16a34a;
    --bg: #ffffff;
    --bg-section: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #e0e0e0;
    --pre-bg: #1e293b;
    --pre-text: #e2e8f0;
    --code-bg: #e2e8f0;

    @media (prefers-color-scheme: dark) {
        --text: #fafafa;
        --text-muted: #a1a1aa;
        --text-dim: #71717a;
        --accent: #22c55e;
        --bg: #09090b;
        --bg-section: #18181b;
        --border: #27272a;
        --border-strong: #27272a;
        --pre-bg: #000000;
        --pre-text: #e4e4e7;
        --code-bg: #27272a;
    }
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-strong);
}

h1 {
    font-size: 2.5rem;
    color: var(--accent);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

h3 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: .8rem;
}

a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;

    &:hover {
        color: var(--accent);
    }
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: .3rem;
}

nav {
    margin-top: 1.5rem;

    a {
        color: var(--accent);
        text-decoration: none;
        margin: 0 .8rem;
        font-weight: 500;

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

main {
    margin-bottom: 3rem;
}

section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-section);
    border-radius: 8px;
    border: 1px solid var(--border);

    p,
    ul,
    pre {
        margin-bottom: .8rem;
    }

    ul,
    ol {
        margin-left: 1rem;
    }

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

        li {
            padding-left: 2em;

            &::before {
                content: "✓";
                color: var(--accent);
                margin-inline-start: -1.5em;
                position: absolute;
            }
        }

    }
}

ul.toc {
    list-style: none;
    padding: 0;
    margin-bottom: 2.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;

    li {
        margin-bottom: .3rem;
    }

    a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: .9rem;

        &:hover {
            color: var(--accent);
            text-decoration: underline;
        }
    }
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-top: .8rem;

    input {
        display: none;
    }

    label {
        padding: .4rem 1rem;
        cursor: pointer;
        order: 1;
        border: 1px solid var(--border);
        border-radius: 6px 6px 0 0;
        margin-right: .25rem;
        margin-bottom: -1px;
        background: var(--bg-section);
        color: var(--text-muted);
        font-size: .85rem;
        position: relative;
        z-index: 1;
    }

    input:checked+label {
        color: var(--accent);
        border-bottom-color: var(--bg-section);
        background: var(--bg);
    }

    input:checked+label+.tab-content {
        display: block;
    }

    .tab-content {
        display: none;
        width: 100%;
        order: 2;
        border: 1px solid var(--border);
        border-radius: 0 6px 6px 6px;

        pre {
            border-radius: 0 6px 6px 6px;
            margin: 0;
        }
    }
}

pre {
    background: var(--pre-bg);
    color: var(--pre-text);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: .9rem;

    code {
        background: none;
        padding: 0;
    }
}

code {
    background: var(--code-bg);
    padding: .15rem .4rem;
    border-radius: 3px;
    font-size: .9rem;
}

pre.mermaid {
    background: none;
    text-align: center;
    overflow-x: auto;

    svg {
        max-width: 100%;
        height: auto;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: .8rem 0;
}

th,
td {
    text-align: left;
    padding: .5rem .8rem;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-muted);
}

footer {
    text-align: center;
    color: var(--text-dim);
    font-size: .85rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-strong);
}