/* =========================================================
   汗汗漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================= */

/* ---------------------------------------------------------
   1. base —— 变量、重置、排版基线
   --------------------------------------------------------- */
:root {
  --ink: #2B2B2B;
  --ink-soft: #6B6B6B;
  --ink-faint: #8C8C88;
  --brand: #1F4E79;
  --brand-deep: #163A5A;
  --brand-tint: #EDF2F7;
  --accent: #E8A33D;
  --accent-tint: #FDF3E2;
  --bg: #FBFBF9;
  --card: #FFFFFF;
  --line: #E2E2DE;
  --line-strong: #C9C9C3;
  --radius: 6px;
  --radius-sm: 4px;
  --shell: 1080px;
  --gutter: 24px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
  --shadow-card: 0 1px 2px rgba(31, 78, 121, 0.06);
  --shadow-hover: 0 4px 14px rgba(31, 78, 121, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--brand);
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: var(--accent);
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  text-align: left;
}

strong {
  font-weight: 600;
}

/* 焦点可见性 */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   2. layout —— 骨架：外壳、页头、导航、主区、页脚
   --------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- 页头 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--brand);
}

.brand:hover {
  color: var(--brand);
}

.brand-mark {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--brand);
}

.brand-sub {
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

/* ---- 主导航 ---- */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  display: block;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--ink);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  line-height: 1.4;
}

.nav-link:hover {
  color: var(--brand);
  background: var(--brand-tint);
}

.nav-link.is-current {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

/* ---- 汉堡按钮（桌面隐藏） ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* ---- 主区 ---- */
.site-main {
  display: block;
  padding-bottom: 56px;
}

.inner-main {
  padding-top: 0;
}

/* ---- 面包屑 ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px var(--gutter) 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: var(--line-strong);
  font-family: var(--font-mono);
}

.breadcrumb-current {
  color: var(--ink);
}

/* ---- 内页标题区 ---- */
.page-header {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px var(--gutter) 26px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.3;
}

.page-description {
  margin-top: 12px;
  max-width: 720px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ---- 页脚 ---- */
.site-footer {
  background: var(--brand-deep);
  color: #D8E2EC;
  font-size: 14px;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
}

.footer-slogan {
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
}

.footer-intro {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #A9BCCE;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.footer-list li + li {
  margin-top: 8px;
}

.footer-link {
  color: #A9BCCE;
  font-size: 13px;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 16px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.copyright {
  font-size: 12px;
  color: #8FA6BC;
  line-height: 1.7;
}

/* ---- 通用 section 骨架 ---- */
.section {
  padding: 44px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--brand);
}

.section-desc,
.section-intro {
  margin-top: 10px;
  max-width: 720px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.section-intro a {
  color: var(--brand);
  border-bottom: 1px solid var(--line-strong);
}

.section-intro a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.section-foot {
  margin-top: 20px;
  font-size: 14px;
}

.sub-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 14px;
}

.text-link {
  color: var(--brand);
  font-size: 14px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.text-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---- 内页两栏布局 ---- */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
  padding-top: 36px;
}

.layout-main {
  min-width: 0;
}

.layout-side,
.layout-aside {
  min-width: 0;
  position: sticky;
  top: 90px;
}

/* 若祖先带 .sidebar-left，则侧栏在左 */
.sidebar-left .page-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar-left .page-layout > .layout-side,
.sidebar-left .page-layout > .layout-aside {
  order: -1;
}

/* ---------------------------------------------------------
   3. components —— 通用组件
   --------------------------------------------------------- */

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--brand-tint);
  color: var(--brand);
  border-color: var(--brand);
}

/* ---- 字段表（通用） ---- */
.field-table {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.field-table caption,
.table-caption,
.field-caption,
.field-table-caption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--brand-tint);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}

.field-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: #F5F7F9;
  border-bottom: 1px solid var(--line);
}

.field-table tbody th,
.field-table tbody td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-table tbody th {
  width: 30%;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
}

.field-table tbody td {
  color: var(--ink-soft);
}

/* ---- 字段定义列表（tema 页） ---- */
.field-table dl,
dl.field-table {
  display: block;
}

dl.field-table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.field-row:last-child {
  border-bottom: 0;
}

.field-name {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-mono);
  background: #F5F7F9;
}

