:root {
    color-scheme: light dark;

    --bg: #f7f7f5;
    --fg: #1d1d1b;
    --muted: #73736d;
    --faint: #a3a39d;
    --line: #d9d9d3;
    --link: #1d1d1b;
    --width: 720px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #171715;
        --fg: #deded8;
        --muted: #92928b;
        --faint: #6d6d67;
        --line: #343430;
        --link: #deded8;
    }
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family:
        ui-monospace,
        "SFMono-Regular",
        "SF Mono",
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Noto Sans Mono CJK TC",
        monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    text-rendering: optimizeLegibility;
}

main {
    width: min(calc(100% - 48px), var(--width));
    margin: 0 auto;
    padding: 96px 0 80px;
}

header {
    margin-bottom: 112px;
}

h1,
h2,
p,
pre {
    margin-top: 0;
}

h1 {
    margin-bottom: 0.4rem;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tagline {
    margin-bottom: 2.5rem;
    color: var(--muted);
}

.intro {
    margin-bottom: 2.25rem;
}

.path {
    margin: 0;
    overflow-x: auto;
    color: var(--fg);
    font: inherit;
    white-space: pre;
}

section {
    margin-bottom: 104px;
}

h2 {
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

p {
    margin-bottom: 1.5rem;
}

.architecture {
    margin: 3rem 0;
    color: var(--fg);
    font: inherit;
    line-height: 1.65;
    white-space: pre;
}

.progress {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.5rem 1.25rem;
    margin: 2.5rem 0 0;
}

.progress dt,
.progress dd {
    margin: 0;
}

.progress dt {
    color: var(--muted);
}

.progress dt.active {
    color: var(--fg);
}

.progress dd {
    min-width: 0;
}

.progress .note {
    color: var(--muted);
}

footer {
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 3rem;
}

a {
    color: var(--link);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

.copyright {
    margin: 0;
    color: var(--faint);
}

@media (max-width: 600px) {
    main {
        width: min(calc(100% - 40px), var(--width));
        padding-top: 56px;
        padding-bottom: 48px;
    }

    header {
        margin-bottom: 80px;
    }

    section {
        margin-bottom: 72px;
    }

    .progress {
        grid-template-columns: 4.75rem 1fr;
        gap: 0.5rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}