/* ==========================================================================
   秋霞电影网站 · 全站样式表
   结构：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base · 变量与重置
   -------------------------------------------------------------------------- */
:root {
  --canvas: #f7f6f3;
  --ink: #1f2328;
  --ink-soft: #4b5563;
  --ink-faint: #6b7280;
  --accent: #c2410c;
  --accent-soft: #fbe9e0;
  --footer-bg: #2b3a4a;
  --line: #e5e2db;
  --line-strong: #d5d1c7;
  --surface: #ffffff;
  --surface-alt: #fbfaf7;
  --radius: 8px;
  --radius-sm: 6px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: 24px;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.06), 0 6px 18px rgba(31, 35, 40, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--canvas);
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt,
figure,
figcaption {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: #9a3412;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架：页头 / 导航 / 主区 / 面包屑 / 页标题 / 页脚
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(247, 246, 243, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 2px;
  background-color: var(--accent);
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
  background-color: #efede7;
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
  background-color: var(--accent-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background-color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
}

.site-main {
  display: block;
  width: 100%;
}

.inner-main {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px var(--gutter) 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--ink-faint);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.page-header {
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.page-description {
  max-width: 900px;
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* 页脚：深色四组 */
.site-footer {
  margin-top: 0;
  background-color: var(--footer-bg);
  color: #d6dde4;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px var(--gutter) 32px;
}

.footer-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.footer-brand-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: #a9b6c3;
}

.footer-col-title {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  display: inline-block;
  min-height: 24px;
  font-size: 14px;
  color: #c3cdd7;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.footer-boundary {
  font-size: 14px;
  line-height: 1.8;
  color: #a9b6c3;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-copy {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter) 26px;
  font-size: 13px;
  color: #93a1b0;
}

/* --------------------------------------------------------------------------
   layout · 内页双栏（默认正文在前，侧栏在后）
   -------------------------------------------------------------------------- */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

/* 侧栏在前的页面：aside 在 DOM 中先出现 */
.page-layout.sidebar-left {
  grid-template-columns: 280px minmax(0, 1fr);
}

.content-column,
.content-main,
.layout-content {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   components · 通用区块、标题、链接、按钮
   -------------------------------------------------------------------------- */
.section {
  margin-bottom: 44px;
}

.section-title {
  font-size: 23px;
  font-weight: 700;
  color: var(--ink);
}

.section-desc,
.section-lead,
.section-intro {
  max-width: 860px;
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-soft);
}

.section-more {
  margin-top: 18px;
}

.section-footnote {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-faint);
}

.subsection-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.text-link::after {
  content: "→";
  margin-left: 6px;
  font-size: 14px;
}

.text-link:hover,
.text-link:focus-visible {
  color: #9a3412;
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.btn-primary {
  color: #ffffff;
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #ffffff;
  background-color: #9a3412;
  border-color: #9a3412;
}

.btn-ghost {
  color: var(--ink);
  background-color: transparent;
  border-color: var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--accent);
  background-color: var(--surface);
  border-color: var(--accent);
}

/* figure 与图片：稳定宽高约束 */
.hero-media,
.section-media,
.collection-media,
.collection-figure,
.channel-figure,
.aside-figure,
.guide-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #eceae4;
}

.hero-media img,
.section-media img,
.collection-media img,
.collection-figure img,
.channel-figure img,
.aside-figure img,
.guide-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

figcaption {
  font-size: 13px;
  color: var(--ink-faint);
}

/* 卡片通用 */
.collection-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.collection-card:hover,
.collection-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* 步骤列表通用 */
.step-list {
  display: grid;
  gap: 16px;
}

.step-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 16px 18px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.step-index {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.step-title {
  font-size: 16px;
  font-weight: 700;
}

.step-text {
  grid-column: 2;
  font-size: 15px;
  color: var(--ink-soft);
}

/* 边界说明通用 */
.boundary-list {
  display: grid;
  gap: 12px;
}

.boundary-item {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  color: var(--ink-soft);
}

.boundary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* --------------------------------------------------------------------------
   components · 首页各模块
   -------------------------------------------------------------------------- */
.clue-bar {
  background-color: var(--ink);
  color: #e7e4dd;
}

.clue-bar-text {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px var(--gutter);
  font-size: 13px;
  letter-spacing: 0;
}

.hero {
  padding: 40px 0 44px;
  background-color: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero-kicker {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.hero-title {
  margin-top: 16px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.28;
}

.hero-desc {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-stat dt {
  font-size: 13px;
  color: var(--ink-faint);
}

.hero-stat dd {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.hero-media img {
  aspect-ratio: 4 / 3;
}

.hero-media-caption {
  padding: 10px 14px;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

.section-inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.home-main .section {
  padding-top: 46px;
  margin-bottom: 0;
}

.home-main .section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 26px;
}

/* 频道总览表（首页 role=table） */
.channel-table {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  overflow: hidden;
}

.channel-row {
  display: grid;
  grid-template-columns: 72px minmax(140px, 0.9fr) minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.channel-row:first-child {
  border-top: 0;
}

.channel-row:not(.channel-row-head):hover {
  background-color: var(--surface-alt);
}

.channel-row-head {
  background-color: #f1efe9;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.channel-cell {
  min-width: 0;
  font-size: 15px;
}

.cell-no {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.cell-name {
  font-weight: 600;
}

.cell-dir,
.cell-org {
  color: var(--ink-soft);
}

.section-media {
  margin-top: 26px;
}

.section-media img {
  aspect-ratio: 21 / 8;
}

.section-media-caption {
  padding: 10px 14px;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

/* 专题片单卡（首页） */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.collection-media img {
  aspect-ratio: 16 / 9;
}

.collection-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 18px 18px;
}

.collection-name {
  font-size: 17px;
  font-weight: 700;
}

.collection-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.collection-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.card-link::after {
  content: "→";
  margin-left: 6px;
}

.card-link:hover,
.card-link:focus-visible {
  color: #9a3412;
  text-decoration: underline;
}

/* 整理记录速览（首页） */
.record-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.record-group {
  padding: 18px 20px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-month {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
}

.record-date {
  font-family: var(--font-mono);
  color: var(--accent);
  white-space: nowrap;
}

.record-text {
  color: var(--ink-soft);
}

/* 字段说明与收录边界（首页） */
.fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.fields-col {
  padding: 22px 24px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-list {
  display: grid;
  gap: 12px;
}

.field-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.field-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.field-name {
  font-weight: 700;
  font-size: 15px;
}

.field-value {
  font-size: 15px;
  color: var(--ink-soft);
}

.fields-col .boundary-list {
  margin-top: 4px;
}

.boundary-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-faint);
}

/* 站内页面索引（首页） */
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.index-col {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.index-title {
  font-size: 17px;
  font-weight: 700;
}

.index-desc {
  flex: 1 1 auto;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.index-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.index-link::after {
  content: "→";
  margin-left: 6px;
}

.index-link:hover,
.index-link:focus-visible {
  color: #9a3412;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   components · 侧栏（频道分类树 / 专题分类树 / 字段目录）
   -------------------------------------------------------------------------- */
.sidebar,
.channel-tree,
.side-tree {
  padding: 20px 20px 22px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sidebar-title,
.side-tree-title {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
}

.sidebar-note,
.tree-note,
.sidebar-footnote {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-faint);
}

.tree-list {
  display: grid;
  gap: 4px;
}

.tree-item {
  list-style: none;
}

.tree-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.tree-link:hover,
.tree-link:focus-visible {
  color: var(--ink);
  background-color: var(--surface-alt);
  border-left-color: var(--accent);
}

.tree-group {
  margin-bottom: 18px;
}

.tree-group:last-of-type {
  margin-bottom: 0;
}

.tree-group-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: none;
}

.side-toggle {
  display: none;
  width: 100%;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
  background-color: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   pages · 题材频道页
   -------------------------------------------------------------------------- */
.channel-table thead th,
.channel-table tbody td {
  padding: 13px 16px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.channel-table thead th {
  background-color: #f1efe9;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.channel-table tbody tr:last-child td {
  border-bottom: 0;
}

.channel-table tbody tr:hover {
  background-color: var(--surface-alt);
}

.channel-table .channel-no {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.channel-table .channel-name {
  font-weight: 600;
}

.channel-list .section-desc {
  margin-bottom: 18px;
}

.channel-organize .section-desc {
  margin-bottom: 20px;
}

.channel-detail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.channel-detail:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.channel-figure img {
  aspect-ratio: 4 / 3;
}

.channel-figure figcaption {
  padding: 8px 12px;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

.channel-detail-title {
  font-size: 17px;
  font-weight: 700;
}

.channel-detail-body p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.fields-order {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 26px;
  align-items: start;
}

.fields-table-wrap,
.order-steps-wrap {
  padding: 20px 22px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fields-table th,
.fields-table td {
  padding: 11px 12px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

.fields-table th {
  width: 130px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.fields-table td {
  color: var(--ink-soft);
}

.fields-table tr:last-child th,
.fields-table tr:last-child td {
  border-bottom: 0;
}

.order-steps {
  display: grid;
  gap: 12px;
  counter-reset: order;
}

.order-step {
  position: relative;
  padding-left: 34px;
  font-size: 15px;
  color: var(--ink-soft);
}

.order-step::before {
  counter-increment: order;
  content: counter(order);
  position: absolute;
  left: 0;
  top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.collection-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.collection-card-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px;
  color: var(--ink);
}

.collection-card-link:hover,
.collection-card-link:focus-visible {
  color: var(--ink);
}

.collection-card-media {
  overflow: hidden;
  margin: -18px -20px 14px;
}

.collection-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.collection-card-title {
  font-size: 16px;
  font-weight: 700;
}

.collection-card-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.collection-card-channel {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-faint);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.related-item a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.related-item a:hover,
.related-item a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   pages · 专题片单页
   -------------------------------------------------------------------------- */
.collection-sidebar .sidebar-note {
  margin-top: 0;
  margin-bottom: 16px;
}

.collection-sidebar .sidebar-footnote {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.collection-figure {
  margin: 0;
}

.collection-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.collection-topic {
  padding: 14px 18px 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.collection-channel {
  padding: 12px 18px 18px;
  margin-top: auto;
  font-size: 13px;
  color: var(--ink-faint);
}

.section-collection-map .table-wrap {
  overflow-x: auto;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  min-width: 520px;
}

.data-table caption {
  padding: 14px 18px 0;
  text-align: left;
  font-size: 13px;
  color: var(--ink-faint);
}

.data-table th,
.data-table td {
  padding: 13px 18px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  background-color: #f1efe9;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .cell-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.scope-item {
  padding: 18px 20px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-name {
  font-size: 16px;
  font-weight: 700;
}

.scope-text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages · 整理记录页
   -------------------------------------------------------------------------- */
.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.records-timeline {
  min-width: 0;
}

.records-timeline .section-lead {
  margin-bottom: 24px;
}

.records-timeline .record-month {
  padding: 0 0 22px;
  margin-bottom: 22px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.records-timeline .record-month:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.month-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.month-count {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
}

.records-timeline .record-list {
  gap: 18px;
}

.records-timeline .record-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.records-timeline .record-date {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.record-body {
  min-width: 0;
}

.record-heading {
  font-size: 16px;
  font-weight: 700;
}

.record-summary {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}

.record-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-faint);
}

.records-aside {
  min-width: 0;
}

.aside-title {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
}

.aside-figure {
  margin-bottom: 20px;
}

.aside-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.aside-figure figcaption {
  padding: 10px 12px;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

.aside-block {
  padding: 18px 20px;
  margin-bottom: 18px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-block-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
}

.aside-block p {
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.aside-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent);
}

.aside-links {
  padding: 18px 20px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-link-list {
  display: grid;
  gap: 4px;
}

.aside-link-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.aside-link-list li:last-child a {
  border-bottom: 0;
}

.aside-link-list a:hover,
.aside-link-list a:focus-visible {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   pages · 浏览指引页
   -------------------------------------------------------------------------- */
.guide-section {
  margin-bottom: 44px;
}

.guide-section:last-of-type {
  margin-bottom: 0;
}

.guide-figure {
  margin: 20px 0 22px;
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 14px;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

.field-table {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-caption {
  padding: 14px 18px 0;
  text-align: left;
  font-size: 13px;
  color: var(--ink-faint);
}

.field-table th,
.field-table td {
  padding: 12px 18px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  background-color: #f1efe9;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field-table tbody th {
  width: 150px;
  font-weight: 700;
  white-space: nowrap;
}

.field-table tbody td {
  color: var(--ink-soft);
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.guide-section .boundary-list {
  margin-top: 20px;
}

.guide-section .boundary-item {
  padding: 16px 18px 16px 20px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.guide-section .boundary-item::before {
  left: 8px;
  top: 24px;
}

.boundary-title {
  font-size: 16px;
  font-weight: 700;
}

.boundary-text {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.path-card {
  padding: 20px 22px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.path-title {
  font-size: 17px;
  font-weight: 700;
}

.path-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.path-steps {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  counter-reset: path;
}

.path-step {
  position: relative;
  padding-left: 30px;
  font-size: 14px;
  color: var(--ink-soft);
}

.path-step::before {
  counter-increment: path;
  content: counter(path);
  position: absolute;
  left: 0;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  position: relative;
  min-height: 52px;
  padding: 15px 46px 15px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "–";
}

.faq-item[open] .faq-question {
  border-bottom: 1px solid var(--line);
}

.faq-answer {
  padding: 14px 18px 18px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */
.error-main {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
}

.error-hero {
  max-width: 720px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.error-hero h1 {
  margin-top: 16px;
  font-size: 28px;
}

.error-desc {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.error-routes {
  margin-top: 36px;
}

.error-routes h2 {
  font-size: 20px;
}

.error-route-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.error-route-item {
  padding: 18px 20px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-route-item a {
  font-size: 16px;
  font-weight: 700;
}

.error-route-item p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   responsive · 平板与手机
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .hero-title {
    font-size: 32px;
  }

  .page-layout,
  .page-layout.sidebar-left,
  .records-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  /* 侧栏在前的页面，移动端把侧栏排在正文之后 */
  .page-layout.sidebar-left > .channel-tree,
  .page-layout.sidebar-left > .sidebar,
  .page-layout.sidebar-left > .side-tree {
    order: 2;
  }

  .page-layout.sidebar-left > .content-column,
  .page-layout.sidebar-left > .content-main,
  .page-layout.sidebar-left > .layout-content {
    order: 1;
  }

  .records-aside {
    order: 2;
  }

  .fields-order {
    grid-template-columns: minmax(0, 1fr);
  }

  .fields-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  /* 移动导航：显示按钮，只收起列表本身 */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    padding: 0 var(--gutter);
    background-color: var(--canvas);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 14px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
    padding: 0 14px;
    font-size: 16px;
  }

  .header-inner {
    position: relative;
  }

  .page-title {
    font-size: 24px;
  }

  .hero {
    padding: 28px 0 32px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .home-main .section {
    padding-top: 34px;
  }

  .section-title {
    font-size: 20px;
  }

  /* 频道总览表：移动端改为逐行卡片式 */
  .channel-table {
    display: grid;
    gap: 12px;
    border: 0;
    background-color: transparent;
    border-radius: 0;
  }

  .channel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 16px 18px;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .channel-row:first-child {
    border-top: 1px solid var(--line);
  }

  .channel-row-head {
    display: none;
  }

  .cell-no {
    font-size: 13px;
  }

  .cell-name {
    font-size: 17px;
  }

  .channel-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .channel-detail:first-of-type {
    padding-top: 0;
  }

  .records-timeline .record-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .record-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .field-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .field-table tbody th {
    width: auto;
  }

  .field-table {
    min-width: 0;
  }

  .section-collection-map .table-wrap {
    overflow-x: auto;
  }

  .data-table {
    min-width: 480px;
  }

  .side-toggle {
    display: block;
  }

  .side-tree .tree-list {
    display: none;
  }

  .side-tree .tree-list.is-open {
    display: grid;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 36px var(--gutter) 26px;
  }

  .footer-bottom .footer-copy {
    padding: 16px var(--gutter) 22px;
  }

  .error-main {
    padding: 36px var(--gutter) 48px;
  }

  .error-code {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 23px;
  }

  .page-title {
    font-size: 22px;
  }

  .error-hero h1 {
    font-size: 22px;
  }

  .record-group {
    padding: 16px;
  }

  .fields-col,
  .scope-item,
  .path-card,
  .aside-block {
    padding: 16px;
  }

  .collection-card-media {
    margin: -16px -16px 12px;
  }
}
