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

/* ---------- 通用 ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.crumb a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.crumb a:hover { color: var(--green-dark); border-color: currentColor; }
.crumb span[aria-current="page"] { color: var(--ink-soft); }

/* ---------- 列表页 ---------- */
.list-hero {
  padding: 38px 0 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.list-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  margin-top: 20px;
}

.list-hero h1 {
  font-size: clamp(36px, 3.6vw, 50px);
  line-height: 1.22;
  text-wrap: balance;
  margin-bottom: 14px;
}

.list-lead {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 720px;
}

.list-stats {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}
.list-stats li {
  padding-left: 11px;
  border-left: 2px solid var(--green);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  white-space: nowrap;
}

.toolbar {
  position: sticky;
  top: 70px;
  z-index: 40;
  background: rgba(251, 250, 246, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
}

.toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 10px 0;
}

.toolbar-title {
  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);
  white-space: nowrap;
}

.filter-group { display: flex; align-items: center; gap: 10px; }
.toolbar-label {
  font-size: 11.5px;
  color: var(--muted-light);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
label.toolbar-label { cursor: pointer; }

.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 31px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.chip:hover { border-color: var(--green); color: var(--green-dark); }
.chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.sort-select {
  height: 33px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

.result-count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.list-section { padding: 30px 0 44px; }

.list-head { margin-bottom: 16px; }
.list-head h2 {
  font-size: 26px;
  padding-left: 13px;
  position: relative;
  line-height: 1.2;
}
.list-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 3px;
  width: 3px;
  background: var(--green);
}
.list-head p { font-size: 12.5px; color: var(--muted); }

.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
}

.list-card { min-width: 0; }
.list-card[hidden] { display: none !important; }

.list-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.list-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-1);
  background: #e6e7e1;
}
.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.list-card-link:hover .list-thumb img { transform: scale(1.035); }

