/* ===== 工程师 AI 技能实战库 ===== */
:root {
  --es-bg: var(--bg-primary, #000);
  --es-card: var(--bg-secondary, #16181c);
  --es-card-2: color-mix(in srgb, var(--es-card) 88%, var(--es-fg) 12%);
  --es-line: var(--border-color, #2f3336);
  --es-line-2: color-mix(in srgb, var(--es-fg, #e7e9ea) 16%, transparent);
  --es-fg: var(--text-primary, #e7e9ea);
  --es-sub: color-mix(in srgb, var(--es-fg) 68%, transparent);
  --es-faint: #9aa4af;
  --es-accent: var(--accent, #1d9bf0);
  --es-accent-soft: color-mix(in srgb, var(--es-accent) 14%, transparent);
  --es-ok: #3fb950;
  --es-ok-soft: color-mix(in srgb, #3fb950 15%, transparent);
  --es-warn: #d29922;
  --es-warn-soft: color-mix(in srgb, #d29922 15%, transparent);
  --es-err: #f85149;
  --es-err-soft: color-mix(in srgb, #f85149 14%, transparent);
  --es-purple: #a371f7;
  --es-purple-soft: color-mix(in srgb, #a371f7 15%, transparent);
  --es-code-bg: #0d1117;
  --es-r-lg: 16px;
  --es-r-md: 12px;
  --es-r-sm: 8px;
  --es-shadow: 0 4px 20px rgba(0, 0, 0, .10);
  --es-shadow-lg: 0 18px 50px rgba(0, 0, 0, .28);
  --es-zebra: rgba(127, 127, 127, .055);
}
[data-theme="light"] {
  --es-faint: #5c6672;
  --es-ok: #1a7f37;
  --es-warn: #9a6700;
  --es-err: #cf222e;
  --es-purple: #8250df;
  --es-line-2: rgba(15, 20, 25, .16);
  --es-zebra: rgba(15, 20, 25, .038);
  --es-code-bg: #f6f8fa;
  --es-shadow: 0 4px 20px rgba(15, 20, 25, .07);
}

/* 站点 body 默认 overflow-y:scroll 会让页内 sticky 失效，把滚动权交还 html */
body.page-engineer-skills-full { overflow: visible; }
body.page-engineer-skills-full .app,
body.page-engineer-skills-full .main-content,
body.page-engineer-skills-full .page-container { max-width: 100%; width: 100%; border-right: 0; }

.es { max-width: 100%; margin: 0; padding: 20px 26px 72px; color: var(--es-fg); box-sizing: border-box; }
.es *, .es *::before, .es *::after { box-sizing: border-box; }
.es [hidden] { display: none !important; }
.es a { color: var(--es-accent); text-decoration: none; }
.es a:hover { text-decoration: underline; }
.es :focus-visible { outline: 2px solid var(--es-accent); outline-offset: 2px; }
.es h1, .es h2, .es h3, .es h4, .es p { margin-top: 0; }
.es button, .es input, .es select { font-family: inherit; }
.es-btn, .es-chip, .es-tab, .es-subtab, .es-link, .es-fold-btn, .es-search-clr { cursor: pointer; }
.es-btn { border: 1px solid var(--es-line-2); background: var(--es-card-2); color: var(--es-fg); padding: 8px 14px; border-radius: var(--es-r-sm); font-size: 13px; min-height: 36px; transition: background .16s, border-color .16s, transform .16s; }
.es-btn:hover { background: var(--es-accent-soft); border-color: var(--es-accent); }
.es-btn-pri { background: var(--es-accent); border-color: var(--es-accent); color: #fff; font-weight: 600; }
.es-btn-pri:hover { filter: brightness(1.08); background: var(--es-accent); }
.es-btn-sm { padding: 4px 10px; min-height: 30px; font-size: 12px; }
.es-link { border: 0; background: transparent; color: var(--es-accent); font-size: 12.5px; padding: 4px 6px; border-radius: 6px; }
.es-link:hover { background: var(--es-accent-soft); }
.es-hint { color: var(--es-faint); font-size: 12px; line-height: 1.65; margin: 6px 0 0; }
.es-select, .es-search, .es-input { border: 1px solid var(--es-line-2); background: var(--es-card); color: var(--es-fg); border-radius: var(--es-r-sm); padding: 8px 10px; font-size: 13px; min-height: 36px; outline: none; }
.es-select:focus, .es-search:focus, .es-input:focus { border-color: var(--es-accent); box-shadow: 0 0 0 3px var(--es-accent-soft); }
.es-code { background: var(--es-code-bg); border: 1px solid var(--es-line); border-radius: var(--es-r-sm); padding: 12px 14px; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--es-fg); margin: 0; max-height: 320px; overflow-y: auto; }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---------- Hero ---------- */
.es-hero { position: relative; background: linear-gradient(135deg, var(--es-accent-soft), transparent 72%), var(--es-card); border: 1px solid var(--es-line); border-radius: var(--es-r-lg); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--es-shadow); }
.es-hero-main { display: flex; align-items: flex-start; gap: 16px; }
.es-hero-ic { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; font-size: 27px; border-radius: 14px; background: var(--es-accent-soft); border: 1px solid var(--es-accent); }
.es-hero-t { flex: 1 1 auto; min-width: 0; }
.es-hero h1 { font-size: 23px; line-height: 1.35; margin: 0 0 6px; font-weight: 700; }
.es-hero-sub { margin: 0; color: var(--es-sub); font-size: 13.5px; line-height: 1.65; max-width: 100ch; }
.es-fold-btn { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--es-sub); border-radius: var(--es-r-sm); }
.es-fold-btn:hover { background: var(--es-accent-soft); color: var(--es-accent); }
.es-fold-btn svg { transition: transform .18s; }
.es-hero.is-collapsed .es-fold-btn svg { transform: rotate(-90deg); }
.es-hero.is-collapsed .es-hero-extra { display: none; }
.es-hero.is-collapsed { padding: 14px 20px; }
.es-hero-extra { padding-left: 68px; margin-top: 14px; }
.es-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.es-badge { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--es-card-2); border: 1px solid var(--es-line-2); color: var(--es-sub); }
.es-badge-ok { color: var(--es-ok); border-color: var(--es-ok); background: var(--es-ok-soft); }
.es-stat { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--es-line); border-radius: var(--es-r-md); overflow: hidden; background: var(--es-card); }
.es-stat-i { padding: 11px 14px; display: flex; align-items: baseline; gap: 8px; border-left: 1px solid var(--es-line); min-width: 0; }
.es-stat-i:first-child { border-left: 0; }
.es-stat-i b { font-size: 20px; font-weight: 700; color: var(--es-accent); font-variant-numeric: tabular-nums; }
.es-stat-i:nth-child(2) b { color: var(--es-purple); }
.es-stat-i:nth-child(5) b { color: var(--es-ok); }
.es-stat-i em { font-style: normal; font-size: 12px; color: var(--es-sub); white-space: nowrap; }
.es-hero-note { margin: 12px 0 0; font-size: 12px; line-height: 1.7; color: var(--es-faint); }

/* ---------- Tabs ---------- */
.es-tabs { display: flex; gap: 4px; flex-wrap: wrap; position: sticky; top: 0; z-index: 30; background: var(--es-bg); padding: 8px 0; margin-bottom: 14px; border-bottom: 1px solid var(--es-line); }
.es-tab { border: 1px solid transparent; background: transparent; color: var(--es-sub); padding: 9px 14px; border-radius: 999px; font-size: 13.5px; min-height: 38px; white-space: nowrap; }
.es-tab:hover { color: var(--es-fg); background: var(--es-card); }
.es-tab.is-on { color: var(--es-accent); background: var(--es-accent-soft); border-color: var(--es-accent); font-weight: 600; }
.es-pane { animation: es-fade .18s ease-out; }
@keyframes es-fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.es-loading, .es-err { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); margin-bottom: 14px; font-size: 13px; color: var(--es-sub); }
.es-err { color: var(--es-err); border-color: var(--es-err); }
.es-spin { width: 15px; height: 15px; border: 2px solid var(--es-line-2); border-top-color: var(--es-accent); border-radius: 50%; animation: es-spin .8s linear infinite; }
@keyframes es-spin { to { transform: rotate(360deg); } }
.es-sec-head { margin: 22px 0 14px; }
.es-sec-head:first-child { margin-top: 4px; }
.es-sec-head h2 { font-size: 17px; margin: 0 0 5px; }
.es-sec-head p { margin: 0; color: var(--es-sub); font-size: 13px; line-height: 1.65; max-width: 100ch; }

/* ---------- 技能库 ---------- */
.es-lib-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.es-search-wrap { position: relative; flex: 1 1 340px; max-width: 620px; min-width: 0; }
.es-search-wrap .es-search { width: 100%; padding-left: 34px; }
.es-search-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; opacity: .7; }
.es-search-clr { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: var(--es-card-2); color: var(--es-sub); width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; }
.es-lib-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.es-chip { border: 1px solid var(--es-line-2); background: var(--es-card); color: var(--es-sub); padding: 7px 12px; border-radius: 999px; font-size: 12.5px; min-height: 36px; white-space: nowrap; }
.es-chip:hover { border-color: var(--es-accent); color: var(--es-fg); }
.es-chip[aria-pressed="true"] { background: var(--es-accent-soft); border-color: var(--es-accent); color: var(--es-accent); font-weight: 600; }
.es-lib-count { font-size: 12px; color: var(--es-faint); white-space: nowrap; }
.es-full-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--es-sub); margin: 10px 0 12px; cursor: pointer; }
.es-full-toggle input { accent-color: var(--es-accent); }
.es-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.es-cat { border: 1px solid var(--es-line-2); background: var(--es-card); color: var(--es-sub); padding: 8px 13px; border-radius: 999px; font-size: 12.5px; min-height: 36px; cursor: pointer; }
.es-cat:hover { border-color: var(--es-accent); }
.es-cat.is-on { background: var(--es-accent-soft); border-color: var(--es-accent); color: var(--es-accent); font-weight: 600; }
.es-cat small { opacity: .75; margin-left: 4px; }
.es-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 12px; }
.es-card { position: relative; background: var(--es-card); border: 1px solid var(--es-line); border-radius: var(--es-r-md); padding: 14px 15px; cursor: pointer; transition: border-color .16s, transform .16s, box-shadow .16s; min-width: 0; }
.es-card:hover { border-color: var(--es-accent); transform: translateY(-2px); box-shadow: var(--es-shadow); }
.es-card-top { display: flex; align-items: flex-start; gap: 10px; }
.es-card-ic { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; font-size: 19px; border-radius: 10px; background: var(--es-card-2); border: 1px solid var(--es-line-2); }
.es-card-tt { flex: 1 1 auto; min-width: 0; }
.es-card-tt h3 { font-size: 14.5px; margin: 0 0 3px; line-height: 1.35; }
.es-card-id { font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--es-faint); word-break: break-all; }
.es-card-fav { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; color: var(--es-faint); font-size: 16px; width: 28px; height: 28px; border-radius: 7px; cursor: pointer; }
.es-card-fav:hover { background: var(--es-warn-soft); color: var(--es-warn); }
.es-card-fav.is-on { color: var(--es-warn); }
.es-card-sum { font-size: 12.5px; line-height: 1.62; color: var(--es-sub); margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.es-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.es-tag { font-size: 10.5px; padding: 3px 7px; border-radius: 5px; background: var(--es-card-2); border: 1px solid var(--es-line-2); color: var(--es-faint); }
.es-tag-user { color: var(--es-purple); border-color: var(--es-purple); background: var(--es-purple-soft); }
.es-tag-model { color: var(--es-ok); border-color: var(--es-ok); background: var(--es-ok-soft); }
.es-tag-doc { color: var(--es-accent); border-color: var(--es-accent); background: var(--es-accent-soft); }
.es-tag-beta { color: var(--es-warn); border-color: var(--es-warn); background: var(--es-warn-soft); }
.es-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--es-line); font-size: 11px; color: var(--es-faint); }
.es-grid.is-list { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.es-grid.is-list .es-card-sum { -webkit-line-clamp: 1; }
.es-grid.is-list .es-card-meta { display: none; }
.es-empty { padding: 40px 20px; text-align: center; color: var(--es-faint); border: 1px dashed var(--es-line); border-radius: var(--es-r-md); font-size: 13px; }
.es-fullresults { margin-top: 18px; border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 14px; }
.es-panel-t { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.es-panel-t h2 { font-size: 15px; margin: 0; }
.es-panel-t span { font-size: 12px; color: var(--es-faint); }
.es-panel-t .es-link { margin-left: auto; }
.es-hit { border-top: 1px solid var(--es-line); padding: 10px 2px; cursor: pointer; }
.es-hit:hover { background: var(--es-zebra); }
.es-hit-t { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.es-hit-t em { font-style: normal; color: var(--es-accent); }
.es-hit-x { font-size: 12px; color: var(--es-sub); line-height: 1.6; overflow-wrap: anywhere; }
.es-hit-x mark { background: var(--es-warn-soft); color: var(--es-fg); padding: 0 2px; border-radius: 3px; }

/* ---------- 工作流与场景 ---------- */
.es-chain-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.es-chain-chip { border: 1px solid var(--es-line-2); background: var(--es-card); color: var(--es-sub); padding: 8px 13px; border-radius: 999px; font-size: 12.5px; min-height: 38px; cursor: pointer; }
.es-chain-chip:hover { border-color: var(--es-accent); }
.es-chain-chip.is-on { background: var(--es-accent-soft); border-color: var(--es-accent); color: var(--es-accent); font-weight: 600; }
.es-chain-box { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; background: var(--es-card); border: 1px solid var(--es-line); border-radius: var(--es-r-md); padding: 16px; }
.es-chain-step { flex: 1 1 150px; min-width: 0; position: relative; }
.es-chain-node { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; border: 1px solid var(--es-line-2); background: var(--es-card-2); border-radius: var(--es-r-sm); padding: 11px 12px; cursor: pointer; height: 100%; transition: border-color .16s, background .16s; }
.es-chain-node:hover { border-color: var(--es-accent); background: var(--es-accent-soft); }
.es-chain-node b { font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.es-chain-node span { font: 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--es-faint); overflow-wrap: anywhere; }
.es-chain-node i { font-style: normal; font-size: 15px; }
.es-chain-arrow { flex: 0 0 26px; display: grid; place-items: center; color: var(--es-faint); font-size: 16px; }
.es-chain-note { margin: 10px 0 0; font-size: 12.5px; color: var(--es-sub); line-height: 1.65; }
.es-scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 10px; }
.es-scenario { text-align: left; border: 1px solid var(--es-line); background: var(--es-card); color: var(--es-fg); border-radius: var(--es-r-md); padding: 13px 14px; cursor: pointer; min-width: 0; transition: border-color .16s, transform .16s; }
.es-scenario:hover { border-color: var(--es-accent); transform: translateY(-2px); }
.es-scenario.is-on { border-color: var(--es-accent); background: var(--es-accent-soft); }
.es-scenario b { display: block; font-size: 13.5px; margin-bottom: 5px; }
.es-scenario span { display: block; font-size: 12px; color: var(--es-sub); line-height: 1.55; }
.es-scenario em { display: block; font-style: normal; font-size: 11px; color: var(--es-faint); margin-top: 8px; }
.es-scenario-detail { margin-top: 14px; border: 1px solid var(--es-accent); border-radius: var(--es-r-md); background: var(--es-card); padding: 16px; }
.es-sd-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.es-sd-head h3 { font-size: 15px; margin: 0; flex: 1 1 auto; }
.es-sd-skills { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.es-sd-chip { border: 1px solid var(--es-line-2); background: var(--es-card-2); color: var(--es-fg); border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.es-sd-chip:hover { border-color: var(--es-accent); color: var(--es-accent); }
.es-sd-cmds { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.es-sd-cmd { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--es-code-bg); border: 1px solid var(--es-line); border-radius: 6px; padding: 6px 9px; cursor: pointer; color: var(--es-accent); }
.es-callout { border-left: 3px solid var(--es-accent); background: var(--es-accent-soft); padding: 11px 14px; border-radius: 0 var(--es-r-sm) var(--es-r-sm) 0; font-size: 12.5px; line-height: 1.7; color: var(--es-sub); margin-top: 12px; }
.es-callout b { color: var(--es-fg); }

/* ---------- 文档布局（深度解析 / 规范） ---------- */
.es-doc-layout { display: grid; grid-template-columns: minmax(0, 268px) minmax(0, 1fr); gap: 14px; align-items: start; }
.es-doc-side { position: sticky; top: 62px; border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 12px; max-height: min(72vh, 720px); display: flex; flex-direction: column; min-width: 0; }
.es-doc-side > .es-search { width: 100%; flex: 0 0 auto; }
.es-doc-count { font-size: 11.5px; color: var(--es-faint); margin: 9px 2px; }
.es-doc-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; min-height: 0; }
.es-doc-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--es-sub); padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: 12.5px; line-height: 1.4; }
.es-doc-item:hover { background: var(--es-card-2); color: var(--es-fg); }
.es-doc-item.is-on { background: var(--es-accent-soft); color: var(--es-accent); font-weight: 600; }
.es-doc-item small { display: block; font-size: 10.5px; color: var(--es-faint); margin-top: 2px; }
.es-doc-main { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 18px 20px 28px; min-width: 0; }
.es-doc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--es-line); padding-bottom: 12px; margin-bottom: 14px; }
.es-doc-head h3 { font-size: 16px; margin: 0; flex: 1 1 auto; min-width: 0; }
.es-doc-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.es-doc-toc { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.es-doc-toc button { border: 1px solid var(--es-line-2); background: var(--es-card-2); color: var(--es-sub); border-radius: 6px; padding: 4px 9px; font-size: 11px; cursor: pointer; }
.es-doc-toc button:hover { border-color: var(--es-accent); color: var(--es-accent); }

/* ---------- Markdown 渲染 ---------- */
.es-md { font-size: 13.5px; line-height: 1.78; color: var(--es-fg); overflow-wrap: anywhere; }
.es-md > :first-child { margin-top: 0; }
.es-md h1, .es-md h2, .es-md h3, .es-md h4 { line-height: 1.4; margin: 22px 0 10px; font-weight: 700; scroll-margin-top: 76px; }
.es-md h1 { font-size: 21px; }
.es-md h2 { font-size: 17px; border-bottom: 1px solid var(--es-line); padding-bottom: 6px; }
.es-md h3 { font-size: 14.5px; color: var(--es-accent); }
.es-md h4 { font-size: 13.5px; }
.es-md p { margin: 0 0 12px; }
.es-md ul, .es-md ol { padding-left: 22px; margin: 0 0 12px; }
.es-md li { margin-bottom: 5px; }
.es-md li > ul, .es-md li > ol { margin-top: 5px; }
.es-md a { color: var(--es-accent); text-decoration: underline; text-underline-offset: 2px; }
.es-md strong { color: var(--es-fg); font-weight: 700; }
.es-md em { color: var(--es-sub); }
.es-md code { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--es-code-bg); border: 1px solid var(--es-line); border-radius: 4px; padding: 1px 5px; }
.es-md pre { background: var(--es-code-bg); border: 1px solid var(--es-line); border-radius: var(--es-r-sm); padding: 12px 14px; overflow-x: auto; margin: 0 0 14px; scrollbar-width: thin; }
.es-md pre code { border: 0; padding: 0; background: transparent; font-size: 12px; line-height: 1.65; }
.es-md blockquote { border-left: 3px solid var(--es-accent); background: var(--es-accent-soft); margin: 0 0 14px; padding: 10px 14px; border-radius: 0 var(--es-r-sm) var(--es-r-sm) 0; color: var(--es-sub); }
.es-md blockquote p:last-child { margin-bottom: 0; }
.es-md hr { border: 0; border-top: 1px solid var(--es-line); margin: 20px 0; }
.es-md table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--es-line); border-radius: var(--es-r-sm); overflow: hidden; margin: 0 0 14px; font-size: 12.5px; display: block; overflow-x: auto; }
.es-md th, .es-md td { border-right: 1px solid var(--es-line); border-bottom: 1px solid var(--es-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.es-md th { background: var(--es-card-2); font-weight: 600; }
.es-md tr:nth-child(even) td { background: var(--es-zebra); }
.es-md th:last-child, .es-md td:last-child { border-right: 0; }
.es-md tr:last-child td { border-bottom: 0; }
.es-md img { max-width: 100%; height: auto; border-radius: 6px; }
.es-md .es-c-k { color: var(--es-purple); }
.es-md .es-c-s { color: var(--es-ok); }
.es-md .es-c-n { color: var(--es-warn); }
.es-md .es-c-c { color: var(--es-faint); }
.es-md .es-c-f { color: var(--es-accent); }
.es-md-front { background: var(--es-code-bg); border: 1px solid var(--es-line); border-radius: var(--es-r-sm); padding: 10px 12px; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; margin-bottom: 14px; color: var(--es-sub); }

/* ---------- 技能包构建器 ---------- */
.es-pack-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.es-pack-left, .es-pack-right { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 14px; min-width: 0; }
.es-pack-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--es-line); margin-bottom: 10px; }
.es-pack-count { font-size: 13px; color: var(--es-sub); margin-right: auto; }
.es-pack-count b { color: var(--es-accent); font-size: 17px; }
.es-pack-groups { max-height: min(66vh, 700px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.es-pack-group-t { position: sticky; top: 0; z-index: 2; background: var(--es-card); font-size: 12px; font-weight: 700; color: var(--es-sub); padding: 8px 4px; border-bottom: 1px solid var(--es-line); }
.es-pack-item { display: flex; align-items: flex-start; gap: 9px; padding: 8px 5px; border-bottom: 1px dashed var(--es-line); cursor: pointer; }
.es-pack-item:hover { background: var(--es-zebra); }
.es-pack-item input { accent-color: var(--es-accent); margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; }
.es-pack-item div { min-width: 0; }
.es-pack-item b { display: block; font-size: 12.5px; font-weight: 600; }
.es-pack-item span { display: block; font-size: 11px; color: var(--es-faint); line-height: 1.5; margin-top: 2px; }
.es-pack-out-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.es-pack-out-head:first-child { margin-top: 0; }
.es-pack-out-head h3 { font-size: 13px; margin: 0; flex: 1 1 auto; }
.es-pack-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- 安装与配置 ---------- */
.es-install-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.es-install { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 15px; min-width: 0; }
.es-install-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.es-install-head b { font-size: 14px; flex: 1 1 auto; }
.es-install-head span { font-size: 17px; }
.es-pill { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--es-line-2); color: var(--es-sub); }
.es-pill-ok { color: var(--es-ok); border-color: var(--es-ok); background: var(--es-ok-soft); }
.es-pill-no { color: var(--es-warn); border-color: var(--es-warn); background: var(--es-warn-soft); }
.es-install .es-code { max-height: 190px; }
.es-install-note { font-size: 12px; color: var(--es-sub); line-height: 1.65; margin: 9px 0 0; }
.es-install-extra { margin-top: 9px; }
.es-install-acts { margin-top: 10px; display: flex; gap: 8px; }
.es-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.es-step { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 14px; }
.es-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--es-accent-soft); color: var(--es-accent); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.es-step b { display: block; font-size: 13.5px; margin-bottom: 5px; }
.es-step p { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--es-sub); }
.es-table-wrap { border: 1px solid var(--es-line); border-radius: var(--es-r-md); overflow-x: auto; background: var(--es-card); }
.es-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 500px; }
.es-table th, .es-table td { padding: 10px 12px; text-align: left; border-right: 1px solid var(--es-line); border-bottom: 1px solid var(--es-line); }
.es-table th { position: sticky; top: 0; background: var(--es-card-2); font-weight: 600; z-index: 1; }
.es-table tr:nth-child(even) td { background: var(--es-zebra); }
.es-table th:last-child, .es-table td:last-child { border-right: 0; }
.es-table tr:last-child td { border-bottom: 0; }

