/* components.css — 内页专用组件（颜色 / 字号 / 圆角一律 var(--…)，不写字面量）

   直接复用 style.css 里的组件，不要复制：
     .wrap .site-header .main-nav .nav-toggle .brand .btn-ghost .more
     .mini-card .col-head .cat-item .site-footer
   本文件只放内页新增区块：面包屑、列表页头条 / 工具条 / 卡片网格 / 栏目说明 / 相关链接、
   详情页文章头 / 目录 / 正文排印 / 参数表 / 相关阅读。 */

/* --------------------------------------------------------- 面包屑 */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: var(--fs-small);
  color: var(--muted);
}
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--accent); }
.crumb li::after { content: "/"; margin-left: 8px; color: var(--line); }
.crumb li:last-child::after { content: ""; }
.crumb li { display: flex; align-items: center; }
.crumb [aria-current="page"] { color: var(--ink); }

/* --------------------------------------------------- 列表页头条 */
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 6px 0 20px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  position: relative;
  padding-left: 16px;
  font-size: 34px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.page-hero h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
}
.page-hero .page-lead {
  margin-top: 12px;
  max-width: 760px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.page-hero .page-count {
  flex: none;
  font-size: var(--fs-small);
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ------------------------------------------------ 筛选 / 排序条 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.toolbar-label {
  font-size: var(--fs-small);
  color: var(--muted);
  letter-spacing: 0.08em;
}
.filter-tags,
.sort-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip,
.sort-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 5px 14px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.chip:hover,
.sort-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"],
.sort-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-deep);
}
.toolbar .count {
  margin-left: auto;
  font-size: var(--fs-small);
  color: var(--muted);
}
.toolbar .count strong { color: var(--ink); font-weight: 600; }
.list-empty {
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
}
[hidden] { display: none !important; }

/* --------------------------------------------------- 列表卡片网格 */
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 26px;
  padding: 26px 0 6px;
  margin: 0;
  list-style: none;
}
.list-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border-radius: 3px;
  background: var(--bg-soft);
}
.list-card .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.list-card h2 {
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
}
.list-card p {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}
.list-card a:hover h2 { color: var(--accent); }

/* ----------------------------------------------------- 栏目说明 */
.list-description {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 40px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}
.list-description h2 {
  font-size: 22px;
  letter-spacing: 0.04em;
}
.list-description .desc-body {
  columns: 2;
  column-gap: 40px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.list-description .desc-body p { margin: 0 0 12px; }

/* ------------------------------------------------------- 相关链接 */
.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line);
}
.link-row .label {
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.link-row a {
  font-size: 13px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.link-row a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------------------------- 文章头 */
.article-head {
  padding: 6px 0 22px;
  border-bottom: 1px solid var(--line);
}
.article-head h1 {
  max-width: 860px;
  font-size: 40px;
  line-height: 1.34;
  letter-spacing: 0.01em;
}
.article-head .article-lead {
  margin-top: 16px;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.byline {
  margin-top: 18px;
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --------------------------------------------------- 正文 + 目录 */
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding: 30px 0 10px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 88px;
}
.toc h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 10px;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.toc a:hover { color: var(--accent); }
.toc a[aria-current="true"] {
  color: var(--ink);
  border-left-color: var(--accent);
}
.article {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.95;
}
.article .article-intro {
  font-size: 16.5px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.article h2 {
  margin: 34px 0 12px;
  font-size: 23px;
  line-height: 1.5;
  scroll-margin-top: 96px;
}
.article p { margin: 0 0 16px; }
.article p + p { margin-top: -2px; }

/* ------------------------------------------------------- 参数表 */
.spec-table {
  margin: 24px 0 6px;
}
.spec-table h2 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.5;
  scroll-margin-top: 96px;
}
.spec-table p {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.spec-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.spec-table caption {
  caption-side: top;
  padding-bottom: 8px;
  font-size: var(--fs-tiny);
  color: var(--muted);
  text-align: left;
}
.spec-table th,
.spec-table td {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.spec-table thead th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-soft);
  border-top: 0;
}
.spec-table tbody th { font-weight: 600; color: var(--ink-soft); }

/* -------------------------------------------------------- 响应式 */
@media (max-width: 1100px) {
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; }
  .toc ol {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-left: 0;
    padding-bottom: 6px;
  }
  .toc a {
    margin-left: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    white-space: nowrap;
  }
  .toc a[aria-current="true"] { border-color: var(--accent); }
  .list-description { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .list-description .desc-body { columns: 1; }
}

@media (max-width: 720px) {
  .page-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-hero h1 { font-size: 27px; }
  .list-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .list-card h2 { font-size: 17px; }
  .article-head h1 { font-size: 27px; }
  .article { font-size: 15px; }
  .article h2 { font-size: 20px; }
  .toolbar .count { margin-left: 0; width: 100%; }
  .spec-table { overflow-x: auto; }
}

/* 正文配图 */
.article figure { margin: 20px 0; }
.article figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
