/* style.css — 页面布局与分区预算
   设计基准 1440；区块高度按 03-ui/ui-spec.md 的分区预算落位（整页 2160）。
   分区预算（1440 基准）：header 68 / hero 390 / 品类索引 229 / 尺寸对照 182 /
   结构对照 168 / 精选条目 168 / 材质对照 167 / 选购四步 126 / 按空间挑 190 /
   打理成本+收录说明 165 / 常见问题 135 / 页脚 92。
   列数：品类 4、尺寸 2、结构 5、精选 3、材质 6、四步 4、空间 5、问答 2。 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 10px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: var(--fw-black);
  letter-spacing: -0.01em;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

button {
  font-family: inherit;
}

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 45px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ================= M1 hero ================= */
.hero {
  padding-top: 0;
  margin-bottom: 13px;
  background: var(--panel-soft);
}

/* 稿上首屏照片出血到视口右缘：hero 这一行取消右侧内边距 */
.hero .wrap {
  padding-right: 0;
  max-width: none;
  padding-left: max(45px, calc((100vw - 1440px) / 2 + 45px));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 745px;
  align-items: center;
  gap: 44px;
  height: 390px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 6px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: var(--fs-h1);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 470px;
  font-size: var(--fs-8);
  line-height: 1.85;
  color: var(--body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 560px;
}

.hero-stat dt {
  font-family: var(--serif);
  font-size: var(--fs-8);
  font-weight: var(--fw-black);
  color: var(--ink);
  line-height: 1.3;
}

.hero-stat dd {
  font-size: var(--fs-3);
  color: var(--muted);
  line-height: 1.5;
}

.hero-media {
  position: relative;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px 0 0 14px;
}

/* ================= 分区骨架 ================= */
/* 稿上的节奏：每个内容带是整幅暖米色面板，带与带之间露出页面底色（约 14px）。
   这一段是「分区 + 面板」的骨架，不改变任何列数。 */
.section {
  padding: 8px 0;
  margin-bottom: 9px;
  background: var(--panel);
}

.section--tight {
  padding: 8px 0;
}

/* 分区预算落位：min-height + 带间露底节奏来自 03-ui/compare-log.md 的量稿预算（1440 基准）。
   目标：整页 2160，带间空隙 11–13px，每个带高度按稿的密度压缩后落位。 */
.sec-category { min-height: 226px; }
.sec-sizes    { min-height: 182px; }
.sec-struct   { min-height: 156px; }
.sec-featured { min-height: 153px; }
.sec-material { min-height: 152px; }
.sec-steps    { min-height: 120px; }
.sec-rooms    { min-height: 176px; }
.sec-care     { min-height: 130px; }
.sec-faq      { min-height: 100px; }

.section {
  margin-bottom: 11px;
}

.section:last-of-type {
  margin-bottom: 0;
}

.sec-category,
.sec-sizes,
.sec-struct,
.sec-featured,
.sec-material,
.sec-steps,
.sec-rooms,
.sec-care,
.sec-faq {
  display: flex;
  align-items: center;
}

.sec-category > .wrap,
.sec-sizes > .wrap,
.sec-struct > .wrap,
.sec-featured > .wrap,
.sec-material > .wrap,
.sec-steps > .wrap,
.sec-rooms > .wrap,
.sec-care > .wrap,
.sec-faq > .wrap {
  width: 100%;
}

.split {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: var(--label-gap);
  align-items: start;
}

.split-label h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  line-height: 1.25;
}

.split-body {
  min-width: 0;
}

/* ================= M2 品类索引 ================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.cat-grid > li {
  min-width: 0;
}

/* ================= M3 尺寸对照 ================= */
.size-head {
  display: flex;
  gap: 12px;
  padding: 0 10px 6px;
  font-size: var(--fs-2);
  color: var(--muted);
  letter-spacing: 0.12em;
}

