:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg-soft: #0b1020;
  --panel: rgba(17, 24, 43, 0.72);
  --panel-strong: rgba(20, 29, 51, 0.92);
  --line: rgba(153, 180, 220, 0.16);
  --line-strong: rgba(153, 180, 220, 0.28);
  --text: #f4f7fb;
  --muted: #a9b5c9;
  --muted-2: #77859e;
  --blue: #71c7ff;
  --cyan: #57e6d6;
  --violet: #a990ff;
  --green: #83efb0;
  --amber: #ffd479;
  --danger: #ff9a9a;
  --shadow: 0 26px 80px rgba(0,0,0,.42);
  --radius: 24px;
  --radius-sm: 15px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(1100px 680px at 80% -5%, rgba(88, 105, 255, .16), transparent 60%),
    radial-gradient(900px 620px at 8% 12%, rgba(58, 220, 203, .10), transparent 58%),
    var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
::selection { background: rgba(113,199,255,.25); }

.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.lang-en { display: none; }
html[data-lang="en"] .lang-zh { display: none !important; }
html[data-lang="en"] .lang-en { display: inline; }
html[data-lang="en"] div.lang-en,
html[data-lang="en"] p.lang-en,
html[data-lang="en"] section.lang-en,
html[data-lang="en"] li.lang-en { display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.site-header.scrolled {
  background: rgba(7,10,18,.78);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(135%);
}
.nav { position: relative; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 8px 26px rgba(80,191,255,.16); }
.brand small { color: var(--muted-2); font-weight: 600; margin-left: 4px; font-size: 12px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a, .lang-switch {
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  transition: .18s ease;
}
.nav-links > a:hover, .nav-links > a.active { color: var(--text); background: rgba(255,255,255,.055); }
.lang-switch { border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; }
.lang-switch:hover { color: var(--text); border-color: var(--line-strong); }
.nav-download { background: linear-gradient(135deg, rgba(113,199,255,.16), rgba(87,230,214,.12)) !important; color: #eafbff !important; border: 1px solid rgba(113,199,255,.28); }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--text); font-size: 24px; }

.hero { padding: 76px 0 42px; position: relative; overflow: clip; }
.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(98,105,255,.12);
  filter: blur(100px);
  top: 10px;
  right: -220px;
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 58px; align-items: center; }
.hero-grid > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 11px; border: 1px solid rgba(113,199,255,.22); border-radius: 999px;
  background: rgba(113,199,255,.055); color: #d5f1ff; font-size: 13px; font-weight: 650;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 16px rgba(131,239,176,.7); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 22px 0 22px; font-size: clamp(46px, 6.2vw, 78px); line-height: .98; letter-spacing: -.055em; max-width: 760px; overflow-wrap: anywhere; }
.hero h1 .gradient { background: linear-gradient(105deg, #fff 12%, #a8dcff 52%, #8df2df 95%); -webkit-background-clip: text; background-clip: text; color: transparent; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-lead { color: var(--muted); font-size: 18px; max-width: 700px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 18px; border-radius: 13px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.btn-primary { color: #061018; border-color: transparent; background: linear-gradient(135deg, #9edcff, #75e8d6); box-shadow: 0 16px 38px rgba(83,205,225,.16); }
.btn-secondary { background: rgba(255,255,255,.045); }
.btn-ghost { background: transparent; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 25px; color: var(--muted-2); font-size: 13px; }
.hero-meta span { display: inline-flex; gap: 6px; align-items: center; }

.orchestration {
  position: relative; min-height: 485px; padding: 26px; overflow: hidden;
  border: 1px solid rgba(112,164,232,.16); border-radius: 30px;
  background:
    radial-gradient(440px 310px at 50% 49%, rgba(55,121,255,.11), transparent 66%),
    linear-gradient(145deg, rgba(17,27,50,.94), rgba(8,14,28,.86));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.025);
}
.orchestration::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,58,105,.06), transparent 42%); pointer-events: none; }
.orchestration-title { position: relative; z-index: 3; color: #8494ae; text-transform: uppercase; letter-spacing: .17em; font-size: 10px; font-weight: 800; }
.flow { position: relative; margin-top: 24px; height: 380px; }
.flow-connections { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
.connection-lines { opacity: .9; }
.connection-nodes { opacity: .95; }
.flow-card {
  position: absolute; z-index: 2; width: 32%; min-width: 0; min-height: 68px; padding: 13px 15px;
  border: 1px solid rgba(65,151,255,.52); border-radius: 15px;
  background: linear-gradient(145deg, rgba(9,17,34,.96), rgba(8,14,27,.88));
  box-shadow: 0 12px 32px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.018);
}
.flow-card strong { display: block; font-size: 13px; letter-spacing: -.01em; }
.flow-card span { display: block; margin-top: 4px; color: #8495b2; font-size: 11px; }
.flow-card.input-1, .flow-card.output-1 { top: 28px; }
.flow-card.input-2, .flow-card.output-2 { top: 139px; }
.flow-card.input-3, .flow-card.output-3 { top: 250px; }
.flow-card.input-1, .flow-card.input-2, .flow-card.input-3 { left: 0; }
.flow-card.output-1, .flow-card.output-2, .flow-card.output-3 { right: 0; }
.flow-core { position: absolute; left: 50%; top: 101px; transform: translateX(-50%); width: 38%; text-align: center; z-index: 3; }
.flow-core .core-orb {
  position: relative; width: 118px; height: 118px; margin: 0 auto 15px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(115,220,255,.88);
  background:
    radial-gradient(circle at 36% 28%, rgba(108,200,255,.44), rgba(48,102,235,.25) 34%, rgba(39,53,138,.36) 62%, rgba(11,21,48,.97) 100%);
  box-shadow:
    0 0 0 12px rgba(83,149,255,.035),
    0 0 0 26px rgba(83,149,255,.018),
    0 0 54px rgba(54,127,255,.30),
    inset 0 0 28px rgba(69,153,255,.16);
}
.flow-core .core-orb::before { content: ""; position: absolute; inset: -15px; border: 1px solid rgba(82,155,255,.08); border-radius: 50%; }
.core-bolt { width: 24px; height: 48px; background: #d9f8ff; clip-path: polygon(54% 0, 100% 0, 68% 39%, 100% 39%, 28% 100%, 44% 58%, 0 58%); filter: drop-shadow(0 0 10px rgba(105,220,255,.82)); transform: translateY(-1px); }
.flow-core strong { display: block; font-size: 13px; letter-spacing: -.01em; }
.flow-core > span { display: block; color: #71829e; font-size: 10px; margin-top: 3px; }

.logo-strip { padding: 28px 0 54px; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 18px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.stat strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 2px; }

.section { padding: 82px 0; }
.section.alt { border-top: 1px solid rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.04); background: rgba(255,255,255,.012); }
.section-head { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 34px; }
.kicker { color: var(--cyan); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.section h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.07; letter-spacing: -.045em; margin: 10px 0 0; }
.section-head p { max-width: 520px; color: var(--muted); margin-bottom: 4px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17,24,43,.68), rgba(11,16,29,.7)); box-shadow: inset 0 1px rgba(255,255,255,.02); }
.feature { min-height: 235px; padding: 25px; position: relative; overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.feature::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; right: -70px; top: -70px; background: rgba(113,199,255,.08); filter: blur(18px); }
.iconbox { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 30px; color: #dff7ff; background: rgba(113,199,255,.08); border: 1px solid rgba(113,199,255,.14); font-size: 18px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.02em; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }
.feature.wide { grid-column: span 2; }

.showcase { display: grid; grid-template-columns: .84fr 1.16fr; gap: 38px; align-items: center; }
.showcase-copy h2 { font-size: clamp(34px, 4vw, 49px); margin: 12px 0 18px; }
.showcase-copy p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 11px; color: #dfe7f3; font-size: 14px; }
.check-list li::before { content: "✓"; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(131,239,176,.09); color: var(--green); font-size: 12px; margin-top: 1px; }
.window-frame { border-radius: 23px; padding: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.035); box-shadow: var(--shadow); transform: perspective(1100px) rotateY(-2deg) rotateX(1deg); }
.window-frame img { border-radius: 14px; width: 100%; }
.window-caption { display: flex; align-items: center; gap: 6px; padding: 3px 6px 11px; }
.window-caption i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }

