:root {
    --bg: #1d1d1d;
    --text: #fafafa;
    --meta: #b7b7c0;
    --link: #12e6d1;
    --divider: #3b3b3f;
    --maxw: 900px;
    color-scheme: dark;
}

/* Layout baseline */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* Header */

.site-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--divider);
}

h1 {
    font-size: 1.75rem;
    margin: 0 0 .25rem;
    line-height: 1.2;
}

main h2 {
    margin: 1.5rem 0 .5rem;
    font-size: 1.15rem;
}

/* Meta */

.meta {
    font-size: .9rem;
    color: var(--meta);
    margin: 0 0 .75rem;
}

/* Skip link */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: .5rem 1rem;
    background: #fff;
    color: #000;
    border-radius: .25rem;
}

/* Navigation */

nav {
    margin: 1.25rem 0;
    padding: .9rem 1rem;
    border-radius: .5rem;
    border: 1px solid var(--divider);
    font-size: .95rem;
}

.nav-title {
    font-weight: 600;
    display: block;
    margin-bottom: .5rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    gap: .35rem;
}

nav li {
    break-inside: avoid;
}

nav a {
    color: var(--link);
    text-decoration: none;
}

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

/* Typography */

p {
    margin: .35rem 0 .6rem;
    max-width: 70ch;
}

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

a {
    color: var(--link);
}

a:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
    text-decoration: underline;
}

/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
    margin: .5rem 0 1rem;
    font-size: .95rem;
}

th, td {
    padding: .4rem .5rem;
    border: 1px solid var(--divider);
    text-align: left;
    vertical-align: top;
}

th {
    font-weight: 600;
}

/* SR-only helper */

.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

/* Footer */

footer {
    margin-top: 2.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--divider);
    font-size: .85rem;
    color: var(--meta);
}

/* Responsive table */

.responsive-table td::before {
    content: none;
}

@media (max-width: 640px) {
    .container {
        padding: 2rem 1.25rem 3rem;
    }

    nav ul {
        columns: 1;
    }

    .responsive-table {
        border: 0;
    }

    .responsive-table thead {
        position: absolute !important;
        height: 1px;
        width: 1px;
        overflow: hidden;
        clip: rect(1px, 1px, 1px, 1px);
        white-space: nowrap;
        border: 0;
        padding: 0;
        margin: -1px;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .responsive-table tbody tr {
        border: 1px solid var(--divider);
        border-radius: .35rem;
        padding: .6rem .7rem;
        margin-bottom: .8rem;
    }

    .responsive-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .responsive-table td {
        border: 0;
        padding: .25rem 0;
        text-align: left;
    }

    .responsive-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: .8rem;
        color: var(--meta);
        margin-bottom: .1rem;
    }

    .responsive-table td span {
        display: block;
    }
}
