.post-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 24px 120px;
}

/* Back link */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 40px;
  transition: color 0.15s;
}
.post-back:hover { color: var(--blue); }

/* Header */
.post-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.post-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 3px 10px;
  border-radius: 4px;
}
.post-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 20px;
}
.post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* Lead / hero image */
.post-hero {
  margin: 0 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-3);
}
.post-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Prose */
.post-body { color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.8; }
.post-body h2 { font-family: var(--font-head); font-size: 28px; font-weight: 500; margin: 2em 0 0.6em; color: var(--text); }
.post-body h3 { font-family: var(--font-head); font-size: 22px; font-weight: 500; margin: 1.8em 0 0.5em; color: var(--text); }
.post-body h4 { font-family: var(--font-head); font-size: 18px; font-weight: 500; margin: 1.5em 0 0.4em; color: var(--text); }
.post-body p { margin: 0 0 1.4em; }
.post-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { opacity: 0.8; }
.post-body strong { font-weight: 500; color: var(--text); }
.post-body em { font-style: italic; }
.post-body code { font-family: var(--mono); font-size: 0.88em; background: rgba(0,149,255,0.1); color: var(--blue); padding: 2px 6px; border-radius: 4px; }
.post-body blockquote {
  border-left: 3px solid var(--blue);
  margin: 1.6em 0;
  padding: 12px 0 12px 24px;
  color: var(--muted);
  font-style: italic;
}
.post-body ul, .post-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}
.post-body li { margin-bottom: 0.4em; }
.post-body li::marker { color: var(--blue); }

/* Tables */
.post-table {
  margin: 1.8em 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* Lea Verou scrolling shadows: a right-edge fade appears only while the
     table can scroll, so narrow screens get a "more columns →" affordance. */
  background:
    linear-gradient(to right, var(--bg-2) 30%, transparent) 0 0,
    linear-gradient(to left, var(--bg-2) 30%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.45), transparent) 0 0,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.45), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 36px 100%, 36px 100%, 16px 100%, 16px 100%;
  background-attachment: local, local, scroll, scroll;
}
.post-table::-webkit-scrollbar { height: 8px; }
.post-table::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.post-body thead th {
  font-family: var(--font-head);
  font-weight: 500;
  text-align: left;
  color: var(--text);
  background: var(--bg-2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.post-body tbody td {
  padding: 11px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr:hover td { background: rgba(0,149,255,0.04); }
.post-body img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.6em auto;
  display: block;
}
.post-body figure { margin: 2em 0; }
.post-body figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.post-body pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 1.6em 0;
}
.post-body pre code {
  background: none;
  color: var(--text);
  padding: 0;
  font-size: 14px;
}

/* End-of-post conversion block (generated by build-blog.js) */
.post-cta {
  margin: 3.2em 0 0.5em;
  padding: 28px 28px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  background: var(--bg-2, rgba(255,255,255,0.03));
}
.post-cta__eyebrow {
  font-family: var(--mono, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 10px;
}
.post-cta__title {
  font-size: 21px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 8px;
}
.post-cta__text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.post-cta__text a { color: var(--blue); text-decoration: none; }
.post-cta__text a:hover { text-decoration: underline; }
.post-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.post-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: filter 0.15s, border-color 0.15s, color 0.15s;
}
.post-cta__btn--primary { background: var(--blue); color: #fff; }
.post-cta__btn--primary:hover { filter: brightness(1.08); text-decoration: none; }
.post-cta__btn--ghost { border: 1px solid var(--border); color: var(--text); }
.post-cta__btn--ghost:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* States (used by post.html dynamic fallback) */
.post-loading, .post-error, .post-not-found {
  text-align: center;
  padding: 80px 0;
  color: var(--muted);
  font-size: 16px;
}
.post-loading::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 20px auto 0;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