/* ---------- 规范与术语 ---------- */
.es-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--es-line); padding-bottom: 8px; }
.es-subtab { border: 1px solid transparent; background: transparent; color: var(--es-sub); padding: 7px 12px; border-radius: var(--es-r-sm); font-size: 12.5px; min-height: 34px; }
.es-subtab:hover { background: var(--es-card); color: var(--es-fg); }
.es-subtab.is-on { background: var(--es-accent-soft); border-color: var(--es-accent); color: var(--es-accent); font-weight: 600; }
.es-glossary-search { width: min(360px, 100%); margin-bottom: 14px; }
.es-glossary-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.es-gloss { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 13px 15px; }
.es-gloss b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.es-gloss .es-gloss-en { font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--es-faint); }
.es-gloss p { font-size: 12.5px; line-height: 1.65; color: var(--es-sub); margin: 8px 0 0; }
.es-gloss .es-gloss-avoid { font-size: 11.5px; color: var(--es-err); margin-top: 8px; }
.es-invoke-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.es-invoke { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 16px; }
.es-invoke h3 { font-size: 15px; margin: 0 0 8px; }
.es-invoke p { font-size: 12.5px; line-height: 1.7; color: var(--es-sub); }
.es-invoke .es-rule { border-top: 1px dashed var(--es-line); padding-top: 9px; margin-top: 10px; font-size: 12px; color: var(--es-accent); }
.es-faq-list { display: grid; gap: 10px; }
.es-faq { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); overflow: hidden; }
.es-faq > summary { cursor: pointer; padding: 12px 15px; font-size: 13.5px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.es-faq > summary::-webkit-details-marker { display: none; }
.es-faq > summary::before { content: '▸'; color: var(--es-accent); font-size: 13px; transition: transform .16s; }
.es-faq[open] > summary::before { transform: rotate(90deg); }
.es-faq[open] > summary { border-bottom: 1px solid var(--es-line); }
.es-faq > div { padding: 12px 15px; font-size: 12.5px; line-height: 1.75; color: var(--es-sub); }

/* ---------- 详情抽屉 / 遮罩 / Toast ---------- */
.es-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); z-index: 100000; }
body.es-drawer-open { overflow: hidden; }
.es-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 96vw); background: var(--es-bg); border-left: 1px solid var(--es-line); box-shadow: var(--es-shadow-lg); z-index: 100001; display: flex; flex-direction: column; }
.es-drawer-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--es-line); background: var(--es-card); }
.es-drawer-id { flex: 1 1 auto; font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-drawer-close { border: 0; background: var(--es-card-2); color: var(--es-sub); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.es-drawer-close:hover { background: var(--es-err-soft); color: var(--es-err); }
.es-drawer-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 40px; scrollbar-width: thin; }
.es-dh { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.es-dh-ic { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; font-size: 25px; background: var(--es-accent-soft); border: 1px solid var(--es-accent); border-radius: 13px; }
.es-dh-t { min-width: 0; flex: 1 1 auto; }
.es-dh-t h2 { font-size: 19px; margin: 0 0 5px; }
.es-dh-t code { font: 11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--es-faint); word-break: break-all; }
.es-dh-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.es-d-summary { font-size: 13.5px; line-height: 1.8; color: var(--es-fg); background: var(--es-card); border: 1px solid var(--es-line); border-left: 3px solid var(--es-accent); border-radius: 0 var(--es-r-md) var(--es-r-md) 0; padding: 13px 15px; margin-bottom: 14px; }
.es-d-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.es-d-box { border: 1px solid var(--es-line); border-radius: var(--es-r-md); background: var(--es-card); padding: 13px 15px; }
.es-d-box h3 { font-size: 13px; margin: 0 0 8px; color: var(--es-accent); }
.es-d-box ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; color: var(--es-sub); }
.es-d-box li { margin-bottom: 5px; }
.es-d-acts { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.es-d-subtabs { display: flex; gap: 5px; flex-wrap: wrap; border-bottom: 1px solid var(--es-line); padding-bottom: 8px; margin-bottom: 14px; position: sticky; top: 0; background: var(--es-bg); z-index: 2; }
.es-d-subtab { border: 1px solid transparent; background: transparent; color: var(--es-sub); padding: 7px 11px; border-radius: var(--es-r-sm); font-size: 12.5px; min-height: 34px; cursor: pointer; }
.es-d-subtab:hover { background: var(--es-card); }
.es-d-subtab.is-on { background: var(--es-accent-soft); border-color: var(--es-accent); color: var(--es-accent); font-weight: 600; }
.es-d-pane { min-width: 0; }
.es-file-list { display: grid; gap: 7px; margin-bottom: 14px; }
.es-file-btn { text-align: left; border: 1px solid var(--es-line-2); background: var(--es-card); color: var(--es-fg); padding: 9px 12px; border-radius: var(--es-r-sm); font-size: 12.5px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.es-file-btn:hover { border-color: var(--es-accent); }
.es-file-btn.is-on { background: var(--es-accent-soft); border-color: var(--es-accent); }
.es-file-btn span { color: var(--es-faint); font-size: 11px; white-space: nowrap; }
.es-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.es-rel { text-align: left; border: 1px solid var(--es-line); border-radius: var(--es-r-sm); background: var(--es-card); padding: 10px 12px; cursor: pointer; color: var(--es-fg); font-size: 12.5px; }
.es-rel:hover { border-color: var(--es-accent); color: var(--es-accent); }
.es-rel span { display: block; font-size: 11px; color: var(--es-faint); margin-top: 3px; }
.es-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100002; background: var(--es-card); border: 1px solid var(--es-accent); color: var(--es-fg); padding: 10px 18px; border-radius: 999px; box-shadow: var(--es-shadow-lg); font-size: 13px; max-width: min(90vw, 520px); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1400px) {
  .es { padding: 18px 20px 64px; }
  .es-grid { grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); }
  .es-doc-layout { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .es-stat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .es-stat-i:nth-child(4) { border-left: 0; }
  .es-stat-i:nth-child(n+4) { border-top: 1px solid var(--es-line); }
  .es-pack-layout { grid-template-columns: minmax(0, 1fr); }
  .es-pack-groups { max-height: 340px; }
}
@media (max-width: 900px) {
  .es-doc-layout { grid-template-columns: minmax(0, 1fr); }
  .es-doc-side { position: static; max-height: none; }
  .es-doc-list { max-height: 260px; }
  .es-chain-arrow { display: none; }
  .es-chain-step { flex: 1 1 46%; margin-bottom: 8px; }
  .es-lib-tools { width: 100%; margin-left: 0; }
  .es-search-wrap { max-width: none; }
}
@media (max-width: 767px) {
  .es { padding: 14px 12px 60px; }
  .es-hero { padding: 14px; }
  .es-hero-ic { width: 42px; height: 42px; font-size: 22px; }
  .es-hero h1 { font-size: 19px; }
  .es-hero-extra { padding-left: 0; }
  .es-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .es-stat-i:nth-child(odd) { border-left: 0; }
  .es-stat-i:nth-child(n+3) { border-top: 1px solid var(--es-line); }
  .es-tabs { top: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding: 7px 0; }
  .es-tabs::-webkit-scrollbar { display: none; }
  .es-tab { padding: 8px 12px; }
  .es-grid, .es-grid.is-list { grid-template-columns: minmax(0, 1fr); }
  .es-select, .es-search, .es-input { font-size: 16px; }
  .es-btn, .es-chip, .es-cat, .es-chain-chip, .es-tab, .es-subtab, .es-d-subtab { min-height: 40px; }
  .es-card-fav { width: 38px; height: 38px; }
  .es-doc-main { padding: 14px 13px 22px; }
  .es-drawer { width: 100%; top: auto; height: 94vh; border-left: 0; border-top: 1px solid var(--es-line); border-radius: 16px 16px 0 0; }
  .es-drawer-body { padding: 14px 13px 40px; }
  .es-scenario-grid, .es-install-grid { grid-template-columns: minmax(0, 1fr); }
  .es-chain-step { flex: 1 1 100%; }
  .es-glossary-list, .es-invoke-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .es-hero-sub { font-size: 12.5px; }
  .es-stat-i { padding: 9px 10px; }
  .es-stat-i b { font-size: 17px; }
  .es-stat-i em { font-size: 11px; }
  .es-lib-tools .es-select { flex: 1 1 100%; }
  .es-card-foot { font-size: 10.5px; }
}
@media (hover: none) {
  .es-card:hover { transform: none; }
  .es-scenario:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .es *, .es *::before, .es *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .es-tabs, .es-mask, .es-drawer, .es-toast, .es-lib-bar, .es-cats, .es-pack-actions, .es-fold-btn { display: none !important; }
  .es-pane[hidden] { display: none !important; }
  .es { padding: 0; }
  .es-card { break-inside: avoid; }
}


