:root {
  --bg: #060a13;
  --bg2: #0a1120;
  --panel: rgba(255, 255, 255, 0.035);
  --panel2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --text: #e6edf6;
  --muted: #8a9ab3;
  --cyan: #00add8;
  --cyan2: #5ce1ff;
  --green: #34d399;
  --amber: #fbbf24;
  --pink: #f472b6;
  --violet: #a78bfa;
  --red: #f87171;
  --radius: 18px;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--cyan2); background: rgba(92, 225, 255, 0.08); padding: 0.1em 0.4em; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
.container { width: min(1200px, 100% - 48px); margin: 0 auto; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------------- background ---------------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(92, 225, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 225, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.bg-glow {
  position: fixed; inset: -20% -10% auto; height: 80vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 25% 30%, rgba(0, 173, 216, 0.22), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, rgba(167, 139, 250, 0.16), transparent 70%);
  filter: blur(20px);
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border2); background: var(--panel2); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font: 600 15px/1 var(--sans);
  cursor: pointer; transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(92, 225, 255, 0.45); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .achip:focus-visible, .seg:focus-visible { outline: 2px solid var(--cyan2); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, #00add8, #0078b8); border-color: transparent; color: #fff; box-shadow: 0 8px 30px -8px rgba(0, 173, 216, 0.7); }
.btn-primary:hover { box-shadow: 0 10px 36px -6px rgba(0, 173, 216, 0.85); }
.btn-accent { background: linear-gradient(135deg, #8b5cf6, #ec4899); border-color: transparent; color: #fff; box-shadow: 0 8px 26px -10px rgba(236, 72, 153, 0.8); }
.btn-ghost { background: var(--panel); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }

/* ---------------- nav ---------------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background 0.25s, border-color 0.25s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(6, 10, 19, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: 0.2px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--muted); font-size: 14.5px; }
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* ---------------- hero ---------------- */
.hero { padding: 72px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px; }
.pill { display: inline-block; font-size: 12.5px; color: var(--cyan2); border: 1px solid rgba(92, 225, 255, 0.3); background: rgba(92, 225, 255, 0.07); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 850; letter-spacing: -1px; margin: 18px 0 18px; }
.grad { background: linear-gradient(90deg, #5ce1ff, #00add8 40%, #a78bfa 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: #b8c5d9; font-size: 17.5px; max-width: 600px; margin: 0 0 28px; }
.lead strong { color: var(--text); }
.lead em { font-style: normal; color: var(--cyan2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.install { font-family: var(--mono); font-weight: 500; }
.install code { background: none; padding: 0; color: var(--text); font-size: 14px; }
.install .prompt { color: var(--green); }
.copy-tip { font-family: var(--sans); font-size: 12px; color: var(--muted); border-left: 1px solid var(--border2); padding-left: 10px; margin-left: 4px; }
.install.copied .copy-tip { color: var(--green); }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 34px; padding: 0; margin: 40px 0 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b { font-size: 28px; font-weight: 800; font-family: var(--mono); background: linear-gradient(180deg, #fff, #9fdcf0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.hero-visual { position: relative; height: 420px; display: grid; place-items: center; }
.orbit {
  width: 230px; height: 230px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle, rgba(0, 173, 216, 0.25), transparent 65%);
}
.orbit::before, .orbit::after {
  content: ""; position: absolute; inset: -18px; border-radius: 50%;
  border: 1px dashed rgba(92, 225, 255, 0.35); animation: spin 26s linear infinite;
}
.orbit::after { inset: -50px; border-color: rgba(167, 139, 250, 0.25); animation-duration: 40s; animation-direction: reverse; }
.hero-logo { width: 170px; height: 170px; object-fit: contain; filter: drop-shadow(0 16px 40px rgba(0, 173, 216, 0.45)); animation: float 6s ease-in-out infinite; }
.hero-tree { position: absolute; bottom: -44px; width: 320px; opacity: 0.85; }
.ht-edges path { stroke: rgba(92, 225, 255, 0.35); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; animation: dash 3s linear infinite; }
.ht-nodes rect { fill: #0e1b2e; stroke: rgba(92, 225, 255, 0.5); stroke-width: 1.4; animation: pulse 3.2s ease-in-out infinite; }
.ht-nodes rect:nth-child(2) { animation-delay: 0.4s; }
.ht-nodes rect:nth-child(3) { animation-delay: 0.8s; }
.ht-nodes rect:nth-child(4) { animation-delay: 1.2s; }
.ht-nodes rect:nth-child(5) { animation-delay: 1.6s; }
.ht-nodes rect:nth-child(6) { animation-delay: 2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes dash { to { stroke-dashoffset: -16; } }
@keyframes pulse { 50% { stroke: #5ce1ff; fill: #12304a; } }

/* ---------------- sections ---------------- */
.section { padding: 90px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.eyebrow { font: 600 12.5px var(--mono); text-transform: uppercase; letter-spacing: 2px; color: var(--cyan); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin: 10px 0 12px; letter-spacing: -0.5px; }
.section-head p { color: var(--muted); margin: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- principles ---------------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.pcard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; }
.pcard::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: 0.6; }
.pnum { font: 800 13px var(--mono); color: var(--cyan); margin-bottom: 8px; }
.pcard h3 { font-size: 18px; margin-bottom: 8px; }
.pcard p { color: #aab8cc; font-size: 14.5px; margin: 0; }
.pcard b { color: var(--text); }

/* ---------------- visualizer ---------------- */
.viz {
  background: linear-gradient(180deg, rgba(15, 26, 44, 0.85), rgba(8, 14, 26, 0.9));
  border: 1px solid var(--border2); border-radius: 22px; padding: 18px;
  box-shadow: 0 40px 120px -40px rgba(0, 173, 216, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.viz-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 4px 4px 14px; border-bottom: 1px solid var(--border); }
.tb-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.tb-group label { color: var(--muted); font-size: 13.5px; }
.tb-group input[type="number"] {
  width: 92px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border2); color: var(--text);
  border-radius: 10px; padding: 8px 10px; font: 600 14px var(--mono);
}
.tb-group input[type="number"]:focus { outline: none; border-color: var(--cyan2); box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.15); }
.quick { display: flex; gap: 6px; }
.chip { background: transparent; border: 1px dashed var(--border2); color: var(--muted); font: 600 12.5px var(--mono); padding: 6px 10px; border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.chip:hover { color: var(--cyan2); border-color: var(--cyan2); border-style: solid; }

.viz-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; padding-top: 14px; }
.viz-stage { background: radial-gradient(ellipse at 45% 0%, rgba(0, 173, 216, 0.08), transparent 60%), rgba(0, 0, 0, 0.25); border: 1px solid var(--border); border-radius: 16px; padding: 6px; min-width: 0; }
#treeSvg { width: 100%; height: auto; display: block; font-family: var(--sans); user-select: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 10px 8px; font-size: 12px; color: var(--muted); }
.legend span, .membar-legend span, .bar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 2px solid; }
.lg-visit { border-color: var(--amber); }
.lg-cand { border-color: var(--cyan2); }
.lg-target { border-color: var(--pink); background: rgba(244, 114, 182, 0.25); }
.lg-rotate { border-color: var(--violet); }
.lg-new { border-color: var(--green); background: rgba(52, 211, 153, 0.25); }
.lg-merge { border-color: #22d3ee; border-style: dashed; }
.lg-free { border: 0; background: linear-gradient(135deg, rgba(52, 211, 153, 0.55), rgba(0, 173, 216, 0.55)); }
.lg-alloc { border: 0; background: linear-gradient(90deg, #f472b6, #a78bfa, #60a5fa); }

/* svg scene */
.zone-rect { fill: rgba(255, 255, 255, 0.015); stroke: rgba(255, 255, 255, 0.12); stroke-dasharray: 6 5; }
.zone-label { fill: var(--muted); font-size: 12.5px; text-anchor: middle; letter-spacing: 1px; }
.pool-rect { fill: rgba(167, 139, 250, 0.08); stroke: rgba(167, 139, 250, 0.4); }
.pool-label { fill: #c4b5fd; font-size: 13px; text-anchor: middle; }
.pool-count { fill: #fff; font: 700 14px var(--mono); text-anchor: middle; }
.root-label text { fill: var(--cyan); font: 600 11.5px var(--mono); text-anchor: middle; }
.root-arrow { stroke: var(--cyan); stroke-width: 1.4; }
.empty-text { fill: var(--muted); font: 500 15px var(--mono); text-anchor: middle; }

.edge { fill: none; stroke: rgba(140, 170, 210, 0.38); stroke-width: 2; transition: stroke 0.3s; }
.edge.hot { stroke: rgba(251, 191, 36, 0.85); stroke-width: 2.5; }

.node { cursor: default; }
.node .box { fill: url(#nodeGrad); stroke: rgba(92, 225, 255, 0.45); stroke-width: 1.6; transition: fill 0.3s, stroke 0.3s, stroke-width 0.3s; }
.node .halo { fill: none; stroke: transparent; stroke-width: 10; filter: url(#glow); opacity: 0.0; transition: opacity 0.35s, stroke 0.3s; }
.node .nsize { fill: #fff; font: 800 19px var(--mono); text-anchor: middle; }
.node .nunit { fill: var(--muted); font-size: 11px; font-weight: 600; }
.node .nrange { fill: #93a7c2; font: 500 12px var(--mono); text-anchor: middle; }
.node .nbar-bg { fill: rgba(255, 255, 255, 0.08); }
.node .nbar { fill: var(--green); }
.node.floating .box { stroke-dasharray: 5 4; }
.node.path .box { stroke: rgba(251, 191, 36, 0.6); }
.node.visit .box { stroke: var(--amber); stroke-width: 2.4; }
.node.visit .halo { stroke: var(--amber); opacity: 0.55; }
.node.cand .box { stroke: var(--cyan2); stroke-width: 2.4; }
.node.cand .halo { stroke: var(--cyan2); opacity: 0.55; }
.node.target .box { fill: #3a1430; stroke: var(--pink); stroke-width: 2.6; }
.node.target .halo { stroke: var(--pink); opacity: 0.7; }
.node.rotate .box { fill: #22183f; stroke: var(--violet); stroke-width: 2.4; }
.node.rotate .halo { stroke: var(--violet); opacity: 0.6; }
.node.new .box { fill: #0f2e26; stroke: var(--green); stroke-width: 2.6; }
.node.new .halo { stroke: var(--green); opacity: 0.7; }
.node.merge .box { stroke: #22d3ee; stroke-width: 2.4; stroke-dasharray: 6 3; }
.node.merge .halo { stroke: #22d3ee; opacity: 0.55; }
.node.dead { filter: grayscale(1); }
.node.dead .box { stroke: rgba(255, 255, 255, 0.25); }
.node.hover .box { stroke: #fff; }

/* side panel */
.viz-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.step-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; min-height: 128px; }
.step-card.flash { animation: flash 0.5s ease; }
.step-card.fail { border-color: rgba(248, 113, 113, 0.5); }
.step-card.fail .step-op { color: var(--red); }
@keyframes flash { from { background: rgba(92, 225, 255, 0.09); } to { background: var(--panel); } }
.step-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.step-op { font: 700 14.5px var(--mono); color: var(--cyan2); }
.step-idx { font: 500 12px var(--mono); color: var(--muted); }
.step-desc { margin: 0; font-size: 14.5px; color: #d5deea; }

.code-card { background: #070d18; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; flex: 1; min-height: 260px; }
.code-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.code-fn { margin-left: 8px; font: 500 12px var(--mono); color: var(--muted); }
.code-body { position: relative; overflow: auto; flex: 1; max-height: 330px; padding: 8px 0; font: 12px/1.75 var(--mono); }
.cl { display: flex; white-space: pre; padding-right: 14px; transition: background 0.25s; border-left: 3px solid transparent; }
.cl .ln { width: 34px; flex: none; text-align: right; padding-right: 12px; color: #3d4b61; }
.cl .ct { color: #c9d4e3; }
.cl.active { background: rgba(92, 225, 255, 0.12); border-left-color: var(--cyan2); }
.cl.active .ln { color: var(--cyan2); }
.c-kw { color: #ff7ab2; }
.c-ty { color: #5ce1ff; }
.c-tp { color: #7ee0b5; }
.c-num { color: #fbbf24; }
.c-com { color: #5c6b82; font-style: italic; }

/* memory bar */
.membar-wrap { margin-top: 16px; padding: 14px 16px 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); border-radius: 16px; }
.membar-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.membar-legend { display: flex; gap: 16px; }
.membar { position: relative; height: 46px; border-radius: 10px; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 6px, transparent 6px 12px); overflow: hidden; border: 1px solid var(--border2); }
.seg {
  position: absolute; top: 0; bottom: 0; display: grid; place-items: center;
  font: 700 11.5px var(--mono); color: #fff; white-space: nowrap; overflow: hidden;
  transition: left 0.55s cubic-bezier(.65, 0, .35, 1), width 0.55s cubic-bezier(.65, 0, .35, 1), background 0.3s, box-shadow 0.2s;
  border-right: 1px solid rgba(6, 10, 19, 0.85);
}
.seg.free { background: linear-gradient(180deg, rgba(52, 211, 153, 0.42), rgba(0, 173, 216, 0.3)); color: #d1fae5; }
.seg.free.floating { background: repeating-linear-gradient(45deg, rgba(52, 211, 153, 0.35) 0 6px, rgba(52, 211, 153, 0.15) 6px 12px); }
.seg.free.hover { box-shadow: inset 0 0 0 2px #fff; }
.seg.alloc { background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.seg.alloc:hover { filter: brightness(1.2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8); }
.seg.pending { background: rgba(148, 163, 184, 0.25); }
.memhl { position: absolute; top: -2px; bottom: -2px; pointer-events: none; opacity: 0; border-radius: 6px; transition: opacity 0.3s, left 0.4s, width 0.4s; }
.memhl.show { opacity: 1; animation: blink 1.1s ease-in-out infinite; }
.memhl.alloc { box-shadow: inset 0 0 0 2px var(--pink), 0 0 18px rgba(244, 114, 182, 0.7); }
.memhl.free { box-shadow: inset 0 0 0 2px var(--green), 0 0 18px rgba(52, 211, 153, 0.7); }
@keyframes blink { 50% { opacity: 0.45; } }
.membar-ticks { display: flex; justify-content: space-between; font: 11px var(--mono); color: #4d5d75; margin-top: 4px; }

/* bottom */
.viz-bottom { margin-top: 14px; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px; }
.speed { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-left: 6px; }
.speed input { accent-color: var(--cyan); width: 120px; }
.speed output { font: 600 12.5px var(--mono); color: var(--text); width: 38px; }
.queue-info { margin-left: auto; font-size: 12.5px; color: var(--amber); }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.bottom-grid h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.alloc-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; align-content: flex-start; }
.achip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  color: var(--text); border-radius: 9px; padding: 5px 10px; font: 500 12px var(--mono); transition: all 0.15s;
}
.achip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.achip em { font-style: normal; color: var(--muted); border-left: 1px solid var(--border2); padding-left: 8px; }
.achip:hover { background: color-mix(in srgb, var(--c) 24%, transparent); }
.achip:hover em { color: var(--green); }
.oplog { list-style: none; margin: 0; padding: 0; max-height: 156px; overflow: auto; font-size: 12.5px; }
.oplog li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 10px; border-radius: 8px; border-left: 2px solid var(--cyan); background: rgba(255, 255, 255, 0.02); margin-bottom: 4px; }
.oplog li.op-free { border-left-color: var(--green); }
.oplog li.fail { border-left-color: var(--red); }
.oplog li.fail span { color: var(--red); }
.oplog li.running { background: rgba(251, 191, 36, 0.07); }
.oplog li code { background: none; padding: 0; color: var(--text); }
.oplog li span { color: var(--muted); font-family: var(--mono); }

/* ---------------- features ---------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fcard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform 0.25s, border-color 0.25s, background 0.25s; }
.fcard:hover { transform: translateY(-4px); border-color: rgba(92, 225, 255, 0.35); background: var(--panel2); }
.ficon { display: inline-block; font: 700 12.5px var(--mono); color: var(--cyan2); background: rgba(92, 225, 255, 0.08); border: 1px solid rgba(92, 225, 255, 0.25); padding: 6px 10px; border-radius: 9px; margin-bottom: 14px; }
.fcard h3 { font-size: 18px; margin-bottom: 8px; }
.fcard p { color: #a9b7cb; font-size: 14.5px; margin: 0; }

/* ---------------- bench ---------------- */
.bench-grid { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr; gap: 18px; }
.bcard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.bcard h3 { font-size: 16.5px; margin-bottom: 18px; }
.bcard h3 small { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 6px; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 58px 1fr 48px; align-items: center; gap: 10px; }
.bar-row:nth-child(even) { margin-bottom: 8px; }
.bl { font: 600 12px var(--mono); color: var(--muted); }
.bt { height: 12px; background: rgba(255, 255, 255, 0.04); border-radius: 6px; overflow: hidden; }
.bf { height: 100%; width: 0; border-radius: 6px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.reveal.in .bf { width: var(--w); }
.bf.a { background: linear-gradient(90deg, #00add8, #5ce1ff); }
.bf.b { background: linear-gradient(90deg, #6b5aa8, #a78bfa); }
.bv { font: 600 12px var(--mono); color: var(--text); text-align: right; }
.bar-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.lg-a { border: 0; background: #00add8; }
.lg-b { border: 0; background: #a78bfa; }
.big-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 22px; }
.big-compare div { display: flex; flex-direction: column; }
.big-compare b { font: 800 26px var(--mono); color: #94a3b8; }
.big-compare .win b { color: var(--green); }
.big-compare span { font-size: 12px; color: var(--muted); }
.big-compare .arrow { color: var(--muted); font-size: 22px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis div { background: rgba(0, 0, 0, 0.22); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.kpis b { font: 800 20px var(--mono); color: var(--cyan2); }
.kpis span { font-size: 12px; color: var(--muted); }
.kpis-col { grid-template-columns: 1fr 1fr; }

/* ---------------- usage ---------------- */
.usage { max-width: 880px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 16px; font: 600 14px var(--sans); cursor: pointer; margin-bottom: -1px; }
.tab.active { color: var(--text); border-bottom-color: var(--cyan); }
.tab-panels { background: #070d18; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 16px 16px; }
.tab-panel { display: none; margin: 0; padding: 22px 24px; overflow: auto; font: 13.5px/1.75 var(--mono); color: #c9d4e3; }
.tab-panel.active { display: block; }
.tab-panel code { background: none; color: inherit; padding: 0; font-size: inherit; }
.note { margin-top: 18px; padding: 14px 18px; border-radius: 14px; background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.25); color: #d8cfae; font-size: 14px; }
.note b { color: var(--amber); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0 40px; margin-top: 30px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13.5px; }
.footer p { margin: 0; }
.footer .brand { font-size: 16px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .viz-main { grid-template-columns: 1fr; }
  .code-body { max-height: 240px; }
  .bench-grid { grid-template-columns: 1fr 1fr; }
  .bench-grid .bcard:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 320px; order: -1; }
  .principles, .features { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 28px); }
  .bench-grid { grid-template-columns: 1fr; }
  .viz { padding: 10px; }
  .hero-stats { gap: 22px; }
  .queue-info { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit::before, .orbit::after, .hero-logo, .ht-edges path, .ht-nodes rect, .memhl.show { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
