/* ============================================================
   Knomi 官网样式 — 苹果主题（apple.com 版式语言）
   白底 #fbfbfd + 单一蓝 #0071e3 点缀 + 大标题深灰 #1d1d1f + 大圆角卡片
   ============================================================ */

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --brand: #0071e3;
  --brand-deep: #005bb8;
  --accent: #0071e3;
  --green: #34c759;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --card-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03), 0 12px 24px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 0 0 1px rgba(0, 113, 227, 0.18), 0 4px 8px rgba(0, 0, 0, 0.04), 0 18px 36px rgba(0, 0, 0, 0.08);
  --radius-card: 24px;
  --radius-panel: 16px;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
  --term-bg: #15171c;
  --term-text: #d6dbe3;
}

@property --ga {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(0, 113, 227, 0.85); color: #fff; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 大屏分档放宽，缓解两侧留白 */
@media (min-width: 1536px) {
  .container { max-width: 1280px; }
}
@media (min-width: 1920px) {
  .container { max-width: 1400px; }
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 24px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: #1a1615;
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(26, 22, 21, 0.22);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 7px 18px; font-size: 13.5px; }

/* Hero CTA 旋转渐变描边（不支持 @property 时静默退化为静态描边） */
.cta-glow {
  display: inline-block;
  padding: 2px;
  border-radius: 999px;
  background: conic-gradient(from var(--ga), var(--brand), var(--accent), var(--green), var(--brand));
  animation: ga-spin 5s linear infinite;
  box-shadow: 0 10px 30px rgba(22, 119, 255, 0.22);
}
@keyframes ga-spin { to { --ga: 360deg; } }
.cta-glow .btn-primary { border-radius: 999px; }

/* ---------- 导航 ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 248, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(249, 248, 248, 0.88);
}

.nav-inner {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
  color: #454e5c;
}
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 汉堡按钮（仅 ≤820px 显示，开合移动端菜单） */
.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-burger:hover { background: #eceef1; }

.lang-switch {
  display: flex;
  background: #eceef1;
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.lang-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 48px;
  text-align: center;
  position: relative;
  overflow: clip;
}
@supports not (overflow: clip) {
  .hero { overflow: hidden; }
}

/* 全幅氛围背景：品牌辉光 + 点阵网格，横向铺满、向边缘渐隐，消除大屏两侧空白感 */
.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: max(1500px, 100vw);
  height: 780px;
  background:
    radial-gradient(42% 46% at 36% 32%, rgba(22, 119, 255, 0.13), transparent 70%),
    radial-gradient(38% 44% at 64% 28%, rgba(124, 58, 237, 0.11), transparent 70%),
    radial-gradient(rgba(30, 35, 44, 0.055) 1px, transparent 1.6px);
  background-size: auto, auto, 26px 26px;
  -webkit-mask-image: radial-gradient(58% 60% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(58% 60% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 28px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hero-title {
  margin: 0 auto;
  max-width: 820px;
  font-size: clamp(38px, 6.4vw, 66px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(118deg, var(--brand) 20%, var(--accent) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 英文标题字符更宽，缩一档字号避免第三行孤词 */
[data-lang="en"] .hero-title {
  font-size: clamp(34px, 5.6vw, 56px);
  max-width: 900px;
}

.hero-sub {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 17.5px;
  color: var(--text-2);
  line-height: 1.85;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-meta {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------- 快速开始条（终端 + 三平台下载） ---------- */

.quickstart { padding: 32px 0 96px; }

.term {
  max-width: 760px;
  margin: 0 auto;
  background: var(--term-bg);
  border-radius: var(--radius-panel);
  box-shadow: 0 24px 48px rgba(21, 23, 28, 0.18);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.t-dot.r { background: #ff5f57; }
.t-dot.y { background: #febc2e; }
.t-dot.g { background: #28c840; }

.term-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}

.copy-btn {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9aa3b2;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 3px 11px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.copy-btn.ok { color: var(--green); border-color: rgba(34, 197, 94, 0.5); }

.term-body {
  margin: 0;
  padding: 20px 24px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 2;
  color: var(--term-text);
  overflow-x: auto;
}
.t-prompt { color: #7ee2a8; user-select: none; }

.os-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.os-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.os-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.os-note {
  font-size: 12.5px;
  color: var(--text-3);
  margin-left: 6px;
}

/* ---------- 通用区块 ---------- */

section { position: relative; }

.eyebrow {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--brand);
}

.section-title {
  margin: 0 auto;
  text-align: center;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-lead {
  max-width: 620px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 16.5px;
  color: var(--text-2);
  line-height: 1.85;
}

.center-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* grid 爆裂防护：item 默认 min-width:auto 会被长 URL 撑破容器 */
.card-grid > *,
.start-grid > *,
.feature-row > * {
  min-width: 0;
}

/* ---------- 理念三卡片 ---------- */

.concept { padding: 88px 0 40px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 30px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--brand);
  display: grid;
  place-items: center;
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.8;
}

/* ---------- 功能区 ---------- */

.features {
  padding: 88px 0 40px;
  position: relative;
  overflow: clip;
}
/* 全幅弱辉光：左蓝右紫对角，延续 Hero 的氛围语言 */
.features::before {
  content: "";
  position: absolute;
  inset: 6% 0 4%;
  background:
    radial-gradient(26% 22% at 16% 18%, rgba(22, 119, 255, 0.07), transparent 70%),
    radial-gradient(26% 20% at 84% 58%, rgba(124, 58, 237, 0.06), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 76px;
}
.feature-row:first-of-type { margin-top: 64px; }
.feature-row.flip .feature-text { order: 2; }

.feature-text h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.015em;
}
.feature-text p {
  margin: 14px 0 0;
  font-size: 15.5px;
  color: var(--text-2);
  line-height: 1.9;
}
.feature-text code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(22, 119, 255, 0.08);
  color: var(--brand-deep);
  border-radius: 6px;
  padding: 1px 6px;
}

.feature-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
.feature-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.07);
  border-radius: 999px;
  padding: 4px 13px;
}

/* ---------- CSS 模拟图通用 ---------- */

.mock {
  margin: 0;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.mock-crumb {
  flex: none;
  width: 140px;
  height: 9px;
  border-radius: 5px;
  background: #eef0f4;
  margin-left: 10px;
}

/* 骨架条 */
.bar {
  display: block;
  height: 9px;
  border-radius: 5px;
  background: #e7e9ee;
  flex: none;
}
.w30 { width: 30%; } .w40 { width: 40%; } .w45 { width: 45%; }
.w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; }
.w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; }
.w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; }

/* 编辑器模拟 */
.editor-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}
.editor-code {
  padding: 18px;
  border-right: 1px solid var(--border);
}
.editor-code .bar { margin: 10px 0; }
.editor-code .indent { margin-left: 18px; }
.editor-code .title-c { background: #c6d9ff; height: 12px; }
.editor-code .code-c { background: #dbeafe; }

.editor-preview {
  padding: 18px;
  background: #fcfcfd;
}
.editor-preview .bar { margin: 10px 0; }
.editor-preview .head-c { background: #c6d9ff; height: 12px; margin-bottom: 14px; }

.katex-chip {
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 14.5px;
  color: var(--text);
  background: #f2f4f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  margin: 12px 10px 6px 0;
}
.katex-chip i { font-style: italic; padding: 0 1px; }

.flow-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f2f4f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 12px;
  vertical-align: middle;
}
.flow-chip b {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--border-strong);
}
.flow-chip i {
  width: 13px;
  height: 2px;
  border-radius: 1px;
  background: #9db9f5;
}

/* 图谱模拟 */
.mock-graph { background: #fcfcfd; }
.mock-graph svg { flex: 1; width: 100%; min-height: 0; }
.g-edges line { stroke: rgba(22, 119, 255, 0.32); }
.g-node {
  fill: #fff;
  stroke: #c9d4e4;
  stroke-width: 1.5;
}
.g-node.accent { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.g-node.focus { fill: var(--brand); stroke: #fff; stroke-width: 3; }
.g-node.halo {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.5;
  opacity: 0.55;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo-pulse 2.6s ease-out infinite;
}
@keyframes halo-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
.g-labels text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--text-3);
  text-anchor: middle;
}

/* 题卡模拟 */
.mock-quiz {
  display: grid;
  place-items: center;
  padding: 28px;
  background: #fcfcfd;
}
.quiz-card {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--card-shadow);
  padding: 22px;
}
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.quiz-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.08);
  border-radius: 999px;
  padding: 3px 11px;
  flex: none;
}
.quiz-card .q { margin: 9px 0; }
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  margin-top: 9px;
  color: var(--text-2);
}
.quiz-opt.ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.06);
  color: var(--green);
}
.opt-key {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid currentColor;
  opacity: 0.55;
}
.quiz-opt .bar { flex: none; }
.quiz-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.quiz-mastery {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.mastery-track {
  flex: 1;
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #edeff3;
  overflow: hidden;
}
.mastery-track b {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), #4dabff);
}

/* 聊天模拟（深色窗） */
.mock-chat { background: var(--term-bg); }
.mock-chat .mock-bar {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.mock-chat .mock-crumb { background: rgba(255, 255, 255, 0.08); }

.chat-body { flex: 1; padding: 20px; display: flex; flex-direction: column; }
.bubble { border-radius: 15px; padding: 13px 15px; }
.bubble .bar { margin: 5px 0; background: rgba(255, 255, 255, 0.55); }
.bubble.user {
  align-self: flex-end;
  width: 68%;
  background: var(--brand);
  border-bottom-right-radius: 5px;
}
.bubble.ai {
  align-self: flex-start;
  width: 86%;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 5px;
}
.bubble.ai .bar { background: rgba(255, 255, 255, 0.22); }

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.tool-chips span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #7ee2a8;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 7px;
  padding: 3px 9px;
}

.typing {
  display: flex;
  gap: 5px;
  padding: 14px 4px 0 10px;
}
.typing b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: typing-blink 1.3s ease-in-out infinite;
}
.typing b:nth-child(2) { animation-delay: 0.18s; }
.typing b:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-blink {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ---------- 插件生态 ---------- */

.plugins {
  padding: 88px 0 40px;
  position: relative;
  overflow: clip;
}
.plugins::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(34% 44% at 50% 46%, rgba(22, 119, 255, 0.05), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
  max-width: 760px;
  margin: 44px auto 0;
}
.chip {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 17px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.chip:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ---------- 上手 ---------- */

.start { padding: 88px 0 40px; }

.start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 52px;
  align-items: start;
}
.start-card h3 { margin: 0 0 8px; font-size: 20px; }
.start-card > p { margin: 0; font-size: 14.5px; color: var(--text-2); }

.dl-list { margin-top: 16px; }
.dl-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px 17px;
  margin-top: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.dl-list a:hover { border-color: var(--brand); transform: translateY(-1px); }
.dl-list span { font-size: 15px; font-weight: 600; }
.dl-list em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
}

.fine {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.65;
}

.codebox {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  background: #f5f6f8;
}
.codebox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #eceef1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}
.codebox .copy-btn {
  color: var(--text-2);
  border-color: var(--border-strong);
}
.codebox .copy-btn:hover { color: var(--text); border-color: var(--text-3); }
.codebox .copy-btn.ok { color: #15803d; border-color: rgba(34, 197, 94, 0.5); }
.codebox pre {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
  overflow-x: auto;
}

/* ---------- 生态邀请 ---------- */

.invite {
  padding: 120px 0 130px;
  background: radial-gradient(640px 320px at 50% 0, rgba(22, 119, 255, 0.07), transparent 70%);
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.footer-mit {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
  font-size: 14px;
  color: var(--text-2);
}
.footer-links a:hover { color: var(--brand); }

.footer-copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
  width: 100%;
}

/* ---------- 滚动渐显（仅在 JS 可用时启用，渐进增强） ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cta-glow { animation: none; }
  .g-node.halo, .typing b { animation: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .card-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .start-grid { grid-template-columns: 1fr; }
  .feature-row {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 64px;
  }
  .feature-row .feature-text { order: 0; }
  .mock { max-width: 560px; margin: 0 auto; width: 100%; }
  .concept, .features, .plugins, .start { padding-top: 72px; }
}

@media (max-width: 820px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6px 18px 12px;
    font-size: 15px;
    background: rgba(249, 248, 248, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--card-shadow);
  }
  .site-nav.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 11px 0; }
  .nav-links a:hover { color: inherit; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero { padding-top: 68px; }
  .hero-sub { font-size: 16px; }
  .os-note { width: 100%; text-align: center; margin: 4px 0 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { margin-left: 0; }
  .invite { padding: 88px 0 96px; }
  .section-lead { font-size: 15.5px; }
  /* EN 文案较长：收紧导航动作区，防止小屏横向溢出 */
  .nav-inner { gap: 14px; }
  .nav-actions { gap: 8px; }
  .lang-switch button { padding: 5px 10px; }
  .nav-actions .btn-sm { padding: 7px 14px; }
}

/* ============================================================
   子页面（agent / plugins / authoring）组件
   ============================================================ */

.nav-links a.active {
  color: var(--brand);
  font-weight: 600;
}

/* 页头 */
.page-hero {
  padding: 92px 0 26px;
  text-align: center;
  position: relative;
  overflow: clip;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: max(1500px, 100vw);
  height: 620px;
  background:
    radial-gradient(40% 46% at 38% 34%, rgba(22, 119, 255, 0.1), transparent 70%),
    radial-gradient(36% 42% at 62% 30%, rgba(124, 58, 237, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.page-title {
  margin: 0 auto;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-sub {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 16.5px;
  color: var(--text-2);
  line-height: 1.9;
}
.page-hero .hero-cta { margin-top: 32px; }
.page-hero .hero-meta { margin-top: 20px; }

/* 首页功能区的「了解更多」链接 */
.feature-more { margin: 16px 0 0; }
.feature-more a {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.feature-more a:hover { color: var(--brand-deep); }

/* 内置标签 chip（首页插件区） */
.chip-builtin {
  color: var(--brand-deep);
  border-color: rgba(22, 119, 255, 0.4);
  background: rgba(22, 119, 255, 0.06);
}

/* 插件生态页：内置中枢大卡 */
.builtin-card {
  max-width: 780px;
  margin: 40px auto 0;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 44px 40px;
  text-align: center;
}
.builtin-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.08);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.builtin-card .section-lead { margin-top: 16px; }
.builtin-card .center-row { margin-top: 26px; }

/* 插件生态页：官方能力包网格 */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 52px;
}
.plugin-card h3 { margin: 0; font-size: 18px; }
.plugin-slug {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin: 5px 0 10px;
}
.plugin-card p { margin: 0; font-size: 14px; line-height: 1.75; }

/* 四道闸门横条 */
.gates {
  max-width: 860px;
  margin: 36px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
  padding: 16px 22px;
  line-height: 1.8;
}

/* 开发指南页：步骤列表 */
.step-list {
  max-width: 760px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius-panel);
  box-shadow: var(--card-shadow);
  padding: 22px 24px;
}
.step-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}
.step-card h3 { margin: 2px 0 8px; font-size: 17px; }
.step-card p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.8; }

/* 字段表 */
.doc-wrap {
  max-width: 760px;
  margin: 44px auto 0;
  background: var(--surface);
  border-radius: var(--radius-panel);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.doc-table th, .doc-table td {
  text-align: left;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-table th {
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-3);
  background: #fafbfc;
  font-weight: 500;
}
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { white-space: nowrap; }
.doc-table code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.07);
  border-radius: 6px;
  padding: 2px 7px;
}

/* 权限 chips */
.perm-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin: 40px auto 0;
}
.perm-chips span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 16px;
}
.perm-chips em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
  margin-left: 4px;
}

