
:root {
  --bg: #c7ccda;
  --paper: #f4f1ea;
  --ink: #1c1c1c;
  --muted: #5a5f6b;
  --line: #aeb4c3;
  --accent: #2a2a2a;
  --link: #1f3a5f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", "Times New Roman", serif;
  line-height: 1.65;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #000; }
.mono, .site-kicker, nav a, .meta, .cat-count, .toc-date, footer {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  letter-spacing: 0.02em;
}
.wrap {
  width: min(920px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset;
}
.site-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.site-kicker a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
h1 { font-size: clamp(1.6rem, 3.5vw, 2.35rem); margin: 0 auto 0.75rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }
h3 { font-size: 1rem; margin: 0; }
.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 42rem;
  margin: 0 0 2rem;
}
nav.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
nav.crumbs a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
nav.crumbs a:hover { border-bottom-color: var(--muted); color: var(--ink); }
.meta { font-size: 0.8rem; color: var(--muted); margin: 0 auto 1.5rem; max-width: 40rem; }
.paper > h1,
.paper > .meta,
.paper > .article-body,
.paper > .article-gallery,
.paper > .article-hero,
.paper > .source {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
.paper > nav.crumbs {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  display: block;
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #7f8696;
  color: inherit;
}
.cat-count { font-size: 0.72rem; color: var(--muted); margin-top: 0.65rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #ddd6c8;
}
.list li:last-child { border-bottom: 0; }
.toc-date { font-size: 0.78rem; color: var(--muted); padding-top: 0.15rem; }
.list a { color: var(--ink); text-decoration: none; }
.list a:hover { text-decoration: underline; }
.article-body p {
  margin: 0 0 1.15rem;
  font-size: 1.05rem;
}
/* Match existing article images: fill the 40rem column like .article-gallery / .article-hero */
.article-body figure {
  margin: 1.25rem auto;
  max-width: 100%;
}
.article-body figure img,
.article-body > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.article-body p:first-of-type::first-letter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 3.1rem;
  float: left;
  line-height: 0.85;
  padding: 0.15rem 0.45rem 0 0;
  color: #111;
}
.source {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd6c8;
  font-size: 0.85rem;
  color: var(--muted);
}
footer {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin: 0 0 2rem;
  padding: 0.9rem 0 1.1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stats div strong {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.25rem;
  font-weight: 500;
}
.hero-stats div span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .article-body p:first-of-type::first-letter { font-size: 2.4rem; }
}

.article-hero {
  margin: 0 auto 1.5rem;
}
.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 2rem auto 0.5rem;
}
.article-gallery figure {
  margin: 0;
}
.article-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
