:root {
  --bg: #10151c;
  --panel: #182029;
  --panel-soft: #1d2731;
  --text: #d7dee6;
  --text-dim: #8a97a5;
  --amber: #e0a03a;
  --alert: #d9603a;
  --line: #26313c;
  --line-soft: #1f2a34;
  --radius: 6px;
  --shell: 1120px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ============================================================
   base
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
  color: #eef3f8;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: var(--amber);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  padding: 10px 16px;
  background: var(--amber);
  color: #10151c;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ============================================================
   layout — 全站骨架
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #131a22;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 0;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--amber);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--amber);
  border-radius: 1px;
}

.brand-text {
  font-size: 16px;
  font-weight: 600;
  color: #eef3f8;
  white-space: nowrap;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-dim);
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: #eef3f8;
  background: var(--panel);
}

.nav-link.is-current {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.header-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-dim);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.site-main {
  display: block;
}

.layout-shell,
.page-layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 28px 24px 56px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.page-layout:not(.sidebar-left) {
  grid-template-columns: minmax(0, 1fr) 232px;
}

.page-layout:not(.sidebar-left) > .site-main,
.page-layout:not(.sidebar-left) > .content-column {
  grid-column: 1;
  grid-row: 1;
}

.page-layout:not(.sidebar-left) > .side-nav {
  grid-column: 2;
  grid-row: 1;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar-left .page-layout > .side-nav,
.page-layout.sidebar-left > .side-nav,
.sidebar-left .page-layout > aside,
.page-layout.sidebar-left > aside {
  grid-column: 1;
  grid-row: 1;
}

.sidebar-left .page-layout > .site-main,
.page-layout.sidebar-left > .site-main,
.sidebar-left .page-layout > .content-column,
.page-layout.sidebar-left > .content-column {
  grid-column: 2;
  grid-row: 1;
}

.inner-main {
  min-width: 0;
}

.content-column {
  min-width: 0;
}

/* ============================================================
   components — 侧栏导航
   ============================================================ */

.side-nav {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
}

.side-nav-title {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.side-nav-groups {
  display: block;
}

.side-group {
  border-top: 1px solid var(--line-soft);
  padding: 6px 0;
}

.side-group:first-child {
  border-top: 0;
}

.side-group-head,
.side-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 6px 4px;
  cursor: pointer;
  list-style: none;
}

.side-group-head::-webkit-details-marker {
  display: none;
}

.side-group-head::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.side-group[open] > .side-group-head::before {
  transform: rotate(45deg);
}

.side-group[open] > .side-group-head,
.side-group.is-open > .side-group-title {
  color: var(--amber);
}

.side-list,
.side-group-list,
.side-nav-list {
  display: block;
  padding: 2px 0 6px;
}

.side-list li,
.side-group-list li,
.side-nav-list li {
  display: block;
}

.side-list a,
.side-group-list a,
.side-nav-list a,
.side-nav-link {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.side-list a:hover,
.side-group-list a:hover,
.side-nav-list a:hover,
.side-nav-link:hover {
  color: #eef3f8;
  background: var(--panel-soft);
}

.side-list a.is-current,
.side-group-list a.is-current,
.side-nav-list a.is-current,
.side-nav-link.is-current {
  color: var(--amber);
  border-left-color: var(--amber);
  background: var(--panel-soft);
}

.side-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============================================================
   components — 面包屑与页标题区
   ============================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-dim);
}

.breadcrumb a:hover {
  color: var(--amber);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--text);
}

.page-header {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 12px;
}

.page-description {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 760px;
  line-height: 1.8;
}

.page-meta {
  margin-top: 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-dim);
}

/* ============================================================
   components — 通用区块
   ============================================================ */

