/* ==========================================================================
   麻花传剧 · 全站样式
   分组：基础 / 骨架布局 / 通用组件 / 页面模块 / 响应式
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 基础
   -------------------------------------------------------------------------- */

:root {
  --paper: #F4F1EA;
  --paper-raised: #FFFDF8;
  --ink: #1F2421;
  --ink-soft: #5C6660;
  --brick: #B4552D;
  --pine: #2F5D50;
  --line: #DDD6C8;
  --dark: #17201D;
  --dark-ink: #EDE9E0;
  --dark-soft: #A9B3AC;
  --sidebar-w: 236px;
  --content-max: 1120px;
  --gutter: 28px;
  --radius: 6px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", "Roboto Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--pine);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--brick);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. 骨架布局：页头 / 侧栏 / 主内容 / 页脚
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background-color: var(--paper-raised);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  max-width: calc(var(--content-max) + var(--sidebar-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand-mark {
  flex-shrink: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  padding: 6px 0;
}

.brand-mark:hover,
.brand-mark:focus-visible {
  color: var(--brick);
}

.header-quick {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.header-quick a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: var(--radius);
}

.header-quick a:hover,
.header-quick a:focus-visible {
  color: var(--ink);
  background-color: rgba(47, 93, 80, 0.08);
}

.header-quick a.is-current {
  color: var(--brick);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background-color: var(--ink);
}

/* 布局外壳：sidebar-left 出现在 body 或布局容器，均让侧栏位于主内容前 */
.page-layout,
.layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: calc(var(--content-max) + var(--sidebar-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

body.sidebar-left,
.sidebar-left {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
}

.sidebar-left .site-sidebar,
.sidebar-left .site-tree,
.sidebar-left .site-nav {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--sidebar-w);
  padding: 28px 20px 28px 0;
  border-right: 1px solid var(--line);
}

.sidebar-left .site-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding-left: var(--gutter);
}

.sidebar-left .page-aside,
.sidebar-left .related-panel,
.sidebar-left .related-aside,
.sidebar-left .content-aside {
  grid-column: 2;
  grid-row: 2;
  padding-left: var(--gutter);
}

/* 侧栏树状导航基础 */
.tree-nav-title,
.side-nav-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.nav-tree,
.tree-list,
.tree-root,
.tree-nav-list,
.nav-tree-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-tree > li,
.tree-list > li,
.tree-root > li,
.tree-nav-list > li,
.nav-tree-list > li {
  border-radius: var(--radius);
}

.nav-tree a,
.tree-list a,
.tree-root a,
.tree-nav-list a,
.nav-tree-list a,
.tree-parent-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: var(--radius);
  line-height: 1.4;
}

.nav-tree a:hover,
.tree-list a:hover,
.tree-root a:hover,
.tree-nav-list a:hover,
.nav-tree-list a:hover,
.tree-parent-link:hover {
  color: var(--ink);
  background-color: rgba(47, 93, 80, 0.09);
}

.nav-tree .is-current > a,
.tree-list .is-current > a,
.tree-root .is-current > a,
.nav-tree-list .is-current > a,
.nav-tree .is-active > a,
.nav-tree-list .is-active > a,
.nav-node.is-current > a,
.tree-nav-item.is-current > a {
  color: var(--brick);
  font-weight: 700;
  background-color: rgba(180, 85, 45, 0.08);
}

/* 展开按钮 */
.tree-toggle,
.nav-branch,
.nav-node-toggle,
.nav-tree-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: var(--radius);
  text-align: left;
  line-height: 1.4;
}

.tree-toggle:hover,
.nav-branch:hover,
.nav-node-toggle:hover,
.nav-tree-toggle:hover {
  color: var(--ink);
  background-color: rgba(47, 93, 80, 0.09);
}

.tree-toggle-icon,
.tree-icon,
.nav-node-icon,
.nav-tree-icon,
.tree-toggle-text,
.tree-toggle-label,
.tree-label,
.nav-node-label,
.nav-tree-label {
  display: inline-flex;
  align-items: center;
}

