:root {
  --bg: #0e1620;
  --panel: #17222f;
  --panel-2: #1c2836;
  --line: #243244;
  --accent: #3fc4b8;
  --ok: #43d19a;
  --rest: #e6b455;
  --pending: #ea6a55;
  --archive: #7d93ab;
  --text: #e9eff6;
  --muted: #9bafc3;
  --foot-bg: #e8eef4;
  --foot-fg: #1f2c3a;
  --radius: 8px;
  --wrap: 1120px;
  --prose: 760px;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.35;
  font-weight: 700;
}

p {
  margin: 0 0 18px;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #63d8cd;
}

time, code, .mono {
  font-family: var(--mono);
  font-weight: 500;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== base ===== */
.site-body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 1 auto;
}

/* ===== layout ===== */
.header-inner,
.footer-inner,
.site-main > .page-head,
.site-main > section,
.site-main > article,
.site-main > nav.breadcrumb,
.site-main > div.page-header,
.site-main > .related-links {
  width: 100%;
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-main > section,
.site-main > article,
.site-main > div.page-header {
  margin-top: 56px;
}

.site-main > section:first-child,
.site-main > article:first-child {
  margin-top: 0;
}

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14, 22, 32, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  font-size: 19px;
  font-weight: 700;
}

.brand-slogan {
  font-size: 13px;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: block;
  padding: 9px 12px;
  font-size: 15px;
  color: var(--muted);
  border-radius: 6px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--panel);
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 700;
  background: var(--panel);
}

.nav-hint {
  display: none;
  margin: 0;
}

/* ===== breadcrumb / page header ===== */
.breadcrumb {
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb-list a {
  color: var(--muted);
}

.breadcrumb-list a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--muted);
}

.site-main > nav.breadcrumb {
  padding-top: 22px;
  padding-bottom: 2px;
}

.page-header {
  margin-top: 14px;
}

.page-title {
  font-size: clamp(26px, 4vw, 40px);
  color: var(--text);
}

.page-head {
  padding-top: 14px;
}

.page-kicker,
.section-kicker {
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 8px;
}

.page-lead {
  max-width: var(--prose);
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 10px;
}

