/* ==========================================================================
   今日吃瓜 · 小说题材索引站 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base · 变量与基础重置
   -------------------------------------------------------------------------- */
:root {
  --ink: #0f1519;
  --ink-soft: #2c363c;
  --paper: #f5f7f8;
  --panel: #ffffff;
  --line: #dde3e6;
  --line-strong: #c6d0d5;
  --steel: #2f5d70;
  --steel-dark: #234a5a;
  --amber: #b9762a;
  --muted: #5a6a72;
  --row: #eef2f4;
  --radius: 3px;
  --radius-lg: 5px;
  --shell: 1180px;
  --inner: 1120px;
  --narrow: 1000px;
  --gap: 24px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "tnum" 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--steel);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--steel-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  font-style: normal;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt {
  margin: 0;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架：页头 / 主容器 / 面包屑 / 页脚
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--shell);
  min-height: 62px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--steel);
  text-decoration: none;
}

.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: block;
  padding: 8px 11px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--row);
  color: var(--steel);
  text-decoration: none;
}

.site-nav a.is-current {
  color: var(--steel);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--amber);
}

.header-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.btn-quick-index,
.btn-copy-link,
.btn-menu {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  padding: 7px 12px;
  min-height: 36px;
}

.btn-quick-index:hover,
.btn-copy-link:hover,
.btn-menu:hover,
.btn-quick-index:focus-visible,
.btn-copy-link:focus-visible,
.btn-menu:focus-visible {
  border-color: var(--steel);
  color: var(--steel);
}

.btn-quick-index[aria-expanded="true"] {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-copy-link.is-copied {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
}

.menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink-soft);
}

.btn-menu[aria-expanded="true"] .menu-bar {
  background: var(--steel);
}

.site-main {
  display: block;
  width: 100%;
}

.inner-main {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 18px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--steel);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-soft);
}

.page-header {
  padding: 6px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.page-title {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

/* 内页页标题区（H1 下方摘要 + 复制按钮 + 配图） */
.inner-main > .page-title,
section.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 32px;
  align-items: start;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.page-title-text,
.page-title-main {
  min-width: 0;
}

.page-summary {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
  max-width: 38em;
}

.page-kicker,
.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.page-title-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.page-title-text .btn-copy-link,
.page-title-main .btn-copy-link {
  margin-top: 14px;
}

.page-title-figure,
.page-figure {
  min-width: 0;
}

.page-title-figure img,
.page-figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--row);
}

