/* ============================================================
   Alagent 极客玩家 · AI & 机器人知识站（v2）
   设计：米白纸感 + 墨绿 + 科技蓝 + 焦糖橙；支持深色模式
   ============================================================ */
:root {
  --paper: #f7f4ec;
  --paper-2: #fffdf7;
  --paper-3: #efeadd;
  --ink: #13231d;
  --ink-soft: #3d4d45;
  --ink-mute: #6a7a72;
  --green: #1d4b3f;
  --green-deep: #12332b;
  --blue: #2e5bff;
  --blue-deep: #1f3fd0;
  --blue-soft: #e7ecff;
  --amber: #c8692e;
  --amber-soft: #f7e7d9;
  --line: rgba(19, 35, 29, 0.12);
  --line-strong: rgba(19, 35, 29, 0.22);
  --code-bg: #10251f;
  --code-fg: #e7efeb;
  --shadow: 0 30px 70px -46px rgba(18, 51, 43, 0.5);
  --shadow-soft: 0 14px 40px -30px rgba(18, 51, 43, 0.42);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: 1180px;
}
[data-theme="dark"] {
  --paper: #0e1713;
  --paper-2: #14211c;
  --paper-3: #1a2a24;
  --ink: #e9f0ec;
  --ink-soft: #c2d0c9;
  --ink-mute: #8fa199;
  --green: #7fd1b0;
  --green-deep: #d9f2e6;
  --blue: #7d96ff;
  --blue-deep: #a8b8ff;
  --blue-soft: rgba(70, 100, 255, 0.16);
  --amber: #e9a06a;
  --amber-soft: rgba(200, 105, 46, 0.16);
  --line: rgba(233, 240, 236, 0.12);
  --line-strong: rgba(233, 240, 236, 0.24);
  --code-bg: #07110d;
  --shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 16px 40px -30px rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  transition: background-color 0.2s ease, color 0.2s ease;
}
[data-theme="light"] body,
body {
  background-image:
    radial-gradient(circle at 6% -4%, rgba(46, 91, 255, 0.07), transparent 34rem),
    radial-gradient(circle at 100% 12%, rgba(200, 105, 46, 0.06), transparent 30rem);
}
[data-theme="dark"] body { background-image: none; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(46, 91, 255, 0.22); }

