/* ============================================================
   午夜影院在线观看 · 全站样式表
   分组：base / layout / components / pages / responsive
   ============================================================ */

/* ------------------------------------------------------------
   base —— 变量、重置、排版基础
   ------------------------------------------------------------ */
:root {
  --bg-page: #f5f5f3;
  --bg-surface: #ffffff;
  --bg-accent-soft: #ece7e0;
  --ink: #1c1c1a;
  --ink-muted: #6b6b66;
  --line: #dcdcd6;
  --accent: #6b5b4a;
  --radius: 6px;
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 40px;
  --gap-xl: 64px;
  --container: 1180px;
  --reading: 760px;
  --header-h: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl, dt, dd {
  margin: 0;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

figure {
  margin: 0;
}

figcaption {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

:focus-visible {
  outline: 2px solid var(--accent);
  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(--ink);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}


/* ------------------------------------------------------------
   layout —— 骨架：body、页头、主导航、主容器、页脚
   ------------------------------------------------------------ */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(245, 245, 243, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  max-width: var(--container);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

.brand {
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.brand:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-surface);
  position: relative;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background-color: var(--ink);
}

.nav-toggle::before {
  top: 17px;
}

.nav-toggle::after {
  top: 25px;
}

.nav-toggle[aria-expanded="true"]::before {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  top: 21px;
  transform: rotate(-45deg);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}

.nav-list > li {
  display: block;
}

.nav-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex: 0 0 auto;
}

.header-boundary {
  font-size: 14px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  white-space: nowrap;
}

.header-boundary:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.command-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-surface);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.command-trigger::after {
  content: "⌘K";
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.command-trigger:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.home-main {
  display: block;
}

.inner-main {
  display: block;
  max-width: var(--reading);
  margin: 0 auto;
  padding: var(--gap-md) var(--gap-md) var(--gap-xl);
}

/* 页脚 */
.site-footer {
  margin-top: var(--gap-xl);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--gap-lg);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-md) var(--gap-lg);
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: var(--gap-xs);
}

.footer-desc {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--gap-sm);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: var(--ink-muted);
  padding: 2px 0;
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-boundary p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap-md) var(--gap-lg);
  border-top: 1px solid var(--line);
  padding-top: var(--gap-sm);
}

.footer-copyright {
  font-size: 13px;
  color: var(--ink-muted);
}

.back-to-top {
  font-size: 13px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.back-to-top:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* ------------------------------------------------------------
   components —— 通用组件
   ------------------------------------------------------------ */

/* 命令面板 */
.command-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: rgba(28, 28, 26, 0.42);
  padding: var(--gap-lg) var(--gap-md);
  overflow-y: auto;
}

.command-panel[hidden] {
  display: none;
}

.command-inner {
  max-width: 560px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap-md);
}

.command-heading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--gap-xs);
}

.command-heading + .command-list {
  margin-bottom: var(--gap-md);
}

.command-list {
  display: flex;
  flex-direction: column;
}

.command-list a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}

.command-list a:hover {
  background-color: var(--bg-accent-soft);
  color: var(--accent);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: var(--gap-md);
}

.breadcrumb a {
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 页面标题区（内页统一） */
.page-header {
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--gap-lg);
}

.page-title {
  font-size: 34px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: var(--gap-sm);
}

.page-description,
.page-lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 640px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
  font-size: 13px;
  color: var(--ink-muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-item::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent);
}

.page-updated,
.page-category {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-muted);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-right: var(--gap-xs);
}

/* 区块通用 */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-md) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--gap-lg);
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--gap-xs);
}

.section-lede,
.section-intro {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.section-footnote {
  margin-top: var(--gap-md);
  font-size: 14px;
  color: var(--ink-muted);
}

.inline-link {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.inline-link:hover {
  border-bottom-color: var(--accent);
}

/* 表格 */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.field-table,
.compare-table,
.data-table {
  min-width: 520px;
  font-size: 14px;
  border-top: 1px solid var(--ink);
}

.field-table-caption,
.table-caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--ink-muted);
  padding-bottom: var(--gap-xs);
}