.size-head span:first-child {
  width: 92px;
  flex: none;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.size-row {
  padding: 2px 10px;
  border-bottom: 1px solid var(--line);
}

.size-grid .size-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.size-name {
  display: inline-block;
  width: 92px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  vertical-align: baseline;
}

.size-val {
  font-size: var(--fs-3);
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.size-why {
  display: block;
  margin-top: 0;
  padding-left: 92px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}

/* ================= M4 结构对照 ================= */
.struct-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

/* ================= M5 精选条目 ================= */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* ================= M6 材质对照 ================= */
.mat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

/* ================= M7 选购四步 ================= */
.step-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

/* ================= M8 按空间挑 ================= */
.room-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

/* ================= M9 打理成本 + M10 收录说明 ================= */
.care-band {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* ================= M11 常见问题 ================= */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

/* ================= 响应式 ================= */
@media (max-width: 1180px) {
  :root {
    --label-col: 260px;
    --label-gap: 40px;
    --fs-h1: 52px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 520px;
    height: 360px;
  }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .struct-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .feat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .care-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .wrap {
    padding: 0 28px;
  }

  .header-inner {
    gap: 14px;
    overflow: hidden;
  }

  .nav {
    margin-left: auto;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    font-size: var(--fs-4);
  }

  .header-cta {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    gap: 20px;
    padding: 22px 0 0;
  }

  .hero-media {
    height: 240px;
  }

  .hero-stats {
    gap: 22px;
  }

  .section {
    padding: 30px 0;
  }

  .section--tight {
    padding: 22px 0;
  }

  .size-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .size-head {
    display: none;
  }

  .size-row {
    grid-template-columns: 96px minmax(0, 1fr);
    row-gap: 2px;
  }

  .size-why {
    grid-column: 2;
  }

  .struct-row,
  .mat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    flex-direction: column;
    gap: 18px;
  }

  .footer-col,
  .footer-col--brand {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --fs-h1: var(--fs-h1-mobile);
    --fs-h2: var(--fs-h2-mobile);
  }

  .wrap {
    padding: 0 18px;
  }

  .hero h1 {
    font-size: var(--fs-h1-mobile);
  }

  .hero-media {
    height: 200px;
  }

  .hero-stats {
    gap: 14px;
  }

  .hero-stat {
    flex: 1 1 40%;
  }

  .cat-grid,
  .feat-grid,
  .struct-row,
  .mat-grid,
  .step-row,
  .room-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .care-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .footer-grid {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* =====================================================================
   内页（category.html / detail.html）
   ===================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-3);
  color: var(--muted);
  margin-bottom: 12px;
}

.crumbs a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.crumbs a:hover {
  color: var(--accent);
  border-bottom-color: var(--line-strong);
}

.crumbs > * + *::before {
  content: "/";
  margin: 0 7px 0 1px;
  color: rgba(120, 72, 40, 0.35);
}

/* ---------------- 分类页 L1 分类头 ---------------- */
.page-hero {
  padding: 26px 0 24px;
  background: linear-gradient(180deg, var(--panel-soft), var(--bg));
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: var(--fs-17);
  line-height: 1.15;
  margin: 4px 0 8px;
}

.page-lead {
  max-width: 620px;
  font-size: var(--fs-8);
  line-height: 1.8;
  color: var(--body);
}

/* ---------------- L2 筛选条 ---------------- */
.filter-band {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(252, 249, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.filter-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: var(--fs-2);
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-right: 2px;
}

.filter-group button {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--body);
  font-size: var(--fs-3);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.filter-group button:hover {
  border-color: var(--line-strong);
  background: rgba(120, 72, 40, 0.06);
}

.filter-group button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-dark);
  font-weight: var(--fw-bold);
}

.filter-sort {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-3);
  color: var(--muted);
}

.filter-sort select {
  height: 28px;
  cursor: pointer;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--body);
  font-family: inherit;
  font-size: var(--fs-3);
  cursor: pointer;
}

.filter-count {
  margin-left: auto;
  font-size: var(--fs-3);
  color: var(--muted);
}

.filter-count span {
  color: var(--accent);
  font-weight: var(--fw-bold);
}

/* ---------------- L3 条目网格 ---------------- */
.card-section {
  padding-top: 26px;
}

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

.entry {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.entry > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.entry > a:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.entry img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--panel-soft);
  transition: transform 0.4s ease;
}

.entry > a:hover img {
  transform: scale(1.03);
}

.entry-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 14px 15px;
}

.entry-tags {
  font-size: var(--fs-2);
  letter-spacing: 0.08em;
  color: var(--accent);
}

