/* landing-v2.css — 官網 v2 方向稿（#156）
   色彩依品牌 v1.1.3：鹽白 #F6F3EC、墨藍 #15213B、永豐紅 #CF3339（只給標誌的「士」）。
   App 示意畫面用 App 自己的淺色／純黑配色（src/theme.css.ts）。 */

:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --bg-2: #efeadf;
  --surface: #ffffff;
  --text: #15213b;
  --text-2: #3b4660;
  --muted: #5d6679;
  --line: #e2dccf;
  --line-2: #d3ccbc;
  --accent: #34436a;
  --link: #2c4a8f;
  --btn-bg: #15213b;
  --btn-fg: #f6f3ec;
  --chip: #e9e4d8;
  --shadow: 0 1px 2px rgba(21, 33, 59, 0.06), 0 12px 32px -12px rgba(21, 33, 59, 0.18);
  --logo-ink: #15213b;
  --logo-left: #c9d1e0;
  --logo-right: #34436a;
  --logo-base: #8c99b6;
  --logo-pro: #5a6a8e;
  /* App light palette */
  --app-bg: #eef0f3;
  --app-panel: #ffffff;
  --app-raised: #f7f8fa;
  --app-inset: #f1f3f6;
  --app-fg: #1c2433;
  --app-muted: #5f6b80;
  --app-border: #dde2e9;
  --app-border-2: #c3ccd9;
  --app-accent: #1d4ed8;
  --app-accent-dim: rgba(41, 98, 255, 0.1);
  --app-amber: #8a5d00;
  --up: #c41e33;
  --up-solid: #c41e33;
  --up-dim: rgba(214, 33, 58, 0.1);
  --down: #067556;
  --down-dim: rgba(10, 138, 102, 0.1);
  --heading: "Chiron GoRound TC", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
  --r: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15213b;
    --bg-2: #111b31;
    --surface: #1b2846;
    --text: #eef1f6;
    --text-2: #cdd4e2;
    --muted: #a3adc2;
    --line: #2a3858;
    --line-2: #3a4a6e;
    --accent: #aeb9cf;
    --link: #b9c8ff;
    --btn-bg: #f6f3ec;
    --btn-fg: #15213b;
    --chip: #24345a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --logo-ink: #ffffff;
    --logo-left: #ffffff;
    --logo-right: #5a6a8e;
    --logo-base: #aeb9cf;
    --logo-pro: #aeb9cf;
    --app-bg: #000000;
    --app-panel: #0a0c10;
    --app-raised: #10131a;
    --app-inset: #040508;
    --app-fg: #d5dbe8;
    --app-muted: #7e8798;
    --app-border: #1a1f29;
    --app-border-2: #2a3140;
    --app-accent: #3d8bff;
    --app-accent-dim: rgba(61, 139, 255, 0.14);
    --app-amber: #e0a43c;
    --up: #f23645;
  --up-solid: #d92b3a;
    --up-solid: #d92b3a;
    --up-dim: rgba(242, 54, 69, 0.14);
    --down: #16b389;
    --down-dim: rgba(22, 179, 137, 0.14);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15213b;
  --bg-2: #111b31;
  --surface: #1b2846;
  --text: #eef1f6;
  --text-2: #cdd4e2;
  --muted: #a3adc2;
  --line: #2a3858;
  --line-2: #3a4a6e;
  --accent: #aeb9cf;
  --link: #b9c8ff;
  --btn-bg: #f6f3ec;
  --btn-fg: #15213b;
  --chip: #24345a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --logo-ink: #ffffff;
  --logo-left: #ffffff;
  --logo-right: #5a6a8e;
  --logo-base: #aeb9cf;
  --logo-pro: #aeb9cf;
  --app-bg: #000000;
  --app-panel: #0a0c10;
  --app-raised: #10131a;
  --app-inset: #040508;
  --app-fg: #d5dbe8;
  --app-muted: #7e8798;
  --app-border: #1a1f29;
  --app-border-2: #2a3140;
  --app-accent: #3d8bff;
  --app-accent-dim: rgba(61, 139, 255, 0.14);
  --app-amber: #e0a43c;
  --up: #f23645;
  --up-solid: #d92b3a;
  --up-dim: rgba(242, 54, 69, 0.14);
  --down: #16b389;
  --down-dim: rgba(22, 179, 137, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--chip); padding: 0.1em 0.4em; border-radius: 5px; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -48px; background: var(--btn-bg); color: var(--btn-fg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; color: var(--text); }
.brand .logo { height: 30px; width: auto; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--text-2); text-decoration: none; }
.nav-links a:hover { color: var(--text); text-decoration: underline; }
.nav-tools { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--chip); }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .sun { display: none; }
  :root:not([data-theme]) .theme-btn .moon { display: block; }
}
:root:not(.js-ready) .theme-btn { display: none; }
@media (max-width: 900px) { .nav-links { display: none; } .nav-tools { margin-left: auto; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-size: 16px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; line-height: 1.2; cursor: pointer;
}
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn.ghost:hover { background: var(--chip); }
.btn.small { padding: 8px 13px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 32px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.hero h1 span { display: inline-block; }
.hero .lead { margin-top: 20px; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-2); max-width: 36em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.meta { margin-top: 16px; font-size: 14px; color: var(--muted); }
.meta span + span::before { content: "・"; }
.shot {
  margin: 48px auto 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: var(--shadow); background: var(--app-bg);
}
.shot img { width: 100%; height: auto; aspect-ratio: 5 / 3; }
.shot-cap { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.sec-head { max-width: 40em; margin-bottom: 48px; }
.sec-head .num { font-family: var(--mono); font-size: 14px; color: var(--muted); display: block; margin-bottom: 8px; }
.sec-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.sec-head p { margin-top: 14px; color: var(--text-2); font-size: 1.06rem; }
@media (max-width: 640px) { section { padding: 64px 0; } .sec-head { margin-bottom: 32px; } }

.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center;
}
.feature + .feature { margin-top: 96px; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .f-text { order: 2; }
.f-text h3 { font-size: clamp(1.35rem, 2.3vw, 1.75rem); }
.f-text > p { margin-top: 14px; color: var(--text-2); }
.f-text .tag { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 99px; background: var(--chip); color: var(--text-2); margin-left: 8px; vertical-align: 4px; font-family: var(--body); font-weight: 500; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .f-text { order: 0; }
  .feature + .feature { margin-top: 72px; }
}

/* step captions (also the text alternative for each demo) */
.caps { list-style: none; padding: 0; margin: 22px 0 0; counter-reset: cap; display: grid; gap: 6px; }
.caps li {
  counter-increment: cap; position: relative; padding: 6px 10px 6px 40px; border-radius: 10px;
  color: var(--text-2); font-size: 15px; line-height: 1.6; transition: background-color 0.25s, color 0.25s;
}
.caps li::before {
  content: counter(cap); position: absolute; left: 10px; top: 7px; width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line-2); color: var(--muted); transition: inherit;
}
.caps li.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(21, 33, 59, 0.08); }
.caps li.on::before { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }

/* ---------- demo frame ---------- */
.demo { position: relative; margin: 0; }
.demo { display: flex; flex-direction: column; }
.demo-ctrl {
  order: 2; align-self: flex-end; margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(21, 33, 59, 0.08);
}
.demo-ctrl .i { width: 14px; height: 14px; }
.demo-ctrl .play { display: none; }
.demo.paused .demo-ctrl .play, .demo.idle .demo-ctrl .play { display: block; }
.demo.paused .demo-ctrl .pause, .demo.idle .demo-ctrl .pause { display: none; }
.demo-ctrl { display: none; }
.demo.ready .demo-ctrl { display: inline-flex; }
.pop { opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.pop.show { opacity: 1; }
.demo.paused *, .demo.paused *::before, .demo.paused *::after, .demo.offscreen *, .demo.offscreen *::before, .demo.offscreen *::after { animation-play-state: paused !important; }

.win {
  position: relative;
  container-type: inline-size;
  background: var(--app-panel); color: var(--app-fg);
  border: 1px solid var(--app-border-2); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); font-family: var(--body);
}
.win-bar {
  display: flex; align-items: center; gap: 1.4cqw; padding: 1.7cqw 2.4cqw;
  border-bottom: 1px solid var(--app-border); font-size: 2.15cqw; color: var(--app-muted);
  background: var(--app-panel);
}
.win-bar b { color: var(--app-fg); font-weight: 600; }
.win-bar .bar { width: 0.55cqw; height: 2.4cqw; background: var(--app-accent); border-radius: 2px; }
.win-bar .sp { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 0.6cqw; padding: 0.3cqw 1.2cqw; border-radius: 0.8cqw; border: 1px solid var(--app-border-2); font-size: 1.9cqw; color: var(--app-muted); white-space: nowrap; }
.pill.sim { color: var(--app-amber); border-color: currentColor; }
.pill.on { color: var(--app-accent); border-color: var(--app-accent); background: var(--app-accent-dim); }
.stage { position: relative; font-size: 2cqw; line-height: 1.45; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }

/* cursor + click ripple */
.cursor {
  position: absolute; left: 0; top: 0; width: 3.4cqw; height: 3.4cqw; z-index: 20; pointer-events: none;
  transform: translate(var(--cx, 90cqw), var(--cy, 50cqw)); opacity: 0;
  transition: transform 0.7s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
}
.demo.run .cursor { opacity: 1; }
.cursor svg { width: 100%; height: 100%; }
.cursor::after {
  content: ""; position: absolute; left: -1.6cqw; top: -1.6cqw; width: 3.2cqw; height: 3.2cqw; border-radius: 50%;
  border: 2px solid var(--app-accent); opacity: 0; transform: scale(0.3);
}
.cursor.click::after { animation: ripple 0.5s ease-out; }
.cursor.drag svg { transform: scale(0.88); }
@keyframes ripple { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.6); } }

/* step gating: markup is the final frame; while running, [data-in=n] waits for class sN */
.demo.run [data-in] { opacity: 0; transform: translateY(0.8cqw); transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.demo.run.s1 [data-in="1"], .demo.run.s2 [data-in="2"], .demo.run.s3 [data-in="3"], .demo.run.s4 [data-in="4"],
.demo.run.s5 [data-in="5"], .demo.run.s6 [data-in="6"], .demo.run.s7 [data-in="7"], .demo.run.s8 [data-in="8"] { opacity: 1; transform: none; }
/* [data-add=n] collapses (display) until sN — for chat-like lists anchored to the bottom */
.demo.run [data-add] { display: none; }
.demo.run.s1 [data-add="1"], .demo.run.s2 [data-add="2"], .demo.run.s3 [data-add="3"], .demo.run.s4 [data-add="4"],
.demo.run.s5 [data-add="5"], .demo.run.s6 [data-add="6"], .demo.run.s7 [data-add="7"], .demo.run.s8 [data-add="8"] { display: flex; animation: addIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0s); }
@keyframes addIn { from { opacity: 0; transform: translateY(1.2cqw); } to { transform: none; } }
/* [data-out=n] visible until sN */
.demo:not(.run) [data-out] { display: none; }
.demo.run [data-out] { transition: opacity 0.35s; }
.demo.run.s1 [data-out="1"], .demo.run.s2 [data-out="2"], .demo.run.s3 [data-out="3"], .demo.run.s4 [data-out="4"],
.demo.run.s5 [data-out="5"], .demo.run.s6 [data-out="6"] { opacity: 0; pointer-events: none; }

.toast {
  position: absolute; right: 2.4cqw; bottom: 2.4cqw; z-index: 15; display: flex; align-items: center; gap: 1cqw;
  padding: 1.1cqw 1.8cqw; border-radius: 1.2cqw; background: var(--app-raised); border: 1px solid var(--app-border-2);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.35); font-size: 1.95cqw; opacity: 0; transform: translateY(1cqw);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: none; }
.toast .dot { width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--app-accent); }
.toast.fill .dot { background: var(--up); }

