/* blog.css — shared article layer for /blog/*, extracted from the per-post
   inline styles (P2.12 hoist). Page chrome lives in /css/site.css; this file
   is ONLY the blog article/footer layout. Posts keep a small inline <style>
   for genuine per-post extras (e.g. cheat-sheet tables). Autopost links this
   file instead of re-inlining. */
/* ARTICLE */
article { max-width: 880px; margin: 0 auto; padding: 60px 0 40px; }
/* .page-nav.contents below assumes this 60px — keep the two in sync */
.article-header { margin-bottom: 60px; max-width: 720px; }
.article-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 32px;
  display: flex; align-items: center; gap: 16px;
}
.article-eyebrow .sep { color: var(--ink-mute); opacity: 0.4; }
.article-eyebrow .read { color: var(--accent); }
.article-header h1 {
  font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.04; margin-bottom: 28px; color: var(--ink);
}
.article-header .subtitle {
  font-family: var(--serif); font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.4; color: var(--ink-dim);
  letter-spacing: -0.005em;
}
.article-header .subtitle em { font-style: italic; color: var(--accent); }

.article-body { max-width: 680px; }
.article-body p {
  font-size: 17px; line-height: 1.7; color: var(--ink); margin-bottom: 24px;
}
.article-body p:has(+ h2), .article-body p:last-child { margin-bottom: 0; }
.article-body h2 {
  font-family: var(--serif); font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1.2;
  color: var(--ink); margin: 60px 0 24px;
  scroll-margin-top: 24px;
}
.article-body h2 em { font-style: italic; color: var(--accent); }

/* Heading anchors + "// contents" nav (Batch Z2 / P1.20) — the hubs' shipped
   .page-nav vocabulary. Heading ids are a permanent public URL contract:
   generated once, never regenerated on a heading edit (blog/README.md). */
.page-nav.contents {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  /* -24px = .article-header's 60px bottom margin minus the 36px gap we want */
  margin: -24px 0 56px; max-width: 720px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.page-nav.contents .pn-label { color: var(--ink-mute); }
.page-nav.contents a {
  color: var(--ink-dim); text-decoration: none; border-bottom: none;
  transition: color 0.2s; display: inline-block;
  padding: 6px 4px; margin: -6px -4px;
}
.page-nav.contents a:hover { color: var(--accent); }
/* the per-heading permalink: revealed on hover, and always on keyboard focus
   so it is reachable without a pointer */
.article-body h2 .h-anchor {
  margin-left: 10px; border-bottom: none; opacity: 0;
  font-family: var(--mono); font-size: 0.5em; vertical-align: middle;
  transition: opacity 0.2s, color 0.2s;
}
.article-body h2:hover .h-anchor,
.article-body h2 .h-anchor:focus-visible { opacity: 1; }
.article-body strong { color: var(--ink); font-weight: 500; }
.article-body code {
  font-family: var(--mono); font-size: 14px; background: #0e0e0c;
  padding: 2px 6px; border-radius: 2px; color: var(--accent);
  overflow-wrap: anywhere;
}
.article-body a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px dashed rgba(201, 255, 61, 0.45); transition: border-color 0.2s;
}
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body ul {
  list-style: none; margin: 0 0 24px 0; padding: 0;
}
.article-body ul li {
  font-size: 17px; line-height: 1.7; color: var(--ink);
  padding-left: 24px; position: relative; margin-bottom: 14px;
}
.article-body ul li::before {
  content: "—"; position: absolute; left: 0; color: var(--accent);
}
.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px; margin: 32px 0;
  font-family: var(--serif); font-size: 22px; line-height: 1.5;
  color: var(--ink-dim); font-style: italic;
}

.article-body h3 {
  font-family: var(--serif); font-size: 23px;
  font-weight: 400; letter-spacing: -0.01em; line-height: 1.3;
  color: var(--ink); margin: 36px 0 16px;
}
.article-body h3 em { font-style: italic; color: var(--accent); }
.article-body pre {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
  background: #0e0e0c; border: 1px solid var(--line-soft);
  border-radius: 4px; padding: 16px 18px; margin-bottom: 24px;
  color: var(--ink); overflow-x: auto;
}
.article-body pre code { background: none; padding: 0; color: var(--ink); font-size: inherit; overflow-wrap: normal; }


.cta-box {
  margin: 56px 0 40px;
  background: linear-gradient(180deg, #15140fdd, #0e0d0baa);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 32px 36px;
}
.cta-box .cta-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.cta-box h3 {
  font-family: var(--serif); font-size: 30px; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px;
}
.cta-box p {
  font-size: 15px; color: var(--ink-dim); line-height: 1.6;
  margin-bottom: 20px; max-width: 540px;
}
.cta-box .cta-btn {
  display: inline-block;
  background: var(--accent); color: #0b0b0a;
  border: 1px solid var(--accent); border-radius: 2px;
  padding: 12px 24px; font-family: var(--mono); font-size: 12px;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s;
}
.cta-box .cta-btn:hover { background: #d8ff5a; border-color: #d8ff5a; }

/* ARTICLE FOOTER */
.article-end { max-width: 880px; margin: 0 auto; padding: 60px 0; }
.about-box {
  border: 1px solid var(--line); border-radius: 4px;
  padding: 28px 32px; max-width: 680px; margin-bottom: 60px;
  background: #0d0d0b;
}
.about-box h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px;
}
.about-box p {
  font-size: 15px; color: var(--ink-dim); line-height: 1.6; max-width: 560px;
}
.about-box p a {
  color: var(--accent); text-decoration: none; border-bottom: 1px dashed rgba(201, 255, 61, 0.45);
}
.about-box p a:hover { border-bottom-color: var(--accent); }

.related-section {
  border-top: 1px solid var(--line-soft);
  padding: 60px 0;
}
.related-section h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 24px;
}
.related-post {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 0 32px; padding: 24px 0;
  border-top: 1px solid var(--line-soft);
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.related-post:first-of-type { border-top: none; }
.related-post:hover { color: inherit; }
.related-post:hover .rp-title { color: var(--accent); }
.rp-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-mute);
  padding-top: 3px; line-height: 1.8;
}
.rp-title {
  font-family: var(--serif); font-size: 22px; font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.25; color: var(--ink);
  margin-bottom: 8px; transition: color 0.2s;
}
.rp-excerpt {
  font-size: 14px; color: var(--ink-dim); line-height: 1.6; margin-bottom: 10px;
}
.rp-read {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.back-to-blog {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none;
  transition: color 0.2s;
}
.back-to-blog:hover { color: var(--accent); }



@media (max-width: 900px) {
  .container { padding: 0 20px; }
  nav ul { display: none; }
  .cta-box { padding: 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .related-post { grid-template-columns: 1fr; gap: 8px; }
  .rp-meta { padding-top: 0; }
}