/* 语音页 bullet 列表 */
.voice-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.voice-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
}
.voice-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

/* 子页响应式 */
@media (max-width: 960px) {
  .plugin-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .page-hero { padding-top: 72px; }
}
@media (max-width: 640px) {
  .builtin-card { padding: 32px 22px; }
  .doc-table th, .doc-table td { padding: 11px 14px; }
  .doc-wrap { margin: 32px -6px 0; }
}

/* ============================================================
   开发文档布局（authoring.html）：左侧吸顶菜单 + 右侧章节
   ============================================================ */

.doc-hero { padding-bottom: 6px; }
.doc-hero .page-sub { max-width: 780px; }

.docs-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-top: 34px;
  padding-bottom: 80px;
}

.docs-aside {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 1px solid var(--border);
}
.docs-nav a {
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--text-2);
  border-left: 2px solid transparent;
  margin-left: -1.5px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs-nav a:hover { color: var(--text); }
.docs-nav a.active {
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}
.docs-nav a.sub {
  padding-left: 30px;
  font-size: 12.5px;
}

/* 组件页（视图词汇逐组件） */
.doc-sub {
  padding: 20px 0 30px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 86px;
}
.doc-sub:last-child { border-bottom: 0; }
.doc-sub h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.01em; }
.vc-use { margin: 0 0 14px; font-size: 13.5px; color: var(--text-2); }
.vc-use code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.07);
  border-radius: 5px;
  padding: 1px 6px;
  margin-left: 4px;
}
.vc-demo {
  background: #fcfcfd;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}
.vc-demo .d-table, .vc-demo .d-quiz, .vc-demo .d-form { box-shadow: var(--card-shadow); }
.vc-demo.two { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.d-stat.b { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 14px 8px; }
.d-table.real .d-row { padding: 8px 12px; }
.d-th-t { flex: 1; font-size: 11px; font-weight: 600; color: var(--text-3); }
.d-mono { flex: 1; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.d-tagchip {
  font-size: 10px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.08);
  border-radius: 999px;
  padding: 1px 9px;
}
.d-pl { flex: none; width: 54px; font-size: 11.5px; color: var(--text-2); }
.d-pct { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.d-typechip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
  border-radius: 5px;
  padding: 1px 7px;
  margin-bottom: 8px;
}
.d-quiz .d-typechip + .d-q { margin-top: 4px; }
.d-blank {
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
  padding: 0 26px;
  margin: 0 2px;
}
.d-cloze {
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
}
.d-hint { font-size: 11px; color: var(--text-3); }
.d-diff .ctx { color: var(--text-2); background: #f6f7f9; }
.d-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
  font-size: 11.5px;
  color: var(--text-2);
}
.d-select b { font-weight: 400; color: var(--text-3); font-size: 10px; }
.d-chartline {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.d-chartline svg { width: 100%; height: 64px; display: block; }
.d-donut {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) 0 62%, var(--accent) 62% 84%, #e7e9ee 84% 100%);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 20px, #000 21px);
  mask: radial-gradient(circle at 50% 50%, transparent 0 20px, #000 21px);
  margin: 2px 0 0 4px;
}
.d-toast.info { border-left-color: var(--brand); }
.d-toast.warn { border-left-color: #f59e0b; }
.d-toast.err { border-left-color: #ef4444; }

@media (max-width: 700px) {
  .demo-grid, .slotmap { grid-template-columns: 1fr; }
  .vc-demo.two { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
}

/* ---------- 细滚动条（页面与代码块/侧栏等所有滚动容器） ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 35, 44, 0.22) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(30, 35, 44, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(30, 35, 44, 0.34); }

.doc-section {
  padding: 24px 0 34px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 86px;
}
.doc-section:last-child { border-bottom: 0; }
.doc-section h2 {
  margin: 0 0 14px;
  font-size: 25px;
  letter-spacing: -0.015em;
}
.doc-section h3 {
  margin: 28px 0 10px;
  font-size: 17.5px;
}
.doc-section > p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.9;
}

.doc-list, .doc-ol {
  list-style: none;
  margin: 6px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.doc-list li, .doc-ol li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.85;
}
.doc-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.doc-ol { counter-reset: doc-ol; }
.doc-ol li { padding-left: 36px; counter-increment: doc-ol; }
.doc-ol li::before {
  content: counter(doc-ol);
  left: 0;
  top: 0.14em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.doc-note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: var(--surface);
  padding: 13px 17px;
  margin: 14px 0 6px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.8;
}

.doc-section .codebox { margin: 16px 0 20px; max-width: none; }
.doc-section .card-grid { margin-top: 22px; }
.doc-section .center-row { margin-top: 30px; justify-content: flex-start; }
.doc-section .perm-chips { justify-content: flex-start; margin: 18px 0 14px; }
.doc-section .doc-note p { margin: 0; }

.doc-table-wrap {
  margin: 16px 0 20px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow-x: auto;
}
.doc-table-wrap .doc-table { min-width: 620px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-table th, .doc-table td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-table th {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--text-3);
  background: #fafbfc;
  font-weight: 500;
  white-space: nowrap;
}
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td { color: var(--text-2); line-height: 1.75; }
.doc-table td:first-child { white-space: nowrap; }
.doc-table code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.07);
  border-radius: 6px;
  padding: 2px 7px;
}

@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .docs-layout > * { min-width: 0; }
  .docs-aside {
    top: 62px;
    z-index: 10;
    max-height: none;
    min-width: 0;
    margin: 0 -18px;
    padding: 6px 18px;
    background: rgba(249, 248, 248, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .docs-nav {
    flex-direction: row;
    overflow-x: auto;
    border-left: 0;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .docs-nav a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    margin-left: 0;
    white-space: nowrap;
    padding: 9px 13px;
  }
  .docs-nav a.active { border-bottom-color: var(--brand); }
  .doc-section { scroll-margin-top: 132px; }
}

/* ============================================================
   文档图文组件：视图示例画廊 / 槽位地图 / 挂载形态小图
   ============================================================ */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0 8px;
}
.demo-card {
  margin: 0;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.demo-area {
  padding: 15px 16px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: #fcfcfd;
  border-bottom: 1px solid var(--border);
}
.demo-cap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
}
.demo-cap code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-deep);
  background: rgba(22, 119, 255, 0.08);
  border-radius: 6px;
  padding: 2px 8px;
}
.demo-use { font-size: 12.5px; color: var(--text-2); }
.demo-req {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* 示例卡内部小元件 */
.d-row { display: flex; align-items: center; gap: 8px; }
.d-th, .d-td { display: block; height: 7px; border-radius: 3px; }
.d-th { background: #c6d9ff; }
.d-td { background: #e7e9ee; }
.d-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.d-table .d-row { padding: 6px 10px; }
.d-table .d-row + .d-row { border-top: 1px solid var(--border); }
.d-table .d-row.head { background: #f4f6fa; }

.d-stat { text-align: center; padding: 2px 0; }
.d-stat b {
  display: block;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(118deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.d-stat span { font-size: 12px; color: var(--text-2); }

.d-prog { display: flex; align-items: center; gap: 9px; }
.d-track { flex: 1; height: 6px; border-radius: 3px; background: #edeff3; overflow: hidden; display: block; }
.d-track b { display: block; height: 100%; border-radius: 3px; }
.d-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.d-dot.ok { background: var(--green); }

.d-quiz { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 11px 12px; }
.d-quiz .d-q { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.d-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-2);
}
.d-opt.ok { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.06); color: var(--green); }
.d-opt .d-key {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  opacity: 0.6;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-family: var(--font-mono);
}

.d-quote {
  border-left: 3px solid var(--brand);
  background: #fff;
  border-radius: 0 8px 8px 0;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
}
.d-quote .d-src {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}

.d-diff { font-family: var(--font-mono); font-size: 11px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.d-diff span { display: block; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-diff .del { background: rgba(239, 68, 68, 0.08); color: #b42318; }
.d-diff .add { background: rgba(34, 197, 94, 0.1); color: #15803d; }

.d-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
}
.d-act + .d-act { margin-top: 6px; }
.d-act i { font-style: normal; color: var(--brand); }

.d-chart { display: flex; align-items: flex-end; gap: 7px; height: 76px; padding: 4px 4px 0; }
.d-chart b { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #4dabff, var(--brand)); }

.d-form { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 11px 12px; }
.d-field { margin-bottom: 8px; }
.d-field span { display: block; font-size: 10.5px; color: var(--text-3); margin-bottom: 4px; }
.d-field i { display: block; height: 22px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; }
.d-submit { display: inline-block; background: #1a1615; color: #fff; font-size: 11px; border-radius: 999px; padding: 4px 12px; }

.d-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-2);
  box-shadow: var(--card-shadow);
}

/* 槽位徽标与地图 */
.sp-badge {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex: none;
}
.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(22, 119, 255, 0.08);
  border: 1px solid rgba(22, 119, 255, 0.3);
  color: var(--brand-deep);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.slotmap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0 20px;
}
.slot-pane { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.slot-pane .sp-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  background: #f7f8fa;
}
.slot-pane .sp-bar i { width: 7px; height: 7px; border-radius: 50%; background: #e1e4ea; }
.slot-pane .sp-title { margin-left: 6px; font-size: 11px; color: var(--text-3); font-weight: 600; }
.slot-pane .sp-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.doc-table td .sp-badge { margin-right: 7px; vertical-align: 2px; }

/* 挂载形态小图 */
.surf-fig { max-width: 460px; margin: 4px 0 14px; }
.surf-fig .demo-area { min-height: 0; }
.d-headbar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.d-headbar i { width: 7px; height: 7px; border-radius: 50%; background: #e1e4ea; }
.d-headbar .d-crumb { flex: none; width: 90px; height: 8px; border-radius: 4px; background: #eef0f4; margin-right: auto; }
.d-modal { border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; padding: 12px; box-shadow: var(--card-shadow); }

.d-tray {
  background: var(--term-bg);
  border-radius: 10px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  color: #c9d0da;
  max-width: 230px;
}
.d-tray span { padding: 6px 12px; border-radius: 6px; }
.d-tray .hl { background: var(--brand); color: #fff; font-weight: 600; }
.d-tray hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 3px 0; }

.d-kbdrow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.d-kbdrow kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 3px 9px;
}
.d-kbdrow b { color: var(--text-3); font-weight: 400; }

.d-navwin { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.d-navwin .d-side { width: 108px; flex: none; border-right: 1px solid var(--border); padding: 9px 8px; display: flex; flex-direction: column; gap: 3px; background: #fafbfc; }
.d-sideitem {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-2);
  padding: 4px 7px;
  border-radius: 6px;
}
.d-sideitem.hl { background: rgba(0, 113, 227, 0.1); color: var(--brand-deep); font-weight: 600; }
.d-sideitem .tag {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 3px;
  margin-left: auto;
}
.d-navwin .d-main { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 7px; justify-content: center; }

.d-drop { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 5px; display: flex; flex-direction: column; gap: 2px; max-width: 220px; }
.d-drop .d-sideitem { padding: 6px 9px; }

@media (max-width: 700px) {
  .demo-grid, .slotmap { grid-template-columns: 1fr; }
}

/* ---- 外部 Agent 接入：三步引导 + 确认卡复刻（guide.html #agent-access） ---- */
.aa-steps { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.aa-step { display: flex; gap: 12px; align-items: flex-start; }
.aa-step-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.aa-step-body { flex: 1; min-width: 0; }
.aa-step-body h3 { margin: 4px 0 4px; font-size: 15px; }
.aa-step-body p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.85; color: var(--text-2); }
.aa-demo-card { max-width: 460px; margin: 10px 0; padding: 16px 18px; border: 1px solid var(--border, #e5e5e5); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.10); background: var(--bg, #fff); }
.aa-demo-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.aa-demo-line { font-size: 13px; margin-bottom: 6px; }
.aa-demo-muted { color: #8a8a8a; font-size: 12px; }
.aa-demo-btns { display: flex; gap: 8px; margin-top: 10px; }
.aa-demo-btn { padding: 5px 14px; border-radius: 6px; border: 1px solid var(--border, #e5e5e5); font-size: 13px; }
.aa-demo-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.aa-demo-caption { font-size: 11px; color: #8a8a8a; margin-top: 8px; }

/* ---- 苹果主题引导结构：mini 卡（左/中/右、概念五卡） ---- */
.aa-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.aa-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--card-shadow); }
.aa-mini p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.aa-mini-k { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.aa-mini h3 { margin: 0 0 6px; font-size: 14.5px; color: var(--text); }
.aa-concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
