/* Wanderer — blog. Layered on top of site.css and reusing its tokens (--night,
   --gold, --ink…), so the blog reads as part of the site rather than a bolt-on.
   Server-rendered by server/src/blog.js. */

/* ---------- breadcrumbs ---------- */
.crumbs { margin-bottom: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li { color: var(--ink-dim); font-size: 14px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs li[aria-current] { color: var(--ink); }

/* ---------- post grid ---------- */
.post-grid {
  display: grid; gap: 20px; margin-top: 28px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 #ffffff0a, 0 6px 24px #00000040;
  transition: border-color .15s ease, transform .15s ease;
}
.post-card:hover { border-color: #3b5070; transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .post-card { transition: none; } .post-card:hover { transform: none; } }

.post-card .media { display: block; background: var(--night-2); }
.post-card .media img { width: 100%; height: 178px; object-fit: cover; }
.post-card .media .ph {
  height: 178px;
  background:
    radial-gradient(420px 160px at 50% 120%, #e8c46922 0%, transparent 60%),
    linear-gradient(180deg, #16223a, #0e1626);
  border-bottom: 1px solid var(--line);
}
.post-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.post-card h2 { font-family: var(--font-display); font-size: 20px; line-height: 1.35; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--gold); text-decoration: none; }
.post-card p { color: var(--ink-dim); font-size: 15px; }
.post-card p.summary { line-height: 1.55; margin: 0; }
.post-card .byline { font-size: 13.5px; margin-top: auto; }

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .6px;
}
.meta .cat {
  color: var(--gold); border: 1px solid #e8c46944; border-radius: 999px;
  padding: 2px 10px; font-weight: 700; font-size: 11.5px;
}
.meta .cat:hover { text-decoration: none; background: #e8c4691a; }
.meta .upd { color: var(--moss); text-transform: none; letter-spacing: 0; }
.meta .reading-time { color: #d5cfbe; text-transform: none; letter-spacing: 0; }
.meta .reading-time::before { content: "•"; margin-right: 10px; color: var(--gold-deep); }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 38px 0 10px; }
.pager .btn { padding: 11px 22px; font-size: 15px; }
.pager .btn:only-child { margin-left: auto; }

/* ---------- single post ---------- */
article.post { max-width: 820px; margin-inline: auto; }
article.post > header { margin-bottom: 22px; }
article.post > header h1 {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2; margin-bottom: 12px;
}
article.post .byline { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); font-size: 15px; margin-top: 10px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.avatar.sm { width: 30px; height: 30px; }

figure.hero-img { margin: 0 0 34px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--night-2); box-shadow: 0 18px 48px #0008; }
figure.hero-img img { width: 100%; max-height: 500px; object-fit: cover; image-rendering: pixelated; }
figure.hero-img figcaption,
.post .prose figcaption { padding: 10px 14px; font-size: 13.5px; color: var(--ink-dim); background: #0a0f1a; }

/* Body prose. site.css scopes its prose rules to `article.prose`; the post body is a
   `.prose` div inside `article.post`, so the equivalents live here. */
.post .prose { margin-top: 8px; }
.post .prose h2 { position: relative; font-family: var(--font-display); font-size: 25px; margin: 42px 0 12px; padding-top: 5px; color: var(--gold); border-top: 1px solid #e8c46920; }
.post .prose h3 { font-size: 18px; margin: 22px 0 6px; color: var(--ink); }
.post .prose h4, .post .prose h5, .post .prose h6 { font-size: 16px; margin: 18px 0 6px; color: var(--ink); }
.post .prose p { margin: 0 0 16px; color: #cfcaba; line-height: 1.75; }
.post .prose ul, .post .prose ol { margin: 0 0 16px 22px; color: #cfcaba; }
.post .prose li { margin-bottom: 6px; }
.post .prose a { text-decoration: underline; text-underline-offset: 2px; }
.post .prose strong { color: var(--ink); }
.post .prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.post .prose blockquote {
  margin: 0 0 18px; padding: 12px 18px; color: var(--ink);
  border-left: 3px solid var(--gold-deep); background: #ffffff08;
  border-radius: 0 8px 8px 0; font-style: italic;
}
.post .prose code {
  background: #0a0f1a; border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; font-size: 14.5px; color: #d8e6c8;
}
.post .prose pre {
  background: #0a0f1a; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin: 0 0 18px; overflow-x: auto;
}
.post .prose pre code { border: 0; padding: 0; background: none; font-size: 14px; line-height: 1.6; }
.post .prose figure { margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.post .prose img { width: 100%; }

/* Wide tables scroll inside their own box rather than the page. */
.table-scroll { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll table { border-collapse: collapse; width: 100%; font-size: 15px; }
.table-scroll th, .table-scroll td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.table-scroll th { background: #0a0f1a; color: var(--gold); font-weight: 700; }

/* ---------- tags, faq, author, empty ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 30px 0 0; padding: 0; }
.tags a {
  display: inline-block; font-size: 13px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; background: #ffffff08;
}
.tags a:hover { color: var(--gold); border-color: #e8c46944; text-decoration: none; }

.faq { max-width: 760px; margin-top: 40px; }
.faq h2 { font-family: var(--font-display); font-size: 24px; color: var(--gold); margin-bottom: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--ink); }
.faq summary:hover { color: var(--gold); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: 12px 16px; color: #cfcaba; }

.author-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }

.empty {
  margin: 40px 0; padding: 30px; text-align: center; color: var(--ink-dim);
  border: 1px dashed var(--line); border-radius: var(--radius); background: #ffffff06;
}
.back { margin-top: 40px; }
