:root {
  --bg: #f5f7f2;
  --paper: #fffef8;
  --ink: #172027;
  --muted: #4d5b66;
  --line: #ccd6d0;
  --accent: #087f6b;
  --accent-2: #d96c06;
  --shadow: 0 14px 44px rgba(14, 35, 29, 0.13);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: linear-gradient(150deg, #edf4ef 0%, #f9f7ef 48%, #f7efe6 100%);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  line-height: 1.62;
}

body {
  position: relative;
  padding: 28px 18px 42px;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(0.5px);
  pointer-events: none;
}

.bg-shape-a {
  width: 440px;
  height: 440px;
  top: -130px;
  right: -140px;
  background: radial-gradient(circle at 35% 35%, rgba(8, 127, 107, 0.28), rgba(8, 127, 107, 0));
}

.bg-shape-b {
  width: 380px;
  height: 380px;
  bottom: -120px;
  left: -130px;
  background: radial-gradient(circle at 65% 45%, rgba(217, 108, 6, 0.24), rgba(217, 108, 6, 0));
}

.site-header,
.toc,
.panel,
.site-footer {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(140deg, #fefef9 0%, #f2faf7 60%, #fcf5e8 100%);
  border: 1px solid #d8e5de;
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 36px 28px 26px;
  animation: rise 0.5s ease-out both;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  color: var(--accent);
}

h1 {
  margin: 6px 0 8px;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.22;
}

.lead {
  margin: 0;
  font-size: 1.04rem;
  color: #1b2831;
}

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

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #087f6b, #0d9a83);
  box-shadow: 0 8px 20px rgba(8, 127, 107, 0.25);
}

.btn-ghost {
  color: var(--accent);
  border-color: rgba(8, 127, 107, 0.35);
  background: rgba(255, 255, 255, 0.75);
}

.path-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.toc {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  backdrop-filter: blur(2px);
}

.toc a {
  text-decoration: none;
  color: #24414f;
  font-size: 0.93rem;
  padding: 4px 8px;
  border-radius: 8px;
}

.toc a:hover,
.toc a.active {
  background: rgba(8, 127, 107, 0.12);
  color: #0d6959;
}

main {
  max-width: 1080px;
  margin: 16px auto 0;
}

.panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: 0 8px 20px rgba(20, 33, 29, 0.06);
  animation: rise 0.5s ease-out both;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 1.48rem;
}

.panel h3 {
  margin: 10px 0 8px;
  font-size: 1.07rem;
}

.sub {
  margin-top: -2px;
  color: var(--muted);
}

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

.card,
.timeline > div,
.grid-2 > article {
  border: 1px solid #d8e1dc;
  border-radius: 12px;
  background: #fffcf5;
  padding: 12px 13px;
}

.callout {
  border-left: 4px solid var(--accent-2);
  background: rgba(217, 108, 6, 0.09);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
}

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

ul,
ol {
  margin: 8px 0 0;
  padding-left: 18px;
}

pre {
  margin: 10px 0 8px;
  background: #111a20;
  color: #d8eff9;
  border-radius: 12px;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid #2d4b59;
}

code {
  font-family: "IBM Plex Mono", "JetBrains Mono", monospace;
}

.copy-btn {
  border: 1px solid rgba(8, 127, 107, 0.35);
  background: #ecfffa;
  color: #075e50;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn.copied {
  background: #087f6b;
  color: #ffffff;
}

.site-footer {
  margin-top: 16px;
  padding: 16px 4px 4px;
  color: #41505a;
  font-size: 0.93rem;
}

.site-footer p {
  margin: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .grid-2,
  .timeline {
    grid-template-columns: 1fr;
  }

  body {
    padding: 16px 12px 28px;
  }

  .site-header {
    padding: 24px 16px 18px;
  }

  .panel {
    padding: 16px 14px;
  }
}
