/* ==========================================================================
   午夜伦理片 bailike.cn — 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. base — 变量、重置、排版、通用元素
   -------------------------------------------------------------------------- */

:root {
  --ink: #111111;
  --ink-soft: #6b6b66;
  --paper: #ffffff;
  --paper-alt: #f4f4f0;
  --accent: #c8452f;
  --line: #111111;
  --line-soft: #d8d8d2;
  --radius: 6px;
  --shell: 1120px;
  --gap: 28px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   2. layout — 页头、导航、主容器、页脚、通用区块骨架
   -------------------------------------------------------------------------- */

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 2px;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
}

.nav-link {
  display: inline-block;
  padding: 8px 2px;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-link.is-current {
  font-weight: 700;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 汉堡按钮：桌面隐藏 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
}

/* 主内容骨架 */
.site-main {
  display: block;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.home-main {
  padding-top: 0;
}

.inner-main {
  padding-top: 24px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.breadcrumb-sep {
  color: var(--ink-soft);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

/* 内页标题区 */
.page-header {
  padding: 0 0 28px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 36px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
}

.page-description {
  margin-top: 12px;
  max-width: 780px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* 通用区块 */
.section {
  padding: 44px 0;
  border-top: 2px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
}

.section-head {
  margin-bottom: 26px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
}

.section-desc,
.section-intro {
  margin-top: 10px;
  max-width: 820px;
  font-size: 15px;
  color: var(--ink-soft);
}

.section-intro a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.section-foot,
.section-note,
.fields-more,
.guide-more,
.boundary-more {
  margin-top: 22px;
  font-size: 15px;
  color: var(--ink-soft);
}

.section-foot a,
.section-note a,
.fields-more a,
.guide-more a,
.boundary-more a {
  display: inline-block;
  margin-right: 22px;
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

.section-foot a:hover,
.section-note a:hover,
.fields-more a:hover,
.guide-more a:hover,
.boundary-more a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* 页脚 */
.site-footer {
  background: var(--paper-alt);
  border-top: 2px solid var(--line);
  color: var(--ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 32px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 20px 34px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.footer-desc {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-list li {
  margin-bottom: 9px;
}

.footer-list a {
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.footer-meta .footer-note,
.footer-meta .footer-copy {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   3. components — 按钮、表格、列表、卡片、FAQ、图片容器
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.btn-outline {
  background: var(--paper);
  color: var(--ink);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: var(--paper-alt);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* 图片容器统一约束 */
.hero-figure,
.collection-figure,
.channel-media,
.media-figure,
.guide-figure,
.scope-figure {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-alt);
}

.hero-figure img,
.collection-figure img,
.channel-media img,
.media-figure img,
.guide-figure img,
.scope-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.hero-figure figcaption,
.media-figure figcaption,
.scope-figure figcaption,
.channel-media figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 2px solid var(--line);
  background: var(--paper);
}

/* 通用编号徽标 */
.step-index,
.guide-index,
.correct-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  font-size: 15px;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius);
}

/* 语义表格基础 */
.field-table,
.genre-table,
.fields-table {
  font-size: 14px;
  border: 2px solid var(--line);
}

.field-table caption,
.genre-table caption,
.fields-table caption {
  text-align: left;
}

.field-table th,
.field-table td,
.genre-table th,
.genre-table td,
.fields-table th,
.fields-table td {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  vertical-align: top;
  text-align: left;
}

.field-table thead th,
.genre-table thead th,
.fields-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  border-color: var(--ink);
}

.field-table tbody th,
.genre-table tbody th,
.fields-table tbody th {
  background: var(--paper-alt);
  font-weight: 700;
  white-space: nowrap;
}

/* FAQ */
.faq-list {
  border-top: 2px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
}

.faq-question {
  position: relative;
  padding: 16px 40px 16px 0;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.faq-item[open] .faq-question {
  color: var(--accent);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 18px;
  max-width: 800px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* 轻量淡入增强：初始可见，仅做位移过渡 */
.section,
.hero {
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section,
  .hero {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --------------------------------------------------------------------------
   4. pages — 首页与各内页模块
   -------------------------------------------------------------------------- */

/* ---- 首页 · 首屏 ---- */
.hero {
  padding: 48px 0 52px;
  border-bottom: 2px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: start;
}

.hero-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
  background: var(--accent);
  border-radius: var(--radius);
}

.hero-title {
  margin-top: 16px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
}

.hero-lead {
  margin-top: 16px;
  max-width: 560px;
  font-size: 16px;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-media {
  min-width: 0;
}

.hero-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.hero-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.hero-step .step-name {
  font-size: 14px;
  font-weight: 600;
}

/* ---- 首页 · 题材频道总览 ---- */
.genre-rows {
  border-top: 2px solid var(--line);
}

.genre-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.genre-row:hover {
  border-bottom-color: var(--accent);
}

.genre-name {
  font-size: 17px;
  font-weight: 700;
}

.genre-desc {
  font-size: 15px;
  color: var(--ink-soft);
}

.genre-sample {
  font-size: 14px;
  color: var(--ink-soft);
}

.genre-enter {
  justify-self: end;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  white-space: nowrap;
}

.genre-enter:hover,
.genre-enter:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- 首页 · 专题片单速览 ---- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.collection-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.collection-card:hover {
  border-color: var(--accent);
}

.collection-name {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
}

.collection-scope {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.collection-count,
.collection-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.collection-link {
  margin-top: 14px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

.collection-link:hover,
.collection-link:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---- 首页 · 字段表格 ---- */
.section-fields .field-table-caption {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: left;
}

/* ---- 首页 · 查阅路径三步 ---- */
.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.guide-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.guide-step .guide-name {
  font-size: 17px;
  font-weight: 700;
}

.guide-step .guide-basis {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---- 首页 · 收录边界 ---- */
.boundary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
}

.boundary-item {
  padding: 16px 18px;
  border-left: 5px solid var(--accent);
  background: var(--paper-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.boundary-name {
  font-size: 16px;
  font-weight: 700;
}

.boundary-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---- 内页 · 题材频道 ---- */
.genre-table {
  margin-bottom: 30px;
}

.section-genre-overview .media-figure {
  max-width: 760px;
}

.channel-block {
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}

.channel-block:last-of-type {
  border-bottom: 0;
}

.channel-name {
  font-size: 20px;
  font-weight: 700;
  padding-left: 12px;
  border-left: 5px solid var(--accent);
}

.channel-media {
  max-width: 640px;
  margin-top: 18px;
}

.channel-desc {
  margin-top: 16px;
  max-width: 780px;
  font-size: 15px;
  color: var(--ink-soft);
}

.channel-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 24px;
}

.channel-list li {
  padding-left: 16px;
  position: relative;
  font-size: 14px;
  color: var(--ink);
}

.channel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.channel-entry {
  margin-top: 16px;
  font-size: 15px;
}

.channel-entry a {
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

.channel-entry a:hover,
.channel-entry a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.rule-list {
  display: grid;
  gap: 16px;
}

.rule-item {
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.rule-name {
  font-size: 16px;
  font-weight: 700;
}

.rule-text {
  margin-top: 8px;
  max-width: 820px;
  font-size: 14px;
  color: var(--ink-soft);
}

.crosslink-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.crosslink-col {
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.crosslink-name {
  font-size: 16px;
  font-weight: 700;
}

.crosslink-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.crosslink-text a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ---- 内页 · 专题片单 ---- */
.collection-block {
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}

.collection-block:last-of-type {
  border-bottom: 0;
}

.collection-block-title {
  font-size: 20px;
  font-weight: 700;
  padding-left: 12px;
  border-left: 5px solid var(--accent);
}

.collection-basis {
  margin-top: 14px;
  max-width: 820px;
  font-size: 15px;
  color: var(--ink-soft);
}

.collection-scope-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 24px;
}

.collection-scope-list .scope-item {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
}

.collection-scope-list .scope-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 2px;
}

.collection-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.collection-note a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.order-list {
  display: grid;
  gap: 14px;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.order-step {
  font-size: 16px;
  font-weight: 700;
}

.order-desc {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---- 内页 · 条目字段说明 ---- */
.fields-visual .media-figure {
  max-width: 760px;
}

.fields-table-section,
.fields-range-section,
.fields-missing-section {
  padding: 40px 0;
  border-top: 2px solid var(--line);
}

.fields-table {
  margin-top: 22px;
}

.range-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.range-item {
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.range-name {
  font-size: 16px;
  font-weight: 700;
}

.range-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.range-desc a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.missing-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.missing-item {
  padding: 16px 20px;
  border-left: 5px solid var(--accent);
  background: var(--paper-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.missing-name {
  font-size: 16px;
  font-weight: 700;
}

.missing-desc {
  margin-top: 8px;
  max-width: 820px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---- 内页 · 查阅路径 ---- */
.guide-overview .guide-figure {
  max-width: 760px;
  margin-bottom: 26px;
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.path-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.path-step .step-name {
  font-size: 17px;
  font-weight: 700;
}

.path-step .step-basis {
  font-size: 14px;
  color: var(--ink-soft);
}

.guide-detail,
.guide-adjust {
  padding: 40px 0;
  border-top: 2px solid var(--line);
}

.step-article {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

.step-article:last-of-type {
  border-bottom: 0;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  padding-left: 12px;
  border-left: 5px solid var(--accent);
}

.step-text {
  margin-top: 14px;
  max-width: 820px;
  font-size: 15px;
  color: var(--ink-soft);
}

.pitfall-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 24px;
}

.pitfall-item {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
}

.pitfall-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.adjust-list {
  display: grid;
  gap: 14px;
}

.adjust-item {
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.adjust-name {
  font-size: 16px;
  font-weight: 700;
}

.adjust-text {
  margin-top: 8px;
  max-width: 820px;
  font-size: 14px;
  color: var(--ink-soft);
}

.adjust-text a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ---- 内页 · 收录边界与反馈 ---- */
.section-scope-visual .scope-figure {
  max-width: 760px;
}

.scope-list,
.exclude-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.scope-list .scope-item,
.exclude-list .exclude-item {
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.exclude-list .exclude-item {
  border-left: 5px solid var(--accent);
}

.scope-list .scope-name,
.exclude-list .exclude-name {
  font-size: 16px;
  font-weight: 700;
}

.scope-list .scope-text,
.exclude-list .exclude-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.correct-steps {
  display: grid;
  gap: 14px;
}

.correct-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 200px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
}

.correct-name {
  font-size: 16px;
  font-weight: 700;
}

.correct-text {
  font-size: 14px;
  color: var(--ink-soft);
}

.correct-text a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ---- 404 页 ---- */
.error-main {
  display: block;
}

.error-panel {
  padding: 60px 0 40px;
  border-bottom: 2px solid var(--line);
}

.error-code {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.error-panel h1 {
  margin-top: 14px;
  font-size: 32px;
  font-weight: 700;
}

.error-desc {
  margin-top: 14px;
  max-width: 620px;
  font-size: 16px;
  color: var(--ink-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.error-hints {
  padding: 40px 0 0;
}

.error-hints h2 {
  font-size: 22px;
  font-weight: 700;
}

.error-hint-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
}

.error-hint-list li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
}

.error-hint-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.error-hint-list a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* --------------------------------------------------------------------------
   5. responsive — 1024px / 768px / 390px
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
  }

  .hero-title {
    font-size: 34px;
  }

  .genre-row {
    grid-template-columns: 130px minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 16px;
  }

  .collection-grid,
  .guide-steps,
  .path-steps,
  .crosslink-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 0 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 12px;
    border-top: 2px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 0;
  }

  .nav-link.is-current {
    border-bottom: 0;
  }

  .site-main {
    padding: 0 16px 48px;
  }

  .inner-main {
    padding-top: 16px;
  }

  .page-header {
    padding-bottom: 20px;
    margin-bottom: 26px;
  }

  .page-title {
    font-size: 24px;
  }

  .section {
    padding: 32px 0;
  }

  .section-title {
    font-size: 20px;
  }

  .hero {
    padding: 32px 0 36px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 16px 0;
  }

  .genre-enter {
    justify-self: start;
    margin-top: 6px;
  }

  .collection-grid,
  .guide-steps,
  .path-steps,
  .crosslink-grid,
  .boundary-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-item,
  .correct-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 26px;
  }

  .field-table,
  .genre-table,
  .fields-table {
    display: block;
    overflow-x: auto;
  }

  .field-table thead,
  .genre-table thead,
  .fields-table thead {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .field-table tbody,
  .genre-table tbody,
  .fields-table tbody {
    display: block;
  }

  .field-table tr,
  .genre-table tr,
  .fields-table tr {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--line-soft);
  }

  .field-table tbody th,
  .genre-table tbody th,
  .fields-table tbody th {
    white-space: normal;
  }

  .error-code {
    font-size: 48px;
  }

  .error-panel h1 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-title {
    font-size: 23px;
  }

  .brand {
    font-size: 18px;
  }
}
