/* 独立 HTML 版本样式："Claude 风格"——暖白背景 + 赤陶橙点缀，安静耐读 */

:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --text: #3d3929;
  --text-light: #6b6656;
  --text-lighter: #948f7c;
  --border: #e8e6dc;
  --accent: #c96442;
  --accent-ink: #a34e30;
  --code-bg: #f0eee6;
  --shadow-sm: 0 1px 2px rgba(61, 57, 41, 0.05), 0 2px 8px rgba(61, 57, 41, 0.04);

  --font-body: "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------------- 左侧目录 ---------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  flex: none;
  overflow-y: auto;
  padding: 32px 20px 40px 28px;
  font-family: var(--font-heading);
  border-right: 1px solid var(--border);
}
.sidebar .brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.sidebar .brand-sub {
  font-size: 11px;
  color: var(--text-lighter);
  margin-bottom: 24px;
}
.sidebar .part-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 20px 0 6px;
}
.sidebar .part-label:first-of-type { margin-top: 0; }
.sidebar a {
  display: block;
  font-size: 12.5px;
  color: var(--text-light);
  text-decoration: none;
  padding: 4px 0 4px 10px;
  border-left: 2px solid transparent;
  line-height: 1.5;
}
.sidebar a:hover,
.sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ---------------- 正文 ---------------- */
.content {
  flex: 1;
  min-width: 0;
  max-width: 760px;
  padding: 56px 48px 120px;
}

.hero {
  margin-bottom: 64px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.hero .kicker {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 14px;
  color: #221f18;
}
.hero .subtitle {
  font-size: 16px;
  color: var(--text-light);
  max-width: 56ch;
  font-family: var(--font-body);
}
.hero .meta {
  margin-top: 24px;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-lighter);
}

/* ---------------- 首屏 landing 卡片网格 ---------------- */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.landing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.landing-card .lc-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: #221f18;
  margin-bottom: 4px;
}
.landing-card .lc-desc {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.6;
}
.landing-card .lc-links {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.landing-card .lc-links a {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  padding: 3px 0;
}
.landing-card .lc-links a:hover { color: var(--accent); }
.landing-card .lc-links .lc-num {
  font-family: var(--font-code);
  color: var(--accent);
  margin-right: 6px;
}
.landing-divider {
  height: 1px;
  background: var(--border);
  margin: 56px 0;
}
@media (max-width: 600px) {
  .landing-grid { grid-template-columns: 1fr; }
}

/* ---------------- 能力清单网格 ---------------- */
.features-heading {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-lighter);
  margin: 8px 0 14px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}
.feature-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s;
}
.feature-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.feature-item .fi-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12.5px;
  color: #221f18;
  margin-bottom: 4px;
}
.feature-item .fi-desc {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.55;
}
@media (max-width: 700px) {
  .features-grid { grid-template-columns: 1fr; }
}

.part-divider {
  margin: 90px 0 40px;
  padding-top: 8px;
}
.part-divider .part-kicker {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.part-divider h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin: 8px 0 6px;
  color: #221f18;
}
.part-divider p {
  color: var(--text-light);
  font-family: var(--font-body);
  margin: 0;
}

.chapter {
  margin-bottom: 76px;
  scroll-margin-top: 24px;
}
.chapter .chapter-kicker {
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.chapter h1.chapter-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  color: #221f18;
  line-height: 1.35;
}
.chapter h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-ink);
  margin: 2em 0 0.7em;
}
.chapter h3 {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: #221f18;
  margin: 1.6em 0 0.5em;
}
.chapter p { margin: 0 0 1em; text-align: justify; }
.chapter ul, .chapter ol { margin: 0 0 1em; padding-left: 1.5em; }
.chapter li { margin-bottom: 0.4em; }
.chapter strong { color: #221f18; font-weight: 700; }
.chapter a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(201,100,66,0.35); }

.chapter pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 1.1em;
  box-shadow: var(--shadow-sm);
}
.chapter code {
  font-family: var(--font-code);
}
.chapter p code, .chapter li code, .chapter td code {
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 90%;
  color: var(--accent-ink);
}
.chapter pre code {
  background: none;
  padding: 0;
  color: #2b2b2b;
}

.chapter table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.1em;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.chapter th, .chapter td {
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.chapter th {
  background: var(--surface-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12.5px;
}

.chapter .admonition {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 1.1em;
  font-size: 14px;
}
.chapter .admonition-title {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 4px;
}
.chapter blockquote {
  border-left: 2px solid var(--text-lighter);
  margin: 0 0 1.1em;
  padding: 0 16px;
  color: var(--text-light);
}

.footer-note {
  margin-top: 100px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-lighter);
  text-align: center;
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .content { padding: 32px 24px 80px; max-width: 100%; }
}
