:root {
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-mono: var(--font-serif);
    --paper: #ffffff;
    --ink: #111111;
    --link: #111111;
    --visited: #111111;
    --muted: #5d5d5d;
    --accent-primary: #ff3300;
    --accent-secondary: #ff3300;
    --accent-muted: #5d5d5d;
    --accent-soft: #e3e3e3;
    --hover-highlight: #fff269;
}

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

body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--paper);
    animation: appear 180ms linear;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.1em;
    transition: color 90ms linear, background-color 90ms linear;
}

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

a:hover {
    color: var(--ink);
    background: var(--hover-highlight);
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent-primary);
}

a:focus-visible {
    outline: 2px dashed var(--ink);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.layout {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--ink);
    padding: 10px 6px 10px 14px;
    background: var(--paper);
}

.sidebar li {
    list-style: none;
}

.sidebar h1 {
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 600;
    line-height: 0.82;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.sidebar h1 a,
.sidebar h1 a:visited {
    color: var(--ink);
    text-decoration: none;
    background: none;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav li {
    margin-bottom: 3px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: lowercase;
}

.sidebar nav a,
.sidebar .rwl-years a,
.sidebar .rwl-sections a,
.sidebar summary {
    color: var(--ink);
    background: none;
    text-decoration: none;
}

.sidebar nav a:hover,
.sidebar .rwl-years a:hover,
.sidebar .rwl-sections a:hover,
.sidebar .rwl-sections a.is-active {
    background: var(--hover-highlight);
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
    color: var(--ink);
}

.sidebar .mobile-nav {
    display: none;
}

.sidebar details {
    display: block;
}

.sidebar summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.sidebar summary::-webkit-details-marker,
.sidebar summary::marker {
    display: none;
}

.sidebar summary::before {
    content: '+ ';
    color: var(--accent-secondary);
}

.sidebar details[open] summary::before {
    content: '- ';
}

.sidebar .rwl-years {
    list-style: none;
    margin: 3px 0 0 9px;
    padding: 0;
}

.sidebar .rwl-years li {
    margin-bottom: 0;
    font-size: 12px;
}

.sidebar .rwl-year-item {
    margin-bottom: 0.1rem;
}

.sidebar .rwl-year-item details {
    margin: 0;
}

.sidebar .rwl-year-summary {
    font-size: 12px;
}

.sidebar .rwl-year-summary::after {
    content: ' +';
    color: var(--accent-secondary);
}

.sidebar .rwl-year-item details[open] .rwl-year-summary::after {
    content: ' -';
}

.sidebar .rwl-sections {
    list-style: none;
    margin: 0.16rem 0 0.24rem 0.75rem;
    padding: 0;
}

.sidebar .rwl-sections li {
    margin-bottom: 0.06rem;
    font-size: 11px;
}

.sidebar .rwl-sections a {
    color: var(--accent-muted);
}

.content {
    padding: 14px 22px 34px;
    max-width: none;
}

.content header {
    margin-bottom: 10px;
}

.content header .year-label {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 5.2vw, 3.5rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--accent-primary);
    text-transform: uppercase;
}

section {
    border-top: 1px solid var(--accent-soft);
    padding-top: 8px;
    margin-bottom: 32px;
}

section h2 {
    display: none;
}

section > p:first-of-type {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.06;
    margin-bottom: 10px;
    padding-top: 0.05em;
    padding-bottom: 0.03em;
    text-transform: uppercase;
}

section p.addendum {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 8px;
}

section p.count {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-secondary);
    margin-top: 6px;
    margin-bottom: 10px;
}

section ul,
section ol {
    list-style: none;
    padding-left: 0;
}

section ul + ul {
    margin-top: 10px;
}

section ol {
    counter-reset: entry-counter;
}

section li {
    margin-bottom: 8px;
    font-size: 35px;
    line-height: 0.97;
    letter-spacing: -0.02em;
    max-width: 40ch;
    padding-top: 0.03em;
    padding-bottom: 0.02em;
    transition: none;
}

section .markdown-list {
    margin: 0;
}

section .dated-list li,
section .numbered-list li {
    display: grid;
    grid-template-columns: 3rem 1fr;
    align-items: start;
    column-gap: 0.45rem;
    margin-bottom: 10px;
    overflow: visible;
}

