:root {
    --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    --bg: oklch(20% 0.012 255);
    --ink: oklch(92% 0.006 255);
    --text-body: oklch(80% 0.008 255);
    --text-muted: oklch(65% 0.01 255);
    --text-faint: oklch(58% 0.01 255);
    --text-very-faint: oklch(50% 0.01 255);
    --border: oklch(32% 0.012 255);
    --border-faint: oklch(27% 0.012 255);
    --accent: oklch(68% 0.1 190);
    --accent-text: oklch(72% 0.1 190);
    --accent-soft: oklch(28% 0.04 190);
    --accent-code-text: oklch(75% 0.09 190);
    --check-empty: oklch(38% 0.012 255);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 64px;
    --space-10: 80px;
    --page-padding-x: 24px;
    --page-padding-top: 72px;
    --page-padding-bottom: 64px;
    --content-max-width: 760px;
}

/* Typography tokens — each defined once, shared by the .type-* utility class
   and every semantic selector that needs that variant. */
.type-h1,
article h1 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 44px;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.type-h2,
article h3 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.3;
}

.type-label,
article h2,
article h4,
thead th {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.type-body,
body,
p,
li {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.6;
}

.type-meta,
footer {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--page-padding-top) var(--page-padding-x) var(--page-padding-bottom);
    background: var(--bg);
    color: var(--ink);
}

p,
li {
    color: var(--text-body);
}

a {
    color: var(--accent-text);
}

article h1 {
    margin: 0 0 20px;
}

article h3 {
    color: var(--ink);
    margin: var(--space-6) 0 var(--space-2);
}

article h4 {
    color: var(--text-body);
    margin: var(--space-5) 0 10px;
}

table {
    position: relative;
    box-sizing: border-box;
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

table::before,
table::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
}

table::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

table::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

thead th {
    color: var(--text-muted);
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 11px 14px;
    text-align: left;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-faint);
}

tbody tr:last-child td {
    border-bottom: none;
}

table {
    display: block;
}

@media (max-width: 700px) {
    table {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }

    table::-webkit-scrollbar {
        height: 6px;
    }

    table::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }
}

.sup {
    display: inline-block;
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.sup--yes {
    background: var(--accent);
}

.sup--no {
    border: 1px solid var(--check-empty);
}

/* code intentionally skips .type-meta's uppercase transform — snippets must render verbatim */
code {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 0.1rem 0.3rem;
    background: var(--accent-soft);
    color: var(--accent-code-text);
    border-radius: 3px;
}

pre {
    font-family: var(--font-mono);
    padding: 1rem;
    overflow-x: auto;
    background: var(--accent-soft);
    border-radius: 6px;
}

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

article {
    counter-reset: section;
}

article h2 {
    counter-increment: section;
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: var(--space-8) 0 var(--space-5);
    color: var(--text-muted);
}

article h2::before {
    content: counter(section, decimal-leading-zero);
    color: var(--accent);
}

article h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

footer {
    margin-top: var(--space-10);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    opacity: 0.7;
}
