/* ==========================================================================
   汗汗漫画 hodth.cn — 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base — 变量、重置、排版基线
   -------------------------------------------------------------------------- */
:root {
  --bg-page: #f7f8fa;
  --bg-surface: #ffffff;
  --bg-hover: #eef1f5;
  --bg-stripe: #f2f4f7;
  --text-main: #1f2329;
  --text-sub: #5b6470;
  --line: #d9dde3;
  --link: #2f6fd0;
  --link-dark: #275ba9;
  --accent: #e8622c;
  --accent-soft: #fdeee7;
  --warn: #8a6a12;
  --warn-soft: #faf1d8;
  --radius: 4px;
  --shell: 1180px;
  --prose: 720px;
  --gap: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
}

dt,
dd {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   layout — 骨架：body、页头、主导航、主容器、面包屑、页标题、页脚
   -------------------------------------------------------------------------- */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--bg-page);
}

/* 顶部事实条 */
.fact-bar {
  background: var(--bg-hover);
  border-bottom: 1px solid var(--line);
}

.fact-bar p {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 9px 24px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.brand:hover {
  color: var(--link);
  text-decoration: none;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: block;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--text-sub);
  border-radius: var(--radius);
  line-height: 1.5;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--link);
  font-weight: 600;
  background: var(--bg-hover);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: 1px;
}

/* 主容器 */
.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 24px 24px 56px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--link);
}

.breadcrumb-sep {
  color: #a8b0bb;
}

.breadcrumb-current {
  color: var(--text-main);
}

