/* ============================================================
   Ai Lubricant 智能开发平台文档站 — 共享样式
   纯静态，无外部依赖，支持浅/深主题、响应式、打印。
   ============================================================ */

:root {
  --font-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  /* 浅色主题 */
  --bg: #f7f8fa;
  --bg-sidebar: #1f2430;
  --bg-sidebar-hover: #2a3040;
  --bg-card: #ffffff;
  --border: #e2e5ea;
  --text: #24292f;
  --text-muted: #6a737d;
  --text-inverse: #e8ecf3;
  --accent: #2f6fed;
  --accent-soft: #e8effc;
  --code-bg: #f2f4f7;
  --code-border: #e2e5ea;
  --warn-bg: #fff7e8;
  --warn-border: #f5c26b;
  --warn-text: #7a5200;
  --danger-bg: #fdeeee;
  --danger-border: #f0a8a8;
  --danger-text: #8f1d1d;
  --ok-bg: #eefaf0;
  --ok-border: #a8dbb2;
  --ok-text: #1c5c2e;
  --info-bg: #eef4fd;
  --info-border: #b3cdf5;
  --info-text: #1d4f91;
  --table-alt: #fafbfc;
  --kbd-bg: #eef1f5;
}

[data-theme="dark"] {
  --bg: #10141c;
  --bg-sidebar: #161b26;
  --bg-sidebar-hover: #222a3a;
  --bg-card: #1a202c;
  --border: #2b3345;
  --text: #d6dbe4;
  --text-muted: #8a93a3;
  --text-inverse: #c6cdd9;
  --accent: #5c8bf5;
  --accent-soft: #1d2942;
  --code-bg: #12161f;
  --code-border: #2b3345;
  --warn-bg: #2a2312;
  --warn-border: #7a5a1c;
  --warn-text: #e2b86b;
  --danger-bg: #2a1515;
  --danger-border: #7a3030;
  --danger-text: #ef9a9a;
  --ok-bg: #12271a;
  --ok-border: #2c5c3d;
  --ok-text: #93d4a5;
  --info-bg: #122036;
  --info-border: #27466f;
  --info-text: #9dc2ef;
  --table-alt: #1d2432;
  --kbd-bg: #232b3a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* ============ 布局 ============ */

.wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 0 40px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 20px 18px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .3px;
}

.sidebar .brand .dot {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #4d8dff, #7a5cf5);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}

.sidebar .nav-group {
  padding: 12px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #7a8499;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 20px;
  color: #aeb6c4;
  text-decoration: none;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}

.sidebar nav a:hover { background: var(--bg-sidebar-hover); color: #fff; }

.sidebar nav a.active {
  background: var(--bg-sidebar-hover);
  color: #fff;
  border-left-color: var(--accent);
}

.sidebar nav a .ic { width: 18px; text-align: center; opacity: .85; }

.main { flex: 1; min-width: 0; }

.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 44px 96px;
}

.home-content { max-width: 1560px; }

.home-content .cap-orbit { width: min(100%, 1240px); }

/* 正文其余段落保持可读宽度，只有能力图区域吃满宽 */
.home-content > :not(.cap-section) { max-width: 1100px; }

/* ============ 顶部工具条 ============ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar button {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
}

.topbar button:hover { border-color: var(--accent); color: var(--accent); }

/* ============ 排版 ============ */

h1, h2, h3, h4 { line-height: 1.35; margin-top: 0; }

h1 { font-size: 30px; margin-bottom: 8px; letter-spacing: -.3px; }
h2 {
  font-size: 22px;
  margin-top: 44px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
h3 { font-size: 17px; margin-top: 30px; margin-bottom: 10px; }
h4 { font-size: 15px; margin-top: 22px; margin-bottom: 8px; }

p { margin: 10px 0; }

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

ul, ol { padding-left: 22px; }
li { margin: 5px 0; }

strong { font-weight: 600; }

.subtitle { color: var(--text-muted); margin-bottom: 26px; font-size: 15px; }

hr { border: none; border-top: 1px solid var(--border); margin: 34px 0; }

/* 锚点标题悬停显示 # 链接 */
h2, h3 { position: relative; }
h2 .anchor, h3 .anchor {
  opacity: 0;
  margin-left: 6px;
  font-weight: 400;
  color: var(--text-muted);
}
h2:hover .anchor, h3:hover .anchor { opacity: 1; }

/* ============ 代码 ============ */

pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  position: relative;
}

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 1px 5px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
}

