/* ===== Cẩm nang (blog) — bổ sung ngoài Tailwind CDN. Nạp KÈM styles.css ===== */

/* ---- Prose thân bài (thay @tailwindcss/typography vì dùng Play CDN) ---- */
.article-body {
  color: #1c1714;
  font-size: 1.0625rem;
  line-height: 1.75;
}
.article-body > * + * { margin-top: 1.15rem; }

.article-body h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 700;
  color: #511309;
  margin-top: 2.6rem;
  margin-bottom: .35rem;
}
.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #94291a;
  margin-top: 1.8rem;
  margin-bottom: .25rem;
}
.article-body p { color: rgba(28, 23, 20, .82); }
.article-body strong { color: #1c1714; font-weight: 700; }
.article-body a {
  color: #b83822;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover { color: #94291a; }

.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-top: .4rem; color: rgba(28, 23, 20, .82); }
.article-body li::marker { color: #d6452f; }

.article-body blockquote {
  border-left: 3px solid #d6452f;
  padding: .6rem 1rem;
  color: rgba(28, 23, 20, .72);
  font-style: italic;
  background: #fef6f1;
  border-radius: 0 .6rem .6rem 0;
}
.article-body img {
  border-radius: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Bảng tra cứu — cuộn ngang trên mobile thay vì vỡ layout */
.article-body .table-wrap { overflow-x: auto; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.article-body th, .article-body td {
  border: 1px solid #fde8db;
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
.article-body th { background: #fef6f1; color: #94291a; font-weight: 700; }
.article-body tbody tr:nth-child(even) { background: rgba(251, 244, 236, .5); }

/* Callout an toàn / lưu ý */
.article-body .note {
  background: #fef6f1;
  border: 1px solid #fde8db;
  border-radius: .9rem;
  padding: 1rem 1.15rem;
  color: rgba(28, 23, 20, .82);
}

/* Neo cuộn cho mục lục — header sticky cao 64px (styles.css cũ chỉ áp section[id]/:target) */
.article-body :is(h2, h3)[id] { scroll-margin-top: 80px; }

/* ---- Mục lục (TOC) ---- */
.toc a { display: block; }

/* ---- Card bài viết: khung ảnh đồng đều dù ảnh gốc vuông ---- */
.post-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; height: auto; }

/* ---- Chip lọc danh mục ---- */
.cat-chip {
  font-size: .875rem;
  font-weight: 600;
  padding: .4rem .9rem;
  border-radius: 9999px;
  border: 1px solid #fde8db;
  color: #94291a;
  background: #fff;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.cat-chip:hover { border-color: #d6452f; }
.cat-chip[aria-pressed="true"] { background: #d6452f; border-color: #d6452f; color: #fff; }

/* ---- FAQ (accordion thuần <details>) ---- */
.faq-item { border: 1px solid #fde8db; border-radius: 1rem; background: #fff; }
.faq-item + .faq-item { margin-top: .75rem; }
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #94291a;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: #d6452f; flex: none; }
.faq-item[open] summary::after { content: "\2212"; } /* − */
.faq-item .faq-a { padding: 0 1.25rem 1.1rem; color: rgba(28, 23, 20, .82); line-height: 1.7; }

/* ---- Author box ---- */
.author-box { background: #fff; border: 1px solid #fde8db; border-radius: 1rem; }
