:root {
    color-scheme: light dark;
    --bg-color: #f5f5f5;
    --text-color: #000;
    --muted-color: #666;
    --link-color: #0066cc;
    --link-hover: #004499;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --muted-color: #999;
        --link-color: #38bdf8;
        --link-hover: #7dd3fc;
    }
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg-color: #f5f5f5;
    --text-color: #000;
    --muted-color: #666;
    --link-color: #0066cc;
    --link-hover: #004499;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --muted-color: #999;
    --link-color: #38bdf8;
    --link-hover: #7dd3fc;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 2rem max(1.25rem, calc((100vw - 64rem) / 2));
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Inter", sans-serif;
    line-height: 1.5;
}

main {
    flex: 1;
}

.intro {
    margin-bottom: 2.5rem;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

h1 {
    margin-block: 0.67em;
}

h2 {
    margin-bottom: 0.5rem;
}

h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

p {
    margin-top: 0;
}

.lede {
    max-width: 45rem;
}

.companion {
    width: 60px;
    height: 60px;
}

.theme-toggle {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.theme-toggle:focus-visible {
    border-radius: 0.25rem;
    outline: 2px solid var(--link-color);
    outline-offset: 3px;
}

section {
    margin-block: 2.5rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--link-hover);
    border-bottom-color: currentColor;
}

a:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 3px;
}

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

.results-table-wrapper {
    margin-block: 1rem;
    overflow-x: auto;
}

.data-table,
.course-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td,
.course-list th,
.course-list td {
    padding: 0.45rem 1.25rem 0.45rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text-color) 14%, transparent);
    text-align: left;
    white-space: nowrap;
}

.data-table th,
.course-list th {
    color: var(--muted-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.course-list th:first-child,
.course-list td:first-child {
    width: 7rem;
}

.vgc-results th:first-child,
.vgc-results td:first-child {
    width: 4.5rem;
}

.vgc-results th:nth-child(2),
.vgc-results td:nth-child(2) {
    width: 4.5rem;
}

.data-table tbody tr:last-child td,
.course-list tbody tr:last-child td {
    border-bottom: 0;
}

.games-table th:last-child,
.games-table td:last-child {
    width: 4.5rem;
    text-align: right;
}

.music-table th:first-child,
.music-table td:first-child {
    width: 10rem;
}

.interest + .interest {
    margin-top: 2rem;
}

.interest p {
    margin-bottom: 0;
}

.article-meta,
footer {
    color: var(--muted-color);
    font-size: 0.85rem;
}

footer {
    padding-top: 2rem;
    text-align: center;
}

@media (max-width: 36rem) {
    body {
        padding-top: 1rem;
    }

    .course-list th:last-child,
    .course-list td:last-child,
    .music-table th:last-child,
    .music-table td:last-child {
        white-space: normal;
    }

    .course-list td:last-child {
        min-width: 13rem;
    }

    .music-table td:last-child {
        min-width: 14rem;
    }
}
