:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5d6878;
  --line: #e2e7ee;
  --accent: #2f7de1;
  --accent-text: #ffffff;
  --code-bg: #eef2f7;
  --radius: 14px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #181e27;
    --text: #e6eaf0;
    --muted: #98a3b3;
    --line: #283140;
    --accent: #5aa0f2;
    --accent-text: #0b1220;
    --code-bg: #1f2733;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: "Cascadia Code", Consolas, monospace; font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.4em; border-radius: 6px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand img { width: 28px; height: 28px; }
.brand:hover { text-decoration: none; }
header.top nav { display: flex; gap: 20px; margin-left: auto; }
header.top nav a { color: var(--muted); }
header.top nav a:hover, header.top nav a.active { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600;
  background: var(--accent); color: var(--accent-text);
  border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 64px 0 40px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.2; margin: 0 0 16px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .meta { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.hero video { width: 100%; max-width: 520px; justify-self: center; }

section.block { padding: 48px 0; }
section.block h2 { font-size: 1.7rem; margin: 0 0 8px; }
section.block p.sub { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.card .icon { font-size: 1.6rem; margin-bottom: 8px; }

.download { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 24px; }
.download p { color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* Docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px 0 64px; }
.docs aside { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
.docs aside a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); }
.docs aside a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.docs article { min-width: 0; }
.docs article h1 { margin-top: 0; }
.docs article h2 { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.docs article h3 { scroll-margin-top: 80px; }
.docs table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.docs th, .docs td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.docs th { background: var(--surface); }
.note { background: var(--surface); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero video { order: -1; max-width: 360px; }
  .docs { grid-template-columns: 1fr; }
  .docs aside { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; }
  header.top nav { gap: 14px; }
}
