:root {
  --bg: #f5f6f7;
  --panel: #ffffff;
  --text: #1c1f23;
  --text-sub: #5b6169;
  --border: #d8dce0;
  --border-strong: #b9c0c7;
  --accent: #3a4a5c;
  --accent-soft: #eef1f4;
  --ok: #2f9e6b;
  --ok-soft: #e6f5ee;
  --pending: #8a929b;
  --pending-soft: #eef0f2;
  --warn: #b6791f;
  --warn-soft: #fbf2e2;
  --radius: 6px;
  --radius-sm: 4px;
  --container: 1140px;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #1f2a36;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-mono);
  color: var(--text);
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.05rem;
}

h4 {
  font-size: 0.95rem;
}

p {
  margin: 0 0 0.9em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

time {
  font-family: var(--font-mono);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   layout
   ========================================================================== */

.site-body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.home-main,
.inner-main,
.error-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.inner-main {
  padding-top: 20px;
  padding-bottom: 48px;
}

.section {
  margin-bottom: 44px;
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-sub);
  font-size: 0.94rem;
  max-width: 780px;
  margin: 0;
}

.section-more {
  margin: 16px 0 0;
  font-size: 0.9rem;
}

.link-more {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}

.link-more:hover {
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   components
   ========================================================================== */

/* --- top bar --- */

.top-bar {
  background: var(--accent);
  color: #dfe4ea;
}

.top-bar-text {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  line-height: 1.5;
}

/* --- header --- */

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 10px 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  font-family: var(--font-mono);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-slogan {
  font-size: 0.78rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  align-items: center;
  justify-content: center;
}

.nav-toggle:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-block;
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-link.is-current {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #2c3949;
  border-color: #2c3949;
  color: #ffffff;
}

.btn-ghost {
  background: var(--panel);
  color: var(--accent);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

/* --- breadcrumb --- */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-sub);
  padding: 6px 0 14px;
  font-family: var(--font-mono);
}

.breadcrumb a {
  color: var(--text-sub);
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}

.breadcrumb-sep {
  margin: 0 8px;
  color: var(--border-strong);
}

.breadcrumb-current {
  color: var(--text);
}

/* --- page header --- */

.page-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.page-description {
  color: var(--text-sub);
  font-size: 0.95rem;
  max-width: 820px;
  margin: 0 0 12px;
}

.page-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  margin: 0;
}

.status-text {
  color: var(--text-sub);
}

/* --- status tags --- */

.status-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pending-soft);
  color: var(--pending);
  white-space: nowrap;
}

.status-tag.is-ready,
.status-tag.status-ok,
.status-tag.status-done {
  background: var(--ok-soft);
  border-color: #b6e0cb;
  color: var(--ok);
}

.status-tag.is-pending,
.status-tag.status-pending {
  background: var(--pending-soft);
  border-color: var(--border);
  color: var(--pending);
}

.status-tag.status-doing {
  background: var(--warn-soft);
  border-color: #edd9b0;
  color: var(--warn);
}

.status-tag.status-todo {
  background: var(--accent-soft);
  border-color: var(--border-strong);
  color: var(--text-sub);
}

/* --- tables --- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.data-table {
  min-width: 640px;
  font-size: 0.9rem;
}

.data-table caption,
.table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}

.data-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  background: #f0f2f4;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-weight: 400;
  color: var(--text);
}

.data-table tbody th {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #fafbfc;
}

/* --- cover grid --- */

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.cover-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cover-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 10px rgba(28, 31, 35, 0.06);
}

.cover-figure {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eceef0;
  border-bottom: 1px solid var(--border);
}

.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-meta {
  padding: 12px 14px 14px;
}

.cover-name {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.cover-genre {
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  margin: 0 0 8px;
}

.cover-link {
  display: block;
  color: var(--text);
}

.cover-link:hover {
  color: var(--accent);
}

.cover-caption {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.cover-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-sub);
  padding: 8px 12px 0;
}

.cover-wall .cover-card {
  display: flex;
  flex-direction: column;
}

.cover-wall .cover-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.cover-wall .cover-figure {
  border-bottom: none;
}

.cover-wall .status-tag {
  margin: 0 12px 14px;
  align-self: flex-start;
}

/* --- timeline (home) --- */

.timeline {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 6px 18px 14px;
}

.timeline-group {
  padding: 14px 0 6px;
  border-bottom: 1px dashed var(--border);
}

.timeline-group:last-child {
  border-bottom: none;
}