.field-table th,
.field-table td,
.compare-table th,
.compare-table td,
.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.65;
}

.field-table thead th,
.compare-table thead th,
.data-table thead th {
  font-weight: 600;
  color: var(--ink);
  background-color: var(--bg-accent-soft);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.field-table tbody th,
.compare-table tbody th,
.data-table tbody th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.field-table tbody td,
.compare-table tbody td,
.data-table tbody td {
  color: var(--ink-muted);
}

/* 编号步骤（首页 / 指南 / 边界共用外壳） */
.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.step-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--gap-sm);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--line);
}

.step-num,
.step-index {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

.step-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body {
  min-width: 0;
}

.step-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.step-desc {
  color: var(--ink-muted);
}

.step-link {
  margin-top: 6px;
}

.step-link a {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.step-link a:hover {
  border-bottom-color: var(--accent);
}

/* 相关页面入口 */
.related-links,
.related-nav {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--ink);
}

.related-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
}

.related-item {
  flex: 1 1 200px;
  min-width: 0;
}

.related-item a {
  display: block;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 15px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.related-item a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 图片容器与图片约束 */
.hero-visual,
.feature-cover,
.channel-figure,
.page-figure,
.entry-diagram,
.content-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--bg-accent-soft);
}

.hero-visual img,
.feature-cover img,
.channel-figure img,
.page-figure img,
.entry-diagram img,
.content-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ------------------------------------------------------------
   pages —— 首页
   ------------------------------------------------------------ */

/* 首屏控制台 */
.hero {
  border-bottom: 1px solid var(--line);
  background-color: var(--bg-surface);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: var(--gap-xl);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-md);
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--gap-sm);
}

.hero-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--gap-sm);
}

.hero-lede {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 520px;
  margin-bottom: var(--gap-md);
}

.hero-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
}

.hero-task {
  flex: 1 1 160px;
  min-width: 0;
}

.hero-task a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-xs);
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  background-color: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.hero-task a::after {
  content: "→";
  color: var(--ink-muted);
}

.hero-task a:hover {
  border-color: var(--accent);
  background-color: var(--bg-accent-soft);
  color: var(--accent);
}

.hero-visual {
  min-width: 0;
  aspect-ratio: 4 / 3;
}

.hero-caption {
  margin-top: var(--gap-xs);
}

/* 频道方向总览 */
.channel-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--gap-md);
  align-items: start;
  padding: var(--gap-md) 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.18s ease;
}

.channel-row:hover {
  border-bottom-color: var(--accent);
}

.channel-row-main {
  min-width: 0;
}

.channel-name {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}

.channel-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.channel-row-side {
  min-width: 0;
}

.channel-samples {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: var(--gap-xs);
}