.section {
  margin-bottom: 40px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: 22px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 14px;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-sub,
.section-desc,
.section-intro {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
  max-width: 780px;
  line-height: 1.8;
}

.section-text {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 780px;
  line-height: 1.8;
}

.section-more {
  margin-top: 14px;
}

.more-link {
  display: inline-block;
  font-size: 14px;
  color: var(--amber);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.more-link:hover {
  border-bottom-color: var(--amber);
}

.section-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.section-note a {
  color: var(--amber);
  margin-right: 14px;
}

.section-foot {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.section-foot a {
  font-size: 13px;
  color: var(--amber);
}

/* ============================================================
   components — 图片容器
   ============================================================ */

.hero-figure,
.content-media,
.page-media,
.page-figure,
.media-figure,
.guide-figure {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-figure img,
.content-media img,
.page-media img,
.page-figure img,
.media-figure img,
.guide-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-figure figcaption,
.content-media figcaption,
.page-media figcaption,
.page-figure figcaption,
.media-figure figcaption,
.guide-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--line-soft);
  line-height: 1.7;
}

.figure-caption,
.media-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--line-soft);
}

.content-media-primary {
  margin-top: 24px;
}

.page-media,
.page-figure,
.media-figure,
.guide-figure {
  margin-bottom: 30px;
}

/* ============================================================
   components — 表格
   ============================================================ */

.field-table,
.data-table {
  width: 100%;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-caption,
.data-table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td,
.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.7;
}

.field-table thead th,
.data-table thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.field-table tbody th,
.data-table tbody th {
  font-weight: 500;
  color: var(--amber);
  white-space: nowrap;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td,
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ============================================================
   components — 状态标识与标签
   ============================================================ */

.topic-state,
.state-doing,
.state-done,
.state-check,
.status-tag {
  display: inline-block;
  font-size: 12px;
  font-family: var(--mono);
  padding: 2px 9px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--panel-soft);
}

.state-doing,
.status-done {
  color: var(--amber);
  border-color: rgba(224, 160, 58, 0.45);
}

.state-done {
  color: #7fb37a;
  border-color: rgba(127, 179, 122, 0.45);
}

.state-check,
.status-pending {
  color: var(--alert);
  border-color: rgba(217, 96, 58, 0.45);
}

.status-review {
  color: var(--amber);
  border-color: rgba(224, 160, 58, 0.45);
}

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  margin: 0 6px 6px 0;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--panel-soft);
}

.tag-amber {
  color: var(--amber);
  border-color: rgba(224, 160, 58, 0.45);
}

/* ============================================================
   pages — 首页
   ============================================================ */

.home-main .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
  margin-bottom: 44px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.hero-main {
  min-width: 0;
}

.hero-kicker {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 30px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 20px;
  line-height: 1.85;
}

.hero-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-entries li {
  display: block;
}

.entry-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.entry-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.entry-btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #10151c;
  font-weight: 500;
}

.entry-btn-primary:hover {
  background: #f0b055;
  border-color: #f0b055;
  color: #10151c;
}

.hero-timeline {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.hero-timeline-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.timeline-list {
  display: block;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 10px 0 10px 16px;
  border-left: 1px solid var(--line);
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.timeline-time {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--amber);
}

.timeline-type {
  font-size: 13px;
  color: var(--text);
}

.timeline-scope {
  font-size: 12px;
  color: var(--text-dim);
}

.channel-rows {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 96px;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line-soft);
}

.channel-row:last-child {
  border-bottom: 0;
}

.channel-row:hover {
  background: var(--panel-soft);
}

.channel-info {
  min-width: 0;
}

.channel-name {
  font-size: 17px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 4px;
}

.channel-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.channel-count {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--amber);
  white-space: nowrap;
}

.row-link {
  font-size: 13px;
  color: var(--amber);
  text-align: right;
  white-space: nowrap;
}

.topic-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.topic-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic-card:hover {
  border-color: var(--amber);
}

.topic-name {
  font-size: 17px;
  font-weight: 500;
  color: #eef3f8;
}

.topic-scope {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
  flex: 1 1 auto;
}

.section-topics .topic-state {
  align-self: flex-start;
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.path-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-step .step-index {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--amber);
}

