/* ==========================================================================
   光棍电影网 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版基线
   -------------------------------------------------------------------------- */
:root {
  --bg: #f7f9f8;
  --card: #ffffff;
  --primary: #1f6f6b;
  --primary-dark: #16514e;
  --accent: #c98a2e;
  --ink: #1d2b2a;
  --muted: #6b7d7b;
  --line: #e2e8e7;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(29, 43, 42, 0.05);
  --shadow-lift: 0 6px 18px rgba(29, 43, 42, 0.09);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --wrap: 1120px;
  --wrap-text: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 0.9em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--primary-dark);
  text-decoration: underline;
}

ul,
ol {
  margin: 0 0 0.9em;
  padding-left: 1.15em;
}

li {
  margin-bottom: 0.35em;
}

figure {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* --------------------------------------------------------------------------
   layout：全站骨架、页头、主容器、页脚、移动底栏
   -------------------------------------------------------------------------- */
.site-body {
  display: block;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

.top-line {
  background: var(--primary-dark);
  color: #e6efee;
}

.top-line p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 0.82rem;
  line-height: 1.6;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.25;
}

.brand:hover,
.brand:focus-visible {
  color: var(--primary-dark);
  text-decoration: none;
}

.brand-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: inline-block;
  padding: 9px 12px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.94rem;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--primary-dark);
  background: #eef4f3;
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  content: "";
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before {
  position: absolute;
  top: -6px;
}

.nav-toggle-icon::after {
  position: absolute;
  top: 6px;
}

.site-main {
  display: block;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.inner-main {
  max-width: var(--wrap);
  padding-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--primary-dark);
}

.breadcrumb-sep {
  color: #b6c3c1;
}

.breadcrumb-current {
  color: var(--ink);
}

.page-header {
  max-width: var(--wrap-text);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 1.72rem;
  font-weight: 700;
  color: var(--ink);
}

.page-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.footer-back {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 0.86rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(140px, 1fr));
  gap: 28px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 24px 20px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
}

.footer-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.footer-col {
  min-width: 0;
}

.footer-col-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin: 0 0 6px;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--primary-dark);
}

