:root {
  --bg: #fbfcfe; --surface: #ffffff; --text: #111111; --muted: #5b6472; --line: #e4e8ef;
  --accent: #1F6BFF; --accent-soft: #7CC0FF; --dot: #FF6A13; --code: #f1f4f9;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --surface: #161a20; --text: #eef2f7; --muted: #9aa4b2; --line: #2a313b; --accent: #5AAEFF; --code: #1d232b; }
}
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.75 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 26px; width: auto; display: block; }
nav a { margin-left: 20px; color: var(--muted); font-size: 15px; }
nav a:hover, nav a.on { color: var(--text); text-decoration: none; }
.hero { padding: 72px 0 40px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #1F6BFF, #5AAEFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 { font-size: 36px; line-height: 1.3; margin: 0 0 16px; font-weight: 600; letter-spacing: -0.01em; }
.hero p { font-size: 18px; color: var(--muted); margin: 0; max-width: 680px; }
.actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); background: var(--surface); font-size: 15px; }
.btn.primary { background: linear-gradient(135deg, #3D86FF, #1F6BFF); border-color: #1F6BFF; color: #fff; }
.btn:hover { text-decoration: none; opacity: .9; }
section { padding: 36px 0; border-top: 1px solid var(--line); }
h2 { font-size: 22px; margin: 0 0 16px; font-weight: 600; }
h3 { font-size: 17px; margin: 24px 0 8px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.tags li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 14px; }
ul.plain { padding-left: 20px; margin: 8px 0; }
ul.plain li { margin: 4px 0; }
code { font-family: var(--mono); font-size: 13.5px; background: var(--code); padding: 1px 6px; border-radius: 4px; }
pre { background: var(--code); border-radius: 8px; padding: 12px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); }
pre code { background: none; padding: 0; }
.doc { padding: 48px 0 24px; }
.doc h1 { font-size: 28px; margin: 0 0 8px; font-weight: 600; }
.doc .lead { color: var(--muted); margin: 0 0 8px; }
.doc section { padding: 24px 0; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 48px; margin-top: 24px; }
@media (max-width: 600px) { .hero h1 { font-size: 28px; } nav a { margin-left: 14px; } }

/* Hero art */
.hero-art { margin: 40px 0 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--surface); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; animation: drift 24s ease-in-out infinite alternate; transform-origin: 60% 50%; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Section art beside text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.split img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Live capture demo */
.demo { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.demo-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.demo-bar span { margin-left: 8px; }
.demo-list { list-style: none; margin: 0; padding: 6px 0; height: 264px; overflow: hidden; position: relative; }
.demo-list li { display: grid; grid-template-columns: 112px 64px 1fr auto; gap: 12px; align-items: center; padding: 9px 16px; font-size: 14px; border-bottom: 1px solid var(--line); animation: row-in .5s cubic-bezier(.2,.7,.2,1) both; }
.demo-list li:last-child { border-bottom: 0; }
.demo-list .p { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-list .who { color: var(--muted); }
.demo-list .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-list .badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.demo-list .badge.stop { border-color: var(--dot); color: var(--dot); }
.mask { background: var(--text); color: transparent; border-radius: 3px; padding: 0 4px; user-select: none; }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px); background: rgba(31,107,255,.08); } to { opacity: 1; transform: none; background: transparent; } }
@media (max-width: 600px) { .demo-list li { grid-template-columns: 84px 1fr auto; } .demo-list .who { display: none; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.tags li { transition: transform .2s ease, border-color .2s ease; }
.tags li:hover { transform: translateY(-2px); border-color: var(--accent); }
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.06); }

@media (prefers-reduced-motion: reduce) {
  .hero-art img, .demo-list li { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tags li, .card { transition: none; }
}
