/* ==========================================================================
   光棍影院1111 · 全站样式表
   结构：base → layout → components → pages → responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base · 变量与重置
   -------------------------------------------------------------------------- */
:root {
  --bg: #f7f6f3;
  --bg-alt: #ece9e3;
  --text: #2a2a2a;
  --text-soft: #5c5a56;
  --heading: #1a1a1a;
  --line: #d8d5cf;
  --line-strong: #c3bfb7;
  --accent: #7a5c3e;
  --accent-soft: #f0e9e1;
  --serif: "Songti SC", "SimSun", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(26, 26, 26, .05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--heading);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s ease;
}

a:hover {
  color: #5c4429;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  text-align: left;
}

button {
  font: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   layout · 站点骨架
   -------------------------------------------------------------------------- */
.site-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fbfaf8;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--heading);
  min-height: 44px;
  justify-content: center;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-soft);
}

/* 主导航 */
.site-nav {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
}

.nav-list a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.nav-list a.is-current {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--heading);
  border-radius: 1px;
}

/* 主内容容器 */
.site-main {
  display: block;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.home-main {
  padding-top: 0;
}

.inner-main {
  padding-top: 20px;
}

/* 页脚 */
.site-footer {
  margin-top: 24px;
  background: #f1efeb;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px 24px 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

.footer-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.footer-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  display: inline-block;
  min-height: 24px;
  font-size: 14px;
  color: var(--text-soft);
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-copy {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px 28px;
  font-size: 13px;
  color: var(--text-soft);
}

/* 内页骨架：面包屑与页标题区 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 18px;
  font-size: 14px;
  color: var(--text-soft);
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--heading);
}

.page-header {
  padding: 0 0 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--heading);
}

.page-description {
  margin-top: 14px;
  max-width: 860px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-soft);
}

.page-lead {
  margin-top: 12px;
  max-width: 860px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-soft);
}

/* 通用 section 与标题层级 */
.section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 0;
}

.section-head {
  margin-bottom: 22px;
}

.section-title,
.section-head h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--heading);
}

.section-desc,
.section-intro,
.section-head p {
  margin-top: 10px;
  max-width: 860px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-soft);
}

.section-desc a,
.section-intro a {
  color: var(--accent);
  border-bottom: 1px solid var(--line-strong);
}

.section-desc a:hover,
.section-intro a:hover {
  border-bottom-color: var(--accent);
}

.section-more {
  margin-top: 20px;
  font-size: 15px;
}

.section-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--accent);
}

.section-more a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   components · 通用组件
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #5c4429;
  border-color: #5c4429;
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--heading);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
}

/* 表格 */
.table-wrap,
.channel-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-table,
.channel-table {
  min-width: 640px;
  font-size: 15px;
}

.data-table caption,
.channel-caption {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-soft);
  background: var(--bg-alt);
}

