:root {
  --fg: #1d1d1f; --muted: #5b5b66; --bg: #fdfcf8; --accent: #7a3e0e; --line: #e3dfd4; --code: #f3f0e8;
  --measure: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root { --fg: #e8e6e1; --muted: #a9a59c; --bg: #16150f; --accent: #e0a96d; --line: #34312a; --code: #24221b; }
}
* { box-sizing: border-box; }
html { font-size: 112.5%; }
body { margin: 0; color: var(--fg); background: var(--bg);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: .15em; }
.site-header { border-bottom: 1px solid var(--line); padding: 1rem; }
.site-header .brand { font-size: 1.4rem; font-weight: bold; color: var(--fg); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .5rem; font-size: .9rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a[aria-current="page"] { text-decoration: underline; }
.content { max-width: var(--measure); margin: 0 auto; padding: 1rem; }
.site-footer { max-width: var(--measure); margin: 2rem auto 0; padding: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
h1 { font-size: 1.8rem; line-height: 1.25; }
h2, h3, h4, h5 { line-height: 1.3; margin-top: 1.8em; }
img, svg { max-width: 100%; height: auto; }
pre { background: var(--code); padding: .8rem; overflow-x: auto; font-size: .85rem; line-height: 1.4; }
code { font-size: .9em; }
table { border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: .3rem .6rem; vertical-align: top; }
blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--line); color: var(--muted); }
.math.display { display: block; overflow-x: auto; overflow-y: hidden; }
.katex-display { margin: .8em 0; }
.home img { display: block; margin: 0 auto 1.5rem; }
/* preview images on /apologies/ and /miniatures/ */
img[src*="/files/apologies/img/"], img[src*="/files/miniatures/img/"] { max-width: 24rem; border: 1px solid var(--line); display: block; margin: .3rem 0 1.5rem; }
