:root {
    --bg: #10100f;
    --text: #f3f1ec;
    --text-heading: #f3f1ec;
    --text-muted: #f3f1ec;
    --link: #1088b0;
    --link-hover: #1888b8;
    --site-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --heading-font: ui-serif, "New York", Georgia, "Times New Roman", Times, serif;
    --ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f8fb;
        --text: #111111;
        --text-heading: #111111;
        --text-muted: #111111;
        --link: #1088b0;
        --link-hover: #0d6b88;
    }
}

:root[data-theme="light"] {
    --bg: #f6f8fb;
    --text: #111111;
    --text-heading: #111111;
    --text-muted: #111111;
    --link: #1088b0;
    --link-hover: #0d6b88;
}

:root[data-theme="dark"] {
    --bg: #10100f;
    --text: #f3f1ec;
    --text-heading: #f3f1ec;
    --text-muted: #f3f1ec;
    --link: #1088b0;
    --link-hover: #1888b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

html, body {
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background: var(--bg);
    font-family: var(--site-font);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    word-spacing: normal;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4rem 2rem calc(2rem + env(safe-area-inset-bottom));
    position: relative;
    isolation: isolate;
}

.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--text);
    color: var(--bg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);
}

.skip-link:focus {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 10;
}

main {
    width: 100%;
}

.container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
}

.left {
    flex: 1;
    max-width: 480px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

h1 {
    font-family: var(--heading-font);
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
}

h2 {
    font-family: var(--heading-font);
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-heading);
    margin-bottom: 12px;
}

h3 {
    font-family: var(--heading-font);
    font-style: normal;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.page-list {
    font-family: var(--ui-font);
    list-style: none;
    padding-left: 0;
    text-align: left;
    hyphens: manual;
}

.page-list li {
    margin-bottom: 8px;
}

.page-list li.sf-time {
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 16px;
    font-variant-numeric: tabular-nums;
}


.page-list a,
.page-list .theme-toggle {
    color: var(--text);
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    opacity: 1;
}

.page-list a[aria-current="page"] {
    opacity: 1;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:focus {
    outline: none;
}

.theme-toggle:focus-visible {
    outline: 1px solid var(--text-heading);
    outline-offset: 2px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    font-family: var(--ui-font);
    color: var(--text);
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    opacity: 1;
    font-size: 12px;
    text-align: left;
}

.back-link:hover {
    color: var(--text);
}

section {
    margin-bottom: 40px;
}

section:last-child {
    margin-bottom: 0;
}

.left > article:not([hidden]) > section:last-child {
    margin-bottom: 8px;
}

p {
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--text-muted);
    overflow-wrap: break-word;
}

p:last-child {
    margin-bottom: 0;
}

.last-updated {
    font-family: var(--ui-font);
    font-size: inherit;
    line-height: inherit;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 8px;
    margin-bottom: 0;
    text-align: left;
}

body[data-route="subpage"] .last-updated {
    display: none;
}

a {
    color: var(--text);
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    font-size: inherit;
}

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

.entry {
    margin-bottom: 1.25rem;
    padding-left: 1rem;
}

.entry:last-child {
    margin-bottom: 0;
}

.timeline {
    position: relative;
    padding-left: 1.25rem;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0;
    width: 1px;
    background: var(--text-muted);
    opacity: 0.35;
}

.timeline-item {
    position: relative;
    padding-left: 1rem;
}

.timeline-item h3 {
    font-size: 13px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: -1.43rem;
    width: 0.32rem;
    height: 0.32rem;
    border: 1px solid var(--text-heading);
    background: var(--bg);
    transform: rotate(45deg);
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .left {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

}
