:root {
    --bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #5a5a5a;
    --text-tertiary: #888888;
    --border: var(--text-tertiary);
    --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c0c0e;
        --text-primary: #c9d1d9;
        --text-secondary: #8b949e;
        --text-tertiary: #6e7681;
        --border: var(--text-tertiary);
        --code-bg: #21262d;
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 40px auto;
    padding: 0 20px;
    max-width: 650px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 1.2rem;
    line-height: 1.6;
}

main {
    margin-bottom: 4rem;
}

h1,
h2,
h3,
p,
ul {
    max-width: 62ch;
}

h1 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 1.35em;
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    font-weight: 600;
}

h3 {
    font-size: 1.1em;
    margin-top: 1.6em;
    margin-bottom: 0.4em;
    font-weight: 600;
}

p {
    margin: 0.8em 0;
}

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

a:hover {
    color: var(--text-secondary);
}

header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 3rem;
}

.logo {
    flex: 0 0 auto;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.lead,
.intro,
.h {
    margin-bottom: 3em;
}

ul {
    margin: 0 0 1.2rem;
    padding-left: 1.2rem;
}

li {
    margin: 0 0 0.6rem;
}

code {
    padding: 2px 4px;
    background: var(--code-bg);
    font-family: "Courier New", monospace;
}

.meta {
    margin-bottom: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.9em;
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 4em;
    font-size: 0.9em;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    body {
        font-size: 1.075rem;
    }
}
