/* nchurn blog. Builds on landing/styles.css (tokens, frame, legal page layout).
   .prose is also loaded in the admin, so the editor's preview pane matches the live post. */

/* ---------- Post list ---------- */
.post-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.post-card {
  display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 32px;
  color: inherit; text-decoration: none; transition: background-color 0.15s;
}
.post-card:hover { background: var(--bg-200); }
.post-card-title { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.post-card p { max-width: 56ch; color: var(--fg-secondary); font-size: 15px; line-height: 1.5; }
.post-card-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px;
  color: var(--accent-text); font-size: 14px; font-weight: 500;
}
.post-card-more .icon { transition: transform 0.2s var(--ease-out); }
.post-card:hover .post-card-more .icon { transform: translateX(3px); }
.post-empty { padding: 64px 32px; color: var(--fg-secondary); text-align: center; }

/* ---------- Post page ---------- */
.post-back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--fg-secondary);
  font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.15s;
}
.post-back:hover { color: var(--fg-100); }
.post-draft {
  padding: 10px var(--gutter); border-bottom: 1px dashed var(--accent-line); background: var(--accent-tint);
  color: var(--accent-text); font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; text-align: center;
}
.post-draft a { color: inherit; }
/* Without a table of contents the article gets the full width, still capped at a readable measure. */
.post-grid-solo { grid-template-columns: minmax(0, 1fr); }
.post-grid-solo .legal-doc { display: flex; justify-content: center; }
.legal-doc .prose { max-width: 68ch; padding: 48px 0 64px; }
.post-more { padding: 96px 0; }
.post-more .block { margin-top: 40px; }
.post-more h2 { font-size: clamp(28px, 1.6vw + 18px, 36px); }
.post-cta { min-height: 0; padding: 96px var(--gutter); }

/* ---------- Article body ---------- */
.prose { color: var(--fg-200); font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 48px; font-size: 28px; line-height: 1.15; letter-spacing: -0.025em; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h3 { margin-top: 36px; font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h4 { margin-top: 28px; color: var(--fg-100); font-size: 17px; font-weight: 500; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 12px; }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--fg-100); font-weight: 500; }
.prose a { color: var(--accent-text); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }

.prose ul, .prose ol { display: grid; gap: 8px; padding-left: 22px; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: ""; position: absolute; left: -18px; top: 0.85em; width: 6px; height: 6px;
  border-radius: 1.5px; background: var(--accent); transform: translateY(-50%);
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--fg-tertiary); font: 400 14px var(--mono); }
.prose li > ul, .prose li > ol { margin-top: 8px; }

/* Blockquotes double as callouts: start one with **Tip:** or **Note:**. */
.prose blockquote {
  padding: 18px 24px; border: 1px solid var(--accent-line); border-left-width: 3px; border-radius: 8px;
  background: #FFF8F3; color: var(--fg-200);
}
.prose blockquote > * + * { margin-top: 10px; }

.prose code { padding: 2px 6px; border-radius: 4px; background: var(--bg-300); color: var(--fg-100); font-size: 0.86em; }
.prose pre {
  overflow-x: auto; padding: 20px 24px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-content); font-size: 14px; line-height: 1.6;
}
.prose pre code { padding: 0; background: none; font-size: inherit; }

.prose img { display: block; max-width: 100%; height: auto; margin-inline: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose p:has(> img:only-child) { margin-block: 32px; }
.prose hr { margin-block: 40px; border: 0; border-top: 1px dashed var(--line-strong); }

.prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--fg-100); font-weight: 500; white-space: nowrap; border-bottom-color: var(--line-strong); }
.prose tbody tr:hover { background: var(--bg-200); }

.prose .footnote { color: var(--fg-secondary); font-size: 14px; }
.prose .footnote hr { margin-block: 32px 16px; }

.embed { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-200); }
.prose .embed { margin-block: 32px; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* The [[signup]] box inside a post. */
.post-signup {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: 24px 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-200);
}
.prose .post-signup { margin-block: 36px; }
.post-signup > div { flex: 1 1 280px; }
.post-signup p { color: var(--fg-secondary); font-size: 15px; line-height: 1.5; }
.post-signup .post-signup-title { margin-bottom: 4px; color: var(--fg-100); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.prose a.btn-primary { color: var(--on-accent); text-decoration: none; }

@media (max-width: 860px) {
  .post-list { grid-template-columns: minmax(0, 1fr); }
  .post-card { padding: 28px var(--gutter); }
  .legal-doc .prose { padding-top: 36px; }
  .post-cta { padding: 72px var(--gutter); }
}
@media (max-width: 480px) {
  .prose { font-size: 16px; }
  .prose h2 { font-size: 24px; }
  .post-signup { padding: 20px; }
  .post-signup .btn { width: 100%; justify-content: center; }
}
