/* ==========================================================================
   汗汗漫画 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #1d1f22;
  --muted: #6b6f76;
  --line: #e2e2df;
  --accent: #2f6f5e;
  --accent-soft: #e7f0ec;
  --dark-bg: #17191b;
  --dark-surface: #202325;
  --dark-text: #e8e8e6;
  --radius: 8px;
  --radius-sm: 4px;
  --container: 1160px;
  --gutter: 24px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(29, 31, 34, 0.06);
  --shadow-md: 0 6px 18px rgba(29, 31, 34, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: #245a4c;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.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;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--gutter);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter) 56px;
}

.inner-main {
  padding-top: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: #b9bcc0;
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
}

.page-description {
  margin-top: 10px;
  max-width: 820px;
  font-size: 15px;
  color: var(--muted);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--text);
}

.footer-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 22px;
}

/* --------------------------------------------------------------------------
   components · 通用模块
   -------------------------------------------------------------------------- */

/* 顶部事实条 */
.fact-bar {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: #2c4f45;
}

.fact-bar-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text);
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

/* 导航 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* 主题切换 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle-icon {
  font-size: 14px;
  line-height: 1;
}

/* 区块标题 */
.section {
  margin-bottom: 48px;
}

.section-head {
  margin-bottom: 22px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.section-desc,
.section-lede,
.section-intro {
  margin-top: 8px;
  max-width: 860px;
  font-size: 14px;
  color: var(--muted);
}

.section-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
}

/* 标签与状态 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 6px 4px 0;
  font-size: 12px;
  line-height: 1.6;
  color: #2c4f45;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.status-ongoing {
  color: #2c4f45;
  border-color: #bcd8cd;
  background: #f0f7f4;
}

.status-finished {
  color: #55595f;
  border-color: #d5d7da;
  background: #f3f3f1;
}

.status-paused {
  color: #7a5a2e;
  border-color: #e0cfae;
  background: #faf5ea;
}

/* 表格 */
.table-wrap,
.field-table-wrap,
.guide-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table,
.field-table {
  min-width: 640px;
  font-size: 14px;
}

.data-table caption,
.field-table caption,
.field-caption,
.field-table-caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td,
.field-table th,
.field-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table thead th,
.field-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: #fafaf8;
  white-space: nowrap;
}

