/* Structure shared by every theme. Themes set the variables and adjust details. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light dark; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--size, 1.0625rem); line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--h1, 2rem); margin: 0 0 1rem; }
.wrap { max-width: var(--measure, 42rem); margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 0.5rem; left: 0.5rem; background: var(--bg); padding: 0.5rem 1rem; z-index: 10; }

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.site-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--fg); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.92rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
main { padding-top: 2.25rem; padding-bottom: 3rem; min-height: 60vh; }
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; padding: 1.5rem 0 2.5rem; }
.site-footer p { margin: 0.2rem 0; }
.site-footer .notice { margin: 0.6rem auto; max-width: 34rem; text-wrap: balance; }

/* Filter: plain radio buttons, no script. */
.filter { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0 0 1.75rem; font-size: 0.92rem; color: var(--muted); }
.filter label { cursor: pointer; }
.filter input { accent-color: var(--accent); margin-right: 0.3em; }
main:has(#f-ep:checked) .item--post, main:has(#f-post:checked) .item--episode { display: none; }
main:has(#f-ep:checked) .year:not(:has(.item--episode)), main:has(#f-post:checked) .year:not(:has(.item--post)) { display: none; }

.item__meta { margin: 0; font-size: 0.82rem; color: var(--muted); }
.kind, .dur, .by { margin-left: 0.6em; }
.item--post .kind { opacity: 0.75; }
.stream .item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.15rem 0; border-top: 1px solid var(--rule); }
.stream .item:first-child { border-top: 0; padding-top: 0; }
.item__thumb-link { display: block; width: 72px; }
.item__thumb { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius, 0); background: var(--rule); }
.item__title { font-size: 1.2rem; margin: 0.15rem 0 0.3rem; }
.item__title a { color: var(--fg); text-decoration: none; }
.item__title a:hover { color: var(--accent); text-decoration: underline; }
.item__summary { margin: 0; color: var(--soft); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more, .lede { color: var(--muted); }
.more { margin-top: 2rem; }

.years { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin-bottom: 1.5rem; font-size: 0.92rem; }
.year h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.75rem; padding: 0.28rem 0; align-items: baseline; }
.row .item__meta { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .kind { display: inline-block; min-width: 3.9em; }
.row__title { color: var(--fg); text-decoration: none; }
.row__title:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 34rem) { .row { grid-template-columns: 1fr; gap: 0; padding: 0.45rem 0; } }

.entry__header { margin-bottom: 1.75rem; }
.entry__header h1 { margin-top: 0.35rem; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 1.25rem 0 0; }
.player audio { flex: 1 1 16rem; width: 100%; min-width: 0; }
.player__dl { font-size: 0.85rem; color: var(--muted); }
figure.player { display: block; margin: 1.5rem 0; }
figure.player figcaption { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.4rem; margin: 2em 0 0.6em; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 0.5em; }
.prose img { display: block; margin: 1.75rem auto; border-radius: var(--radius, 0); }
.prose blockquote { margin-left: 0; padding-left: 1.1rem; border-left: 3px solid var(--accent); color: var(--soft); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.25rem 0; }
.prose pre { overflow-x: auto; padding: 1rem; background: var(--tint); font-size: 0.88rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 0.3rem 1.25rem 0.3rem 0; border-bottom: 1px solid var(--rule); }
.embed a { display: inline-block; padding: 0.55rem 0.95rem; border: 1px solid var(--rule); border-radius: var(--radius, 0); text-decoration: none; }
.embed a::before { content: "▸ "; color: var(--accent); }
.entry__series { color: var(--muted); font-size: 0.92rem; margin-top: 2rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.pager a { text-decoration: none; color: var(--fg); }
.pager a:hover { color: var(--accent); }
.pager span { display: block; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pager__newer { text-align: right; }

.search-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.search-form input { flex: 1; min-width: 0; font: inherit; padding: 0.55rem 0.75rem; color: var(--fg); background: var(--bg); border: 1px solid var(--muted); border-radius: var(--radius, 0); }
.search-form button { font: inherit; padding: 0.55rem 1.1rem; color: var(--bg); background: var(--fg); border: 1px solid var(--fg); border-radius: var(--radius, 0); cursor: pointer; }
.results { list-style: none; margin: 0; padding: 0; }
.results .item { padding: 1rem 0; border-top: 1px solid var(--rule); }
mark { background: var(--mark); color: inherit; padding: 0 0.1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row .dur { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

/* Ledger: a quiet reading page. Serif text on warm paper, no pictures in lists. */
:root {
  --bg: #faf6ee; --fg: #1f1b16; --soft: #4a433a; --muted: #7a7164; --rule: #e2dacb; --tint: #f1ebdf;
  --link: #1f1b16; --accent: #8a2b1d; --mark: #f3dfa2;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-head: var(--font-body);
  --measure: 39rem; --size: 1.125rem; --h1: 2.15rem;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171410; --fg: #ebe4d6; --soft: #c4baa8; --muted: #94897a; --rule: #332d25; --tint: #211d17; --link: #ebe4d6; --accent: #e08a6f; --mark: #5c4a14; }
}
.site-header { border-bottom: 0; }
.site-header .wrap { flex-direction: column; align-items: center; padding-top: 2.5rem; padding-bottom: 0.5rem; }
.site-title { font-size: 1.6rem; font-weight: 400; letter-spacing: 0.01em; }
.site-nav, .item__meta, .filter, .pager span { font-variant-caps: all-small-caps; letter-spacing: 0.06em; font-size: 0.95rem; }
.site-nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.35rem 1.5rem; margin-top: 0.75rem; }
h1 { font-weight: 400; }
.stream .item { grid-template-columns: 1fr; }
.item__thumb-link { display: none; }
.item__title { font-weight: 400; font-size: 1.4rem; }
.item--episode .kind { color: var(--accent); }
.year h2 { font-weight: 400; font-style: italic; }
.entry__header { text-align: center; }
.entry__header .player { justify-content: center; }
.prose > p:first-of-type::first-letter { font-size: 3.1em; float: left; line-height: 0.85; padding: 0.08em 0.08em 0 0; color: var(--accent); }
.site-footer { text-align: center; font-style: italic; }
