:root {
  color-scheme: light;
  --paper: #f7f1e4;
  --paper-2: #efe3cf;
  --ink: #1f2724;
  --muted: #66716c;
  --soft: #89928c;
  --line: rgba(31, 39, 36, 0.14);
  --line-strong: rgba(31, 39, 36, 0.24);
  --green: #196b52;
  --teal: #138d8a;
  --rust: #b35a35;
  --gold: #c19732;
  --blue: #315c8c;
  --panel: rgba(255, 252, 245, 0.72);
  --panel-solid: #fffaf0;
  --shadow: 0 22px 70px rgba(46, 35, 21, 0.12);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1180px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(31, 39, 36, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(31, 39, 36, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(19, 141, 138, 0.18), transparent 32rem),
    radial-gradient(circle at 92% 20%, rgba(193, 151, 50, 0.18), transparent 32rem),
    linear-gradient(135deg, var(--paper), #fbf7ed 46%, var(--paper-2));
  background-size: 38px 38px, 38px 38px, auto, auto, auto;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.72;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 241, 228, 0.35), rgba(247, 241, 228, 0.88));
  content: "";
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  width: min(var(--max), calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 14px auto 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 10px 40px rgba(46, 35, 21, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(25, 107, 82, 0.34);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(25, 107, 82, 0.14), rgba(255, 250, 240, 0.9));
  color: var(--green);
  font-family: Georgia, serif;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 0.95rem;
}

.brand-copy em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 160ms ease, color 160ms ease;
}

.site-nav a:hover {
  background: rgba(25, 107, 82, 0.08);
  color: var(--green);
}

.site-nav a.is-active {
  background: rgba(25, 107, 82, 0.12);
  color: var(--green);
}

.nav-toggle {
  display: none;
}

.hero,
.section,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.hero {
  display: grid;
  min-height: calc(100vh - 74px);
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.42fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(56px, 9vw, 120px) 0 70px;
}

.eyebrow,
.topic-label,
.method-card span,
.note-card span,
.map-card span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(4.2rem, 12vw, 8.8rem);
  line-height: 0.98;
}

.lead {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 20px;
  background: rgba(255, 250, 240, 0.55);
  color: var(--ink);
  font-weight: 800;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fffaf0;
}

.back-link,
.read-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--green);
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: 18px;
  background:
    radial-gradient(circle at 18% 10%, rgba(19, 141, 138, 0.18), transparent 44%),
    radial-gradient(circle at 88% 90%, rgba(179, 90, 53, 0.14), transparent 44%),
    var(--panel);
  box-shadow: var(--shadow);
}

.signal-row {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 14px 10px 16px;
}

.signal-row:last-child {
  border-bottom: 0;
}

.signal-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.signal-row strong {
  color: var(--ink);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-head {
  display: grid;
  max-width: 860px;
  gap: 14px;
  margin-bottom: 34px;
}

.section h2 {
  max-width: 13ch;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 1.05;
}

.section-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.map-grid,
.note-grid,
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.map-card,
.note-card,
.method-card,
.path-grid article,
.about-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 48px rgba(46, 35, 21, 0.08);
}

.map-card {
  min-height: 230px;
  padding: 22px;
}

.map-card h3,
.topic-card h3,
.note-card h3,
.method-card h3,
.path-grid h3 {
  margin: 12px 0 8px;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.18;
}

.map-card p,
.topic-card p,
.note-card p,
.method-card p,
.path-grid p,
.about-panel p {
  margin: 0;
  color: var(--muted);
}

.topic-list {
  display: grid;
  gap: 18px;
}

.topic-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(22px, 4vw, 38px);
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.86), rgba(247, 241, 228, 0.58));
}

.topic-card ul,
.note-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 250, 240, 0.6);
  color: var(--muted);
  cursor: pointer;
}

.filter.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fffaf0;
}

.search-wrap {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.search-wrap label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  background: rgba(255, 250, 240, 0.72);
  color: var(--ink);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(25, 107, 82, 0.1);
}

.note-card {
  display: grid;
  min-height: 340px;
  align-content: start;
  gap: 12px;
  padding: 22px;
}

.note-card h3 {
  margin-top: 0;
}

.note-meta {
  color: var(--soft);
  font-weight: 800;
}

.note-card.is-hidden {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(255, 250, 240, 0.5);
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.article-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 88px) 0 70px;
}

.article-page {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(22px, 5vw, 58px);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--shadow);
}

.article-page h1 {
  max-width: 12ch;
  margin: 12px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.article-description {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
}

.article-meta,
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.article-meta span,
.article-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 252, 245, 0.66);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.source-note {
  margin-top: 22px;
  border: 1px solid rgba(25, 107, 82, 0.2);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(25, 107, 82, 0.07);
}

.source-note:empty {
  display: none;
}

.source-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
}

.source-note p {
  margin: 0;
  color: var(--muted);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.24fr) minmax(0, 0.76fr);
  gap: clamp(26px, 5vw, 64px);
  margin-top: clamp(34px, 6vw, 72px);
}

.article-toc {
  position: sticky;
  top: 104px;
  align-self: start;
  border-left: 3px solid rgba(25, 107, 82, 0.24);
  padding-left: 16px;
}

.article-toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
}

.article-toc nav {
  display: grid;
  gap: 8px;
}

.article-toc a {
  color: var(--muted);
  font-size: 0.92rem;
}

.article-content {
  display: grid;
  gap: clamp(30px, 5vw, 54px);
  min-width: 0;
}

.article-section {
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 4vw, 38px);
}

.article-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.article-section h2 {
  max-width: 16ch;
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.12;
}

.article-section p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.article-section p + p {
  margin-top: 14px;
}

.article-section ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  border-radius: var(--radius);
  padding: 20px 20px 20px 38px;
  background: rgba(25, 107, 82, 0.07);
  color: var(--ink);
}

.related-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(20px, 5vw, 54px);
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
  background: var(--panel);
}

.related-panel h2 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: grid;
  min-height: 160px;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: rgba(255, 250, 240, 0.62);
}

.related-card span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
}

.related-card strong {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.2;
}

.related-card em {
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
}

.method-layout {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.method-card {
  min-height: 280px;
  padding: 22px;
  background: var(--panel-solid);
}

.path-grid article {
  padding: 24px;
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(24px, 5vw, 56px);
}

.about-panel p + p {
  margin-top: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 34px 0 48px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    border-radius: var(--radius);
  }

  .nav-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 250, 240, 0.72);
  }

  .nav-toggle span {
    width: 16px;
    height: 2px;
    background: var(--ink);
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .site-header.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: rgba(255, 250, 240, 0.95);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .hero,
  .topic-card,
  .about-panel,
  .article-layout,
  .related-panel {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
  }

  .map-grid,
  .note-grid,
  .path-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(100% - 22px, var(--max));
  }

  .brand-copy em {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 16vw, 5rem);
  }

  .map-grid,
  .note-grid,
  .path-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-shell {
    width: min(100% - 22px, var(--max));
  }

  .article-page {
    padding: 20px;
  }

  .article-page h1 {
    font-size: clamp(2.6rem, 13vw, 4.6rem);
  }

  .topic-card {
    padding: 20px;
  }

  .site-footer {
    flex-direction: column;
  }
}