.channel-link {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.channel-link:hover {
  border-bottom-color: var(--accent);
}

/* 专题片单速览 */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.section-features .feature-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.section-features .feature-item:hover {
  border-color: var(--accent);
}

.section-features .feature-cover {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.section-features .feature-name {
  font-size: 17px;
  font-weight: 600;
  margin: var(--gap-sm) var(--gap-sm) 6px;
}

.section-features .feature-scope,
.section-features .feature-compose {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 var(--gap-sm) 6px;
}

.section-features .feature-link {
  margin: auto var(--gap-sm) var(--gap-sm);
  padding-top: var(--gap-xs);
  font-size: 14px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  align-self: flex-start;
}

.section-features .feature-link:hover {
  border-bottom-color: var(--accent);
}

/* 条目字段摘要 */
.section-fields .field-table {
  background-color: var(--bg-surface);
}

/* 观看路径三步 */
.section-steps .step-list {
  counter-reset: step;
}

/* 收录边界与反馈入口 */
.boundary-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.boundary-card {
  min-width: 0;
  padding: var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.boundary-card-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}


/* ------------------------------------------------------------
   pages —— 内页：题材频道
   ------------------------------------------------------------ */
.channel-list,
.channel-organization,
.channel-compare {
  margin-bottom: var(--gap-xl);
}

.channel-list > .section-title,
.channel-organization > .section-title,
.channel-compare > .section-title {
  margin-bottom: var(--gap-xs);
}

.channel-list > .section-intro,
.channel-organization > .section-intro,
.channel-compare > .section-intro {
  margin-bottom: var(--gap-md);
}

.channel-entry {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--gap-md);
  align-items: start;
  padding: var(--gap-md) 0;
  border-bottom: 1px solid var(--line);
}

.channel-figure {
  aspect-ratio: 3 / 2;
}

.channel-body {
  min-width: 0;
}

.channel-entry .channel-name {
  font-size: 18px;
  margin-bottom: var(--gap-xs);
}

.channel-scope,
.channel-standard,
.channel-rep {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.channel-scope .label,
.channel-standard .label,
.channel-rep .label {
  display: inline-block;
  min-width: 68px;
  font-weight: 600;
  color: var(--ink);
}

.organization-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.organization-item {
  padding: var(--gap-sm) var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
}

.organization-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.organization-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.compare-table {
  background-color: var(--bg-surface);
}


/* ------------------------------------------------------------
   pages —— 内页：专题片单
   ------------------------------------------------------------ */
.section-lists,
.section-relation,
.section-rules,
.section-related {
  margin-bottom: var(--gap-xl);
}

.section-lists > .section-title,
.section-relation > .section-title,
.section-rules > .section-title,
.section-related > .section-title {
  margin-bottom: var(--gap-xs);
}

.section-lists > .section-intro,
.section-relation > .section-intro,
.section-rules > .section-intro {
  margin-bottom: var(--gap-md);
}

.section-lists .feature-item {
  margin-bottom: var(--gap-lg);
  padding-bottom: var(--gap-lg);
  border-bottom: 1px solid var(--line);
}

.section-lists .feature-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-lists .feature-cover {
  aspect-ratio: 16 / 9;
  margin-bottom: var(--gap-sm);
}

.feature-body {
  min-width: 0;
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-muted);
  margin-bottom: var(--gap-sm);
}

.feature-meta {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px var(--gap-sm);
  font-size: 14px;
  padding: var(--gap-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-meta dt {
  font-weight: 600;
  color: var(--ink);
}

.feature-meta dd {
  color: var(--ink-muted);
  line-height: 1.7;
}

.relation-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  counter-reset: relation;
}

.relation-item {
  min-width: 0;
  padding-left: var(--gap-md);
  border-left: 1px solid var(--line);
}

.relation-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.relation-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-md);
}

.rule-item {
  min-width: 0;
  padding: var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.rule-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.section-related .related-list {
  margin-top: var(--gap-sm);
}


/* ------------------------------------------------------------
   pages —— 内页：观看指南
   ------------------------------------------------------------ */
.page-figure {
  margin-bottom: var(--gap-lg);
}

.guide-figure {
  aspect-ratio: 16 / 9;
}

.guide-figure figcaption {
  margin-top: var(--gap-xs);
}

.guide-steps,
.guide-verify,
.guide-mismatch,
.guide-faq {
  margin-bottom: var(--gap-xl);
}

.guide-steps > h2,
.guide-verify > h2,
.guide-mismatch > h2,
.guide-faq > h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--gap-xs);
}

.guide-steps > .section-intro,
.guide-verify > .section-intro,
.guide-mismatch > .section-intro,
.guide-faq > .section-intro {
  margin-bottom: var(--gap-md);
}

.guide-steps .step-item {
  grid-template-columns: 1fr;
  gap: var(--gap-xs);
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: var(--gap-sm);
}

.guide-steps .step-body {
  padding-left: 40px;
}