.field-value {
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---- 榜单通用行 ---- */
.rank-list {
  border-top: 1px solid var(--line);
}

.rank-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-no {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.rank-tag {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  white-space: nowrap;
}

/* ---- 更新行（通用） ---- */
.update-list {
  border-top: 1px solid var(--line);
}

.update-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 120px 96px;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.update-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.update-tag {
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  text-align: center;
  white-space: nowrap;
}

.update-status {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  text-align: center;
  white-space: nowrap;
}

/* ---- 话题列表（gengxin / bangdan） ---- */
.topic-list {
  border-top: 1px solid var(--line);
}

/* gengxin 用 .topic-row */
.topic-row {
  display: grid;
  grid-template-columns: 180px 120px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}

.topic-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.topic-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.topic-note {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* bangdan 用 .topic-item */
.topic-item {
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}

.topic-item .topic-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.topic-item .topic-scope {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ---- 侧栏块（bangdan / shuoming） ---- */
.side-block,
.aside-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.side-title,
.aside-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 12px;
}

.side-list li + li,
.aside-list li + li {
  margin-top: 10px;
}

.side-item,
.aside-link {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

a.aside-link {
  color: var(--brand);
  display: block;
}

a.aside-link:hover {
  color: var(--accent);
}

.side-link {
  color: var(--brand);
  font-size: 14px;
}

.side-link-list li + li {
  margin-top: 10px;
}

.side-figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.side-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.side-caption {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.7;
  border-top: 1px solid var(--line);
}

/* ---- FAQ ---- */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq-question {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.6;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
}

.faq-item[open] .faq-question::after {
  content: "–";
}

.faq-answer {
  padding: 0 4px 18px;
  max-width: 720px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.85;
}

/* ---- 通用段落块 ---- */
.prose p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.85;
  max-width: 720px;
}

.prose p + p {
  margin-top: 14px;
}

/* ---------------------------------------------------------
   4. pages —— 各页面模块
   --------------------------------------------------------- */

/* ========== 首页 index.html ========== */

/* 首屏 */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 48px;
}

.hero-info {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-title {
  font-size: 34px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.3;
}

.hero-lead {
  margin-top: 16px;
  max-width: 560px;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.85;
}

.need-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.need-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.need-text {
  min-width: 0;
}

.need-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.need-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 首屏右栏视觉 */
.hero-visual {
  min-width: 0;
}

.hero-figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-caption {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
}

.hero-quick {
  margin-top: 20px;
}

.hero-quick-label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.hero-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  min-height: 40px;
  line-height: 1.6;
}

.quick-link:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: #FFFFFF;
}

/* 题材方向总览：四栏 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.theme-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--brand);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 14px;
}

.theme-feature {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.75;
}

.theme-scope {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.theme-count {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.theme-card .text-link {
  margin-top: auto;
  padding-top: 16px;
  align-self: flex-start;
}

/* 封面墙：三行不等高网格 */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cover-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.cover-figure {
  margin: 0;
  overflow: hidden;
  background: var(--brand-tint);
}

.cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cover-card:hover .cover-figure img {
  transform: scale(1.03);
}

/* 第二行卡片封面比例不同，形成不等高节奏 */
.wall-grid .cover-card:nth-child(4) .cover-figure img,
.wall-grid .cover-card:nth-child(5) .cover-figure img,
.wall-grid .cover-card:nth-child(6) .cover-figure img {
  aspect-ratio: 4 / 3;
}

.cover-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  flex: 1 1 auto;
}

.cover-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.cover-tag {
  align-self: flex-start;
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.cover-card:hover .cover-tag {
  opacity: 1;
}

.cover-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 最近更新：单列逐行 */
.recent-updates .update-list {
  border-top: 1px solid var(--line);
}

/* 人气榜单与编辑选题：左右两栏 */
.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.rank-main {
  min-width: 0;
}

.rank-aside {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.aside-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.editor-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.editor-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.editor-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.editor-scope {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 阅读说明与收录边界摘要：左右两栏 */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.guide-main {
  min-width: 0;
}

.guide-aside {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.boundary-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.boundary-item {
  padding: 10px 0 10px 18px;
  position: relative;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  border-bottom: 1px solid var(--line);
}

.boundary-item::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.guide-aside .aside-text + .aside-text {
  margin-top: 16px;
}

/* 站内栏目索引：五列 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.index-col {
  min-width: 0;
}

.index-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.index-link {
  color: var(--brand);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.index-link:hover {
  color: var(--accent);
}

.index-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ========== 题材分类 tema.html ========== */

/* 题材方向逐行说明表 */
.tema-table {
  border-top: 1px solid var(--line);
}

.tema-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.tema-row-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}

.tema-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  flex: 0 0 auto;
}

.tema-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
}

.tema-feature {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.8;
  max-width: 720px;
}

.tema-scope {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  max-width: 720px;
}

/* 方向条目清单容器 */
.tema-group {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.tema-group-head {
  padding: 18px 22px;
  background: var(--brand-tint);
  border-bottom: 1px solid var(--line);
}

.tema-group-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--brand);
}

