/* ============================================================
   Muse 官网 — 「官网即应用」
   设计令牌逐字取自 native/nativeui/app.go 的 applyTheme()：
   暗色窗口 #1a1a1a · 面板 #232328 · 表面 #2a2a30 · 官网强调为单色（Linear 风）：暗色近白 #f5f5f7
   亮色窗口 #f5f5f5 · 面板 #ffffff · 表面 #f3f3f6 · 官网强调近黑 #17171a
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/spacegrotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrumentserif-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrainsmono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* 应用色板（暗色 = applyTheme dark 分支） */
  --win-bg: #1a1a1a;
  --panel: #232328;
  --surface: #2a2a30;
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #ececf0;
  --muted: #a9a9b4;
  --accent: #f5f5f7;
  --accent-hover: #ffffff;
  --accent-pressed: #d9d9de;
  --accent-text: #111113;
  --selection: rgba(255, 255, 255, 0.18);

  /* 官网排版层 */
  --page: #101014;
  --page-2: #16161c;
  --ink: #ececf0;
  --ink-dim: #a9a9b4;
  --ink-faint: #63636e;
  --line: rgba(255, 255, 255, 0.08);

  --font-sans: -apple-system, "SF Pro Text", "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-display: "Space Grotesk", -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-serif: "Instrument Serif", "Songti SC", serif;

  --radius: 7px;
  --radius-win: 14px;
  --shadow-win: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 64px -24px rgba(0, 0, 0, 0.55);
  --container: 1120px;
}

[data-theme="light"] {
  /* applyTheme light 分支 */
  --win-bg: #f5f5f5;
  --panel: #ffffff;
  --surface: #f3f3f6;
  --surface-hover: rgba(0, 0, 0, 0.045);
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.12);
  --text: #1d1d1f;
  --muted: #6e6e78;
  --accent: #17171a;
  --accent-hover: #2c2c31;
  --accent-pressed: #000000;
  --accent-text: #ffffff;
  --selection: rgba(0, 0, 0, 0.14);

  --page: #f5f5f5;
  --page-2: #ececf1;
  --ink: #1d1d1f;
  --ink-dim: #6e6e78;
  --ink-faint: #9a9aa4;
  --line: rgba(0, 0, 0, 0.08);
  --shadow-win: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 64px -28px rgba(0, 0, 0, 0.22);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 76px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--selection); }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 18px;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.nav__links { display: flex; gap: 22px; margin-left: 8px; }
.nav__links a { font-size: 13.5px; color: var(--ink-dim); transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__gh { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-dim); }
.nav__gh:hover { color: var(--ink); }
.nav__gh svg { width: 16px; height: 16px; }

.theme-toggle {
  position: relative; width: 44px; height: 24px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: inline-flex; align-items: center;
}
.theme-toggle__icon { position: absolute; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; color: var(--muted); }
.theme-toggle__icon--sun { left: 6px; }
.theme-toggle__icon--moon { right: 6px; }
.theme-toggle__knob {
  position: absolute; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-theme="light"] .theme-toggle__knob { transform: translateX(20px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 600; line-height: 1;
  padding: 13px 22px; border-radius: 9px;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { background: var(--accent-pressed); }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-hover); }
.btn--small { padding: 8px 14px; font-size: 13px; border-radius: 7px; }

/* ---------- hero ---------- */
.hero { padding: 148px 0 40px; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(52px, 9vw, 104px);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.02em;
  margin: 0 0 26px;
}
.hero__title > span { display: block; }
.hero__title .serif { color: var(--accent); }
.hero__lede { max-width: 640px; font-size: 17.5px; color: var(--ink-dim); margin: 0 0 30px; }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; margin-bottom: 56px; }
.hero__stage { margin-bottom: 26px; }
.hero__facts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em;
  padding: 4px 2px 72px;
}
.hero__facts i { width: 1px; height: 12px; background: var(--line); }

