:root {
  --bg-page: #f6f7f5;
  --bg-surface: #ffffff;
  --bg-soft: #eef0ec;
  --bg-tint: #f0f2ee;
  --text-main: #2b2f2c;
  --text-sub: #6b716c;
  --text-faint: #8b918c;
  --accent: #4a6b5d;
  --accent-dark: #3a5749;
  --accent-soft: #e3eae5;
  --tone-one: #7d8a80;
  --tone-two: #8a8578;
  --tone-three: #6f7d86;
  --tone-four: #7e7a8a;
  --tone-five: #8a7f76;
  --tone-six: #728a7d;
  --line: #dcded9;
  --line-strong: #c8ccc5;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-soft: 0 1px 2px rgba(43, 47, 44, 0.05);
  --shadow-card: 0 2px 8px rgba(43, 47, 44, 0.06);
  --container: 1180px;
  --gap-xs: 6px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 48px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ============================================================
   base
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: var(--accent-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

time {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   layout
   ============================================================ */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.home-main {
  padding-top: 0;
}

.inner-main {
  padding-top: 20px;
}

.site-footer {
  margin-top: auto;
  background-color: #eceee9;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 1fr) minmax(220px, 1.2fr);
  gap: var(--gap-lg);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-copy {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-faint);
}

/* ============================================================
   components
   ============================================================ */

/* --- header brand --- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text-main);
}

.brand:hover {
  color: var(--text-main);
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background-color: var(--accent);
  background-image: linear-gradient(150deg, var(--accent) 0%, var(--tone-three) 100%);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.brand-slogan {
  font-size: 12px;
  color: var(--text-sub);
}

/* --- nav toggle --- */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 14px;
}

.nav-toggle-icon {
  display: block;
  width: 16px;
  height: 2px;
  background-color: var(--text-main);
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background-color: var(--text-main);
}

.nav-toggle-icon::before {
  top: -5px;
}

.nav-toggle-icon::after {
  top: 5px;
}

.nav-toggle-text {
  line-height: 1;
}

/* --- primary nav --- */

.site-nav {
  flex: 1 1 auto;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 10px 14px;
  min-height: 44px;
  line-height: 24px;
  font-size: 15px;
  color: var(--text-main);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--accent);
  background-color: var(--bg-soft);
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

.btn-ghost {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background-color: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* --- breadcrumb --- */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--text-faint);
}

.breadcrumb-current {
  color: var(--text-main);
}

/* --- page header --- */

.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

.page-description {
  margin-top: 12px;
  max-width: 780px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* --- section head (home) --- */

.section {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head {
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.section-desc {
  margin-top: 8px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
}

.section-intro,
.section-lead {
  margin-top: 8px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
}

.section-foot {
  margin-top: 20px;
  font-size: 14px;
}

.section-foot a {
  display: inline-block;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.section-foot a:hover {
  border-bottom-color: var(--accent);
}

.section-note {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* --- generic figure --- */

.block-figure,
.guide-figure,
.topic-figure,
.content-figure {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.block-figure img,
.guide-figure img,
.topic-figure img,
.content-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--bg-soft);
}

.block-figure figcaption,
.guide-figure figcaption,
.topic-figure figcaption,
.content-figure figcaption {
  padding: 10px 14px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

/* --- step list (shared base) --- */

.step-list {
  display: grid;
  gap: var(--gap-sm);
}

.step-item {
  position: relative;
  padding: 16px 18px 16px 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* --- related list (shared) --- */

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-sm);
}

.related-item a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-main);
}

.related-item a:hover {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--accent-dark);
}

/* --- footer --- */

.footer-brand {
  min-width: 0;
}

.footer-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.footer-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.footer-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.footer-list a {
  display: inline-block;
  padding: 4px 0;
  min-height: 32px;
  font-size: 14px;
  color: var(--text-sub);
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* ============================================================
   pages
   ============================================================ */

/* --- home: hero --- */

.hero {
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: 100%;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: var(--bg-surface);
  font-size: 13px;
  color: var(--text-sub);
}

.status-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--gap-lg);
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.hero-lead {
  margin-top: 16px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
}

.hero-rules {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.hero-rules li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
}

.hero-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--tone-one);
}

.hero-rules li:nth-child(2)::before {
  background-color: var(--tone-two);
}