.card-cat {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--green);
}
.card-title {
  font-size: 19px;
  line-height: 1.55;
  margin: 5px 0 8px;
  transition: color 0.16s ease;
}
.list-card-link:hover .card-title { color: var(--green-dark); }
.card-summary {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.card-meta {
  margin-top: auto;
  padding-top: 11px;
  font-size: 11.5px;
  color: var(--muted-light);
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.list-seo {
  background: var(--bg-warm);
  padding: 40px 0 44px;
}
.list-seo-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.list-seo h2 {
  position: relative;
  font-size: 24px;
  padding-left: 13px;
  margin-bottom: 10px;
}
.list-seo h2::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 3px;
  width: 3px;
  background: var(--green);
}
.list-seo-lead { font-size: 13px; line-height: 1.8; color: var(--muted); }
.list-seo-grid > p {
  font-size: 14.5px;
  line-height: 2;
  color: var(--ink-soft);
}

.cross-links {
  background: var(--bg);
  padding: 24px 0 30px;
}
.cross-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.cross-inner h2 { font-size: 18px; }
.cross-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.cross-nav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.cross-nav a:hover { color: var(--green-dark); border-color: currentColor; }

/* ---------- 详情页 ---------- */
.article-head {
  padding: 34px 0 24px;
  background: var(--bg);
}
.article-head h1 {
  font-size: clamp(32px, 3.4vw, 45px);
  line-height: 1.3;
  max-width: 1040px;
  text-wrap: balance;
  margin: 16px 0 15px;
}
.article-lead {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 800px;
}
.article-meta {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.toc-wrap { margin-bottom: 8px; }
.toc {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: 13px 18px;
}
.toc h2 {
  flex: none;
  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);
  padding-top: 3px;
}
.toc ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc a {
  display: inline-block;
  padding: 2px 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.toc a:hover,
.toc a.is-active { color: var(--green-dark); border-color: currentColor; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 56px;
  align-items: start;
  padding: 18px 0 44px;
}

.article { min-width: 0; }
.article-intro {
  font-size: 18px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.article h2 {
  position: relative;
  scroll-margin-top: 92px;
  font-size: 27px;
  line-height: 1.4;
  margin: 36px 0 12px;
  padding-left: 12px;
}
.article h2::before {
  content: "";
  position: absolute;
  left: 0; top: 7px; bottom: 5px;
  width: 3px;
  background: var(--green);
}
.article p {
  font-size: 16.5px;
  line-height: 2;
  color: #303833;
  margin-top: 14px;
}
.article-intro + h2 { margin-top: 28px; }
.article figure { margin: 24px 0; }
.article figure img { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--r-1); display: block; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 34px 0 6px; font-size: 13px; color: var(--muted); }
.pager a, .pager .current { min-width: 32px; padding: 5px 10px; text-align: center; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--ink-soft); background: transparent; text-decoration: none; }
.pager a:hover { border-color: var(--green); color: var(--green-dark); }
.pager .current { background: var(--green); border-color: var(--green); color: #fff; }

.table-wrap {
  margin: 26px 0 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
}
.gear-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 560px;
}
.gear-table caption {
  text-align: left;
  padding: 13px 16px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-soft);
}
.gear-table th {
  background: var(--green-dark);
  color: #f2f4ee;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
}
.gear-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  line-height: 1.75;
  color: var(--ink-soft);
  vertical-align: top;
}
.gear-table tbody tr:nth-child(even) { background: #fbfaf6; }
.gear-table td:first-child { font-weight: 600; color: var(--ink); }

.article-aside { position: sticky; top: 94px; }
.keyfact {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: 18px 20px 16px;
}
.keyfact h2 { font-size: 17px; margin-bottom: 10px; }
.keyfact ol {
  list-style: decimal;
  padding-left: 18px;
  margin: 0;
}
.keyfact li {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  padding: 2px 0;
}
.keyfact p {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.related {
  background: var(--bg-warm);
  padding: 30px 0 38px;
}
.related .col-head { margin-bottom: 16px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.related-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.6;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.related-card svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--green); }
.related-card:hover { border-color: #c9d5cb; transform: translateY(-2px); }

/* ---------- 内页响应式 ---------- */
@media (max-width: 1024px) {
  .toolbar { position: static; }
  .list-hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .list-stats { padding-bottom: 0; }
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-seo-grid { grid-template-columns: 1fr; gap: 20px; }
  .article-layout { grid-template-columns: 1fr; gap: 28px; }
  .article-aside { position: static; }
  .related-grid { grid-template-columns: 1fr; }
  .cross-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sort-group { margin-left: 0; }
}

@media (max-width: 720px) {
  .list-hero { padding: 26px 0 24px; }
  .list-hero h1 { font-size: clamp(30px, 8vw, 38px); }
  .list-stats { flex-wrap: wrap; gap: 10px 18px; }
  .toolbar { top: 68px; }
  .toolbar-inner { gap: 8px; padding: 9px 0; }
  .toolbar-title { width: 100%; }
  .filter-group { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .filter-tags { flex-wrap: nowrap; }
  .chip { flex: none; }
  .sort-group { width: 100%; }
  .result-count { margin-left: auto; }
  .list-grid { grid-template-columns: 1fr; gap: 28px; }
  .list-thumb { aspect-ratio: 16 / 9; }
  .toc { flex-direction: column; gap: 8px; }
  .toc ol { gap: 4px 16px; }
  .article-head { padding: 24px 0 20px; }
  .article-head h1 { font-size: clamp(27px, 7.2vw, 34px); }
  .article-lead { font-size: 16px; }
  .article-layout { padding-top: 14px; gap: 24px; }
  .article h2 { font-size: 23px; }
  .article p { font-size: 15.5px; line-height: 1.95; }
  .article-intro { font-size: 16.5px; }
  .related { padding: 26px 0 30px; }
}

.crumb-sep::before {
  content: "/";
  color: var(--line-strong);
}
