/* components.css — 内页专用组件（环节 6）
   颜色/字号/圆角一律 var(--…)，变量来源 css/tokens.css
   直接复用 style.css：.wrap .site-header .site-nav .nav-toggle .brand
   .ribbon .panel .btn .text-link .site-footer .footer-*            */

/* ---------------------------------------------------------- 面包屑 */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.crumb a { color: var(--gold); border-bottom: 1px solid transparent; }
.crumb a:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }
.crumb span[aria-current] { color: var(--cream); }
.crumb .sep { color: rgba(217, 184, 119, 0.45); }

/* ---------------------------------------------------------- 内页标题区 */
.page-hero {
  position: relative;
  padding: 34px 0 30px;
  background:
    radial-gradient(110% 140% at 82% 0%, rgba(52, 90, 128, 0.32), transparent 62%),
    linear-gradient(180deg, #10223a 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner { display: grid; gap: 14px; }
.page-hero h1 {
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: 0.03em;
  color: #f4e7ca;
}
.page-hero-lede {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.8;
  color: #cfc3a9;
}
.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.page-hero-meta strong {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--gold-bright);
  margin-right: 4px;
}

/* ---------------------------------------------------------- 筛选与排序 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: -1px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f3e3c1 0%, #e6d1a8 55%, #dcc394 100%);
  border: 1px solid rgba(122, 90, 38, 0.6);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
  color: var(--ink);
}
.filter-bar h2 {
  font-size: 14px;
  color: #3a2a15;
  letter-spacing: 0.06em;
  margin-right: 2px;
}
.filter-btn {
  padding: 5px 12px;
  font-size: 12px;
  color: #4a3418;
  background: rgba(255, 248, 230, 0.45);
  border: 1px solid rgba(122, 90, 38, 0.4);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.filter-btn:hover { background: rgba(255, 250, 238, 0.8); border-color: #8e6b2c; }
.filter-btn.is-active {
  background: linear-gradient(180deg, #8e6b2c, #6d4f1d);
  border-color: #5d431a;
  color: #f6e9cc;
}
.filter-bar .spacer { flex: 1 1 20px; }
.filter-count { font-size: 12px; color: #5d4726; white-space: nowrap; }
.sort-label { font-size: 12px; color: #5d4726; cursor: pointer; }
.sort-select {
  padding: 5px 10px;
  font-size: 12px;
  color: #3a2a15;
  background: #f7ecd2;
  border: 1px solid rgba(122, 90, 38, 0.5);
  border-radius: 2px;
  cursor: pointer;
}
.sort-select:hover { border-color: #8e6b2c; }

/* ---------------------------------------------------------- 列表卡片 */
.catalog-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f4e5c4 0%, #e3cba1 100%);
  border: 1px solid rgba(122, 90, 38, 0.6);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.catalog-card:hover { transform: translateY(-3px); box-shadow: 0 20px 36px rgba(0, 0, 0, 0.34); }
.catalog-card a {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: 15px;
  height: 100%;
  color: inherit;
  padding: 13px 14px 13px 13px;
}
.catalog-card figure {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: start;
  height: 142px;
  margin: 0;
  overflow: hidden;
  background: #10233a;
  border: 1px solid rgba(82, 60, 24, 0.4);
}
.catalog-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.catalog-card:hover img { transform: scale(1.03); }
.catalog-year {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 1px 8px;
  font-family: var(--serif);
  font-size: 11.5px;
  color: #f0e0bd;
  background: linear-gradient(180deg, #8e6b2c, #6d4f1d);
  border: 1px solid #b89352;
  border-radius: 2px;
}
.catalog-tag {
  grid-column: 2;
  margin-top: 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #7a6134;
}
.catalog-card h2 {
  grid-column: 2;
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.45;
  color: #2c2011;
}
.catalog-card p {
  grid-column: 2;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: #55401f;
}
.catalog-more {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #6d4f1d;
}
.catalog-more svg { width: 14px; height: 14px; transition: transform 0.16s ease; }
.catalog-card:hover .catalog-more svg { transform: translateX(3px); }

.empty-state {
  margin-top: 24px;
  padding: 40px 24px;
  text-align: center;
  background: rgba(233, 212, 171, 0.06);
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
}
.empty-state p { color: var(--muted); font-size: 14px; }
.empty-state button {
  margin-top: 14px;
  padding: 8px 18px;
  font-size: 12px;
  color: #3a2a15;
  background: linear-gradient(180deg, #f2ddaa, #d5b071);
  border: 1px solid #e6cd97;
  border-radius: 3px;
  cursor: pointer;
}
.empty-state button:hover { background: linear-gradient(180deg, #f7e6b9, #ddba7d); }

/* ---------------------------------------------------------- 列表说明 */
.list-note {
  margin-top: 34px;
  padding: 26px 30px 28px;
  color: var(--ink);
  background: linear-gradient(160deg, #f3e3c1 0%, #e6d1a8 55%, #dcc394 100%);
  border: 1px solid rgba(122, 90, 38, 0.6);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
}
.list-note h2 { font-size: 21px; letter-spacing: 0.04em; color: #2c2011; }
.list-note p { margin-top: 10px; font-size: 13.5px; line-height: 1.9; color: #4f3c1f; }
.list-note p + p { margin-top: 8px; }

/* ---------------------------------------------------------- 分类入口 */
.cat-links { margin-top: 34px; }
.cat-links h2 { font-size: 20px; color: var(--gold-bright); }
.cat-links > p { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.cat-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.cat-link {
  display: block;
  padding: 12px 14px;
  background: rgba(233, 212, 171, 0.06);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.cat-link:hover { border-color: var(--gold); background: rgba(233, 212, 171, 0.12); }
.cat-link strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-bright);
}
.cat-link span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------- 详情页 */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 250px;
  justify-content: center;
  gap: 28px;
  align-items: start;
  padding-top: 30px;
  padding-bottom: 40px;
}
.article-sheet {
  padding: 34px 38px 40px;
  color: var(--ink);
  background: linear-gradient(170deg, #f7ead0 0%, #ead7b0 45%, #dcc394 100%);
  border: 1px solid rgba(122, 90, 38, 0.6);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
}
.article-hero { margin: 0 0 22px; }
.article-hero img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid rgba(82, 60, 24, 0.45);
}
.article-hero figcaption {
  margin-top: 6px;
  font-size: 11px;
  color: #6b542f;
}
.article-intro {
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 2px solid var(--gold-deep);
  font-size: 14px;
  line-height: 1.85;
  color: #4f3c1f;
}
.article-body > h2 {
  margin: 34px 0 12px;
  padding-bottom: 8px;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #2c2011;
  border-bottom: 1px solid rgba(122, 90, 38, 0.32);
}
.article-body > h2:first-of-type { margin-top: 6px; }
.article-body > p {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.95;
  color: #3d2e18;
}
.article-body > p + p { margin-top: -2px; }

/* 参数表 */
.fact-table {
  width: 100%;
  margin: 18px 0 10px;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.6;
  background: rgba(255, 248, 232, 0.38);
}
.fact-table caption {
  padding-bottom: 8px;
  text-align: left;
  font-family: var(--serif);
  font-size: 14px;
  color: #3a2a15;
}
.fact-table th,
.fact-table td {
  padding: 7px 12px;
  border: 1px solid rgba(122, 90, 38, 0.32);
  text-align: left;
}
.fact-table th {
  width: 128px;
  font-weight: 600;
  color: #4a3418;
  background: rgba(122, 90, 38, 0.12);
}
.fact-table td { color: #4f3c1f; }
.fact-note {
  margin: 8px 0 4px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: #5d4726;
  background: rgba(122, 90, 38, 0.09);
  border-left: 2px solid var(--gold-deep);
}

/* 侧边目录 */
.article-aside { position: sticky; top: 96px; display: grid; gap: 12px; }
.article-toc {
  padding: 16px 18px;
  color: var(--cream);
  background: linear-gradient(180deg, #14263d, #0d1c2e);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.article-toc h2 {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}
.article-toc p { margin-top: 6px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.article-toc ol { margin-top: 12px; display: grid; gap: 2px; counter-reset: toc; }
.article-toc li { counter-increment: toc; }
.article-toc a {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #d3c5a8;
  border-bottom: 1px solid rgba(217, 184, 119, 0.14);
  transition: color 0.16s ease;
}
.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--serif);
  color: var(--gold);
}
.article-toc a:hover,
.article-toc a.is-current { color: var(--gold-bright); }
.toc-toggle { display: none; cursor: pointer; }

/* FAQ */
.faq { margin-top: 34px; }
.faq h2 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  font-size: 24px;
  color: #2c2011;
  border-bottom: 1px solid rgba(122, 90, 38, 0.32);
}
.faq-item {
  border-bottom: 1px solid rgba(122, 90, 38, 0.28);
}
.faq-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: #33230f;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 18px;
  color: var(--gold-deep);
  transition: transform 0.18s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 2px 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #4f3c1f;
}
.faq-item summary:focus-visible { outline-offset: -2px; }

/* 相关推荐 */
.related { padding: 8px 0 42px; }
.related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.related-head h2 { font-size: 22px; color: var(--gold-bright); }
.related-head p { font-size: 12.5px; color: var(--muted); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.related-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: var(--ink);
  background: linear-gradient(180deg, #f4e5c4, #e3cba1);
  border: 1px solid rgba(122, 90, 38, 0.6);
  border-radius: 3px;
  transition: transform 0.16s ease;
}
.related-card:hover { transform: translateY(-2px); }
.related-card img { width: 92px; height: 96px; object-fit: cover; border: 1px solid rgba(82, 60, 24, 0.45); }
.related-body { display: block; }
.related-card strong { display: block; font-family: var(--serif); font-size: 15px; color: #2c2011; }
.related-card span { display: block; margin-top: 3px; font-size: 11px; color: #6b542f; }

/* ---------------------------------------------------------- 内页响应式 */
@media (max-width: 1100px) {
  .catalog-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr) 236px; gap: 20px; }
  .article-sheet { padding: 28px 26px 32px; }
}

@media (max-width: 900px) {
  .page-hero h1 { font-size: 32px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; order: -1; }
  .toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--gold-bright);
    background: #14263d;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    cursor: pointer;
  }
  .article-toc { margin-top: 8px; }
  .cat-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .page-hero { padding: 24px 0 22px; }
  .page-hero h1 { font-size: 27px; }
  .page-hero-lede { font-size: 14px; }
  .filter-bar { padding: 12px 14px; }
  .filter-btn { font-size: 11.5px; padding: 5px 9px; }
  .filter-bar .spacer { display: none; }
  .catalog-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.catalog-grid { grid-template-columns: 1fr; gap: 16px; }
  .catalog-card h2 { font-size: 16px; }
  .list-note { padding: 20px 18px 22px; }
  .list-note p { font-size: 12.5px; }
  .cat-link-grid { grid-template-columns: 1fr; }
  .article-sheet { padding: 20px 16px 26px; }
  .article-body > h2 { font-size: 20px; }
  .article-body > p { font-size: 13.5px; line-height: 1.9; }
  .fact-table { font-size: 11.5px; }
  .fact-table th { width: 92px; }
  .fact-table th, .fact-table td { padding: 6px 8px; }
  .related-card { grid-template-columns: 80px minmax(0, 1fr); }
  .related-card img { width: 80px; height: 86px; }
}

/* ---------------------------------------------------------- 数据对接补充 */
.catalog-card h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.catalog-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 6px;
}
.pager a, .pager span {
  padding: 6px 12px;
  font-size: 12px;
  color: #3a2a15;
  background: linear-gradient(180deg, #f2ddaa, #d5b071);
  border: 1px solid #c9a86a;
  border-radius: 3px;
}
.pager .current { background: var(--bg-deep); color: var(--gold-bright); border-color: var(--gold-deep); }
.pager .pager-count { background: none; border: none; color: var(--muted); }

.article-body figure { margin: 18px 0 6px; }
.article-body figure img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(82, 60, 24, 0.45);
}
.article-body figure figcaption { margin-top: 6px; font-size: 11px; color: #6b542f; }

.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(122, 90, 38, 0.32);
}
.article-nav a {
  flex: 1 1 240px;
  padding: 10px 12px;
  color: #2c2011;
  background: rgba(255, 248, 232, 0.45);
  border: 1px solid rgba(122, 90, 38, 0.4);
  border-radius: 3px;
}
.article-nav a:hover { border-color: #8e6b2c; }
.article-nav span { display: block; font-size: 10.5px; color: #7a6134; }
.article-nav strong { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; }
