/* Blog pages — Tailwind-inspired utilities as plain CSS (Fase 3)
   Perf: fixed aspect ratios (CLS), system layout, no heavy JS */
.bl, .bp {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  font-family: var(--font-sans);
  color: #292524;
}
@media (min-width: 640px) {
  .bl, .bp { padding: 2.5rem 2rem 5rem; }
}

/* ——— List ——— */
.bl-header { margin-bottom: 2.5rem; text-align: left; }
.bl-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #78350f;
  margin: 0 0 0.5rem;
}
.bl-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  color: #1c1917;
}
.bl-subtitle {
  color: #78716c;
  font-weight: 500;
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
.bl-toolbar { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) {
  .bl-toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
}
.bl-search { display: block; flex: 1; max-width: 20rem; }
.bl-search input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #e7e5e4;
  border-radius: 999px;
  background: #fafaf9;
  font: inherit;
  font-size: 0.875rem;
}
.bl-search input:focus {
  outline: 2px solid rgb(120 53 15 / 0.25);
  border-color: #a16207;
}
.bl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.bl-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  color: #57534e;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.bl-chip:hover { border-color: #a8a29e; }
.bl-chip.is-active {
  background: #5c3d2e;
  border-color: #5c3d2e;
  color: #fff;
}

.bl-featured {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  color: inherit;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #f5f5f4;
  background: #fff;
  box-shadow: 0 8px 30px -12px rgba(92, 61, 46, 0.1);
  transition: box-shadow 0.2s;
}
.bl-featured:hover { box-shadow: 0 16px 40px -12px rgba(92, 61, 46, 0.14); }
@media (min-width: 900px) {
  .bl-featured {
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
  }
}
/* CLS: fixed aspect ratio */
.bl-featured__media {
  aspect-ratio: 16 / 9;
  background: #f5f5f4;
  overflow: hidden;
}
@media (min-width: 900px) {
  .bl-featured__media {
    aspect-ratio: auto;
    min-height: 100%;
  }
}
.bl-featured__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bl-featured__placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
}
.bl-featured__body {
  padding: 1.25rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bl-featured__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.25;
  color: #1c1917;
}
.bl-featured__excerpt {
  color: #57534e;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.bl-readmore {
  font-size: 0.875rem;
  font-weight: 700;
  color: #5c3d2e;
}

.bl-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bl-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .bl-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.bl-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #f5f5f4;
  background: #fff;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.bl-card:hover {
  box-shadow: 0 12px 28px -12px rgba(92, 61, 46, 0.12);
  transform: translateY(-2px);
}
.bl-card__media {
  aspect-ratio: 3 / 2;
  background: #f5f5f4;
  overflow: hidden;
}
.bl-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bl-card__placeholder {
  width: 100%;
  height: 100%;
  background: #e7e5e4;
}
.bl-card__body { padding: 1rem 1.1rem 1.25rem; }
.bl-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.4rem 0 0.5rem;
  line-height: 1.3;
  color: #1c1917;
}
.bl-card__excerpt {
  font-size: 0.85rem;
  color: #78716c;
  line-height: 1.5;
  margin: 0;
}
.bl-meta {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a8a29e;
}
.bl-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #78716c;
  padding: 2rem;
}
.bl-card[hidden],
.bl-featured[hidden] { display: none !important; }

/* ——— Post ——— */
.bp-header { margin-bottom: 1.5rem; }
.bp-crumb {
  font-size: 0.8rem;
  font-weight: 600;
  color: #78716c;
  margin: 0 0 0.75rem;
}
.bp-crumb a { color: #5c3d2e; font-weight: 700; }
.bp-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: #1c1917;
}
.bp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #78716c;
}