.step-input,
.step-judge,
.step-result {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.step-label {
  display: inline-block;
  min-width: 68px;
  font-weight: 600;
  color: var(--ink);
}

.step-input a {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.step-input a:hover {
  border-bottom-color: var(--accent);
}

.verify-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.verify-col {
  min-width: 0;
  padding: var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.verify-yes {
  border-top: 2px solid var(--accent);
}

.verify-no {
  border-top: 2px solid var(--ink);
}

.verify-heading {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}

.verify-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verify-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.verify-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.verify-no .verify-list li::before {
  border-color: var(--ink-muted);
  border-radius: 1px;
}

.mismatch-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.mismatch-item {
  min-width: 0;
  padding: var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mismatch-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.mismatch-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.mismatch-item a {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.mismatch-item a:hover {
  border-bottom-color: var(--accent);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  position: relative;
  min-height: 44px;
  padding: 14px 32px 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-muted);
}

.faq-item[open] .faq-question::after {
  content: "−";
  color: var(--accent);
}

.faq-answer {
  padding: 0 0 var(--gap-sm);
}

.faq-answer p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 640px;
}

.guide-faq + .related-nav {
  margin-top: 0;
}


/* ------------------------------------------------------------
   pages —— 内页：条目字段
   ------------------------------------------------------------ */
.entry-diagram {
  margin-bottom: var(--gap-lg);
  aspect-ratio: 16 / 9;
}

.entry-diagram figcaption {
  margin-top: var(--gap-xs);
}

.content-section {
  margin-bottom: var(--gap-xl);
}

.content-section > .section-title,
.content-section > h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--gap-xs);
}

.content-section > .section-intro,
.content-section > p {
  margin-bottom: var(--gap-md);
}

.content-section > p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-muted);
}

.field-table-section .field-table {
  background-color: var(--bg-surface);
}

.missing-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.missing-item {
  min-width: 0;
  padding: var(--gap-sm) var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
}

.missing-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.missing-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.field-relation-section .relation-list {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.relation-term {
  padding: 12px 14px 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.relation-desc {
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
}

.relation-desc a {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.relation-desc a:hover {
  border-bottom-color: var(--accent);
}

.field-relation-section + .related-links {
  margin-top: 0;
}


/* ------------------------------------------------------------
   pages —— 内页：收录边界与反馈
   ------------------------------------------------------------ */
.page-content {
  display: block;
}

.content-figure {
  margin-bottom: var(--gap-lg);
}

.boundary-figure {
  aspect-ratio: 16 / 9;
}

.boundary-figure figcaption {
  margin-top: var(--gap-xs);
}

.boundary-included > h2,
.boundary-excluded > h2,
.boundary-correct > h2,
.boundary-check > h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--gap-xs);
}

.boundary-included > p,
.boundary-excluded > p,
.boundary-correct > p,
.boundary-check > p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-muted);
  margin-bottom: var(--gap-md);
}

.boundary-included {
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--line);
}

.boundary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-sm);
}

.boundary-item {
  min-width: 0;
  padding: var(--gap-sm) var(--gap-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-included .boundary-item {
  border-left: 2px solid var(--accent);
}

.boundary-excluded .boundary-item {
  border-left: 2px solid var(--ink);
}

.boundary-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.boundary-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.boundary-steps .step-item {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
}

.boundary-check .boundary-table {
  background-color: var(--bg-surface);
  min-width: 480px;
}

.boundary-check + .related-nav {
  margin-top: 0;
}


/* ------------------------------------------------------------
   pages —— 404
   ------------------------------------------------------------ */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-xl) var(--gap-md);
}

.error-panel {
  width: 100%;
  max-width: 640px;
  padding: var(--gap-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--gap-xs);
}

.error-panel h1 {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}

.error-lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-muted);
  margin-bottom: var(--gap-md);
}

.error-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}