.data-table tbody th,
.field-table tbody th {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

/* 步骤块 */
.path-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.path-step {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num,
.path-num,
.path-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

.step-title,
.path-title,
.path-step-title {
  font-size: 16px;
  font-weight: 700;
}

.step-desc,
.path-desc,
.path-step-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.step-link,
.path-link,
.path-step-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

/* 折叠面板 */
details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

.batch-summary::after,
.faq-question::after {
  content: "+";
  float: right;
  font-size: 18px;
  line-height: 1.2;
  color: var(--muted);
}

details[open] > .batch-summary::after,
details[open] > .faq-question::after {
  content: "−";
}

/* 页脚 */
.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.footer-group-title {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.footer-list li + li {
  margin-top: 4px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
  color: var(--muted);
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 18px;
}

.footer-brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-year {
  font-variant-numeric: tabular-nums;
}

/* 通用两栏/多栏 */
.split-columns,
.status-columns,
.compare-columns,
.boundary-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.column-block,
.status-col,
.compare-col,
.boundary-col {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.block-title,
.status-col-title,
.col-title,
.boundary-subtitle {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}

.point-item,
.status-item,
.compare-item,
.boundary-list li {
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}

.point-item:last-child,
.status-item:last-child,
.compare-item:last-child,
.boundary-list li:last-child {
  border-bottom: 0;
}

.status-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.status-name {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text);
}

.status-desc {
  flex: 1 1 160px;
  color: var(--muted);
}

.compare-name {
  font-size: 14px;
  font-weight: 700;
}

.compare-text {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */

.home-main {
  padding-top: 24px;
}

/* 首屏 */
.hero {
  position: relative;
  margin-bottom: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  padding: 40px 36px;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
}

.hero-lead {
  margin-top: 12px;
  max-width: 460px;
  font-size: 15px;
  color: #3c4046;
}

.hero-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid #cfe1da;
  border-radius: var(--radius-sm);
}

.entry-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* 首屏时间线 */
.hero-timeline {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.timeline-title {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.timeline-batch {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.timeline-date {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.timeline-topic {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.timeline-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* 本期主题策展 */
.feature-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 28px;
  align-items: start;
}

.feature-figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.feature-lead {
  font-size: 15px;
  color: #3c4046;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.feature-item {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-item-title {
  font-size: 15px;
  font-weight: 700;
}

.feature-item-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* 题材分类总览 */
.topic-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.topic-col {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-name {
  font-size: 16px;
  font-weight: 700;
}

.topic-scope {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text);
}

.topic-density {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.topic-rep {
  margin-top: 10px;
  padding-top: 10px;
  font-size: 13px;
  color: var(--accent);
  border-top: 1px dashed var(--line);
}

/* 封面条目墙 */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cover-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover {
  transform: translateY(-2px);
  border-color: #c8d8d2;
  box-shadow: var(--shadow-md);
}

.cover-link {
  display: block;
  padding: 12px;
  color: var(--text);
}

.cover-link:hover {
  color: var(--accent);
}

.cover-figure {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ececea;
}

.cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cover-name {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
}

.cover-tags {
  margin-top: 8px;
}

/* 人气位次速览 */
.glance-body {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 20px;
  align-items: start;
}

.glance-list {
  display: grid;
  gap: 8px;
}

.glance-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.glance-rank {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.glance-name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glance-topic {
  color: var(--muted);
  min-width: 0;
}

.glance-note {
  color: var(--muted);
  min-width: 0;
}

.glance-aside {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.glance-aside-title {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
}

.glance-aside-text {
  font-size: 14px;
  color: var(--muted);
}

.glance-aside-text + .glance-aside-text {
  margin-top: 8px;
}

.glance-aside-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* 字段口径与路径 */
.field-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: start;
}

.field-footnote {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* 站内栏目索引 */
.index-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-col {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-col-title {
  font-size: 15px;
  font-weight: 700;
}

.index-col-desc {
  margin-top: 8px;
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--muted);
}

.index-col-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   pages · 题材分类
   -------------------------------------------------------------------------- */

.topic-compare .table-wrap {
  margin-top: 4px;
}

.topic-cards .topic-card {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px;
  align-items: start;
  padding: 20px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-card-figure {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ececea;
}

.topic-card-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.topic-card-title {
  font-size: 18px;
  font-weight: 700;
}

.topic-card-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.topic-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.topic-tag {
  padding: 2px 8px;
  font-size: 12px;
  color: #2c4f45;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.entry-list {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
}

.entry-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}

.entry-item:last-child {
  border-bottom: 0;
}

.entry-name {
  font-weight: 600;
  color: var(--text);
}

.entry-status {
  font-size: 13px;
  color: var(--muted);
}

/* 延伸阅读 */
.related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.related-item a {
  font-size: 14px;
  font-weight: 600;
}

.related-note {
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   pages · 最近更新
   -------------------------------------------------------------------------- */

.batch-latest-card {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 24px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.batch-latest-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.batch-code,
.batch-date,
.batch-topics,
.batch-count {
  font-size: 14px;
}

.batch-code {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.batch-date {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.batch-topics {
  color: var(--text);
}

.batch-count {
  color: var(--muted);
}

.batch-latest-media {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ececea;
}

.batch-latest-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.batch-latest-media figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.batch-list {
  display: grid;
  gap: 12px;
}

.batch-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.batch-summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  background: #fafaf8;
}

.batch-summary .batch-topics {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.batch-note {
  font-size: 14px;
  color: var(--muted);
}

.batch-entries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.batch-entry {
  font-size: 14px;
}

.batch-entry .entry-thumb {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ececea;
}

.batch-entry .entry-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.batch-entry .entry-name {
  display: block;
  margin-top: 8px;
}

.batch-entry .entry-meta,
.batch-entry .entry-desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.batch-entry .entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   pages · 人气位次
   -------------------------------------------------------------------------- */

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

.ranking-main {
  min-width: 0;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rank-no {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.rank-cover {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ececea;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-name {
  font-size: 16px;
  font-weight: 700;
}

.rank-topic {
  margin-top: 4px;
  font-size: 13px;
  color: var(--accent);
}

.rank-note {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.ranking-side {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-block {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.scope-title {
  font-size: 15px;
  font-weight: 700;
}

.scope-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.side-links {
  padding-top: 14px;
}

.side-link-list {
  margin-top: 8px;
}

.side-link-list li + li {
  margin-top: 2px;
}

.side-link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
}

.ranking-compare,
.rank-change {
  margin-bottom: 48px;
}

.change-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.change-item {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.change-name {
  font-size: 15px;
  font-weight: 700;
}

.change-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   pages · 查阅指引
   -------------------------------------------------------------------------- */

.guide-section {
  margin-bottom: 48px;
}

.guide-fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: start;
}

.guide-field-figure {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-field-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.guide-field-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.guide-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.guide-paths .path-step + .path-step {
  margin-top: 0;
}

.boundary-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  background: #fafaf8;
}

.faq-answer {
  padding: 12px 18px 16px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.index-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.index-link-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.index-link {
  font-size: 14px;
  font-weight: 600;
}

.index-link-desc {
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 64px;
  padding-bottom: 72px;
}

.error-panel {
  width: 100%;
  max-width: 620px;
  padding: 36px 32px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}

.error-title {
  margin-top: 12px;
  font-size: 26px;
  font-weight: 700;
}

.error-text {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.error-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #cfe1da;
  border-radius: var(--radius-sm);
}

.error-action:hover {
  background: #d9eae4;
}

.error-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 32px 24px;
  }

  .feature-body,
  .glance-body,
  .field-body,
  .batch-latest-card,
  .ranking-layout,
  .guide-fields-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-columns,
  .index-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-entries,
  .change-list,
  .path-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-entries {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-cards .topic-card {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }

  .glance-row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr);
  }

  .glance-note {
    grid-column: 2 / -1;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px var(--gutter);
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 8px 0;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
  }

  .nav-link.is-current {
    border-bottom-color: var(--accent);
  }

  .theme-toggle {
    order: 2;
  }

  .site-main {
    padding: 20px var(--gutter) 40px;
  }

  .page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .page-title {
    font-size: 26px;
  }

  .section {
    margin-bottom: 36px;
  }

  .section-title {
    font-size: 18px;
  }

  .hero-inner {
    padding: 24px 18px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-timeline {
    padding: 16px;
  }

  .timeline-item {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 4px;
  }

  .timeline-topic {
    white-space: normal;
  }

  .timeline-count {
    grid-column: 2;
  }

  .feature-list,
  .topic-columns,
  .cover-grid,
  .index-columns,
  .split-columns,
  .status-columns,
  .compare-columns,
  .boundary-layout,
  .related-list,
  .index-links,
  .path-steps,
  .batch-entries,
  .change-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .glance-row {
    grid-template-columns: 36px minmax(0, 1fr);
    row-gap: 4px;
  }

  .glance-topic,
  .glance-note {
    grid-column: 2;
  }

  .glance-name {
    white-space: normal;
  }

  .batch-latest-info {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-summary {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 4px;
  }

  .batch-summary .batch-topics {
    white-space: normal;
  }

  .batch-summary .batch-count {
    grid-column: 2;
  }

  .batch-entry .entry-thumb img {
    aspect-ratio: 16 / 10;
  }

  .topic-cards .topic-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .topic-card-figure img {
    aspect-ratio: 16 / 10;
  }

  .rank-row {
    grid-template-columns: 40px 56px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-no {
    font-size: 16px;
  }

  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .error-panel {
    padding: 26px 20px;
  }

  .error-title {
    font-size: 22px;
  }
}

@media (max-width: 430px) {
  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-figure img {
    aspect-ratio: 16 / 10;
  }

  .rank-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .rank-cover {
    grid-column: 1 / -1;
    max-width: 120px;
  }
}

/* --------------------------------------------------------------------------
   dark theme
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --text: var(--dark-text);
    --muted: #9aa0a6;
    --line: #2e3235;
    --accent: #6fb8a1;
    --accent-soft: #23332e;
  }
}

:root[data-theme="dark"] {
  --bg: var(--dark-bg);
  --surface: var(--dark-surface);
  --text: var(--dark-text);
  --muted: #9aa0a6;
  --line: #2e3235;
  --accent: #6fb8a1;
  --accent-soft: #23332e;
}

:root[data-theme="dark"] .fact-bar {
  color: #a8d8c8;
}

:root[data-theme="dark"] .hero-lead,
:root[data-theme="dark"] .feature-lead {
  color: #c6c9cc;
}

:root[data-theme="dark"] .data-table thead th,
:root[data-theme="dark"] .field-table thead th,
:root[data-theme="dark"] .batch-summary,
:root[data-theme="dark"] .faq-question,
:root[data-theme="dark"] .timeline-item {
  background: #1b1e20;
}

:root[data-theme="dark"] .status-ongoing {
  color: #a8d8c8;
  background: #23332e;
  border-color: #35544a;
}

:root[data-theme="dark"] .status-finished {
  color: #b6b9bd;
  background: #26292b;
  border-color: #3a3e41;
}

:root[data-theme="dark"] .status-paused {
  color: #dcc08a;
  background: #2d2718;
  border-color: #4a4026;
}

:root[data-theme="dark"] .entry-link,
:root[data-theme="dark"] .error-action {
  border-color: #35544a;
}

:root[data-theme="dark"] .cover-figure,
:root[data-theme="dark"] .topic-card-figure,
:root[data-theme="dark"] .rank-cover,
:root[data-theme="dark"] .batch-latest-media,
:root[data-theme="dark"] .batch-entry .entry-thumb {
  background: #2a2d2f;
}