/* 内页标题区 */
.page-header {
  max-width: var(--prose);
  margin: 0 0 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.page-description {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* 页脚 */
.site-footer {
  flex: 0 0 auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-sub);
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-sub);
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-list li + li {
  margin-top: 7px;
}

.footer-list a {
  color: var(--text-sub);
  font-size: 13px;
}

.footer-list a:hover {
  color: var(--link);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 13px;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   components — 通用区块、标题行、按钮、卡片、表格、标签、相关入口
   -------------------------------------------------------------------------- */
.section {
  margin-bottom: 40px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.section-desc,
.section-lead {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.section-head .section-desc {
  flex: 1 1 320px;
  min-width: 0;
}

.section-lead {
  max-width: var(--prose);
  margin-bottom: 16px;
}

.section-more {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--link);
}

.section-foot {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.subsection-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  border: 1px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.4;
  background: var(--link);
  border: 1px solid var(--link);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--link-dark);
  border-color: var(--link-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--line);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  text-decoration: none;
}

/* 通用封面卡（首页封面墙 / 题材分类页代表作品） */
.work-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.work-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.work-figure {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-hover);
}

.work-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.work-name a {
  color: var(--text-main);
}

.work-name a:hover {
  color: var(--link);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-tag {
  font-size: 12px;
  color: var(--text-sub);
  background: var(--bg-hover);
  border-radius: 3px;
  padding: 2px 8px;
  line-height: 1.6;
}

.work-status {
  font-size: 13px;
  color: var(--text-sub);
}

/* 相关入口（内页通用） */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.related-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.related-link {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.related-link:hover {
  color: var(--link);
}

.related-text {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.related-links .related-link {
  margin-bottom: 0;
  font-weight: 400;
  color: var(--link);
}

/* 表格通用外壳 */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-caption,
.field-table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--line);
}

.compare-table th,
.compare-table td,
.field-table th,
.field-table td {
  padding: 11px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare-table thead th,
.field-table thead th {
  background: var(--bg-stripe);
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--text-main);
  background: #fafbfc;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

/* 状态标签 */
.is-ongoing,
.is-completed,
.is-paused,
.is-finished {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

.is-ongoing {
  color: var(--accent);
  background: var(--accent-soft);
}

.is-paused {
  color: var(--warn);
  background: var(--warn-soft);
}

.is-completed,
.is-finished {
  color: var(--text-sub);
  background: var(--bg-hover);
}

/* --------------------------------------------------------------------------
   pages — 首页
   -------------------------------------------------------------------------- */
.home-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 28px 24px 56px;
}

/* 双通道首屏 */
.hero-section {
  margin-bottom: 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.hero-left {
  min-width: 0;
}

.hero-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-summary {
  max-width: var(--prose);
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 20px;
}

.hero-paths {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-path-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.path-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.path-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.hero-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-figure {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.hero-shortcuts {
  display: grid;
  gap: 10px;
}

.shortcut-card {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.shortcut-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.shortcut-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3px;
}

.shortcut-desc {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

/* 当前更新状态区 */
.status-section {
  margin-bottom: 40px;
}

.status-lead {
  max-width: var(--prose);
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.status-list {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.status-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1.4fr) 96px 128px 84px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.status-row:last-child {
  border-bottom: 0;
}

.status-row:hover {
  background: var(--bg-hover);
}

.status-date {
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.status-name {
  font-weight: 600;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.status-topic,
.status-range {
  color: var(--text-sub);
}

.status-range {
  font-variant-numeric: tabular-nums;
}

/* 题材分类总览（四栏） */
.topic-section {
  margin-bottom: 40px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.topic-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.topic-name {
  font-size: 17px;
  font-weight: 600;
}

.topic-feature {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.topic-audience {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.topic-figure {
  margin-top: auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-hover);
}

.topic-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 封面墙（三行不等高网格） */
.wall-section {
  margin-bottom: 40px;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* 人气榜单速览 */
.ranking-section {
  margin-bottom: 40px;
}

.ranking-lead {
  max-width: var(--prose);
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.ranking-section .ranking-list {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ranking-section .ranking-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 108px minmax(0, 1.6fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.ranking-section .ranking-item:last-child {
  border-bottom: 0;
}

.ranking-section .ranking-item:hover {
  background: var(--bg-hover);
}

.rank-no {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rank-name {
  font-weight: 600;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.rank-topic {
  font-size: 13px;
  color: var(--text-sub);
}

.rank-note {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

/* 专题中心入口 */
.feature-section {
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.feature-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.feature-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.feature-scope {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* 阅读说明与收录边界摘要（左右两栏） */
.guide-section {
  margin-bottom: 40px;
}

.guide-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.guide-col {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.guide-subtitle {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.guide-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.guide-list li + li {
  margin-top: 8px;
}

.guide-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9c1cc;
}

/* 站内栏目索引（五列） */
.index-section {
  margin-bottom: 8px;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.index-list li {
  min-width: 0;
}

.index-list a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
}

.index-list a:hover {
  background: var(--bg-hover);
  color: var(--link);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages — 题材分类页
   -------------------------------------------------------------------------- */
.section-directions .direction-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.direction-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.direction-figure {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-hover);
}

.direction-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.direction-name {
  font-size: 17px;
  font-weight: 600;
}

.direction-meta {
  display: grid;
  gap: 6px;
}

.meta-label {
  font-size: 12px;
  color: var(--text-sub);
}

.meta-value {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
}

.direction-link {
  margin-top: auto;
  font-size: 14px;
}

.section-representative .work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.section-order .step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.section-order .step-item {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 18px 56px;
}

.section-order .step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--link);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-order .step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.section-order .step-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.section-compare .compare-table {
  background: var(--bg-surface);
}

/* --------------------------------------------------------------------------
   pages — 最近更新页
   -------------------------------------------------------------------------- */
.section-timeline .timeline-group {
  margin-bottom: 22px;
}

.section-timeline .timeline-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.section-timeline .timeline-list {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.section-timeline .timeline-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.section-timeline .timeline-row:last-child {
  border-bottom: 0;
}

.section-timeline .timeline-row:hover {
  background: var(--bg-hover);
}

.section-timeline .timeline-thumb {
  width: 60px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-hover);
}

.section-timeline .timeline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-timeline .timeline-body {
  min-width: 0;
}

.section-timeline .timeline-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3px;
}

.section-timeline .timeline-name:hover {
  color: var(--link);
}

.section-timeline .timeline-meta {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

.section-timeline .timeline-meta .meta-topic,
.section-timeline .timeline-meta .meta-range,
.section-timeline .timeline-meta .meta-status {
  margin-right: 12px;
}

.section-status .status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.section-status .status-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.section-status .status-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-status .status-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.section-filter .filter-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.section-filter .filter-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.section-filter .filter-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.section-filter .filter-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.section-related .related-links {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

/* --------------------------------------------------------------------------
   pages — 人气榜单页
   -------------------------------------------------------------------------- */
.ranking-note-text {
  max-width: var(--prose);
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}

.ranking-list-section .ranking-list {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ranking-list-section .ranking-item {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.ranking-list-section .ranking-item:last-child {
  border-bottom: 0;
}

.ranking-list-section .ranking-item:hover {
  background: var(--bg-hover);
}

.ranking-rank {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.ranking-cover {
  width: 72px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-hover);
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-body {
  min-width: 0;
}

.ranking-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.ranking-name a {
  color: var(--text-main);
}

.ranking-name a:hover {
  color: var(--link);
}

.ranking-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.ranking-tags .tag {
  font-size: 12px;
  color: var(--text-sub);
  background: var(--bg-hover);
  border-radius: 3px;
  padding: 2px 8px;
  line-height: 1.6;
}

.ranking-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.ranking-method-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.method-column {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.method-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.method-list li + li {
  margin-top: 8px;
}

.method-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9c1cc;
}

.ranking-relation-text {
  max-width: var(--prose);
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.85;
}

.related-entry .related-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-entry .related-list li {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.related-entry .related-list a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.related-entry .related-list a:hover {
  color: var(--link);
}

/* --------------------------------------------------------------------------
   pages — 阅读说明页
   -------------------------------------------------------------------------- */
.field-figure {
  max-width: var(--prose);
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.field-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

.field-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

.field-table {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.guide-scope .scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.scope-column {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.scope-in {
  border-top: 3px solid var(--link);
}

.scope-out {
  border-top: 3px solid #c3cad3;
}

.scope-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.scope-list li + li {
  margin-top: 8px;
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9c1cc;
}

.guide-tags .tag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tag-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.tag-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tag-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.tag-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-sub);
}

.faq-list {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-question {
  padding: 14px 44px 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-sub);
  border-bottom: 2px solid var(--text-sub);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.faq-item[open] .faq-question::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-question:hover {
  background: var(--bg-hover);
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}

.guide-feedback .feedback-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.feedback-step {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--link);
  font-size: 14px;
  font-weight: 600;
}

.feedback-step .step-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.feedback-note {
  max-width: var(--prose);
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   pages — 404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.error-inner {
  max-width: var(--prose);
}

.error-code {
  font-size: 44px;
  font-weight: 600;
  color: var(--line);
  line-height: 1.1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.error-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 22px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.error-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.error-links a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.error-links a:hover {
  background: var(--bg-hover);
  color: var(--link);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .topic-grid,
  .wall-grid,
  .section-directions .direction-grid,
  .section-filter .filter-list,
  .guide-tags .tag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .section-representative .work-grid,
  .section-order .step-list,
  .section-status .status-grid,
  .guide-feedback .feedback-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-row {
    grid-template-columns: 100px minmax(0, 1fr) 92px 118px 80px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    min-height: 58px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 12px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 0;
  }

  .fact-bar p {
    padding: 8px 16px;
  }

  .home-main,
  .inner-main {
    padding: 20px 16px 44px;
  }

  .error-main {
    padding: 36px 16px 48px;
  }

  .page-title {
    font-size: 22px;
  }

  .hero-title {
    font-size: 24px;
  }

  .section {
    margin-bottom: 32px;
  }

  .hero-section,
  .status-section,
  .topic-section,
  .wall-section,
  .ranking-section,
  .feature-section,
  .guide-section {
    margin-bottom: 32px;
  }

  .ranking-section .ranking-item {
    grid-template-columns: 36px minmax(0, 1fr);
    row-gap: 4px;
  }

  .ranking-section .rank-topic,
  .ranking-section .rank-note {
    grid-column: 2 / -1;
  }

  .status-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .status-date {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .status-topic,
  .status-range {
    grid-column: 2 / -1;
  }

  .ranking-list-section .ranking-item {
    grid-template-columns: 34px 60px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 12px;
  }

  .ranking-cover {
    width: 60px;
  }

  .section-timeline .timeline-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .section-timeline .timeline-thumb {
    width: 52px;
  }

  .guide-columns,
  .ranking-method-columns,
  .guide-scope .scope-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    padding: 28px 16px 22px;
  }

  .footer-bottom p {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .topic-grid,
  .wall-grid,
  .section-directions .direction-grid,
  .section-filter .filter-list,
  .guide-tags .tag-grid,
  .feature-grid,
  .section-status .status-grid,
  .guide-feedback .feedback-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-representative .work-grid,
  .section-order .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .hero-title {
    font-size: 22px;
  }

  .ranking-list-section .ranking-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .ranking-cover {
    width: 56px;
  }

  .ranking-body {
    grid-column: 2 / -1;
  }

  .section-order .step-item {
    padding: 16px 16px 16px 52px;
  }
}
