/* Blog pages: the site's tokens and type, plus the handful of layouts the blog
   needs (list, hub, article) and styles for the WordPress block markup the
   migrated articles carry. */

.blog-head { text-align: center; margin: 0 0 1.8rem; }
.blog-head .eyebrow { color: var(--accent-text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.blog-head h1 { font-size: clamp(2rem, 4.2vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.08; margin: 0.4rem 0 0.6rem; }
.blog-head p { color: var(--fg-soft); max-width: 660px; margin: 0 auto; font-size: 1.05rem; }

.blog-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin: 0 0 2rem; }
.blog-chips a {
  display: inline-block; padding: 0.42rem 0.9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rule); color: var(--fg-soft);
  font-size: 0.88rem; font-weight: 600; text-decoration: none;
}
.blog-chips a:hover { border-color: var(--accent); color: var(--accent-text); }
.blog-chips a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.blog-chips a span { opacity: 0.7; font-weight: 500; margin-left: 0.3rem; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.blog-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-md); transition: transform 0.15s, box-shadow 0.15s;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.blog-card .thumb { aspect-ratio: 16 / 9; background: var(--surface-2) center / cover no-repeat; }
.blog-card .body { padding: 1rem 1.1rem 1.2rem; display: grid; gap: 0.4rem; }
.blog-card .kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.blog-card .kicker span { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; margin-left: 0.5rem; }
.blog-card h2 { font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.015em; margin: 0; }
.blog-card p { margin: 0; color: var(--fg-soft); font-size: 0.93rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.blog-pager { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin: 2.4rem 0 0; flex-wrap: wrap; }
.blog-pager a, .blog-pager span {
  min-width: 2.4rem; text-align: center; padding: 0.45rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--fg-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.blog-pager span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.blog-pager span.gap { border: 0; background: none; }

/* ---- article ---------------------------------------------------------- */
.blog-post { max-width: 760px; margin: 0 auto; }
.blog-post .crumb { font-size: 0.85rem; color: var(--muted); margin: 0 0 1rem; }
.blog-post .crumb a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.blog-post h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.12; margin: 0 0 0.8rem; }
.blog-post .meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.4rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.blog-post .meta a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.blog-post .hero { margin: 0 0 1.8rem; }
.blog-post .hero img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); display: block; }
.post-body { font-size: 1.06rem; line-height: 1.72; color: var(--fg); }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2.2em; }
.post-body h3 { font-size: 1.22rem; letter-spacing: -0.015em; margin-top: 1.8em; }
.post-body h4 { font-size: 1.05rem; margin-top: 1.5em; }
.post-body p { margin: 0; }
.post-body p + p { margin-top: 1.1em; }
.post-body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.35em; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.post-body figure { margin: 1.6em 0; }
.post-body figure img { display: block; margin: 0 auto; }
.post-body figcaption { font-size: 0.86rem; color: var(--muted); text-align: center; margin-top: 0.5em; }
.post-body blockquote, .post-body .wp-block-quote {
  margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--accent); color: var(--fg-soft); font-style: italic;
}
.post-body .wp-block-quote p { margin: 0; }
.post-body table, .post-body .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1.4em 0; }
.post-body th, .post-body td { border: 1px solid var(--rule-strong); padding: 0.55em 0.7em; text-align: left; vertical-align: top; }
.post-body th { background: var(--surface-2); font-weight: 700; }
.post-body .wp-block-table { overflow-x: auto; }
.post-body code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
.post-body pre { background: #0f1b1b; color: #e8f2f2; padding: 1em 1.1em; border-radius: var(--radius-md); overflow-x: auto; font-size: 0.86rem; line-height: 1.55; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.post-body .wp-block-group, .post-body .wp-block-columns { display: block; }
.post-body .wp-block-buttons a, .post-body .wp-block-button__link {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 0.6em 1.1em; border-radius: 999px; font-weight: 700;
}
.post-body .wp-block-separator { border: 0; border-top: 1px solid var(--rule); }
.post-body iframe, .post-body video { max-width: 100%; }

.post-foot { margin: 2.6rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; font-size: 0.92rem; }
.post-foot a { color: var(--accent-text); font-weight: 600; text-decoration: none; }

.post-cta { margin: 2.4rem 0 0; background: var(--accent-soft); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; }
.post-cta h2 { font-size: 1.15rem; margin: 0 0 0.3rem; letter-spacing: -0.015em; }
.post-cta p { margin: 0 0 0.8rem; color: var(--fg-soft); font-size: 0.95rem; }
.post-cta .links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.post-cta .links a {
  display: inline-block; padding: 0.5rem 0.95rem; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--accent); color: var(--accent-text); font-weight: 700; text-decoration: none; font-size: 0.9rem;
}
.post-cta .links a.primary { background: var(--accent); color: #fff; }

.related { margin: 2.6rem 0 0; }
.related h2 { font-size: 1.2rem; letter-spacing: -0.015em; margin: 0 0 1rem; }
.related .blog-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; }
.related .blog-card h2 { font-size: 0.98rem; }

.draft-note { background: #fff4e5; border: 1px solid #f0c48a; color: #7a4a00; border-radius: var(--radius-md); padding: 0.6rem 0.9rem; font-size: 0.9rem; margin: 0 0 1.2rem; }

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-body { font-size: 1rem; }
  .blog-post .hero img { border-radius: var(--radius-md); }
}