section .dated-list .entry-date,
section .numbered-list li::before {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--accent-muted);
    line-height: 1.6;
}

section .numbered-list li {
    counter-increment: entry-counter;
}

section .numbered-list li::before {
    content: '[' counter(entry-counter, decimal-leading-zero) ']';
}

section .dated-list .entry-body {
    min-width: 0;
}

section.films .dated-list li,
section.shows .dated-list li {
    margin-bottom: 12px;
}

section.films li,
section.shows li {
    font-size: 31px;
    line-height: 0.99;
}

section.films .dated-list .entry-body,
section.shows .dated-list .entry-body {
    line-height: 1.02;
    padding-top: 0.06em;
    padding-bottom: 0.05em;
}

section :target {
    background: #f5f3ff;
    outline: 1px dashed var(--accent-soft);
    outline-offset: 2px;
}

footer {
    margin-top: 24px;
    padding-top: 8px;
    border-top: 1px solid var(--accent-soft);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

footer p {
    margin: 0;
}

footer a,
footer a:visited {
    color: inherit;
    background: none;
}

.recent-updates {
    margin: 0;
}

.recent-updates-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
    padding: 0 0 6px;
    border-bottom: 1px solid var(--accent-soft);
}

.recent-file-block {
    border-bottom: 1px solid #e8e0f4;
    margin-bottom: 7px;
    padding-bottom: 5px;
}

.recent-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.file-name {
    color: var(--ink);
}

.file-section {
    color: var(--accent-secondary);
}

.file-date {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.file-summary {
    font-family: var(--font-serif);
    font-size: 26px;
    line-height: 0.96;
    letter-spacing: -0.01em;
    color: var(--ink);
}

@media (max-width: 768px) {
    .layout {
        display: block;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--accent-soft);
        z-index: 30;
        padding: 10px 8px;
    }

    .sidebar h1 {
        font-size: 38px;
        margin-bottom: 6px;
    }

    .sidebar > nav:not(.mobile-nav) {
        display: none;
    }

    .sidebar .mobile-nav {
        display: block;
    }

    .mnav-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 8px;
        align-items: baseline;
    }

    .mnav-main {
        flex-wrap: nowrap;
        overflow: visible;
        gap: 6px 7px;
    }

    .mnav-years {
        margin-top: 8px;
    }

    .mnav-sections {
        margin-top: 4px;
    }

    .mnav-main a,
    .mnav-years a,
    .mnav-sections a,
    .mnav-rwl-link {
        font-family: var(--font-mono);
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0;
        white-space: nowrap;
        color: var(--ink);
        text-decoration: none;
        background: none;
        text-transform: lowercase;
    }

    .mnav-main a:hover,
    .mnav-years a:hover,
    .mnav-sections a:hover,
    .mnav-rwl-link:hover,
    .mnav-rwl-link.is-open,
    .mnav-years a.is-active {
        background: var(--hover-highlight);
        text-decoration: underline;
        text-decoration-color: var(--accent-primary);
        color: var(--ink);
    }

    .content {
        padding: 12px 10px 22px;
    }

    .content header .year-label {
        font-size: clamp(1.35rem, 9.2vw, 2.3rem);
    }

    section {
        margin-left: 0;
        margin-bottom: 26px;
    }

    section > p:first-of-type {
        font-size: 19px;
        line-height: 1.05;
        padding-top: 0.04em;
        padding-bottom: 0.02em;
    }

    section li {
        font-size: 27px;
        line-height: 1;
        padding-top: 0.02em;
        padding-bottom: 0.01em;
    }

    section .dated-list li,
    section .numbered-list li {
        grid-template-columns: 2.7rem 1fr;
        column-gap: 0.42rem;
    }

    section.films .dated-list .entry-body,
    section.shows .dated-list .entry-body {
        line-height: 1.04;
        padding-top: 0.04em;
        padding-bottom: 0.04em;
    }

    section.films li,
    section.shows li {
        font-size: 24px;
        line-height: 1.01;
    }

    section .dated-list .entry-date,
    section .numbered-list li::before {
        font-size: 10px;
    }

}

@keyframes appear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