.container { width: min(var(--container), calc(100% - 44px)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--green); color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; transition: top 0.2s ease;
}
.skip-link:focus { top: 14px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--green-deep); color: #f7f4ec;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 20px; font-weight: 700;
}
[data-theme="dark"] .brand-mark { background: var(--green); color: #0e1713; }
.brand-copy { display: grid; line-height: 1.25; }
.brand-name { font-weight: 700; letter-spacing: 0.01em; font-size: 15px; }
.brand-tag { font-size: 10px; letter-spacing: 0.18em; color: var(--ink-mute); text-transform: uppercase; }

.site-nav { display: none; align-items: center; gap: 6px; }
.nav-item { position: relative; }
.nav-item > a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 11px; border-radius: 9px;
  font-size: 14.5px; color: var(--ink-soft); text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item > a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav-item > a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.nav-item .caret { width: 9px; height: 9px; opacity: 0.55; }
.nav-menu {
  position: absolute; left: 0; top: calc(100% + 8px);
  min-width: 220px; padding: 8px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu a {
  display: block; padding: 8px 11px; border-radius: 8px;
  text-decoration: none; font-size: 13.5px; color: var(--ink-soft);
}
.nav-menu a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav-menu .menu-label {
  padding: 7px 11px 3px; font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.icon-btn svg { width: 18px; height: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
[data-theme="dark"] .btn-primary { background: var(--blue); color: #081120; }
[data-theme="dark"] .btn-primary:hover { background: #9fb2ff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.menu-toggle { display: inline-flex; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--paper-2); max-height: calc(100vh - 74px); overflow-y: auto; }
.mobile-nav.is-open { display: block; }
.mobile-nav .m-group { padding: 10px 20px 4px; font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-mute); text-transform: uppercase; }
.mobile-nav a { display: block; padding: 11px 20px; text-decoration: none; font-size: 14.5px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; }
@media (min-width: 960px) {
  .site-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- 通用 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue); font-weight: 700; margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--blue); border-radius: 2px; }
.section { padding: clamp(50px, 6.5vw, 86px) 0; }
.section--tint { background: color-mix(in srgb, var(--paper-3) 55%, transparent); }
.section--line { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 40px); }
.section-head.row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-index { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); letter-spacing: 0.08em; display: block; margin-bottom: 8px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--green-deep); line-height: 1.28; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: 0.01em; }
h2 { font-size: clamp(25px, 3.2vw, 34px); }
h3 { font-size: clamp(18px, 1.9vw, 21px); }
.section-title { margin-bottom: 10px; }
.section-lede { color: var(--ink-mute); font-size: 15.5px; margin: 0; max-width: 680px; }
.text-link { color: var(--blue); font-weight: 600; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--blue) 35%, transparent); padding-bottom: 1px; }
.text-link:hover { border-color: var(--blue); }
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(46px, 6vw, 84px) 0 clamp(36px, 4vw, 56px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 28% 18%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 28% 18%, #000 0%, transparent 70%);
}
.hero-inner { position: relative; display: grid; gap: clamp(32px, 5vw, 54px); align-items: center; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy h1 em { font-style: normal; color: var(--amber); position: relative; }
.hero-copy h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 10px; background: color-mix(in srgb, var(--amber) 22%, transparent); z-index: -1; border-radius: 3px; }
.hero-lede { font-size: 16.5px; color: var(--ink-soft); max-width: 580px; margin: 0 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.stat-chip {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  font-size: 12.5px; color: var(--ink-mute);
}
.stat-chip b { font-family: var(--serif); font-size: 18px; color: var(--green-deep); line-height: 1; }
.hero-visual { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; transform: rotate(0.5deg); }
.visual-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.visual-dots { display: inline-flex; gap: 5px; }
.visual-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.visual-dots i:first-child { background: var(--amber); }
.visual-title { font-size: 12px; color: var(--ink-mute); font-family: var(--mono); }
.visual-panel { background: linear-gradient(160deg, #14352c, #0d241f); border-radius: 18px; padding: 18px 16px; color: #eaf1ee; }
[data-theme="dark"] .visual-panel { background: linear-gradient(160deg, #1c3a30, #0d241f); }
.vp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.vp-label { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(234, 241, 238, 0.6); }
.vp-badge { font-size: 10.5px; background: rgba(46, 91, 255, 0.22); border: 1px solid rgba(46, 91, 255, 0.5); color: #b9c8ff; padding: 3px 9px; border-radius: 999px; }
.path-line { display: grid; gap: 8px; }
.path-step { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 11px; padding: 8px 11px; font-size: 12.5px; }
.path-step .step-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); flex-shrink: 0; }
.path-step.done .step-dot { background: #74d3a6; }
.path-step.active { border-color: rgba(46, 91, 255, 0.55); background: rgba(46, 91, 255, 0.16); }
.path-step.active .step-dot { background: #9fb4ff; }
.path-step small { margin-left: auto; color: rgba(234,241,238,0.45); font-size: 10.5px; }
.visual-note { margin-top: 12px; font-size: 11px; color: var(--ink-mute); text-align: center; }
@media (min-width: 980px) { .hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.8fr); gap: 52px; } }

/* ---------- 网格与卡片 ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
@media (max-width: 980px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 21px; box-shadow: var(--shadow-soft); }
a.card, .card--link { text-decoration: none; color: inherit; display: block; transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
a.card:hover, .card--link:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.entry-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.entry-card .entry-num { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.1em; }
.entry-card h3 { font-size: 19px; }
.entry-card p { margin: 0; font-size: 13.5px; color: var(--ink-mute); }
.entry-card .entry-arrow { margin-top: auto; padding-top: 8px; color: var(--blue); font-size: 13px; font-weight: 600; }
.icon-chip { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex-shrink: 0; }
.icon-chip svg { width: 21px; height: 21px; }
.icon-chip.amber { background: var(--amber-soft); color: var(--amber); }
.icon-chip.green { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }

.path-card { display: flex; flex-direction: column; gap: 8px; padding: 21px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: transform 0.16s ease, border-color 0.16s ease; }
.path-card::after { content: ""; position: absolute; right: -42px; top: -42px; width: 108px; height: 108px; border-radius: 50%; background: var(--blue-soft); opacity: 0.65; }
.path-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.path-card .path-level { font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-mute); text-transform: uppercase; }
.path-card h3 { position: relative; z-index: 1; font-size: 19px; }
.path-card p { margin: 0; font-size: 13px; color: var(--ink-mute); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.chip--blue { background: var(--blue-soft); color: var(--blue); }
.chip--amber { background: var(--amber-soft); color: var(--amber); }
.chip--green { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.article-card { display: flex; flex-direction: column; gap: 9px; padding: 21px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; color: inherit; transition: transform 0.16s ease, border-color 0.16s ease; }
.article-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.article-card h3 { font-size: 19px; line-height: 1.45; font-family: var(--sans); font-weight: 700; color: var(--green-deep); }
.article-card p { margin: 0; font-size: 13.5px; color: var(--ink-mute); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-mute); }
.article-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink-mute); }
.article-foot .read { color: var(--blue); font-weight: 600; }

.topic-card { display: flex; flex-direction: column; gap: 7px; padding: 19px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; transition: transform 0.16s ease, border-color 0.16s ease; }
.topic-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.topic-card .topic-mark { font-family: var(--serif); font-size: 26px; color: var(--blue); line-height: 1; }
.topic-card h3 { font-size: 17px; }
.topic-card p { margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.kb-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; transition: border-color 0.16s ease, transform 0.16s ease; }
.kb-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kb-card .kb-text { display: grid; gap: 1px; }
.kb-card b { font-size: 15px; color: var(--green-deep); }
.kb-card span { font-size: 12px; color: var(--ink-mute); }
.kb-card .kb-count { margin-left: auto; font-family: var(--serif); font-size: 22px; color: var(--blue); }

/* ---------- 列表行（资源/论文/术语） ---------- */
.filter-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 10px; }
.filter-toolbar .search-input { flex: 1 1 260px; min-width: 220px; }
.filter-toolbar select { flex: 0 0 auto; }
.search-input, select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; outline: none;
}
.search-input { width: 100%; }
.search-input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.filter-btn { font: inherit; font-size: 12.5px; cursor: pointer; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); border-radius: 999px; padding: 6px 13px; }
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }
[data-theme="dark"] .filter-btn.is-active { background: var(--blue); border-color: var(--blue); color: #081120; }
.result-count { font-size: 12.5px; color: var(--ink-mute); margin: 6px 0 16px; }
.list { display: grid; gap: 9px; }
.res-row, .paper-row {
  display: block; padding: 15px 17px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 13px; text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.res-row:hover, .paper-row:hover { border-color: color-mix(in srgb, var(--blue) 45%, transparent); transform: translateY(-1px); }
.row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-name { font-weight: 700; font-size: 15px; color: var(--green-deep); }
.row-name .ext { font-size: 11px; color: var(--ink-mute); margin-left: 6px; }
.row-note { margin: 5px 0 0; font-size: 13px; color: var(--ink-mute); }
.row-flags { display: flex; gap: 5px; flex-wrap: wrap; }
.flag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink-soft); white-space: nowrap; }
.flag.blue { background: var(--blue-soft); color: var(--blue); }
.flag.amber { background: var(--amber-soft); color: var(--amber); }
.flag.green { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.load-more { display: inline-flex; margin: 20px auto 0; }
.list-foot { text-align: center; }
.empty-note { padding: 30px; text-align: center; color: var(--ink-mute); font-size: 14px; }

.term-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.term-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px; }
.term-card h3 { font-size: 17px; margin-bottom: 1px; }
.term-card .term-en { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); display: block; margin-bottom: 7px; }
.term-card p { margin: 0; font-size: 13.2px; color: var(--ink-soft); }
.term-card .chip-row { margin-top: 9px; }

