/* ══════════════════════════════════════════════════════════════════════════════════════════
   S4 — GIAO DIỆN TRANG CHUYÊN MỤC (archive) đồng bộ DNA bài viết v2.
   Phần phiên daunhots4 (chia đôi 21/10): gắn theme + khối chuyên mục. Cùng ngôn ngữ với
   thiet-ke/s4n-bai-viet-v2.css (TNS-OS): thép đậm + đỏ S4 dè sẻn + hổ phách; Barlow Semi Condensed
   (tiêu đề) + Be Vietnam Pro (thân). Phạm vi: CHỈ .s4n-cate (trang chuyên mục). Gỡ = bỏ enqueue.
   DN4-2610-089.
   ══════════════════════════════════════════════════════════════════════════════════════════ */

/* font: nap qua inc/perf.php (DN4-2611-004) */

.s4n-cate {
  /* 07-07 (23/10): dong bo mau blog ve bang mau site 13/10 (oxblood/charcoal/copper). */
  --s4-steel: var(--s4-charcoal,#17181B);
  --s4-ink: #1F2937;
  --s4-muted: var(--s4-muted,#6B6C70);
  --s4-line: var(--s4-border,#E4E2DD);
  --s4-surface: #F7F6F4;
  --s4-red: var(--s4-oxblood,#8C1C2B);
  --s4-amber: var(--s4-copper,#B08D57);
  --s4-navy: var(--s4-oxblood,#8C1C2B);
  --s4-f-head: 'Barlow Semi Condensed', 'Be Vietnam Pro', system-ui, sans-serif;
  --s4-f-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --s4-f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Tiêu đề hero chuyên mục + tiêu đề thẻ bài: dùng font đầu đề công nghiệp (thay serif Newsreader) */
.s4n-cate .s4n-hero-cnt h1,
.s4n-cate .s4n-hero h1 {
  font-family: var(--s4-f-head); font-weight: 700; letter-spacing: -.005em;
}
.s4n-cate .s4n-feat-tt,
.s4n-cate .s4n-card-tt,
.s4n-cate article h2,
.s4n-cate article h3 { font-family: var(--s4-f-head); }

/* ── SỬA LỖI: khối «Chuyên mục» + «Bài liên quan» bị bóp 2 cột trên trang archive → tên danh
   mục xuống dòng từng chữ (ảnh chủ dự án 21/10). Xếp dọc, danh sách đủ chiều ngang. ───────── */
.s4n-cate .s4n-cats,
.s4n-cate .s4n-rel { display: block !important; grid-template-columns: none !important; }
.s4n-cate .s4n-cats > *,
.s4n-cate .s4n-rel > * { width: 100% !important; max-width: none !important; float: none !important; }

.s4n-cate .s4n-side-t {
  font: 700 15px/1.2 var(--s4-f-head); text-transform: uppercase; letter-spacing: .06em;
  color: var(--s4-steel); padding-bottom: 10px; margin-bottom: 6px;
  border-bottom: 2px solid var(--s4-steel); position: relative;
}
.s4n-cate .s4n-side-t::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 36px; height: 2px; background: var(--s4-red);
}
.s4n-cate .s4n-catul { list-style: none; margin: 0; padding: 0; }
.s4n-cate .s4n-catul li { margin: 0; border-bottom: 1px solid var(--s4-line); }
.s4n-cate .s4n-catul li:last-child { border-bottom: 0; }
.s4n-cate .s4n-catul a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 10px 2px;
  font: 500 15px/1.35 var(--s4-f-body); color: var(--s4-ink); text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.s4n-cate .s4n-catul a:hover { color: var(--s4-red); padding-left: 6px; }
.s4n-cate .s4n-catul a span {
  flex: 0 0 auto; min-width: 30px; text-align: center;
  font: 600 12px/1 var(--s4-f-mono); color: var(--s4-muted);
  background: var(--s4-surface); border: 1px solid var(--s4-line); border-radius: 6px; padding: 6px 7px;
}
.s4n-cate .s4n-catul li.s4n-on a,
.s4n-cate .s4n-catul a:hover span { color: var(--s4-steel); }
.s4n-cate .s4n-catul li.s4n-on a { color: var(--s4-red); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .s4n-cate * { transition: none !important; }
}

/* ── DN4-2610-100: chuyên mục dạng page — khối nội dung biên tập giàu + «Bài nên đọc trước» ───── */
.s4n-cate .s4n-silo-intro {
  max-width: 820px; margin: 4px 0 26px;
  font: 400 16.5px/1.75 var(--s4-f-body); color: var(--s4-ink);
}
.s4n-cate .s4n-silo-intro p { margin: 0 0 14px; }
.s4n-cate .s4n-silo-intro p:last-child { margin-bottom: 0; }

.s4n-cate .s4n-silo-feat { margin: 4px 0 30px; }
.s4n-cate .s4n-silo-feat-tt,
.s4n-cate .s4n-grid-tt {
  font: 700 20px/1.25 var(--s4-f-head); color: var(--s4-steel);
  margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--s4-steel);
  position: relative; letter-spacing: .005em;
}
.s4n-cate .s4n-silo-feat-tt::after,
.s4n-cate .s4n-grid-tt::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 44px; height: 2px; background: var(--s4-red);
}
.s4n-cate .s4n-grid-tt { font-size: 18px; margin-top: 10px; }
.s4n-cate .s4n-silo-feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.s4n-cate .s4n-fc {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 16px 14px; background: #fff;
  border: 1px solid var(--s4-line); border-top: 3px solid var(--s4-red); border-radius: 8px;
  text-decoration: none; transition: box-shadow .2s ease, transform .2s ease;
}
.s4n-cate .s4n-fc:hover { box-shadow: 0 6px 20px rgba(17,24,39,.09); transform: translateY(-2px); }
.s4n-cate .s4n-fc-tt { font: 700 16px/1.35 var(--s4-f-head); color: var(--s4-steel); }
.s4n-cate .s4n-fc-ex { font: 400 13.5px/1.55 var(--s4-f-body); color: var(--s4-muted); }
.s4n-cate .s4n-fc-go {
  margin-top: auto; font: 600 13px/1 var(--s4-f-body); color: var(--s4-red);
  display: inline-flex; align-items: center; gap: 4px;
}
.s4n-cate .s4n-fc-go::after { content: "→"; transition: transform .2s ease; }
.s4n-cate .s4n-fc:hover .s4n-fc-go::after { transform: translateX(3px); }

@media (max-width: 849px) {
  .s4n-cate .s4n-silo-feat-grid { grid-template-columns: 1fr; }
  .s4n-cate .s4n-silo-intro { font-size: 16px; }
}