.page-meta {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.section-intro,
.section-note,
.section-lead {
  max-width: var(--prose);
  color: var(--muted);
  margin: 0 0 20px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2,
.site-main h2 {
  font-size: 22px;
  color: var(--text);
}

.section-head h2 {
  margin-bottom: 8px;
}

.section-desc {
  max-width: var(--prose);
  color: var(--muted);
  margin: 0;
}

.site-main h3 {
  font-size: 18px;
  color: var(--text);
}

.site-main h2 + p,
.site-main h3 + p {
  margin-top: 10px;
}

.site-main p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-more {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
}

.section-more {
  margin: 20px 0 0;
}

.section-more .link-more::after {
  content: " →";
}

/* ===== buttons / status ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #0b141c;
}

.btn-primary:hover {
  background: #63d8cd;
  color: #0b141c;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--muted);
}

.dot-ongoing {
  background: var(--ok);
}

.dot-rest {
  background: var(--rest);
}

.dot-pending {
  background: var(--pending);
}

.dot-finished {
  background: var(--archive);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.status-ongoing {
  color: var(--ok);
}

.status-rest {
  color: var(--rest);
}

.status-pending {
  color: var(--pending);
}

.status-finished {
  color: var(--archive);
}

/* ===== figures ===== */
figure {
  margin: 0;
}

.site-main figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.section-media,
.lines-figure,
.ledger-figure,
.ladder-media,
.tool-figure,
.rule-figure {
  margin: 26px 0;
}

.section-media img,
.lines-figure img,
.ledger-figure img,
.ladder-media img,
.tool-figure img,
.rule-figure img {
  aspect-ratio: 16 / 9;
  max-height: 420px;
}

/* ===== hero ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 44px;
  align-items: center;
  padding-top: 52px;
  padding-bottom: 8px;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 12px;
}

.hero-text h1 {
  font-size: clamp(26px, 4vw, 40px);
  margin: 0 0 16px;
}

.hero-lead {
  max-width: var(--prose);
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 16px;
}

.hero-next {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.hero-visual img {
  aspect-ratio: 4 / 3;
  max-height: 380px;
}

/* ===== genre band ===== */
.genre-tags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.genre-tag a {
  display: block;
  height: 100%;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}

.genre-tag a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tag-name {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.tag-desc {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

/* ===== timeline ===== */
.timeline {
  border-left: 2px solid var(--line);
  margin-left: 6px;
  padding-left: 26px;
  display: grid;
  gap: 26px;
}

.timeline-node {
  position: relative;
}

.timeline-node::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.node-date time {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}

.node-change {
  margin: 8px 0 10px;
  font-weight: 700;
}

.node-items {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.node-items li {
  font-size: 15px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.node-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
}

.node-status {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ===== cover wall ===== */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  min-width: 0;
}

.cover-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
}

.cover-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cover-figure img {
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 0;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
}

.cover-code {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent);
}

.cover-line {
  font-size: 14px;
  color: var(--muted);
}

.cover-range {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;
}

/* ===== directory + notice ===== */
.directory-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.directory-list {
  border-top: 1px solid var(--line);
}

.directory-row {
  border-bottom: 1px solid var(--line);
}

.directory-row a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px;
  color: var(--text);
}

.directory-row a:hover {
  color: var(--accent);
}

.dir-count {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.notice-list {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.notice-item time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.notice-item p {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.notice-cards {
  display: grid;
  gap: 12px;
}

.entry-card {
  display: block;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}

.entry-card:hover {
  border-color: var(--accent);
  color: var(--text);
}

.entry-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.entry-desc {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

/* ===== shelf ladder (home) ===== */
.ladder-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ladder-block {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.ladder-name {
  font-size: 18px;
  margin-bottom: 8px;
}

.ladder-range,
.ladder-pace {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.ladder-range {
  font-family: var(--mono);
}

.ladder-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.item-code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ===== path + help ===== */
.path-help {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.path-steps {
  display: grid;
  gap: 16px;
}

.path-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-step .step-no {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  grid-row: 1;
}

.path-step .step-name {
  font-size: 17px;
  grid-column: 2;
  grid-row: 1;
}

.path-step .step-desc {
  grid-column: 2;
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.path-step .step-link {
  grid-column: 2;
  font-size: 14px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
}

.faq-q {
  cursor: pointer;
  padding: 15px 0;
  font-weight: 700;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-family: var(--mono);
}

.faq-item[open] .faq-q::after {
  content: "–";
}

.faq-a {
  margin: 0;
  padding: 0 0 16px;
  font-size: 15px;
  color: var(--muted);
}

/* ===== boundary band ===== */
.boundary-band {
  padding: 24px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pending);
  border-radius: var(--radius);
}

.boundary-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.boundary-text {
  max-width: var(--prose);
  color: var(--muted);
  margin: 0 0 12px;
}

/* ===== related links ===== */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.related-links-label {
  font-size: 14px;
  color: var(--muted);
}

.related-links-item {
  font-size: 15px;
}

/* ===== inner page shared ===== */
.inner-main {
  padding-top: 0;
}

.inner-main > section,
.inner-main > article,
.inner-main > div.page-header {
  margin-top: 52px;
}

.inner-main > section:first-of-type {
  margin-top: 0;
}

.inner-main > .page-head {
  margin-top: 0;
  padding-top: 14px;
}

.inner-main > .page-header + .page-head {
  margin-top: 0;
}

/* ===== pages: genre-lines ===== */
.lines-intro p {
  max-width: var(--prose);
  color: var(--muted);
}

.lines-grid > h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.lines-grid > .section-note {
  margin-bottom: 24px;
}

.lines-grid .line-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.lines-grid .line-block:last-child {
  margin-bottom: 0;
}

.line-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.line-head h3 {
  font-size: 18px;
}

.line-code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}

.line-activity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;
}

.line-activity.is-active .status-dot {
  background: var(--ok);
}

.line-activity.is-steady .status-dot {
  background: var(--accent);
}

.line-activity.is-resting .status-dot {
  background: var(--rest);
}

.line-activity.is-archive .status-dot {
  background: var(--archive);
}

.line-desc {
  max-width: var(--prose);
  color: var(--muted);
}

.line-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.line-items a {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  padding: 5px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.line-items a:hover {
  border-color: var(--accent);
}

.activity-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  align-items: start;
}

.activity-col h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.activity-col p {
  color: var(--muted);
}

.activity-levels {
  display: grid;
  gap: 10px;
}

.activity-levels li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
}

.activity-levels strong {
  color: var(--text);
  font-weight: 700;
}

/* ===== pages: update-lines ===== */
.status-legend {
  max-width: var(--wrap);
  padding-top: 0;
  padding-bottom: 0;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.node-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.node-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.node-date {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 10px;
}

.node-detail {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 20px;
  margin: 0;
}

.node-detail dt {
  font-size: 14px;
  color: var(--muted);
}

.node-detail dd {
  margin: 0;
  font-size: 15px;
}

.topics-and-archive {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.topics-col h2,
.archive-col h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.topic-list {
  display: grid;
  gap: 16px;
}

.topic-item {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.topic-desc {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.archive-list {
  border-top: 1px solid var(--line);
}

.archive-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.archive-month {
  font-family: var(--mono);
  color: var(--text);
}

.archive-count {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.pending-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pending-item {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pending);
  border-radius: var(--radius);
}

.pending-code {
  font-family: var(--mono);
  color: var(--pending);
  margin: 0 0 4px;
}

.pending-line {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 8px;
}

.pending-reason {
  margin: 0;
  font-size: 15px;
}

/* ===== pages: chapter-ledger ===== */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

table.ledger caption {
  text-align: left;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

table.ledger th,
table.ledger td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.ledger thead th {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

table.ledger tbody th {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

table.ledger td.num {
  font-family: var(--mono);
  white-space: nowrap;
}

table.ledger tbody tr:last-child th,
table.ledger tbody tr:last-child td {
  border-bottom: 0;
}

table.ledger tbody tr:hover {
  background: var(--panel-2);
}

.guide-rows {
  display: grid;
  gap: 16px;
}

.guide-row {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-row h3 {
  margin-bottom: 8px;
}

.guide-row p {
  margin: 0;
  max-width: var(--prose);
  color: var(--muted);
}

.status-rule .rule-list {
  display: grid;
  gap: 12px;
}

.status-rule .rule-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status-rule .rule-item p {
  margin: 0;
  color: var(--muted);
}

.rule-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  max-width: var(--prose);
}

/* ===== pages: shelf-ladder ===== */
.ladder-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ladder-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.ladder-entry {
  border-top: 3px solid var(--ok);
}

.ladder-mid {
  border-top: 3px solid var(--accent);
}

.ladder-long {
  border-top: 3px solid var(--archive);
}

.ladder-scene {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.ladder-detail .ladder-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.ladder-detail .ladder-block:last-child {
  margin-bottom: 0;
}

.ladder-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.ladder-block-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.ladder-items {
  display: grid;
  gap: 10px;
}

.ladder-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ladder-item .item-code {
  background: transparent;
  border: 0;
  padding: 0;
}

.item-line {
  font-size: 14px;
  color: var(--muted);
}

.item-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.item-range {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.ladder-item .item-link {
  margin-left: auto;
  font-size: 14px;
}

.misjudge-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.misjudge-item {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.misjudge-item h3 {
  margin-bottom: 8px;
}

.misjudge-item p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ===== pages: reading-path ===== */
.problem-part > p,
.tool-part > p,
.steps-part > p,
.example-part > p {
  max-width: var(--prose);
  color: var(--muted);
}

.problem-block {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.problem-block:last-child {
  margin-bottom: 0;
}

.problem-block h3 {
  margin-bottom: 8px;
}

.problem-block p {
  margin: 0;
  max-width: var(--prose);
  color: var(--muted);
}

.tool-map {
  display: grid;
  gap: 12px;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tool-problem {
  font-weight: 700;
}

.tool-page {
  font-size: 15px;
}

.tool-usage {
  font-size: 15px;
  color: var(--muted);
}

.step-list {
  display: grid;
  gap: 16px;
}

.step-block {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-block .step-index {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 6px;
}

.step-block .step-name {
  margin-bottom: 8px;
}

.steps-part .step-desc {
  margin: 0 0 10px;
  max-width: var(--prose);
  color: var(--muted);
}

.steps-part .step-link {
  margin: 0;
  font-size: 14px;
}

.example-body p {
  max-width: var(--prose);
}

.example-body p:last-child {
  margin-bottom: 0;
}

/* ===== pages: corrections ===== */
.scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.scope-col {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-in {
  border-top: 3px solid var(--ok);
}

.scope-out {
  border-top: 3px solid var(--pending);
}

.scope-col h3 {
  margin-bottom: 12px;
}

.scope-list {
  display: grid;
  gap: 9px;
}

.scope-list li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  color: var(--muted);
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.scope-out .scope-list li::before {
  background: var(--pending);
}

.rule-part .rule-list {
  display: grid;
  gap: 14px;
}

.rule-part .rule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-part .rule-item h3 {
  margin-bottom: 8px;
}

.rule-part .rule-item p {
  margin: 0;
  max-width: var(--prose);
  color: var(--muted);
}

.report-list {
  display: grid;
  gap: 12px;
}

.report-item,
.report-field-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.report-field {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}

.report-item p,
.report-field-item p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.report-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

.faq-part .faq-list {
  gap: 12px;
}

/* ===== next steps ===== */
.next-steps > h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.next-steps > .section-lead,
.next-steps > .section-intro {
  margin-bottom: 22px;
}

.next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.next-grid:has(.next-card:nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.next-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}

.next-card:hover {
  border-color: var(--accent);
  color: var(--text);
}

.next-card h3,
.next-title,
.next-name,
.next-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.next-desc,
.next-card-desc {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.next-arrow {
  font-family: var(--mono);
  color: var(--accent);
}

.next-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.next-list .next-card {
  display: block;
  padding: 0;
}

.next-list .next-card a {
  display: block;
  padding: 20px 22px;
  color: var(--text);
}

.next-list .next-card a:hover {
  color: var(--text);
}

.next-list .next-card h3 {
  margin-bottom: 8px;
}

.next-list .next-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ===== pages: 404 ===== */
.error-main {
  display: flex;
  justify-content: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.error-panel {
  width: 100%;
  max-width: 680px;
  padding: 34px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--pending);
  margin: 0 0 10px;
}

.error-panel h1 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 14px;
}

.error-text {
  color: var(--muted);
}

.error-reason-list {
  display: grid;
  gap: 9px;
  margin-bottom: 24px;
}

.error-reason-list li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  color: var(--muted);
}

.error-reason-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}

.error-hint {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ===== footer ===== */
.site-footer {
  background: var(--foot-bg);
  color: var(--foot-fg);
  margin-top: 72px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  padding-top: 44px;
  padding-bottom: 16px;
}

.footer-name {
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 8px;
}

.footer-desc {
  margin: 0;
  font-size: 14px;
  color: #4a5c70;
}

.footer-nav {
  display: flex;
  gap: 40px;
}

.footer-col {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-col a {
  color: var(--foot-fg);
  font-size: 15px;
}

.footer-col a:hover {
  color: #0d6f68;
}

.legend-title {
  font-weight: 700;
  margin: 0 0 10px;
}

.legend-list {
  display: grid;
  gap: 8px;
}

.legend-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4a5c70;
}

.legend-list a:hover {
  color: #0d6f68;
}

.legend-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: #5b6e83;
}

.foot,
.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid #cdd9e5;
  font-size: 13px;
  color: #5b6e83;
}

/* ===== responsive ===== */
@media (max-width: 1024px) {
  .header-inner,
  .footer-inner,
  .site-main > .page-head,
  .site-main > section,
  .site-main > article,
  .site-main > nav.breadcrumb,
  .site-main > div.page-header,
  .site-main > .related-links {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding-top: 36px;
  }

  .hero-visual img {
    max-height: 320px;
  }

  .genre-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid .cover-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .directory-split,
  .path-help,
  .topics-and-archive,
  .activity-note {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .ladder-row,
  .ladder-columns,
  .misjudge-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ladder-row .ladder-block:last-child,
  .ladder-columns .ladder-col:last-child,
  .misjudge-list .misjudge-item:last-child {
    grid-column: 1 / -1;
  }

  .next-grid,
  .next-grid:has(.next-card:nth-child(3)),
  .next-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next-grid .next-card:last-child:nth-child(odd),
  .next-list .next-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .pending-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 14px;
  }

  .tool-usage {
    grid-column: 1 / -1;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }

  .footer-legend {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-main > section,
  .site-main > article,
  .site-main > div.page-header {
    margin-top: 40px;
  }

  .inner-main > section,
  .inner-main > article,
  .inner-main > div.page-header {
    margin-top: 38px;
  }

  .header-inner {
    gap: 10px;
    min-height: 62px;
  }

  .brand-slogan {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    display: block;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 13px 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 16px;
  }

  .nav-hint {
    display: block;
    padding: 0 10px 10px;
    font-size: 13px;
    color: var(--muted);
  }

  .hero {
    padding-top: 30px;
  }

  .genre-tags {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid .cover-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .cover-figure img {
    aspect-ratio: 16 / 10;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-node::before {
    left: -27px;
  }

  .ladder-row,
  .ladder-columns,
  .misjudge-list,
  .next-grid,
  .next-grid:has(.next-card:nth-child(3)),
  .next-list,
  .pending-items,
  .scope-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .ladder-row .ladder-block:last-child,
  .ladder-columns .ladder-col:last-child,
  .misjudge-list .misjudge-item:last-child,
  .next-grid .next-card:last-child:nth-child(odd),
  .next-list .next-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .node-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .node-detail dt {
    margin-top: 8px;
  }

  .tool-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-item,
  .report-field-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .ladder-item {
    gap: 8px 12px;
  }

  .ladder-item .item-link {
    margin-left: 0;
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-top: 36px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .legend-list a {
    min-height: 44px;
  }

  .error-main {
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .error-panel {
    padding: 26px 20px;
  }

  .table-scroll {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  table.ledger,
  table.ledger tbody,
  table.ledger tr,
  table.ledger th,
  table.ledger td {
    display: block;
    width: 100%;
  }

  table.ledger caption {
    border: 0;
    padding: 0 0 12px;
  }

  table.ledger thead {
    display: none;
  }

  table.ledger tbody tr {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
  }

  table.ledger tbody th {
    font-size: 16px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }

  table.ledger tbody td {
    padding: 4px 0;
    border-bottom: 0;
    color: var(--muted);
  }

  table.ledger tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    color: var(--muted);
  }

  table.ledger tbody tr:hover {
    background: var(--panel);
  }
}

@media (min-width: 721px) {
  .nav-list {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* 程序验收反馈：修复网格孤项 */
@media (min-width: 769px) {
  .cover-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