/* 页脚 */
.site-footer {
  margin-top: 56px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-block {
  min-width: 0;
}

.footer-brand .brand {
  font-size: 17px;
}

.footer-scope {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 30em;
}

.footer-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-nav ul,
.footer-reading ul,
.footer-help ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a,
.footer-reading a,
.footer-help a {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-nav a:hover,
.footer-reading a:hover,
.footer-help a:hover,
.footer-nav a:focus-visible,
.footer-reading a:focus-visible,
.footer-help a:focus-visible {
  color: var(--steel);
}

.footer-nav a[aria-current="page"] {
  color: var(--amber);
  font-weight: 700;
  border-left: 2px solid var(--amber);
  padding-left: 8px;
  margin-left: -10px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-copy {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* 快捷索引覆盖面板 */
.quick-index-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 21, 25, 0.42);
  padding: 82px 24px 24px;
  overflow-y: auto;
}

.quick-index-panel[hidden] {
  display: none;
}

.quick-index-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 28px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}

.quick-index-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.quick-index-group ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-index-group a {
  display: block;
  padding: 9px 8px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 14px;
}

.quick-index-group a:hover,
.quick-index-group a:focus-visible {
  background: var(--row);
  color: var(--steel);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   components · 通用按钮、标签、模块头、表格、折叠问答、相关入口
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.btn-primary {
  background: var(--steel);
  border: 1px solid var(--steel);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--steel-dark);
  border-color: var(--steel-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--steel);
  color: var(--steel);
  text-decoration: none;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 40em;
}

.section-lead,
.section-intro,
.group-intro,
.aside-lead {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 42em;
}

.num-tag,
.entry-code,
.path-code,
.role-code,
.note-code,
.rule-code,
.panel-code,
.district-code,
.route-code,
.region-code,
.stage-num,
.cell-code,
.code,
.field-label,
.step-no {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.num-tag,
.entry-code,
.path-code,
.role-code,
.note-code,
.rule-code,
.panel-code,
.district-code,
.route-code,
.region-code,
.cell-code,
.code {
  color: var(--steel);
  font-weight: 700;
}

.link-more,
.link-inline,
.entry-link,
.path-link,
.panel-link,
.note-more a,
.faq-more a,
.role-more a,
.atlas-more a,
.correction-tail a,
.aside-note a {
  display: inline-block;
  color: var(--steel);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.link-more::after,
.entry-link::after,
.path-link::after,
.panel-link::after {
  content: " →";
  font-family: var(--font-mono);
  font-weight: 400;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.data-table,
.district-table,
.param-table {
  width: 100%;
  min-width: 520px;
  font-size: 14px;
  line-height: 1.7;
}

.data-table caption,
.district-table caption,
.param-table caption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th,
.district-table thead th,
.param-table thead th {
  padding: 11px 14px;
  background: var(--row);
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td,
.district-table tbody th,
.district-table tbody td,
.param-table tbody th,
.param-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: left;
  vertical-align: top;
}

.data-table tbody tr:nth-child(even),
.district-table tbody tr:nth-child(even),
.param-table tbody tr:nth-child(even) {
  background: var(--row);
}

.data-table tbody th,
.district-table tbody th,
.param-table tbody th {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.district-table tbody tr:last-child th,
.district-table tbody tr:last-child td,
.param-table tbody tr:last-child th,
.param-table tbody tr:last-child td {
  border-bottom: 0;
}

/* 折叠问答（首页与常见疑问共用） */
.faq-list,
.faq-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.faq-item[open] {
  border-color: var(--steel);
}

.faq-question,
.faq-item > summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 13px 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-question::before,
.faq-item > summary::before {
  content: "+";
  flex: 0 0 auto;
  color: var(--steel);
  font-family: var(--font-mono);
  font-weight: 700;
}

.faq-item[open] .faq-question::before,
.faq-item[open] > summary::before {
  content: "−";
  color: var(--amber);
}

.faq-answer {
  padding: 0 16px 15px 42px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.faq-more,
.role-more,
.note-more,
.atlas-more {
  margin-top: 18px;
}

/* 相关入口卡组 */
.related-entry {
  margin-top: 44px;
}

.related-entry h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.related-grid,
.related-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.related-card h3 {
  font-size: 15px;
}

.related-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.related-card a {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.home-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px 24px 0;
}

.home-main > section {
  margin-bottom: 44px;
}

/* 首屏信息总览 */
.hero-summary {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 34px;
  align-items: start;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.hero-text {
  min-width: 0;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.hero-text h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.28;
}

.hero-lead {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-params {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.param-item {
  min-width: 0;
  padding: 12px 14px;
  background: var(--panel);
}

.param-item dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.param-item dd {
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-figure {
  min-width: 0;
}

.hero-figure img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--row);
}

.content-media {
  grid-column: 1 / -1;
  min-width: 0;
}

.content-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--row);
}

/* 阅读版图分区索引 */
.atlas-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px;
  align-items: stretch;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.atlas-row:last-of-type {
  border-bottom: 1px solid var(--line);
}

.atlas-region {
  min-width: 0;
}

.region-name {
  font-size: 1rem;
}

.region-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.atlas-districts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.district-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "code name"
    "code dir";
  gap: 2px 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  min-height: 44px;
}

.district-btn:hover,
.district-btn:focus-visible {
  border-color: var(--steel);
  border-left-color: var(--steel);
}

.district-btn.is-active {
  border-color: var(--amber);
  border-left-color: var(--amber);
  background: #fdf8f2;
}

.district-btn .district-code {
  grid-area: code;
  color: var(--steel);
}

.district-btn.is-active .district-code {
  color: var(--amber);
}

.district-name {
  grid-area: name;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.district-dir {
  grid-area: dir;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* 分区内容面板 */
.atlas-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-side {
  min-width: 0;
  padding: 20px 22px;
  background: var(--panel);
}

.panel-side h2 {
  margin-top: 6px;
  font-size: 1.05rem;
}

.panel-desc {
  margin: 10px 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.panel-params {
  min-width: 0;
  background: var(--panel);
}

.param-row {
  display: grid;
  grid-template-columns: minmax(88px, 120px) minmax(0, 1fr);
  gap: 14px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}

.param-row:last-child {
  border-bottom: 0;
}

.param-row dt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.param-row dd {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* 阅读路径预览 */
.path-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.path-preview .path-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--steel);
  border-radius: var(--radius-lg);
}

.path-preview .path-name {
  font-size: 15px;
}

.path-meta {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.path-first {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.path-preview .path-link {
  margin-top: auto;
  padding-top: 8px;
}

/* 题材条目速览 */
.entry-preview .entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.entry-preview .entry-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px 18px;
  background: var(--panel);
  border-left: 2px solid transparent;
}

.entry-preview .entry-item:hover {
  border-left-color: var(--steel);
}

.entry-preview .entry-code {
  padding-top: 2px;
}

.entry-body {
  min-width: 0;
}

.entry-name {
  font-size: 15px;
}

.entry-meta {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.entry-conflict {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 8px;
}

/* 角色类型档案摘要 */
.role-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.role-preview .role-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.role-preview .role-code {
  display: block;
  margin-bottom: 4px;
}

.role-preview .role-name {
  font-size: 15px;
  margin-bottom: 8px;
}

.role-duty {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 6px;
}

.role-motive,
.role-position {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 4px;
}

/* 编辑原则 */
.note-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.note-item {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.note-item .note-code {
  display: block;
  margin-bottom: 6px;
}

.note-title {
  font-size: 14px;
  margin-bottom: 6px;
}

.note-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   pages · 内页通用容器与双栏布局
   -------------------------------------------------------------------------- */
.container {
  min-width: 0;
}

.container > section {
  margin-bottom: 40px;
}

.container > section:last-child {
  margin-bottom: 0;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(0, 300px);
  gap: 60px;
  align-items: start;
  justify-content: space-between;
}

.layout-main,
.main-column {
  min-width: 0;
}

.layout-aside,
.side-column {
  min-width: 0;
}

/* .sidebar-left 位于 main 上，aside 在前、main 在后 */
.sidebar-left {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 760px);
  gap: 60px;
  align-items: start;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   pages · 阅读版图（atlas）
   -------------------------------------------------------------------------- */
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.region-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.region-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.region-card .region-code {
  margin-bottom: 8px;
  color: var(--steel);
}

.region-card p:last-child {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.district-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--steel);
  border-radius: var(--radius-lg);
}

.district-card .district-code {
  margin-bottom: 6px;
}

.district-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.district-meta {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 13px;
  line-height: 1.7;
}

.district-meta dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.district-meta dd {
  color: var(--ink-soft);
  min-width: 0;
}

.cross-route {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.cross-route-intro {
  min-width: 0;
}

.cross-route-intro h2 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.cross-route-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.cross-route-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.route-item {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.route-item .route-code {
  margin-bottom: 6px;
}

.route-item h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.route-meta {
  display: grid;
  grid-template-columns: minmax(56px, auto) minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
  line-height: 1.7;
}

.route-meta dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.route-meta dd {
  color: var(--ink-soft);
  min-width: 0;
}

/* --------------------------------------------------------------------------
   pages · 题材目录（catalog）
   -------------------------------------------------------------------------- */
.catalog-guide {
  margin-bottom: 36px;
}

.catalog-guide h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.catalog-guide > p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.guide-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.guide-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-rule .rule-code {
  padding-top: 1px;
}

.guide-rule p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.entry-list > h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.entry-list .entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
}

.entry-card-head {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
}

.entry-card-head .entry-code {
  display: inline-block;
  margin-bottom: 6px;
}

.entry-card-head .entry-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.entry-card-head .entry-district {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.entry-card-head .entry-conflict {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.entry-card-body {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-card-body p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.entry-card-body p strong,
.entry-card-body .field-label {
  color: var(--steel);
  font-weight: 700;
}

.catalog-aside .aside-block {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}

.catalog-aside .aside-block:last-child {
  margin-bottom: 0;
}

.catalog-aside .aside-block h2 {
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.catalog-aside .param-table {
  min-width: 0;
  font-size: 13px;
}

.catalog-aside .param-table thead th,
.catalog-aside .param-table tbody th,
.catalog-aside .param-table tbody td {
  padding: 8px 8px;
}

.catalog-aside .param-table caption {
  padding: 0 0 8px;
  border-bottom: 0;
  font-size: 12px;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: aside-step;
}

.aside-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
  counter-increment: aside-step;
}

.aside-list li::before {
  content: counter(aside-step);
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.aside-list li strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 2px;
}

.aside-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-links a {
  display: block;
  padding: 8px 10px;
  background: var(--row);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 13px;
}

.aside-links a:hover,
.aside-links a:focus-visible {
  color: var(--steel);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages · 阅读路径（reading-path）
   -------------------------------------------------------------------------- */
.path-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.path-overview .path-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--steel);
  border-radius: var(--radius-lg);
}

.path-overview .path-card h3 {
  font-size: 15px;
}

.path-card-for {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.param-list {
  display: grid;
  grid-template-columns: minmax(56px, auto) minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
  line-height: 1.7;
}

.param-list dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.param-list dd {
  color: var(--ink-soft);
  min-width: 0;
}

.path-overview .link-more {
  margin-top: auto;
  padding-top: 6px;
}

.path-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.path-block:last-of-type {
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.path-block-intro {
  min-width: 0;
}

.path-block-intro h3 {
  font-size: 1.05rem;
  margin: 6px 0 10px;
}

.path-block-intro p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 10px;
}

.path-block-for {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.path-block-intro .link-more {
  margin-top: 6px;
}

.stage-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stage-item {
  min-width: 0;
  padding: 14px 16px;
  background: var(--panel);
}

.stage-item .stage-num {
  color: var(--steel);
  margin-bottom: 4px;
}

.stage-item h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.stage-item p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.stage-item .stage-criteria {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.stop-loss-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.stop-loss-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  border-radius: var(--radius-lg);
}

.stop-loss-card h3 {
  font-size: 14px;
  margin: 6px 0 8px;
}

.stop-loss-signal {
  color: var(--amber);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.stop-loss-card p:last-child {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   pages · 角色档案（roles）
   -------------------------------------------------------------------------- */
.side-column .side-block {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}

.side-column .side-title {
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.side-column .side-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.role-class-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-class-list li {
  min-width: 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.role-class-name {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.role-class-desc {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 2px;
}

.role-class-freq {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.relation-reading-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.relation-reading-list li {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.side-links {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.side-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-links a {
  display: block;
  font-size: 13px;
  line-height: 1.6;
}

.side-links a:hover,
.side-links a:focus-visible {
  color: var(--steel-dark);
}

.role-archive {
  margin-bottom: 36px;
}

.role-archive .section-title,
.anti-stereotype .section-title,
.main-column .related-entry h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.role-grid .role-card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.role-card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--row);
}

.role-card-head .role-code {
  display: block;
  margin-bottom: 4px;
}

.role-card-head .role-name {
  font-size: 15px;
}

.role-fields {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.75;
}

.role-fields dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.role-fields dd {
  color: var(--ink-soft);
  min-width: 0;
}

.anti-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.anti-list li {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.anti-list h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.anti-list p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   pages · 常见疑问（faq）
   -------------------------------------------------------------------------- */
.layout-shell {
  display: block;
  max-width: 100%;
}

.faq-group {
  margin-bottom: 36px;
}

.faq-group h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.faq-group .group-intro {
  margin-bottom: 16px;
}

.faq-group .faq-item > summary {
  padding: 14px 18px;
}

.faq-group .faq-answer {
  padding: 0 18px 16px 44px;
}

/* --------------------------------------------------------------------------
   pages · 站点说明（about）
   -------------------------------------------------------------------------- */
.position-statement {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.position-text {
  min-width: 0;
}

.position-text h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.position-text p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
  max-width: 38em;
}

.sub-heading {
  margin: 20px 0 10px;
  font-size: 14px;
  color: var(--ink);
}

.plain-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plain-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--steel);
  border-radius: 1px;
}

.position-figure {
  min-width: 0;
}

.position-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--row);
}

.not-doing {
  margin-bottom: 40px;
}

.not-doing h2,
.field-table-section h2,
.review-flow h2,
.correction-note h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.not-doing-grid,
.correction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.boundary-card,
.correction-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  border-radius: var(--radius-lg);
}

.boundary-card h3,
.correction-card h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.boundary-card p,
.correction-card p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.field-table-section {
  margin-bottom: 40px;
}

.review-flow {
  margin-bottom: 40px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.flow-step {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
}

.flow-step .step-no {
  display: block;
  color: var(--steel);
  margin-bottom: 6px;
}

.flow-step h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.flow-step p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.correction-tail {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: var(--narrow);
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.error-panel {
  padding: 32px 0 36px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  margin: 0 0 10px;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.error-panel h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.3;
}

.error-lead {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
  max-width: 36em;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.error-guide {
  padding-top: 30px;
}

.error-guide h2 {
  font-size: 1.15rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.error-guide-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error-guide-list li {
  min-width: 0;
}

.error-guide-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 14px;
}

.error-guide-list a:hover,
.error-guide-list a:focus-visible {
  border-color: var(--steel);
  color: var(--steel);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive · 960px 断点
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .header-inner {
    gap: 12px;
    padding: 0 16px;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 16px 16px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(15, 21, 25, 0.08);
  }

  .site-nav.is-open ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav.is-open a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 15px;
  }

  .btn-quick-index {
    display: none;
  }

  .btn-menu {
    display: inline-flex;
  }

  .header-tools {
    margin-left: auto;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    padding: 32px 16px 22px;
  }

  .footer-copy {
    padding: 12px 16px;
  }

  .home-main {
    padding: 20px 16px 0;
  }

  .hero-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-figure img {
    height: 240px;
  }

  .content-media img {
    height: 170px;
  }

  .hero-params {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlas-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .atlas-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .path-cards,
  .role-cards,
  .note-list,
  .region-grid,
  .district-grid,
  .path-overview-grid,
  .stop-loss-grid,
  .not-doing-grid,
  .correction-grid,
  .related-grid,
  .related-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-preview .entry-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cross-route {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .path-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inner-main {
    padding: 0 16px 48px;
  }

  .inner-main > .page-title,
  section.page-title {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .page-title-figure img,
  .page-figure img {
    height: 180px;
  }

  .page-layout,
  .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .layout-aside,
  .side-column {
    order: 2;
  }

  .layout-main,
  .main-column {
    order: 1;
  }

  .entry-list .entry-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .position-statement {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .position-figure img {
    height: 220px;
  }

  .quick-index-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
  }

  .quick-index-panel {
    padding: 74px 16px 16px;
  }
}

/* --------------------------------------------------------------------------
   responsive · 640px 断点（手机）
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-sub {
    font-size: 10px;
  }

  .header-inner {
    min-height: 56px;
  }

  .btn-copy-link {
    padding: 7px 10px;
    font-size: 12px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
  }

  .hero-params {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-figure img {
    height: 200px;
  }

  .content-media img {
    height: 150px;
  }

  .atlas-districts {
    grid-template-columns: minmax(0, 1fr);
  }

  .param-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 12px 16px;
  }

  .panel-side {
    padding: 16px;
  }

  .path-cards,
  .role-cards,
  .note-list,
  .region-grid,
  .district-grid,
  .path-overview-grid,
  .stop-loss-grid,
  .not-doing-grid,
  .correction-grid,
  .related-grid,
  .related-entry-grid,
  .role-grid,
  .error-guide-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .cross-route-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .footer-nav ul,
  .footer-reading ul,
  .footer-help ul {
    gap: 6px;
  }

  .footer-nav a,
  .footer-reading a,
  .footer-help a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  .entry-preview .entry-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .entry-preview .entry-code {
    padding-top: 0;
  }

  .guide-rule {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .district-meta,
  .route-meta,
  .role-fields,
  .param-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px 0;
  }

  .district-meta dt,
  .route-meta dt,
  .role-fields dt,
  .param-list dt {
    margin-top: 6px;
  }

  .faq-answer {
    padding: 0 14px 14px 40px;
  }

  .faq-group .faq-answer {
    padding: 0 14px 14px 40px;
  }

  .error-main {
    padding: 36px 16px 32px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn-primary,
  .error-actions .btn-secondary {
    width: 100%;
  }

  .data-table,
  .district-table {
    min-width: 480px;
  }
}

/* --------------------------------------------------------------------------
   motion · 尊重减少动效偏好
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .district-btn,
  .entry-preview .entry-item,
  .related-card,
  .path-card,
  .role-card {
    transition: border-color 0.18s ease, background-color 0.18s ease;
  }
}