.tree-toggle-icon,
.tree-icon,
.nav-node-icon,
.nav-tree-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  position: relative;
  justify-content: center;
}

.tree-toggle-icon::before,
.tree-icon::before,
.nav-node-icon::before,
.nav-tree-icon::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.tree-has-children > .tree-toggle[aria-expanded="true"] .tree-toggle-icon::before,
.tree-has-child > .tree-toggle[aria-expanded="true"] .tree-icon::before,
.nav-node > .nav-node-toggle[aria-expanded="true"] .nav-node-icon::before,
.has-children > .nav-tree-toggle[aria-expanded="true"] .nav-tree-icon::before,
.has-children > .tree-toggle[aria-expanded="true"] .tree-toggle-icon::before,
.is-open > .tree-toggle .tree-toggle-icon::before {
  transform: rotate(45deg);
}

/* 子菜单默认收起，展开态由 aria-expanded 决定 */
.tree-sub,
.tree-sublist,
.tree-subnav,
.nav-sub,
.nav-tree-sub,
.tree-child {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.tree-has-children > .tree-toggle[aria-expanded="true"] + .tree-sublist,
.tree-has-child > .tree-toggle[aria-expanded="true"] + .tree-sub,
.nav-node > .nav-node-toggle[aria-expanded="true"] + .nav-sub,
.has-children > .nav-tree-toggle[aria-expanded="true"] + .nav-tree-sub,
.has-children > .tree-toggle[aria-expanded="true"] + .tree-subnav,
.tree-has-child > .tree-toggle[aria-expanded="true"] + .tree-child,
.is-open > .tree-subnav,
.is-open > .tree-sub {
  display: flex;
}

.tree-sub a,
.tree-sublist a,
.tree-subnav a,
.nav-sub a,
.nav-tree-sub a,
.tree-child a {
  font-size: 13px;
  min-height: 40px;
  padding: 4px 10px;
}

/* 主内容区 */
.site-main {
  min-width: 0;
  padding: 32px 0 56px;
}

.inner-main {
  max-width: var(--content-max);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--brick);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 页面标题区 */
.page-header {
  margin-bottom: 12px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.page-title-block,
.page-head,
.page-hero {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 34em;
}

/* 页脚 */
.site-footer {
  margin-top: 48px;
  background-color: var(--dark);
  color: var(--dark-ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: calc(var(--content-max) + var(--sidebar-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 48px var(--gutter) 32px;
}

.footer-brand .footer-mark {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--dark-ink);
  letter-spacing: 0.02em;
}

.footer-brand p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--dark-soft);
  max-width: 26em;
}

.footer-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--dark-ink);
  text-transform: uppercase;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  color: var(--dark-soft);
}

.footer-col li a:hover,
.footer-col li a:focus-visible {
  color: var(--dark-ink);
}

.footer-bottom {
  border-top: 1px solid rgba(237, 233, 224, 0.14);
}

.footer-bottom p {
  max-width: calc(var(--content-max) + var(--sidebar-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 16px var(--gutter);
  font-size: 13px;
  color: var(--dark-soft);
  letter-spacing: 0.02em;
}

.footer-bottom p + p {
  padding-top: 0;
  margin-top: -8px;
}

/* --------------------------------------------------------------------------
   3. 通用组件
   -------------------------------------------------------------------------- */

.section-head {
  margin-bottom: 24px;
}

.section-head h2,
.section-title,
.section .section-title,
.section-block .section-title,
.guide-article h2,
.notes-standard h2,
.notes-archive h2,
.notes-crossref h2,
.faq-group h2,
.content-section h2,
.term-note h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 10px;
}

.section-head p,
.section-desc,
.section .section-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 34em;
}

.section,
.section-block,
.notes-standard,
.notes-archive,
.notes-crossref,
.faq-group,
.content-section,
.guide-article section {
  margin-bottom: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.section:last-child,
.section-block:last-child,
.guide-article section:last-child,
.content-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.section .section-title + p,
.section-block .section-title + p,
.section .section-title + .section-desc {
  margin-bottom: 20px;
}

/* 元数据行 */
.meta-line,
.meta-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  line-height: 1.6;
}