/* ---------- 窗口 chrome（产品的复刻：图标栏 → 面板 → 画布） ---------- */
.win {
  position: relative;
  background: var(--win-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win);
  overflow: hidden;
}
.win__lights {
  position: absolute; top: 15px; left: 13px; z-index: 2;
  display: flex; gap: 7px;
}
.win__lights i { width: 11px; height: 11px; border-radius: 50%; }
.win__lights i:nth-child(1) { background: #ff5f57; }
.win__lights i:nth-child(2) { background: #febc2e; }
.win__lights i:nth-child(3) { background: #28c840; }
.win__replay { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; transition: color 0.2s, border-color 0.2s; }
.win__replay:hover { color: var(--accent); border-color: var(--accent); }

.win__body { display: flex; min-height: 520px; }
.win--hero .win__body { min-height: 540px; }
.panel--demo { width: 348px; min-height: 560px; }

/* 56px 图标栏（窗口色，顶部让位红绿灯） */
.rail {
  width: 56px; flex: none; padding: 46px 0 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.rail__btn {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
}
.rail__btn svg { width: 17px; height: 17px; }
.rail__btn.is-active { background: var(--surface); color: var(--accent); box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.12); }
[data-theme="light"] .rail__btn.is-active { background: var(--panel); border: 1px solid var(--border); }
.rail__btn--end { margin-top: auto; }
.rail--live .rail__btn { cursor: pointer; transition: background 0.15s, color 0.15s; }
.rail--live .rail__btn:hover { background: var(--surface-hover); color: var(--ink); }

/* 上下文面板（AI / 文件 / 大纲共用一条，一次一个视图） */
.panel { width: 300px; flex: none; display: flex; flex-direction: column; min-width: 0; }
.panel__head {
  height: 44px; flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px 0 14px;
}
.panel__title { font-size: 12.5px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel__tool {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  display: grid; place-items: center; color: var(--muted);
}
.panel__tool svg { width: 14px; height: 14px; }
.panel__view { display: none; flex: 1; min-height: 0; flex-direction: column; overflow: hidden auto; padding: 0 8px 8px; }
.panel__view.is-on { display: flex; }
.panel__view .tree { padding: 0; }

.files-tools { display: flex; align-items: center; gap: 4px; padding: 2px 2px 8px; }
.files-tools .panel__tool--end { margin-left: auto; }

.side__head { font-size: 12.5px; font-weight: 600; padding: 6px 6px 8px; }
.side__head--sub { padding-top: 14px; color: var(--muted); }
.tree { display: flex; flex-direction: column; gap: 1px; }
.tree__row {
  display: flex; align-items: center; gap: 7px;
  height: 27px; padding: 0 7px; border-radius: 6px;
  font-size: 12.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden;
}
.tree__row svg { width: 13px; height: 13px; }
.tree__row.is-active { background: var(--surface); color: var(--ink); }
.tree__row--muted { color: var(--ink-faint); }

/* 画布（编辑卡片：浮在窗口色上） */
.canvas { flex: 1; min-width: 0; padding: 8px 8px 8px 0; display: flex; flex-direction: column; }
.doc {
  flex: 1; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-win); padding: 34px 30px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.doc__title { margin: 0 0 14px; font-size: 23px; font-weight: 650; letter-spacing: -0.01em; }
.doc__p { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-dim); }
.doc__p strong { color: var(--ink); }
.doc__p--dim { color: var(--ink-faint); }
.doc__p--dim b { font-family: var(--font-mono); font-weight: 600; color: var(--ink-dim); }
.doc__h2 { margin: 16px 0 8px; font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.doc__quote {
  margin: 0 0 12px; padding: 2px 0 2px 14px;
  border-left: 2.5px solid var(--accent);
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
}
.doc__task { list-style: none; margin: 2px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc__task li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-dim); }
.task__box {
  width: 14px; height: 14px; border-radius: 4px; flex: none;
  border: 1.5px solid var(--muted);
}
.task__box.is-on { background: var(--accent); border-color: var(--accent); display: grid; place-items: center; }
.task__box.is-on::after { content: "✓"; font-size: 9px; font-weight: 700; color: var(--accent-text); }
.doc__code { font-family: var(--font-mono); font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.statusbar {
  display: flex; gap: 8px; align-items: center;
  padding: 9px 6px 2px; font-size: 10.5px; color: var(--ink-faint);
}
.statusbar__end { margin-left: auto; }

/* ---------- Agent 面板（与 nativeui/ai.go 同构：chat → composer 卡片） ---------- */
.chat { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 14px; }
.chat--idle { overflow: hidden; }

.bubble {
  max-width: 88%; padding: 8px 12px;
  font-size: 12.5px; line-height: 1.55;
  border-radius: 14px 14px 4px 14px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  align-self: flex-end;
}
.bubble--dim { opacity: 0.55; }

.agent-block { display: flex; flex-direction: column; gap: 9px; }
.md { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--ink); }
.md code { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* 思考行 */
.think {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--muted); cursor: pointer;
}
.think svg { width: 11px; height: 11px; }
.think__chev { display: inline-flex; transition: transform 0.2s; }
.think.is-open .think__chev { transform: rotate(90deg); }
.think__body {
  display: none; padding: 2px 0 2px 10px;
  border-left: 1px solid var(--border);
  font-size: 10.5px; font-style: italic; color: var(--muted); line-height: 1.6;
}
.think__body.is-open { display: block; }

/* 工具行 */
.tool {
  display: flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 9px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 7px;
  font-size: 11px; color: var(--ink);
}
.tool svg { width: 12px; height: 12px; color: var(--muted); }
.tool__target { color: var(--muted); font-size: 10.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool__ok { color: var(--muted); font-size: 10.5px; }
.tool.is-fail .tool__ok { color: #e5636a; }
.tool__detail {
  padding: 3px 0 2px 10px; border-left: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  white-space: pre-wrap; word-break: break-all; line-height: 1.5;
}

/* 审批卡 */
.approval {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.approval__head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; }
.approval__head svg { width: 13px; height: 13px; color: var(--accent); }
.approval__head .approval__file { margin-left: auto; font-weight: 400; font-size: 10px; color: var(--muted); }
.approval__desc { font-size: 10.5px; color: var(--muted); line-height: 1.55; margin: 0; }
.approval__actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.approval__actions .approval__btn { padding: 7px 9px; }
.approval__btn {
  font-size: 10.5px; font-weight: 600; line-height: 1;
  padding: 7px 11px; border-radius: 7px;
  background: var(--accent); color: var(--accent-text);
  transition: background 0.15s, transform 0.1s;
}
.approval__btn:hover { background: var(--accent-hover); }
.approval__btn:active { background: var(--accent-pressed); transform: scale(0.98); }
.approval__btn--ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--ink-dim); font-weight: 400; }
.approval__btn--ghost:hover { background: var(--surface-hover); color: var(--ink); }
.approval__toolname { font-size: 10px; color: var(--ink-faint); margin-left: auto; }
.approval--pending { margin-top: auto; }
.approval--done { opacity: 0.75; }
.approval--done .approval__head svg { color: var(--muted); }
.approval__done-label { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }

/* 输入区（同 nativeui/ai.go：输入卡片 + 卡片下方一行权限/模型/清空） */
.composer-zone { flex: none; display: flex; flex-direction: column; gap: 5px; padding: 0 10px 10px; }
.composer {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px 6px 6px 10px;
}
.composer__row { display: flex; align-items: flex-end; gap: 8px; }
.composer__input { flex: 1; font-size: 12.5px; color: var(--ink-faint); padding: 5px 0; line-height: 1.5; }
.composer__send {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
}
.composer__send svg { width: 14px; height: 14px; }
.composer__send--idle { background: var(--surface-hover); color: var(--muted); }
.composer__foot {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px;
}
.composer__model { font-size: 10px; color: var(--ink-faint); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer__clear { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; white-space: nowrap; cursor: pointer; }
.chip { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }

/* 权限下拉（同真实应用的 MenuButton） */
.chip--btn { cursor: pointer; }
.chip--btn:hover { color: var(--ink); border-color: var(--border-strong); }
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20;
  min-width: 128px; padding: 4px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 9px;
  box-shadow: var(--shadow-win);
  display: flex; flex-direction: column; gap: 1px;
}
.dropdown__menu[hidden] { display: none; }
.dropdown__item {
  text-align: left; font-size: 11.5px; padding: 7px 10px; border-radius: 6px;
  color: var(--ink-dim); white-space: nowrap;
}
.dropdown__item:hover { background: var(--surface-hover); color: var(--ink); }
.dropdown__item.is-on { color: var(--ink); font-weight: 600; }
.dropdown__item.is-on::after { content: " ✓"; font-weight: 400; color: var(--muted); }

/* 权限分段（保留给旧引用） */
.seg { display: inline-flex; background: var(--win-bg); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; }
.seg__btn {
  font-size: 10.5px; line-height: 1; padding: 6px 9px; border-radius: 6px;
  color: var(--muted); white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: var(--panel); color: var(--ink); box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.14); }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--page-2); border-block: 1px solid var(--line); }