.tema-group-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.entry-list {
  padding: 0 22px;
}

.entry-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.entry-item:last-child {
  border-bottom: 0;
}

.entry-cover {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--brand-tint);
}

.entry-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.entry-body {
  min-width: 0;
}

.entry-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.entry-summary {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* 方向差异说明 */
.diff-block p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.85;
  max-width: 720px;
}

.diff-block p + p {
  margin-top: 14px;
}

/* 条目字段口径摘要 */
.section-tema-fields dl.field-table {
  margin-top: 20px;
}

/* ========== 最近更新 gengxin.html ========== */

.gengxin-layout {
  align-items: start;
}

.update-log {
  min-width: 0;
}

/* 代表条目 */
.update-feature {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 24px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.update-feature-media {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--brand-tint);
}

.update-feature-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.update-feature-body {
  min-width: 0;
}

.update-feature-body .update-date {
  display: block;
  margin-bottom: 6px;
}

.update-feature-body .update-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
}

.update-feature-body .update-tag {
  display: inline-block;
  margin-top: 8px;
  text-align: left;
}

.update-feature-body .update-status {
  display: inline-block;
  margin-top: 8px;
  margin-left: 8px;
}

.update-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* 日期分组 */
.update-group {
  margin-top: 28px;
}

.update-group-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  font-family: var(--font-mono);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
}

.update-group .update-list {
  border-top: 0;
}

/* 侧栏状态字段表 */
.update-side {
  min-width: 0;
}

.update-side .field-table {
  margin-top: 18px;
}

.aside-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.aside-note a {
  color: var(--brand);
  border-bottom: 1px solid var(--line-strong);
}

