/* ══════════════════════════════════════════════════════════════════
   blog.css — posts, the blog index, how-to guides and the /how-to hub
   (templates/post.html, blog-index.html, howto.html, howto-index.html).
   Reading width ~66ch, Fraunces headings, Inter body.
   Breakpoints: 1024 / 768 / 430 and no others.
   ══════════════════════════════════════════════════════════════════ */

/* ── article pages (posts + how-to guides) ────────────────────── */

.post { padding-top: clamp(20px, 4vw, 44px); }

.post .container { max-width: 800px; }

.post-crumbs {
  font-size: var(--size-small);
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.post-crumbs a { color: var(--clay-2); }

.post-header h1 { max-width: 24ch; }

.post-lede {
  font-size: calc(var(--size-body) + 1px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 8px;
}

.post-body {
  max-width: 66ch;
  padding-top: clamp(16px, 3vw, 30px);
  font-size: calc(var(--size-body) + 0.5px);
  line-height: 1.7;
}

.post-body h2 {
  font-size: var(--size-h3);
  font-variation-settings: 'opsz' 28;
  line-height: 1.3;
  margin: 1.7em 0 0.5em;
}

.post-body p { margin-bottom: 1.25em; }

.post-body ul, .post-body ol {
  margin: 0 0 1.25em;
  padding-left: 24px;
}
.post-body li { margin-bottom: 0.5em; }

.post-body ol > li::marker {
  font-family: var(--font-mono);
  font-weight: 560;
  color: var(--amber);
}

.post-body blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 22px;
  border-left: 1px solid var(--amber);
  color: var(--ink-soft);
  font-style: italic;
}

.post-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 44px;
  padding-top: 20px;
}
.post-foot .microcopy { margin: 0; }

/* ── index pages (/blog, /how-to) ─────────────────────────────── */

.blog-head {
  padding-top: clamp(28px, 5vw, 56px);
  text-align: center;
}
.blog-head .container, .post-index .container { max-width: 800px; }

.blog-title { max-width: 20ch; margin-inline: auto; }

.blog-lede {
  font-size: calc(var(--size-body) + 1px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto;
}

.post-index { padding-top: clamp(26px, 4vw, 44px); }

.post-list, .howto-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li { border-bottom: 1px solid var(--border); }
.post-list li:first-child { border-top: 1px solid var(--border); }

.post-link {
  display: block;
  padding: 24px 4px;
  text-decoration: none;
  transition: background 0.2s var(--ease-breathe);
}
.post-link:hover { background: rgba(255, 251, 240, 0.8); }

.post-date {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.post-link h2 {
  font-size: var(--size-h3);
  font-variation-settings: 'opsz' 28;
  line-height: 1.3;
  margin: 0 0 6px;
  transition: color 0.2s var(--ease-breathe);
}
.post-link:hover h2 { color: var(--clay-1); }

.post-link p {
  font-size: calc(var(--size-body) - 1px);
  color: var(--ink-soft);
  max-width: 66ch;
  margin: 0;
}

.blog-empty { color: var(--ink-soft); }

/* the how-to hub: guides as cards, in reading order */

.howto-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.howto-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 24px 26px 22px;
  box-shadow: var(--shadow-lift);
  text-decoration: none;
  transition: transform 0.3s var(--ease-breathe), box-shadow 0.3s var(--ease-breathe);
}
@media (hover: hover) {
  .howto-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
}

.howto-link h2 {
  font-size: var(--size-h3);
  font-variation-settings: 'opsz' 28;
  line-height: 1.3;
  margin: 0 0 8px;
}

.howto-link p {
  font-size: calc(var(--size-body) - 1.5px);
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.howto-go {
  margin-top: auto;
  font-size: 14.5px;
  font-weight: 560;
  color: var(--clay-1);
}
.howto-link:hover .howto-go { color: var(--espresso); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 0.22em; }

.howto-more {
  margin: 30px 0 0;
  font-size: var(--size-small);
  color: var(--ink-soft);
}

@media (max-width: 768px) {
  .howto-list { grid-template-columns: 1fr; }
  .post-link { padding: 20px 2px; }
}