.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.template-card { padding: 12px; }
.template-card img { border-radius: 14px; border: 1px solid rgba(255,255,255,.08); }
.template-card .template-copy { padding: 16px 10px 9px; }
.template-card h3 { margin-bottom: 5px; font-size: 16px; }
.template-card p { color: var(--muted); font-size: 13px; margin: 0; }

.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.principle { padding: 28px; }
.principle .num { color: var(--muted-2); font-size: 11px; letter-spacing: .15em; margin-bottom: 44px; }
.principle h3 { font-size: 22px; margin-bottom: 9px; }
.principle p { color: var(--muted); margin: 0; font-size: 14px; }

.cta { margin: 44px auto 90px; padding: 46px; border-radius: 30px; position: relative; overflow: hidden; border: 1px solid rgba(113,199,255,.2); background: linear-gradient(135deg, rgba(30,52,82,.72), rgba(19,42,48,.52)); box-shadow: var(--shadow); }
.cta::after { content: ""; position: absolute; width: 320px; height: 320px; right: -80px; bottom: -180px; border-radius: 50%; background: rgba(113,199,255,.12); filter: blur(40px); }
.cta h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; position: relative; z-index: 1; }
.cta p { color: var(--muted); max-width: 680px; position: relative; z-index: 1; }
.cta .hero-actions { position: relative; z-index: 2; }