.error-paths a {
  display: block;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 15px;
  background-color: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.error-paths a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.error-home {
  display: inline-block;
  min-height: 44px;
  padding: 12px 20px;
  font-size: 15px;
  color: #fff;
  background-color: var(--accent);
  border-radius: var(--radius);
  margin-bottom: var(--gap-md);
}

.error-home:hover {
  color: #fff;
  background-color: var(--ink);
}

.error-note {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.error-note a {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.error-note a:hover {
  border-bottom-color: var(--accent);
}


/* ------------------------------------------------------------
   responsive —— 断点 1080 / 760 / 480
   ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-lg);
    padding: var(--gap-lg) var(--gap-md);
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-visual {
    aspect-ratio: 16 / 9;
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boundary-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-lg) var(--gap-md);
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 60px;
  }

  body {
    font-size: 15px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: var(--gap-sm);
    padding: 0 var(--gap-sm);
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .site-nav {
    order: 4;
    flex: 1 0 100%;
    min-width: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.24s ease;
  }

  .nav-list.is-open {
    max-height: 420px;
    padding-bottom: var(--gap-xs);
  }

  .nav-list > li {
    border-bottom: 1px solid var(--line);
  }

  .nav-link {
    display: block;
    min-height: 44px;
    padding: 12px 2px;
    font-size: 15px;
    border-bottom: 0;
  }

  .nav-link.is-current {
    border-bottom: 0;
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .header-boundary {
    display: none;
  }

  .command-trigger {
    min-height: 40px;
    padding: 0 10px;
  }

  .command-trigger::after {
    content: "";
  }

  .inner-main {
    padding: var(--gap-sm) var(--gap-sm) var(--gap-xl);
  }

  .breadcrumb {
    margin-bottom: var(--gap-sm);
  }

  .page-header {
    padding-bottom: var(--gap-sm);
    margin-bottom: var(--gap-md);
  }

  .page-title {
    font-size: 26px;
  }

  .page-description,
  .page-lead {
    font-size: 15px;
  }

  .section {
    padding: var(--gap-lg) var(--gap-sm) 0;
  }

  .section-head {
    margin-bottom: var(--gap-md);
  }

  .section-title,
  .content-section > .section-title,
  .content-section > h2,
  .guide-steps > h2,
  .guide-verify > h2,
  .guide-mismatch > h2,
  .guide-faq > h2,
  .boundary-included > h2,
  .boundary-excluded > h2,
  .boundary-correct > h2,
  .boundary-check > h2 {
    font-size: 20px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-lede {
    font-size: 15px;
  }

  .hero-tasks {
    flex-direction: column;
  }

  .hero-task {
    flex: 1 1 auto;
  }

  .channel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-xs);
    padding: var(--gap-sm) 0;
  }

  .feature-strip {
    display: flex;
    gap: var(--gap-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--gap-xs);
  }

  .section-features .feature-item {
    flex: 0 0 82%;
  }

  .boundary-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-sm);
  }

  .channel-figure {
    aspect-ratio: 16 / 9;
  }

  .feature-meta {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .verify-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-steps .step-body {
    padding-left: 0;
  }

  .field-relation-section .relation-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .relation-term {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .relation-desc {
    padding-top: 0;
    padding-bottom: var(--gap-sm);
  }

  .boundary-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-lg);
    padding: var(--gap-lg) var(--gap-sm) var(--gap-md);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-xs);
    padding: var(--gap-sm) var(--gap-sm) var(--gap-lg);
  }

  .related-item {
    flex: 1 1 100%;
  }

  .command-panel {
    padding: var(--gap-md) var(--gap-sm);
  }

  .error-panel {
    padding: var(--gap-md);
  }

  .error-panel h1 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 23px;
  }

  .page-title {
    font-size: 23px;
  }

  .section-features .feature-item {
    flex: 0 0 88%;
  }

  .step-item,
  .boundary-steps .step-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .step-num,
  .step-index {
    font-size: 18px;
  }

  .step-name,
  .step-title {
    font-size: 16px;
  }

  .error-paths {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