.footer-copy {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 24px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.mobile-bar {
  display: none;
}

/* --------------------------------------------------------------------------
   components：通用区块、按钮、卡片、列表、表格、标签
   -------------------------------------------------------------------------- */
.section {
  margin-bottom: 44px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-head {
  max-width: var(--wrap-text);
  margin-bottom: 20px;
}

.section-head h2 {
  margin-bottom: 6px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-title {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.section-intro {
  max-width: var(--wrap-text);
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-note {
  max-width: var(--wrap-text);
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.subsection-title {
  margin-bottom: 10px;
  font-size: 1.04rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--primary-dark);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.section-figure {
  margin: 0 0 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.section-figure figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  background: #fdf3e3;
  border-radius: 999px;
  color: #8a5c14;
  font-size: 0.78rem;
  line-height: 1.7;
}

.plain-list {
  margin: 0;
  padding-left: 1.1em;
}

.plain-list li {
  margin-bottom: 0.4em;
}

.related-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.related-bar a {
  font-size: 0.9rem;
  font-weight: 700;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-list li {
  margin: 0;
}

.related-list a {
  font-size: 0.92rem;
  font-weight: 700;
}

.related-entry {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-links {
  margin-top: 36px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-title {
  margin-bottom: 12px;
  font-size: 1.06rem;
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */
.site-home .hero {
  display: block;
  margin-bottom: 48px;
}

.hero-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 12px;
  background: #e6f1f0;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 0.8rem;
}

.hero-title {
  margin-bottom: 14px;
  font-size: 2.1rem;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 16px;
  color: #354745;
  font-size: 1rem;
}

.hero-points {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-points li {
  margin-bottom: 0.4em;
}

.hero-figure {
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* 首页 · 题材频道目录速览 */
.channel-list {
  margin: 0 0 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  list-style: none;
  overflow: hidden;
}

.channel-list .channel-row {
  display: grid;
  grid-template-columns: 64px minmax(120px, 1fr) minmax(160px, 1.5fr) minmax(140px, 1.2fr) 96px;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.channel-list .channel-row:last-child {
  border-bottom: 0;
}

.channel-list .channel-row:hover,
.channel-list .channel-row:focus-within {
  background: #f2f7f6;
  box-shadow: inset 3px 0 0 var(--primary);
}

.channel-no {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--primary-dark);
}

.channel-name {
  font-weight: 700;
}

.channel-org,
.channel-fit {
  color: var(--muted);
  font-size: 0.88rem;
}

.channel-enter {
  justify-self: end;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

/* 首页 · 专题片单入口 */
.collection-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.collection-card:hover,
.collection-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lift);
}

.collection-media {
  margin: 0 0 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.collection-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.collection-card .collection-name,
.collection-card .collection-theme,
.collection-card .collection-logic,
.collection-card .collection-tag,
.collection-card .collection-range,
.collection-card .collection-enter,
.collection-card .collection-link {
  margin-left: 18px;
  margin-right: 18px;
}

.collection-name {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.06rem;
}

.collection-theme,
.collection-tag {
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-size: 0.84rem;
}

.collection-logic {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.collection-range {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.collection-enter,
.collection-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 700;
}

/* 首页 · 条目字段口径速览 */
.fields-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}

.fields-col {
  min-width: 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fields-col-title {
  margin-bottom: 14px;
  font-size: 1.02rem;
}

.field-table {
  width: 100%;
  font-size: 0.9rem;
}

.field-table th,
.field-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.field-table thead th {
  background: #f2f7f6;
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-table tbody th {
  width: 32%;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--ink);
}

.boundary-block {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #f2f7f6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-block:last-child {
  margin-bottom: 0;
}

.boundary-label {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 0.94rem;
}

.boundary-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 首页 · 浏览顺序四步 */
.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step-list .step-item {
  margin: 0;
  padding: 20px 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-no {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  background: #e6f1f0;
  border-radius: 999px;
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.step-list .step-name {
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.step-goal {
  margin-bottom: 8px;
  color: #354745;
  font-size: 0.92rem;
}

.step-check {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* 首页 · 整理记录速览 */
.record-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.record-group {
  min-width: 0;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-stage {
  margin-bottom: 12px;
  font-size: 1rem;
}

.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-list .record-item {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.record-list .record-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.record-scope {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 700;
}

.record-reason {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* 首页 · 站内栏目索引 */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.sitemap-item {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.sitemap-item:hover,
.sitemap-item:focus-visible {
  border-color: var(--primary);
  color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   pages：内页通用业务模块
   -------------------------------------------------------------------------- */
.site-inner .section {
  margin-bottom: 40px;
}

/* 题材频道页 */
.channel-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.channel-table .channel-row {
  display: grid;
  grid-template-columns: 72px minmax(110px, 1fr) minmax(170px, 1.6fr) minmax(150px, 1.3fr) 92px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.channel-table .channel-row:last-child {
  border-bottom: 0;
}

.channel-table .channel-row-head {
  background: #f2f7f6;
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.channel-table article.channel-row:hover,
.channel-table article.channel-row:focus-within {
  background: #f6faf9;
}

.channel-cell {
  min-width: 0;
  font-size: 0.9rem;
}

.cell-code {
  font-family: var(--font-mono);
  color: var(--primary-dark);
}

.cell-name {
  font-weight: 700;
}

.cell-way,
.cell-audience {
  color: var(--muted);
}

.cell-enter {
  justify-self: end;
}

.cell-enter a {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.boundary-col {
  min-width: 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-col h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.boundary-col-allow {
  border-left: 3px solid var(--primary);
}

.boundary-col-deny {
  border-left: 3px solid var(--accent);
}

.boundary-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.9rem;
}

.channel-map-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.channel-map-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 96px;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.channel-map-item:last-child {
  border-bottom: 0;
}

.map-code {
  font-family: var(--font-mono);
  color: var(--primary-dark);
  font-size: 0.86rem;
}

.map-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.map-link {
  justify-self: end;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

/* 专题片单页 */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.collection-grid .collection-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.collection-grid .collection-card:hover,
.collection-grid .collection-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lift);
}

.criteria-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.criteria-col {
  min-width: 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.criteria-col-in {
  border-left: 3px solid var(--primary);
}

.criteria-col-out {
  border-left: 3px solid var(--accent);
}

.criteria-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.9rem;
}

.order-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.order-item {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.order-item:last-child {
  border-bottom: 0;
}

.order-name {
  margin-bottom: 6px;
  font-size: 1rem;
}

.order-advice {
  margin-bottom: 6px;
  color: #354745;
  font-size: 0.92rem;
}

.order-context {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* 字段口径页 */
.field-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.field-list .field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(220px, 1.6fr) minmax(200px, 1.3fr);
  gap: 18px;
  align-items: start;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.field-list .field-row:last-child {
  border-bottom: 0;
}

.field-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.field-meaning {
  margin: 0;
  font-size: 0.92rem;
}

.field-basis {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.example-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.example-col {
  min-width: 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.boundary-columns .boundary-col {
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-allow {
  border-left: 3px solid var(--primary);
}

.boundary-deny {
  border-left: 3px solid var(--accent);
}

/* 浏览顺序页 */
.guide-steps {
  margin-bottom: 40px;
}

.step-flow {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}

.step-flow .step-item {
  position: relative;
  margin: 0 0 20px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-flow .step-item:last-child {
  margin-bottom: 0;
}

.step-flow .step-item::before {
  position: absolute;
  left: -30px;
  top: 26px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 3px solid var(--bg);
  border-radius: 50%;
  content: "";
}

.step-index {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  background: #e6f1f0;
  border-radius: 999px;
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.guide-steps .step-name {
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.guide-steps .step-goal {
  margin-bottom: 6px;
  color: #354745;
  font-size: 0.92rem;
}

.step-see {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.guide-steps .step-check {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.guide-modes {
  margin-bottom: 40px;
}

.guide-figure {
  margin: 0 0 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.mode-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mode-col {
  min-width: 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mode-title {
  margin-bottom: 10px;
  font-size: 1rem;
}

.mode-col p {
  color: #354745;
  font-size: 0.92rem;
}

.mode-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.88rem;
}

.guide-pitfalls {
  margin-bottom: 0;
}

.pitfall-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.pitfall-item {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.pitfall-item:last-child {
  border-bottom: 0;
}

.pitfall-case {
  margin-bottom: 6px;
  font-size: 1rem;
}

.pitfall-issue {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pitfall-fix {
  margin: 0;
  font-size: 0.9rem;
}

/* 整理记录页 */
.records-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 44px;
}

.records-intro-text {
  min-width: 0;
}

.records-intro-text h2 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.records-intro-text p {
  color: #354745;
  font-size: 0.95rem;
}

.records-intro-media {
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.records-intro-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.records-intro-media figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.records-stages {
  margin-bottom: 44px;
}

.stage-group {
  margin-bottom: 28px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stage-group:last-child {
  margin-bottom: 0;
}

.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.stage-name {
  margin: 0;
  font-size: 1.08rem;
}

.stage-meta {
  margin: 0;
}

.stage-records {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-records .record-item {
  margin: 0 0 14px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.stage-records .record-item:last-child {
  margin-bottom: 0;
}

.stage-records .record-scope {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
}

.stage-records .record-reason {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.records-trace {
  margin-bottom: 0;
}

.trace-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trace-caption {
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: left;
}

.trace-table th,
.trace-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.trace-table thead th {
  background: #f2f7f6;
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.trace-table tbody th {
  width: 26%;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--ink);
}

.trace-table tbody tr:last-child th,
.trace-table tbody tr:last-child td {
  border-bottom: 0;
}

.trace-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* 404 页 */
.site-error .error-main {
  padding-top: 48px;
}

.error-panel {
  max-width: var(--wrap-text);
  margin-bottom: 40px;
}

.error-code {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.error-title {
  margin-bottom: 12px;
  font-size: 1.72rem;
}

.error-desc {
  margin-bottom: 20px;
  color: var(--muted);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-hint {
  max-width: var(--wrap-text);
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-hint .section-title {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.error-list {
  margin: 0;
  padding-left: 1.1em;
}

.error-list li {
  margin-bottom: 0.4em;
}

/* --------------------------------------------------------------------------
   responsive：900px 与 600px 两级断点
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 18px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 12px 6px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
    white-space: normal;
  }

  .nav-link.is-current {
    border-bottom-color: var(--line);
    border-left-color: var(--primary);
    background: #f2f7f6;
  }

  .site-main {
    padding: 24px 18px 44px;
  }

  .hero-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .hero-figure {
    order: 2;
  }

  .fields-cols,
  .records-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .records-intro-media {
    order: 2;
  }

  .channel-list .channel-row {
    grid-template-columns: 56px minmax(0, 1fr) 88px;
    grid-template-areas:
      "no name enter"
      "no org org"
      "no fit fit";
    row-gap: 6px;
  }

  .channel-list .channel-no {
    grid-area: no;
    align-self: start;
  }

  .channel-list .channel-name {
    grid-area: name;
  }

  .channel-list .channel-org {
    grid-area: org;
  }

  .channel-list .channel-fit {
    grid-area: fit;
  }

  .channel-list .channel-enter {
    grid-area: enter;
  }

  .channel-table .channel-row {
    grid-template-columns: 62px minmax(0, 1fr) 88px;
    grid-template-areas:
      "code name enter"
      "code way way"
      "code audience audience";
    row-gap: 6px;
  }

  .channel-table .channel-row-head {
    display: none;
  }

  .channel-table .cell-code {
    grid-area: code;
    align-self: start;
  }

  .channel-table .cell-name {
    grid-area: name;
  }

  .channel-table .cell-way {
    grid-area: way;
  }

  .channel-table .cell-audience {
    grid-area: audience;
  }

  .channel-table .cell-enter {
    grid-area: enter;
  }

  .field-list .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.62rem;
  }

  h2 {
    font-size: 1.26rem;
  }

  .top-line p {
    padding: 8px 16px;
    font-size: 0.78rem;
  }

  .site-main {
    padding: 20px 16px 96px;
  }

  .inner-main {
    padding-top: 18px;
  }

  .page-title,
  .error-title {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 1.66rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .section {
    margin-bottom: 34px;
  }

  .section-figure img,
  .guide-figure img {
    aspect-ratio: 16 / 10;
  }

  .boundary-grid,
  .criteria-columns,
  .example-columns,
  .boundary-columns,
  .mode-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-map-item {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "code text"
      "link link";
    row-gap: 6px;
  }

  .channel-map-item .map-code {
    grid-area: code;
  }

  .channel-map-item .map-text {
    grid-area: text;
  }

  .channel-map-item .map-link {
    grid-area: link;
    justify-self: start;
  }

  .step-flow {
    border-left: 0;
  }

  .step-flow .step-item {
    padding: 16px 18px;
  }

  .step-flow .step-item::before {
    display: none;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 20px 16px 16px;
  }

  .footer-back,
  .footer-copy {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer-copy {
    padding-bottom: 88px;
  }

  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--card);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mobile-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 6px 4px;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
  }

  .mobile-bar-item:hover,
  .mobile-bar-item:focus-visible {
    color: var(--primary-dark);
    background: #f2f7f6;
    text-decoration: none;
  }

  .mobile-bar-item.is-current {
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: inset 0 2px 0 var(--primary);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
