/* =========================================================
   作品集样式：大字号、留白、滚动驱动的出场动画；深浅两套色板
   ========================================================= */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f2f2f6;
  --bg-elev: #ffffff;
  --fg: #1d1d1f;
  --fg-2: #50545c;
  --fg-3: #858a93;
  --line: rgba(0, 0, 0, .09);
  --line-2: rgba(0, 0, 0, .16);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.07);
  --nav-bg: rgba(251, 251, 253, .72);

  --blue: #2a6df4;
  --violet: #7b5cff;
  --teal: #0f9f8f;
  --green: #1f9d55;
  --amber: #c27400;
  --red: #d33a3a;
  --sea: #1f7fd1;
  --sun: #e8730c;
  --coral: #e0436e;

  --accent: var(--blue);
  --accent-2: var(--violet);

  --ok-bg: rgba(31, 157, 85, .12);
  --ask-bg: rgba(194, 116, 0, .13);
  --deny-bg: rgba(211, 58, 58, .12);

  --radius: 22px;
  --radius-sm: 12px;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, system-ui, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #0c0c0e;
    --bg-elev: #151518;
    --fg: #f5f5f7;
    --fg-2: #a8abb2;
    --fg-3: #7a7e86;
    --line: rgba(255, 255, 255, .11);
    --line-2: rgba(255, 255, 255, .2);
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 40px rgba(0,0,0,.5);
    --nav-bg: rgba(10, 10, 12, .7);
    --blue: #5b93ff;
    --violet: #a08cff;
    --teal: #2cc7b4;
    --green: #3fcf7f;
    --amber: #f2a93b;
    --red: #ff6b6b;
    --sea: #52a9f5;
    --sun: #ff9a3c;
  --coral: #ff6f91;
    --ok-bg: rgba(63, 207, 127, .15);
    --ask-bg: rgba(242, 169, 59, .16);
    --deny-bg: rgba(255, 107, 107, .15);
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0c0c0e;
  --bg-elev: #151518;
  --fg: #f5f5f7;
  --fg-2: #a8abb2;
  --fg-3: #7a7e86;
  --line: rgba(255, 255, 255, .11);
  --line-2: rgba(255, 255, 255, .2);
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 40px rgba(0,0,0,.5);
  --nav-bg: rgba(10, 10, 12, .7);
  --blue: #5b93ff;
  --violet: #a08cff;
  --teal: #2cc7b4;
  --green: #3fcf7f;
  --amber: #f2a93b;
  --red: #ff6b6b;
  --sea: #52a9f5;
  --sun: #ff9a3c;
  --coral: #ff6f91;
  --ok-bg: rgba(63, 207, 127, .15);
  --ask-bg: rgba(242, 169, 59, .16);
  --deny-bg: rgba(255, 107, 107, .15);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: .88em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--bg-elev); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* 需要用户补的内容：虚线标出来 */
.ph-inline {
  display: inline-block;
  padding: 0 .35em;
  border: 1.5px dashed var(--amber);
  border-radius: 6px;
  color: var(--amber);
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 52px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--wrap); height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.brand { font-weight: 700; color: var(--fg); font-size: 15px; white-space: nowrap; }
.brand .ph-inline { font-size: 13px; }
.nav-links { display: flex; gap: clamp(12px, 3vw, 28px); margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--fg-2); font-size: 13.5px; white-space: nowrap; transition: color .2s; }
.nav-links a:hover, .nav-links a.on { color: var(--fg); text-decoration: none; }
.theme-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .i-moon { fill: var(--fg); stroke: none; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* ---------- 通用文字层级 ---------- */
.eyebrow { font-size: 14px; font-weight: 600; color: var(--fg-3); letter-spacing: .04em; margin-bottom: 14px; }
.p-name { font-size: clamp(44px, 8vw, 96px); font-weight: 800; letter-spacing: -.025em; }
.p-name.small { font-size: clamp(36px, 6vw, 64px); }
.p-line { font-size: clamp(28px, 4.6vw, 56px); font-weight: 700; line-height: 1.18; margin-top: 18px; letter-spacing: -.015em; }
.p-lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--fg-2); max-width: 760px; margin-top: 28px; line-height: 1.7; }
.block-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; }
.block-sub { color: var(--fg-2); margin-top: 10px; max-width: 720px; }
.small-note { font-size: 14px; color: var(--fg-3); }

.chips { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-alt); color: var(--fg-2); border: 1px solid var(--line);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 999px; font-size: 16px; font-weight: 600;
  transition: transform .2s var(--ease), background-color .2s, opacity .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { color: var(--accent); border: 1px solid var(--line-2); }