/* ---------- 01 setup steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: st; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.demo.run .step { opacity: 0.55; transition: opacity 0.4s, border-color 0.3s, box-shadow 0.3s; }
.demo.run .step.on { opacity: 1; border-color: var(--line-2); box-shadow: var(--shadow); }
.step h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.step h3::before {
  counter-increment: st; content: counter(st); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; background: var(--btn-bg); color: var(--btn-fg); flex: none;
}
.step p { color: var(--text-2); font-size: 15px; }
.step .win { aspect-ratio: 16 / 10; }
.step .stage { height: 100%; display: grid; place-items: center; font-size: 4.4cqw; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .step { flex-direction: row; align-items: flex-start; } .step .win { width: 44%; flex: none; } }
@media (max-width: 560px) { .step { flex-direction: column; } .step .win { width: 100%; } }

.dl-card { width: 74%; display: grid; gap: 4cqw; justify-items: center; }
.dl-card .appicon { width: 22cqw; height: 22cqw; border-radius: 5cqw; background: #f6f3ec; display: grid; place-items: center; box-shadow: 0 1cqw 3cqw rgba(0,0,0,0.18); }
.dl-card .appicon svg { width: 70%; }
.progress { width: 100%; height: 2.2cqw; border-radius: 2cqw; background: var(--app-inset); border: 1px solid var(--app-border); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; background: var(--app-accent); border-radius: inherit; transform-origin: left; }
.demo.run .progress i { transform: scaleX(0); transition: transform 1.6s cubic-bezier(0.3, 0, 0.2, 1); }
.demo.run.s1 .progress i { transform: scaleX(1); }
.dl-card .fname { font-size: 4cqw; color: var(--app-muted); }

.login { width: 82%; display: grid; gap: 3cqw; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--app-border-2); border-radius: 2.2cqw; overflow: hidden; font-size: 4cqw; }
.seg span { text-align: center; padding: 1.6cqw 0; color: var(--app-muted); }
.seg span.on { background: var(--app-accent-dim); color: var(--app-accent); font-weight: 600; }
.field { border: 1px solid var(--app-border-2); border-radius: 2cqw; padding: 1.8cqw 2.6cqw; font-size: 3.8cqw; color: var(--app-muted); display: flex; justify-content: space-between; background: var(--app-inset); }
.field .v { color: var(--app-fg); letter-spacing: 0.2em; font-family: var(--mono); overflow: hidden; white-space: nowrap; }
.demo.run .field .v { max-width: 0; transition: max-width 1s steps(10); }
.demo.run.s2 .field .v { max-width: 40cqw; }
.demo.run.s2 .field + .field .v { transition-delay: 0.9s; }
.status { font-size: 3.8cqw; display: flex; align-items: center; gap: 1.6cqw; color: var(--app-fg); }
.status::before { content: ""; width: 2cqw; height: 2cqw; border-radius: 50%; background: var(--down); }

.mini-ws { width: 90%; aspect-ratio: 16 / 10; display: grid; grid-template-columns: 1fr 2.2fr 1.1fr; grid-template-rows: 1.6fr 1fr; gap: 2cqw; }
.mini-ws > i { border-radius: 2cqw; background: var(--app-raised); border: 1px solid var(--app-border); position: relative; overflow: hidden; }
.mini-ws > i::before { content: ""; position: absolute; left: 8%; top: 9%; width: 30%; height: 7%; border-radius: 9px; background: var(--app-border-2); }
.mini-ws .w1 { grid-row: span 2; }
.mini-ws .w3 { grid-row: span 2; }
.mini-ws .w2 svg { position: absolute; inset: 26% 6% 8% 6%; width: 88%; height: 66%; }

/* ---------- flash ladder ---------- */
.flash .stage { padding: 0; }
.fl-tools { display: flex; align-items: center; gap: 1.2cqw; padding: 1.6cqw 2.4cqw; border-bottom: 1px solid var(--app-border); }
.fl-arm { flex: 1; text-align: center; padding: 1cqw; border-radius: 1cqw; border: 1px solid var(--app-border-2); color: var(--app-muted); background: var(--app-inset); display: flex; align-items: center; justify-content: center; gap: 1cqw; transition: all 0.3s; }
.fl-arm .i { width: 2.2cqw; height: 2.2cqw; }
.fl-arm.armed { color: var(--down); border-color: var(--down); background: var(--down-dim); }
.fl-arm .t-on, .fl-arm.armed .t-off { display: none; }
.fl-arm.armed .t-on { display: inline; }
.fl-grid { display: grid; grid-template-columns: 1fr 1.2fr 1.1fr 1.2fr 1fr; font-size: 2.05cqw; }
.fl-head { display: contents; color: var(--app-muted); }
.fl-head span { padding: 0.9cqw 1.6cqw; border-bottom: 1px solid var(--app-border); font-size: 1.85cqw; }
.fl-head span:nth-child(3) { text-align: center; }
.fl-head span:nth-child(4), .fl-head span:nth-child(5) { text-align: right; }
.fl-rows { position: relative; grid-column: 1 / -1; }
.fl-row { display: grid; grid-template-columns: 1fr 1.2fr 1.1fr 1.2fr 1fr; height: 3.9cqw; align-items: center; border-bottom: 1px solid var(--app-border); position: relative; z-index: 1; }
.fl-row > span { padding: 0 1.6cqw; height: 100%; display: flex; align-items: center; position: relative; }
.fl-row .p { justify-content: center; border-inline: 1px solid var(--app-border); font-weight: 500; }
.fl-row .bv { justify-content: flex-end; color: var(--up); }
.fl-row .av { color: var(--down); }
.fl-row .bv i, .fl-row .av i { position: absolute; top: 18%; bottom: 18%; border-radius: 2px; }
.fl-row .bv i { right: 0; background: var(--up-dim); width: var(--w, 0%); }
.fl-row .av i { left: 0; background: var(--down-dim); width: var(--w, 0%); }
.fl-row .bv b, .fl-row .av b { position: relative; font-weight: 400; }
.fl-hl { position: absolute; left: 0; right: 0; height: 3.9cqw; top: 0; background: var(--app-accent-dim); border-block: 1px solid var(--app-accent); transform: translateY(calc(var(--row, 5) * 3.9cqw)); transition: transform 0.35s cubic-bezier(0.3, 0, 0.2, 1); z-index: 0; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 4cqw; height: 2.8cqw; padding: 0 1cqw; border-radius: 0.8cqw;
  font-family: var(--mono); font-size: 1.8cqw; border: 1.5px solid currentColor; transition: all 0.3s;
}
.chip.buy { color: var(--up); }
.chip.sell { color: var(--down); }
.chip.filled { background: currentColor; }
.chip.filled b { color: #fff; font-weight: 600; }
.chip b { font-weight: 600; }
.demo .chip.gone { opacity: 0; transform: scale(0.6); }
.fl-foot { display: flex; justify-content: space-between; padding: 1.4cqw 2.4cqw; font-size: 1.95cqw; color: var(--app-muted); border-top: 1px solid var(--app-border); background: var(--app-raised); }
.fl-foot b { color: var(--app-fg); font-weight: 500; }

/* ---------- ticket / odd lot ---------- */
.ticket .stage { display: grid; grid-template-columns: 1.15fr 1fr; }
.tk-form { padding: 2.4cqw; display: grid; gap: 1.8cqw; align-content: start; border-right: 1px solid var(--app-border); }
.tk-row { display: grid; grid-template-columns: 7cqw 1fr; align-items: center; gap: 1.2cqw; }
.tk-row > span:first-child { color: var(--app-muted); font-size: 1.9cqw; }
.tk-seg { display: flex; border: 1px solid var(--app-border-2); border-radius: 1cqw; overflow: hidden; font-size: 1.85cqw; }
.tk-seg span { flex: 1; text-align: center; padding: 0.9cqw 0; color: var(--app-muted); transition: all 0.25s; white-space: nowrap; }
.tk-seg span + span { border-left: 1px solid var(--app-border-2); }
.tk-seg span.on { background: var(--app-accent-dim); color: var(--app-accent); font-weight: 600; }
.ticket.odd .tk-seg span.odd-off { opacity: 0.35; text-decoration: line-through; }
.tk-seg.side span.on.b { background: var(--up-solid); color: #fff; }
.tk-input { display: flex; align-items: center; border: 1px solid var(--app-border-2); border-radius: 1cqw; overflow: hidden; background: var(--app-inset); }
.tk-input em { font-style: normal; width: 4.4cqw; text-align: center; color: var(--app-muted); padding: 0.8cqw 0; }
.tk-input .num { flex: 1; text-align: right; padding: 0.8cqw 1cqw; font-size: 2.3cqw; }
.tk-input .unit { padding: 0 1.2cqw; color: var(--app-muted); font-size: 1.85cqw; min-width: 4cqw; transition: color 0.3s; }
.tk-input.flash { animation: flashIn 0.6s; }
@keyframes flashIn { 0% { box-shadow: 0 0 0 0.6cqw var(--app-accent-dim); } 100% { box-shadow: 0 0 0 0 transparent; } }
.tk-note { font-size: 1.8cqw; color: var(--app-amber); line-height: 1.5; }
.tk-send { margin-top: 0.6cqw; background: var(--up-solid); color: #fff; text-align: center; border-radius: 1cqw; padding: 1.3cqw; font-weight: 600; font-size: 2.1cqw; }
.book { padding: 2cqw 2.2cqw; display: grid; align-content: start; gap: 0.2cqw; }
.book h4 { margin: 0 0 1cqw; font-size: 1.85cqw; font-weight: 500; color: var(--app-muted); display: flex; justify-content: space-between; }
.bk-row { display: grid; grid-template-columns: 1fr 1fr; height: 3.6cqw; align-items: center; position: relative; font-size: 2cqw; }
.bk-row i { position: absolute; top: 15%; bottom: 15%; right: 0; width: var(--w); border-radius: 2px; transition: width 0.5s; }
.bk-row.a i { background: var(--down-dim); }
.bk-row.b i { background: var(--up-dim); }
.bk-row span { position: relative; padding: 0 0.8cqw; }
.bk-row span:last-child { text-align: right; }
.bk-row.a span:first-child { color: var(--down); }
.bk-row.b span:first-child { color: var(--up); }
.bk-sep { height: 1px; background: var(--app-border-2); margin: 0.6cqw 0; }
.swap-a, .swap-b { transition: opacity 0.3s; }
.ticket.odd .swap-a, .ticket:not(.odd) .swap-b { display: none; }

/* ---------- chart ---------- */
.chart .stage { aspect-ratio: 600 / 330; }
.chart svg.ch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch .grid line { stroke: var(--app-border); stroke-width: 1; }
.ch .ax text { fill: var(--app-muted); font-family: var(--mono); font-size: 11px; }
.ch .u line, .ch .u rect { stroke: var(--up); fill: var(--up); }
.ch .d line, .ch .d rect { stroke: var(--down); fill: var(--down); }
.ch .candles { clip-path: inset(0 0 0 0); }
.demo.run .ch .candles { clip-path: inset(0 100% 0 0); transition: clip-path 1.6s cubic-bezier(0.4, 0, 0.2, 1); }
.demo.run.s1 .ch .candles { clip-path: inset(0 0 0 0); }
.ch .last line { stroke: var(--app-muted); stroke-dasharray: 3 3; }
.ch .tag rect { rx: 3; }
.ch .tag text { font-family: var(--mono); font-size: 11px; fill: #fff; }
.ch .last rect { fill: var(--app-muted); }
.ch .order { transition: transform 0.6s cubic-bezier(0.3, 0, 0.2, 1); }
.ch .order line { stroke: var(--up); stroke-width: 1.5; }
.ch .order rect { fill: var(--up); }
.ch .stop line { stroke: var(--app-amber); stroke-width: 1.5; stroke-dasharray: 6 4; }
.ch .stop rect { fill: var(--app-amber); }
.ch .xh line { stroke: var(--app-muted); stroke-dasharray: 2 3; }
.ch .xh rect { fill: var(--app-fg); }
.ch .xh text { fill: var(--app-panel); }
.ch-pop {
  position: absolute; left: 50%; top: 52%; z-index: 10; background: var(--app-raised); border: 1px solid var(--app-border-2);
  border-radius: 1.2cqw; padding: 1.4cqw 1.8cqw; display: grid; gap: 1cqw; font-size: 1.95cqw; box-shadow: 0 8px 24px -10px rgba(0,0,0,0.35);
}
.ch-pop .go { background: var(--up-solid); color: #fff; border-radius: 0.8cqw; text-align: center; padding: 0.6cqw; font-weight: 600; }
.ch-tools { position: absolute; left: 2cqw; top: 1.6cqw; display: flex; gap: 1cqw; z-index: 3; }

/* ---------- watchlist + account ---------- */
.wa .stage { display: grid; grid-template-columns: 1.1fr 1fr; }
.wl { border-right: 1px solid var(--app-border); }
.wl-row { display: grid; grid-template-columns: 1fr 9cqw 1fr; align-items: center; gap: 1cqw; padding: 1.15cqw 2cqw; border-bottom: 1px solid var(--app-border); }
.wl-row .nm { line-height: 1.25; }
.wl-row .nm small { display: block; font-size: 1.7cqw; color: var(--app-muted); }
.wl-row svg { width: 100%; height: 3.2cqw; fill: none; stroke-width: 1.3; }
.wl-row .px { text-align: right; line-height: 1.25; }
.wl-row .px small { display: block; font-size: 1.7cqw; }
.wl-row.tick { animation: rowFlash 0.7s ease-out; }
@keyframes rowFlash { 0% { background: var(--app-accent-dim); } 100% { background: transparent; } }
.acct { padding: 2.2cqw; display: grid; gap: 1.6cqw; align-content: start; }
.acct-top { display: flex; align-items: center; justify-content: space-between; }
.acct-top .who { color: var(--app-muted); font-size: 1.85cqw; }
.eye { display: inline-flex; align-items: center; gap: 0.8cqw; padding: 0.6cqw 1.2cqw; border-radius: 1cqw; border: 1px solid var(--app-border-2); color: var(--app-muted); font-size: 1.8cqw; transition: all 0.3s; }
.eye .i { width: 2.2cqw; height: 2.2cqw; }
.eye .off, .privacc .eye .on { display: none; }
.privacc .eye .off { display: block; }
.privacc #wa-eye, .priv .eye.money { color: var(--app-accent); border-color: var(--app-accent); background: var(--app-accent-dim); }
.toggles { display: flex; gap: 0.8cqw; }
.acct-id .masked, .privacc .acct-id .plain { display: none; }
.privacc .acct-id .masked { display: inline; }
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2cqw; }
.kpi div { background: var(--app-raised); border: 1px solid var(--app-border); border-radius: 1.2cqw; padding: 1.2cqw 1.5cqw; }
.kpi small { display: block; color: var(--app-muted); font-size: 1.7cqw; }
.kpi .num { font-size: 2.6cqw; }
.pos { border: 1px solid var(--app-border); border-radius: 1.2cqw; overflow: hidden; font-size: 1.85cqw; }
.pos div { display: grid; grid-template-columns: 1.3fr 0.9fr 1fr 1fr; padding: 0.9cqw 1.4cqw; border-bottom: 1px solid var(--app-border); }
.pos div:last-child { border-bottom: 0; }
.pos .h { color: var(--app-muted); background: var(--app-raised); }
.pos span:not(:first-child) { text-align: right; }
.amt { position: relative; transition: color 0.3s; }
.amt::after { content: "••••"; position: absolute; right: 0; top: 0; color: var(--app-muted); opacity: 0; transition: opacity 0.3s; letter-spacing: 0.1em; }
.priv .amt { color: transparent !important; }
.priv .amt::after { opacity: 1; }

/* ---------- workspace builder ---------- */
.ws .stage { aspect-ratio: 16 / 10; background: var(--app-bg); }
.ws-top { position: absolute; left: 0; right: 0; top: 0; height: 6.4cqw; display: flex; align-items: center; gap: 1.2cqw; padding: 0 2cqw; background: var(--app-panel); border-bottom: 1px solid var(--app-border); font-size: 1.95cqw; z-index: 6; }
.ws-top .layout-name { font-weight: 600; color: var(--app-fg); }
.ws-area { position: absolute; left: 1.2cqw; right: 1.2cqw; top: 7.6cqw; bottom: 1.2cqw; }
.ws-area::before { content: ""; position: absolute; inset: 0; border-radius: 1cqw; background-image: radial-gradient(var(--app-border-2) 1px, transparent 1.2px); background-size: 3cqw 3cqw; opacity: 0.8; }
.pn {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1% - 0.8cqw); height: calc(var(--h) * 1% - 0.8cqw);
  background: var(--app-panel); border: 1px solid var(--app-border-2); border-radius: 1cqw; overflow: hidden;
  transition: left 0.6s cubic-bezier(0.3, 0, 0.2, 1), top 0.6s cubic-bezier(0.3, 0, 0.2, 1), width 0.6s cubic-bezier(0.3, 0, 0.2, 1), height 0.6s cubic-bezier(0.3, 0, 0.2, 1), opacity 0.4s, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pn-h { display: flex; align-items: center; gap: 0.8cqw; padding: 0.9cqw 1.2cqw; font-size: 1.75cqw; border-bottom: 1px solid var(--app-border); color: var(--app-fg); white-space: nowrap; }
.pn-h::before { content: ""; width: 0.45cqw; height: 1.8cqw; background: var(--app-accent); border-radius: 2px; }
.pn-b { position: absolute; inset: 3.6cqw 1cqw 1cqw; }
.pn-b svg { width: 100%; height: 100%; }
.pn .lines { display: grid; gap: 1cqw; padding-top: 0.6cqw; }
.pn .lines i { display: block; height: 1.3cqw; border-radius: 1cqw; background: var(--app-inset); }
.pn .lines i:nth-child(odd) { width: 80%; }
.pn.lift { box-shadow: 0 1.6cqw 4cqw -1cqw rgba(0, 0, 0, 0.35); z-index: 4; }
.pn .grip { position: absolute; right: 0.4cqw; bottom: 0.4cqw; width: 1.6cqw; height: 1.6cqw; border-right: 2px solid var(--app-accent); border-bottom: 2px solid var(--app-accent); opacity: 0; transition: opacity 0.3s; }
.pn.resizing .grip { opacity: 1; }
.pn.resizing { outline: 2px solid var(--app-accent); outline-offset: -1px; }
.menu { position: absolute; z-index: 8; right: 2cqw; top: 6.8cqw; width: 26cqw; background: var(--app-raised); border: 1px solid var(--app-border-2); border-radius: 1.2cqw; padding: 0.8cqw; box-shadow: 0 10px 30px -12px rgba(0,0,0,0.4); font-size: 1.9cqw; transition: opacity 0.3s, transform 0.3s; }
.menu div { padding: 0.8cqw 1.2cqw; border-radius: 0.8cqw; color: var(--app-fg); transition: background-color 0.2s; }
.menu div.hl { background: var(--app-accent-dim); color: var(--app-accent); }
.save { position: absolute; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40cqw; background: var(--app-raised); border: 1px solid var(--app-border-2); border-radius: 1.4cqw; padding: 2cqw; display: grid; gap: 1.4cqw; box-shadow: 0 16px 40px -14px rgba(0,0,0,0.45); font-size: 2cqw; }
.save .field2 { border: 1px solid var(--app-accent); border-radius: 1cqw; padding: 1cqw 1.4cqw; background: var(--app-inset); font-weight: 600; }
.save .ok { justify-self: end; background: var(--app-accent); color: #fff; border-radius: 0.9cqw; padding: 0.7cqw 2.2cqw; }

/* ---------- agent chat ---------- */
.agent .stage { aspect-ratio: 16 / 11.2; display: flex; flex-direction: column; }
.ag-tabs { display: flex; gap: 2.6cqw; padding: 1.2cqw 2.4cqw 0; font-size: 1.9cqw; color: var(--app-muted); border-bottom: 1px solid var(--app-border); }
.ag-tabs span { padding-bottom: 1cqw; }
.ag-tabs span.on { color: var(--app-fg); border-bottom: 2px solid var(--app-accent); font-weight: 600; }
.ag-log { -webkit-mask-image: linear-gradient(transparent, #000 9%); mask-image: linear-gradient(transparent, #000 9%); flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.5cqw; padding: 2cqw 2.4cqw; }
.ag-log > * { display: flex; flex-shrink: 0; }
.msg-u { justify-content: flex-end; }
.msg-u p { max-width: 80%; background: var(--app-raised); border: 1px solid var(--app-border-2); border-radius: 1.4cqw; padding: 1.2cqw 1.6cqw; }
.typed { white-space: pre-wrap; }
.msg-a { flex-direction: column; gap: 0.8cqw; }
.tool { align-items: center; gap: 1cqw; color: var(--app-muted); font-size: 1.85cqw; }
.tool .i { width: 2.2cqw; height: 2.2cqw; color: var(--down); }
.tool b { color: var(--app-fg); font-weight: 500; }
.result { flex-direction: column; border: 1px solid var(--app-border-2); border-radius: 1.4cqw; overflow: hidden; }
.result .rh { display: flex; justify-content: space-between; padding: 1cqw 1.6cqw; background: var(--app-raised); font-size: 1.85cqw; color: var(--app-muted); border-bottom: 1px solid var(--app-border); }
.result .rb { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.6cqw; padding: 1.4cqw 1.6cqw; align-items: center; }
.result svg { width: 100%; height: 12cqw; overflow: visible; }
.eq-line { fill: none; stroke: var(--app-accent); stroke-width: 2; stroke-linejoin: round; }
.eq-area { fill: var(--app-accent-dim); stroke: none; }
.demo.run .eq-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 1.6s ease; }
.demo.run.s3 .agent-eq .eq-line, .demo.run.s2 .q-eq .eq-line { stroke-dashoffset: 0; }
.mets { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6cqw 1.4cqw; font-size: 1.75cqw; color: var(--app-muted); }
.mets b { display: block; color: var(--app-fg); font-family: var(--mono); font-size: 2.2cqw; font-weight: 500; }
.preview { flex-direction: column; gap: 1cqw; border: 1px solid var(--app-amber); border-radius: 1.4cqw; padding: 1.4cqw 1.6cqw; background: color-mix(in srgb, var(--app-amber) 8%, transparent); }
.preview .pt { display: flex; align-items: center; gap: 1cqw; color: var(--app-amber); font-size: 1.85cqw; font-weight: 600; }
.preview .pt .i { width: 2.2cqw; height: 2.2cqw; }
.preview .pd { font-size: 2.05cqw; }
.preview .pb { display: flex; gap: 1cqw; }
.preview .pb span { padding: 0.7cqw 1.8cqw; border-radius: 0.9cqw; border: 1px solid var(--app-border-2); font-size: 1.85cqw; }
.preview .pb span.go { background: var(--up-solid); color: #fff; border-color: var(--up-solid); }
.ag-input { margin: 0 2cqw 2cqw; border: 1px solid var(--app-border-2); border-radius: 1.4cqw; padding: 1.2cqw 1.6cqw; color: var(--app-muted); font-size: 1.85cqw; display: flex; gap: 2cqw; }
.ag-input span:last-child { margin-left: auto; }
.caret::after { content: ""; display: inline-block; width: 2px; height: 1em; background: var(--app-accent); vertical-align: -0.15em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- quant ---------- */
.quant .stage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; aspect-ratio: 16 / 10.6; }
.code { grid-row: span 2; padding: 2cqw 2.2cqw; border-right: 1px solid var(--app-border); background: var(--app-inset); font-family: var(--mono); font-size: 1.75cqw; line-height: 1.85; white-space: pre; overflow: hidden; }
.code .ln { display: block; }
.code .k { color: #a855f7; }
.code .f { color: var(--app-accent); }
.code .n { color: var(--app-amber); }
.code .c { color: var(--app-muted); }
.q-top { padding: 1.6cqw 2cqw; border-bottom: 1px solid var(--app-border); }
.q-top .rh { display: flex; justify-content: space-between; font-size: 1.75cqw; color: var(--app-muted); margin-bottom: 0.6cqw; }
.q-top svg { width: 100%; height: 11cqw; overflow: visible; }
.costs { display: flex; flex-wrap: wrap; gap: 0.8cqw; margin-top: 0.8cqw; }
.costs span { font-size: 1.6cqw; padding: 0.2cqw 1cqw; border-radius: 1cqw; background: var(--app-raised); border: 1px solid var(--app-border); color: var(--app-muted); }
.q-bot { padding: 1.6cqw 2cqw; display: grid; grid-template-columns: 1fr 0.9fr; gap: 2cqw; align-items: start; }
.q-bot h5 { margin: 0 0 0.8cqw; font-size: 1.7cqw; font-weight: 500; color: var(--app-muted); }
.hm { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4cqw; }
.hm i { aspect-ratio: 1; border-radius: 0.4cqw; background: color-mix(in srgb, var(--app-accent) calc(var(--v) * 85%), var(--app-inset)); }
.hm i.best { outline: 2px solid var(--up); outline-offset: 1px; }
.demo.run .hm i { opacity: 0; transform: scale(0.4); transition: opacity 0.25s, transform 0.3s; transition-delay: var(--d); }
.demo.run.s3 .hm i { opacity: 1; transform: none; }
.hm-ax { display: flex; justify-content: space-between; font-size: 1.5cqw; color: var(--app-muted); margin-top: 0.6cqw; }
.tt { display: grid; gap: 1.2cqw; }
.tt div { font-size: 1.7cqw; color: var(--app-muted); }
.tt .bar { height: 2.2cqw; border-radius: 0.5cqw; background: var(--app-accent); width: var(--w); transform-origin: left; }
.tt .bar.test { background: var(--app-amber); }
.demo.run .tt .bar { transform: scaleX(0); transition: transform 0.8s cubic-bezier(0.3, 0, 0.2, 1); }
.demo.run.s4 .tt .bar { transform: none; }
.demo.run.s4 .tt .bar.test { transition-delay: 0.5s; }
.tt b { color: var(--app-fg); font-family: var(--mono); font-weight: 500; }

/* ---------- custom panel ---------- */
.custom .stage { display: grid; grid-template-columns: 1fr 1.25fr; aspect-ratio: 16 / 10; }
.cp-left { border-right: 1px solid var(--app-border); display: flex; flex-direction: column; gap: 1.4cqw; padding: 2cqw; background: var(--app-raised); }
.cp-who { font-size: 1.7cqw; color: var(--app-muted); }
.cp-left .msg-u p { max-width: 100%; background: var(--app-panel); }
.files { display: grid; gap: 0.7cqw; font-family: var(--mono); font-size: 1.6cqw; }
.files div { display: flex; align-items: center; gap: 0.8cqw; padding: 0.6cqw 1cqw; border-radius: 0.8cqw; background: var(--app-panel); border: 1px solid var(--app-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files .add { color: var(--down); font-weight: 600; }
.files .mod { color: var(--app-amber); font-weight: 600; }
.built { display: flex; align-items: center; gap: 0.8cqw; font-size: 1.6cqw; color: var(--down); }
.built .i { width: 2cqw; height: 2cqw; }
.deploy { margin-top: auto; font-size: 1.7cqw; color: var(--app-muted); display: flex; align-items: center; gap: 1cqw; }
.deploy b { color: var(--app-fg); font-family: var(--mono); font-weight: 500; }
.cp-right { position: relative; background: var(--app-bg); }
.cp-right .pn-b.tbl { inset: 3.6cqw 0 0; font-size: 1.65cqw; }
.vs-row { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 0.6cqw 1.2cqw; border-bottom: 1px solid var(--app-border); }
.vs-row span:not(:first-child) { text-align: right; }
.vs-row.h { color: var(--app-muted); }
.pn.new { border-color: var(--app-accent); box-shadow: 0 0 0 2px var(--app-accent-dim); }
.demo.run .pn.new { transform: translateY(6cqw) scale(0.94); opacity: 0; }
.demo.run.s3 .pn.new { transform: none; opacity: 1; }

/* ---------- code map + skills ---------- */
.map { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 15px; }
.map th, .map td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.map tr:last-child td { border-bottom: 0; }
.map th { font-weight: 600; color: var(--muted); font-size: 14px; background: var(--bg-2); }
.map td:first-child { font-weight: 600; white-space: nowrap; }
.map code { white-space: nowrap; }
.map-wrap { overflow-x: auto; border-radius: 14px; }
@media (max-width: 720px) {
  .map, .map tbody, .map tr, .map td { display: block; }
  .map thead { display: none; }
  .map tr { border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .map td { border: 0; padding: 2px 0; }
  .map td:first-child { white-space: normal; }
  .map code { white-space: normal; word-break: break-all; }
}
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.card h3 { font-size: 1.2rem; }
.card p { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.cmd { margin-top: 14px; display: grid; gap: 8px; }
.cmd pre { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto; }
.cmd pre span { color: var(--muted); }
@media (max-width: 860px) { .skills { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--text-2); }

/* ---------- downloads ---------- */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl .card h3 { display: flex; justify-content: space-between; align-items: baseline; }
.dl .card h3 small { font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); }
.dl-links { display: grid; gap: 8px; margin-top: 16px; }
.dl-links a { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 15px; }
.dl-links a:hover { background: var(--bg-2); border-color: var(--line-2); }
.dl-links a span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.dl-note { margin-top: 20px; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .dl { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer { padding: 56px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.foot .logo { height: 26px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { color: var(--text-2); }
.legal { margin-top: 28px; }
.legal summary { cursor: pointer; color: var(--text-2); }
.legal p { margin-top: 10px; font-size: 13px; line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
  .cursor, .fl-hl, .pn, .ch .order, .toast { transition-duration: 0.01ms !important; }
}

/* ===================== v2.1：依實際 App 畫面重做 ===================== */
.muted { color: var(--app-muted); }
.win .ok, .site .ok { color: var(--down); font-weight: 600; }
.pill.lock { color: var(--app-amber); border-color: var(--app-amber); }
.pill.prod { color: var(--up); border-color: var(--up); }

/* quickstart */
.qs { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.qs-steps { margin: 0; }
.qs-steps li { display: grid; gap: 2px; }
.qs-steps li b { font-weight: 600; color: var(--text); }
.qs-steps li span { font-size: 14px; }
.qs-steps li a { font-size: 13px; }
.qs-stage { margin: 0; position: sticky; top: 84px; display: flex; flex-direction: column; }
.qs-win .stage { aspect-ratio: 16 / 11; background: var(--app-bg); }
.qs-scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 4cqw; opacity: 0; transition: opacity 0.35s; }
.qs-scene .dl-card { width: 56%; }
.demo:not(.run) .qs-scene[data-scene="6"], .demo.run.qs-on-1 .qs-scene[data-scene="1"], .demo.run.qs-on-2 .qs-scene[data-scene="2"],
.demo.run.qs-on-3 .qs-scene[data-scene="3"], .demo.run.qs-on-4 .qs-scene[data-scene="4"], .demo.run.qs-on-5 .qs-scene[data-scene="5"],
.demo.run.qs-on-6 .qs-scene[data-scene="6"] { opacity: 1; }
.qs-src { font-size: 13px; color: var(--muted); margin-top: 10px; }
.site { width: 92%; border: 1px solid var(--app-border-2); border-radius: 1.6cqw; background: var(--app-panel); overflow: hidden; }
.site .url { font-size: 2.1cqw; color: var(--app-muted); padding: 1.2cqw 2cqw; background: var(--app-raised); border-bottom: 1px solid var(--app-border); font-family: var(--mono); }
.site-b { padding: 2.4cqw 3cqw; display: grid; gap: 1.6cqw; font-size: 2.4cqw; }
.chk { display: flex; align-items: center; gap: 1.4cqw; }
.chk i { width: 2.6cqw; height: 2.6cqw; border-radius: 0.6cqw; border: 1.5px solid var(--app-border-2); display: grid; place-items: center; flex: none; }
.chk i::after { content: "✓"; font-size: 2cqw; color: #fff; font-style: normal; line-height: 1; }
.chk i { background: var(--app-accent); border-color: var(--app-accent); }
.chk small { color: var(--app-muted); margin-left: 1cqw; font-size: 2cqw; }
.row2 { display: flex; justify-content: space-between; gap: 2cqw; }
.row2 > span:first-child, .perm > span { color: var(--app-muted); }
.perm { display: grid; grid-template-columns: auto 1fr 1fr; gap: 1.2cqw 2cqw; align-items: center; }
.perm > span { grid-row: span 2; }
.keybox { display: grid; gap: 0.6cqw; padding: 1.6cqw 2cqw; border-radius: 1.2cqw; background: var(--app-raised); border: 1px solid var(--app-border-2); font-size: 2.2cqw; }
.keybox em { font-style: normal; color: var(--app-amber); font-size: 2cqw; }
.sign { display: flex; justify-content: space-between; align-items: center; padding: 1.6cqw 2cqw; border: 1px solid var(--app-border); border-radius: 1.2cqw; }
.sign .st { color: var(--down); font-weight: 600; }
.site .note { font-size: 2cqw; color: var(--app-amber); }
.ob { width: 72%; display: grid; gap: 1cqw; padding: 3cqw; border-radius: 1.8cqw; background: var(--app-panel); border: 1px solid var(--app-border-2); font-size: 2.2cqw; }
.ob-logo { font-size: 3cqw; }
.ob-sub { color: var(--app-muted); margin-bottom: 1cqw; }
.ob-l { font-size: 1.8cqw; color: var(--app-muted); letter-spacing: 0.04em; }
.ob-in { border: 1px solid var(--app-border-2); border-radius: 1cqw; padding: 1cqw 1.6cqw; background: var(--app-inset); }
.ob-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--app-border-2); border-radius: 1cqw; overflow: hidden; }
.ob-seg i { font-style: normal; text-align: center; padding: 1cqw; color: var(--app-muted); }
.ob-seg i.on { background: var(--app-accent-dim); color: var(--app-accent); font-weight: 600; }
.ob-seg i.on.prod { background: var(--up-dim); color: var(--up); }
.ob-warn { color: var(--up); font-size: 1.9cqw; }
.ob-go { margin-top: 1cqw; text-align: center; background: var(--app-accent); color: #fff; border-radius: 1cqw; padding: 1.2cqw; font-weight: 600; }
.qs-scene[data-scene="5"], .qs-scene[data-scene="6"] { grid-template-columns: 1fr; align-content: center; gap: 2cqw; justify-items: center; }
.ob-test { width: 72%; display: grid; grid-template-columns: 1fr auto; gap: 0.8cqw 2cqw; padding: 1.8cqw 2.4cqw; border-radius: 1.4cqw; background: var(--app-raised); border: 1px solid var(--app-border-2); font-size: 2.1cqw; }
.ob-test .pill { grid-column: 1 / -1; justify-self: start; }
.ob-done { display: flex; align-items: center; gap: 1.4cqw; font-size: 2.3cqw; font-weight: 600; }
@media (max-width: 900px) { .qs { grid-template-columns: 1fr; } .qs-stage { position: static; order: -1; } }

/* flash (real layout) */
.flash .stage > div { padding-inline: 2cqw; }
.fx-row1, .fx-row2, .fx-row3, .fx-row4 { display: flex; align-items: center; gap: 1cqw; padding-block: 0.9cqw; font-size: 2cqw; }
.fx-row1 { border-bottom: 1px solid var(--app-border); }
.fx-row1 b { font-size: 2.3cqw; }
.fx-row3 .fl-arm { flex: 1; }
.fl-arm { background: var(--app-inset); }
.fl-arm.armed { color: var(--app-fg); border-color: var(--app-border-2); background: var(--app-raised); }
.fx-row4 { padding-top: 0; }
.mk { flex: 1; text-align: center; padding: 0.8cqw; border-radius: 0.9cqw; border: 1px solid; font-size: 1.9cqw; }
.mk.b { color: var(--up); border-color: var(--up); background: var(--up-dim); }
.mk.s { color: var(--down); border-color: var(--down); background: var(--down-dim); }
.mk.x { flex: 0 0 auto; color: var(--up); border-color: var(--app-border-2); padding-inline: 1.6cqw; }
.fx-pos { display: flex; gap: 1.6cqw; font-family: var(--mono); font-size: 1.85cqw; color: var(--app-muted); padding-block: 0.4cqw; border-top: 1px solid var(--app-border); }
.fx-pos .up { font-weight: 600; }
.flash .fl-grid { padding: 0 !important; }
.fl-hl { border: 0; }
.chip.buy, .chip.sell { background: color-mix(in srgb, currentColor 13%, transparent); }
.chip.filled { background: currentColor; opacity: 0.88; }
.chip.filled b { color: #fff; }
.fl-lockhint { font-size: 1.8cqw; color: var(--app-muted); text-align: center; padding: 0.9cqw 0 !important; border-top: 1px solid var(--app-border); }
.demo.run .fl-lockhint.hide { visibility: hidden; }

/* odd: two windows */
.duo { display: grid; grid-template-columns: 1fr 1.05fr; gap: 14px; align-items: start; }
.duo.wide { grid-template-columns: 0.9fr 1.1fr; }
.duo .win { min-width: 0; }
.ticket .stage { display: block; }
.ticket .tk-form { border-right: 0; padding: 3.4cqw; gap: 2.6cqw; }
.ticket .tk-row { grid-template-columns: 12cqw 1fr; }
.ticket .tk-row > span:first-child, .tk-acct { font-size: 3.2cqw; }
.ticket .tk-seg { font-size: 3.1cqw; }
.ticket .tk-seg span { padding: 1.5cqw 0; }
.ticket .tk-input .num { font-size: 3.6cqw; padding: 1.3cqw 1.6cqw; }
.ticket .tk-input em { width: 7cqw; }
.ticket .tk-send { font-size: 3.4cqw; padding: 2.2cqw; }
.ticket .win-bar, .flash.mini .win-bar { font-size: 3.4cqw; padding: 2.6cqw 3.4cqw; gap: 2cqw; }
.ticket .win-bar .bar, .flash.mini .win-bar .bar { width: 0.9cqw; height: 3.8cqw; }
.tk-acct { color: var(--app-muted); }
.tk-seg.side span { padding: 1.8cqw 0 !important; font-weight: 600; }
.ticket.odd .tk-seg span.odd-off { opacity: 0.4; text-decoration: none; }
.flash.mini .fx-row1 { font-size: 3.2cqw; padding: 2cqw 3cqw; gap: 1.8cqw; }
.flash.mini .fx-row1 b { font-size: 3.4cqw; }
.flash.mini .fl-grid, .flash.mini .fl-row, .flash.mini .fl-head span { font-size: 3.2cqw; }
.flash.mini .fl-row { height: 6.2cqw; }
.flash.mini .fl-head span { padding: 1.2cqw 2cqw; }
.flash.mini .fl-row > span { padding: 0 2cqw; }
.fo-banner { font-size: 2.8cqw; color: var(--app-amber); background: color-mix(in srgb, var(--app-amber) 10%, transparent); padding: 1.4cqw 3cqw; line-height: 1.5; }
.flash.mini:not(.odd) .swap-b, .flash.mini.odd .swap-a { display: none; }
.flash.mini .swap-a, .flash.mini .swap-b { display: inline; }
.flash.mini.odd .fo-banner.swap-b { display: block; }
@media (max-width: 560px) { .duo, .duo.wide { grid-template-columns: 1fr; } }

/* chart toolbar */
.ch-bar { display: flex; align-items: center; gap: 1.6cqw; padding: 1.2cqw 2.4cqw; font-size: 1.95cqw; color: var(--app-muted); border-bottom: 1px solid var(--app-border); white-space: nowrap; overflow: hidden; }
.ch-bar span { padding: 0.3cqw 0.9cqw; border-radius: 0.7cqw; transition: all 0.25s; }
.ch-bar span.on { color: var(--app-fg); background: var(--app-raised); }
.ch-bar #ch-mode.on, .ch-bar #ch-stopbtn.on { color: #fff; background: var(--app-accent); }
.ch-bar i { width: 1px; height: 2.4cqw; background: var(--app-border-2); }
.ch-bar .sp { margin-left: auto; }

/* acct */
.dk-tabs { display: flex; gap: 2cqw; font-size: 1.8cqw; color: var(--app-muted); border-bottom: 1px solid var(--app-border); padding-bottom: 1cqw; }
.dk-tabs .on { color: var(--app-fg); border-bottom: 2px solid var(--app-accent); padding-bottom: 0.8cqw; margin-bottom: -1.1cqw; font-weight: 600; }
.pos .t { font-weight: 600; background: var(--app-raised); }
.setdlg { position: absolute; z-index: 12; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64cqw; display: grid; grid-template-columns: 17cqw 1fr; background: var(--app-raised); border: 1px solid var(--app-border-2); border-radius: 1.4cqw; box-shadow: 0 16px 40px -14px rgba(0,0,0,0.5); overflow: hidden; font-size: 2cqw; }
.sd-side { display: grid; align-content: start; gap: 0.4cqw; padding: 1.4cqw; border-right: 1px solid var(--app-border); }
.sd-side span { padding: 0.8cqw 1.2cqw; border-radius: 0.8cqw; color: var(--app-muted); }
.sd-side span.on { background: var(--app-accent-dim); color: var(--app-accent); }
.sd-main { padding: 2cqw 2.4cqw; display: grid; gap: 1.4cqw; align-content: start; }
.sw { display: flex; justify-content: space-between; align-items: center; }
.sw i { width: 5cqw; height: 2.8cqw; border-radius: 2cqw; background: var(--app-border-2); position: relative; transition: background 0.25s; }
.sw i::after { content: ""; position: absolute; left: 0.3cqw; top: 0.3cqw; width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: #fff; transition: transform 0.25s; }
.privacc #sw-acc, .priv #sw-money { background: var(--app-accent); }
.privacc #sw-acc::after, .priv #sw-money::after { transform: translateX(2.2cqw); }
.sd-main small { color: var(--app-muted); font-size: 1.75cqw; }

/* gallery */
.gal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.gal-tabs button { font: inherit; font-size: 15px; padding: 7px 16px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; }
.gal-tabs button[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
:root:not(.js-ready) .gal-tabs { display: none; }
.gal-pane { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.js-ready .gal-pane[hidden] { display: none; }
.gal-pane + .gal-pane { margin-top: 0; }
:root:not(.js-ready) .gal-pane + .gal-pane { margin-top: 32px; }
.gal-pane h3.gal-h { grid-column: 1 / -1; font-size: 1.15rem; }
.js-ready .gal-pane h3.gal-h { display: none; }
.gcard { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.gcard.big { grid-column: span 2; }
.gcard .gimg { background: var(--app-bg); aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: start center; }
.gcard.big .gimg { aspect-ratio: 16 / 9; }
.gcard img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.gcard figcaption { padding: 12px 16px 14px; font-size: 14px; color: var(--text-2); }
.gcard figcaption b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
@media (max-width: 640px) { .gcard.big { grid-column: auto; } }

/* workspace dialogs */
.pnl-dlg, .lib-dlg { position: absolute; z-index: 9; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 56cqw; background: var(--app-raised); border: 1px solid var(--app-border-2); border-radius: 1.4cqw; padding: 1.6cqw; box-shadow: 0 16px 40px -14px rgba(0,0,0,0.45); font-size: 2cqw; display: grid; gap: 0.8cqw; }
.pd-search { border: 1px solid var(--app-accent); border-radius: 1cqw; padding: 1cqw 1.4cqw; background: var(--app-inset); display: flex; gap: 1cqw; }
.pd-search .typed:empty + .muted { display: inline; }
.pd-search .typed:not(:empty) + .muted { display: none; }
.pd-cat { font-size: 1.7cqw; color: var(--app-muted); margin-top: 0.4cqw; }
.pd-item { padding: 0.9cqw 1.2cqw; border-radius: 0.9cqw; border: 1px solid var(--app-border); transition: background 0.2s; }
.pd-item.hl { background: var(--app-accent-dim); border-color: var(--app-accent); }
.pd-item.dim { opacity: 0.55; }
.pd-item small { display: block; font-size: 1.65cqw; color: var(--app-muted); }
.lib-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1cqw; }
.lib-cards span { border: 1px solid var(--app-border-2); border-radius: 1cqw; padding: 3.6cqw 0.6cqw 0.8cqw; font-size: 1.7cqw; text-align: center; background: linear-gradient(var(--app-inset), var(--app-inset)) 50% 1cqw / 80% 2.4cqw no-repeat; }
.lib-mine { display: flex; gap: 1cqw; align-items: center; }
.lib-in { flex: 1; border: 1px solid var(--app-border-2); border-radius: 0.9cqw; padding: 0.8cqw 1.2cqw; min-height: 3.6cqw; background: var(--app-inset); }
.ok-btn { background: var(--app-accent); color: #fff; border-radius: 0.9cqw; padding: 0.7cqw 2cqw; }
.lib-saved { justify-self: start; border: 1px solid var(--app-accent); color: var(--app-accent); border-radius: 0.9cqw; padding: 0.5cqw 1.6cqw; opacity: 0; transition: opacity 0.3s; }
.lib-saved.show { opacity: 1; }

/* agent (real panel) */
.agent .stage { aspect-ratio: 16 / 12.4; }
.think, .worked { color: var(--app-muted); font-size: 1.8cqw; gap: 1cqw; }
.tgroup { flex-direction: column; gap: 0.5cqw; font-size: 1.85cqw; }
.tg-h, .tg-r { display: flex; gap: 1cqw; align-items: baseline; }
.tg-h b, .tg-r b { font-weight: 600; color: var(--app-fg); }
.tg-h { color: var(--app-muted); }
.tg-r { padding-left: 2.4cqw; border-left: 1px solid var(--app-border-2); margin-left: 0.6cqw; color: var(--app-muted); }
.tg-r.solo { padding-left: 0; border: 0; margin: 0; font-size: 1.85cqw; }
.tg-r b.mono { font-weight: 500; font-size: 1.75cqw; }
.ans p { margin: 0; }
.propose { flex-direction: column; gap: 0.8cqw; border: 1px solid var(--app-border-2); border-radius: 1.4cqw; padding: 1.6cqw 1.8cqw; background: var(--app-raised); }
.propose .pd { font-size: 2.15cqw; font-weight: 600; }
.propose .muted { font-size: 1.8cqw; }
.propose .pb { display: flex; gap: 1cqw; margin-top: 0.4cqw; }
.propose .pb span { padding: 0.7cqw 2cqw; border-radius: 0.9cqw; border: 1px solid var(--app-border-2); font-size: 1.85cqw; }
.propose .pb .go { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.ag-input { flex-direction: column; gap: 1cqw; }
.ag-input .chips { display: flex; gap: 2cqw; font-size: 1.75cqw; }
.ag-input .chips span:last-child { margin-left: 0; }
.ag-foot { text-align: center; font-size: 1.6cqw; color: var(--app-muted); padding-bottom: 1.2cqw; }

/* observe */
.obs .stage { aspect-ratio: 16 / 11; display: flex; flex-direction: column; }
.ob-pane { padding: 2cqw 2.4cqw; display: grid; gap: 1.4cqw; align-content: start; }
.ob-pane.hide { display: none; }
.task-row { display: flex; gap: 2cqw; align-items: center; border: 1px solid var(--app-border-2); border-radius: 1.2cqw; padding: 1.4cqw 1.8cqw; }
.task-row b { font-size: 2.1cqw; }
.task-row small { display: block; color: var(--app-muted); font-size: 1.7cqw; margin-top: 0.4cqw; }
.tag { display: inline-block; font-size: 1.6cqw; padding: 0.1cqw 0.9cqw; border-radius: 0.6cqw; background: var(--app-accent-dim); color: var(--app-accent); margin-left: 0.8cqw; vertical-align: 0.2cqw; }
.btn2 { flex: none; border: 1px solid var(--app-border-2); border-radius: 0.9cqw; padding: 0.7cqw 1.4cqw; font-size: 1.8cqw; }
.obs-card { border: 1px solid var(--app-amber); border-radius: 1.2cqw; padding: 1.6cqw 1.8cqw; display: grid; gap: 1cqw; font-size: 1.9cqw; }
.obs-card .oc-t { color: var(--app-amber); }
.obs-card small { color: var(--app-muted); font-size: 1.7cqw; }
.oc-g { display: grid; grid-template-columns: 7cqw 1fr; gap: 0.5cqw 1.4cqw; }
.oc-g > span:nth-child(odd) { color: var(--app-muted); }
.oc-g .warn { color: var(--app-amber); }
.oc-b { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw; }
.oc-b span { text-align: center; padding: 1cqw; border-radius: 0.9cqw; border: 1px solid var(--app-border-2); }
.oc-b .go { background: var(--up-solid); border-color: var(--up-solid); color: #fff; font-weight: 600; }
.sk { border: 1px solid var(--app-border); border-radius: 1.1cqw; padding: 1.2cqw 1.6cqw; font-size: 2cqw; }
.sk small { display: block; color: var(--app-muted); font-size: 1.7cqw; }
.sk.new { border-color: var(--app-accent); background: var(--app-accent-dim); }
.demo.run .sk.new { animation: addIn 0.5s both; }

/* backtest */
.quant .stage { display: block; aspect-ratio: 16 / 11.5; }
.bt-top { display: flex; gap: 1cqw; align-items: center; padding: 1.6cqw 2cqw; font-size: 1.9cqw; }
.bt-top .run, .run2 { background: var(--app-accent); color: #fff; border-radius: 0.9cqw; padding: 0.8cqw 1.8cqw; font-size: 1.9cqw; }
.run2 { justify-self: start; }
.bt-top .run.busy { opacity: 0.6; }
.bt-f { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1cqw 1.4cqw; padding: 0 2cqw 1.4cqw; font-size: 1.95cqw; font-family: var(--mono); }
.bt-f span { border: 1px solid var(--app-border-2); border-radius: 0.8cqw; padding: 0.6cqw 1cqw; background: var(--app-inset); }
.bt-f small { display: block; font-family: var(--body); font-size: 1.5cqw; color: var(--app-muted); }
.bt-res { padding: 0 2cqw 1.4cqw; display: grid; gap: 1cqw; }
.bt-res > small { font-size: 1.75cqw; color: var(--app-muted); }
.bt-res svg { width: 100%; height: 13cqw; border: 1px solid var(--app-border); border-radius: 0.8cqw; }
.bt-res .eq-line { stroke: var(--up); }
.bt-res .eq-area { fill: var(--up-dim); }
.demo.run.s3 .bt-res .eq-line { stroke-dashoffset: 0; }
.kpi6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.8cqw; }
.kpi6 span { border: 1px solid var(--app-border); border-radius: 0.9cqw; padding: 0.8cqw 1cqw; background: var(--app-raised); }
.kpi6 small { display: block; font-size: 1.5cqw; color: var(--app-muted); }
.kpi6 b { font-family: var(--mono); font-size: 1.95cqw; font-weight: 500; }
.bt-opt { margin: 0 2cqw; border-top: 1px solid var(--app-border); padding-top: 1.2cqw; display: grid; gap: 1cqw; font-size: 1.85cqw; }
.bt-opt .bt-f { grid-template-columns: repeat(5, 1fr); padding: 0; }
.bt-dlg { position: absolute; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70cqw; background: var(--app-raised); border: 1px solid var(--app-border-2); border-radius: 1.4cqw; padding: 2cqw; display: grid; gap: 1.2cqw; font-size: 2cqw; box-shadow: 0 16px 40px -14px rgba(0,0,0,0.5); }
.bt-dlg .bt-f { grid-template-columns: 1.6fr 1fr 1fr; padding: 0; }
.bt-dlg pre.code { margin: 0; grid-row: auto; border: 1px solid var(--app-border); border-radius: 0.9cqw; font-size: 1.75cqw; padding: 1.4cqw 1.8cqw; }
.bt-dlg .ok-btn { justify-self: end; }

/* custom indicator */
.agent.slim .stage { aspect-ratio: auto; height: 100%; min-height: 40cqw; }
.agent.slim .ag-log { justify-content: flex-start; font-size: 3.4cqw; gap: 2.4cqw; padding: 3cqw; -webkit-mask-image: none; mask-image: none; }
.agent.slim .msg-u p { max-width: 100%; padding: 2cqw 2.6cqw; border-radius: 2.4cqw; }
.agent.slim .tg-r.solo { font-size: 3.1cqw; }
.agent.slim .win-bar, .duo.wide .chart .win-bar { font-size: 3.4cqw; padding: 2.6cqw 3.4cqw; }
.duo.wide .chart .win-bar { font-size: 2.8cqw; padding: 2.2cqw 2.8cqw; }
.duo.wide .chart .stage { aspect-ratio: 600 / 330; }
.ch .ind { stroke: var(--app-amber); }
.demo.run .ch .ind { stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 1.4s ease; }
.demo.run.s3 .ch .ind { stroke-dashoffset: 0; }
.legend { position: absolute; left: 2cqw; top: 1.6cqw; font-size: 2.4cqw; display: flex; align-items: center; gap: 1cqw; color: var(--app-amber); }
.legend i { width: 3cqw; height: 0.5cqw; background: var(--app-amber); border-radius: 1px; }
.legend b { color: var(--app-fg); font-weight: 500; }

.duo { position: relative; container-type: inline-size; }
.duo > .cursor { width: 2.2cqw; height: 2.2cqw; }
.fl-arm.armed { color: #1a1304; border-color: var(--app-amber); background: var(--app-amber); font-weight: 600; }
.fl-arm .zap { width: 2cqw; height: 2cqw; fill: currentColor; stroke: none; vertical-align: -0.2cqw; }
.duo.wide { align-items: stretch; }
.agent.slim .ag-log { font-size: 5.2cqw; gap: 3cqw; padding: 4cqw; }
.agent.slim .tg-r.solo { font-size: 4.6cqw; }
.agent.slim .win-bar { font-size: 4.6cqw; padding: 3.4cqw 4cqw; }
.duo.wide .chart { display: flex; flex-direction: column; }

/* ===================== v2.2：Agent 主軸 ===================== */
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.hero-points { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hero-points a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.hero-points a:hover { border-color: var(--line-2); transform: translateY(-2px); }
.hero-points b { font-family: var(--heading); font-size: 1.08rem; }
.hero-points span { font-size: 14px; color: var(--text-2); line-height: 1.6; }
@media (max-width: 860px) { .hero-points { grid-template-columns: 1fr; } }
.kick { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.h2s { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.f-text .h2s + p { margin-top: 16px; }
.safe-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px !important; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.safe-line .i { margin-top: 4px; color: var(--accent); }
.f-text h3 + .caps { margin-top: 14px; }
#research .feature + .feature { margin-top: 72px; }

.safe-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.safe-shot { margin: 0; }
.safe-shot img { width: 100%; max-width: 380px; height: auto; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.safe-shot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.safe-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.safe-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-size: 15px; color: var(--text-2); }
.safe-list b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
@media (max-width: 900px) { .safe-grid, .safe-list { grid-template-columns: 1fr; } .safe-shot img { max-width: 320px; } }

.mini-ws2 .stage { aspect-ratio: auto; height: 100%; min-height: 42cqw; background: var(--app-bg); }
.duo.wide .mini-ws2 { display: flex; }
.mini-ws2 .stage { flex: 1; }
.mini-ws2 .ws-area { inset: 2cqw; top: 2cqw; }
.mini-ws2 .pn-h { font-size: 2.6cqw; }
.mini-ws2 .pn-b svg.ch { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-ws2 .legend { font-size: 2.6cqw; left: 1cqw; top: 0.4cqw; }

.alloc .stage { aspect-ratio: 16 / 13; }
.alloc-t { flex-direction: column; border: 1px solid var(--app-border-2); border-radius: 1.2cqw; overflow: hidden; font-size: 1.9cqw; }
.alloc-t > div { display: grid; grid-template-columns: 1.2fr 0.7fr 2fr 0.7fr; gap: 1cqw; padding: 0.8cqw 1.4cqw; border-bottom: 1px solid var(--app-border); align-items: center; }
.alloc-t > div:last-child { border-bottom: 0; }
.alloc-t .h { color: var(--app-muted); background: var(--app-raised); }
.alloc-t > div > span:nth-child(3) { display: flex; align-items: center; gap: 1cqw; font-family: var(--mono); }
.alloc-t i { display: block; height: 1.4cqw; width: calc(var(--w) * 0.7 * var(--k, 1)); background: var(--app-accent); border-radius: 0.4cqw; }

.brief .stage { aspect-ratio: 16 / 12; display: flex; flex-direction: column; }
.f-in { border: 1px solid var(--app-border-2); border-radius: 0.9cqw; padding: 1cqw 1.4cqw; background: var(--app-inset); font-size: 1.95cqw; min-height: 4cqw; }
.f-in.tall { min-height: 9cqw; }
.f-in.c { text-align: center; }
.f-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw; }
.save-btn { background: var(--up-solid); color: #fff; text-align: center; border-radius: 0.9cqw; padding: 1cqw; font-size: 1.95cqw; font-weight: 600; }
.brief .tk-seg { font-size: 1.85cqw; }
.brief small { font-size: 1.7cqw; }
.run-row { display: flex; gap: 1.2cqw; align-items: baseline; font-size: 2.1cqw; }
.run-row .muted { margin-left: auto; font-size: 1.75cqw; }
.run-sum { border: 1px solid var(--app-border-2); border-radius: 1.2cqw; padding: 1.6cqw 2cqw; display: grid; gap: 0.8cqw; font-size: 2cqw; }
.run-sum p { margin: 0; }
.ans p + p { margin-top: 0.8cqw; }

.dl-steps { list-style: none; counter-reset: ds; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl-steps li { counter-increment: ds; display: grid; gap: 4px; padding: 16px 18px 16px 56px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; color: var(--text-2); }
.dl-steps li::before { content: counter(ds); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); font-family: var(--mono); font-size: 14px; }
.dl-steps b { color: var(--text); font-size: 16px; }
@media (max-width: 860px) { .dl-steps { grid-template-columns: 1fr; } }
.duo.wide { aspect-ratio: 16 / 8.4; }
.duo.wide > .win { height: 100%; }
.agent.slim .stage { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.agent.slim .ag-log { flex: 1; justify-content: flex-end; overflow: hidden; }
.mini-ws2 .stage { min-height: 0; }
@media (max-width: 560px) { .duo.wide { aspect-ratio: auto; } .duo.wide > .win { height: auto; } .agent.slim .stage { min-height: 60cqw; } .mini-ws2 .stage { min-height: 60cqw; } }
#panels .gal + .feature { margin-top: 88px; }
.ans { flex-direction: column; }
.demo:not(.run) .pop.keep { opacity: 1; pointer-events: auto; }
.gal-pane { grid-auto-flow: dense; }

/* 淺色小字對比 ≥ 4.5 */
.win .tag, .pill.on { color: var(--app-accent-text, #1d4ed8); }
:root[data-theme="dark"] .win .tag, :root[data-theme="dark"] .pill.on { --app-accent-text: #8fb6ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .win .tag, :root:not([data-theme="light"]) .pill.on { --app-accent-text: #8fb6ff; } }
.fl-arm.armed { background: #e0a43c; border-color: #e0a43c; color: #1a1304; }
.duo.wide > .win { display: flex; flex-direction: column; }
.duo.wide > .win > .stage { flex: 1; min-height: 0; height: auto; }
@media (max-width: 560px) { .duo.wide > .win > .stage { min-height: 60cqw; } }
.cmd-d { margin-top: 12px; }
.cmd-d summary { cursor: pointer; font-size: 14px; color: var(--text-2); }
.hero .sub { margin-top: 14px; font-family: var(--heading); font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--text); }
.hero .sub + .lead { margin-top: 14px; }

/* ===================== v3：連續捲動動效 ===================== */
:root { --ease: cubic-bezier(.2,.7,.1,1);
  --st-bg: #f6f3ec; --st-glow: #ece6d8; --st-fg: #15213b; --st-sub: #15213b; --st-text: #3b4660; --st-muted: #5d6679; --st-line: rgba(21,33,59,.18);
  --st-btn-bg: #15213b; --st-btn-fg: #f6f3ec; --st-shadow: 0 50px 120px -40px rgba(21,33,59,.45), 0 0 0 1px rgba(21,33,59,.10);
  --ag-bg: #ffffff; --ag-raised: #f7f8fa; --ag-border: #c3ccd9; --ag-fg: #1c2433; --ag-muted: #5f6b80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --st-bg: #0b1222; --st-glow: #15213b; --st-fg: #ffffff; --st-sub: #ffffff; --st-text: #b9c2d4; --st-muted: #a3adc2; --st-line: rgba(238,241,246,.22);
  --st-btn-bg: #f6f3ec; --st-btn-fg: #15213b; --st-shadow: 0 50px 120px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08);
  --ag-bg: #0a0c10; --ag-raised: #10131a; --ag-border: #2a3140; --ag-fg: #d5dbe8; --ag-muted: #7e8798; } }
:root[data-theme="dark"] {
  --st-bg: #0b1222; --st-glow: #15213b; --st-fg: #ffffff; --st-sub: #ffffff; --st-text: #b9c2d4; --st-muted: #a3adc2; --st-line: rgba(238,241,246,.22);
  --st-btn-bg: #f6f3ec; --st-btn-fg: #15213b; --st-shadow: 0 50px 120px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08);
  --ag-bg: #0a0c10; --ag-raised: #10131a; --ag-border: #2a3140; --ag-fg: #d5dbe8; --ag-muted: #7e8798; }

/* ---------- 首屏 ---------- */
.hx { position: relative; padding: 0; }
.hx-pin { position: relative; }
.hx-stage { position: relative; background: radial-gradient(120% 70% at 50% 100%, var(--st-glow), var(--st-bg) 70%); color: var(--st-fg); transition: background-color .4s; padding: 112px 0 64px; overflow: hidden; }
.hx-copy { position: relative; z-index: 2; text-align: center; }
.hx-eyebrow { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 22px; }
.hx-eyebrow span { font-size: 13px; letter-spacing: .04em; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--st-line); color: var(--st-text); }
.hx h1 { font-size: clamp(2.6rem, 7.6vw, 6rem); line-height: 1.08; letter-spacing: -.01em; color: var(--st-fg); }
.hx-l { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.hx-l > span { display: inline-block; }
.hx .sub { margin: 18px auto 0; font-family: var(--heading); font-size: clamp(1.15rem, 2.4vw, 1.6rem); color: var(--st-sub); }
.hx .lead { margin: 14px auto 0; max-width: 34em; color: var(--st-text); font-size: clamp(1rem, 1.5vw, 1.12rem); }
.hx .cta { justify-content: center; }
.hx .btn.primary { background: var(--st-btn-bg); color: var(--st-btn-fg); }
.hx .btn.ghost { border-color: var(--st-line); color: var(--st-fg); }
.hx .btn.ghost:hover { background: rgba(127,127,127,.08); }
.stars { font-family: var(--mono); font-size: 13px; padding: 1px 8px; border-radius: 99px; background: rgba(127,127,127,.18); }
.hx-meta { list-style: none; padding: 0; margin: 26px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; color: var(--st-muted); }
.hx-meta b { color: var(--st-fg); font-weight: 600; margin-right: 6px; }
.hx-app { position: relative; z-index: 1; margin: 56px auto 0; width: min(1120px, calc(100% - 48px)); perspective: 1600px; }
.hx-win { container-type: inline-size; position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--app-bg); box-shadow: var(--st-shadow); transform-origin: 50% 0; aspect-ratio: 5 / 3; }
.hx-win img.hx-base { width: 100%; height: 100%; display: block; }
.hx-crops { position: absolute; inset: 0; pointer-events: none; }
.hx-crop { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.hx-crop img { width: 100%; height: 100%; display: block; }
.hx-crop[data-k="agent"] { clip-path: inset(4.3% 71% 2% .4% round 6px); }
.hx-crop[data-k="chart"] { clip-path: inset(4.3% 33.7% 2% 29.5% round 6px); }
.hx-crop[data-k="watch"] { clip-path: inset(4.3% 17.2% 2% 66.8% round 6px); }
.hx-crop[data-k="flash"] { clip-path: inset(4.3% .4% 2% 83.3% round 6px); }
.hx-agent { position: absolute; left: 1%; width: 27.6%; top: 14.2%; height: 70%; background: var(--ag-bg); display: flex; flex-direction: column; justify-content: flex-start; gap: 1.1cqw; padding: 1.6cqw 1.2cqw; font-size: 1.15cqw; line-height: 1.5; color: var(--ag-fg); opacity: 0; }
.hx-agent .msg-u { display: flex; justify-content: flex-end; }
.hx-agent .msg-u p { margin: 0; max-width: 92%; background: var(--ag-raised); border: 1px solid var(--ag-border); border-radius: .9cqw; padding: .8cqw 1cqw; }
.hx-agent .tg-r { display: flex; gap: .6cqw; font-size: 1.05cqw; color: var(--ag-muted); opacity: 0; transform: translateY(.6cqw); transition: opacity .35s, transform .45s var(--ease); }
.hx-agent .tg-r b { color: var(--ag-fg); }
.hx-agent .ans { opacity: 0; transition: opacity .4s; }
.hx-agent .ans p { margin: 0; }
.hx-agent .on { opacity: 1; transform: none; }
.hx-ma { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hx-ma { clip-path: inset(0 calc((1 - var(--hm, 1)) * 100%) 0 0); }
.hx-ma polyline { fill: none; stroke: #e0a43c; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(224,164,60,.45)); }
.hx-legend { position: absolute; left: 32.6%; top: 25.4%; font: 500 clamp(9px, .95vw, 13px)/1 var(--mono); color: #e0a43c; display: flex; gap: 6px; align-items: center; opacity: 0; }
.hx-legend i { width: 14px; height: 2px; background: #e0a43c; }
.hx-after { padding-top: 20px; }
.hx-after .shot-cap { margin-top: 0; }
.hx-first { display: flex; width: fit-content; margin: 28px auto 0; align-items: center; gap: 8px; padding: 12px 18px 12px 20px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); }
.hx-first span { color: var(--muted); font-weight: 500; }
.hx-first:hover { transform: translateY(-1px); }

/* 載入進場（只在動效模式） */
@keyframes hxRise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes hxFade { from { opacity: 0; transform: translateY(14px); } to { transform: none; } }
@keyframes hxEmerge { from { opacity: 0; filter: blur(14px) brightness(.4); translate: 0 80px; } to { opacity: 1; filter: none; translate: 0 0; } }

/* 桌面：釘住的首屏 */
@media (min-width: 900px) {
  .mo .hx-stage { position: sticky; top: 0; height: 100vh; padding: 0; display: grid; grid-template-rows: auto 1fr; align-content: start;
    clip-path: inset(calc(var(--hs, 0) * 3.2vh) calc(var(--hs, 0) * 3.2vw) round calc(var(--hs, 0) * 28px)); }
  .mo .hx-win { background: transparent; }
}
@media (max-width: 899px) {
  .hx-stage { padding: 96px 0 40px; }
  .hx-agent, .hx-legend { display: none; }
  .hx-app { width: calc(100% - 32px); margin-top: 40px; }
}
@keyframes hxDraw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

:root:not(.mo) .hx-agent { opacity: 1; }
:root:not(.mo) .hx-agent .tg-r, :root:not(.mo) .hx-agent .ans, :root:not(.mo) .hx-legend { opacity: 1; transform: none; }
@media (max-width: 899px) { :root:not(.mo) .hx-agent { display: none; } }

/* ---------- Agent 場景：捲動敘事 ---------- */
.sy { padding: 72px 0 40px; }
.sy-step { padding: 40px 0 72px; }
.sy-step + .sy-step { border-top: 1px solid var(--line); }
.sy-step > .sy-fig { margin-top: 28px; }
.sy-stage { display: none; }
@media (min-width: 900px) {
  .mo .sy-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .mo .sy-step { min-height: 128vh; display: flex; align-items: center; border: 0; padding: 0; }
  .mo .sy-step > .sy-fig { display: none; }
  .mo .sy-stage { display: block; position: sticky; top: 0; height: 100vh; }
}
@media (max-width: 899px) {
  .mo .sy-stage { display: none; }
  .mo .sy-step > .sy-fig .demo-ctrl { display: none; }
  .mo .sy-step .caps li { transition: background-color .25s; }
}
.mo .sy-stage .demo-ctrl { display: none; }
.sy-text .h2s { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
.sy-text > .h2s + p, .sy-text > p { margin-top: 14px; color: var(--text-2); }
.sy-text .sec-head-in p { color: var(--text-2); }

/* ---------- 面板組成版面 ---------- */
.asm { margin: 8px 0 48px; }
.asm-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--app-bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; perspective: 1400px; }
.asm-p { position: absolute; left: calc(var(--x) * 1% + 4px); top: calc(var(--y) * 1% + 4px); width: calc(var(--w) * 1% - 8px); height: calc(var(--h) * 1% - 8px); border-radius: 8px; overflow: hidden; border: 1px solid var(--app-border-2); background: var(--app-panel); will-change: transform, opacity; }
.asm-p img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.asm-tag { position: absolute; right: 18px; bottom: 16px; padding: 7px 14px; border-radius: 99px; background: var(--app-accent); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.mo .asm-pin { position: sticky; top: calc(50vh - min(28vw, 330px)); }
.mo .asm { height: 220vh; }
.mo .asm-p { transform: translate3d(calc(var(--ax) * (1 - var(--q))), calc(var(--ay) * (1 - var(--q))), calc(var(--az) * (1 - var(--q)))) rotate(calc(var(--ar) * (1 - var(--q)))); opacity: calc(var(--q) * 1.6); }
.mo .asm-tag { opacity: var(--tag, 0); transform: translateY(calc((1 - var(--tag, 0)) * 16px)); }
@media (max-width: 899px) { .mo .asm { height: 160vh; } .mo .asm-pin { top: 22vh; } .asm-tag { font-size: 12px; right: 10px; bottom: 10px; } }

/* ---------- 捲動進場（通用） ---------- */

/* ---------- 下載：開源、Mac ---------- */
.card.mac { position: relative; border-color: var(--line-2); box-shadow: var(--shadow); }
.mac-tag { position: absolute; top: -11px; left: 20px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--btn-bg); color: var(--btn-fg); }
.oss { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); text-decoration: none; }
.oss:hover { border-color: var(--text-2); }
.oss .i { width: 26px; height: 26px; color: var(--text); }
.oss b { color: var(--text); margin-right: 8px; }
.oss .go { margin-left: auto; font-weight: 600; color: var(--text); white-space: nowrap; }
.oss .stars { color: var(--text); }
@media (max-width: 640px) { .oss { flex-wrap: wrap; } .oss .go { margin-left: 0; } }

/* ---------- 申請 API Key 教學播放器 ---------- */
.tu-player { position: relative; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 18px; }
.tu-top { display: flex; align-items: baseline; gap: 12px; margin: 2px 4px 12px; font-size: 14px; color: var(--muted); }
.tu-count b { font-family: var(--mono); font-size: 18px; color: var(--text); }
.tu-where { padding: 2px 10px; border-radius: 99px; background: var(--chip); color: var(--text-2); }
.tu-steps { list-style: none; padding: 0; margin: 0; }
.tu-scene { position: relative; aspect-ratio: 16 / 9.4; border-radius: 14px; overflow: hidden; background: #e9edf3; container-type: inline-size; display: grid; place-items: center; padding: 3.4cqw; }
.tu-scene.app { background: var(--app-bg); }
.tu-cap b { display: block; font-family: var(--heading); font-size: 1.25rem; color: var(--text); }
.tu-cap p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.tu-tbd { display: none !important; } /* 待確認的註記：查證前不對外顯示 */
.tu-cap .tu-tbd::before { content: "註："; }
.tu-cc { display: none; }
.tu-ctrl { display: none; }
/* 沒有 JS／減少動態：12 步依序展開 */
:root:not(.tu-js) .tu-step + .tu-step { margin-top: 28px; }
:root:not(.tu-js) .tu-cap { margin-top: 14px; }
:root:not(.tu-js) .tu-top { display: none; }
/* 播放器模式 */
.tu-js .tu-step { display: none; }
.tu-js .tu-step.is-on { display: block; animation: tuIn .55s var(--ease); }
.tu-js .tu-step .tu-cap { display: none; }
.tu-js .tu-cc { display: block; min-height: 112px; padding: 14px 6px 6px; }
.tu-js .tu-ctrl { display: flex; align-items: center; gap: 8px; padding: 8px 4px 2px; }
@keyframes tuIn { from { opacity: 0; transform: translateX(18px); } to { transform: none; } }
.tu-b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; flex: none; }
.tu-b.main { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.tu-b .play { display: none; }
.tu.paused .tu-b .play { display: block; }
.tu.paused .tu-b .pause { display: none; }
.tu-segs { flex: 1; display: grid; grid-auto-flow: column; gap: 4px; margin-left: 8px; }
.tu-segs button { height: 24px; border: 0; padding: 0; background: transparent; cursor: pointer; position: relative; }
.tu-segs button::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 4px; background: var(--line-2); }
.tu-segs button i { position: absolute; left: 0; top: 10px; height: 4px; border-radius: 4px; background: var(--text); width: calc(var(--f, 0) * 100%); }
.tu-segs button:focus-visible { outline: 2px solid var(--link); }
.tu.paused .tu-ring, .tu.paused .tu-hot { animation-play-state: paused; }

/* 網站示意畫面 */
.site2 { width: 100%; height: 100%; display: flex; flex-direction: column; border-radius: 1.6cqw; overflow: hidden; background: #fff; color: #1c2433; box-shadow: 0 2cqw 6cqw -2cqw rgba(21,33,59,.25); font-size: 1.9cqw; position: relative; }
.site2.small { height: auto; }
.s2-bar { display: flex; align-items: center; gap: .8cqw; padding: 1cqw 1.6cqw; background: #eef1f6; border-bottom: 1px solid #dde2e9; }
.s2-bar i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #cfd5df; }
.s2-url { margin-left: 1.4cqw; font-family: var(--mono); font-size: 1.6cqw; color: #5f6b80; background: #fff; border-radius: 1cqw; padding: .3cqw 1.4cqw; }
.s2-body { position: relative; flex: 1; padding: 2.4cqw 3cqw; display: flex; flex-direction: column; gap: 1.6cqw; }
.s2-nav { display: flex; align-items: center; gap: 2.4cqw; padding: 1.2cqw 2cqw; margin: -2.4cqw -3cqw 0; background: #1c2433; color: #e7ebf2; font-size: 1.8cqw; }
.s2-nav .sp { flex: 1; }
.s2-av { width: 4cqw; height: 4cqw; border-radius: 50%; display: grid; place-items: center; background: #5f6b80; color: #fff; font-weight: 700; }
.s2-menu { align-self: flex-end; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; padding: 2cqw 2.4cqw; background: #fff; border: 1px solid #dde2e9; border-radius: 1.2cqw; box-shadow: 0 2cqw 5cqw -2cqw rgba(0,0,0,.25); width: 48cqw; }
.s2-menu div { display: grid; gap: .9cqw; align-content: start; }
.s2-menu small { color: #8a5d00; font-size: 1.6cqw; }
.s2-hl { color: #1d4ed8; font-weight: 700; }
.s2-h { font-size: 2.6cqw; }
.s2-notes { margin: 0; padding-left: 2.4cqw; color: #5f6b80; font-size: 1.7cqw; display: grid; gap: .3cqw; }
.s2-actions { display: flex; gap: 1.2cqw; justify-content: flex-end; }
.s2-btn { display: inline-flex; align-items: center; justify-content: center; padding: .9cqw 2.2cqw; border-radius: .9cqw; background: #1c2433; color: #fff; font-weight: 600; white-space: nowrap; }
.s2-btn.ghost { background: #fff; color: #1c2433; border: 1px solid #c3ccd9; }
.s2-table { border: 1px solid #dde2e9; border-radius: 1cqw; overflow: hidden; font-size: 1.7cqw; }
.s2-table > div { display: grid; grid-template-columns: repeat(var(--c, 3), 1fr); gap: 1cqw; padding: 1cqw 1.6cqw; border-bottom: 1px solid #eef1f6; }
.s2-table > div:has(span:nth-child(4)) { --c: 4; }
.s2-table .h { background: #f4f6f9; color: #5f6b80; }
.s2-table .e { display: block; text-align: center; color: #8a94a6; padding: 3cqw; }
.s2-hl2 { background: #eef3ff; outline: 2px solid #1d4ed8; outline-offset: -2px; }
.st { font-weight: 600; color: #b42318; }
.st.ok, .st .ok { color: #067556; }
.site2.dim::after { content: ""; position: absolute; inset: 0; top: 4.4cqw; background: rgba(28,36,51,.38); }
.s2-modal { position: absolute; z-index: 2; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 46cqw; background: #fff; border-radius: 1.4cqw; padding: 2.4cqw 2.6cqw; display: grid; gap: 1.3cqw; box-shadow: 0 3cqw 8cqw -2cqw rgba(0,0,0,.4); }
.s2-modal.wide { width: 64cqw; }
.s2-modal.mini { position: relative; left: auto; top: auto; transform: none; width: auto; margin-top: 1cqw; box-shadow: 0 1cqw 4cqw -1cqw rgba(0,0,0,.25); border: 1px solid #dde2e9; justify-items: start; }
.s2-modal > b { font-size: 2.4cqw; }
.s2-modal p { margin: 0; color: #5f6b80; font-size: 1.75cqw; }
.s2-radio { display: flex; gap: 3cqw; }
.s2-radio span { display: inline-flex; align-items: center; gap: .9cqw; }
.s2-radio span::before { content: ""; width: 2cqw; height: 2cqw; border-radius: 50%; border: 2px solid #8a94a6; box-sizing: border-box; }
.s2-radio span.on::before { border: .6cqw solid #1d4ed8; }
.s2-in { position: relative; display: flex; align-items: center; gap: 1cqw; min-height: 4cqw; border: 1px solid #c3ccd9; border-radius: .9cqw; padding: .6cqw 1.4cqw; background: #fff; flex: 1; }
.s2-in small { color: #8a94a6; font-size: 1.5cqw; }
.s2-in .ph { position: absolute; left: 1.4cqw; pointer-events: none; }
.s2-in .tu-type:not(:empty) + .ph { display: none; }
.s2-in.muted { color: #8a94a6; flex: 0 0 auto; }
.s2-in.mono { font-family: var(--mono); font-size: 1.7cqw; }
.s2-row { display: flex; gap: 1.2cqw; align-items: center; }
.s2-row.end { justify-content: flex-end; }
.s2-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.s2-grid2 label { display: grid; gap: .6cqw; color: #5f6b80; font-size: 1.7cqw; }
.s2-sub { font-weight: 700; font-size: 1.8cqw; margin-top: .4cqw; }
.s2-perm { display: flex; flex-wrap: wrap; gap: 1.2cqw 3cqw; }
.s2-perm.big { gap: 1.6cqw 4cqw; font-size: 2.1cqw; }
.s2-perm span { display: inline-flex; align-items: center; gap: 1cqw; }
.s2-perm i { width: 2.2cqw; height: 2.2cqw; border-radius: .5cqw; border: 2px solid #8a94a6; box-sizing: border-box; display: grid; place-items: center; }
.tu-tick.done i, :root:not(.tu-js) .tu-tick i { background: #1d4ed8; border-color: #1d4ed8; }
.tu-tick.done i::after, :root:not(.tu-js) .tu-tick i::after { content: "✓"; color: #fff; font-size: 1.6cqw; font-style: normal; line-height: 1; }
.tu-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2cqw 2cqw; margin-top: .6cqw; }
.tu-notes p { margin: 0; padding: 1.2cqw 1.4cqw; border-radius: 1cqw; background: #f4f6f9; color: #3b4660; font-size: 1.7cqw; }
.tu-notes b { display: block; color: #1c2433; }
.s2-hint { color: #5f6b80; font-size: 1.6cqw; }
.s2-warn { color: #b42318 !important; font-weight: 600; }
.s2-tabs { display: flex; gap: 1.2cqw; }
.s2-tabs span { padding: .7cqw 2cqw; border-radius: 99px; background: #eef1f6; font-size: 1.7cqw; }
.s2-tabs span.on { background: #1c2433; color: #fff; }
.tu-swap { display: inline-grid; }
.tu-swap > span { grid-area: 1 / 1; transition: opacity .35s; }
.tu-swap > span:last-child { opacity: 0; }
.tu-swap.done > span:first-child, :root:not(.tu-js) .tu-swap > span:first-child { opacity: 0; }
.tu-swap.done > span:last-child, :root:not(.tu-js) .tu-swap > span:last-child { opacity: 1; }
.tu-card { width: 70cqw; background: #fff; color: #1c2433; border-radius: 1.6cqw; padding: 3cqw 3.4cqw; display: grid; gap: 1.8cqw; font-size: 2cqw; box-shadow: 0 2cqw 6cqw -2cqw rgba(21,33,59,.25); }
.tu-card > b { font-size: 2.8cqw; font-family: var(--heading); }
.tu-chk { display: flex; gap: 1.6cqw; align-items: flex-start; }
.tu-chk i { flex: none; margin-top: .4cqw; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: #067556; display: grid; place-items: center; }
.tu-chk i::after { content: "✓"; color: #fff; font-size: 1.7cqw; font-style: normal; }
.tu-chk b { display: block; }
.tu-chk span { color: #3b4660; }
.tu-link { color: #1d4ed8; font-size: 1.8cqw; }
.tu-split { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; align-items: center; }
.tu-split .tu-card { width: auto; }
.tu-split .site2 { height: auto; }
.tu-shot { position: relative; margin: 0; height: 100%; aspect-ratio: 832 / 1024; border-radius: 1.4cqw; overflow: hidden; box-shadow: 0 2cqw 6cqw -2cqw rgba(0,0,0,.35); }
.tu-shot.wide { height: auto; width: 100%; aspect-ratio: 704 / 468; }
.tu-shot img { width: 100%; height: 100%; display: block; }
.tu-hot { position: absolute; border-radius: .8cqw; box-shadow: 0 0 0 2px #e0a43c, 0 0 0 6px rgba(224,164,60,.25); opacity: 0; transition: opacity .3s; }
.tu-hot.hit, :root:not(.tu-js) .tu-hot { opacity: 1; animation: tuPulse 1.6s ease-in-out infinite; }
.tu-tag { position: absolute; padding: .5cqw 1.2cqw; border-radius: 99px; background: #e0a43c; color: #1a1304; font-size: 1.7cqw; font-weight: 700; white-space: nowrap; }
.tu-ring { position: absolute; border-radius: 1cqw; box-shadow: 0 0 0 2px #e0a43c, 0 0 0 7px rgba(224,164,60,.25); animation: tuPulse 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes tuPulse { 50% { box-shadow: 0 0 0 2px #e0a43c, 0 0 0 11px rgba(224,164,60,.12); } }
.tu-js .tu-in { opacity: 0; transform: translateY(1.2cqw); transition: opacity .4s, transform .5s var(--ease); }
.tu-js .tu-in.shown { opacity: 1; transform: none; }
.tu-cur { position: absolute; left: 0; top: 0; width: 3.4cqw; height: 3.4cqw; z-index: 9; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); will-change: transform; }
.tu-cur svg { width: 100%; height: 100%; }
.tu-cur::after { content: ""; position: absolute; left: -1.6cqw; top: -1.6cqw; width: 3.2cqw; height: 3.2cqw; border-radius: 50%; border: 2px solid #e0a43c; opacity: 0; }
.tu-cur.click::after { animation: ripple .5s ease-out; }
:root:not(.tu-js) .tu-cur { display: none; }
@media (max-width: 640px) {
  .tu-player { padding: 10px; border-radius: 14px; }
  .tu-scene { aspect-ratio: 4 / 3.4; padding: 2cqw; }
  .site2, .tu-card, .tu-notes p, .s2-modal p { font-size: 2.6cqw; }
  .s2-modal, .s2-modal.wide { width: 90cqw; }
  .tu-split { grid-template-columns: 1fr; }
  .tu-split .tu-card { display: none; }
  .tu-segs { gap: 2px; }
}

@media (min-width: 900px) {
  .mo .sy-step { align-items: flex-start; }
  .mo .sy-text { position: sticky; top: 22vh; padding-bottom: 8vh; }
  .mo .sy-step:last-child { min-height: 108vh; }
}
.tu-split.r2 { grid-template-columns: .75fr 1.25fr; }
@media (max-width: 640px) { .tu-split.r2 { grid-template-columns: 1fr; } .tu-split.r2 .site2 { display: none; } }

@keyframes hxEmergeM { from { opacity: .2; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
.tu-segs button { min-width: 24px; }
@media (max-width: 640px) { .tu-ctrl { flex-wrap: wrap; } .tu-segs { flex-basis: 100%; margin-left: 0; order: 9; } }
.hx-note { margin-top: 14px; text-align: center; font-size: 14px; color: var(--muted); }

/* ===================== v4：平滑追趕、逐字進場（依 motion-research.md） ===================== */
@property --hc { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --hy { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --ht { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --ha { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --hm { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --hl { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --hs { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --hx { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --hx2 { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --r { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --q { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --tag { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --in { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --out { syntax: '<number>'; inherits: false; initial-value: 0; }
:root { --expo: cubic-bezier(.16,1,.3,1); --quart: cubic-bezier(.25,1,.5,1); }

/* 拆字單位 */
.u { display: inline-block; white-space: pre; }
.word { display: inline-block; white-space: nowrap; }
.mask { display: inline-block; overflow: clip; overflow-clip-margin: .12em; padding-bottom: .08em; vertical-align: bottom; }
.hx h1 .ln { display: inline-block; white-space: nowrap; }

/* 首屏載入：大標逐字遮罩＋模糊，其他依序跟上 */
.mo:not(.go) .hx-copy .hx-f:not(.lead), .mo:not(.go) .hx h1, .mo:not(.go) .hx-win { opacity: 0; }
.mo.go .hx h1 .u { animation: riseBlur .95s var(--expo) both; animation-delay: calc(var(--li, 0) * 140ms + var(--ci, 0) * 34ms + 80ms); }
.mo.go .hx h1.byword .u { animation-name: unblur; animation-duration: .9s; animation-timing-function: var(--quart); animation-delay: calc(var(--li, 0) * 160ms + var(--ci, 0) * 70ms + 60ms); }
@keyframes riseBlur { from { transform: translateY(102%) rotate(4deg); filter: blur(6px); opacity: 0; } 40% { opacity: 1; } to { transform: none; filter: blur(0); opacity: 1; } }
@keyframes unblur { from { transform: translateY(.28em) scale(1.02); filter: blur(10px); opacity: 0; } to { transform: none; filter: blur(0); opacity: 1; } }
.mo.go .hx-copy .hx-f { animation: follow .8s var(--expo) both; animation-delay: calc(var(--fd, 600ms) + var(--fi, 0) * 70ms); }
.mo.go .hx-copy .hx-meta { animation-name: followNoBlur; }
@keyframes follow { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes followNoBlur { from { opacity: 0; transform: translateY(16px); } to { transform: none; } }
.mo.go .hx-win { animation: winIn 1.4s var(--expo) .35s both; }
@keyframes winIn { from { opacity: 0; translate: 0 80px; rotate: x 8deg; filter: blur(8px); } 64% { filter: blur(0); } to { opacity: 1; translate: 0 0; rotate: x 0deg; filter: none; } }
.hx-win::after { content: ""; position: absolute; inset: 0; background: var(--st-bg); opacity: 0; pointer-events: none; z-index: 5; }
.mo.go .hx-win::after { animation: veil 1.4s var(--expo) .35s both; }
@keyframes veil { from { opacity: .6; } to { opacity: 0; } }
.mo.go .hx-stage { animation: glowIn 1.4s var(--quart) both; }
@keyframes glowIn { from { background-size: 104% 104%; } to { background-size: 100% 100%; } }

/* 打字：逐字 opacity（不改文字內容） */
.ty .u { opacity: var(--o, 1); }
.mo .ty .u { transition: opacity .12s linear; }

/* 首屏捲動段（桌面），變數寫在各自元素 */
@media (min-width: 900px) {
  .mo .hx-pin { height: 360vh; }
  .mo .hx-stage { clip-path: inset(calc(var(--hs) * 3.2vh) calc(var(--hs) * 3.2vw) round calc(var(--hs) * 28px)); }
  .mo .hx-copy { padding-top: 15vh; transform: translateY(calc(var(--hc) * -8vh)); opacity: calc(1 - var(--hc)); }
  .mo .hx-app { position: absolute; left: 50%; top: 0; margin: 0; width: min(1180px, 84vw); transform: translate(-50%, calc(var(--hy) * 62vh + 12vh)); }
  .mo .hx-win { transform: rotateX(calc(var(--ht) * 14deg)) scale(calc(.82 + (1 - var(--ht)) * .18)); }
  .mo .hx-base { opacity: calc(1 - var(--hx)); }
  .mo .hx-crop { opacity: var(--hx); }
  .mo .hx-app.wc .hx-crop, .mo .hx-app.wc .hx-agent { will-change: transform, opacity; }
  .mo .hx-crop[data-k="agent"] { transform: translate(calc(var(--hx2) * 34%), calc(var(--hx2) * 10%)) scale(calc(1 - var(--hx2) * .06)); }
  .mo .hx-crop[data-k="chart"] { transform: translate(calc(var(--hx2) * -8%), calc(var(--hx2) * -22%)) scale(calc(1 + var(--hx2) * .04)); opacity: calc(var(--hx) - max(0, var(--hx2) - .7) * 3); }
  .mo .hx-crop[data-k="watch"] { transform: translate(calc(var(--hx2) * 12%), calc(var(--hx2) * 26%)) rotate(calc(var(--hx2) * 3deg)); opacity: calc(var(--hx) - max(0, var(--hx2) - .7) * 3); }
  .mo .hx-crop[data-k="flash"] { transform: translate(calc(var(--hx2) * 22%), calc(var(--hx2) * -14%)) rotate(calc(var(--hx2) * -4deg)); opacity: calc(var(--hx) - max(0, var(--hx2) - .7) * 3); }
  .mo .hx-agent { opacity: calc(var(--ha) * (1 - var(--hx2) * 1.4)); transform: translate(calc(var(--hx2) * 34%), calc(var(--hx2) * 10% + (1 - var(--ha)) * 12px)); }
  .mo .hx-agent [data-k] { opacity: var(--r); transform: translateY(calc((1 - var(--r)) * 8px)); transition: none; }
  .mo .hx-ma { clip-path: inset(0 calc((1 - var(--hm)) * 100%) 0 0); opacity: calc(1 - var(--hx)); }
  .mo .hx-legend { opacity: calc(var(--hl) * (1 - var(--hx))); }
}
@media (max-width: 899px) { .mo.go .hx-ma { animation: hxDraw 2s cubic-bezier(.65,0,.35,1) 1.4s both; } }

/* 場景區：左文整塊 opacity、h2 逐詞模糊淡入；右側舞台依捲動交叉 */
.mo .sy-text { transition: opacity .5s var(--quart); }
.mo .sy-step:not(.is-on) .sy-text { opacity: .82; }
.sy-text .kick { color: var(--text-2); }
.mo .sy-step:not(.is-on) .sy-text .caps li.on { background: transparent; box-shadow: none; }
.mo .sy-step.is-on .sy-text .h2s .u { animation: unblur .7s var(--quart) both; animation-delay: calc(var(--ci, 0) * 50ms); }
.mo .sy-step.is-on .sy-text > p { animation: follow .7s var(--expo) both; }
.mo .sy-step.is-on .sy-text > p:nth-of-type(1) { animation-delay: .12s; }
.mo .sy-step.is-on .sy-text > p:nth-of-type(2) { animation-delay: .18s; }
.mo .sy-step.is-on .sy-text > p:nth-of-type(n+3) { animation-delay: .24s; }
@media (min-width: 900px) {
  .mo .sy-stage .sy-fig { position: absolute; left: 0; right: 0; top: 50%; margin: 0; pointer-events: none; transition: none;
    transform: translateY(calc(-50% + (1 - var(--in)) * 6% - var(--out) * 4%)) scale(calc(.97 + var(--in) * .03 - var(--out) * .06));
    opacity: calc(var(--in) - var(--out)); filter: blur(calc(var(--out) * 4px)); }
  .mo .sy-stage .sy-fig.is-on { pointer-events: auto; }
}

/* 一般卡片：觸發一次 */
.mo .rv { opacity: 0; transform: translateY(28px); filter: blur(6px); }
.mo .rv.in { opacity: 1; transform: none; filter: none; transition: opacity .7s var(--expo), transform .9s var(--expo), filter .7s var(--expo); transition-delay: calc(var(--si, 0) * 90ms); }
/* 大型示範視窗：原生 view() 立起；不支援時由 JS 加 .rv */
@supports (animation-timeline: view()) {
  .mo .feature > figure.demo:not(.sy-fig) { animation: standUp linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; transform-origin: 50% 100%; }
}
@keyframes standUp { from { transform: perspective(1400px) translateY(64px) rotateX(9deg) scale(.94); } to { transform: none; } }

.mo.go .hx-copy .lead { animation-name: followSoft; }
@keyframes followSoft { from { transform: translateY(16px); filter: blur(4px); } to { transform: none; filter: blur(0); } }
.tu-card.why { width: 82cqw; gap: 1.4cqw; }
.why-sum { margin: .6cqw 0 0; padding: 1.4cqw 1.8cqw; border-radius: 1.2cqw; background: #eef3ff; color: #1d3a8a; font-weight: 700; font-size: 2.1cqw; }
@media (max-width: 640px) { .tu-card.why { width: 96cqw; font-size: 2.7cqw; } .why-sum { font-size: 2.8cqw; } }
.s2-modal.wide:has(.tu-notes) { top: 50%; gap: 1cqw; } .tu-notes p { font-size: 1.55cqw; padding: .9cqw 1.2cqw; line-height: 1.5; }
/* 最新版本 */
.rel { max-width: 820px; }
.rel-h { display: flex; align-items: baseline; gap: 14px; }
.rel-ver { font-family: var(--mono); font-size: 1.5rem; color: var(--text); }
.rel-date { font-size: 14px; color: var(--muted); }
.rel-list { margin: 14px 0 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--text-2); }
.rel-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.rel-all { font-size: 14px; }
.chg { display: grid; gap: 20px; max-width: 860px; }
.chg .rel { max-width: none; }
/* 靜態截圖（v0.1.53 起的功能段落） */
.fshot { margin: 0; }
.fshot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.fshot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.fshot-duo .duo-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 460px; margin-inline: auto; }
.fshot-duo figcaption { text-align: center; }
.fshot-wide { grid-column: 1 / -1; }
.pts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; color: var(--text-2); }
.pts li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.pts .i { width: 18px; height: 18px; margin-top: .2em; color: var(--accent); }
.pts b { color: var(--text); margin-right: .5em; }
@media (max-width: 900px) { .fshot-duo .duo-imgs { max-width: 400px; } }
.fshot-form img { max-width: 480px; margin-inline: auto; }
.fshot-form figcaption { text-align: center; }

/* ---------- v0.1.56：分頁圖片／循環影片（資金流向、持股族群、公司資料） ---------- */
#flow { border-top: 1px solid var(--line); }
.vt-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.vt-tabs button { font: inherit; font-size: 14px; padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; }
.vt-tabs button[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.vt-tabs button:focus-visible, .vid-ctrl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vt-pane img, .vt-pane video { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--app-bg); }
.vt-pane[hidden] { display: none; }
:root:not(.js-ready) .vt-tabs { display: none; }
:root:not(.js-ready) .vt-pane + .vt-pane { margin-top: 16px; }
.vt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.vt-foot figcaption { margin-top: 0; }
.vid-ctrl {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer;
}
.vid-ctrl[hidden] { display: none; }
.vid-ctrl .i { width: 14px; height: 14px; }
.vid-ctrl .play, .vid-ctrl.is-paused .pause { display: none; }
.vid-ctrl.is-paused .play { display: block; }
