/* ==========================================================================
   被窝福利电影 · 全站样式表
   结构：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置与基础排版
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-subtle: #EEF1F5;
  --text-main: #1F2329;
  --text-sub: #5A6472;
  --brand: #2F5D8A;
  --brand-dark: #24486B;
  --accent: #D97A3D;
  --line: #E3E6EB;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-soft: 0 1px 2px rgba(31, 35, 41, 0.05);
  --wrap: 1120px;
  --wrap-narrow: 900px;
  --gap-module: 56px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "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(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

h1 {
  font-size: 32px;
  line-height: 40px;
}

h2 {
  font-size: 24px;
  line-height: 32px;
}

h3 {
  font-size: 18px;
  line-height: 26px;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--brand-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 22px;
}

strong {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   layout：页头、主导航、主内容容器、面包屑、页脚
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 248, 250, 0.94);
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  background: #FFFFFF;
  border-bottom-color: var(--line);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.06);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-main);
  text-decoration: none;
}

.brand:hover,
.brand:focus {
  color: var(--text-main);
  text-decoration: none;
}

.brand-name {
  font-size: 19px;
  font-weight: 600;
  line-height: 26px;
}

.brand-tag {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 18px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text-main);
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 15px;
  line-height: 24px;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--brand);
  background: var(--bg-subtle);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--brand);
  background: #E8EEF5;
  font-weight: 600;
}

.site-main {
  display: block;
}

.home-main {
  padding-bottom: 8px;
}

.inner-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 22px;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  color: var(--brand);
}

.breadcrumb-sep {
  color: #B4BBC5;
}

.breadcrumb-current {
  color: var(--text-main);
}

.page-header {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  line-height: 40px;
  margin-bottom: 12px;
}

.page-description {
  max-width: 760px;
  margin: 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 28px;
}

.page-media {
  max-width: 760px;
  margin-top: 24px;
}

.page-media img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.site-footer {
  margin-top: 40px;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px 40px;
}

.footer-brand-name {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 600;
}

.footer-brand-desc {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

.footer-nav-title,
.footer-scope-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-list a {
  color: var(--text-sub);
  font-size: 14px;
  line-height: 22px;
}

.footer-nav-list a:hover,
.footer-nav-list a:focus {
  color: var(--brand);
}

.footer-scope p {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-copy {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 22px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 14px;
}

.back-to-top:hover,
.back-to-top:focus {
  color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

/* 内页两栏布局：默认主内容在前，aside 在后 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

/* 侧栏在前的内页：容器自身带 .sidebar-left */
.page-layout.sidebar-left {
  grid-template-columns: 260px minmax(0, 1fr);
}

/* 侧栏在前的内页：祖先节点带 .sidebar-left */
.sidebar-left .page-layout {
  grid-template-columns: 260px minmax(0, 1fr);
}

.layout-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.layout-content {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   components：通用模块标题、列表、表格、步骤、卡片
   -------------------------------------------------------------------------- */

.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin-bottom: 10px;
}

.section-head p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.section-title {
  margin-bottom: 10px;
}

.section-lead,
.section-intro,
.section-desc {
  margin: 0 0 24px;
  max-width: 780px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

/* 字段说明表格（首页 / 分类页 / 收录范围页共用） */
.field-table,
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
}

.spec-table caption,
.table-caption,
.field-table-caption,
.compare-caption {
  padding: 12px 16px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 22px;
  text-align: left;
  caption-side: top;
}

.field-table th,
.field-table td,
.spec-table th,
.spec-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 26px;
}

.field-table thead th,
.spec-table thead th {
  border-top: none;
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
}

.field-table tbody th,
.spec-table tbody th {
  width: 180px;
  color: var(--text-main);
  font-weight: 600;
  background: #FBFCFD;
}

.table-wrap {
  overflow-x: auto;
}

/* 步骤编号：首页路径摘要、浏览指引步骤、反馈步骤各自限定作用域 */
.path-steps,
.step-list,
.feedback-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.path-step,
.step-item,
.feedback-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-step .path-step-no,
.step-item .step-index,
.feedback-step .feedback-step-index {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
}

.path-step .path-step-body,
.feedback-step .feedback-step-body {
  min-width: 0;
}

.path-step .path-step-title,
.step-item .step-title,
.feedback-step .feedback-step-title {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 26px;
}

.path-step .path-step-body p,
.step-item p,
.feedback-step .feedback-step-body p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

/* 范围说明块（首页 / 收录范围页共用容器） */
.scope-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.scope-block,
.scope-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-block h3,
.scope-column .scope-column-title {
  margin-bottom: 12px;
  font-size: 17px;
  line-height: 26px;
}

.scope-block-covered h3,
.scope-covered .scope-column-title {
  color: var(--brand);
}