.section--core { padding: 72px 0; }
.section--download { padding: 96px 0 110px; }
.section__head { max-width: 720px; margin-bottom: 44px; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.section__title .serif { color: var(--accent); }
.section__lede { font-size: 16px; color: var(--ink-dim); margin: 0; }
.section__lede strong { color: var(--ink); }
.section__stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: stretch; }
.section__hint { font-size: 12.5px; color: var(--ink-faint); margin: 18px 0 0; }

/* Agent 注解 */
.agent-notes { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 14px; }
.agent-note {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px;
}
.agent-note__icon { width: 16px; height: 16px; color: var(--accent); margin-bottom: 8px; }
.agent-note h3 { margin: 0 0 5px; font-size: 14px; font-weight: 600; }
.agent-note p { margin: 0; font-size: 13px; color: var(--ink-dim); line-height: 1.7; }

/* ---------- native ---------- */
.native__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr); gap: 36px; align-items: center; }
.native__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.stat__num { display: block; font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat__label { font-size: 12.5px; color: var(--ink-dim); }
.kbd-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.kbd {
  font-size: 12.5px; color: var(--ink-dim);
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 13px;
}
.kbd b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); margin-right: 4px; }

/* 原地编辑演示 */
.editor-demo { position: relative; padding: 34px 30px 40px; min-height: 250px; }
.editor-demo__src { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); white-space: pre-wrap; min-height: 120px; }
.editor-demo__doc {
  position: absolute; inset: 34px 30px 40px; opacity: 0;
  transition: opacity 0.6s ease;
}
.editor-demo__doc.is-live { opacity: 1; }
.editor-demo__doc h3 { margin: 0 0 12px; font-size: 22px; }
.editor-demo__doc p { margin: 0; font-size: 14.5px; color: var(--ink-dim); }
.editor-demo__caret {
  position: absolute; width: 2px; height: 18px; background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- canvas demos ---------- */
.canvas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.canvas-demo { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.canvas-demo__code { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.canvas-demo__render { display: flex; align-items: center; gap: 10px; }
.fnode {
  font-size: 12px; color: var(--ink); font-weight: 600;
  border: 1.5px solid var(--accent); border-radius: 8px; padding: 8px 14px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.fedge { position: relative; flex: 1; max-width: 56px; height: 1.5px; background: var(--muted); }
.fedge::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 7px; height: 7px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
}
.canvas-demo--formula { align-items: center; text-align: center; }
.formula { margin: 10px 0; font-family: var(--font-serif); font-style: italic; font-size: 42px; color: var(--ink); }
.canvas-demo__note { margin: 0; font-size: 12px; color: var(--ink-faint); }

/* ---------- workspace 面板视图 ---------- */
.outline__list { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.outline__row { font-size: 11.5px; color: var(--ink-dim); padding: 5px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline__row--h1 { color: var(--ink); font-weight: 600; }
.outline__row--h2 { padding-left: 20px; }
.outline__row--h3 { padding-left: 32px; color: var(--ink-faint); }

/* ---------- core ---------- */
.section--core .section__head { margin-bottom: 28px; }
.core-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--ink-dim);
}
.core-grid span {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
}

/* ---------- download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.dl-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.2s, transform 0.2s;
}
.dl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.dl-card__os { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.dl-card__meta { font-size: 11.5px; color: var(--ink-faint); }
.dl__more { display: flex; gap: 14px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer__inner { display: flex; align-items: center; gap: 22px; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.footer__links { display: flex; gap: 18px; margin-left: auto; }
.footer__links a { font-size: 13px; color: var(--ink-dim); }
.footer__links a:hover { color: var(--ink); }
.footer__copy { font-size: 11px; color: var(--ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .section__stage { grid-template-columns: 1fr; }
  .agent-notes { grid-template-columns: 1fr 1fr; }
  .native__grid { grid-template-columns: 1fr; }
  .canvas-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .win--hero .canvas { display: none; }
  .panel { width: auto; flex: 1; }
  .hero { padding-top: 120px; }
}
@media (max-width: 720px) {
  .agent-notes { grid-template-columns: 1fr; }
  .win--hero .canvas, .win--workspace .canvas { display: none; }
  .panel { width: auto; flex: 1; }
  .dl-grid { grid-template-columns: 1fr; }
  .hero__facts { gap: 10px; }
  .native__stats { grid-template-columns: 1fr 1fr; }
  .section { padding: 68px 0; }
  .footer__inner { flex-wrap: wrap; gap: 12px; }
  .footer__links { margin-left: 0; }
}
