:root {
  --bg: #08090b;
  --surface: #111113;
  --surface-2: #17181a;
  --surface-3: #1d1f24;
  --text: #f5f6f8;
  --muted: #a7adb8;
  --dim: #7c838f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #7aaaff;
  --accent-strong: #5686fe;
  --green: #59ca84;
  --amber: #dd8629;
  --violet: #9474bc;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Code", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius: 22px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
code, pre { font-family: var(--mono); }
::selection { background: rgba(122, 170, 255, 0.28); }

.skip {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 30;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 650;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand img { border-radius: 8px; }
.brand-name { white-space: nowrap; }
.version {
  padding: 0.14rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.82rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--text); }
.nav-cta {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg) !important;
  font-weight: 650;
}
.nav-cta:hover { background: #fff; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 7.4rem 0 6rem;
}
.hero::before {
  content: "";
  position: absolute;
  top: -28rem;
  left: 50%;
  width: 78rem;
  height: 62rem;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(86, 134, 254, 0.2), transparent 68%),
    radial-gradient(closest-side, rgba(122, 170, 255, 0.12), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 90px 90px;
  -webkit-mask-image: radial-gradient(70% 62% at 50% 0, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 62% at 50% 0, #000 0%, transparent 78%);
  opacity: 0.75;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.pulse {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(89, 202, 132, 0.12);
}
h1, h2, h3 { margin: 0; }
h1 {
  font-size: clamp(2.6rem, 4.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.052em;
}
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }
.lede {
  max-width: 36rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.78;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.8rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.62rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-1px); }
.btn-light {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.btn-light:hover { background: #fff; color: var(--bg); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.6rem;
}
.chips span {
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.69rem;
  letter-spacing: 0.01em;
}
.meta {
  margin: 1.7rem 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

.hero-visual { min-width: 0; }
.pool-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}
.window-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(89, 202, 132, 0.12);
}
.window-title { text-transform: lowercase; }
.window-live {
  margin-left: auto;
  color: var(--green);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.window-body { padding: 1.05rem; }
.request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
}
.node {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.node-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.node strong {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.node-sub { color: var(--muted); font-size: 0.66rem; }
.session-node strong { color: var(--accent); }
.pool-node {
  align-items: center;
  text-align: center;
  border-color: rgba(122, 170, 255, 0.3);
  background:
    radial-gradient(circle at 50% 0, rgba(86, 134, 254, 0.16), transparent 70%),
    var(--surface-2);
  box-shadow: 0 0 0 1px rgba(122, 170, 255, 0.04) inset;
}
.pool-node img { margin-bottom: 0.25rem; border-radius: 10px; }
.route-arrow {
  display: flex;
  min-width: 2.4rem;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.route-arrow span {
  position: relative;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 170, 255, 0.55), transparent);
}
.route-arrow span::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 0;
  width: 5px;
  height: 5px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  transform: rotate(45deg);
}
.route-arrow em { font-style: normal; }
.member-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 1rem 0 0.45rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.members { display: grid; gap: 0.38rem; }
.member {
  display: grid;
  grid-template-columns: 0.4rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #141518;
  font-size: 0.68rem;
}
.member.active {
  border-color: rgba(122, 170, 255, 0.35);
  background: rgba(122, 170, 255, 0.07);
}
.member-dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: var(--green);
}
.member-dot.cooling { background: var(--amber); }
.member strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.member em { font-style: normal; color: var(--dim); font-size: 0.58rem; }
.member.active em { color: var(--accent); }
.member code { color: var(--muted); font-size: 0.6rem; }
.window-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding: 0.68rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.02em;
}
.window-foot span::before {
  content: "·";
  margin-right: 0.45rem;
  color: var(--line-strong);
}
.window-foot span:first-child::before { content: ""; margin: 0; }
.visual-note {
  margin: 0.65rem 0 0;
  color: var(--dim);
  font-size: 0.6rem;
  text-align: right;
}

.section {
  padding: 6.4rem 0;
  border-top: 1px solid var(--line);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.kicker {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 570;
  line-height: 1.13;
  letter-spacing: -0.04em;
}
.prose { max-width: 36rem; }
.prose p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}
.prose p:last-child { margin-bottom: 0; }
.prose code, .steps code, .steps-panel code {
  color: var(--accent);
  font-size: 0.9em;
}
.split-title h2 { max-width: 12em; }