.scope-block-excluded h3,
.scope-excluded .scope-column-title {
  color: var(--accent);
}

.scope-block-feedback h3 {
  color: var(--text-main);
}

.scope-list,
.scope-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scope-list li,
.scope-item {
  position: relative;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.scope-list li::before,
.scope-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.scope-block-excluded .scope-list li::before,
.scope-excluded .scope-item::before {
  background: var(--accent);
}

.scope-item .scope-item-name {
  display: block;
  color: var(--text-main);
  font-size: 15px;
}

.scope-item .scope-item-desc {
  display: block;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

.scope-block-feedback .scope-link {
  margin: 14px 0 0;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */

.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
}

.hero-title {
  margin-bottom: 16px;
  font-size: 34px;
  line-height: 44px;
}

.hero-desc {
  max-width: 560px;
  margin: 0 0 24px;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 28px;
}

.hero-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.hero-path {
  min-width: 0;
}

.hero-path-link {
  display: block;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-main);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-path-link:hover,
.hero-path-link:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
  color: var(--brand);
  text-decoration: none;
}

.hero-path .hero-path-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  margin-bottom: 4px;
}

.hero-path .hero-path-note {
  display: block;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 21px;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.category-overview,
.topic-overview,
.field-table,
.path-summary,
.scope-entry {
  padding: var(--gap-module) 0 0;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 16px 24px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  transition: background-color 0.15s ease;
}

.category-row:first-child {
  border-top: none;
}

.category-row:hover {
  background: #FBFCFD;
}

.category-row .category-row-main {
  min-width: 0;
}

.category-row .category-name {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 26px;
}

.category-row .category-scope {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.category-row .category-samples {
  margin: 0;
  align-self: center;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

.overview-media {
  margin-top: 24px;
}

.overview-media img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.topic-overview .topic-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.topic-overview .topic-item {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-overview .topic-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.topic-overview .topic-name {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 26px;
}

.topic-overview .topic-desc {
  margin: 0 0 10px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.topic-overview .topic-scope {
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

.scope-entry .scope-columns {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* --------------------------------------------------------------------------
   pages：题材分类
   -------------------------------------------------------------------------- */

.category-nav,
.step-nav {
  position: sticky;
  top: 88px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-nav .aside-title,
.step-nav .step-nav-title {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.category-nav .aside-desc,
.step-nav .step-nav-note {
  margin: 0 0 14px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 23px;
}

.category-nav .aside-subtitle {
  margin: 18px 0 10px;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-main);
}

.aside-list,
.step-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-list a,
.step-nav-list a {
  display: block;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 15px;
  line-height: 24px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.aside-list a:hover,
.aside-list a:focus,
.step-nav-list a:hover,
.step-nav-list a:focus {
  background: var(--bg-subtle);
  color: var(--brand);
  text-decoration: none;
}

.category-groups {
  min-width: 0;
}

.category-groups .genre-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 96px;
}

.category-groups .genre-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.category-groups .genre-body {
  min-width: 0;
}

.category-groups .genre-name {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 27px;
}

.category-groups .genre-scope {
  margin: 0 0 12px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.category-groups .genre-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-groups .genre-samples li {
  padding: 5px 12px;
  background: var(--bg-subtle);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 21px;
}

.category-groups .genre-advice,
.category-groups .field-reference {
  margin-top: 40px;
}

.category-groups .advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.category-groups .advice-item {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-groups .advice-name {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.category-groups .advice-item p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.category-groups .field-note {
  margin: 14px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

/* --------------------------------------------------------------------------
   pages：专题索引
   -------------------------------------------------------------------------- */

.topic-list .topic-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-list .topic-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topic-list .topic-cover {
  min-width: 0;
}

.topic-list .topic-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.topic-list .topic-body {
  min-width: 0;
}

.topic-list .topic-name {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 27px;
}

.topic-list .topic-desc {
  margin: 0 0 10px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.topic-list .topic-meta {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 16px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  line-height: 24px;
}

.topic-list .topic-meta dt {
  color: var(--text-main);
  font-weight: 600;
}

.topic-list .topic-meta dd {
  margin: 0;
  color: var(--text-sub);
}

.topic-structure,
.topic-vs-category {
  margin-top: 40px;
}

.structure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.structure-card {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.structure-card .structure-name {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.structure-card p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.compare-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 26px;
}

.compare-table thead th {
  border-top: none;
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 14px;
}

.compare-table tbody th {
  width: 160px;
  background: #FBFCFD;
  font-weight: 600;
}

.compare-links {
  margin-top: 16px;
  font-size: 15px;
  line-height: 26px;
}

.compare-links p {
  margin: 0;
}

.compare-links a {
  margin-right: 16px;
}

/* --------------------------------------------------------------------------
   pages：浏览指引
   -------------------------------------------------------------------------- */

.preparation,
.steps,
.checkpoints {
  margin-bottom: 40px;
}

.preparation:last-child,
.steps:last-child,
.checkpoints:last-child {
  margin-bottom: 0;
}

.media-figure {
  margin-bottom: 24px;
}

.media-figure img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.prep-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.prep-item {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prep-item .prep-title {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.prep-item p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.checkpoint-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkpoint-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.checkpoint-item .checkpoint-summary {
  position: relative;
  padding: 14px 44px 14px 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  cursor: pointer;
  list-style: none;
}

.checkpoint-item .checkpoint-summary::-webkit-details-marker {
  display: none;
}

.checkpoint-item .checkpoint-summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 20px;
  font-weight: 600;
}

.checkpoint-item[open] .checkpoint-summary::after {
  content: "−";
}

.checkpoint-item p {
  margin: 0;
  padding: 0 20px 16px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.next-action {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.next-action .next-action-title {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.next-action p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.next-action a {
  margin-right: 16px;
}

/* --------------------------------------------------------------------------
   pages：收录范围与反馈
   -------------------------------------------------------------------------- */

.scope-list,
.tag-rules,
.feedback-path,
.scope-related {
  margin-bottom: 40px;
}

.scope-list:last-child,
.feedback-path:last-child,
.scope-related:last-child {
  margin-bottom: 0;
}

.tag-rules .field-table {
  margin-bottom: 20px;
}

.rule-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.rule-note {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-note .rule-note-title {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.rule-note p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.feedback-note {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-note .feedback-note-title {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.feedback-note p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.feedback-note a {
  margin-right: 16px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.related-item {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-item a {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.related-item .related-desc {
  display: block;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--wrap-narrow);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.error-block {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
}

.error-block h1 {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 38px;
}

.error-lead {
  margin: 0 0 24px;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 28px;
}

.error-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.error-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.error-btn:hover,
.error-btn:focus {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

.error-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

.error-btn-primary:hover,
.error-btn-primary:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #FFFFFF;
}

.error-block h2 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 30px;
}

.error-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding-left: 20px;
  list-style: decimal;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 26px;
}

.error-note {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 24px;
}

/* --------------------------------------------------------------------------
   responsive：960px 与 640px 断点
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .header-inner {
    padding: 12px 20px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
  }

  .hero {
    padding: 32px 0 32px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 38px;
  }

  .page-layout,
  .page-layout.sidebar-left,
  .sidebar-left .page-layout,
  .layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  /* 移动端：正文在前，辅助侧栏在后 */
  .page-layout.sidebar-left > .category-nav,
  .sidebar-left .page-layout > .category-nav,
  .layout-shell > .step-nav {
    order: 2;
  }

  .page-layout.sidebar-left > .category-groups,
  .page-layout.sidebar-left > .genre-advice,
  .page-layout.sidebar-left > .field-reference,
  .sidebar-left .page-layout > .category-groups,
  .sidebar-left .page-layout > .genre-advice,
  .sidebar-left .page-layout > .field-reference,
  .layout-shell > .layout-content {
    order: 1;
  }

  .category-nav,
  .step-nav {
    position: static;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 32px 20px 24px;
  }

  .footer-scope {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  h1,
  .page-title {
    font-size: 24px;
    line-height: 34px;
  }

  h2 {
    font-size: 20px;
    line-height: 30px;
  }

  .header-inner,
  .section-inner,
  .inner-main,
  .hero-inner,
  .footer-inner,
  .error-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-title {
    font-size: 24px;
    line-height: 34px;
  }

  .hero-paths {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media img {
    aspect-ratio: 16 / 10;
  }

  .category-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .category-row .category-samples {
    align-self: start;
  }

  .category-groups .genre-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .category-groups .genre-media img {
    aspect-ratio: 16 / 9;
  }

  .topic-overview .topic-list {
    gap: 16px;
  }

  .topic-list .topic-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .topic-list .topic-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px 0;
  }

  .topic-list .topic-meta dt {
    margin-top: 8px;
  }

  .field-table,
  .spec-table,
  .compare-table {
    font-size: 14px;
  }

  .field-table th,
  .field-table td,
  .spec-table th,
  .spec-table td,
  .compare-table th,
  .compare-table td {
    padding: 10px 12px;
  }

  .field-table tbody th,
  .spec-table tbody th,
  .compare-table tbody th {
    width: 120px;
  }

  .path-step,
  .step-item,
  .feedback-step {
    padding: 16px;
    gap: 12px;
  }

  .scope-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .error-block {
    padding: 24px 18px;
  }

  .error-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
