/* inner.css — 床的款式和类型大全 · 内页专用版式
   只消费 tokens.css 的变量；页头/页脚等全站骨架由 style.css 提供，三页共用。
   分类页元件：crumb / page-hero / toolbar(chip+sort) / entry-grid / pager / seo-desc
   详情页元件：crumb / art-head / art-stats / toc / article(+figure) / rel-grid      */

/* ------------------------------------------------------------- 01 面包屑 */
.crumb{ padding: 22px 0 0; font-size: var(--fs-6); color: var(--muted); }
.crumb ol{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumb li{ display: flex; align-items: center; gap: 8px; }
.crumb-sep{ color: var(--muted-2); }
.crumb a{ color: var(--muted); border-bottom: 1px solid transparent; }
.crumb a:hover{ color: var(--accent-ink); border-bottom-color: var(--accent); }
.crumb [aria-current="page"]{ color: var(--ink); font-weight: 700; }

/* --------------------------------------------------------- 02 列表页页头 */
.page-hero{ background: var(--bg-hero); border-bottom: 1px solid var(--line-soft); }
.page-hero .wrap{
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px; align-items: end;
  padding: 34px 0 30px;
}
.page-hero h1{ font-size: var(--fs-15); line-height: 1.26; font-weight: 800; }
.page-hero .page-lede{
  margin-top: 12px; max-width: 720px;
  font-size: var(--fs-9); line-height: 1.78; color: var(--body-soft);
}
.page-stats{ display: flex; gap: 34px; }
.page-stat{ min-width: 74px; }
.page-stat dt{ font-size: var(--fs-3); letter-spacing: .14em; color: var(--muted); }
.page-stat dd{
  margin-top: 4px; font-size: var(--fs-13); font-weight: 800;
  color: var(--accent-ink); font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------- 03 筛选 / 排序工具条 */
.toolbar{ background: var(--bg); padding: 22px 0 0; }
.toolbar-inner{
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line-soft);
}
.toolbar-label{ font-size: var(--fs-3); font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-right: 4px; }
.chips{ display: flex; flex-wrap: wrap; gap: 8px; }
.chip{
  display: inline-flex; align-items: center; height: 30px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--surface); color: var(--body-soft);
  font-size: var(--fs-4); font-weight: 700; cursor: pointer;
  transition: background-color .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(--accent); border-color: var(--accent); color: var(--ink-invert); }
.chip:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

.toolbar-right{ display: flex; align-items: center; gap: 12px; margin-left: auto; }
.sort{ display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-4); color: var(--muted); cursor: pointer; }
.select{
  font: inherit; font-size: var(--fs-4); font-weight: 700;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--accent-ink); cursor: pointer;
}
.select:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.count{ font-size: var(--fs-4); color: var(--muted); font-variant-numeric: tabular-nums; }
.count b{ color: var(--accent-ink); font-weight: 800; }