.path-step .step-name {
  font-size: 17px;
  font-weight: 500;
  color: #eef3f8;
}

.path-step .step-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
  flex: 1 1 auto;
}

.path-step .step-link {
  font-size: 13px;
  color: var(--amber);
}

.log-list {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.log-item {
  display: grid;
  grid-template-columns: 120px 140px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.log-item:last-child {
  border-bottom: 0;
}

.log-time {
  font-family: var(--mono);
  color: var(--amber);
}

.log-type {
  color: var(--text);
}

.log-scope {
  color: var(--text-dim);
}

/* ============================================================
   pages — 题材频道
   ============================================================ */

.channel-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.channel-block:hover {
  border-color: var(--amber);
}

.channel-block .channel-name {
  font-size: 17px;
  margin-bottom: 10px;
}

.channel-scope,
.channel-types {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 8px;
}

.channel-types {
  margin-bottom: 0;
}

.channel-scope .tag-amber {
  margin-right: 8px;
}

.advice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.advice-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.advice-title {
  font-size: 17px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 8px;
}

.advice-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
}

.term-list {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.term-name {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--amber);
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.term-desc {
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  border-bottom: 1px solid var(--line-soft);
}

.term-list .term-name:last-of-type,
.term-list .term-desc:last-of-type {
  border-bottom: 0;
}

/* ============================================================
   pages — 专题片单
   ============================================================ */

.topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.topic-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.topic-item:hover {
  border-color: var(--amber);
}

.topic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.topic-head .topic-name {
  font-size: 17px;
}

.topic-item .topic-scope {
  margin-bottom: 12px;
}

.topic-meta {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0 0 12px;
  font-size: 13px;
}

.topic-meta-key {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
}

.topic-meta-value {
  margin: 0;
  color: var(--text);
}

.topic-note {
  font-size: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.topic-note a {
  color: var(--amber);
}

.status-list {
  display: grid;
  gap: 12px;
}

.status-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
}

/* ============================================================
   pages — 条目字段说明
   ============================================================ */

.section-media .media-figure {
  margin-bottom: 18px;
}

.rule-list {
  display: grid;
  gap: 12px;
}

.rule-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.rule-title {
  font-size: 16px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 6px;
}

.rule-text {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
}

.boundary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.boundary-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.boundary-title {
  font-size: 15px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 6px;
}

.boundary-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
}

.section-boundary .section-text a {
  color: var(--amber);
  margin-right: 14px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-item:hover {
  border-color: var(--amber);
}

.related-item a {
  font-size: 15px;
  color: var(--amber);
}

.related-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============================================================
   pages — 浏览指南
   ============================================================ */

.guide-steps {
  margin-bottom: 40px;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
}

.step-item .step-index {
  font-size: 22px;
  font-family: var(--mono);
  color: var(--amber);
  line-height: 1.3;
  flex: 0 0 auto;
}

.step-body {
  min-width: 0;
}

.step-body .step-name {
  font-size: 17px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 8px;
}

.step-body .step-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 10px;
}

.step-body .step-link {
  font-size: 13px;
  color: var(--amber);
}

.guide-notes,
.guide-faq,
.guide-next {
  margin-bottom: 40px;
}

.note-list {
  display: grid;
  gap: 10px;
  counter-reset: note;
}

.note-item {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px 14px 52px;
}

.note-item::before {
  counter-increment: note;
  content: counter(note, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--amber);
}

.note-name {
  font-size: 15px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 6px;
}

.note-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-item[open] {
  border-color: rgba(224, 160, 58, 0.5);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
  color: #eef3f8;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-family: var(--mono);
  font-size: 18px;
  color: var(--amber);
  flex: 0 0 auto;
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.next-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.next-item {
  display: block;
}

.next-item a {
  display: block;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.next-item a:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ============================================================
   pages — 404
   ============================================================ */

.error-main {
  display: block;
}

.error-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  text-align: left;
}

.error-code {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 14px;
}

.error-title {
  font-size: 30px;
  font-weight: 500;
  color: #eef3f8;
  margin-bottom: 14px;
}

.error-desc {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 24px;
  line-height: 1.85;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.error-actions li {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #10151c;
  font-weight: 500;
}

.btn-primary:hover {
  background: #f0b055;
  border-color: #f0b055;
  color: #10151c;
}

.error-links {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.error-links-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.error-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.error-links-list a {
  font-size: 14px;
  color: var(--amber);
}

/* ============================================================
   components — 页脚
   ============================================================ */

.site-footer {
  background: #131a22;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 36px 24px 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  min-width: 0;
}

.footer-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: #eef3f8;
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 420px;
}

.footer-nav,
.footer-extra {
  min-width: 0;
}

.footer-nav-title {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer-nav-list {
  display: grid;
  gap: 8px;
}

.footer-nav-list a {
  display: inline-block;
  font-size: 13px;
  color: var(--text);
  min-height: 22px;
}

.footer-nav-list a:hover {
  color: var(--amber);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 20px;
}

.footer-note,
.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 720px;
}

.back-top {
  font-size: 13px;
  color: var(--amber);
  white-space: nowrap;
}

/* ============================================================
   responsive — 960px
   ============================================================ */

@media (max-width: 960px) {
  .layout-shell,
  .page-layout,
  .page-layout:not(.sidebar-left),
  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 22px 20px 44px;
  }

  .page-layout:not(.sidebar-left) > .site-main,
  .page-layout:not(.sidebar-left) > .content-column,
  .page-layout:not(.sidebar-left) > .side-nav,
  .sidebar-left .page-layout > .side-nav,
  .page-layout.sidebar-left > .side-nav,
  .sidebar-left .page-layout > aside,
  .page-layout.sidebar-left > aside,
  .sidebar-left .page-layout > .site-main,
  .page-layout.sidebar-left > .site-main,
  .sidebar-left .page-layout > .content-column,
  .page-layout.sidebar-left > .content-column {
    grid-column: 1;
    grid-row: auto;
  }

  .home-main .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .topic-cards,
  .path-steps,
  .advice-list,
  .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   responsive — 640px
   ============================================================ */

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
    gap: 12px;
    min-height: 58px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .brand {
    padding: 8px 0;
  }

  .nav-toggle {
    display: flex;
    order: 2;
  }

  .site-nav {
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .nav-link.is-current {
    border-left-color: var(--amber);
    border-bottom-color: transparent;
    background: var(--panel);
  }

  .header-status {
    order: 4;
    flex: 1 1 100%;
    margin-bottom: 12px;
    justify-content: flex-start;
  }

  .layout-shell,
  .page-layout,
  .page-layout:not(.sidebar-left),
  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    padding: 18px 16px 40px;
    gap: 20px;
  }

  .page-title,
  .hero-title,
  .error-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 19px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .topic-cards,
  .path-steps,
  .advice-list,
  .step-list,
  .topic-list,
  .boundary-list,
  .related-list,
  .next-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .channel-count,
  .row-link {
    text-align: left;
  }

  .log-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .term-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .term-name {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .term-desc {
    padding-top: 4px;
  }

  .status-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .topic-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .topic-meta-value {
    margin-bottom: 8px;
  }

  .step-item {
    flex-direction: column;
    gap: 8px;
  }

  .note-item {
    padding: 14px 16px 14px 46px;
  }

  .error-inner {
    padding: 48px 16px 72px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn {
    justify-content: center;
  }

  .footer-inner {
    padding: 28px 16px 24px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .footer-nav-list a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ============================================================
   responsive — 390px 细节收口
   ============================================================ */

@media (max-width: 420px) {
  .field-table th,
  .field-table td,
  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .field-table,
  .data-table {
    font-size: 13px;
  }

  .channel-row,
  .log-item,
  .rule-item,
  .boundary-item,
  .related-item,
  .advice-item,
  .topic-item,
  .topic-card,
  .path-step {
    padding: 14px;
  }
}