.meta-tag {
  color: var(--brick);
  font-weight: 700;
  margin-right: 12px;
}

/* CTA 按钮 */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 18px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background-color: var(--brick);
  color: #FFFDF8;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #94441F;
  color: #FFFDF8;
}

.btn-ghost {
  background-color: transparent;
  color: var(--pine);
  border: 1px solid var(--pine);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: var(--pine);
  color: var(--paper-raised);
}

/* 相关链接条 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.related-links-label {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.related-links-item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--pine);
  background-color: rgba(47, 93, 80, 0.07);
  border-radius: var(--radius);
}

.related-links-item:hover,
.related-links-item:focus-visible {
  color: var(--brick);
  background-color: rgba(180, 85, 45, 0.08);
}

/* 右侧相关内容栏（aside） */
.page-aside,
.related-panel,
.related-aside,
.content-aside {
  padding-top: 32px;
  padding-bottom: 48px;
}

.aside-title,
.related-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.aside-list,
.related-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-list li,
.related-list li,
.aside-item {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.aside-list li:last-child,
.related-list li:last-child,
.aside-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.aside-list a,
.related-list a,
.aside-item a {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--pine);
  line-height: 1.5;
  margin-bottom: 4px;
}

.aside-list a:hover,
.related-list a:hover,
.aside-item a:hover {
  color: var(--brick);
}

.aside-list p,
.related-list p,
.aside-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.aside-block + .aside-block {
  margin-top: 28px;
}

/* 图片容器通用约束 */
.hero-figure img,
.special-media img,
.special-figure img,
.channel-media img,
.note-media img,
.guide-figure img,
.verify-figure img,
.faq-figure img,
.section-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: var(--line);
  transition: transform 0.3s ease;
}

/* 折叠问答 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  line-height: 1.5;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--brick);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--brick);
}

.faq-item > p,
.faq-body {
  padding: 0 4px 18px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 40em;
}

.faq-item > p {
  margin: 0;
}

.faq-body p {
  margin: 0 0 0.9em;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

.faq-body a {
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-body a:hover {
  color: var(--brick);
}

/* 编号步骤通用 */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--brick);
  background-color: rgba(180, 85, 45, 0.1);
  border-radius: 50%;
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   4. 页面模块
   -------------------------------------------------------------------------- */

/* ---------- 首页 ---------- */

.home-main {
  padding-top: 36px;
}

.hero {
  display: grid;
  grid-template-columns: 62fr 38fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  min-width: 0;
}

.hero-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-figure:hover img {
  transform: scale(1.02);
}

.hero-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background-color: rgba(23, 32, 29, 0.72);
}

.hero-side {
  min-width: 0;
  padding-top: 8px;
}

.hero-kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--brick);
  text-transform: uppercase;
}

.hero-side h1 {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 34em;
}

.duty-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 4px;
  padding: 0;
}

.duty-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}

.duty-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 2px;
  background-color: var(--brick);
}

