/* ==========================================================================
   components.css — 内页专用组件（分类页 / 详情页）
   颜色/字号/圆角一律 var(--…)；首页组件（.hero* / .band / .age-grid）不搬进来。
   复用首页：.site-header .brand .site-nav .nav-toggle .mobile-nav .sec-head .sec-title
            .sec-sub .site-footer .footer-* .faq-item .step 等
   ========================================================================== */

/* ------------------------------------------------------------------ 面包屑 */
.crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: var(--fs-sm); color: var(--muted);
}
.crumb a { color: var(--muted); border-bottom: 1px solid transparent; }
.crumb a:hover, .crumb a:focus-visible { color: var(--accent-deep); border-bottom-color: currentColor; }
.crumb__sep { color: var(--muted-2); }
.crumb [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------- 列表页头部 */
.list-head {
  background: var(--cream-100);
  border-bottom: 1px solid var(--line);
}
.list-head__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 26px var(--gutter) 30px;
}
.list-title {
  margin-top: 14px;
  font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  color: var(--ink);
}
.list-lead {
  margin-top: 12px; max-width: 760px;
  font-size: var(--fs-lede); line-height: 1.85; color: var(--ink-soft);
}

/* --------------------------------------------------------------- 筛选排序 */
.filters__title {
  font-size: var(--fs-h3); font-weight: 800; color: var(--ink);
}
.filters {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 22px var(--gutter) 0;
  display: grid; gap: 12px;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-group__label {
  min-width: 66px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em;
  color: var(--muted-2);
}
label.filter-group__label { cursor: pointer; }
.filter-chip {
  appearance: none;
  padding: 7px 14px;
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font: inherit; font-size: var(--fs-sm);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.filter-chip:hover, .filter-chip:focus-visible { border-color: var(--accent-deep); color: var(--accent-ink); }
.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.filter-chip:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

.sort-wrap { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sort-select {
  appearance: none;
  padding: 7px 30px 7px 13px;
  background: #fffdfb url("../images/chevron.svg") no-repeat right 11px center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font: inherit; font-size: var(--fs-sm); color: var(--ink-soft);
  cursor: pointer;
}
.sort-select:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.result-count { font-size: var(--fs-xs); color: var(--muted); }
.result-count strong { color: var(--accent-deep); }

/* --------------------------------------------------------------- 列表网格 */
.list-body__title {
  font-size: var(--fs-h3); font-weight: 800; color: var(--ink);
  margin-bottom: 14px;
}
.list-body {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 24px var(--gutter) 0;
}
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.list-card {
  display: flex; flex-direction: column;
  padding: 16px 17px 18px;
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.list-card:hover, .list-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-s);
  transform: translateY(-2px);
}
.list-card[hidden] { display: none; }
.list-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-card__title { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.list-card__title a { border-bottom: 1px solid transparent; }
.list-card__title a:hover, .list-card__title a:focus-visible { border-bottom-color: var(--accent-deep); }
.list-card__age {
  flex: none;
  padding: 3px 9px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 700; color: var(--accent-ink);
  white-space: nowrap;
}
.list-card__desc { margin-top: 9px; font-size: var(--fs-xs); line-height: 1.8; color: var(--muted); }
.list-card__tags { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.list-card__tag {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 10.5px; color: var(--muted);
}
.list-card__tag--channel { border-color: var(--accent); color: var(--accent-ink); background: #fffaf0; }

.empty-state {
  padding: 34px 24px;
  background: var(--cream-100);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}
.empty-state[hidden] { display: none; }
.empty-state__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.empty-state__desc { margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }
.btn-reset {
  margin-top: 14px; appearance: none;
  padding: 8px 18px;
  background: var(--accent); border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink);
  cursor: pointer;
}
.btn-reset:hover, .btn-reset:focus-visible { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

.more-row { display: flex; justify-content: center; padding: 22px 0 0; }
.btn-more {
  appearance: none;
  padding: 11px 26px;
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--ink);
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.btn-more:hover, .btn-more:focus-visible { border-color: var(--accent-deep); color: var(--accent-deep); }
.btn-more[hidden] { display: none; }

/* ------------------------------------------------------------- 列表页说明 */
.list-seo {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 40px var(--gutter) 0;
}
.list-seo__title {
  font-size: var(--fs-h2); font-weight: 800; color: var(--ink);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.list-seo__body { margin-top: 18px; max-width: 1000px; }
.list-seo__body p {
  margin-top: 14px;
  font-size: 14px; line-height: 1.95; color: var(--ink-soft);
}
.list-seo__body p:first-child { margin-top: 0; }
.list-seo__sub {
  margin-top: 26px;
  font-size: 18px; font-weight: 800; color: var(--ink);
}

/* ------------------------------------------------------------- 相关分类 */
.related-cats {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 40px var(--gutter) 56px;
}
.related-cats__grid {
  margin-top: 16px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.related-cat {
  display: block;
  padding: 16px 17px 18px;
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}
.related-cat:hover, .related-cat:focus-visible { border-color: var(--accent-deep); transform: translateY(-2px); }
.related-cat__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.related-cat__desc { margin-top: 7px; font-size: var(--fs-xs); line-height: 1.75; color: var(--muted); }

/* ------------------------------------------------------------- 详情页头部 */
.article-head {
  background: var(--cream-100);
  border-bottom: 1px solid var(--line);
}
.article-head__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 26px var(--gutter) 32px;
}
.article-title {
  margin-top: 15px;
  font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  color: var(--ink);
}
.article-lead {
  margin-top: 14px; max-width: 820px;
  font-size: var(--fs-lede); line-height: 1.9; color: var(--ink-soft);
}
.article-meta {
  margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  font-size: var(--fs-xs); color: var(--muted);
}
.article-meta__tag {
  padding: 4px 11px;
  background: var(--accent); border-radius: var(--radius-pill);
  font-weight: 700; color: var(--accent-ink);
}

/* ---------------------------------------------------------------- 关键信息 */
.keyfact {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 22px var(--gutter) 0;
}
/* 关键信息：标题 + 四格参数条（与列表页同宽的卡片语言） */
.keyfact__title {
  margin-bottom: 12px;
  font-size: var(--fs-h3); font-weight: 800; color: var(--ink);
}
.keyfact__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.keyfact__item { padding: 14px 18px 16px; border-left: 1px solid var(--line); }
.keyfact__item:first-child { border-left: 0; }
.keyfact__label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--muted-2); }
.keyfact__value { margin-top: 6px; font-size: 14.5px; font-weight: 700; color: var(--ink); }

/* --------------------------------------------------------------- 正文两栏 */
.article-layout {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 34px var(--gutter) 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

/* 目录 */
.toc {
  position: sticky; top: calc(var(--header-h) + 22px);
  padding: 16px 16px 18px;
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; color: var(--muted-2);
}
/* 移动端把目录折叠成抽屉；桌面隐藏按钮 */
.toc-toggle {
  display: none;
  margin-top: 12px;
  appearance: none; padding: 4px 10px;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font: inherit; font-size: 10.5px; color: var(--muted);
  cursor: pointer;
}
.toc-list { margin-top: 12px; display: grid; gap: 2px; }
.toc-list a {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  font-size: var(--fs-sm); line-height: 1.5; color: var(--muted);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.toc-list a:hover, .toc-list a:focus-visible { color: var(--ink); background: #fffdfb; }
.toc-list a.is-current {
  border-left-color: var(--accent-deep);
  background: #fffdfb;
  color: var(--ink); font-weight: 700;
}

/* 正文 */
.article { max-width: 735px; }
.article-body > section + section { margin-top: 34px; }
.article-body h2 {
  position: relative;
  padding-left: 14px;
  font-size: 23px; font-weight: 800; line-height: 1.35; color: var(--ink);
}
.article-body h2::before {
  content: ""; position: absolute; left: 0; top: .28em;
  width: 4px; height: 1.05em; border-radius: 2px;
  background: var(--accent);
}
.article-body p {
  margin-top: 12px;
  font-size: 15px; line-height: 2; color: var(--ink-soft);
}
.article-body a { color: var(--accent-deep); border-bottom: 1px solid rgba(241, 82, 11, .35); }
.article-body a:hover, .article-body a:focus-visible { border-bottom-color: var(--accent-deep); }

/* 相关条目 / 上下篇 */
.related { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.related__title { font-size: var(--fs-h3); font-weight: 800; color: var(--ink); }
.related__grid { margin-top: 14px; display: grid; gap: 10px; }
.related-item {
  display: block;
  padding: 12px 15px 13px;
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .16s ease, transform .16s ease;
}
.related-item:hover, .related-item:focus-visible { border-color: var(--accent-deep); transform: translateX(2px); }
.related-item__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.related-item__desc { margin-top: 4px; font-size: var(--fs-xs); line-height: 1.7; color: var(--muted); }

.prevnext {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 30px var(--gutter) 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.prevnext__item {
  display: block;
  padding: 14px 17px 15px;
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .16s ease;
}
.prevnext__item:hover, .prevnext__item:focus-visible { border-color: var(--accent-deep); }
.prevnext__label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--muted-2); }
.prevnext__name { margin-top: 5px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.prevnext__item--next { text-align: right; }

.back-row {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 26px var(--gutter) 56px;
}
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--accent-deep);
}
.back-link:hover, .back-link:focus-visible { color: var(--ink); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; }
  .toc-toggle { display: inline-block; }
  .toc-list[hidden] { display: none; }
  .keyfact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyfact__item:nth-child(odd) { border-left: 0; }
  .keyfact__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .related-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .list-title, .article-title { font-size: 29px; }
  .list-grid { grid-template-columns: 1fr; }
  .related-cats__grid, .prevnext { grid-template-columns: 1fr; }
  .prevnext__item--next { text-align: left; }
  .sort-wrap { margin-left: 0; }
  .filter-group__label { min-width: 100%; }
}

/* --------------------------------------------------- 数据驱动补齐样式（列表/内页） */
.filter-chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-xs); color: var(--muted); background: #fff; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--accent-deep); color: var(--accent-deep); background: #fffaf0; }
.list-card__media { display: block; margin-top: 12px; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream-200); }
.list-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.list-card:hover .list-card__media img { transform: scale(1.04); }
.list-card__title a, .pick__name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.pager a, .pager span { display: inline-block; min-width: 36px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: var(--fs-xs); text-align: center; color: var(--muted); background: #fff; }
.pager a:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
.pager .is-current, .pager [aria-current="page"] { border-color: var(--accent-deep); background: var(--accent-deep); color: #fff; }
.pager .disabled, .pager .pager-gap { opacity: .55; }
.empty-state { margin-top: 24px; padding: 40px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state[hidden] { display: none; }
.empty-state__title { font-size: var(--fs-h3); font-weight: 700; color: var(--ink); }
.empty-state__desc { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.list-body .desc-body p { margin-bottom: 12px; font-size: var(--fs-sm); line-height: 1.85; color: var(--ink-soft); }
