:root {
  --bg: #f6f6f4;
  --ink: #2c2c2a;
  --ink-soft: #6b6b66;
  --line: #dedcd6;
  --line-strong: #c9c6be;
  --surface: #ffffff;
  --surface-alt: #f1f0ec;
  --tone-category: #7d8a99;
  --tone-year: #8a8f7d;
  --tone-detail: #9a8a7d;
  --tone-note: #8d7d8a;
  --tone-coop: #7d9a92;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-soft: 0 1px 2px rgba(44, 44, 42, 0.05);
  --shell: 1120px;
  --reading: 760px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--tone-category);
  outline-offset: 2px;
}

/* ---------- layout: shell ---------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
}

.header-inner,
.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.inner-main {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.home-main {
  width: 100%;
}

/* ---------- layout: header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 246, 244, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(120%) blur(6px);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 8px rgba(44, 44, 42, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
  transition: min-height 0.2s ease, padding 0.2s ease;
}

.site-header.is-scrolled .header-inner {
  min-height: 58px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.brand-slogan {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--tone-category);
}

/* ---------- layout: breadcrumb & page header ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
}

.page-header {
  max-width: var(--reading);
  padding: 26px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 34px;
  line-height: 1.35;
  font-weight: 600;
}

.page-description {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- layout: section rhythm ---------- */

.section,
.home-main > section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.home-main > section:last-of-type {
  border-bottom: 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-title {
  font-size: 24px;
  line-height: 1.4;
}

.section-desc,
.section-intro,
.section-lead {
  margin-top: 12px;
  max-width: var(--reading);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.section-foot {
  margin-top: 24px;
  font-size: 15px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.text-link::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.18s ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--tone-category);
  border-bottom-color: var(--tone-category);
}

.text-link:hover::after {
  transform: translateX(3px);
}

/* ---------- components: figures & media ---------- */

.hero-media,
.notes-figure,
.category-figure,
.archive-figure,
.media-block,
.page-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.hero-media img,
.notes-figure img,
.category-figure img,
.archive-figure img,
.media-block img,
.page-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media-caption,
.notes-figure figcaption,
.category-figure figcaption,
.archive-figure figcaption,
.media-block figcaption,
.figure-caption {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ---------- components: buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--ink);
  color: #f7f7f5;
  border-color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #43433f;
  border-color: #43433f;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--ink);
  background: var(--surface);
}

/* ---------- components: tables ---------- */

.field-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.field-table {
  min-width: 640px;
  font-size: 15px;
}

.field-table-caption {
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-alt);
}

.field-table tbody th {
  width: 26%;
  font-weight: 600;
  color: var(--ink);
  background: #fbfbf9;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- pages: 404 ---------- */

.site-error .error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 96px;
}

.error-block {
  max-width: 620px;
  text-align: center;
}

.error-code {
  font-family: var(--serif);
  font-size: 60px;
  line-height: 1;
  font-weight: 600;
  color: var(--tone-detail);
}

.error-block h1 {
  margin-top: 16px;
  font-size: 30px;
  line-height: 1.4;
}

.error-text {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.error-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.error-button:hover,
.error-button:focus-visible {
  border-color: var(--ink);
  color: var(--tone-category);
}

/* ---------- footer ---------- */

.site-footer {
  flex-shrink: 0;
  margin-top: 0;
  background: #efeeea;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 40px;
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.footer-brand-text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--ink);
}

.footer-copy {
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- home: hero ---------- */

.hero {
  padding: 56px 0 60px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--tone-category);
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
}

.hero-title {
  margin-top: 18px;
  font-size: 34px;
  line-height: 1.35;
}