.timeline-month {
  font-size: 0.92rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 120px auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #eef0f2;
  font-size: 0.88rem;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-date {
  color: var(--text-sub);
  font-size: 0.8rem;
}

.timeline-entry,
.timeline-name {
  color: var(--text);
  font-weight: 500;
}

.timeline-genre {
  color: var(--text-sub);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

/* --- board (home) --- */

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.board-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.board-name {
  font-size: 1rem;
  margin-bottom: 8px;
}

.board-basis {
  font-size: 0.86rem;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.board-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.board-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}

.board-genre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-sub);
  white-space: nowrap;
}

/* --- guide layout (home) --- */

.guide-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.guide-col {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.guide-subtitle {
  font-size: 0.98rem;
  margin-bottom: 12px;
}

.guide-note {
  font-size: 0.86rem;
  color: var(--text-sub);
  margin-top: 12px;
}

.field-table {
  font-size: 0.86rem;
}

.field-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-sub);
  padding-bottom: 8px;
}

.field-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-sub);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}

.field-table tbody th,
.field-table tbody td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f2;
  vertical-align: top;
  font-weight: 400;
}

.field-table tbody th {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- path list --- */

.path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  counter-reset: path;
}

.path-step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.path-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid #b6e0cb;
  border-radius: 999px;
  padding: 1px 9px;
  margin-bottom: 10px;
}

.path-title {
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.path-text {
  font-size: 0.88rem;
  color: var(--text-sub);
  margin: 0;
}

/* --- sitemap grid (home) --- */

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.sitemap-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sitemap-link {
  display: block;
  padding: 14px 16px;
  color: var(--text);
}

.sitemap-link:hover {
  color: var(--accent);
  background: #fafbfc;
}

.sitemap-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.sitemap-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-sub);
}

/* --- entry list (tese) --- */

.entry-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.entry-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.entry-item:last-child {
  border-bottom: none;
}

.entry-name {
  font-family: var(--font-mono);
  font-weight: 600;
}

.entry-note {
  color: var(--text-sub);
  font-size: 0.85rem;
}

.entry-link {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
}

.entry-link:hover {
  border-bottom-color: var(--accent);
}

/* --- related links --- */

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.related-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.related-link,
.related-item > a {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.88rem;
}

.related-link:hover,
.related-item > a:hover {
  color: var(--accent);
  background: #fafbfc;
}

/* --- footer --- */

.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 20px 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 24px;
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 0.84rem;
  color: var(--text-sub);
  margin: 0;
}

.footer-title {
  font-size: 0.84rem;
  color: var(--text-sub);
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-list a {
  font-size: 0.86rem;
  color: var(--text-sub);
}

.footer-list a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
}

.footer-copy {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  font-size: 0.78rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

/* ==========================================================================
   pages
   ========================================================================== */

/* --- home: hero --- */

.hero {
  border-bottom: 1px solid var(--border);
  padding: 44px 0 40px;
  margin-bottom: 44px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: center;
}

.hero-text {
  max-width: 560px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ok);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 14px;
}

.hero-desc {
  color: var(--text-sub);
  font-size: 0.98rem;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  margin: 0;
}

.hero-figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-caption {
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
}

/* --- tese: category blocks --- */

.cat-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.cat-name {
  font-size: 1.08rem;
  margin-bottom: 14px;
}

.cat-media {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 420px;
}

.cat-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cat-media-caption {
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
}

.cat-intro {
  color: var(--text-sub);
  font-size: 0.92rem;
  max-width: 820px;
}

.cat-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.cat-field {
  min-width: 0;
}

.field-label {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.field-text {
  font-size: 0.88rem;
  margin: 0;
}

/* --- zuopin: field guide & scope --- */

.field-guide .field-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
}

.field-guide .field-table thead th {
  background: #f0f2f4;
  padding: 10px 14px;
}

.field-guide .field-table tbody th,
.field-guide .field-table tbody td {
  padding: 11px 14px;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.scope-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.scope-item-title {
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.scope-item p {
  font-size: 0.88rem;
  color: var(--text-sub);
}

/* --- gengxin: timeline & scope --- */

.update-timeline {
  margin-bottom: 44px;
}

.timeline-month {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.month-label {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.update-timeline .timeline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.update-timeline .timeline-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 120px auto;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid #eef0f2;
  font-size: 0.88rem;
}

.update-timeline .timeline-item:last-child {
  border-bottom: none;
}

.timeline-type {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
  white-space: nowrap;
  justify-self: start;
}

.update-scope {
  margin-bottom: 44px;
}

.scope-media {
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  max-width: 720px;
}

.scope-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.scope-media figcaption {
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
}

.scope-text {
  max-width: 820px;
}

.scope-text p {
  font-size: 0.92rem;
  color: var(--text-sub);
}

.scope-text .scope-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.scope-text .scope-list li {
  font-size: 0.88rem;
  padding-left: 16px;
  position: relative;
}

.scope-text .scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--border-strong);
  border-radius: 50%;
}

.update-links {
  margin-bottom: 44px;
}

.link-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.link-row:last-child {
  border-bottom: none;
}

.link-name {
  font-weight: 500;
}

.link-genre {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-sub);
}

