/* ============================================================
   style.css — 首页 / 分类页 / 详情页布局
   区块高度按 03-ui/compare-log.md 的分区预算落位
   ============================================================ */

/* ------------------------------------------------ 首屏 M1 */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 30px 0 30px;
  overflow: hidden;
  background: linear-gradient(180deg, #f9ecd5 0%, #f7e9ce 100%);
}
.hero-art {
  position: absolute;
  top: 0; right: 0;
  width: 62%;
  height: 100%;
  pointer-events: none;
}
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 46%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 14%, rgba(0,0,0,.4) 34%, #000 62%);
  mask-image: linear-gradient(to right, transparent 0%, transparent 14%, rgba(0,0,0,.4) 34%, #000 62%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-copy { max-width: 46%; }
.hero h1 {
  font-size: 62px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.hero-lead {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 27em;
}
.hero-actions { margin-top: 22px; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.hero-meta a { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--ink-3); }
.hero-meta b { font-weight: 600; color: var(--ink); }

/* ------------------------------------------------ 分类索引 M2 */
.categories { padding: 16px 0 44px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}
.category-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.category-card .card-media { aspect-ratio: 16 / 10; }
.category-body { padding: 9px 12px 11px; }
.category-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 6px;
}
.category-num {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.category-head h3 {
  font-size: 14.5px;
  line-height: 1.35;
}
.category-body p {
  font-size: 11.8px;
  line-height: 1.72;
  color: var(--ink-2);
}

/* ------------------------------------------------ 品种速览 M3 */
.breeds { padding: 10px 0 18px; }
.breed-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}
.breed-mini {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.breed-mini:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.breed-mini .card-media { aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); }
.breed-mini-body { padding: 6px 9px 8px; }
.breed-mini-body h3 {
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breed-mini-body p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.breed-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 600;
  text-align: left;
}
.breed-more svg { width: 16px; height: 16px; }
.breed-more:hover { background: #e9d3b1; }

/* ------------------------------------------------ 三步判断 M4 */
.care-path {
  background: var(--bg-band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 38px 0 42px;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-left: 54px;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg-panel);
}
.step h3 { font-size: 16px; margin-bottom: 5px; }
.step p { font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }

/* ------------------------------------------------ 收录说明 M5 */
.scope { padding: 20px 0 24px; }
.scope-inner {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr 0.8fr;
  gap: 28px;
  align-items: start;
}
.scope-art {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-panel);
  height: 168px;
}
.scope-art img { width: 100%; height: 100%; object-fit: cover; }
.scope-copy p {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
}
.scope-copy p + p { margin-top: 12px; }
.scope-copy strong { color: var(--ink); font-weight: 700; }
.scope-note {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-panel);
}
.scope-note .note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.scope-note .note-head svg { width: 17px; height: 17px; color: var(--accent); }
.scope-note p { font-size: 11.5px; line-height: 1.85; color: var(--ink-2); }

/* ------------------------------------------------ 四条底线 M6 */
.tips { padding: 40px 0 46px; }
.tip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.tip {
  display: flex;
  gap: 10px;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(253, 246, 230, 0.55);
}
.tip-icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.tip-icon svg { width: 19px; height: 19px; }
.tip h3 { font-size: 14px; margin-bottom: 3px; }
.tip p { font-size: 11.8px; line-height: 1.8; color: var(--ink-2); }

/* ------------------------------------------------ 二次分流 M7 */
.cta-band {
  position: relative;
  margin-top: 8px;
  background: #f0ddbe;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(240,221,190,.15) 0%, rgba(240,221,190,.7) 26%, #f0ddbe 52%);
  pointer-events: none;
}
.cta-art {
  position: absolute;
  left: 0; top: 0;
  width: 42%;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}
