.bl-page { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }

/* ── Tag filter chips ── */
.bl-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.bl-filter-chip {
  padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-2); font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.bl-filter-chip:hover { background: var(--bg-hover); }
.bl-filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.bl-loading, .bl-empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 20px; text-align: center; grid-column: 1 / -1;
}
.bl-empty-state svg { color: var(--text-2); opacity: .45; }
.bl-loading p, .bl-empty-state p { font-size: 13.5px; color: var(--text-2); margin: 0; max-width: 320px; line-height: 1.5; }

/* ── Post grid (blog.html) ── */
.bl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 767px) { .bl-grid { grid-template-columns: 1fr; gap: 16px; } }

.bl-card {
  background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  opacity: 0; animation: blCardIn .4s ease forwards;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.bl-card:hover { box-shadow: var(--shadow-md); border-color: #c7d7fb; transform: translateY(-2px); }
@keyframes blCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bl-card-img-wrap { width: 100%; aspect-ratio: 16 / 9; background: var(--bg-hover); overflow: hidden; flex-shrink: 0; }
.bl-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-card-img-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); background: linear-gradient(135deg, var(--bg-hover), var(--bg));
}

.bl-card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bl-card-date { font-size: 12px; color: var(--text-3); font-weight: 600; }
.bl-card-title { font-size: 16.5px; font-weight: 800; color: var(--text); line-height: 1.35; }
.bl-card-excerpt {
  font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-card-tag { font-size: 11px; font-weight: 700; color: var(--primary); background: var(--primary-light); border-radius: 999px; padding: 3px 9px; }

/* ── Post detail (blog-post.html) ── */
.bl-article { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.bl-back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: var(--text-2); text-decoration: none; margin-bottom: 18px;
}
.bl-back-link:hover { color: var(--primary); }

.bl-article-cover { width: 100%; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; aspect-ratio: 16/9; background: var(--bg-hover); }
.bl-article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bl-article-title { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.3; margin: 0 0 10px; }
.bl-article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.bl-article-date { font-size: 13px; color: var(--text-3); font-weight: 600; }

.bl-article-body { font-size: 15.5px; line-height: 1.85; color: var(--text); }
.bl-article-body h2 { font-size: 21px; font-weight: 800; margin: 28px 0 12px; }
.bl-article-body h3 { font-size: 18px; font-weight: 800; margin: 22px 0 10px; }
.bl-article-body p { margin: 0 0 16px; }
.bl-article-body ul { margin: 0 0 16px; padding-left: 22px; }
.bl-article-body li { margin-bottom: 6px; }
.bl-article-body img { max-width: 100%; border-radius: 12px; margin: 12px 0; display: block; }
.bl-article-body a { color: var(--primary); font-weight: 700; }
.bl-article-body strong { font-weight: 800; }

.bl-article-not-found { text-align: center; padding: 60px 20px; color: var(--text-2); }

/* ── Related posts ── */
.bl-related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.bl-related-title { font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.bl-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 767px) { .bl-related-grid { grid-template-columns: 1fr; } }
