/* 贵宾犬科普站 · 内页共享组件（分类页 / 详情页） */

/* ---------- 面包屑 ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 18px 0 0;
}
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.crumb span[aria-hidden] { color: #bfa68c; }
.crumb [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- 分类页头 ---------- */
.page-hero {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 24px;
  align-items: end;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { font-size: 13px; }
.page-hero h1 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 900;
  color: #38220f;
  margin: 8px 0 10px;
}
.page-hero .page-sub {
  font-size: 17px;
  font-weight: 700;
  color: #4a3120;
}
.page-hero .page-lead {
  max-width: 760px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.page-hero .hero-mark {
  justify-self: end;
  align-self: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbf2e3, #efdCBE);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #6b4520;
  text-align: center;
  transform: rotate(-5deg);
}
.page-hero .hero-mark .paw { width: 30px; height: 30px; color: var(--accent); }
.page-hero .hero-mark strong { font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.page-hero .hero-mark span { font-size: 10px; color: var(--muted); }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.toolbar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  appearance: none;
  border: 1px solid rgba(64, 42, 26, .22);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 32px;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fdf1de;
}
.sort-group { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.sort-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 32px;
}
.sort-btn:hover { color: var(--accent-ink); }
.sort-btn[aria-pressed="true"] { color: var(--ink); background: #fbf0df; border-color: var(--line); }
.result-count { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- 列表卡 ---------- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 0 8px;
}
.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  min-height: 176px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.entry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 132, 47, .55);
  box-shadow: 0 16px 32px rgba(92, 61, 28, .1);
}
.entry-card-link {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  color: inherit;
}
.entry-card-link:focus-visible { outline-offset: -3px; border-radius: var(--radius-sm); }
.entry-tag {
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
}
.entry-title {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #3a2413;
}
.entry-summary {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.entry-arrow {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.entry-arrow svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.entry-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

/* ---------- 分类说明 ---------- */
.list-desc {
  margin: 22px 0 8px;
  padding: 24px 26px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.list-desc h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
}
.list-desc p {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.list-desc p + p { margin-top: 8px; }

/* ---------- 相关分类 ---------- */
.related-cats { padding: 24px 0 34px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.015em;
}
.section-head .en-label { font-size: 9.5px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color .16s ease, transform .16s ease;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.related-card strong { font-size: 13px; font-weight: 800; }
.related-card span { font-size: 10.5px; line-height: 1.5; color: var(--muted); }

/* ---------- 详情页头 ---------- */
.article-head { padding: 10px 0 22px; border-bottom: 1px solid var(--line); }
.article-head h1 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #38220f;
  max-width: 960px;
  margin: 9px 0 12px;
}
.article-head .article-summary {
  max-width: 820px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.article-source { margin-top: 10px; font-size: 10.5px; color: #a58a72; }

/* ---------- 详情布局 ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  justify-content: space-between;
  gap: 44px;
  align-items: start;
  padding: 24px 0 34px;
}
.article-body { min-width: 0; }
.article-body h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #3a2413;
  margin: 30px 0 10px;
  scroll-margin-top: 20px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p {
  font-size: 14px;
  line-height: 1.95;
  color: #4f3825;
}
.article-body p + p { margin-top: 10px; }
.article-body strong { font-weight: 700; color: #3a2413; }
.article-body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 目录 ---------- */
.toc {
  position: sticky;
  top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
}
.toc h2 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.toc ol { display: flex; flex-direction: column; gap: 1px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #c3a887;
  font-size: 9px;
  font-weight: 700;
  padding-top: 2px;
}
.toc a:hover { background: var(--bg-soft); color: var(--accent-ink); }
.toc a.is-active { background: var(--accent-soft); color: #7a4514; font-weight: 700; }

/* ---------- 上下篇 ---------- */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 0;
}
.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  transition: border-color .16s ease;
}
.article-nav a:hover { border-color: var(--accent); }
.article-nav a:last-child { text-align: right; align-items: flex-end; }
.article-nav span { font-size: 9.5px; letter-spacing: .06em; color: var(--muted); }
.article-nav strong { font-size: 12.5px; font-weight: 700; line-height: 1.45; }

/* ---------- 相关条目 ---------- */
.related-entries {
  border-top: 1px solid var(--line);
  padding: 26px 0 36px;
}
.related-entries .entry-grid { padding: 14px 0 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.related-entries .entry-card { min-height: 140px; }

/* ---------- 内页响应式 ---------- */
@media (max-width: 1080px) {
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-entries .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; order: -1; }
  .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero { grid-template-columns: 1fr; align-items: start; }
  .page-hero .hero-mark { display: none; }
}

@media (max-width: 640px) {
  .entry-grid { grid-template-columns: 1fr; }
  .related-entries .entry-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .entry-card { min-height: 0; }
  .article-head h1 { font-size: 30px; }
  .article-body p { font-size: 14px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav a:last-child { text-align: left; align-items: flex-start; }
  .toc ol { grid-template-columns: 1fr; }
  .list-desc { padding: 18px; }
}

/* ---------- 数据对接补充（v1.1） ---------- */
.entry-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: #efe0cb;
  margin-bottom: 4px;
}
.entry-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.entry-meta { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.entry-card .entry-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.entry-card .entry-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.toolbar .chip { text-decoration: none; display: inline-flex; align-items: center; }
.toolbar .chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fdf1de;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px 0 8px;
}
.pager-btn, .pager-gap {
  min-width: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.pager-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.pager-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fdf1de;
}
.article-figure { margin: 16px 0 22px; }
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #efe0cb;
}
.related-cats { border-top: 1px solid var(--line); padding: 24px 0 40px; }
.related-cats .related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.related-cats .section-head { margin-bottom: 0; }
.category-index .cat-num {
  font-size: 9px;
  font-weight: 800;
  color: #b29577;
  letter-spacing: .06em;
}
@media (max-width: 1080px) {
  .related-cats .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .related-cats .related-grid { grid-template-columns: 1fr; }
  .entry-thumb { aspect-ratio: 16 / 9; }
}