.section-head { max-width: 46rem; margin-bottom: 2.8rem; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 4vw, 3.4rem);
}
.feature {
  padding-top: 1.15rem;
  border-top: 1px solid var(--line-strong);
}
.num {
  display: block;
  margin-bottom: 1.05rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}
.feature h3 { font-size: 1.06rem; font-weight: 580; letter-spacing: -0.015em; }
.feature p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.75;
}

.flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.steps {
  margin: 2.1rem 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.step-num {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.8;
}
.steps h3, .step-row h3 { margin: 0; font-size: 0.92rem; font-weight: 570; }
.steps p, .step-row p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}
.trace-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}
.trace-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
.trace-live { color: var(--green); }
.trace-row {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
}
.trace-row > span { color: var(--dim); }
.trace-row strong {
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trace-row em {
  color: var(--dim);
  font-style: normal;
  font-size: 0.58rem;
}
.trace-row em.ok { color: var(--green); }
.trace-foot {
  padding: 0.72rem 1rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.install .prose { margin-top: 1.2rem; }
.code-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0.45rem 0.45rem 0.45rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}
.code-block code {
  min-width: 0;
  overflow-x: auto;
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}
.code-block button {
  flex: none;
  border: 0;
  border-radius: 8px;
  padding: 0.42rem 0.7rem;
  background: var(--surface-3);
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}
.code-block button:hover, .code-block button:focus-visible { background: var(--text); color: var(--bg); }
.fine {
  margin: 0.65rem 0 0;
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.6;
}
.install-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.4rem;
}
.install-links a {
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1rem;
}
.install-links a:hover { color: var(--accent); border-color: var(--accent); }
.steps-panel { border-top: 1px solid var(--line-strong); }
.step-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.step-row > span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.8;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 4rem;
}
.boundary-grid > div {
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
}
.boundary-grid h3 { font-size: 0.94rem; font-weight: 580; }
.boundary-grid p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.75;
}

.cta {
  padding: 2rem 0 6rem;
  border-top: 1px solid var(--line);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 20%, rgba(86, 134, 254, 0.14), transparent 45%),
    var(--surface);
}
.cta h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.footer {
  padding: 1.8rem 0 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.68rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-weight: 600; }
.footer-brand img { border-radius: 6px; }
.footer p { margin: 0; }
.footer-links { display: inline-flex; gap: 1.1rem; }
.footer-links a { color: var(--dim); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero-copy { animation: rise 0.7s ease both; }
.hero-visual { animation: rise 0.7s 0.08s ease both; }

@media (max-width: 960px) {
  .hero { padding: 5rem 0 4.4rem; }
  .hero-grid, .split, .flow-grid, .install-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 34rem; }
  .split, .flow-grid, .install-grid { gap: 2.5rem; }
  .split-title h2 { max-width: none; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boundary-grid { gap: 1.6rem 2.5rem; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .wrap { width: min(100% - 1.6rem, 1180px); }
  .top-inner { min-height: 3.9rem; }
  .nav { gap: 0.8rem; font-size: 0.78rem; }
  .nav a:not(.nav-cta) { display: none; }
  .version { display: none; }
  .hero { padding: 3.6rem 0 3.4rem; }
  h1 { font-size: clamp(2.1rem, 10vw, 3.2rem); }
  .lede { font-size: 0.95rem; }
  .hero-actions .btn { flex: 1; }
  .chips span { font-size: 0.65rem; }
  .section { padding: 4.4rem 0; }
  .feature-grid, .boundary-grid { grid-template-columns: 1fr; }
  .request-row { grid-template-columns: 1fr; gap: 0.45rem; }
  .route-arrow { flex-direction: row; justify-content: center; gap: 0.45rem; }
  .route-arrow span { width: 1px; height: 22px; background: linear-gradient(180deg, transparent, rgba(122, 170, 255, 0.55), transparent); }
  .route-arrow span::after { top: auto; right: -2px; bottom: 0; transform: rotate(135deg); }
  .route-arrow em { display: none; }
  .node { padding: 0.65rem 0.7rem; }
  .member { grid-template-columns: 0.4rem minmax(0, 1fr) auto; }
  .member code { display: none; }
  .trace-row { grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 0.5rem; }
  .code-block code { font-size: 0.7rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