/* ---------- 项目索引卡 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  display: block; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; color: var(--fg); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.card:hover { text-decoration: none; transform: translateY(-4px); }
.card h3 { font-size: 24px; margin: 6px 0 10px; }
.card p { color: var(--fg-2); font-size: 15.5px; }
.idx-no { font-size: 13px; font-weight: 700; color: var(--accent); }
.idx-tags { display: block; margin-top: 16px; font-size: 13px; color: var(--fg-3); }

/* ---------- 项目区块 ---------- */
.project { padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 6vw, 80px); position: relative; }
.project + .project { border-top: 1px solid var(--line); }
.wise { --accent: var(--blue); --accent-2: var(--violet); }
.token { --accent: var(--teal); --accent-2: var(--blue); background: var(--bg-alt); }
.pirate { --accent: var(--sun); --accent-2: var(--coral); }
.p-head { margin-bottom: clamp(50px, 8vw, 100px); }

/* ---------- 出场动画（JS 启用时） ---------- */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* 大标语：支持滚动时间线就跟着滚动放大，否则用 IntersectionObserver 出场 */
.js .zoom-in {
  opacity: 0; transform: scale(.9);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transform-origin: left center;
}
.js .zoom-in.in { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  .js .zoom-in, .js .zoom-in.in {
    transition: none;
    animation: zoomIn linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  @keyframes zoomIn { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
}

/* ---------- Wise 架构：粘性图 + 分步文字 ---------- */
.story { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.story-visual { position: sticky; top: 76px; }
.arch {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 0;
}
.arch-row { display: flex; justify-content: center; gap: 8px; width: 100%; flex-wrap: wrap; }
.node {
  min-width: 150px; text-align: center; padding: 9px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg-alt);
  transition: border-color .45s var(--ease), background-color .45s var(--ease), transform .45s var(--ease), opacity .45s var(--ease), box-shadow .45s var(--ease);
  opacity: .55;
}
.node b { display: block; font-size: 15px; }
.node small { display: block; font-size: 11.5px; color: var(--fg-3); line-height: 1.45; }
.node-sm { min-width: 0; flex: 1 1 88px; padding: 7px 8px; }
.node-sm b { font-size: 13px; }
.node-sm small { font-size: 10.5px; }
.node-key { min-width: 230px; }
.node-ext { border-style: dashed; }
.v { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 6px; margin: 4px 2px 2px; font-weight: 600; }
.v-allow { background: var(--ok-bg); color: var(--green); }
.v-ask { background: var(--ask-bg); color: var(--amber); }
.v-deny { background: var(--deny-bg); color: var(--red); }
.arch-link { width: 2px; height: 18px; background: var(--line-2); position: relative; transition: background-color .45s; }
.arch-link::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 7px; height: 7px; margin-left: -3.5px;
  border-right: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); transform: rotate(45deg);
  transition: border-color .45s;
}
.arch-return {
  margin-top: 14px; font-size: 12.5px; color: var(--fg-3); padding: 6px 12px; border-radius: 999px;
  border: 1px dashed var(--line-2); opacity: .55; transition: all .45s var(--ease);
  font-family: var(--mono);
}
.arch .on { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--bg-elev)); transform: scale(1.03); box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.arch .arch-link.on { background: var(--accent); transform: none; box-shadow: none; }
.arch .arch-link.on::after { border-color: var(--accent); }
.arch .arch-return.on { color: var(--accent); }
.arch[data-active="0"] .node { opacity: .9; }

.story-steps { list-style: none; margin: 0; padding: 8vh 0 18vh; }
.step {
  min-height: 52vh; padding: 0 0 40px; position: relative;
  opacity: .35; transition: opacity .5s var(--ease);
}
.step.on { opacity: 1; }
.step-no {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-size: 14px; font-weight: 700; background: var(--accent); color: #fff; margin-bottom: 14px;
}
.step h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 12px; }
.step p { color: var(--fg-2); font-size: 17px; }

/* ---------- 回放窗口 ---------- */
.replay-block { margin-top: clamp(60px, 10vw, 120px); }
.block-head { margin-bottom: 26px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 8px 16px;
  font-size: 14px; cursor: pointer; color: var(--fg-2); transition: all .25s var(--ease);
}
.tab[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.window {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.win-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--fg-3);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.win-title { font-weight: 600; color: var(--fg-2); }
.win-badge { margin-left: auto; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--ask-bg); color: var(--amber); font-weight: 600; }