.entry h3 {
  font-family: var(--serif);
  font-size: var(--fs-9);
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-body p:not(.entry-tags):not(.entry-meta) {
  font-size: var(--fs-5);
  line-height: 1.7;
  color: var(--body);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: var(--fs-2);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.empty {
  margin-top: 22px;
  padding: 18px;
  text-align: center;
  font-size: var(--fs-6);
  color: var(--muted);
  background: var(--panel);
  border-radius: var(--radius-card);
}

.empty-reset {
  margin-left: 8px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--accent);
  font-size: var(--fs-3);
  cursor: pointer;
}

/* ---------------- L4 列表说明 ---------------- */
.desc-section {
  margin-top: 30px;
}

.desc-inner {
  max-width: 860px;
}

.desc-inner h2 {
  font-family: var(--serif);
  font-size: var(--fs-14);
  line-height: 1.35;
  margin-bottom: 12px;
}

.desc-inner p {
  margin-bottom: 12px;
  font-size: var(--fs-8);
  line-height: 1.95;
  color: var(--body);
}

.desc-inner p:last-child {
  margin-bottom: 0;
}

/* ---------------- L5 相关分类 ---------------- */
.related-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.related-section h2 {
  font-family: var(--serif);
  font-size: var(--fs-13);
  margin-bottom: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.related-grid a {
  display: block;
  height: 100%;
  padding: 13px 14px;
  background: var(--panel);
  border-radius: var(--radius-card);
  transition: background 0.18s ease;
}

.related-grid a:hover {
  background: var(--panel-warm);
}

.related-grid strong {
  display: block;
  font-family: var(--serif);
  font-size: var(--fs-8);
  color: var(--ink);
  margin-bottom: 4px;
}

.related-grid span {
  font-size: var(--fs-3);
  line-height: 1.6;
  color: var(--body);
}

/* ---------------- 详情页 D1 文章头 ---------------- */
.article-head {
  padding: 24px 0 20px;
  background: linear-gradient(180deg, var(--panel-soft), var(--bg));
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: var(--fs-2);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.article-tags span {
  padding-left: 8px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
}

.article-head h1 {
  font-family: var(--serif);
  font-size: var(--fs-16);
  line-height: 1.25;
  max-width: 800px;
}

.article-lead {
  max-width: 720px;
  margin-top: 10px;
  font-size: var(--fs-9);
  line-height: 1.85;
  color: var(--body);
}

/* ---------------- 详情页布局 ---------------- */
.article-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 46px;
  padding-top: 26px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  padding: 14px 16px;
  background: var(--panel);
  border-radius: var(--radius-card);
}

.toc-title {
  margin-bottom: 8px;
  font-size: var(--fs-2);
  letter-spacing: 0.14em;
  color: var(--muted);
}

.toc ol {
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc li + li {
  margin-top: 2px;
}

.toc a {
  display: block;
  padding: 5px 0 5px 20px;
  position: relative;
  font-size: var(--fs-5);
  line-height: 1.55;
  color: var(--body);
  border-radius: 6px;
  transition: color 0.16s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 5px;
  font-size: 10px;
  color: rgba(120, 72, 40, 0.45);
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  color: var(--accent);
}

.toc a.is-active {
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.toc a.is-active::before {
  color: var(--accent);
}

/* ---------------- 详情页正文 ---------------- */
.article-body {
  max-width: 760px;
  min-width: 0;
}

.article-figure {
  margin-bottom: 20px;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: var(--panel-soft);
}

.article-figure--inline {
  margin: 16px 0 4px;
}

.article-figure figcaption {
  margin-top: 6px;
  font-size: var(--fs-2);
  color: var(--muted);
}

.article-body section + section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.article-body h2 {
  position: relative;
  font-family: var(--serif);
  font-size: var(--fs-13);
  line-height: 1.35;
  padding-left: 14px;
  margin-bottom: 10px;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.article-body p {
  margin-bottom: 11px;
  font-size: var(--fs-8);
  line-height: 1.95;
  color: var(--body);
}

.article-body p:last-child {
  margin-bottom: 0;
}

.table-frame {
  margin: 14px 0 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-5);
}

.article-body caption {
  padding: 9px 12px;
  text-align: left;
  font-size: var(--fs-3);
  color: var(--muted);
  background: var(--panel);
}

.article-body th,
.article-body td {
  padding: 8px 12px;
  text-align: left;
  border-top: 1px solid var(--line);
}

.article-body thead th {
  font-size: var(--fs-3);
  font-weight: var(--fw-bold);
  color: var(--muted);
  background: var(--panel-soft);
}

.article-body tbody th {
  font-family: var(--serif);
  font-size: var(--fs-5);
  color: var(--ink);
}

.article-body td {
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

/* ---------------- D4 相关与上下篇 ---------------- */
.related-detail {
  margin-top: 30px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.related-detail h2 {
  font-family: var(--serif);
  font-size: var(--fs-11);
  margin-bottom: 10px;
}

.rel-sub {
  margin-top: 18px !important;
}

.rel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rel-grid a {
  display: block;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-size: var(--fs-6);
  color: var(--ink);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.rel-grid a:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.rel-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rel-cats a {
  padding: 5px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-3);
  color: var(--accent);
}

.rel-cats a:hover {
  background: var(--panel-warm);
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.pager a {
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-size: var(--fs-5);
  color: var(--ink);
}

.pager a:hover {
  border-color: var(--line-strong);
}

.pager span {
  display: block;
  font-size: var(--fs-2);
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.pager-next {
  text-align: right;
}

/* 数字分页（列表页） */
.pager-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-4);
}

.pager-nums a,
.pager-nums .pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--body);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.pager-nums a:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.pager-nums .pager-current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-dark);
  font-weight: var(--fw-bold);
}

.pager-gap {
  min-width: 20px;
  text-align: center;
  color: var(--muted);
}

.pager-info {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--fs-3);
}

/* ---------------- 内页响应式 ---------------- */
@media (max-width: 1024px) {
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .toc {
    position: static;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .filter-band {
    position: static;
  }

  .filter-count {
    margin-left: 0;
  }

  .entry-grid {
    gap: 12px;
  }

  .article-head h1 {
    font-size: 26px;
  }
}

@media (max-width: 640px) {
  .entry-grid,
  .related-grid,
  .rel-grid,
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .article-head h1 {
    font-size: 23px;
  }

  .article-body h2 {
    font-size: 18px;
  }

  .pager-next {
    text-align: left;
  }

  .pager-info {
    width: 100%;
    margin-left: 0;
    padding-top: 4px;
  }
}