.data-table th,
.data-table td,
.channel-table th,
.channel-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.data-table thead th,
.channel-table thead th {
  background: #f4f2ee;
  color: var(--heading);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody th,
.channel-table tbody th {
  width: 120px;
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.channel-table tbody tr:last-child th,
.channel-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover,
.channel-table tbody tr:hover {
  background: #fbfaf8;
}

/* 片单卡片 */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.collection-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.collection-media {
  flex: 0 0 132px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.collection-media img {
  width: 132px;
  height: 88px;
  object-fit: cover;
}

.collection-body {
  min-width: 0;
  flex: 1 1 auto;
}

.collection-name {
  font-size: 18px;
  font-weight: 600;
}

.collection-name a {
  color: var(--heading);
}

.collection-name a:hover {
  color: var(--accent);
}

.collection-theme {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.collection-meta,
.collection-channel {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.collection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.collection-meta dt {
  color: var(--heading);
  font-weight: 600;
}

.collection-meta dt::after {
  content: "：";
}

.collection-meta dd {
  margin: 0;
}

.link-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--accent);
}

.link-more::after {
  content: "→";
  margin-left: 6px;
  transition: transform .18s ease;
}

.link-more:hover::after {
  transform: translateX(3px);
}

/* 步骤条 */
.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.step-item {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-index {
  display: inline-block;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
}

.step-name,
.step-title {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
}

.step-need {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.step-desc,
.step-info {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

/* 字段与边界 */
.two-col,
.two-column,
.column-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.col,
.column {
  min-width: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.col-title,
.column-title {
  font-size: 18px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.field-list {
  margin-top: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.field-row:last-child {
  border-bottom: 0;
}

.field-row dt,
.field-term {
  color: var(--heading);
  font-weight: 600;
  font-size: 14px;
}

.field-row dd,
.field-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.boundary-list,
.scope-list,
.theme-points,
.boundary-points {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boundary-item,
.scope-item,
.theme-points li,
.boundary-points li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.boundary-item::before,
.scope-item::before,
.theme-points li::before,
.boundary-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* 整理记录 */
.record-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.record-group {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-month,
.month-title {
  font-size: 18px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.record-list,
.month-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-item,
.month-item {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.record-item:last-child,
.month-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.record-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.record-meta,
.record-date {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.record-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--accent);
}

/* 站内栏目索引 */
.index-nav {
  display: block;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-item {
  min-width: 0;
}

.index-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}

.index-item a:hover {
  border-color: var(--accent);
  background: #fbfaf8;
}

.index-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.index-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* 相关入口 */
.related-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.related-item {
  min-width: 0;
}

.related-item > a,
.related-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 88px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}

.related-item > a:hover,
.related-link:hover {
  border-color: var(--accent);
  background: #fbfaf8;
}

.related-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.related-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* 准备条件 */
.prepare-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.prepare-item {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prepare-title {
  font-size: 16px;
  font-weight: 600;
}

.prepare-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.prepare-note {
  margin-top: 24px;
  padding: 18px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.prepare-note .prepare-list {
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.fact-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

.fact-bar p {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-size: 13px;
  color: var(--accent);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  display: inline-block;
}

.hero-title {
  margin-top: 16px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-lead {
  margin-top: 16px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.hero-fact {
  min-width: 0;
}

.hero-fact dt {
  font-size: 13px;
  color: var(--text-soft);
}

.hero-fact dd {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.5;
}

.hero-media {
  margin: 0;
  min-width: 0;
}

.hero-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.hero-media figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* 首页专题片单入口为两张一组，四张卡片自动两行 */
.collection-entry .collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 首页浏览步骤四步横向 */
.browse-steps .step-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 首页整理记录速览 */
.record-glance .record-groups {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* --------------------------------------------------------------------------
   pages · 内页通用模块
   -------------------------------------------------------------------------- */

/* 题材频道页 */
.channel-notes-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.channel-note {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.note-media {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.note-media img {
  width: 100%;
  height: 132px;
  object-fit: cover;
}

.note-media figcaption {
  padding: 8px 2px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-soft);
}

.note-title {
  font-size: 18px;
  font-weight: 600;
}

.note-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.channel-collections .collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-records .record-list {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-more {
  margin-top: 16px;
  font-size: 15px;
}

.channel-related .related-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 专题片单页 */
.collection-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.collection-item {
  min-width: 0;
}

.section-collection-list .collection-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px;
}

.collection-code {
  grid-column: 1;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.section-collection-list .collection-name {
  grid-column: 2;
  margin-top: -24px;
}

.section-collection-list .collection-theme {
  grid-column: 2;
}

.section-collection-list .collection-meta {
  grid-column: 2;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.media-figure {
  margin: 0;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-alt);
}

.media-figure figcaption {
  padding: 12px 16px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-soft);
}

.section-order .step-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-order .step-item {
  padding: 18px;
}

.section-order .step-info {
  margin-top: 10px;
}

.section-record .record-list {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-name {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

.record-desc {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.section-related .related-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 浏览指引页 */
.section-steps .step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-steps .step-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 20px;
}

.step-media {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.step-media img {
  width: 100%;
  height: 148px;
  object-fit: cover;
}

.step-body {
  min-width: 0;
}

.step-body .step-index {
  display: inline-block;
  margin-bottom: 8px;
}

.step-body .step-title {
  margin-top: 0;
}

.step-need,
.step-text,
.step-result {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-soft);
}

.step-label {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--accent);
}

.step-text a {
  color: var(--accent);
  border-bottom: 1px solid var(--line-strong);
}

.step-text a:hover {
  border-bottom-color: var(--accent);
}

.section-columns .column-fields {
  min-width: 0;
}

.field-table {
  margin-top: 14px;
  font-size: 14px;
}

.field-caption {
  padding-bottom: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.field-table th,
.field-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.field-table thead th {
  background: #f4f2ee;
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
}

.field-table tbody th {
  width: 110px;
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.section-prepare .prepare-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 整理记录页 */
.records-overview,
.records-detail,
.records-fields,
.records-index {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.records-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.records-month {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.records-figure {
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.records-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.records-figure figcaption {
  padding: 12px 16px 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-soft);
}

.record-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-row {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.record-row .record-meta {
  margin-top: 0;
}

.record-row .record-name {
  margin-top: 6px;
}

.record-scope {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
}

.record-scope a {
  color: var(--accent);
  border-bottom: 1px solid var(--line-strong);
}

.record-scope a:hover {
  border-bottom-color: var(--accent);
}

.record-direction {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.fields-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.fields-col {
  min-width: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.records-index .index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-cell {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-cell a {
  display: inline-block;
  min-height: 24px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.index-cell a:hover {
  color: var(--accent);
}

.index-cell .index-desc {
  margin-top: 8px;
}

/* 404 页 */
.error-main {
  padding-top: 40px;
}

.error-hero {
  padding: 32px 0 36px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.error-hero h1 {
  margin-top: 12px;
  font-size: 32px;
  font-weight: 700;
}

.error-lead {
  margin-top: 14px;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.error-help {
  padding-top: 32px;
}

.error-help h2 {
  font-size: 24px;
  font-weight: 600;
}

.error-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-list li {
  position: relative;
  padding: 14px 18px 14px 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-soft);
}

.error-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 22px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   responsive · 断点
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .header-inner {
    padding: 12px 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: #fbfaf8;
    border-bottom: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 0 12px;
    border-radius: var(--radius);
  }

  .nav-list a.is-current {
    box-shadow: inset 3px 0 0 var(--accent);
    border-radius: 0;
    background: var(--accent-soft);
  }

  .site-header {
    position: relative;
  }

  .site-main {
    padding: 0 18px 56px;
  }

  .hero {
    padding: 32px 0 30px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-media img {
    height: 260px;
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-grid,
  .collection-entry .collection-grid,
  .channel-collections .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-list,
  .browse-steps .step-list,
  .section-order .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-groups,
  .record-glance .record-groups,
  .records-months {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-notes-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-list,
  .records-index .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .related-list,
  .section-related .related-list,
  .channel-related .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    padding: 36px 18px 26px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-copy {
    padding: 14px 18px 24px;
  }

  .section-collection-list .collection-card {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .section-steps .step-item {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
  }

  .media-figure img {
    height: 190px;
  }

  .records-figure img {
    height: 210px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    padding: 10px 14px;
  }

  .brand-mark {
    font-size: 19px;
  }

  .site-main {
    padding: 0 14px 48px;
  }

  .fact-bar p {
    padding: 9px 14px;
  }

  .hero-title {
    font-size: 25px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    flex: 1 1 100%;
  }

  .hero-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .hero-media img {
    height: 200px;
  }

  .page-title {
    font-size: 24px;
  }

  .section-title,
  .section-head h2 {
    font-size: 20px;
  }

  .section {
    padding: 28px 0;
  }

  .collection-card {
    flex-direction: column;
    gap: 12px;
  }

  .collection-media {
    flex: 0 0 auto;
  }

  .collection-media img {
    width: 100%;
    height: 168px;
  }

  .step-list,
  .browse-steps .step-list,
  .section-order .step-list,
  .section-steps .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-groups,
  .record-glance .record-groups,
  .records-months,
  .channel-notes-layout,
  .two-col,
  .two-column,
  .column-grid,
  .fields-columns,
  .media-grid,
  .prepare-list,
  .section-prepare .prepare-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-list,
  .records-index .index-grid,
  .related-list,
  .section-related .related-list,
  .channel-related .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-row {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .section-collection-list .collection-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .section-collection-list .collection-name {
    grid-column: 1;
    margin-top: 0;
  }

  .section-collection-list .collection-theme,
  .section-collection-list .collection-meta {
    grid-column: 1;
  }

  .section-steps .step-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .step-media img {
    height: 168px;
  }

  .media-figure img {
    height: 168px;
  }

  .records-figure img {
    height: 176px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px 14px 22px;
  }

  .footer-copy {
    padding: 12px 14px 22px;
  }

  .error-hero h1 {
    font-size: 24px;
  }

  .error-actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 400px) {
  .index-list,
  .records-index .index-grid,
  .related-list,
  .section-related .related-list,
  .channel-related .related-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-table th,
  .data-table td,
  .channel-table th,
  .channel-table td {
    padding: 11px 12px;
  }
}