/* ---------- 文章页 ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--ink-mute); padding: 18px 0 0; align-items: center; }
.breadcrumb a { color: var(--ink-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { opacity: 0.5; }
.article-hero { padding: 16px 0 26px; border-bottom: 1px solid var(--line); }
.article-hero h1 { font-size: clamp(30px, 4.2vw, 44px); margin: 10px 0 12px; max-width: 900px; }
.article-desc { color: var(--ink-mute); font-size: 16.5px; max-width: 780px; margin: 0; }
.article-layout { display: grid; gap: 32px; padding: 30px 0 56px; align-items: start; }
.article-body { max-width: 780px; font-size: 16.5px; color: var(--ink-soft); }
.article-body h2 { font-size: clamp(23px, 2.5vw, 28px); margin: 40px 0 12px; scroll-margin-top: 96px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 19px; margin: 26px 0 9px; scroll-margin-top: 96px; }
.article-body p { margin: 0 0 15px; }
.article-body ul, .article-body ol { margin: 0 0 17px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--green-deep); }
.article-body a { color: var(--blue); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); }
.article-body a:hover { border-color: var(--blue); }
.article-body blockquote { margin: 20px 0; padding: 13px 18px; border-left: 3px solid var(--blue); background: color-mix(in srgb, var(--blue) 6%, transparent); border-radius: 0 12px 12px 0; color: var(--ink-soft); }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code { font-family: var(--mono); font-size: 0.86em; background: color-mix(in srgb, var(--ink) 7%, transparent); padding: 2px 6px; border-radius: 6px; }
.article-body pre { background: var(--code-bg); color: var(--code-fg); padding: 17px; border-radius: 13px; overflow-x: auto; margin: 18px 0; font-size: 13.4px; line-height: 1.65; }
.article-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.article-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.article-body th { background: color-mix(in srgb, var(--ink) 5%, transparent); font-weight: 700; color: var(--green-deep); }
.article-body .callout { background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 22%, transparent); border-radius: 13px; padding: 13px 17px; margin: 18px 0; font-size: 14.5px; }
.article-body .callout--warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 28%, transparent); }
.article-body .callout p:last-child { margin-bottom: 0; }
.article-sources { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-sources h2 { font-size: 20px !important; margin: 0 0 8px; }
.article-sources ul { font-size: 14px; }
.article-sources li { margin-bottom: 5px; }
.article-pager { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 34px; }
.pager-card { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; text-decoration: none; color: inherit; background: var(--paper-2); }
.pager-card:hover { border-color: var(--line-strong); }
.pager-card span { display: block; font-size: 11px; color: var(--ink-mute); margin-bottom: 4px; }
.pager-card b { font-size: 14px; color: var(--green-deep); font-weight: 600; }
.article-aside { display: grid; gap: 14px; }
.aside-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.aside-card h3 { font-size: 16px; margin-bottom: 8px; }
.aside-card p { font-size: 13px; color: var(--ink-mute); margin: 0 0 10px; }
.aside-card .toc { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.aside-card .toc li { margin-bottom: 6px; }
.aside-card .toc a { color: var(--ink-soft); text-decoration: none; }
.aside-card .toc a:hover { color: var(--blue); }
.aside-card .toc .toc-h3 { padding-left: 12px; font-size: 12.5px; }
.article-cta { margin-top: 36px; background: linear-gradient(135deg, #12332b, #1d4b3f); color: #eef4f1; border-radius: 16px; padding: 22px; }
.article-cta h3 { color: #fff; font-size: 19px; margin-bottom: 5px; }
.article-cta p { color: rgba(238,244,241,0.75); font-size: 13.5px; margin: 0 0 12px; }
.article-cta .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.article-cta .btn-ghost:hover { background: rgba(255,255,255,0.1); }
.read-progress { position: fixed; top: 0; left: 0; z-index: 150; height: 3px; width: 0; background: linear-gradient(90deg, var(--blue), var(--amber)); transition: width 0.08s linear; }
@media (min-width: 1020px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 50px; }
  .article-aside { position: sticky; top: 96px; }
}

/* ---------- 路径页 ---------- */
.page-hero { padding: clamp(36px, 5vw, 64px) 0 24px; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lede { color: var(--ink-mute); font-size: 17px; max-width: 760px; margin: 0; }
.path-detail { border-top: 1px solid var(--line); padding: clamp(34px, 5vw, 54px) 0; }
.path-detail:first-of-type { border-top: 0; }
.path-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.path-detail h2 { font-size: clamp(25px, 3vw, 33px); margin-bottom: 6px; }
.path-sub { color: var(--ink-mute); font-size: 15px; max-width: 780px; margin: 0 0 18px; }
.path-overview { max-width: 820px; font-size: 15px; color: var(--ink-soft); margin: 0 0 20px; }
.stage-list { display: grid; gap: 12px; }
.stage { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 13px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; }
.stage-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-family: var(--serif); font-weight: 700; font-size: 16px; }
.stage-body h4 { font-size: 16.5px; margin-bottom: 2px; font-family: var(--sans); color: var(--green-deep); }
.stage-weeks { font-size: 11.5px; color: var(--ink-mute); display: block; margin-bottom: 6px; }
.stage-body p { margin: 0 0 4px; font-size: 13.4px; color: var(--ink-mute); }
.stage-body ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.4px; color: var(--ink-soft); }
.stage-body li { margin-bottom: 2px; }
.stage-res { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.stage-res a { font-size: 12px; text-decoration: none; color: var(--blue); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); padding: 2px 8px; border-radius: 999px; }
.stage-res a:hover { background: var(--blue-soft); }
.stage-foot { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; }
.stage-foot .sf { background: color-mix(in srgb, var(--green) 6%, transparent); border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; padding: 7px 11px; color: var(--ink-soft); }
.pitfalls { margin-top: 18px; }
.pitfalls h3 { font-size: 17px; margin-bottom: 8px; }
.pitfalls ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-soft); }
.path-aside { display: grid; gap: 14px; }
@media (min-width: 1020px) {
  .path-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px; align-items: start; }
  .path-aside { position: sticky; top: 96px; }
}