.hero-progress {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

/* 首页：频道分类直达 */
.home-channels {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.channel-direct {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.channel-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 2px solid var(--brick);
  padding-left: 16px;
}

.channel-tag a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.channel-tag a:hover,
.channel-tag a:focus-visible {
  color: var(--brick);
}

.channel-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-notes li {
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 首页：专题片单 */
.home-specials {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.special-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.special-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.special-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
}

.special-row:hover .special-media img {
  transform: scale(1.03);
}

.special-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0;
}

.special-body .meta-line {
  margin: 0 0 8px;
}

.special-body h3 {
  font-size: 19px;
  line-height: 1.4;
  margin: 0 0 8px;
  color: var(--ink);
}

.special-body h3 a {
  color: inherit;
}

.special-row:hover .special-body h3 a {
  color: var(--brick);
}

.special-body > p:not(.meta-line) {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 34em;
}

/* 首页：四步 */
.home-steps {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: home-step;
}

.home-steps .step-item {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-steps .step-item .step-num {
  display: inline-flex;
}

.home-steps .step-item h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.home-steps .step-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* 首页：观剧笔记摘录 */
.home-notes {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.note-block {
  padding: 22px 20px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pine);
  border-radius: var(--radius);
}

.note-tag {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--pine);
  text-transform: uppercase;
}

.note-block h3 {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.note-block h3 a {
  color: var(--ink);
}

.note-block h3 a:hover {
  color: var(--brick);
}

.note-block > p:not(.note-tag) {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* 首页：来源核验提醒条 */
.verify-strip {
  margin-bottom: 48px;
  padding: 32px 32px;
  background-color: var(--dark);
  color: var(--dark-ink);
  border-radius: var(--radius);
}

.verify-strip h2 {
  font-size: 20px;
  line-height: 1.4;
  color: var(--dark-ink);
  margin: 0 0 18px;
}

.verify-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 22px;
  padding: 0;
}

.verify-points li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--dark-soft);
}

.verify-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 2px;
  background-color: var(--brick);
}

.verify-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark-ink);
  border: 1px solid rgba(237, 233, 224, 0.4);
  border-radius: var(--radius);
}

.verify-link:hover,
.verify-link:focus-visible {
  background-color: var(--brick);
  border-color: var(--brick);
  color: #FFFDF8;
}

/* 首页：常见问答 */
.home-faq {
  margin-bottom: 32px;
}

/* ---------- 频道分类 ---------- */

.section-basis .basis-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.basis-item {
  padding: 18px 16px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.basis-item h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.basis-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-channel-list {
  margin-top: 0;
}

.channel-entry {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.channel-entry:first-of-type {
  padding-top: 0;
}

.channel-entry:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.channel-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
}

.channel-meta {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background-color: rgba(23, 32, 29, 0.72);
}

.channel-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.channel-body h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
}

.channel-body p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 34em;
}

.channel-body p:last-child {
  margin-bottom: 0;
}

.channel-body .channel-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--pine);
  background-color: rgba(47, 93, 80, 0.08);
  border-radius: var(--radius);
}

/* 映射表 */
.mapping-table {
  margin-top: 18px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.mapping-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.mapping-table th,
.mapping-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.mapping-table thead th {
  background-color: var(--paper-raised);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 700;
}

.mapping-table tbody th {
  font-weight: 700;
  color: var(--ink);
  background-color: rgba(47, 93, 80, 0.05);
  white-space: nowrap;
}

.mapping-table tbody td {
  color: var(--ink-soft);
}

.mapping-table tbody tr:last-child th,
.mapping-table tbody tr:last-child td {
  border-bottom: 0;
}

.mapping-table a {
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mapping-table a:hover {
  color: var(--brick);
}

.mapping-note {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.mapping-note a {
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 专题片单 ---------- */

.section-organize .principle-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.principle-item {
  padding: 18px 16px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brick);
  border-radius: var(--radius);
}

.principle-item h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.principle-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.special-entry {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.special-entry:first-of-type {
  padding-top: 0;
}

.special-entry:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.special-figure {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}

.special-figure img {
  aspect-ratio: 3 / 2;
}

.special-entry:hover .special-figure img {
  transform: scale(1.03);
}

.special-meta {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background-color: rgba(23, 32, 29, 0.74);
}

.special-meta .meta-tag {
  color: #F0B79A;
  margin: 0;
}

.special-meta .meta-line {
  color: #E2DDD2;
  margin: 0;
}

.special-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.special-body h3 {
  font-size: 19px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.special-body h3 a {
  color: var(--ink);
}

.special-entry:hover .special-body h3 a {
  color: var(--brick);
}

.special-body > p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 34em;
}

.special-body .special-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--brick);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.section-relate .relate-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 16px;
}

.relate-col {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.relate-col h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--ink);
}

.relate-col p {
  margin: 0 0 0.8em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.relate-col p:last-child {
  margin-bottom: 0;
}

/* ---------- 观剧笔记 ---------- */

.notes-standard .standard-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.standard-list li {
  padding: 18px 16px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.standard-list h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.standard-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.note-entry {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.note-entry:first-of-type {
  padding-top: 0;
}

.note-entry:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.note-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
}

.note-meta {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background-color: rgba(23, 32, 29, 0.72);
}

.note-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.note-body h3 {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--ink);
}

.note-body p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 36em;
}

.note-body p:last-of-type {
  margin-bottom: 10px;
}

.note-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pine);
  background-color: rgba(47, 93, 80, 0.08);
  border-radius: var(--radius);
}