/* LCP hero: fixed aspect, reserved space (CLS) */
.bp-hero {
  margin: 0 0 2rem;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f5f5f4;
}
.bp-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bp-layout { max-width: 48rem; margin: 0 auto; }
.bp-toc {
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.75rem;
  background: #fafaf9;
}
.bp-toc__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: #44403c;
  cursor: pointer;
  padding: 0.25rem 0;
  background: none;
  border: none;
}
.bp-toc__list {
  margin: 0.75rem 0 0;
  padding: 0 0 0 1.1rem;
  list-style: decimal;
}
.bp-toc__list[hidden] { display: none; }
.bp-toc__item { margin: 0.35rem 0; }
.bp-toc__item a {
  color: #57534e;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
.bp-toc__item a:hover { color: #5c3d2e; }
.bp-toc__item--h3 { margin-left: 0.75rem; list-style: disc; }

/* Article body — reuse globals from app if any; local safety */
.bp-article {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #3d3d3d;
  overflow-wrap: anywhere;
}
.bp-article img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.25rem 0;
}
.bp-article h2, .bp-article h3 {
  font-family: var(--font-serif);
  color: #5d3a1a;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: 5rem;
}
.bp-article h2 {
  font-size: 1.65rem;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgb(212 175 55 / 0.2);
}
.bp-article h3 { font-size: 1.3rem; margin: 1.75rem 0 0.65rem; }
.bp-article p { margin: 0 0 1.15rem; }
.bp-article a { color: #5d3a1a; text-decoration: underline; text-underline-offset: 3px; }
.bp-article ul, .bp-article ol { padding-left: 1.5rem; margin: 0 0 1.15rem; }
.bp-article li { margin-bottom: 0.4rem; }

.bp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 1.5rem;
}
.bp-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5c3d2e;
  background: rgb(92 61 46 / 0.06);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.bp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid #f5f5f4;
  margin-top: 1rem;
}
.bp-like, .bp-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: #44403c;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.bp-like:hover, .bp-share:hover {
  border-color: #a8a29e;
  background: #fafaf9;
}
.bp-like[data-liked="1"] {
  color: #be123c;
  border-color: rgb(190 18 60 / 0.35);
  background: rgb(255 241 242);
}
.bp-like:disabled, .bp-share:disabled {
  opacity: 0.6;
  cursor: wait;
}

.bp-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #f5f5f4;
}
.bp-related h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  color: #1c1917;
}
.bp-related__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bp-related__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .bp-related__grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.bp-related__card {
  color: inherit;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #f5f5f4;
  transition: box-shadow 0.2s;
}
.bp-related__card:hover { box-shadow: 0 8px 24px -10px rgba(0,0,0,0.12); }
.bp-related__media {
  aspect-ratio: 3 / 2;
  background: #f5f5f4;
  overflow: hidden;
}
.bp-related__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-related__ph {
  width: 100%;
  height: 100%;
  background: #e7e5e4;
}
.bp-related__card .bl-meta,
.bp-related__card h3 {
  display: block;
  padding: 0 0.85rem;
}
.bp-related__card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin: 0.35rem 0 0.85rem;
  line-height: 1.35;
  color: #1c1917;
}
.bp-back {
  margin: 2.5rem 0 0;
  font-weight: 700;
  font-size: 0.9rem;
}
.bp-back a { color: #5c3d2e; }

/* 404 */
.bl-404 {
  text-align: center;
  padding: 4rem 1.25rem;
}
.bl-404 h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #5d3a1a;
}

/* ——— Pagination ——— */
.bl-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid #f5f5f4;
}
.bl-pag-btn,
.bl-pag-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #57534e;
  border: 1px solid #e7e5e4;
  background: #fff;
  transition: all 0.15s;
}
.bl-pag-num {
  width: 2.5rem;
  padding: 0;
}
.bl-pag-btn:hover,
.bl-pag-num:hover {
  border-color: #a8a29e;
  color: #1c1917;
}
.bl-pag-num.is-active {
  background: #5c3d2e;
  border-color: #5c3d2e;
  color: #fff;
}
.bl-pag-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  background: #fafaf9;
  border-color: #e7e5e4;
}
}
