:root {
    --text: #111;
    --background: #fff;
    --accent: #777;
}

body {
    color: var(--text);
    background: var(--background);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
    margin: 0;
}

.layout {
    display: flex;
    flex-direction: column;
    gap: 10rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.archive-main { width: 80%; }
main { width: 60%; }

.sidebar { top: 1.25rem; align-self: start; }
.sidebar h1 { margin: 0 0 0.5em 0; }
.sidebar nav { display: flex; flex-direction: column; gap: 0.25em; }
.sidebar a { color: inherit; text-decoration: none; }
.sidebar a:hover { text-decoration: underline; }
.page-description { font-size: 0.85em; font-family: monospace; margin-bottom: 1rem; }

h1, h2 { font-size: 1em; font-weight: normal; margin: 0 0 0.25em 0; }
main h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.6em;
    transform: scaleX(0.7);
    transform-origin: left center;
    margin: 1.5em 0 0.5em 0;
}
main h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2.2em;
    font-weight: normal;
    transform: scaleX(0.7);
    transform-origin: left center;
    line-height: normal;
    margin: 0 0 0.75em 0;
}

a { color: inherit; text-decoration: underline; }
a:hover { text-decoration: underline; }

.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding: 0.25rem 0;
}
.archive-list li:first-child { padding-top: 0; }
.archive-list a { font-weight: normal; text-decoration: none; }
.archive-list a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.4em;
    display: inline-block;
    transform: scaleX(0.7);
    transform-origin: left center;
}
.archive-list a:hover { text-decoration: underline; }
.archive-list .meta { font-size: 0.8em; color: var(--accent); }

.summary { font-size: 0.85em; font-family: monospace; }
.meta-line { font-size: 0.85em; font-family: monospace; margin-bottom: 1em; }

.tags-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 5rem 0; }
.tags-filter button {
    font-size: 0.85em;
    font-family: monospace;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.1rem 0.1rem;
    cursor: pointer;
}
.tags-filter button.active { background: var(--text); color: var(--background); border-color: var(--text); }

.footnote-ref { text-decoration: none; font-size: 0.9em; vertical-align: super; cursor: pointer; pointer-events: auto; position: relative; z-index: 1; }
/* Support both .footnotes (Python-Markdown default) and .footnote */
.footnotes, .footnote { border-top: 1px solid var(--accent); margin-top: 5rem; padding-top: 1.25rem; font-size: 0.95em; }
.footnotes ol, .footnote ol { margin: 0.5rem 0 0 1.25rem; }
.footnotes li, .footnote li { margin-bottom: 0.25rem; }
/* Hide the hr that Python-Markdown inserts to avoid double borders */
.footnotes hr, .footnote hr { display: none; }
.footnote-backref { display: none; }

.screen-dots { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.screen-dots .dot {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.001);
    -webkit-backdrop-filter: invert(1);
    backdrop-filter: invert(1);
}
.screen-dots .dot { will-change: transform; }

@supports not (mix-blend-mode: difference) {
    .screen-dots .dot { background: var(--text); }
}
.screen-dots .dot-top { top: 15px; left: 50%; transform: translate(-50%, -50%); }
.screen-dots .dot-bottom { bottom: 15px; left: 50%; transform: translate(-50%, 50%); }
.screen-dots .dot-left { left: 15px; top: 50%; transform: translate(-50%, -50%); }
.screen-dots .dot-right { right: 15px; top: 50%; transform: translate(50%, -50%); }

/* Responsive containers */
@media (max-width: 900px) {
    .archive-main,
    main { width: 100%; }
}

@media (max-width: 700px) {
    .archive-main,
    main { width: 100%; }
}