.note-link:hover,
.note-link:focus-visible {
  color: var(--brick);
  background-color: rgba(180, 85, 45, 0.08);
}

.notes-crossref .crossref-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 16px;
}

.crossref-col {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.crossref-col h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--ink);
}

.crossref-col p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.crossref-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
}

.crossref-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.crossref-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 2px;
  background-color: var(--pine);
}

/* ---------- 观看指南 ---------- */

.guide-article {
  max-width: 100%;
}

.guide-figure {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.guide-figure figcaption {
  display: none;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  counter-reset: guide-step;
}

.guide-steps .step-item {
  position: relative;
  padding: 20px 20px 20px 24px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
}

.guide-steps .step-item .step-num {
  margin-bottom: 10px;
}

.guide-steps .step-item h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--ink);
}

.guide-steps .step-item p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 40em;
}

.guide-steps .step-item .step-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--brick);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.guide-length .two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 16px;
}

.guide-length .col {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-length .col h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--ink);
}

.guide-length .col p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.plain-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plain-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 2px;
  background-color: var(--pine);
}

.guide-adjust .judge-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 20px;
}

.judge-list li {
  padding: 16px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.judge-list h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.judge-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 40em;
}

.guide-adjust .section-conclusion {
  margin: 0;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  background-color: rgba(180, 85, 45, 0.07);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
}

.guide-scope p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 40em;
}

/* ---------- 来源核验 ---------- */

.verify-intro p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 40em;
}

.verify-figure {
  margin: 20px 0 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
}

.figure-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background-color: rgba(23, 32, 29, 0.72);
}

.verify-figure {
  position: relative;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.check-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.check-index {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--brick);
  background-color: rgba(180, 85, 45, 0.1);
  border-radius: 50%;
}

.check-title {
  font-size: 16px;
  margin: 0;
  color: var(--ink);
  align-self: center;
}

.check-item p {
  grid-column: 2;
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 40em;
}

.signal-table {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal-row + .signal-row {
  border-top: 1px solid var(--line);
}

.signal-cell {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.signal-cell + .signal-cell {
  border-left: 1px solid var(--line);
}

.signal-head .signal-cell {
  background-color: var(--paper-raised);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.record-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 16px 0 20px;
  padding: 0;
}

.record-fields li {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-fields strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.verify-record > p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.verify-record > p:last-child a {
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.verify-record > p:last-child a:hover {
  color: var(--brick);
}

/* ---------- 常见问答 ---------- */

.faq-group .faq-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 0 0 18px;
}

.faq-group .faq-figure figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background-color: rgba(23, 32, 29, 0.72);
}

.term-note {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pine);
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  padding-bottom: 20px;
}

.term-note h2 {
  font-size: 18px;
}

.term-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 纠错与反馈 ---------- */

.feedback-type-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.feedback-type-list li {
  padding: 18px 16px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-type-list h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.feedback-type-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-figure {
  margin: 20px 0 24px;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
}

.section-figure figcaption {
  display: none;
}

.step-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step-block {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-block .step-num {
  margin-bottom: 10px;
}

.step-block h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink);
}

.step-block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 16px 0 24px;
  border-top: 1px solid var(--line);
  counter-reset: process-step;
}

.process-list li {
  position: relative;
  padding: 16px 0 16px 44px;
  border-bottom: 1px solid var(--line);
  counter-increment: process-step;
}

.process-list li::before {
  content: counter(process-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--brick);
}

