:root {
  --bg: #fdfdfc;
  --surface: #f4f3ef;
  --text: #1b1b19;
  --muted: #6b6a64;
  --accent: #9a3412;
  --rule: #e0dfd9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --surface: #1f1f24;
    --text: #e8e7e3;
    --muted: #9b9a94;
    --accent: #f4a06a;
    --rule: #2e2e35;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

main, .masthead, footer { max-width: 42rem; margin: 0 auto; }

.masthead {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.tagline { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }

.feed { list-style: none; margin: 0; padding: 2rem 0 0; }
.feed li { padding-bottom: 1.75rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--rule); }
.feed li:last-child { border-bottom: none; }

.headline {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}
.headline:hover { color: var(--accent); }

.summary { margin: 0.4rem 0 0.6rem; color: var(--muted); }

.meta { margin: 0; font-size: 0.8rem; color: var(--muted); }

a.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
}

a.tag:hover {
  background: var(--accent);
  color: var(--bg);
}

article { padding-top: 2.25rem; }
article h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
article h2 { font-size: 1.1rem; margin-top: 2rem; }
article p { margin: 1rem 0; }
article a { color: var(--accent); }

article code, .empty code {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.88em;
}

article pre {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: var(--surface);
  overflow-x: auto;
}
article pre code { padding: 0; background: none; }

article table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
article th, article td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--rule); text-align: left; }

.more { margin: 0; padding-top: 0.5rem; }
.more a { font-weight: 600; color: var(--accent); text-decoration: none; }
.more a:hover { text-decoration: underline; }
.more-count { margin-left: 0.6rem; font-size: 0.8rem; color: var(--muted); }

.page-title { font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.25rem 0 0.25rem; }
.page-note { margin: 0 0 1.5rem; color: var(--muted); font-size: 0.85rem; }

.months { list-style: none; margin: 0; padding: 0; }
.months li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.months a { color: var(--text); text-decoration: none; font-weight: 500; }
.months a:hover { color: var(--accent); }
.month-count { font-size: 0.8rem; color: var(--muted); }

.back { margin-top: 3rem; font-size: 0.9rem; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--accent); }

.empty { padding-top: 2.5rem; color: var(--muted); }

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

.footer-nav { margin-bottom: 0.6rem; }
.footer-nav a {
  margin-right: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--accent); }
