/* Pi GUI 官网 — 简洁优雅 · 高端大气 · 丝滑动效 */
:root {
  --bg: #fafaf7;
  --pale: #f3f2ec;
  --ink: #16161a;
  --muted: #6d6d74;
  --hairline: rgba(22, 22, 26, 0.12);
  --accent: #8a6a3f;
  --frame-bg: #101014;
  --frame-line: rgba(255, 255, 255, 0.14);
  --frame-text: #9a9aa2;
  --shadow: 0 30px 90px -30px rgba(22, 22, 26, 0.35);
  --max-w: 1120px;
  --r-lg: 16px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-weight: 600;
}

/* 纸感噪点 */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 顶部进度 */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); opacity: 0.85; }

/* 导航 */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(20px, 5vw, 56px);
  background: rgba(250, 250, 247, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s var(--ease-out-expo);
}
.nav.scrolled { border-bottom-color: var(--hairline); }
.brand { display: flex; align-items: center; gap: 11px; font-family: Georgia, serif; font-size: 17px; letter-spacing: 0.05em; font-weight: 600; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 16px; line-height: 1; padding-bottom: 1px;
}
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.nav-links a { font-size: 13px; letter-spacing: 0.12em; color: var(--muted); position: relative; transition: color 0.35s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease-out-expo);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* HERO */
.hero { position: relative; padding: clamp(104px, 14vh, 150px) clamp(20px, 5vw, 56px) clamp(66px, 9vh, 96px); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 45% at 18% 8%, rgba(138, 106, 63, 0.07), transparent 70%),
    radial-gradient(50% 40% at 88% 30%, rgba(22, 22, 26, 0.05), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(22,22,26,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22,22,26,0.03) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 20%, #000, transparent 85%);
  mask-image: radial-gradient(70% 70% at 50% 20%, #000, transparent 85%);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto; }
.hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: clamp(22px, 4vh, 34px); }
.tag {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 4px 10px; background: rgba(255, 255, 255, 0.5);
}
.eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.26em; color: var(--accent);
  margin-left: 6px;
}
.hero-title { font-size: clamp(38px, 6.4vw, 74px); line-height: 1.22; letter-spacing: 0.02em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .reveal { display: inline-block; }
.hero-sub { max-width: 36em; margin-top: clamp(22px, 4vh, 36px); color: var(--muted); font-size: clamp(15px, 1.7vw, 18px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(26px, 4.5vh, 40px); }
.hero-meta {
  margin-top: clamp(18px, 3vh, 24px);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; letter-spacing: 0.14em; color: var(--muted);
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 30px; border: 1px solid var(--ink); border-radius: 999px;
  font-size: 14px; letter-spacing: 0.1em; position: relative; overflow: hidden;
  transition: color 0.45s var(--ease-out-expo);
}
.btn-solid { background: var(--ink); color: var(--bg); transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(22, 22, 26, 0.5); }
.btn:not(.btn-solid)::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: translateY(101%); border-radius: 999px;
  transition: transform 0.5s var(--ease-out-expo);
}
.btn:not(.btn-solid):hover::before { transform: translateY(0); }
.btn:not(.btn-solid):hover { color: var(--bg); }
.btn span { position: relative; z-index: 1; }
.btn-arrow { transition: transform 0.5s var(--ease-out-expo); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn-solid:hover .btn-arrow { transform: translateY(3px); }

/* 交互式工作台示意（纯前端） */
.hero-visual { margin-top: clamp(40px, 6vh, 64px); }
.demo-heading {
  display: flex; justify-content: space-between; align-items: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--muted);
  padding-bottom: 14px;
}
.demo-heading-left { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.demo-suffix { color: rgba(22, 22, 26, 0.4); letter-spacing: 0.04em; margin-left: 4px; }
.demo-counter { color: var(--muted); }

.window {
  background: var(--frame-bg);
  border: 1px solid rgba(22, 22, 26, 0.2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #e8e6e0;
}
.titlebar {
  height: 42px; display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: #15151a; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px;
}
.titlebar-dots { display: flex; gap: 6px; }
.titlebar-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); }
.titlebar-dots i:first-child { background: rgba(255, 255, 255, 0.3); border-color: transparent; }
.titlebar-title { margin: auto; color: rgba(232, 230, 224, 0.66); letter-spacing: 0.04em; }
.titlebar-title span { color: rgba(255, 255, 255, 0.25); padding: 0 5px; }
.titlebar-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 9.5px; letter-spacing: 0.16em; color: rgba(237, 234, 227, 0.45);
}
.status-pulse, .thread-top-state span { width: 5px; height: 5px; border-radius: 50%; background: #8fae91; }

.workspace { display: grid; grid-template-columns: 232px minmax(0, 1fr) 264px; min-height: 400px; }

/* 左栏 */
.rail { background: #141418; border-right: 1px solid rgba(255, 255, 255, 0.07); padding: 16px 10px 10px; display: flex; flex-direction: column; min-width: 0; }
.rail-header { display: flex; align-items: center; gap: 10px; padding: 2px 10px 20px; font-size: 12.5px; color: rgba(237, 234, 227, 0.86); }
.rail-logo { display: grid; place-items: center; width: 24px; height: 24px; background: #edeae3; color: #14141a; font-family: Georgia, serif; font-size: 17px; border-radius: 6px; }
.rail-section { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px; letter-spacing: 0.16em; color: rgba(237, 234, 227, 0.32); padding: 0 12px 9px; }
.rail-section-small { padding-top: 18px; }
.rail-project { margin: 0 3px; display: flex; align-items: center; gap: 9px; border-radius: 6px; color: rgba(237, 234, 227, 0.82); background: rgba(255, 255, 255, 0.055); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; padding: 9px 10px; }
.folder-glyph { color: var(--accent); }
.folder-chevron { margin-left: auto; color: rgba(255, 255, 255, 0.3); }
.rail-sessions { display: flex; flex-direction: column; gap: 2px; }
.rail-session { padding: 9px 8px; margin: 0 3px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(237, 234, 227, 0.48); border-radius: 5px; white-space: nowrap; min-width: 0; }
.rail-session.active { background: rgba(255, 255, 255, 0.07); color: #f2f0ea; }
.rail-session span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.rail-session em { margin-left: auto; font-style: normal; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9px; color: rgba(255, 255, 255, 0.28); }
.session-circle { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #8fae91; }
.session-circle.blue { background: #93a9c4; }
.session-circle.violet { background: #a99ac4; }
.rail-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 12px 6px 2px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 10px; color: rgba(237, 234, 227, 0.4); }
.rail-user { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: rgba(237, 234, 227, 0.7); }
.rail-foot-gear { margin-left: auto; font-size: 13px; }

/* 对话 */
.thread { display: flex; flex-direction: column; background: #101014; min-width: 0; }
.thread-top { height: 46px; flex: 0 0 46px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 0 18px; display: flex; align-items: center; justify-content: space-between; }
.thread-title { font-size: 11px; color: rgba(237, 234, 227, 0.86); }
.thread-top-state { display: flex; align-items: center; gap: 7px; font-size: 9.5px; letter-spacing: 0.1em; color: rgba(237, 234, 227, 0.38); }
.thread-content { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { font-size: 11.5px; }
.msg-label { display: flex; align-items: center; gap: 7px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px; letter-spacing: 0.12em; color: rgba(237, 234, 227, 0.36); }
.avatar { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 5px; font-size: 10px; }
.user-avatar { background: rgba(255, 255, 255, 0.1); color: rgba(237, 234, 227, 0.75); }
.agent-avatar { background: rgba(138, 106, 63, 0.28); color: #d8c4a4; font-family: Georgia, serif; }
.msg p { margin: 9px 0 0; line-height: 1.7; }
.msg.user p { color: rgba(237, 234, 227, 0.78); padding: 10px 13px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; background: rgba(255, 255, 255, 0.035); max-width: 470px; }
.msg.agent p { color: rgba(237, 234, 227, 0.6); }
.agent-followup { color: rgba(237, 234, 227, 0.42) !important; }
.tool { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 8px 11px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; margin: 11px 0; min-width: 0; position: relative; overflow: hidden; }
.tool::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: sweep 5s var(--ease-out-expo) infinite; }
.tool-icon { color: #c9a97c; font-size: 13px; }
.tool-name { color: #d8c9b0; }
.tool-path { color: rgba(237, 234, 227, 0.38); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-state { margin-left: auto; color: #8fae91; white-space: nowrap; }
.composer { display: flex; align-items: center; gap: 8px; margin: 6px 16px 0; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 9px; padding: 11px 12px; color: rgba(237, 234, 227, 0.34); font-size: 11px; background: rgba(255, 255, 255, 0.03); }
.composer-plus { color: rgba(237, 234, 227, 0.5); font-size: 15px; }
.composer-placeholder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-model { margin-left: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9px; color: rgba(237, 234, 227, 0.44); white-space: nowrap; }
.composer-send { background: #edeae3; color: #14141a; font-size: 12px; line-height: 1; padding: 5px 7px; border-radius: 5px; }
.composer-hint { padding: 7px 0 12px; text-align: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9px; letter-spacing: 0.1em; color: rgba(237, 234, 227, 0.28); }
.composer-hint span { margin: 0 5px; }

/* 右栏 */
.panel { border-left: 1px solid rgba(255, 255, 255, 0.07); background: #141418; display: flex; flex-direction: column; min-width: 0; }
.panel-head { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 11px; color: rgba(237, 234, 227, 0.7); }
.panel-count { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px; color: rgba(237, 234, 227, 0.38); }
.panel-file { display: flex; align-items: center; gap: 8px; padding: 10px 15px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; color: rgba(237, 234, 227, 0.6); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.panel-file-change { margin-left: auto; color: #c9a97c; }
.diff { display: flex; flex-direction: column; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; line-height: 1.85; padding: 10px 0; overflow: hidden; }
.diff-line { padding: 0 15px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.diff-line.context { color: rgba(201, 169, 124, 0.72); }
.diff-line.normal { color: rgba(237, 234, 227, 0.4); }
.diff-line.add { color: #9fc2a2; background: rgba(122, 166, 126, 0.12); }
.diff-line.remove { color: #c79b9b; background: rgba(176, 118, 118, 0.1); }
.panel-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px; color: rgba(237, 234, 227, 0.4); }
.panel-foot-dot { width: 5px; height: 5px; border-radius: 50%; background: #8fae91; }
.panel-foot-check { margin-left: auto; color: #8fae91; }

/* 场景切换 */
.demo-window.scene-enter .thread-content, .demo-window.scene-enter .diff { animation: sceneIn 0.55s var(--ease-out-expo) both; }
@keyframes sceneIn { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.demo-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.demo-tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 8px 15px; font-size: 12px; color: var(--muted); cursor: pointer;
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.demo-tab:hover { color: var(--ink); border-color: rgba(22, 22, 26, 0.3); }
.demo-tab.is-active { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.demo-tab-index { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; opacity: 0.62; }

figcaption {
  margin-top: 14px; font-size: 12px; letter-spacing: 0.1em; color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* 导航经过深色段时切换反色 */
.nav.on-dark {
  background: rgba(20, 20, 26, 0.74);
  border-bottom-color: rgba(237, 234, 227, 0.14);
}
.nav.on-dark .brand { color: #edeae3; }
.nav.on-dark .brand-mark { background: #edeae3; color: #14141a; }
.nav.on-dark .nav-links a { color: rgba(237, 234, 227, 0.62); }
.nav.on-dark .nav-links a::after { background: #edeae3; }
.nav.on-dark .nav-links a:hover { color: #edeae3; }

/* 区块骨架 */
.section {
  max-width: var(--max-w); margin: 0 auto;
  padding: clamp(76px, 12vh, 140px) clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--hairline);
}
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: clamp(40px, 6.5vh, 72px); flex-wrap: wrap; }
.sec-num { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--accent); }
.sec-label { font-size: 12px; letter-spacing: 0.26em; color: var(--muted); }
.sec-rule { flex: 1; height: 1px; background: var(--hairline); min-width: 40px; align-self: center; }
.sec-meta { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }
.sec-title { font-size: clamp(30px, 4.8vw, 52px); line-height: 1.32; letter-spacing: 0.02em; margin-bottom: clamp(34px, 5.5vh, 56px); }
.sec-body p { max-width: 40em; margin-bottom: 1.35em; font-size: clamp(15px, 1.6vw, 17px); }

/* 浅色带（全幅出血但内容不越界） */
.band-pale {
  background: var(--pale);
  box-shadow: 0 0 0 100vmax var(--pale);
  clip-path: inset(0 -100vmax);
  border-top-color: rgba(22, 22, 26, 0.08);
}

/* 深色带 */
.band-dark { background: #14141a; color: #edeae3; }
.band-dark .section { border-top: none; }
.band-dark .sec-num { color: #c9a97c; }
.band-dark .sec-label, .band-dark .sec-meta, .band-dark .sec-body p, .band-dark .privacy-row span { color: rgba(237, 234, 227, 0.6); }
.band-dark .sec-rule { background: rgba(237, 234, 227, 0.16); }
.band-dark .privacy-row { border-top-color: rgba(237, 234, 227, 0.18); }
.band-dark .privacy-row strong { color: #edeae3; }

/* 功能清单 */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 56px; }
.feature { padding: 26px 20px 26px 0; border-bottom: 1px solid var(--hairline); position: relative; transition: padding-left 0.45s var(--ease-out-expo); }
.feature::before {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 0; height: 1px; background: var(--ink);
  transition: width 0.7s var(--ease-out-expo);
}
.feature:hover::before { width: 100%; }
.feature:hover { padding-left: 10px; }
.f-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.f-idx { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--accent); }
.feature h3 { font-size: 20px; letter-spacing: 0.02em; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* 工作流 */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hairline); }
.flow li { padding: 28px 26px 0 0; position: relative; }
.flow li + li { border-left: 1px solid var(--hairline); padding-left: 26px; }
.flow-idx { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--accent); }
.flow h3 { font-size: 19px; margin: 18px 0 8px; }
.flow p { font-size: 14px; color: var(--muted); }
.flow li::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 2px; background: var(--ink);
  transition: width 0.9s var(--ease-out-expo); transition-delay: 0.15s;
}
.flow li.is-in::before { width: 100%; }

/* 架构 */
.arch-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.arch-copy .sec-title { margin-bottom: 24px; }
.arch-copy > p { color: var(--muted); font-size: 15.5px; max-width: 34em; }
.notes { list-style: none; margin-top: 34px; border-top: 1px solid var(--hairline); }
.notes li { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.n-idx { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--accent); padding-top: 3px; }
.notes h4 { font-size: 16px; margin-bottom: 4px; }
.notes p { font-size: 14px; color: var(--muted); }

.arch-diagram {
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.55);
  padding: clamp(20px, 3vw, 30px);
}
.arch-layer { border: 1px solid var(--hairline); border-radius: 10px; padding: 16px 18px; background: var(--bg); }
.arch-layer .a-label { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
.arch-layer h4 { font-size: 17px; margin: 6px 0 2px; }
.arch-layer p { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--muted); }
.arch-connector { height: 44px; display: flex; align-items: center; gap: 12px; padding-left: 28px; position: relative; }
.arch-connector i { width: 1px; height: 100%; background: var(--hairline); position: relative; }
.arch-connector i::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
  animation: drift 3.4s var(--ease-out-expo) infinite;
}
@keyframes drift { 0% { top: 8%; opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
.arch-connector span { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; letter-spacing: 0.14em; color: var(--muted); }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.card { background: var(--bg); padding: clamp(28px, 3.6vw, 42px); transition: background 0.5s ease; }
.card:hover { background: #f2f1ec; }
.card-idx { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--accent); display: block; margin-bottom: 20px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* 数据行 */
.privacy-row {
  list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border-top: 1px solid var(--hairline); margin-top: clamp(34px, 5.5vh, 56px);
}
.privacy-row li { padding: 24px 18px 0 0; }
.privacy-row strong { display: block; font-family: Georgia, serif; font-weight: 400; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; }
.privacy-row span { font-size: 11.5px; letter-spacing: 0.12em; }

/* 步骤 */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 780px; }
.step { display: flex; gap: clamp(20px, 3.5vw, 40px); padding: 32px 0; border-bottom: 1px solid var(--hairline); }
.step > div { min-width: 0; }
.step:first-child { border-top: 1px solid var(--hairline); }
.s-num { font-family: Georgia, serif; font-size: clamp(30px, 3.6vw, 44px); line-height: 1; color: var(--accent); flex-shrink: 0; min-width: 1.4em; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; max-width: 34em; }
.code {
  margin-top: 14px; padding: 16px 20px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.7; color: #e8e6e1; background: var(--frame-bg);
  border-radius: 10px; overflow-x: auto;
}
.code code { white-space: pre; }
.code { max-width: 100%; }
.inline { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; background: rgba(22, 22, 26, 0.06); padding: 2px 7px; border-radius: 5px; }
.step p a { color: var(--ink); border-bottom: 1px solid var(--hairline); }

/* 下载 */
.dl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 760px; }
.dl-card {
  position: relative; padding: 30px 32px; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.55);
  transition: transform 0.5s var(--ease-out-expo), border-color 0.5s ease, box-shadow 0.5s var(--ease-out-expo);
}
.dl-card:hover { transform: translateY(-4px); border-color: rgba(22, 22, 26, 0.35); box-shadow: 0 18px 44px -20px rgba(22, 22, 26, 0.25); }
.dl-card h3 { font-size: 19px; margin-bottom: 6px; }
.dl-card p { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--muted); }
.dl-arrow { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); transition: color 0.4s ease, transform 0.5s var(--ease-out-expo); }
.dl-card:hover .dl-arrow { color: var(--ink); transform: translateY(-50%) translateX(4px); }
.dl-note { margin-top: 26px; font-size: 13.5px; color: var(--muted); }
.dl-note a { color: var(--ink); border-bottom: 1px solid var(--hairline); }

/* 常见问题 */
.faq { border-top: 1px solid var(--hairline); max-width: 800px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px; font-size: 16.5px; font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-weight: 600;
  transition: color 0.3s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { font-family: -apple-system, sans-serif; font-weight: 300; font-size: 20px; color: var(--muted); transition: transform 0.45s var(--ease-out-expo); }
.faq details[open] summary span { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 4px 22px; color: var(--muted); font-size: 14.5px; max-width: 44em; }

/* 页脚 */
.footer {
  max-width: var(--max-w); margin: 0 auto;
  padding: 30px clamp(20px, 5vw, 56px) 46px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; letter-spacing: 0.1em; color: var(--muted);
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--muted); transition: color 0.3s ease; }
.footer a:hover { color: var(--ink); }

/* 入场动画 */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1s var(--ease-out-expo), transform 1.15s var(--ease-out-expo);
  transition-delay: calc(var(--d, 0) * 100ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.delay-1 { --d: 1; }
.delay-2 { --d: 2; }
.delay-3 { --d: 3; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tool::after, .caret, .arch-connector i::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* 响应式 */
@media (max-width: 900px) {
  .workspace { grid-template-columns: 140px 1fr; }
  .panel { display: none; }
  .arch-layout { grid-template-columns: 1fr; }
  .arch-diagram { order: 2; }
}
@media (max-width: 640px) {
  .nav { padding: 13px 18px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 11px; letter-spacing: 0.06em; }
  .hero-top { gap: 8px; }
  .eyebrow { width: 100%; margin-left: 0; margin-top: 4px; }
  .workspace { grid-template-columns: 1fr; height: auto; min-height: 300px; }
  .rail { display: none; }
  .thread { padding: 18px; }
  .msg { max-width: 94%; }
  .feature-list { gap: 0; }
  .flow { grid-template-columns: 1fr; }
  .flow li { padding: 24px 0 0; }
  .flow li + li { border-left: 0; border-top: 1px solid var(--hairline); padding-left: 0; }
  .flow li::before { display: none; }
  .step { flex-direction: column; gap: 10px; }
  .dl-card { padding: 24px; }
  .footer { flex-direction: column; }
  .faq summary { font-size: 15.5px; }
}

/* 对照 */
.compare-lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 17px); max-width: 42em; margin-bottom: clamp(30px, 4.5vh, 44px); }
.compare { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.compare-col { padding: clamp(24px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px) 0; }
.compare-col + .compare-col { border-left: 1px solid var(--hairline); padding-left: clamp(24px, 3.4vw, 40px); padding-right: 0; }
.c-label { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; letter-spacing: 0.24em; color: var(--accent); }
.compare-col h3 { font-size: clamp(19px, 2.2vw, 24px); margin: 12px 0 18px; }
.compare-col ul { list-style: none; display: grid; gap: 12px; }
.compare-col li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--muted); }
.compare-col li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 12px; height: 1px; background: var(--hairline); }
.compare-note { margin-top: 22px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }

@media (max-width: 640px) {
  .compare { grid-template-columns: 1fr; }
  .compare-col + .compare-col { border-left: 0; border-top: 1px solid var(--hairline); padding-left: 0; }
}

/* 标题防断行 */
.nowrap { white-space: nowrap; }

/* 命令复制 */
.code-wrap { position: relative; margin-top: 14px; }
.code-wrap .code { margin-top: 0; padding-right: 108px; }
.copy-command {
  position: absolute; top: 10px; right: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.08em;
  color: rgba(232, 230, 224, 0.62);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px; padding: 5px 10px; cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}
.copy-command:hover { color: #fff; background: rgba(255, 255, 255, 0.13); }

/* 下载区状态与文件信息 */
.release-status {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted);
  margin-bottom: 18px;
}
.dl-size {
  display: block; margin-top: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.08em; color: rgba(109, 109, 116, 0.8);
}

/* 更新日志 */
.sec-link {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.08em; color: var(--muted);
  transition: color 0.3s ease;
  align-self: center;
}
.sec-link:hover { color: var(--ink); }
.release-list { border-top: 1px solid var(--hairline); max-width: 900px; }
.release-item {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 32px;
  gap: clamp(16px, 3vw, 40px);
  padding: 26px 0; border-bottom: 1px solid var(--hairline);
  align-items: start;
}
.release-stamp { display: flex; flex-direction: column; gap: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.release-version { font-size: 13px; color: var(--ink); letter-spacing: 0.04em; }
.release-date { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }
.release-copy h3 { font-size: 18px; margin-bottom: 6px; }
.release-copy p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.release-link {
  justify-self: end; color: var(--muted); font-size: 16px;
  transition: color 0.3s ease, transform 0.4s var(--ease-out-expo);
}
.release-link:hover { color: var(--ink); transform: translate(2px, -2px); }
.release-placeholder { padding: 26px 0; font-size: 13.5px; color: var(--muted); }
.release-placeholder a { color: var(--ink); border-bottom: 1px solid var(--hairline); }

@media (max-width: 640px) {
  .release-item { grid-template-columns: 1fr; gap: 10px; }
  .release-link { display: none; }
  .demo-tab { padding: 7px 12px; font-size: 11.5px; }
  .demo-heading { font-size: 10px; letter-spacing: 0.1em; }
  .demo-suffix { display: none; }
  .code-wrap .code { padding-right: 92px; font-size: 12px; }
  .copy-command { font-size: 10px; padding: 4px 8px; }
}

@media (max-width: 640px) {
  .hero-title { font-size: clamp(30px, 8.8vw, 36px); }
}

@media (max-width: 640px) {
  .demo-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .demo-tab { justify-content: flex-start; padding: 8px 12px; }
}