.code-block { position: relative; }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 1px solid var(--code-border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}

.code-block:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ============ 表格 ============ */

.table-wrap { overflow-x: auto; margin: 14px 0; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

th { background: var(--accent-soft); font-weight: 600; white-space: nowrap; }

tbody tr:nth-child(even) { background: var(--table-alt); }

/* ============ 提示框 ============ */

.note, .warn, .danger, .ok, .info {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  border: 1px solid;
  font-size: 14px;
}

.note, .info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.warn  { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }
.ok    { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-text); }

.note strong, .warn strong, .danger strong, .ok strong, .info strong { display: block; margin-bottom: 4px; }

/* ============ 卡片网格 ============ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  transition: border-color .15s, transform .15s;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card h3 { margin-top: 0; font-size: 16px; }
.card p { color: var(--text-muted); font-size: 13.5px; margin: 6px 0 0; }
.card a { font-weight: 600; }

/* ============ 目录 / TOC ============ */

.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  margin: 18px 0 26px;
  font-size: 14px;
}

.toc strong { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 13px; }

.toc a { display: inline-block; padding: 3px 12px 3px 0; }

/* ============ Tab 切换 ============ */

.tabs {
  margin: 20px 0 26px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}
.tabs > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--code-bg);
}
.tabs > ul > li { margin: 0; flex: 1 1 auto; min-width: 120px; }
.tabs > ul > li > button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.12s, color 0.12s;
  font-family: var(--font-sans);
}
.tabs > ul > li:last-child > button { border-right: none; }
.tabs > ul > li > button:hover { background: var(--bg-card); color: var(--text); }
.tabs > ul > li > button[aria-selected="true"] {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.tab-panel { display: none; padding: 20px 24px 4px; }
.tab-panel.is-active { display: block; }
.tab-panel > *:first-child { margin-top: 0; }


/* ============ 状态徽章 ============ */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}
.badge.port { background: var(--accent-soft); color: var(--accent); }
.badge.optional { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.badge.required { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }

/* ============ 键盘键 ============ */

kbd {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--kbd-bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
}

/* ============ 页面头部 hero ============ */

.hero {
  padding: 6px 0 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.hero h1 { margin-bottom: 10px; }
.hero .desc { color: var(--text-muted); font-size: 15.5px; max-width: 720px; }

/* ============ 架构图 ============ */

.arch {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin: 18px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  color: var(--text);
}

.arch .node { color: var(--accent); font-weight: 600; }
.arch .cmt { color: var(--text-muted); }

/* ============ 产品首页 Hero ============ */

.product-hero {
  margin: 0 0 30px;
  padding: 36px 32px 30px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 55%);
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #7a5cf5, var(--accent));
  background-size: 200% 100%;
}

.product-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 18px;
  font-weight: 600;
}

.product-hero h1 {
  font-size: 38px;
  line-height: 1.22;
  margin-bottom: 16px;
  letter-spacing: -.5px;
  font-weight: 800;
}

.product-hero .claim {
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--text);
  max-width: 760px;
  margin: 0 0 10px;
}

.product-hero .claim strong { color: var(--accent); }

