/* =====================================================================
   ffwarn — blog stylesheet
   Reuses the shared design tokens defined in app.css (emerald/stone
   palette, --radius, --shadow-*, --font-display, --font-body).
   Styles the public blog (list + single post) and the RecentPostsCell
   card that surfaces blog content on the landing page.
   ===================================================================== */

/* ===== POST LIST (blog index) ===== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.1s;
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--emerald-200);
}
.post-card:active { transform: scale(0.997); }

.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.post-card-link:hover { text-decoration: none; }

.post-card-body {
  padding: 24px 28px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.post-meta time { font-weight: 500; }
.post-author {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.post-title {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--ink);
  line-height: 1.3;
}
.post-card:hover .post-title { color: var(--emerald-700); }

.post-excerpt {
  font-size: 15px;
  color: var(--stone-600);
  line-height: 1.6;
  margin-bottom: 14px;
}

.post-readmore {
  font-size: 14px;
  font-weight: 600;
  color: var(--emerald-700);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.pagination .page-info {
  font-size: 14px;
  color: var(--muted);
}
.pagination .btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== SINGLE POST ===== */
.post-single {
  max-width: 760px;
  margin: 0 auto;
}

.post-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--stone-600);
  margin-bottom: 24px;
}
.post-back:hover { color: var(--emerald-700); text-decoration: none; }

.post-single-head {
  margin-bottom: 32px;
}
.post-single-head .post-meta {
  margin-bottom: 14px;
  font-size: 14px;
}
.post-single-head h1 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 14px;
}
.post-lead {
  font-size: 18px;
  color: var(--stone-600);
  line-height: 1.6;
}

.post-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--stone-800);
}
.post-body p { margin-bottom: 1.2em; }
.post-body h2 {
  font-size: 24px;
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}
.post-body h3 {
  font-size: 20px;
  margin: 1.4em 0 0.5em;
}
.post-body ul, .post-body ol { margin: 0 0 1.2em 1.5em; }
.post-body li { margin-bottom: 0.4em; }
.post-body a { color: var(--emerald-700); }
.post-body blockquote {
  border-left: 3px solid var(--emerald-400);
  padding: 4px 0 4px 18px;
  margin: 1.4em 0;
  color: var(--stone-600);
  font-style: italic;
}
.post-body pre {
  background: var(--stone-900);
  color: var(--stone-100);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
  margin: 1.4em 0;
}
.post-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.post-body :not(pre) > code {
  background: var(--stone-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.post-body img {
  border-radius: var(--radius-sm);
  margin: 1.4em 0;
}

/* ===== RECENT POSTS CELL (landing page card) ===== */
.recent-posts {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 64px 0;
}
.recent-posts h3 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 32px;
}
.recent-posts-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.recent-posts-list li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.recent-posts-list li:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--emerald-200);
}
.recent-posts-list a {
  display: block;
  padding: 20px 22px;
  color: inherit;
  text-decoration: none;
}
.recent-posts-list a:hover { text-decoration: none; }
.recent-posts-list .rp-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 6px;
}
.recent-posts-list li:hover .rp-title { color: var(--emerald-700); }
.recent-posts-list .rp-date {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.rp-all {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--emerald-700);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .post-card-body { padding: 20px; }
  .post-title { font-size: 19px; }
  .post-single-head h1 { font-size: 28px; }
  .post-body { font-size: 16px; }
  .recent-posts { padding: 48px 0; }
  .recent-posts h3 { font-size: 24px; }
}