:root {
  --bg: #fbfaf7;
  --text: #1f1d1a;
  --muted: #7a766f;
  --rule: #e6e1d6;
  --accent: #b34a2c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --text: #e8e4dc;
    --muted: #807a70;
    --rule: #2a2823;
    --accent: #d97a55;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

@media (min-width: 720px) {
  main { padding: 6rem 1.5rem 7rem; }
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.005em; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }

h2 {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }

.lede { font-size: 1.0625rem; }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease, color 120ms ease;
}

a:hover { color: var(--accent); text-decoration-color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

header { margin-bottom: 3.5rem; }

section { margin-bottom: 3.5rem; }

.back {
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
}

.back a {
  color: var(--muted);
  text-decoration-color: transparent;
}

.back a::before { content: "\2190 \00a0"; }

.entries {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entries li { border-top: 1px solid var(--rule); }
.entries li:last-child { border-bottom: 1px solid var(--rule); }

.entries li a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.95rem 0;
  text-decoration: none;
  color: var(--text);
}

.entries .name { font-weight: 500; }

.entries .meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  color: var(--muted);
  align-self: center;
  white-space: nowrap;
}

.entries li a:hover .name { color: var(--accent); }

.ext {
  font-size: 0.78em;
  color: var(--muted);
  margin-left: 0.15em;
  vertical-align: 0.08em;
}

.quiet { color: var(--muted); }

footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

footer p { margin: 0; }

article h1 { font-size: 1.65rem; margin-bottom: 0.5rem; }

article .meta-line {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

article .meta-line a { color: var(--muted); text-decoration-color: transparent; }
article .meta-line a:hover { color: var(--accent); text-decoration-color: var(--accent); }
article .meta-line a:hover .ext { color: var(--accent); }

article p, article ul, article ol { margin: 0 0 1.25rem; }
article ul, article ol { padding-left: 1.25rem; }

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--rule);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

article pre {
  background: var(--rule);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 3px;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

article pre code { background: none; padding: 0; border-radius: 0; }

article blockquote {
  margin: 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}

article hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

article img { max-width: 100%; height: auto; }