.product-hero .boundary {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 760px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.cta {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

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

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

.cta.primary:hover { color: #fff; filter: brightness(1.08); }

/* ============ 数据冲击条 ============ */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.stat {
  padding: 22px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat .num {
  display: block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--accent), #7a5cf5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.stat .label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ 能力星座 ============ */

.cap-section {
  margin: 0 0 36px;
}

.cap-section > h2 {
  margin-bottom: 16px;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.cap-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.cap-badge:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}

.cap-badge .cap-ic {
  font-size: 18px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.cap-badge .cap-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 2px 7px;
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: .5px;
}

/* ============ 二级能力图（中心 → 一级枢纽 → 二级能力） ============ */

/* 能力图独占一行；两侧不再放侧栏，改由全站悬浮菜单承担导航 */
.cap-visual-grid {
  display: block;
  margin: 20px 0 4px;
}

.cap-graph-column { min-width: 0; }

/* ============ 全站悬浮章节菜单 ============ */

/* 右侧浮动章节菜单：fixed，不占布局；一级常驻，二级 h3 作为子菜单向左弹出 */
.jump-nav {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 200px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 16px 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -8px 0 26px rgba(0, 0, 0, .12);
  font-size: 13px;
}

.jump-head {
  padding: 0 9px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.jump-list { display: flex; flex-direction: column; gap: 1px; }

/* 一级条目 + 子菜单开关同处一行；二级 h3 子菜单向左弹出 */
.jump-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.jump-list a {
  padding: 6px 9px;
  border-radius: 7px;
  border-left: 2px solid transparent;
  color: var(--text);
  text-decoration: none;
}

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

.jump-list a.active {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.jump-l1 { font-weight: 600; }

/* 折叠/展开二级子菜单的开关 */
.jump-caret {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  transition: transform .15s ease, color .15s, background .15s;
}

.jump-caret:hover { color: var(--accent); background: var(--accent-soft); }
.jump-item.is-open .jump-caret { transform: rotate(180deg); color: var(--accent); }

/* 二级 h3 子菜单：默认收起，向左弹出 */
.jump-sub {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(-1px, -50%) rotateY(0);
  display: none;
  flex-direction: column;
  gap: 1px;
  min-width: 180px;
  margin: 0;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .14);
  white-space: nowrap;
}

/* 悬停打开（鼠标）；点击/键盘用 .is-open 打开（触屏、无鼠标） */
.jump-item.has-sub:hover .jump-sub,
.jump-item.has-sub:focus-within .jump-sub,
.jump-item.is-open .jump-sub { display: flex; }

.jump-l2 {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.jump-l2.active { font-weight: 600; }

/* 悬浮菜单可用时隐藏内联 .toc，避免两个目录并存 */
body.has-jump-nav .toc { display: none; }

.cap-orbit {
  position: relative;
  width: min(100%, 1080px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 10px;
}

.cap-orbit.is-zoomed { overflow: auto; }

.orbit-stage {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  transition: transform .18s ease;
}

/* 无 JS 兜底：不做绝对定位，节点按流式排列，内容仍完整可读 */
.cap-orbit:not(.is-interactive) {
  aspect-ratio: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
}

.cap-orbit:not(.is-interactive) .orbit-stage {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.cap-orbit:not(.is-interactive) .orbit-core,
.cap-orbit:not(.is-interactive) .orbit-hub,
.cap-orbit:not(.is-interactive) .orbit-spoke { position: static; transform: none; }

/* 交互模式：spoke 只是数据容器，必须不参与定位，
   否则 .orbit-node 会以 spoke 为包含块，坐标整体偏移半个画布。 */
.cap-orbit.is-interactive .orbit-spoke { position: static; }

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4d8dff, #7a5cf5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  padding: 12px;
  box-shadow: 0 8px 26px rgba(80, 110, 240, .32);
  z-index: 3;
}

.orbit-core strong { font-size: 15px; line-height: 1.3; font-weight: 700; }
.orbit-core span { font-size: 11.5px; opacity: .92; }

/* 一级枢纽：比二级更大更重，并带文字层级标识，不只靠颜色区分 */
.orbit-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 132px;
  padding: 9px 10px;
  text-align: center;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 3px 14px rgba(0, 0, 0, .07);
  z-index: 2;
}

.orbit-hub.is-collapsed { border-style: dashed; }
.orbit-hub small { font-size: 9.5px; color: var(--text-muted); }
.orbit-hub.is-collapsed { border-style: dashed; }

.orbit-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 104px;
  min-height: 52px;
  text-align: center;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color .15s, box-shadow .15s;
  z-index: 1;
}

.orbit-node .cap-ic { font-size: 16px; line-height: 1.15; }
.orbit-node:hover, .orbit-hub:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0, 0, 0, .09); }

.orbit-links {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.orbit-links line {
  stroke: var(--border);
  vector-effect: non-scaling-stroke;
  transition: stroke .15s, stroke-width .15s;
}

.orbit-links .hub-line { stroke: var(--accent); stroke-width: 2; }
.orbit-links .leaf-line { stroke-width: 1.1; }
.orbit-links line.is-active { stroke: var(--accent); stroke-width: 2.4; }

.cap-orbit.is-interactive .orbit-links { display: block; }
.cap-orbit.is-interactive .orbit-node,
.cap-orbit.is-interactive .orbit-hub {
  position: absolute;
  left: 0;
  top: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}
.cap-orbit.is-interactive .orbit-node.is-dragging,
.cap-orbit.is-interactive .orbit-hub.is-dragging {
  cursor: grabbing;
  border-color: var(--accent);
  box-shadow: 0 7px 22px rgba(47, 111, 237, .22);
  z-index: 4;
}
.cap-orbit.is-interactive .orbit-node:focus-visible,
.cap-orbit.is-interactive .orbit-hub:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-color: var(--accent);
}

.orbit-controls {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.cap-orbit.is-interactive ~ .orbit-controls { display: flex; }

.orbit-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.orbit-scale { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

.orbit-reset,
.orbit-zoom button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text);
  padding: 5px 10px;
  font: inherit;
  cursor: pointer;
}

.orbit-zoom button { padding: 3px 10px; font-size: 14px; line-height: 1.3; }

.orbit-reset:hover,
.orbit-zoom button:hover { border-color: var(--accent); color: var(--accent); }

.orbit-legend {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.orbit-legend .lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: -1px;
  margin-right: 4px;
}

.orbit-legend .lg-core { background: linear-gradient(135deg, #4d8dff, #7a5cf5); }
.orbit-legend .lg-hub { border: 2px solid var(--accent); }
.orbit-legend .lg-leaf { border: 2px solid var(--border); }

/* ============ 实力证明条 ============ */

.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.proof {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
}

.proof .proof-ic {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.4;
}

.proof .proof-body { min-width: 0; }
.proof .proof-body strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.proof .proof-body p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ============ 价值分层 ============ */

.value-layer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 14px 0;
}

.value-layer .tier {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
}

.value-layer h3 { margin: 6px 0 8px; font-size: 17px; }
.value-layer .who { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.value-layer ul { margin: 8px 0 0; }

/* ============ 能力闭环链路 ============ */

.chain { margin: 18px 0; }

.chain-step {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}

.chain-step::after {
  content: "↓";
  position: absolute;
  left: 32px;
  bottom: -16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  z-index: 1;
}

.chain-step:last-child { margin-bottom: 0; }
.chain-step:last-child::after { display: none; }

.chain-step .num {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chain-step .body { min-width: 0; }
.chain-step h4 { margin: 4px 0 5px; font-size: 15.5px; }
.chain-step p { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* ============ 截图 / 占位 ============ */

.shot {
  margin: 18px 0 22px;
}

.shot .frame {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}

.shot .chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--table-alt);
}

.shot .chrome i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
}

.shot .chrome .addr {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图片按钮：有图时点击放大 */
.shot .shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* 占位：图片未就绪时显示，图片加载成功后由脚本移除 */
.shot .pending {
  padding: 34px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 9px,
    var(--table-alt) 9px, var(--table-alt) 18px
  );
}

.shot .pending .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--warn-text);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

.shot .pending code {
  font-size: 12px;
  background: var(--bg-card);
}

.shot figcaption {
  margin-top: 9px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

.shot figcaption b { color: var(--text); font-weight: 600; }

/* 画廊 */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin: 18px 0;
}

.shot-grid .shot { margin: 0; }
.shot-grid .shot .pending { padding: 24px 14px; }

/* 移动端设备框 */
.shot.device { max-width: 320px; }
.shot.device .frame { border-radius: 22px; padding: 8px; }
.shot.device .chrome { display: none; }
.shot.device .pending { border-radius: 14px; }

/* ============ Lightbox ============ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 11, 18, .88);
  padding: 28px;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}

.lightbox .lb-cap {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  text-align: center;
  color: #d9dee8;
  font-size: 13px;
  padding: 0 28px;
}

.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 8px 13px;
}

.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

body.lb-open { overflow: hidden; }

/* ============ 场景卡 ============ */

.scenario {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 14px 0;
}

.scenario h3 { margin: 0 0 10px; font-size: 16.5px; }

.scenario dl { margin: 0; }
.scenario dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 10px;
}
.scenario dd { margin: 3px 0 0; font-size: 13.5px; }
.scenario dt:first-child { margin-top: 0; }

/* ============ 角色入口 ============ */

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.role {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  color: var(--text);
}

.role:hover { text-decoration: none; border-color: var(--accent); }
.role .ico { font-size: 20px; }
.role strong { display: block; margin: 8px 0 4px; font-size: 15px; }
.role span { font-size: 13px; color: var(--text-muted); }

/* ============ 底部 ============ */

.footer {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============ 移动端导航按钮 ============ */

.nav-toggle {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  background: var(--bg-sidebar);
  color: #fff;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

/* ============ 响应式 ============ */

@media (max-width: 900px) {
  .wrap { flex-direction: column; }

  .nav-toggle { display: block; }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height .25s ease;
  }

  .sidebar.open { max-height: 80vh; overflow-y: auto; }

  .sidebar .brand { padding: 14px 18px 12px; }
  .sidebar nav a { padding: 10px 18px; }

  .content { padding: 26px 18px 80px; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }
  .product-hero { padding: 24px 18px 22px; }
  .product-hero h1 { font-size: 27px; }
  .product-hero .claim { font-size: 15.5px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .stat .num { font-size: 28px; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-orbit { width: 100%; }
  .cap-orbit .orbit-node { width: 84px; min-height: 46px; padding: 6px 7px; font-size: 10px; }
  .cap-orbit .orbit-node .cap-ic { font-size: 15px; }
  .orbit-hub { width: 112px; padding: 7px 8px; }
  .orbit-hub strong { font-size: 11.5px; }
  .orbit-core { width: 108px; height: 108px; }
  .orbit-core strong { font-size: 13.5px; }
  .shot-grid { grid-template-columns: 1fr; }
  .chain-step { padding: 12px; }
  .lightbox { padding: 54px 12px; }
  .lightbox .lb-prev { left: 8px; }
  .lightbox .lb-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-node, .orbit-hub, .orbit-links line, .orbit-stage { transition: none; }
}

/* 窄屏：浮动菜单收窄并贴近顶部，子菜单仍向左弹 */
@media (max-width: 1180px) {
  .jump-nav { top: 12px; transform: none; width: 176px; max-height: 70vh; }
}
@media (max-width: 520px) {
  .jump-nav { width: 150px; font-size: 12px; }
  .jump-sub { min-width: 150px; }
}

@media (max-width: 520px) {
  .cap-orbit .orbit-node { width: 66px; min-height: 42px; padding: 5px; font-size: 9px; gap: 0; }
  .cap-orbit .orbit-node .cap-ic { font-size: 14px; }
  .orbit-hub { width: 88px; padding: 6px 5px; }
  .orbit-hub .hub-kicker { font-size: 8px; }
  .orbit-hub strong { font-size: 9.5px; }
  .orbit-hub small { font-size: 8px; }
  .orbit-core { width: 96px; height: 96px; }
  .orbit-core strong { font-size: 12.5px; }
  .orbit-core span { font-size: 10px; }
  .orbit-controls { font-size: 11px; }
}

/* ============ 打印 ============ */

@media print {
  .sidebar, .topbar, .nav-toggle, .footer, .copy-btn, .jump-nav { display: none !important; }
  body { background: #fff; color: #000; }
  /* 打印稿恢复内联目录，悬浮菜单不可打印 */
  body.has-jump-nav .toc { display: block !important; }
  .content { max-width: 100%; padding: 0; }
  .arch, pre { white-space: pre-wrap; }
  .card { break-inside: avoid; }
  a { color: #000; }
  .cap-orbit { break-inside: avoid; max-width: 640px; overflow: visible; }
  .orbit-controls { display: none !important; }
  .cap-visual-grid { display: block; }
  .orbit-stage { transform: none !important; }
  .orbit-links { display: block !important; }
  .orbit-links line { stroke: #bbb !important; }
}