.hero-text {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-media {
  aspect-ratio: 4 / 3;
}

/* ---------- home: clues ---------- */

.clue-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.clue-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.clue-item:hover {
  box-shadow: var(--shadow-soft);
}

.clue-category {
  border-top-color: var(--tone-category);
}

.clue-year {
  border-top-color: var(--tone-year);
}

.clue-detail {
  border-top-color: var(--tone-detail);
}

.clue-name {
  font-size: 19px;
}

.clue-text {
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.clue-link {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.clue-link:hover,
.clue-link:focus-visible {
  color: var(--tone-category);
  border-bottom-color: var(--tone-category);
}

/* ---------- home: categories ---------- */

.category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.category-item {
  min-width: 0;
  padding: 20px 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.category-item:hover {
  box-shadow: var(--shadow-soft);
}

.cat-a {
  border-left-color: var(--tone-category);
}

.cat-b {
  border-left-color: var(--tone-year);
}

.cat-c {
  border-left-color: var(--tone-detail);
}

.cat-d {
  border-left-color: var(--tone-note);
}

.cat-e {
  border-left-color: var(--tone-coop);
}

.cat-f {
  border-left-color: var(--line-strong);
}

.category-name {
  font-size: 18px;
}

.category-scope {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.category-rule {
  margin-top: 8px;
  padding-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
}

/* ---------- home: years ---------- */

.year-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  counter-reset: year;
}

.year-item {
  position: relative;
  min-width: 0;
  padding: 20px 20px 20px 62px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.year-item:hover {
  box-shadow: var(--shadow-soft);
}

.year-item::before {
  counter-increment: year;
  content: counter(year, decimal-leading-zero);
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--tone-year);
}

.year-name {
  font-size: 18px;
}

.year-focus {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.year-range {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---------- home: fields ---------- */

.fields .field-table {
  min-width: 620px;
}

/* ---------- home: notes ---------- */

.notes-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.notes-figure {
  aspect-ratio: 3 / 2;
}

.note-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.note-item {
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.note-subject {
  font-size: 17px;
  color: var(--ink);
}

.note-direction {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- home: coop entry ---------- */

.coop-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.coop-block {
  min-width: 0;
  padding: 22px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--tone-coop);
  border-radius: var(--radius);
}

.coop-heading {
  font-size: 18px;
}

.coop-steps {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: coop;
}

.coop-step {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.coop-step::before {
  counter-increment: coop;
  content: counter(coop);
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: #ffffff;
  background: var(--tone-coop);
  border-radius: 50%;
}

.coop-block .text-link {
  margin-top: 16px;
}

/* ---------- inner: 作品分类 ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.category-grid .category-item {
  border-left-color: var(--tone-category);
}

.category-grid .category-name a {
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.category-grid .category-name a:hover,
.category-grid .category-name a:focus-visible {
  color: var(--tone-category);
  border-bottom-color: var(--tone-category);
}

.category-basis {
  margin-top: 8px;
  padding-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
}

.category-figure {
  margin-top: 28px;
  aspect-ratio: 16 / 7;
}

.difference-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.difference-item {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.difference-title {
  font-size: 17px;
}

.difference-text {
  margin-top: 8px;
  max-width: var(--reading);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.path-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: path;
}

.path-step {
  position: relative;
  padding: 18px 20px 18px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-step::before {
  counter-increment: path;
  content: counter(path, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--tone-detail);
}

.path-title {
  font-size: 17px;
}

.path-text {
  margin-top: 6px;
  max-width: var(--reading);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.related-entry {
  padding-bottom: 0;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.related-list a:hover,
.related-list a:focus-visible {
  border-color: var(--tone-category);
  color: var(--tone-category);
}

/* ---------- inner: 年份归档 ---------- */

.archive-figure {
  margin-bottom: 26px;
  aspect-ratio: 16 / 7;
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: archive;
}

.archive-item {
  position: relative;
}

.archive-item::before {
  counter-increment: archive;
  content: counter(archive, decimal-leading-zero);
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--tone-year);
}

.archive-entry {
  padding: 20px 22px 22px 66px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--tone-year);
  border-radius: var(--radius);
}

.archive-name {
  font-size: 18px;
}

.archive-focus {
  margin-top: 8px;
  max-width: var(--reading);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.archive-scope {
  margin-top: 8px;
  padding-top: 8px;
  max-width: var(--reading);
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
}

.relation-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.relation-col {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.relation-heading {
  font-size: 17px;
}

.relation-points {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.relation-points li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.relation-points li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--tone-year);
  border-radius: 50%;
}

.relation-note {
  margin-top: 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

.path-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: steps;
}

.path-steps .path-step {
  padding: 18px 20px 18px 64px;
}

.path-steps .path-step::before {
  counter-increment: steps;
  content: counter(steps, decimal-leading-zero);
  color: var(--tone-year);
}

.step-action {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.step-result {
  margin-top: 6px;
  max-width: var(--reading);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.next-path-hint {
  margin-top: 20px;
  font-size: 15px;
}

/* ---------- inner: 项目详情 ---------- */

.media-block {
  margin-bottom: 26px;
  aspect-ratio: 16 / 7;
}

.field-dict .field-table {
  min-width: 620px;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rule-item {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--tone-detail);
  border-radius: var(--radius);
}

.rule-title {
  font-size: 17px;
}

.rule-text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  position: relative;
  padding: 18px 20px 18px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-index {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--tone-detail);
}

.step-item .step-title {
  font-size: 17px;
}

.step-text {
  margin-top: 6px;
  max-width: var(--reading);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.step-text a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.step-text a:hover,
.step-text a:focus-visible {
  color: var(--tone-category);
  border-bottom-color: var(--tone-category);
}

/* ---------- inner: 合作方式 ---------- */

.page-figure {
  margin-bottom: 32px;
  aspect-ratio: 16 / 7;
}

.coop-steps .step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.step-block {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--tone-coop);
  border-radius: var(--radius);
}

.step-block .step-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
}

.step-no {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--tone-coop);
}

.step-detail {
  margin: 14px 0 0;
}

.step-detail dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.step-detail dd {
  margin: 4px 0 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.step-detail dd:last-child {
  margin-bottom: 0;
}

.step-detail a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.step-detail a:hover,
.step-detail a:focus-visible {
  color: var(--tone-coop);
  border-bottom-color: var(--tone-coop);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  counter-reset: checklist;
}

.checklist-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px 20px 18px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checklist-item::before {
  counter-increment: checklist;
  content: counter(checklist, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--tone-coop);
}

.checklist-type {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.checklist-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.boundary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
}

.boundary-col {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.subsection-title {
  font-size: 17px;
}

.terms-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: terms;
}

.terms-item {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.terms-item::before {
  counter-increment: terms;
  content: counter(terms);
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: #ffffff;
  background: var(--tone-coop);
  border-radius: 50%;
}

.boundary-text {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.boundary-text a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.boundary-text a:hover,
.boundary-text a:focus-visible {
  color: var(--tone-coop);
  border-bottom-color: var(--tone-coop);
}

.coop-related {
  padding-bottom: 0;
}

.related-item {
  min-width: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0 24px;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(44, 44, 42, 0.08);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
    padding: 0 16px;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .nav-link:hover,
  .nav-link:focus-visible,
  .nav-link.is-current {
    border-bottom-color: transparent;
    border-left-color: var(--tone-category);
    background: var(--surface-alt);
  }

  .hero {
    padding: 40px 0 48px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-media {
    aspect-ratio: 16 / 10;
  }

  .clue-list,
  .notes-media,
  .note-list,
  .rule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coop-columns,
  .coop-steps .step-list,
  .category-grid,
  .relation-columns,
  .boundary-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .header-inner,
  .footer-inner,
  .inner-main,
  .hero-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-nav {
    padding: 0 18px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-slogan {
    font-size: 11px;
  }

  .breadcrumb {
    padding-top: 18px;
    font-size: 13px;
  }

  .page-header {
    padding: 20px 0 30px;
  }

  .page-title,
  .hero-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 20px;
  }

  .section,
  .home-main > section {
    padding: 40px 0;
  }

  .hero {
    padding: 30px 0 38px;
  }

  .hero-eyebrow {
    font-size: 12px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .clue-list,
  .notes-media,
  .note-list,
  .rule-list,
  .category-list,
  .year-list,
  .checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-figure,
  .archive-figure,
  .media-block,
  .page-figure {
    aspect-ratio: 4 / 3;
  }

  .year-item,
  .archive-entry,
  .path-step,
  .path-steps .path-step,
  .step-item,
  .checklist-item {
    padding-left: 56px;
  }

  .field-table {
    min-width: 520px;
    font-size: 14px;
  }

  .field-table th,
  .field-table td {
    padding: 12px 14px;
  }

  .field-table tbody th {
    width: 32%;
  }

  .error-code {
    font-size: 48px;
  }

  .error-block h1 {
    font-size: 24px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 36px;
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