.chat {
  height: 470px; overflow-y: auto; padding: 22px clamp(14px, 3vw, 28px);
  display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth;
}
.chat > * { flex-shrink: 0; }
.msg { max-width: 82%; animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.msg-user { align-self: flex-end; background: var(--accent); color: #fff; padding: 10px 15px; border-radius: 18px 18px 4px 18px; }
.msg-bot { align-self: flex-start; background: var(--bg-alt); padding: 12px 16px; border-radius: 18px 18px 18px 4px; border: 1px solid var(--line); }
.msg-bot ul { margin: 6px 0 0; padding-left: 1.2em; }
.msg-sys { align-self: center; font-size: 12.5px; color: var(--fg-3); }

.tool {
  align-self: flex-start; width: min(100%, 560px); border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); font-size: 13.5px; overflow: hidden; animation: pop .45s var(--ease) both;
}
.tool-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tool-name { font-family: var(--mono); font-weight: 600; font-size: 12.5px; overflow-wrap: anywhere; }
.tool-args { font-family: var(--mono); font-size: 12px; color: var(--fg-2); padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.verdict { margin-left: auto; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.verdict.allow { background: var(--ok-bg); color: var(--green); }
.verdict.ask { background: var(--ask-bg); color: var(--amber); }
.verdict.deny { background: var(--deny-bg); color: var(--red); }
.verdict.pending { background: var(--bg-alt); color: var(--fg-3); }
.tool-res { padding: 8px 12px; border-top: 1px dashed var(--line); color: var(--fg-2); font-size: 12.5px; }
.tool-res .ut { font-family: var(--mono); color: var(--fg-3); }
.tool-res .warn { color: var(--red); font-weight: 600; }
.spin { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.approve {
  align-self: flex-start; width: min(100%, 520px); border: 1.5px solid var(--amber); border-radius: 16px;
  padding: 14px 16px; background: color-mix(in srgb, var(--amber) 7%, var(--bg-elev)); animation: pop .45s var(--ease) both;
}
.approve h5 { margin: 0 0 6px; font-size: 15px; }
.approve p { font-size: 13.5px; color: var(--fg-2); }
.approve .ap-why { font-size: 12.5px; color: var(--amber); margin-top: 8px; }
.ap-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ap-btn { border: 1px solid var(--line-2); background: var(--bg-elev); border-radius: 10px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.ap-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-btn[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.ap-btn.chosen[disabled] { opacity: 1; text-decoration: none; cursor: default; }
.ap-btn.pulse { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.ap-done { margin-top: 10px; font-size: 12.5px; color: var(--green); font-weight: 600; }

.win-ctrl {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.ctrl {
  border: 1px solid var(--line-2); background: var(--bg-elev); border-radius: 999px; padding: 6px 14px;
  font-size: 13.5px; cursor: pointer; transition: background-color .2s;
}
.ctrl:hover { background: var(--bg-alt); }
.ctrl[data-act="play"] { background: var(--fg); color: var(--bg); border-color: var(--fg); min-width: 82px; }
.ctrl:disabled { opacity: .45; cursor: default; }
.ctrl-note { font-size: 12.5px; color: var(--fg-3); margin-left: auto; }

/* ---------- 数字 ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: clamp(70px, 10vw, 130px);
}
.stat { border-top: 1px solid var(--line-2); padding-top: 18px; }
.stat-num { display: block; font-size: clamp(34px, 4.2vw, 54px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-lbl { display: block; margin-top: 10px; font-size: 15px; color: var(--fg); font-weight: 600; }
.stat-lbl small { font-weight: 400; color: var(--fg-3); font-size: 13px; }

/* ---------- 能力卡片 ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(60px, 8vw, 100px); }
.feat { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.token .feat, .token .card { background: var(--bg-elev); }
.feat h4 { font-size: 19px; margin-bottom: 10px; }
.feat p { font-size: 15px; color: var(--fg-2); }

/* ---------- 待补素材占位 ---------- */
.media-slot { margin-top: clamp(50px, 7vw, 90px); }
.ph-box {
  position: relative; border: 2px dashed var(--amber); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--amber) 5%, transparent) 14px 28px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 28px; color: var(--fg-2); gap: 10px;
}
.ph-16x9 { aspect-ratio: 16 / 9; }
.ph-16x10 { aspect-ratio: 16 / 10; }
.ph-box p { max-width: 560px; font-size: 15px; }
.ph-box code { font-size: 12.5px; color: var(--fg-3); overflow-wrap: anywhere; }
.ph-tag { position: absolute; top: 14px; left: 14px; font-size: 12px; font-weight: 700; color: var(--amber); background: var(--ask-bg); padding: 2px 9px; border-radius: 6px; }

/* ---------- Token 回放 ---------- */
.tok {
  display: grid; grid-template-columns: 1fr 300px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.tok-main { padding: 22px; min-width: 0; border-right: 1px solid var(--line); }
.tok-side { padding: 22px; min-width: 0; }
.tok-ctrl { grid-column: 1 / -1; }
.tok-label { display: block; font-size: 12px; font-weight: 700; color: var(--fg-3); letter-spacing: .04em; margin-bottom: 8px; }
.tok-label small { font-weight: 400; letter-spacing: 0; }
.tok-prompt pre {
  margin: 0 0 20px; white-space: pre-wrap; font-family: var(--font); font-size: 14px; color: var(--fg-2);
  background: var(--bg-alt); border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--line);
}
.tok-out {
  min-height: 132px; font-size: 22px; line-height: 1.9; padding: 4px 2px; white-space: pre-wrap;
  font-feature-settings: "palt";
}
.t {
  display: inline; position: relative; border-radius: 4px; padding: 1px 1px;
  background: color-mix(in srgb, var(--accent) calc(var(--u, 0) * 34%), transparent);
  animation: tokIn .35s var(--ease) both;
  cursor: help;
}
@keyframes tokIn { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }
.t.picked { outline: 2px solid var(--accent); outline-offset: 1px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.t.cut { text-decoration: line-through; text-decoration-color: var(--red); opacity: .38; animation: none; }
.t.sampled-low { box-shadow: inset 0 -2px 0 var(--amber); }
.tok-cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -3px; animation: blink 1s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.tok-banner {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px;
  border: 1px solid var(--line); background: var(--bg-alt); color: var(--fg-2); animation: pop .4s var(--ease) both;
}
.tok-banner b { color: var(--fg); }
.tok-banner.bad { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--deny-bg); }
.tok-banner.edit { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.tok-banner.good { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--ok-bg); }

.cands { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 230px; }
.cand { display: grid; grid-template-columns: 70px 1fr 64px; align-items: center; gap: 8px; font-size: 14px; }
.cand-t { font-weight: 600; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.cand-bar { height: 8px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; border: 1px solid var(--line); }
.cand-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--fg-3); border-radius: 4px; transition: width .4s var(--ease); }
.cand.chosen .cand-bar i { background: var(--accent); }
.cand.chosen .cand-t { color: var(--accent); }
.cand.human .cand-bar i { background: var(--amber); }
.cand.human .cand-t { color: var(--amber); }
.cand-p { font-family: var(--mono); font-size: 12px; color: var(--fg-3); text-align: right; }
.tok-counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 0; }
.tok-counters div { background: var(--bg-alt); border-radius: 10px; padding: 8px 10px; }
.tok-counters dt { font-size: 11px; color: var(--fg-3); }
.tok-counters dd { margin: 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 基准图 ---------- */
.bench { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: clamp(70px, 10vw, 130px); }
.bench-text p { color: var(--fg-2); margin-top: 16px; }
.chart { margin: 0; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { stroke: var(--line-2); stroke-width: 1; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--fg-3); font-size: 11px; font-family: var(--font); }
.chart .s-full { stroke: var(--fg-3); }
.chart .s-pref { stroke: var(--accent); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.6s var(--ease); }
.chart.drawn .line { stroke-dashoffset: 0; }
.chart .dot-full { fill: var(--fg-3); }
.chart .dot-pref { fill: var(--accent); }
.chart .lbl { font-size: 12px; font-weight: 600; font-family: var(--font); }
.chart .lbl-full { fill: var(--fg-2); }
.chart .lbl-pref { fill: var(--accent); }
.chart figcaption { font-size: 12.5px; color: var(--fg-3); margin-top: 6px; }

/* ---------- 实验结论 ---------- */
.exp { margin-top: clamp(70px, 10vw, 130px); }
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; }
.exp-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.exp-num { display: block; font-size: 34px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.exp-card p { font-size: 14.5px; color: var(--fg-2); }
.honest { margin-top: 22px; padding: 18px 20px; border-left: 3px solid var(--amber); background: var(--bg-elev); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--fg-2); font-size: 15px; max-width: 900px; }

/* ---------- Token 架构 ---------- */
.tarch-head { margin-top: clamp(70px, 10vw, 120px); margin-bottom: 24px; }
.tarch { display: flex; flex-direction: column; align-items: stretch; }
.layer { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 16px; position: relative; }
.layer-name { display: block; text-align: center; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.lboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lboxes.three { grid-template-columns: repeat(3, 1fr); }
.lbox { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.lbox b { display: block; font-size: 15px; }
.lbox small { display: block; color: var(--fg-3); font-size: 12.5px; line-height: 1.55; margin-top: 4px; }
.layer-link { display: flex; justify-content: center; position: relative; height: 44px; align-items: center; }
.layer-link::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--accent); opacity: .6; }
.layer-link span { position: relative; background: var(--bg-alt); padding: 0 10px; font-size: 12.5px; color: var(--fg-3); font-family: var(--mono); }

/* ---------- 游戏页预留位 ---------- */
.ph-soon { border-color: var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--fg) 3%, transparent) 14px 28px); }
.ph-soon .ph-tag { color: var(--fg-3); background: var(--bg-alt); }
.media-slot.grid-3 { margin-top: 18px; }
.downloads { margin-top: 26px; color: var(--fg-2); font-size: 15px; }

/* ---------- 真实素材（由 site.js 在文件存在时替换占位框） ---------- */
.media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); box-shadow: var(--shadow); }
.media img, .media video { display: block; width: 100%; height: auto; }
.media figcaption { padding: 10px 14px; font-size: 13px; color: var(--fg-3); border-top: 1px solid var(--line); background: var(--bg-elev); }
.clips { margin-top: clamp(60px, 9vw, 110px); }
/* ---------- 关于 / 页脚 ---------- */
.about { padding: clamp(90px, 12vw, 150px) 0; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-top: 40px; }
.about h4 { font-size: 15px; color: var(--fg-3); margin-bottom: 4px; }
.contact { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--fg-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3, .features { grid-template-columns: 1fr 1fr; }
  .stats, .exp-grid { grid-template-columns: 1fr 1fr; }
  .bench { grid-template-columns: 1fr; }
  .tok { grid-template-columns: 1fr; }
  .tok-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .cands { min-height: 0; }
}
@media (max-width: 820px) {
  .story { grid-template-columns: 1fr; }
  .story-visual { position: sticky; top: 56px; z-index: 2; }
  .arch { padding: 10px; border-radius: 16px; }
  .arch-row { gap: 5px; }
  .node { min-width: 110px; padding: 4px 10px; border-radius: 10px; }
  .node b { font-size: 13px; }
  .node small { display: none; }
  .node-key small:first-of-type { display: block; }
  .node-key { min-width: 0; }
  .node-sm { flex: 1 1 56px; padding: 4px 4px; }
  .node-sm b { font-size: 11.5px; }
  .v { font-size: 10px; margin: 2px 1px 0; }
  .arch-link { height: 8px; }
  .arch-link::after { width: 5px; height: 5px; margin-left: -2.5px; }
  .arch-return { margin-top: 6px; font-size: 10.5px; padding: 3px 10px; }
  .story-steps { padding: 6vh 0 12vh; }
  .step { min-height: 62vh; }
  .step.on { opacity: 1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .features, .about-grid, .lboxes, .lboxes.three { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
  .brand { display: none; }
  .chat { height: 440px; }
  .msg { max-width: 92%; }
  .tok-out { font-size: 19px; }
  .cand { grid-template-columns: 60px 1fr 58px; }
  .ctrl-note { margin-left: 0; width: 100%; }
  .stat-num { font-size: 32px; }
  .exp-num { font-size: 28px; }
}
@media (max-width: 340px) {
  .stats, .exp-grid { grid-template-columns: 1fr; }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal, .js .zoom-in { opacity: 1 !important; transform: none !important; animation: none !important; }
  .chat { scroll-behavior: auto; }
  .chart .line { stroke-dashoffset: 0 !important; }
}

/* ================= 重排后新增：系统卡片、旁边入口、子页面 ================= */
.nav-links a.nav-side { color: var(--accent, var(--blue)); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; margin-left: 4px; }
.nav-links a.nav-side:hover { color: var(--fg); }
.idx-no { letter-spacing: .02em; }

.sys-grid { margin-top: 8px; }
.sys-card { display: flex; flex-direction: column; }
.sys-shot { display: block; border-radius: 14px; overflow: hidden; margin-bottom: 18px; transition: transform .35s var(--ease); }
.sys-shot:hover { transform: translateY(-3px); }
.sys-shot .media { border-radius: 14px; box-shadow: none; }
.sys-shot .ph-box { padding: 18px; border-radius: 14px; }
.sys-kicker { font-size: 13px; color: var(--fg-3); font-weight: 600; }
.sys-card h3 { margin-top: 6px; }
.more-link { margin-top: auto; padding-top: 16px; font-weight: 600; font-size: 15px; }
.data-head, .arch-head { margin-top: clamp(70px, 10vw, 120px); margin-bottom: 26px; }
.arch-head + .story { margin-top: 10px; }

.about-h4 { margin-top: 26px; }
.timeline { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; color: var(--fg-2); font-size: 15px; }
.timeline span { display: inline-block; min-width: 150px; color: var(--fg-3); font-variant-numeric: tabular-nums; font-size: 13.5px; }

/* 子页面 */
.sub-hero { padding-top: clamp(110px, 14vw, 170px); padding-bottom: clamp(40px, 6vw, 70px); }
.sub .project:first-of-type { padding-top: clamp(40px, 6vw, 70px); }
.sys-page { --accent: var(--violet); --accent-2: var(--blue); }
.sys-page.jobrec { --accent: var(--green); --accent-2: var(--teal); }
.sec { padding: clamp(50px, 7vw, 90px) 0 0; }
.sec:last-of-type { padding-bottom: clamp(70px, 10vw, 120px); }
.sec .block-head { margin-bottom: 22px; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fact { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.fact h4 { font-size: 18px; margin-bottom: 8px; }
.fact p, .fact li { font-size: 15px; color: var(--fg-2); }
.fact ul { margin: 6px 0 0; padding-left: 1.1em; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12.5px; color: var(--fg-3); font-weight: 700; letter-spacing: .03em; background: var(--bg-alt); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl code { font-size: 12.5px; }
.tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; color: var(--accent); }
.tag-r, .tag-w { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; font-weight: 700; white-space: nowrap; }
.tag-r { background: var(--ok-bg); color: var(--green); }
.tag-w { background: var(--ask-bg); color: var(--amber); }
.states { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px; }
.states span { border: 1px solid var(--line-2); border-radius: 8px; padding: 3px 8px; background: var(--bg-elev); }
.states i { font-style: normal; color: var(--fg-3); }
.formula { font-family: var(--mono); font-size: 14px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm, 12px); padding: 16px 18px; overflow-x: auto; white-space: pre; line-height: 1.7; }
.weights { display: flex; height: 34px; border-radius: 10px; overflow: hidden; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: #fff; }
.weights span { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.shots .ph-box { padding: 18px; }

/* 论文摘录 */
.quotes { display: grid; gap: 18px; }
.quote { margin: 0; background: var(--bg-elev); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 22px; }
.quote h4 { font-size: 17px; margin-bottom: 4px; }
.quote .src { display: block; font-size: 12.5px; color: var(--fg-3); margin-bottom: 12px; }
.quote p { color: var(--fg-2); font-size: 15.5px; line-height: 1.8; }
.quote p + p { margin-top: 10px; }
.quote .mine { display: block; margin-top: 12px; font-size: 14px; color: var(--fg); padding-top: 10px; border-top: 1px dashed var(--line-2); }
.formula-inline { font-family: var(--mono); font-size: .95em; white-space: nowrap; }

@media (max-width: 900px) {
  .fact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .fact-grid, .shots { grid-template-columns: 1fr; }
  .timeline span { display: block; min-width: 0; }
  .nav-links a.nav-side { margin-left: 0; }
}
.token-page { --accent: var(--teal); --accent-2: var(--blue); }
.token-page .token-arch .layer-link span { background: var(--bg); }
.sys-shot .media img { aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
@media (max-width: 640px) {
  .sub .brand { display: block; font-size: 14px; }
}
.quotes > * { min-width: 0; }
@media (max-width: 640px) {
  .formula-inline { white-space: normal; }
  .quote { padding: 16px 16px; }
}

/* ================= 首页：自我介绍 + 项目卡 ================= */
.intro { padding: clamp(120px, 16vw, 190px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.intro::before {
  content: ""; position: absolute; inset: -30% -20% 30% -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 50% at 25% 45%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%),
    radial-gradient(32% 45% at 75% 35%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 70%);
  filter: blur(24px);
}
.intro-name { font-size: clamp(52px, 9vw, 104px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.intro-line { font-size: clamp(24px, 3.6vw, 40px); font-weight: 700; line-height: 1.3; margin-top: 14px; letter-spacing: -.01em; }
.intro .p-lead { margin-top: 22px; }
.intro-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.sec-title { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -.02em; }
.projects { padding: clamp(40px, 6vw, 80px) 0 clamp(70px, 10vw, 120px); }
.projects .block-sub { margin-bottom: clamp(24px, 4vw, 40px); }

.proj {
  display: flex; flex-direction: column; color: var(--fg);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
a.proj:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--line-2); }
.proj-shot { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.proj-shot .media { border: 0; border-radius: 0; box-shadow: none; }
.proj-shot .media img { aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.proj-shot .ph-box { border-radius: 0; border-width: 0 0 2px; }
.proj-text { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.proj-kicker { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.proj h3 { font-size: 24px; margin: 6px 0 10px; }
.proj p { color: var(--fg-2); font-size: 15.5px; line-height: 1.75; }
.proj-tags { margin-top: 14px; font-size: 13px; color: var(--fg-3); }
.proj-go { margin-top: auto; padding-top: 16px; font-weight: 600; font-size: 15px; color: var(--accent); }
.proj-main { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: 18px; }
.proj-main .proj-shot { border-bottom: 0; border-right: 1px solid var(--line); }
.proj-main .proj-text { padding: clamp(24px, 3vw, 40px); justify-content: center; }
.proj-main h3 { font-size: clamp(32px, 4vw, 48px); }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Wise 页底部：其他项目 */
.next-proj { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: clamp(50px, 7vw, 90px); padding-bottom: clamp(50px, 7vw, 90px); }
.next-proj .card { padding: 18px 20px; box-shadow: none; }
.next-proj b { display: block; margin-top: 4px; font-size: 17px; }

/* 页脚：版权一行、备案号一行，居中 */
.foot { text-align: center; line-height: 1.8; }
.foot p + p { margin-top: 4px; }

@media (max-width: 900px) {
  .proj-main { grid-template-columns: 1fr; }
  .proj-main .proj-shot { border-right: 0; border-bottom: 1px solid var(--line); }
  .proj-grid { grid-template-columns: 1fr 1fr; }
}

/* ================= 窄屏：放宽留白和行距；架构图改成竖排 ================= */
@media (max-width: 820px) {
  /* Wise 架构图：不再粘住；节点全部显示说明，工具两列排 */
  .story { gap: 20px; }
  .story-visual { position: static; }
  .only-wide { display: none; }
  .arch { padding: 16px 14px; border-radius: 18px; }
  .arch .node, .arch[data-active="0"] .node { opacity: 1; }
  .arch-row { gap: 8px; }
  .node { min-width: 0; width: 100%; padding: 9px 12px; border-radius: 12px; }
  .node b { font-size: 14.5px; }
  .node small, .node-key small:first-of-type { display: block; font-size: 12px; }
  .arch-tools, .arch-sys { display: grid; grid-template-columns: 1fr 1fr; }
  .arch-tools .node:last-child { grid-column: 1 / -1; }
  .node-sm { padding: 8px 8px; }
  .node-sm b { font-size: 13.5px; }
  .node-sm small { font-size: 11.5px; }
  .v { font-size: 11px; margin: 3px 2px 1px; }
  .arch-link { height: 14px; }
  .arch-return { margin-top: 12px; font-size: 12px; padding: 5px 12px; text-align: center; }
  .story-steps { padding: 0; }
  .step { min-height: 0; padding: 22px 0 6px; border-top: 1px solid var(--line); opacity: 1; }
  .step:first-child { border-top: 0; }
  .step-no { width: 26px; height: 26px; font-size: 13px; margin-bottom: 10px; }
  .step h3 { font-size: 21px; margin-bottom: 8px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --radius: 18px; }
  body { font-size: 16px; line-height: 1.8; }
  p, li { letter-spacing: .015em; }

  /* 导航：子页面只留返回和主题按钮，首页三个短链接 */
  .sub .nav-links { display: none; }
  .sub .theme-btn { margin-left: auto; }
  .home .brand { display: block; }
  .home .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }

  /* 标题和正文 */
  .eyebrow { font-size: 13px; margin-bottom: 10px; }
  .p-name { font-size: 40px; }
  .p-line { font-size: 25px; line-height: 1.35; margin-top: 14px; }
  .p-lead { font-size: 16.5px; line-height: 1.85; margin-top: 20px; }
  .block-title { font-size: 24px; line-height: 1.35; }
  .block-sub { font-size: 15.5px; line-height: 1.8; }
  .sub-hero { padding-top: 92px; padding-bottom: 32px; }
  .chips { margin-top: 20px; gap: 6px; }
  .chips li { font-size: 12.5px; padding: 4px 10px; }
  .btn { padding: 11px 20px; font-size: 15px; }

  /* 首页 */
  .intro { padding: 96px 0 40px; }
  .intro-name { font-size: 52px; }
  .intro-line { font-size: 23px; }
  .intro-cta { gap: 10px; }
  .proj-grid, .next-proj { grid-template-columns: 1fr; gap: 14px; }
  .proj-text, .proj-main .proj-text { padding: 18px 18px 20px; }
  .proj h3 { font-size: 21px; }
  .proj-main h3 { font-size: 30px; }
  .proj p { font-size: 15px; }

  /* 卡片：内边距收小，正文就不会被挤成窄条 */
  .card { padding: 20px; }
  .feat, .fact, .exp-card { padding: 18px; }
  .feat h4, .fact h4 { font-size: 17px; }
  .feat p, .fact p, .fact li, .exp-card p { font-size: 15px; line-height: 1.8; }
  .features, .fact-grid, .shots, .grid-2, .grid-3 { gap: 14px; }
  .stats { gap: 22px 16px; }
  .stat-lbl { font-size: 14.5px; line-height: 1.6; }
  .exp-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .exp-num { font-size: 26px; }
  .project { padding-top: 0; }
  .p-head { margin-bottom: 48px; }
  .about { padding: 64px 0; }
  .about-grid { gap: 28px; margin-top: 24px; }
  .timeline { gap: 12px; }
  .media figcaption { font-size: 12.5px; line-height: 1.6; }

  /* 分层架构图：去掉外层虚线框，层名左对齐，框内文字左对齐 */
  .layer { border: 0; padding: 14px; background: var(--bg-alt); border-radius: 16px; }
  .token .layer, .token-page .layer { background: var(--bg-elev); }
  .layer-name { text-align: left; font-size: 13px; color: var(--fg-3); margin-bottom: 10px; letter-spacing: .03em; }
  .lboxes, .lboxes.three { gap: 8px; }
  .lbox { text-align: left; padding: 11px 13px; border-radius: 12px; }
  .lbox b { font-size: 14.5px; }
  .lbox small { font-size: 12.5px; line-height: 1.6; }
  .layer-link { height: auto; padding: 10px 0; }
  .layer-link span { font-size: 11.5px; line-height: 1.5; padding: 2px 10px; max-width: 86%; text-align: center; white-space: normal; border-radius: 6px; }

  /* 表格：每行一张小卡，列名写在内容前面 */
  .tbl-wrap { border: 0; background: transparent; overflow: visible; }
  .tbl { min-width: 0; font-size: 14.5px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
  .tbl tr + tr { margin-top: 10px; }
  .tbl td { border: 0; padding: 2px 0; line-height: 1.7; }
  .tbl td:first-child { font-weight: 700; font-size: 15px; padding-bottom: 4px; }
  .tbl td + td[data-label]::before { content: attr(data-label) "："; color: var(--fg-3); font-size: 12.5px; font-weight: 600; margin-right: 4px; }
  .tbl .num { white-space: normal; }

  /* 公式和权重条 */
  .formula { font-size: 12.5px; padding: 14px; }

  /* 回放窗口 */
  .chat { padding: 16px 14px; }
  .win-ctrl { padding: 12px 14px; }
  .tok-main, .tok-side { padding: 16px; }
}
@media (max-width: 360px) {
  .exp-grid, .arch-tools, .arch-sys { grid-template-columns: 1fr; }
}
.nb { white-space: nowrap; }
.acc-violet { --accent: var(--violet); }
.acc-green { --accent: var(--green); }
.acc-teal { --accent: var(--teal); }
.weights i { font-style: normal; }
@media (max-width: 640px) {
  .formula { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
  .weights { font-size: 11.5px; height: 30px; }
  .weights .w-name { display: none; }
  .exp-grid { grid-template-columns: 1fr; }
}

/* ================= 页面转场：点进去往深处走，回退往后退；顶栏不动，当参照物 =================
   跨页面的 View Transitions（Chrome / Edge 126+、Safari 18.2+）；不支持的浏览器就是普通跳转。
   方向由每页 <head> 里的 pagereveal 脚本判断，加上 deeper 或 back 类型。 */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.nav { view-transition-name: topbar; }
::view-transition { background: var(--bg); }
::view-transition-group(topbar) { animation: none; z-index: 10; }
/* 顶栏直接换成新页面的，不做淡入淡出：「Shealyn」和「← Shealyn / ← Wise」文字不同，交叉淡化会叠出残影 */
::view-transition-old(topbar) { display: none; }
::view-transition-new(topbar) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .55s;
  animation-timing-function: cubic-bezier(.2, .7, .2, 1);
  animation-fill-mode: both;
  transform-origin: 50% 40%;
}
::view-transition-old(root) { animation-duration: .38s; }
html[data-vt="deeper"]::view-transition-old(root) { animation-name: vt-pass-by; }
html[data-vt="deeper"]::view-transition-new(root) { animation-name: vt-from-far; }
html[data-vt="back"]::view-transition-old(root) { animation-name: vt-recede; }
html[data-vt="back"]::view-transition-new(root) { animation-name: vt-from-near; }
/* 深入：旧页面朝你放大、淡出；新页面从远处（小）推近 */
@keyframes vt-pass-by { to { opacity: 0; transform: scale(1.1); } }
@keyframes vt-from-far { from { opacity: 0; transform: scale(.9); } }
/* 后退：旧页面缩小、退到远处；上一页从近处（大）落回原位 */
@keyframes vt-recede { to { opacity: 0; transform: scale(.9); } }
@keyframes vt-from-near { from { opacity: 0; transform: scale(1.08); } }

/* ================= WorkMind 页：大截图、关键数字、编号功能卡、结果卡 ================= */
.hero-shot { margin-top: clamp(8px, 2vw, 24px); }
.shot-frame {
  border-radius: 18px; overflow: hidden; background: var(--bg-elev);
  border: 1px solid var(--line); box-shadow: 0 30px 80px -20px color-mix(in srgb, var(--accent) 28%, transparent), var(--shadow);
}
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--fg-3); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.shot-bar span { margin-left: 8px; }
.shot-frame .media { border: 0; border-radius: 0; box-shadow: none; }
.shot-frame .ph-box { border-radius: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: clamp(40px, 6vw, 72px); }
.kpi { padding: 20px 4px 0; border-top: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.kpi b {
  display: block; font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.kpi > span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--fg-2); line-height: 1.6; }

.wm .fact { position: relative; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.wm .fact:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.fact-no {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 2px 8px; border-radius: 6px; margin-bottom: 10px;
}
.states.flow { font-family: var(--font); font-size: 13px; }
.states.flow span { background: color-mix(in srgb, var(--accent) 7%, var(--bg-elev)); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
ol.guards { list-style: none; counter-reset: g; padding-left: 0; margin: 10px 0 0; display: grid; gap: 6px; }
ol.guards li { counter-increment: g; position: relative; padding-left: 30px; }
ol.guards li::before {
  content: counter(g); position: absolute; left: 0; top: .25em; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent);
}

.perf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.perf { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.perf h4 { font-size: 15px; color: var(--fg-2); font-weight: 600; }
.perf-num { margin-top: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.perf-num s { color: var(--fg-3); font-size: 18px; text-decoration-thickness: 1.5px; }
.perf-num i { font-style: normal; color: var(--fg-3); }
.perf-num b { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.perf-how { margin-top: 10px; font-size: 14.5px; color: var(--fg-2); line-height: 1.7; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .perf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .shot-frame { border-radius: 12px; }
  .shot-bar { padding: 8px 12px; }
  .kpis { gap: 22px 16px; }
  .kpi b { font-size: 28px; }
  .kpi > span { font-size: 13.5px; }
  .perf-grid { grid-template-columns: 1fr; gap: 12px; }
  .perf { padding: 18px; }
}

/* ================= 并排截图统一尺寸 ================= */
.shots.even .media { display: flex; flex-direction: column; }
.shots.even .media img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; }
.shots.even .media img.fit-contain { object-fit: contain; background: #fff; }
.shots.even .media figcaption { flex: 1; }

/* ================= 图片点开放大 ================= */
figure.media img[role="button"] { cursor: zoom-in; }
figure.media img[role="button"]:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.lb-lock, .lb-lock body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px); background: rgba(8, 8, 12, .88); cursor: zoom-out;
  opacity: 0; transition: opacity .2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img {
  display: block; max-width: min(1600px, 100%); max-height: calc(100vh - 120px); width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff;
  transform: scale(.96); transition: transform .25s var(--ease);
}
.lightbox.open img { transform: none; }
.lightbox figcaption { color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.6; text-align: center; max-width: 900px; }
.lb-close {
  position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 40px; cursor: pointer;
}
.lb-close:hover { background: rgba(255, 255, 255, .26); }
@media (prefers-reduced-motion: reduce) { .lightbox, .lightbox img { transition: none; } }