.process-list h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--ink);
}

.process-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 40em;
}

.scope-note {
  padding: 20px 18px;
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
}

.scope-note h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--ink);
}

.scope-note ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scope-note li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.scope-note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 2px;
  background-color: var(--brick);
}

/* ---------- 404 ---------- */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 60px var(--gutter);
}

.error-panel {
  width: 100%;
  max-width: 600px;
  text-align: left;
}

.error-code {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--brick);
}

.error-panel h1 {
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 16px;
  color: var(--ink);
}

.error-panel > p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 34em;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 20px;
}

.error-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pine);
  background-color: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-links a:hover,
.error-links a:focus-visible {
  color: var(--brick);
  border-color: var(--brick);
}

.error-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   5. 响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root {
    --gutter: 20px;
  }

  .header-inner,
  .footer-inner,
  .footer-bottom p {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-side h1 {
    font-size: 32px;
  }

  .channel-direct {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
  }

  .special-row {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verify-points {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-basis .basis-list,
  .section-organize .principle-list,
  .notes-standard .standard-list,
  .step-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-entry {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .special-entry {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .note-entry {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .header-quick {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header {
    height: 60px;
  }

  /* 侧栏变为抽屉：默认收起，导航树在 body 内 */
  body.sidebar-left,
  .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-left .site-sidebar,
  .sidebar-left .site-tree,
  .sidebar-left .site-nav {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    padding: 0 var(--gutter) 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-left .site-main {
    grid-column: 1;
    grid-row: 1;
    padding-left: 0;
  }

  .sidebar-left .page-aside,
  .sidebar-left .related-panel,
  .sidebar-left .related-aside,
  .sidebar-left .content-aside {
    grid-column: 1;
    grid-row: 3;
    padding-left: 0;
  }

  .site-main {
    padding-top: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .page-title-block,
  .page-head,
  .page-hero {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .hero-side h1 {
    font-size: 28px;
  }

  .channel-direct {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .channel-tags {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    border-left: 0;
    border-top: 2px solid var(--brick);
    padding-left: 0;
    padding-top: 12px;
  }

  .channel-tag a {
    min-height: 40px;
    font-size: 15px;
    padding: 0 12px;
    background-color: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .special-row,
  .channel-entry,
  .special-entry,
  .note-entry {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .special-media,
  .channel-media,
  .special-figure,
  .note-media {
    aspect-ratio: 16 / 10;
  }

  .step-grid,
  .note-grid,
  .section-basis .basis-list,
  .section-organize .principle-list,
  .notes-standard .standard-list,
  .step-blocks,
  .feedback-type-list,
  .guide-length .two-col,
  .section-relate .relate-columns,
  .notes-crossref .crossref-cols,
  .record-fields {
    grid-template-columns: 1fr;
  }

  .signal-row {
    grid-template-columns: 1fr;
  }

  .signal-cell + .signal-cell {
    border-left: 0;
    border-top: 1px dashed var(--line);
    padding-top: 8px;
  }

  .signal-head .signal-cell + .signal-cell {
    border-top: 1px solid var(--line);
  }

  .verify-strip {
    padding: 24px 20px;
  }

  .mapping-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .mapping-table thead,
  .mapping-table tbody,
  .mapping-table tr,
  .mapping-table th,
  .mapping-table td {
    white-space: normal;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 36px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .brand-mark {
    font-size: 17px;
  }

  .hero-side h1 {
    font-size: 26px;
  }

  .page-title {
    font-size: 22px;
  }

  .section-head h2,
  .section-title,
  .guide-article h2,
  .notes-standard h2,
  .notes-archive h2,
  .notes-crossref h2,
  .faq-group h2,
  .content-section h2,
  .term-note h2 {
    font-size: 19px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .check-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 4px 12px;
  }

  .error-code {
    font-size: 52px;
  }

  .error-panel h1 {
    font-size: 22px;
  }

  .error-links {
    flex-direction: column;
    align-items: stretch;
  }

  .error-links a {
    justify-content: center;
  }
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
