:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #19211d;
  --muted: #64706a;
  --line: #dfe5de;
  --accent: #2f7d62;
  --accent-strong: #1d5d49;
  --warm: #d96c32;
  --soft: #edf5f1;
  --shadow: 0 18px 50px rgba(34, 48, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  background: #eef2ee;
  border: 1px solid #dbe2dc;
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  font-size: 0.92em;
}

pre {
  overflow: auto;
  background: #17231e;
  color: #edf6ef;
  border-radius: 8px;
  padding: 1rem;
}

pre code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 0.98rem;
}

.brand span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: var(--ink);
  border-radius: 7px;
  padding: 9px 10px;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-strong);
  background: var(--soft);
  text-decoration: none;
}

.side-note {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.side-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.main {
  min-width: 0;
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  min-height: 430px;
  padding: 48px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(47, 125, 98, 0.92), rgba(25, 33, 29, 0.9)),
    url("./assets/hero.svg");
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.08;
}

.hero p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd3b9;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.button.primary {
  background: #fff;
  color: var(--accent-strong);
  border-color: #fff;
}

.button.small {
  min-height: 38px;
  font-size: 0.9rem;
}

.hero-panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-radius: 8px;
  padding: 22px;
}

.panel-title {
  color: var(--accent-strong);
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-panel ol {
  margin: 0;
  padding-left: 22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  font-size: 1.5rem;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(34, 48, 40, 0.04);
}

.section-head {
  max-width: 860px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.section-head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfa;
}

.timeline span {
  color: var(--warm);
  font-weight: 800;
  font-size: 0.86rem;
}

.timeline h3 {
  margin: 8px 0 6px;
}

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

.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
}

.toc {
  position: sticky;
  top: 22px;
  align-self: start;
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-right: 1px solid var(--line);
  padding-right: 12px;
}

.toc a {
  display: block;
  color: var(--muted);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.toc a:hover {
  color: var(--accent-strong);
  background: var(--soft);
  text-decoration: none;
}

.toc .level-1 {
  font-weight: 800;
  color: var(--ink);
}

.toc .level-3 {
  padding-left: 18px;
}

.toc .level-4 {
  padding-left: 30px;
  font-size: 0.84rem;
}

.document {
  max-width: 980px;
}

.document h1,
.document h2,
.document h3,
.document h4 {
  scroll-margin-top: 24px;
  line-height: 1.25;
}

.document h1 {
  font-size: 2.2rem;
}

.document h2 {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.document p,
.document li {
  color: #34413b;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar input {
  width: min(520px, 100%);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  font: inherit;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 0.93rem;
}

th {
  position: sticky;
  top: 0;
  background: #edf5f1;
  color: #20382f;
  z-index: 1;
}

tbody tr:hover {
  background: #fbfcfa;
}

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

.download-grid a {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  font-weight: 800;
}

.download-grid a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.deploy-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfa;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: relative;
    top: auto;
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
  }

  .metric-grid,
  .timeline,
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main {
    padding: 14px;
  }

  .hero,
  .section {
    padding: 20px;
  }

  .nav,
  .metric-grid,
  .timeline,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