/* ---------- 专题页 ---------- */
.topic-hero { padding: clamp(34px, 5vw, 56px) 0 26px; border-bottom: 1px solid var(--line); }
.topic-body { max-width: 820px; font-size: 16px; color: var(--ink-soft); }
.topic-body h2 { font-size: 25px; margin: 32px 0 10px; }
.topic-body p { margin: 0 0 14px; }
.topic-body ul { padding-left: 22px; margin: 0 0 14px; }
.topic-body .callout { background: var(--blue-soft); border-radius: 13px; padding: 13px 17px; margin: 18px 0; font-size: 14.5px; }
.topic-questions { display: grid; gap: 8px; margin: 16px 0 26px; padding: 0; list-style: none; }
.topic-questions li { background: var(--paper-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-soft); }
.topic-layout { display: grid; gap: 32px; padding: 28px 0 52px; align-items: start; }
@media (min-width: 1020px) { .topic-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 46px; } }
.related-topics { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- 关于/加入/搜索 ---------- */
.prose { max-width: 780px; font-size: 16px; color: var(--ink-soft); }
.prose h2 { font-size: 25px; margin: 32px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 15px; }
.principles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 20px 0; }
.principle { background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; }
.principle b { display: block; font-family: var(--serif); color: var(--green-deep); font-size: 16.5px; margin-bottom: 3px; }
.principle span { font-size: 13px; color: var(--ink-mute); }
.form-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow-soft); }
.field { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; padding-top: 9px; }
.field .req { color: var(--amber); }
input[type="text"], textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; outline: none; }
textarea { resize: vertical; min-height: 84px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.feedback { min-height: 22px; font-size: 13px; color: var(--blue); margin: 9px 0 0; }
.preview-box { width: 100%; min-height: 170px; margin-top: 6px; background: color-mix(in srgb, var(--paper-3) 60%, transparent); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.wechat-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--green-deep); color: #eef4f1; border-radius: 15px; padding: 13px 17px; margin-top: 8px; }
[data-theme="dark"] .wechat-copy { background: #1c3a30; }
.wechat-copy .wx-id { font-family: var(--mono); font-weight: 700; letter-spacing: 0.02em; }
.wechat-copy button { font: inherit; font-size: 13px; font-weight: 600; background: var(--amber); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
@media (max-width: 700px) { .field { grid-template-columns: 1fr; gap: 6px; } .field label { padding-top: 0; } }

.search-panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-soft); }
.search-panel .big-search { display: flex; gap: 10px; }
.search-panel .big-search input { font-size: 16px; padding: 13px 15px; }
.search-hint { font-size: 12.5px; color: var(--ink-mute); margin: 10px 0 0; }
.search-results { display: grid; gap: 9px; margin-top: 18px; }
.search-result { display: block; padding: 13px 15px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.search-result:hover { border-color: var(--line-strong); }
.search-result .sr-type { font-size: 10.5px; color: var(--blue); letter-spacing: 0.08em; text-transform: uppercase; }
.search-result b { display: block; font-size: 15px; color: var(--green-deep); margin: 2px 0; }
.search-result p { margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }

/* ---------- CTA / 页脚 ---------- */
.cta-band { background: linear-gradient(135deg, #12332b 0%, #1d4b3f 55%, #24406b 100%); color: #eef4f1; border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px; align-items: center; }
.cta-band h2 { color: #fff; font-size: clamp(23px, 3vw, 30px); margin-bottom: 5px; }
.cta-band p { color: rgba(238,244,241,0.75); margin: 0; font-size: 14.5px; max-width: 640px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn-primary { background: var(--amber); }
.cta-band .btn-primary:hover { background: #b25a24; }
@media (min-width: 880px) { .cta-band { grid-template-columns: minmax(0, 1.4fr) auto; } }
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 40px; background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
.footer-brand p { color: var(--ink-mute); font-size: 13.2px; max-width: 340px; margin: 10px 0 0; }
.footer-col h4 { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 9px; }
.footer-col a { display: block; text-decoration: none; color: var(--ink-mute); font-size: 13px; padding: 3px 0; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: var(--ink-mute); font-size: 12px; }
.footer-bottom a { color: var(--ink-mute); text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.footer-bottom a:hover { color: var(--green); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 杂项 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.related-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