footer { border-top: 1px solid var(--line); padding: 36px 0 52px; color: var(--muted-2); font-size: 13px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* Page headers */
.page-hero { padding: 72px 0 46px; }
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero h1 { font-size: clamp(42px, 6vw, 68px); line-height: 1.02; letter-spacing: -.05em; margin-bottom: 18px; }
.page-hero p { color: var(--muted); font-size: 17px; max-width: 760px; }
.breadcrumb { color: var(--muted-2); font-size: 13px; margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--text); }

/* Downloads */
.download-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.download-primary { padding: 32px; }
.version-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.badge-stable { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: var(--green); background: rgba(131,239,176,.07); border: 1px solid rgba(131,239,176,.16); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.version { font-size: 40px; line-height: 1; margin: 12px 0 9px; letter-spacing: -.045em; }
.download-primary > p, .download-aside p { color: var(--muted); }
.download-big { width: 100%; margin: 22px 0 10px; padding: 17px 18px; font-size: 15px; }
.download-note { color: var(--muted-2) !important; font-size: 12px; }
.download-aside { padding: 28px; }
.download-aside h3 { margin-bottom: 16px; }
.specs { display: grid; gap: 0; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec-row span:first-child { color: var(--muted-2); }
.assets { margin-top: 16px; display: grid; gap: 9px; }
.asset { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.02); font-size: 13px; }
.asset:hover { border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.asset small { color: var(--muted-2); }
.release-note { margin-top: 16px; padding: 25px; }
.release-note h3 { margin-bottom: 8px; }
.release-note p { color: var(--muted); font-size: 14px; margin-bottom: 0; }
.warning { padding: 18px 20px; border-radius: 15px; background: rgba(255,212,121,.05); border: 1px solid rgba(255,212,121,.15); color: #ead9b2; font-size: 13px; margin-top: 18px; }

/* Guide */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 42px; align-items: start; }
.docs-nav { position: sticky; top: 96px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(13,19,34,.62); }
.docs-nav strong { display: block; padding: 6px 9px 11px; font-size: 12px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .12em; }
.docs-nav a { display: block; padding: 8px 9px; border-radius: 9px; color: var(--muted); font-size: 13px; }
.docs-nav a:hover, .docs-nav a.active { color: var(--text); background: rgba(255,255,255,.045); }
.docs { min-width: 0; }
.doc-section { scroll-margin-top: 95px; padding: 6px 0 54px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.doc-section:last-child { border-bottom: 0; }
.doc-section h2 { font-size: 31px; margin-bottom: 12px; letter-spacing: -.035em; }
.doc-section h3 { font-size: 19px; margin: 31px 0 10px; }
.doc-section p, .doc-section li { color: var(--muted); font-size: 14px; }
.doc-section ol, .doc-section ul { padding-left: 22px; }
.doc-section li { margin: 7px 0; }
.doc-section strong { color: #e7edf7; }
.stepbox { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 17px 0; }
.stepnum { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; border: 1px solid rgba(113,199,255,.2); background: rgba(113,199,255,.06); color: var(--blue); font-weight: 800; font-size: 13px; }
.stepbox h3 { margin: 1px 0 5px; }
.stepbox p { margin-bottom: 0; }
.tip { padding: 17px 18px; margin: 20px 0; border-left: 3px solid var(--cyan); border-radius: 0 13px 13px 0; background: rgba(87,230,214,.045); color: #cbd8e9; font-size: 13px; }
.tip.warn { border-left-color: var(--amber); background: rgba(255,212,121,.04); }
.code { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; color: #cdefff; background: rgba(113,199,255,.07); border: 1px solid rgba(113,199,255,.12); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.doc-image { margin: 24px 0; padding: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 18px; }
.doc-image img { border-radius: 11px; }
.mini-table { width: 100%; border-collapse: collapse; margin: 17px 0; font-size: 13px; }
.mini-table th, .mini-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.mini-table th { color: var(--muted-2); font-weight: 600; }
.mini-table td { color: var(--muted); }

@media (max-width: 980px) {
  .hero-grid, .showcase, .download-grid { grid-template-columns: 1fr; }
  .orchestration { min-height: 440px; }
  .showcase { gap: 28px; }
  .window-frame { transform: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature.wide { grid-column: auto; }
  .template-grid { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: relative; top: auto; display: flex; overflow-x: auto; gap: 3px; white-space: nowrap; }
  .docs-nav strong { display: none; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav { height: 64px; }
  .mobile-menu { display: grid; place-items: center; position: absolute; right: 14px; top: 13px; width: 38px; height: 38px; padding: 0; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); font-size: 19px; line-height: 1; }
  .nav-links { display: none; position: absolute; top: 64px; left: 14px; right: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(10,14,26,.97); backdrop-filter: blur(18px); flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links > a, .lang-switch { width: 100%; text-align: left; }
  .hero { padding-top: 48px; }
  .hero-grid { gap: 36px; }
  .hero h1 { width: 100%; font-size: clamp(39px, 11.2vw, 47px); line-height: 1.02; letter-spacing: -.045em; }
  .hero h1 .lang-zh, .hero h1 .lang-en { width: 100%; max-width: 100%; white-space: normal; word-break: break-all; overflow-wrap: anywhere; }
  .hero h1 .gradient { display: block; width: 100%; max-width: 100%; white-space: normal; word-break: break-all; overflow-wrap: anywhere; }
  .hero-lead { font-size: 16px; line-height: 1.75; }
  .hero-meta { gap: 7px 12px; }
  .orchestration { min-height: 390px; padding: 20px; border-radius: 22px; }
  .flow { height: 320px; margin-top: 20px; }
  .flow-card { width: 32%; min-height: 58px; padding: 9px 10px; border-radius: 12px; }
  .flow-card strong { font-size: 11px; }
  .flow-card span { margin-top: 2px; font-size: 9px; }
  .flow-card.input-1, .flow-card.output-1 { top: 20px; }
  .flow-card.input-2, .flow-card.output-2 { top: 114px; }
  .flow-card.input-3, .flow-card.output-3 { top: 207px; }
  .flow-core { width: 36%; top: 82px; }
  .flow-core .core-orb { width: 92px; height: 92px; margin-bottom: 10px; box-shadow: 0 0 0 9px rgba(83,149,255,.035), 0 0 0 18px rgba(83,149,255,.018), 0 0 42px rgba(54,127,255,.28), inset 0 0 22px rgba(69,153,255,.16); }
  .flow-core .core-orb::before { inset: -11px; }
  .core-bolt { font-size: 34px; }
  .flow-core strong { font-size: 10px; }
  .flow-core > span { font-size: 8px; }
  .strip, .feature-grid, .template-grid, .principles { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 18px; }
  .cta { padding: 30px 24px; margin-bottom: 65px; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .docs-nav { margin-bottom: -10px; }
  .doc-section h2 { font-size: 27px; }
}

@media (max-width: 420px) {
  .brand small { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero h1 { font-size: 39px; }
  .flow-card { width: 32%; padding-left: 8px; padding-right: 8px; }
  .orchestration-title { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