/* 记录口径：两栏 */
.update-method {
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.method-col {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.method-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
}

.method-col p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.method-col p + p {
  margin-top: 10px;
}

/* 近期更新较多的题材方向 */
.update-topics {
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

/* ========== 人气榜单 bangdan.html ========== */

.board-section {
  min-width: 0;
}

/* 位次条目列表 */
.rank-item {
  display: grid;
  grid-template-columns: 48px 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-item:first-child {
  border-top: 1px solid var(--line);
}

.rank-index {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-faint);
  text-align: center;
}

.rank-item-featured .rank-index {
  color: var(--accent);
  font-size: 20px;
}

.rank-cover {
  margin: 0;
  width: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--brand-tint);
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-body .rank-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.rank-body .rank-tag {
  display: inline-block;
  margin-top: 6px;
}

.rank-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* 排序依据 / 适用场景 */
.basis-section,
.scene-section {
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

/* 编辑选题线索 */
.topic-section {
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

/* ========== 阅读说明 shuoming.html ========== */

.section-fields {
  padding-top: 0;
}

.field-map-figure {
  margin: 20px 0 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-map-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.figure-caption {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
}

/* 题材划分规则 */
.rule-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.rule-block:first-of-type {
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.rule-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}

.rule-block p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.85;
  max-width: 720px;
}

/* 收录边界 */
.scope-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.scope-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.scope-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}

.scope-item p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* 更正记录 */
.revision-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.revision-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.revision-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.revision-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.revision-note {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  max-width: 720px;
}

.revision-guide {
  margin-top: 24px;
  padding: 20px;
  background: var(--brand-tint);
  border-radius: var(--radius);
}

.revision-guide-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}

.revision-guide p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.85;
}

.revision-guide a {
  color: var(--brand);
  border-bottom: 1px solid var(--line-strong);
}

/* 阅读说明 FAQ 区块 */
.section-faq {
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

/* ========== 404 ========== */
.error-main {
  padding-bottom: 72px;
}

.error-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding-top: 64px;
}

.error-block {
  min-width: 0;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.error-title {
  margin-top: 16px;
  font-size: 32px;
  font-weight: 600;
  color: var(--brand);
}

.error-text {
  margin-top: 14px;
  max-width: 560px;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.85;
}

.error-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-hint {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.error-hint-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 12px;
}

.error-links li + li {
  margin-top: 10px;
}

.error-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ---------------------------------------------------------
   5. responsive —— 断点 960px / 640px
   --------------------------------------------------------- */
@media (max-width: 960px) {
  :root {
    --gutter: 20px;
  }

  .hero-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero-title {
    font-size: 28px;
  }

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .wall-grid .cover-card:nth-child(4) .cover-figure img,
  .wall-grid .cover-card:nth-child(5) .cover-figure img,
  .wall-grid .cover-card:nth-child(6) .cover-figure img {
    aspect-ratio: 3 / 4;
  }

  .rank-layout,
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .page-layout,
  .sidebar-left .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .layout-side,
  .layout-aside {
    position: static;
  }

  .sidebar-left .page-layout > .layout-side,
  .sidebar-left .page-layout > .layout-aside {
    order: 0;
  }

  .footer-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .scope-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .error-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 44px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  /* 页头与移动导航 */
  .header-shell {
    flex-wrap: wrap;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 10px;
  }

  .brand-mark {
    font-size: 20px;
  }

  .nav-toggle {
    display: flex;
    order: 3;
    margin-left: auto;
  }

  .site-nav {
    order: 4;
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 6px;
    min-height: 44px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-link.is-current {
    border-bottom-color: var(--brand);
  }

  /* 标题区 */
  .page-title {
    font-size: 26px;
  }

  .hero-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 20px;
  }

  .section {
    padding: 32px 0;
  }

  /* 首屏需求条 */
  .need-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .need-item .btn {
    width: 100%;
  }

  /* 题材方向单列 */
  .theme-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 封面墙双列 */
  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .cover-body {
    padding: 12px;
  }

  .cover-name {
    font-size: 15px;
  }

  .cover-tag {
    opacity: 1;
  }

  /* 更新行改上下堆叠 */
  .update-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date status"
      "name tag";
    gap: 6px 12px;
    align-items: center;
  }

  .update-row .update-date {
    grid-area: date;
  }

  .update-row .update-name {
    grid-area: name;
  }

  .update-row .update-tag {
    grid-area: tag;
    justify-self: start;
  }

  .update-row .update-status {
    grid-area: status;
    justify-self: end;
  }

  /* 位次条目 */
  .rank-row {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
      "no name"
      "no tag";
    gap: 4px 12px;
    align-items: center;
  }

  .rank-row .rank-no {
    grid-area: no;
  }

  .rank-row .rank-name {
    grid-area: name;
  }

  .rank-row .rank-tag {
    grid-area: tag;
    justify-self: start;
  }

  .rank-item {
    grid-template-columns: 40px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover {
    width: 72px;
  }

  /* 条目标题区 */
  .entry-item {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
  }

  /* 更新代表条目堆叠 */
  .update-feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .update-feature-media img {
    aspect-ratio: 16 / 10;
  }

  /* 字段表堆叠 */
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-name {
    border-bottom: 1px solid var(--line);
  }

  .field-table thead {
    display: none;
  }

  .field-table tbody th,
  .field-table tbody td {
    display: block;
    width: auto;
  }

  .field-table tbody th {
    border-bottom: 0;
    padding-bottom: 2px;
  }

  .field-table tbody td {
    padding-top: 2px;
  }

  /* 话题行 */
  .topic-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name count"
      "note note";
    gap: 6px 12px;
    align-items: center;
  }

  .topic-row .topic-name {
    grid-area: name;
  }

  .topic-row .topic-count {
    grid-area: count;
    justify-self: end;
  }

  .topic-row .topic-note {
    grid-area: note;
  }

  /* 记录口径两栏改单列 */
  .method-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  /* 站内索引两列 */
  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  /* 页脚 */
  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  /* 404 */
  .error-code {
    font-size: 48px;
  }

  .error-title {
    font-size: 26px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn {
    width: 100%;
  }

  /* 表格横向不溢出 */
  .field-table {
    font-size: 13px;
  }

  .field-table caption,
  .table-caption,
  .field-caption,
  .field-table-caption {
    padding: 10px 12px;
  }

  .field-table tbody th,
  .field-table tbody td {
    padding: 10px 12px;
  }
}
