/* biabaflow.com — Docs / Posts / Category extra styles
   红黑主题，沿用 qpvwmrnxkltb.css 的 --red / --bg-card / --text-primary / --border 变量
   扩充：容器、Section 通用、文章页、教程列表、分类页、面包屑、TOC、FAQ
*/

/* ====== Container & 通用 ====== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  padding: 4px 12px;
  background: rgba(224,35,78,0.10);
  border: 1px solid rgba(224,35,78,0.25);
  border-radius: 100px;
}
.section-header h2 {
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.section-header p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}
.gradient-text {
  background: linear-gradient(135deg, #ff3d6e, #e0234e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ====== Breadcrumb ====== */
.crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  padding: 24px 0 8px;
}
.crumb a { color: var(--red); transition: color 0.2s; }
.crumb a:hover { color: var(--text-primary); }
.crumb__sep { color: var(--text-muted); }
.crumb__current { color: var(--text-secondary); }

/* ====== Docs Section（首页插入「最新教程」与「教程分类」） ====== */
.docs-section {
  padding: 80px 0;
  background: var(--bg-section);
  position: relative;
}
.docs-section + .docs-section { padding-top: 0; }

.docs-cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.docs-card {
  display: block;
  padding: 22px 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.docs-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(224,35,78,0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.docs-card:hover {
  border-color: rgba(224,35,78,0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(224,35,78,0.12);
}
.docs-card:hover::before { opacity: 1; }

.docs-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.docs-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}
.docs-card__list { list-style: none; padding: 0; margin: 12px 0 0; }
.docs-card__list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  display: flex;
  gap: 6px;
  line-height: 1.5;
}
.docs-card__bullet { color: var(--red); flex-shrink: 0; }
.docs-card__count {
  font-size: 12px;
  color: var(--red);
  margin-top: 12px;
  font-weight: 600;
}

/* ====== Post List（首页「最新教程」 / /docs/ 列表 / 分类页列表） ====== */
.postlist { list-style: none; padding: 0; margin: 0; }
.postlist__item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.postlist__item:last-child { border-bottom: none; }

.postlist__title {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.postlist__title:hover { color: var(--red); }

.postlist__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.postlist__chip {
  background: rgba(224,35,78,0.10);
  border: 1px solid rgba(224,35,78,0.30);
  color: var(--red);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.postlist__desc {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 14px;
}

.viewall { margin-top: 28px; text-align: center; }
.viewall a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}
.viewall a:hover { color: var(--text-primary); }

/* ====== Page Hero（教程列表 / 分类 / 文章 顶部） ====== */
.page-hero {
  padding: 64px 0 36px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 14px;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-hero__lede {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}
.page-hero__meta {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin-top: 18px; font-size: 13px; color: var(--text-muted);
}

/* ====== Article Body ====== */
.article { padding: 36px 0 72px; }
.article__layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  max-width: 1140px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .article__layout { grid-template-columns: 1fr; gap: 24px; }
}

.prose {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.85;
}
.prose h2 {
  font-size: 24px;
  margin: 44px 0 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  padding-top: 8px;
  scroll-margin-top: 88px;
}
.prose h3 {
  font-size: 18px;
  margin: 28px 0 12px;
  font-weight: 600;
  color: var(--text-primary);
  scroll-margin-top: 88px;
}
.prose p { margin: 14px 0; color: var(--text-secondary); }
.prose strong { color: var(--text-primary); font-weight: 700; }
.prose a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: rgba(224,35,78,0.4);
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.prose a:hover { color: var(--red-light); }
.prose ul, .prose ol { margin: 14px 0; padding-left: 28px; color: var(--text-secondary); }
.prose li { margin: 6px 0; line-height: 1.75; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.prose th {
  background: #1a1a1a;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
}
.prose tr:last-child td { border-bottom: none; }
.prose blockquote {
  border-left: 3px solid var(--red);
  padding: 6px 18px;
  margin: 18px 0;
  background: rgba(224,35,78,0.06);
  color: var(--text-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose code {
  background: #1a1a1a;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.88em;
  color: var(--red-light);
}
.prose pre {
  background: #0d0d0d;
  border: 1px solid var(--border);
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 18px 0;
  font-size: 13px;
}
.prose pre code { background: transparent; border: none; padding: 0; color: var(--text-secondary); }

/* ====== TOC ====== */
.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.toc__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.toc__list { list-style: none; padding: 0; margin: 0; }
.toc__item { padding: 4px 0; }
.toc__item a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: color 0.2s;
}
.toc__item--lv3 a { padding-left: 12px; font-size: 12.5px; color: var(--text-muted); }
.toc__item a:hover { color: var(--red); }
.toc__more {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
@media (max-width: 900px) {
  .toc { position: static; max-height: none; }
}

/* ====== Prev / Next ====== */
.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
@media (max-width: 640px) { .prevnext { grid-template-columns: 1fr; } }
.prevnext__item {
  display: block;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.prevnext__item:hover { border-color: rgba(224,35,78,0.45); }
.prevnext__lab {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}
.prevnext__t {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
  display: block;
}
.prevnext__next { text-align: right; }

/* ====== Pagination ====== */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.pager__btn, .pager__num {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.pager__btn:hover, .pager__num:hover {
  border-color: rgba(224,35,78,0.45);
  color: var(--text-primary);
}
.pager__num.is-current {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.pager__btn.is-disabled { opacity: 0.4; pointer-events: none; }

/* ====== FAQ ====== */
.faq { margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq__q {
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  position: relative;
  font-size: 15px;
  transition: color 0.2s;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--red);
  font-size: 22px;
  transition: transform 0.2s;
}
details[open] .faq__q::after { content: '−'; }
.faq__a {
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ====== Chip ====== */
.chip {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(224,35,78,0.10);
  border: 1px solid rgba(224,35,78,0.30);
  color: var(--red);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}
.chip:hover { background: rgba(224,35,78,0.2); color: var(--text-primary); }

/* ====== 404 ====== */
.err-404 {
  text-align: center;
  padding: 120px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.err-404__code {
  font-size: 6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ff3d6e, #e0234e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}
.err-404__title { font-size: 28px; color: var(--text-primary); margin-bottom: 14px; }
.err-404__body { color: var(--text-secondary); margin-bottom: 30px; }

/* ====== Btn 兼容（babianai 模板里有 .btn .btn-primary 双类） ====== */
.btn { display: inline-flex; align-items: center; gap: 8px; }
.btn.btn-primary,
.btn.btn-outline { /* nothing — single class already defined in qpvwmrnxkltb.css */ }

/* ====== Nav active 标识 ====== */
.nav-links a.is-active { color: var(--text-primary); }

/* ====== 首页 hero 兜底（base.njk 顶部带固定 nav，避免覆盖 landing hero） ====== */
.preview-frame, .preview-bar, .preview-body, .preview-panel, .hero-trust, .hero-badge-dot, .gradient-text { display: revert; }