.link-action {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
}

.link-action:hover {
  border-bottom-color: var(--accent);
}

/* --- bangdan: recommend lists --- */

.recommend-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.recommend-head {
  margin-bottom: 14px;
}

.recommend-name {
  font-size: 1.06rem;
  margin-bottom: 6px;
}

.recommend-basis {
  font-size: 0.86rem;
  color: var(--text-sub);
  margin: 0;
}

.recommend-cover {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 340px;
}

.recommend-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.recommend-items {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recommend-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 110px minmax(0, 2fr);
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #eef0f2;
  font-size: 0.88rem;
}

.recommend-item:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 500;
}

.item-genre {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-sub);
}

.item-note {
  font-size: 0.84rem;
  color: var(--text-sub);
}

.recommend-rule {
  margin-bottom: 44px;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.rule-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.rule-name {
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.rule-text {
  font-size: 0.88rem;
  color: var(--text-sub);
  margin: 0;
}

.rule-note {
  margin-top: 14px;
}

.recommend-jump {
  margin-bottom: 44px;
}

.jump-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.jump-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.jump-item a {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.88rem;
}

.jump-item a:hover {
  color: var(--accent);
  background: #fafbfc;
}

/* --- shuoming: fields, path, faq --- */

.fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.fields-media {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.fields-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.fields-media figcaption {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
}

.fields-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
  font-size: 0.88rem;
}

.fields-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  background: #f0f2f4;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.fields-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.fields-table tbody tr:last-child td {
  border-bottom: none;
}

.fields-table tbody td:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

.boundary-note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 18px 20px;
}

.subsection-title {
  font-size: 0.98rem;
  margin-bottom: 10px;
}

.boundary-note p {
  font-size: 0.9rem;
  color: var(--text-sub);
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.section-path {
  margin-bottom: 44px;
}

.section-path .path-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.section-path .path-step {
  display: flex;
  flex-direction: column;
}

.section-path .path-title {
  margin-bottom: 8px;
}

.section-path .path-step p {
  font-size: 0.88rem;
  color: var(--text-sub);
  margin: 0;
}

.section-faq {
  margin-bottom: 44px;
}

.faq-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  cursor: pointer;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 44px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "展开";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}

.faq-item[open] .faq-question::after {
  content: "收起";
  color: var(--accent);
  border-color: var(--border-strong);
}

.faq-question:hover {
  background: #fafbfc;
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 0.9rem;
  color: var(--text-sub);
  max-width: 860px;
  margin: 0;
}

/* --- 404 --- */

.error-main {
  padding-top: 56px;
  padding-bottom: 72px;
}

.error-panel {
  max-width: 640px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--warn);
  margin-bottom: 10px;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-sub);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .hero-text {
    max-width: none;
  }

  .fields-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.45rem;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .hero {
    padding: 30px 0 28px;
    margin-bottom: 32px;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .header-inner {
    min-height: 56px;
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--border);
    padding: 6px 0 10px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 12px 8px;
    min-height: 44px;
    border-bottom: 1px solid #eef0f2;
    border-left: 2px solid transparent;
    border-radius: 0;
  }

  .nav-link.is-current {
    border-bottom-color: #eef0f2;
    border-left-color: var(--accent);
    background: var(--accent-soft);
  }

  .timeline-item,
  .update-timeline .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .timeline-type {
    justify-self: start;
  }

  .entry-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .link-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .recommend-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .section {
    margin-bottom: 34px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 26px 20px 20px;
  }

  .error-panel {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .home-main,
  .inner-main,
  .error-main,
  .header-inner,
  .footer-inner,
  .footer-copy,
  .top-bar-text {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-slogan {
    display: none;
  }

  .cover-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .timeline {
    padding: 4px 14px 10px;
  }

  .cat-block,
  .board-card,
  .guide-col,
  .recommend-list,
  .scope-item,
  .rule-card,
  .path-step {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