/* ------------------------------------------------------------ 04 条目网格 */
.entries{ background: var(--bg); padding: 24px 0 6px; }
.entry-grid{
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.grid-note{ margin-bottom: 14px; font-size: var(--fs-6); line-height: 1.7; color: var(--muted); }
.entry{
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.entry:hover{ border-color: var(--line); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.entry[hidden]{ display: none; }
.entry-thumb{ display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-band); }
.entry-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.entry-body{ display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.entry-group{ font-size: var(--fs-3); font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.entry-title{ font-size: var(--fs-10); font-weight: 800; color: var(--ink); line-height: 1.4; }
.entry-title a:hover{ color: var(--accent-ink); }
.entry-sum{ font-size: var(--fs-4); line-height: 1.7; color: var(--muted); }
.entry-more{ margin-top: 2px; font-size: var(--fs-3); font-weight: 700; color: var(--accent-ink); }

/* 空状态 */
.empty{
  display: none; padding: 56px 0 64px; text-align: center;
  font-size: var(--fs-9); color: var(--muted);
}
.empty.is-on{ display: block; }
.empty b{ display: block; margin-bottom: 6px; color: var(--ink); font-size: var(--fs-10); }

/* --------------------------------------------------- 05 关于这份总表（说明） */
.seo-desc{ background: var(--bg); padding: 34px 0 46px; }
.seo-box{
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 30px 34px 32px;
}
.seo-box h2{ font-size: var(--fs-11); font-weight: 800; }
.seo-box p{ margin-top: 14px; font-size: var(--fs-4); line-height: 1.92; color: var(--body-note); }
.seo-box p:first-of-type{ margin-top: 16px; }

/* ------------------------------------------------------------- 06 详情页头 */
.art-hero{ background: var(--bg-hero); border-bottom: 1px solid var(--line-soft); }
.art-hero .wrap{
  display: grid; grid-template-columns: minmax(0, 1fr) 372px;
  gap: 44px; align-items: end; padding: 26px 0 30px;
}
.art-tag{ display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.art-tag-sep{ color: var(--muted-2); font-weight: 700; }
.art-hero h1{
  margin-top: 14px; font-size: var(--fs-16); line-height: 1.22; font-weight: 800;
  letter-spacing: -.015em;
}
.art-lede{ margin-top: 14px; max-width: 640px; font-size: var(--fs-9); line-height: 1.8; color: var(--body-soft); }
.art-stats{
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
}
.art-stat{ background: var(--surface); padding: 14px 16px; }
.art-stat dt{ font-size: var(--fs-3); letter-spacing: .12em; color: var(--muted); }
.art-stat dd{ margin-top: 5px; font-size: var(--fs-10); font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ 07 正文 + 目录 */
.art-main{ background: var(--bg); padding: 30px 0 44px; }
.art-layout{
  display: grid; grid-template-columns: 268px minmax(0, 1fr);
  gap: 48px; align-items: start;
}
.art-layout--solo{ grid-template-columns: minmax(0, 1fr); }
.toc{ position: sticky; top: 84px; }
.toc-head{ font-size: var(--fs-3); font-weight: 700; letter-spacing: .18em; color: var(--muted); margin-bottom: 12px; }
.toc ol{ display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.toc a{
  display: block; padding: 6px 0 6px 14px; margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: var(--fs-4); line-height: 1.55; color: var(--muted);
  transition: color .16s ease, border-color .16s ease;
}
.toc a:hover{ color: var(--accent-ink); }
.toc a.is-current{ color: var(--ink); font-weight: 700; border-left-color: var(--accent); }

.article{ max-width: 720px; }
.article .article-lede{
  padding: 0 0 18px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-9); line-height: 1.9; color: var(--body);
}
.article h2{
  margin: 26px 0 10px; font-size: var(--fs-11); line-height: 1.4; font-weight: 800;
  scroll-margin-top: 88px;
}
.article h2:first-of-type{ margin-top: 22px; }
.article p{ margin-top: 10px; font-size: var(--fs-4); line-height: 1.95; color: var(--body-soft); }
.article ul{ margin-top: 12px; padding-left: 2px; display: flex; flex-direction: column; gap: 6px; }
.article ul li{
  position: relative; padding-left: 15px;
  font-size: var(--fs-4); line-height: 1.9; color: var(--body-soft);
}
.article ul li::before{
  content: ""; position: absolute; left: 0; top: .82em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.article figure{
  margin: 18px 0 4px; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-band); border: 1px solid var(--line-soft);
}
.article figure img{ display: block; width: 100%; height: auto; object-fit: cover; }

/* ---------------------------------------------------------- 08 相关条目 */
.related{ background: var(--bg); padding: 8px 0 46px; }
.related-head{ display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.related-head h2{ font-size: var(--fs-11); font-weight: 800; }
.related-head p{ font-size: var(--fs-4); color: var(--muted); }
.rel-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rel-card{
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 12px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.rel-card:hover{ border-color: var(--line); box-shadow: var(--shadow-card); }
.rel-thumb{ width: 96px; flex: none; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-band); }
.rel-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.rel-body{ min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rel-group{ order: 3; font-size: var(--fs-2); font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.rel-title{ order: 1; font-size: var(--fs-7); font-weight: 800; color: var(--ink); }
.rel-sum{ order: 2; margin-top: 4px; font-size: var(--fs-3); line-height: 1.65; color: var(--muted); }
.rel-exits{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ------------------------------------------------------------ 09 分页 */
.chip-num{
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: var(--fs-2); font-weight: 700; line-height: 18px;
  color: var(--muted); background: var(--bg-band); border-radius: var(--pill);
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip-num{ color: var(--accent-ink); background: rgba(255,255,255,.28); }

.pager{
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.pager a, .pager .is-current, .pager-gap{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--body-soft);
  font-size: var(--fs-4); font-weight: 700; font-variant-numeric: tabular-nums;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.pager a:hover{ color: var(--accent-ink); border-color: var(--accent); }
.pager .is-current{ border-color: var(--accent); background: var(--accent); color: var(--ink-invert); }
.pager-gap{ border-color: transparent; background: transparent; color: var(--muted); }

/* ------------------------------------------------------------ 09b 分类浏览 */
.browse{ background: var(--bg); padding: 30px 0 52px; }
.browse-head{ font-size: var(--fs-11); font-weight: 800; margin-bottom: 16px; }
.browse-list{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.browse-item{
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px;
  padding: 13px 16px 14px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.browse-name{ font-size: var(--fs-10); font-weight: 800; color: var(--ink); }
.browse-name:hover{ color: var(--accent-ink); }
.browse-count{ font-size: var(--fs-3); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.browse-subs{ grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; }
.browse-subs a{ font-size: var(--fs-3); line-height: 1.6; color: var(--muted); }
.browse-subs a:hover{ color: var(--accent-ink); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px){
  .entry-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .art-layout{ grid-template-columns: 236px minmax(0, 1fr); gap: 32px; }
  .art-hero .wrap{ grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; }
}
@media (max-width: 900px){
  .entry-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero .wrap{ grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .art-hero .wrap{ grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .art-layout{ grid-template-columns: 1fr; }
  .toc{ position: static; }
  .toc ol{ flex-direction: row; flex-wrap: wrap; gap: 6px 10px; border-left: 0; }
  .toc a{ padding: 4px 9px; border-left: 0; border: 1px solid var(--line); border-radius: var(--pill); }
  .toc a.is-current{ border-color: var(--accent); }
  .rel-grid{ grid-template-columns: 1fr; }
  .article{ max-width: none; }
}
@media (max-width: 640px){
  .entry-grid{ grid-template-columns: 1fr; }
  .page-hero h1, .art-hero h1{ font-size: var(--fs-14); }
  .seo-box{ padding: 22px 20px 24px; }
  .page-stats{ gap: 20px; }
  .toolbar-right{ width: 100%; justify-content: space-between; margin-left: 0; }
  .art-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rel-card{ flex-direction: column; }
  .rel-thumb{ width: 100%; aspect-ratio: 16 / 9; }
  .pager{ gap: 5px; margin-top: 20px; }
  .pager a, .pager .is-current, .pager-gap{ min-width: 30px; height: 30px; padding: 0 8px; font-size: var(--fs-3); }
}
