:root {
  --bg: #fbfaf7;
  --text: #1f1d1a;
  --muted: #6f6a62;
  --rule: #e4e0d8;
  --accent: #8a3b12;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --text: #e9e5dd;
    --muted: #9b958b;
    --rule: #2e2b27;
    --accent: #e0956a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 3rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

.site-header { margin-bottom: 4rem; }
.site-name {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: 2.1rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.75rem 0 0.75rem; }

.intro p { font-size: 1.25rem; color: var(--muted); margin-top: 0; }
.posts h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list a { text-decoration: none; font-size: 1.2rem; }
.post-list a:hover { text-decoration: underline; }
.post-list time, .post-meta {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.post-header { margin-bottom: 2.5rem; }
.subtitle { font-style: italic; color: var(--muted); margin: 0 0 0.75rem; font-size: 1.2rem; }
.post-meta { margin: 0; white-space: normal; }
.post-meta span { margin: 0 0.35em; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.toc { display: none; }
@media (min-width: 76rem) {
  .toc:not([hidden]) {
    display: block;
    position: fixed;
    top: 9rem;
    left: calc(50% - 20rem - 16rem);
    width: 13rem;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    font-family: var(--sans);
    font-size: 0.85rem;
    line-height: 1.4;
  }
}
.toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li + li { margin-top: 0.15rem; }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.25rem 0 0.25rem 0.9rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease;
}
.toc a:hover { color: var(--text); }
.toc a[aria-current] { color: var(--text); border-left-color: var(--accent); }
.post-body h2 { scroll-margin-top: 2rem; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc a { transition: none; }
}
.post-body p { margin: 0 0 1.25rem; }
.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}
.post-body blockquote cite { display: block; font-style: normal; font-family: var(--sans); font-size: 0.85rem; margin-top: 0.4rem; }
.post-body .premises {
  list-style: none;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.post-body .premises li + li { margin-top: 0.5rem; }
.back { margin-top: 3rem; font-family: var(--sans); font-size: 0.9rem; }

.site-footer {
  margin-top: 5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; padding-top: 2rem; }
  h1 { font-size: 1.75rem; }
  .post-list li { flex-direction: column; gap: 0.15rem; }
}