.hero-rules li:nth-child(3)::before {
  background-color: var(--tone-three);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-figure {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: var(--bg-soft);
}

.hero-figure figcaption {
  padding: 10px 14px 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

/* --- home: genre grid --- */

.genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.genre-card {
  display: flex;
  flex-direction: column;
  padding: 0 0 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.genre-card:hover {
  border-color: var(--line-strong);
  background-color: var(--bg-tint);
}

.genre-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.genre-name {
  margin: 16px 18px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.genre-scope {
  margin: 8px 18px 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.genre-hint {
  margin: 8px 18px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-faint);
}

.genre-link {
  margin: 14px 18px 0;
  font-size: 14px;
  font-weight: 500;
}

/* --- home: topics --- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.topic-card {
  padding: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.topic-card:hover {
  border-color: var(--line-strong);
  background-color: var(--bg-tint);
}

.topic-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.topic-scope {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.topic-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.topic-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
}

/* --- home: timeline --- */

.timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line-strong);
  padding-left: 22px;
}

.timeline-item {
  position: relative;
  padding: 0 0 22px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--tone-three);
}

.timeline-date {
  display: inline-block;
  margin-right: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.timeline-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1.6;
}

.timeline-text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
}

/* --- home: guide section --- */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--gap-lg);
  align-items: start;
}

.section-guide .step-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-guide .step-item {
  padding-left: 52px;
}

.step-num {
  position: absolute;
  left: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.step-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.section-guide .guide-figure {
  margin-bottom: 0;
}

/* --- home: boundaries --- */

.boundary-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.boundary-block {
  padding: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.boundary-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.boundary-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.boundary-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--tone-two);
}

.feedback-entry {
  margin-top: var(--gap-md);
  padding: 22px;
  background-color: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.feedback-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.feedback-text {
  margin-top: 8px;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.feedback-entry .btn {
  margin-top: 16px;
}

/* --- inner pages: shared two-column layout --- */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap-lg);
  align-items: start;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
}

.sidebar-left .page-layout > .side-panel,
.sidebar-left .page-layout > .sidebar,
.sidebar-left .page-layout > .page-aside,
.sidebar-left .page-layout > .side-nav {
  order: 2;
}

.sidebar-left .page-layout > .content-main,
.sidebar-left .page-layout > .content-column,
.sidebar-left .page-layout > .page-content {
  order: 1;
}

.sidebar-left .page-layout.layout-shell {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.sidebar-left .page-layout.layout-shell > .sidebar {
  order: 1;
}

.sidebar-left .page-layout.layout-shell > .content-column {
  order: 2;
}

/* --- inner pages: side panels --- */

.side-panel,
.sidebar,
.page-aside,
.side-nav {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.side-title,
.sidebar-title,
.aside-title,
.side-nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.side-nav + .side-nav,
.aside-links {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.aside-links {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: none;
}

.side-subtitle,
.sidebar-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.side-subtitle + .side-list,
.sidebar-subtitle + .sidebar-list {
  margin-top: 10px;
}

.side-nav + .side-nav > .side-subtitle {
  margin-top: 0;
}

.side-list,
.sidebar-list,
.aside-list,
.side-nav-list {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}

.side-list a,
.sidebar-list a,
.aside-list a,
.side-nav-list a {
  display: block;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.side-list a:hover,
.sidebar-list a:hover,
.aside-list a:hover,
.side-nav-list a:hover {
  background-color: var(--accent-soft);
  color: var(--accent-dark);
}

.sidebar-item {
  list-style: none;
}

.sidebar-extra {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* --- inner pages: content column --- */

.content-main,
.content-column,
.page-content {
  min-width: 0;
}

.block,
.content-block,
.guide-section,
.topic-intro,
.topic-list-section,
.topic-relation,
.related-entry,
.related-section {
  margin-bottom: 40px;
}

.block:last-child,
.content-block:last-child,
.guide-section:last-child,
.topic-relation:last-child,
.related-entry:last-child,
.related-section:last-child {
  margin-bottom: 0;
}

.block-title,
.group-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-main);
}

.block-intro {
  margin-top: 8px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
}

.block-title + .block-intro,
.group-title + .entry-list {
  margin-top: 10px;
}

/* --- catalog: field table --- */

.field-table {
  margin-top: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.field-caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text-sub);
  background-color: var(--bg-tint);
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.field-table tbody td {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

/* --- catalog: genre and year groups --- */

.genre-group,
.year-group {
  margin-top: 26px;
}

.entry-list {
  display: grid;
  gap: 6px;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 0.8fr));
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
}

.entry-row:hover {
  border-color: var(--line-strong);
  background-color: var(--bg-tint);
}

.entry-name {
  font-weight: 600;
  color: var(--text-main);
}

.entry-genre,
.entry-year,
.entry-region,
.entry-status {
  color: var(--text-sub);
  font-size: 13px;
}

.entry-status {
  font-variant-numeric: tabular-nums;
}

/* --- catalog: howto steps --- */

.block-howto .step-list {
  margin-top: 20px;
}

.block-howto .step-item,
.block-related .step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.block-howto .step-index,
.block-related .step-index {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.step-body {
  min-width: 0;
}

/* --- topics page --- */

.topic-intro .intro-body {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  max-width: 780px;
}

.topic-intro .intro-body p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
}

.topic-list-section .topic-grid {
  margin-top: 20px;
}

.topic-list-section .topic-card {
  padding: 0;
  overflow: hidden;
}

.topic-card-media {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.topic-card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--bg-soft);
}

.topic-card-body {
  padding: 16px 18px 18px;
}

.topic-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.topic-card-scope {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.topic-card-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.relation-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.relation-block {
  padding: 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.relation-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.relation-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.relation-note {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* --- guide page --- */

.guide-section .step-list {
  margin-top: 20px;
}

.guide-section .step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.guide-section .step-index {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.device-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.device-card {
  padding: 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.device-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.device-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.device-points {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.device-points li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

.device-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--tone-three);
}

.clarity-block {
  margin-top: 24px;
  padding: 20px;
  background-color: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.clarity-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.clarity-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.clarity-points {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.clarity-points li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.clarity-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--tone-one);
}

.faq-list {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--line-strong);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "展开";
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
}

.faq-item[open] .faq-question::after {
  content: "收起";
}

.faq-question:hover {
  background-color: var(--bg-tint);
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* --- boundaries page --- */

.scope-compare {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.scope-col {
  padding: 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.scope-col--in {
  border-top: 3px solid var(--tone-one);
}

.scope-col--out {
  border-top: 3px solid var(--tone-two);
}

.scope-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.scope-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.scope-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--tone-three);
}

.content-block .content-figure {
  margin-top: 24px;
  margin-bottom: 0;
}

.boundary-item {
  padding: 16px 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.content-block > .boundary-list {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.boundary-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.boundary-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.content-block .step-list {
  margin-top: 20px;
}

.content-block .step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.content-block .step-index {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.step-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.related-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.related-card {
  display: block;
  padding: 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-main);
}

.related-card:hover {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--accent-dark);
}

.related-heading {
  font-size: 15px;
  font-weight: 600;
  color: inherit;
}

.related-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* --- 404 page --- */

.error-main {
  padding-top: 48px;
}

.error-panel {
  max-width: 640px;
  padding: 32px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.error-panel h1 {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-main);
}

.error-lead {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
}

.error-hint {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-faint);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.error-links {
  margin-top: 36px;
}

.error-links h2 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-main);
}

.error-link-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-sm);
}

.error-link-list a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-main);
}