.cta-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 45%, transparent 88%);
  mask-image: linear-gradient(to right, #000 0%, #000 45%, transparent 88%);
}
.cta-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  min-height: 210px;
  padding: 20px 0 20px 30%;
}
.cta-copy { max-width: 40em; }
.cta-copy h2 { font-size: 29px; letter-spacing: 0.03em; margin-bottom: 10px; }
.cta-copy p { font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.cta-actions { display: flex; flex-direction: column; gap: 10px; min-width: 176px; }
.cta-actions .btn { justify-content: space-between; width: 100%; }

/* ------------------------------------------------ 页脚 */
.footer-inner { padding-top: 8px; }
.footer-about { min-width: 0; }

/* ============================================================
   分类页 category.html
   ============================================================ */
.page-hero {
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8ead2 0%, #f9ecd5 100%);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb svg { width: 12px; height: 12px; }
.page-hero h1 { font-size: 40px; }
.page-hero .page-lead {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 46em;
}
.page-stats {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.page-stats li { display: flex; align-items: baseline; gap: 5px; }
.page-stats b { font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 16px; color: var(--ink); }

.list-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 236, 213, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px var(--gutter);
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group > span { font-size: 12px; color: var(--ink-3); }
.chip {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.toolbar-spacer { flex: 1 1 auto; }
.sort-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  font-size: 12.5px;
  color: var(--ink);
}
.result-count { font-size: 12px; color: var(--ink-3); min-width: 92px; text-align: right; }

.breed-list { padding: 26px 0 10px; }
.breed-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.breed-list-head h2 { font-size: 24px; }
.breed-list-head p { font-size: 12.5px; color: var(--ink-3); }
.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.breed-card { position: relative; }
.breed-card .card-media { aspect-ratio: 16 / 10; }
.card-hit { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.breed-card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.breed-card .card-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 17px; }
.breed-card .latin { font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 11px; font-style: italic; color: var(--ink-3); font-weight: 400; }
.breed-card .summary {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.empty-state {
  padding: 40px 0 50px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}
.empty-state[hidden] { display: none; }

.list-description {
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}
.list-description .desc-inner { max-width: 900px; }
.list-description h2 { font-size: 23px; margin-bottom: 12px; }
.list-description p {
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink-2);
}

.next-read {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 0 40px;
}
.next-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-panel);
}
.next-card h3 { font-size: 15px; margin-bottom: 6px; }
.next-card p { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.next-read-head { padding: 0 0 16px; }
.next-read-head h2 { font-size: 20px; }

/* ============================================================
   详情页 detail.html
   ============================================================ */
.article-wrap { padding: 22px var(--gutter) 44px; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 44px;
  align-items: start;
}
.article-head { margin-bottom: 26px; }
.article-head .breadcrumb { margin-bottom: 14px; }
.fact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.article-head h1 { font-size: 44px; margin-bottom: 12px; }
.article-lead {
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-2);
}
.fact-media {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-panel);
}
.fact-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fact-table {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.fact-row dt { color: var(--ink-3); }
.fact-row dd { margin: 0; font-weight: 600; }

.toc {
  position: sticky;
  top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-panel);
}
.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}
.toc-toggle {
  display: none;
  order: 2;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.toc ol { counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 10.5px;
  color: var(--ink-3);
  padding-top: 2px;
}
.toc a:hover, .toc a.is-active { color: var(--accent); }
.toc a.is-active::before { color: var(--accent); }

.article-body { max-width: 760px; }
.article-body > p {
  font-size: 14.5px;
  line-height: 2;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.article-body h2 {
  font-size: 25px;
  margin: 34px 0 12px;
  scroll-margin-top: 24px;
}
.article-body h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 10px;
}
.article-body section p {
  font-size: 14px;
  line-height: 2.05;
  color: var(--ink-2);
}

.related { border-top: 1px solid var(--line); padding: 28px 0 46px; }
.related h2 { font-size: 23px; margin-bottom: 16px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.related-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-panel); }
.related-card:hover { border-color: var(--line-strong); }
.related-card img { width: 92px; height: 76px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); flex: 0 0 auto; }
.related-card h3 { font-size: 14.5px; margin-bottom: 4px; }
.related-card p { font-size: 12px; line-height: 1.75; color: var(--ink-2); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1200px) {
  .hero h1 { font-size: 48px; }
  .hero-copy { max-width: 52%; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .breed-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .scope-inner { grid-template-columns: 1fr 1fr; }
  .scope-note { grid-column: 1 / -1; }
  .footer-top { grid-template-columns: 1fr 1.3fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    top: var(--h-header);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 14px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .main-nav a[aria-current="page"] { color: var(--accent); }
  .nav-toggle { display: inline-flex; }

  .hero { flex-direction: column; align-items: stretch; padding: 18px 0 30px; min-height: 0; }
  .hero-art { position: relative; width: 100%; height: 240px; margin-bottom: 18px; order: -1; }
  .hero-art img { -webkit-mask-image: none; mask-image: none; object-position: center 45%; }
  .hero-inner { display: flex; flex-direction: column; }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: 38px; }
  .hero-lead { font-size: 15px; }

  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breed-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-grid { grid-template-columns: 1fr; gap: 20px; }
  .scope-inner { grid-template-columns: 1fr; }
  .tip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-art { width: 46%; opacity: .55; }
  .cta-inner { grid-template-columns: 1fr; gap: 18px; min-height: 0; }
  .cta-actions { flex-direction: row; }
  .cta-actions .btn { width: auto; min-width: 160px; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }

  .breed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 22px; }
  .toc { position: static; }
  .toc-toggle { display: inline-block; }
  .fact-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .next-read { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .logo-text { font-size: 16px; }
  .hero h1 { font-size: 30px; }
  .hero-art { height: 180px; }
  .hero-meta { gap: 10px; font-size: 11.5px; }
  .hero-meta li + li { padding-left: 10px; }
  .section-title { font-size: 21px; gap: 10px; }
  .section-title::before, .section-title::after { width: 24px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { flex-direction: row; }
  .category-card .card-media { width: 104px; aspect-ratio: 1 / 1; border-bottom: 0; border-right: 1px solid var(--line); flex: 0 0 auto; }
  .breed-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breed-more { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .tip-grid { grid-template-columns: 1fr; }
  .cta-art { display: none; }
  .cta-inner { padding: 26px 0; }
  .cta-copy h2 { font-size: 24px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .breed-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 30px; }
  .breed-list-head { flex-direction: column; gap: 4px; }
  .result-count { text-align: left; }
  .article-head h1 { font-size: 32px; }
  .article-body h2 { font-size: 21px; }
  .related-card { flex-direction: row; }
}

/* ============================================================
   2026-11-13 数据化追加：分类内容带 / 服务端分页 / 详情页补充
   ============================================================ */

/* 分类 chip（服务端 <a> 链接版，替代 button[aria-pressed]） */
a.chip { display: inline-flex; align-items: center; text-decoration: none; }
a.chip:hover { border-color: var(--line-strong); text-decoration: none; }
a.chip.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* 卡片标题与摘要截断，保证等高 */
.breed-card .card-title { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.breed-card .summary { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.breed-mini-body h3 { word-break: break-word; }

/* M4 分类内容带 */
.cat-section { padding: 26px 0 6px; }
.cat-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cat-section-head .section-title { margin: 0; justify-content: flex-start; }
.cat-section-more { font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.cat-section-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.cat-post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.cat-post {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.cat-post:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.cat-post a { display: block; }
.cat-post .thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.cat-post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-post h3 {
  padding: 10px 12px 0;
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.cat-post p {
  padding: 5px 12px 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-post-meta { display: block; padding: 8px 12px 11px; font-size: 11px; color: var(--ink-3); }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 6px;
}
.pager-link,
.pager-current,
.pager-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--bg-panel);
}
.pager-link:hover { border-color: var(--line-strong); color: var(--ink); }
.pager-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pager-gap { border-color: transparent; background: transparent; }
.pager-info { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* 详情页正文插图 */
.article-body figure { margin: 20px 0 6px; }
.article-body figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-soft);
}
.article-note {
  margin-top: 26px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-soft);
  background: var(--bg-band);
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-3);
}

/* 上下篇 */
.detail-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.dn-item {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-panel);
  min-width: 0;
}
.dn-item:hover { border-color: var(--line-strong); }
.dn-empty { border: 0; background: transparent; }
.dn-label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.dn-title {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.dn-next { text-align: right; }

/* 相关卡片标题与摘要截断 */
.related-card h3 { -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.related-card p { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 1200px) {
  .cat-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cat-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-nav { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cat-post-grid { grid-template-columns: 1fr; }
  .cat-section-head .section-title { justify-content: center; }
  .pager-info { margin-left: 0; width: 100%; }
}

/* 移动端筛选条换行（11 个 chip 不换行会横向溢出） */
.toolbar-inner .filter-group { flex-wrap: wrap; row-gap: 8px; min-width: 0; }
.toolbar-inner .filter-group > span { flex: 0 0 auto; }
@media (max-width: 900px) {
  .toolbar-inner { gap: 10px; }
  .toolbar-inner .filter-group { flex: 1 1 100%; }
  .toolbar-inner .result-count { flex: 1 1 100%; text-align: left; }
}