.error-link-list a:hover {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--accent-dark);
}

/* --- enhanced interaction (non-blocking) --- */

@media (prefers-reduced-motion: no-preference) {
  .section,
  .block,
  .content-block,
  .guide-section {
    animation: fade-in 0.4s ease both;
  }

  @keyframes fade-in {
    from {
      opacity: 0.001;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 960px) {
  .header-inner {
    padding: 12px 20px;
  }

  .site-main {
    padding: 0 20px 48px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 32px 20px 20px;
  }

  .footer-note {
    grid-column: 1 / -1;
  }

  .footer-copy {
    padding: 14px 20px 24px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
  }

  .nav-link.is-current {
    border-bottom-color: var(--accent);
  }

  .hero-grid,
  .guide-layout,
  .sidebar-left .page-layout,
  .page-layout.sidebar-left,
  .sidebar-left .page-layout.layout-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-left .page-layout > .side-panel,
  .sidebar-left .page-layout > .sidebar,
  .sidebar-left .page-layout > .page-aside,
  .sidebar-left .page-layout > .side-nav,
  .sidebar-left .page-layout.layout-shell > .sidebar {
    order: 2;
  }

  .sidebar-left .page-layout > .content-main,
  .sidebar-left .page-layout > .content-column,
  .sidebar-left .page-layout > .page-content,
  .sidebar-left .page-layout.layout-shell > .content-column {
    order: 1;
  }

  .side-panel,
  .sidebar,
  .page-aside,
  .side-nav {
    position: static;
  }

  .genre-grid,
  .device-grid,
  .related-grid,
  .section-guide .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-row {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .brand-slogan {
    display: none;
  }

  .site-main {
    padding: 0 16px 40px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-md);
    padding: 28px 16px 16px;
  }

  .footer-copy {
    padding: 12px 16px 22px;
  }

  .page-title,
  .hero-title,
  .error-panel h1 {
    font-size: 24px;
  }

  .section-title,
  .block-title,
  .group-title,
  .error-links h2 {
    font-size: 19px;
  }

  .section {
    padding: 32px 0;
  }

  .hero {
    padding: 24px 0 32px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .genre-grid,
  .topic-grid,
  .boundary-layout,
  .device-grid,
  .related-grid,
  .relation-grid,
  .scope-compare,
  .section-guide .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .entry-name {
    font-size: 15px;
  }

  .field-table thead th,
  .field-table tbody td,
  .field-caption {
    padding: 10px 12px;
    font-size: 13px;
  }

  .field-table tbody td:first-child {
    white-space: normal;
  }

  .error-panel {
    padding: 24px 18px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn {
    width: 100%;
  }
}
