/* ============ ORBYT — design tokens ============ */
:root {
  --bg: #06070c;
  --bg-2: #0a0c14;
  --panel: rgba(16, 19, 31, 0.72);
  --panel-solid: #0e111c;
  --line: rgba(148, 163, 255, 0.10);
  --line-2: rgba(148, 163, 255, 0.18);
  --text: #eef0ff;
  --muted: #8b91b5;
  --dim: #565c80;
  --blue: #4d6bff;
  --blue-2: #2f4dff;
  --violet: #9b6bff;
  --cyan: #3fe0ff;
  --green: #3ee69a;
  --amber: #ffb547;
  --red: #ff5d73;
  --grad: linear-gradient(135deg, #4d6bff 0%, #8a5cff 55%, #3fe0ff 120%);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --r: 14px;
  --shadow-blue: 0 10px 40px -10px rgba(77, 107, 255, .65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}
body::before { /* dotted grid */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(140, 150, 255, .13) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
}
body::after { /* ambient glows */
  content: ""; position: fixed; inset: -20%; z-index: -3; pointer-events: none;
  background:
    radial-gradient(40% 35% at 75% 15%, rgba(77, 107, 255, .16), transparent 70%),
    radial-gradient(35% 30% at 10% 70%, rgba(155, 107, 255, .10), transparent 70%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(77, 107, 255, .45); }
* { scrollbar-width: thin; scrollbar-color: #2a3050 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3050; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a4270; }

.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.label.blue { color: #8fa2ff; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wrap { width: min(1200px, 92vw); margin: 0 auto; }
.up { color: var(--green); } .down { color: var(--red); }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(6, 7, 12, .62);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.logo svg, .logo .logo-mark { width: 34px; height: 34px; margin: -4px 0; }
.logo .logo-mark { transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .3s; }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.08); filter: drop-shadow(0 0 8px rgba(63,224,255,.45)); }
footer .logo .logo-mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px; border-radius: 8px; transition: .2s; white-space: nowrap;
}
.chip { white-space: nowrap; }
@media (max-width: 1100px) { .nav-links { display: none !important; } }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.04); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; padding: 7px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,.02);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  color: var(--muted); border: 1px solid transparent; transition: .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.burger { display: none; }

/* ============ BUTTONS ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding: 13px 20px; border-radius: 11px; transition: transform .15s, box-shadow .25s, background .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(180deg, #5b78ff, #3352ff);
  box-shadow: var(--shadow-blue), inset 0 1px 0 rgba(255,255,255,.25);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 14px 50px -8px rgba(77, 107, 255, .85), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.05); border-color: rgba(148,163,255,.3); }
.btn-sm { padding: 9px 14px; font-size: 11.5px; border-radius: 9px; }
.btn .kbd { font-size: 10px; opacity: .75; padding: 2px 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ============ HERO ============ */
.hero { position: relative; padding: 70px 0 40px; min-height: calc(100vh - 68px); display: flex; align-items: center; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  border: 1px solid var(--line-2); border-radius: 99px; background: rgba(77,107,255,.06);
  font-size: 13px; color: var(--muted); margin-bottom: 26px;
}
.badge b { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; background: var(--grad); color: #fff; padding: 4px 9px; border-radius: 99px; }
h1.display {
  font-size: clamp(48px, 7vw, 92px); line-height: .98; letter-spacing: -.045em; font-weight: 700;
}
h1.display .soft { color: #5d6390; }
.hero p.lead { font-size: 19px; color: #b4b9da; max-width: 520px; margin: 26px 0 34px; }
.cta-box {
  display: inline-flex; gap: 10px; padding: 10px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(10,12,20,.7); position: relative;
}
.cta-box::before {
  content: "||||||||||||    ||||||||||||"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: 1px; background: var(--bg); padding: 0 6px;
}
.hero-stats { display: flex; gap: 34px; margin-top: 42px; }
.hero-stats div b { display: block; font-size: 24px; letter-spacing: -.02em; }
.hero-stats div span { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.hero-art { position: relative; aspect-ratio: 1; }
#orb { width: 100%; height: 100%; display: block; }
.hero-art .float-card {
  position: absolute; padding: 12px 14px; border-radius: 12px; font-size: 12.5px;
  background: rgba(14,17,28,.82); border: 1px solid var(--line-2); backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px -20px #000; animation: bob 6s ease-in-out infinite;
}
.hero-art .float-card .label { font-size: 10px; margin-bottom: 4px; }
.fc-1 { top: 12%; left: -2%; }
.fc-2 { bottom: 14%; right: 0; animation-delay: -3s !important; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ============ TICKER ============ */
.ticker { border-block: 1px solid var(--line); background: rgba(10,12,20,.6); overflow: hidden; }
.ticker-track { display: flex; gap: 40px; padding: 14px 0; width: max-content; animation: marquee 50s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { display: flex; gap: 10px; font-family: var(--mono); font-size: 13px; align-items: center; }
.tick .sym { color: var(--text); font-weight: 600; }
.tick .px { color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
section.block { padding: 130px 0 40px; position: relative; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(40px, 5.4vw, 72px); line-height: .98; letter-spacing: -.04em; font-weight: 700; }
.sec-head h2 .soft { color: #4f557d; }
.sec-head p { color: var(--muted); font-size: 17px; max-width: 460px; justify-self: end; }
.sec-head .label { margin-bottom: 18px; display: block; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(8px); position: relative;
}
.card.glow::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(77,107,255,.55), transparent 35%, transparent 65%, rgba(155,107,255,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ============ PIPELINE ============ */
.pipeline { padding: 34px; overflow: hidden; }
.pipe-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.pipe-line { position: absolute; top: 118px; left: 8%; right: 8%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 9px); }
.packet {
  position: absolute; top: 113px; width: 12px; height: 12px; border-radius: 3px; left: 8%;
  background: var(--cyan); box-shadow: 0 0 18px var(--cyan), 0 0 40px var(--cyan); transition: left .7s cubic-bezier(.6,0,.3,1), background .3s, box-shadow .3s, top .5s;
  z-index: 3; opacity: 0;
}
.node { position: relative; z-index: 2; }
.node .label { font-size: 11px; transition: color .3s; }
.node p { font-size: 13.5px; color: var(--muted); margin: 6px 0 16px; min-height: 40px; }
.node-box {
  height: 96px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(6,7,12,.85);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--dim);
  transition: .35s; position: relative; overflow: hidden; white-space: pre; line-height: 1.15;
}
.node.on .node-box { border-color: var(--c, var(--blue)); color: var(--c, var(--blue)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 12%, transparent), 0 0 40px -6px var(--c); }
.node.on .label { color: var(--c); }
.pipe-branches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 26px; }
.branch { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); padding: 12px; border-radius: 12px; border: 1px dashed var(--line-2); transition: .3s; }
.branch .label { font-size: 10.5px; }
.branch.on { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, transparent); }
.branch.on .label { color: var(--c); }
.pipe-log {
  margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px;
  font-family: var(--mono); font-size: 12.5px; height: 128px; overflow: hidden; display: flex; flex-direction: column-reverse; gap: 6px;
}
.pipe-log div { color: var(--muted); animation: fadeIn .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-log .t { color: var(--dim); margin-right: 10px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* ============ PRESETS ============ */
.presets { display: grid; grid-template-columns: 300px 1fr; gap: 18px; }
.preset-tabs { display: flex; flex-direction: column; gap: 8px; }
.ptab {
  text-align: left; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(14,17,28,.5); transition: .25s; display: flex; justify-content: space-between; align-items: center;
}
.ptab b { font-family: var(--mono); letter-spacing: .12em; font-size: 14px; }
.ptab span { font-size: 12px; color: var(--dim); }
.ptab:hover { border-color: var(--line-2); }
.ptab.active { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 9%, transparent); box-shadow: inset 3px 0 0 var(--pc); }
.ptab.active b { color: var(--pc); }
.preset-view { padding: 30px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; min-height: 420px; }
.preset-view h3 { font-size: 30px; letter-spacing: -.02em; }
.preset-view .tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; padding: 4px 10px; border-radius: 6px; margin-bottom: 12px; }
.preset-view p { color: var(--muted); max-width: 560px; }
#presetChart { width: 100%; height: 220px; }
.legend { display: flex; gap: 22px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.rules { display: flex; flex-wrap: wrap; gap: 8px; }
.rules span { font-family: var(--mono); font-size: 11.5px; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line-2); color: #b9bee0; }

/* ============ MARKETS ============ */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.mkt {
  padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(14,17,28,.55);
  transition: .2s; cursor: default;
}
.mkt:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mkt .top { display: flex; justify-content: space-between; align-items: center; }
.mkt .sym { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.mkt .chg { font-family: var(--mono); font-size: 11.5px; }
.mkt .px { font-family: var(--mono); font-size: 18px; margin: 8px 0 4px; letter-spacing: -.02em; transition: color .4s; }
.mkt .px small { font-size: 11px; color: var(--dim); }
.mkt canvas { width: 100%; height: 36px; display: block; }
.mkt .name { font-size: 11.5px; color: var(--dim); }
.flash-up { color: var(--green) !important; } .flash-down { color: var(--red) !important; }
.note { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 18px; letter-spacing: .06em; }

/* ============ MARKETPLACE ============ */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.agent-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; transition: .25s; }
.agent-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.agent-card .head { display: flex; justify-content: space-between; align-items: flex-start; }
.agent-card h4 { font-size: 19px; letter-spacing: -.01em; }
.agent-card .by { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.pill { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; padding: 4px 9px; border-radius: 6px; border: 1px solid currentColor; }
.agent-card canvas { width: 100%; height: 70px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv div { padding: 10px; border-radius: 9px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.kv b { display: block; font-family: var(--mono); font-size: 14px; }
.kv span { font-size: 10.5px; color: var(--dim); font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.checks span::before { content: "✓ "; color: var(--green); }
.agent-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price-tag { font-family: var(--mono); font-size: 15px; }

/* ============ DEV ============ */
.dev { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; }
.term { overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a2f48; }
.term-bar .tabs { margin-left: 14px; display: flex; gap: 4px; }
.term-bar .tabs button { font-family: var(--mono); font-size: 11.5px; color: var(--dim); padding: 5px 10px; border-radius: 6px; }
.term-bar .tabs button.active { color: var(--text); background: rgba(255,255,255,.06); }
.term pre { font-family: var(--mono); font-size: 13px; line-height: 1.75; padding: 22px; min-height: 290px; color: #c6cbef; white-space: pre-wrap; }
.term .c1 { color: #6b7199; } .term .c2 { color: #8fa2ff; } .term .c3 { color: var(--green); } .term .c4 { color: var(--amber); } .term .c5 { color: var(--violet); }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--cyan); vertical-align: -2px; animation: pulse 1s steps(1) infinite; }
.dev-list { display: grid; gap: 12px; margin: 26px 0 30px; }
.dev-list div { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.dev-list b { color: var(--text); display: block; }
.dev-list .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 13px; color: #8fa2ff; }

/* ============ FINAL CTA ============ */
.final { text-align: center; padding: 120px 0; position: relative; }
.final h2 { font-size: clamp(48px, 8vw, 110px); letter-spacing: -.05em; line-height: .95; font-weight: 700; }
.final p { color: var(--muted); font-size: 18px; margin: 22px 0 36px; }
.prompt-bar {
  max-width: 720px; margin: 0 auto; display: flex; gap: 10px; padding: 10px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(10,12,20,.85); box-shadow: 0 30px 80px -30px rgba(77,107,255,.55);
}
.prompt-bar input { flex: 1; background: none; border: 0; outline: 0; padding: 0 14px; font-size: 16px; }
.prompt-bar input::placeholder { color: var(--dim); }
.suggest { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.suggest button { font-size: 12.5px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); transition: .2s; }
.suggest button:hover { color: var(--text); border-color: var(--line-2); }

footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer small { color: var(--dim); font-size: 12px; max-width: 620px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ TOAST / MODAL ============ */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 260px; max-width: 360px; padding: 12px 16px; border-radius: 12px; font-size: 13.5px;
  background: rgba(14,17,28,.95); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -15px #000;
  border-left: 3px solid var(--tc, var(--blue)); animation: fadeIn .3s;
}
.modal-bg { position: fixed; inset: 0; z-index: 150; background: rgba(3,4,8,.72); backdrop-filter: blur(6px); display: none; place-items: center; padding: 20px; }
.modal-bg.open { display: grid; animation: fadeIn .25s; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 28px; }
.modal h3 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 6px; }
.modal .close { position: absolute; top: 16px; right: 16px; }

/* ============ APP ============ */
.app-shell { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 68px); }
.side { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 68px; height: calc(100vh - 68px); }
.side button {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; text-align: left;
  color: var(--muted); font-size: 14px; transition: .2s;
}
.side button:hover { color: var(--text); background: rgba(255,255,255,.03); }
.side button.active { color: var(--text); background: rgba(77,107,255,.12); box-shadow: inset 2px 0 0 var(--blue); }
.side button svg { width: 18px; height: 18px; opacity: .85; }
.side .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.side .bottom { margin-top: auto; padding: 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.main { padding: 32px clamp(18px, 3vw, 44px) 80px; min-width: 0; }
.view { display: none; animation: fadeIn .35s; }
.view.active { display: block; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.view-head h2 { font-size: 34px; letter-spacing: -.03em; }
.view-head p { color: var(--muted); }

.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.steps div { flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--dim); }
.steps div.on { color: var(--text); border-color: rgba(77,107,255,.5); background: rgba(77,107,255,.08); }
.steps div.done { color: var(--green); border-color: rgba(62,230,154,.3); }

.composer { padding: 22px; }
.composer textarea {
  width: 100%; min-height: 120px; resize: vertical; background: transparent; border: 0; outline: 0;
  font-size: 19px; line-height: 1.5; letter-spacing: -.01em;
}
.composer textarea::placeholder { color: var(--dim); }
.composer .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; flex-wrap: wrap; }

.builder { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 18px; }
.panel { padding: 22px; }
.panel h4 { font-size: 15px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.field { margin-bottom: 16px; }
.field label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.field label b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.field input[type=text], .field input[type=number], .field select {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(6,7,12,.6); outline: 0;
}
.field input:focus, .field select:focus { border-color: var(--blue); }
input[type=range] { width: 100%; accent-color: var(--blue); }
.asset-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.asset-picker button { font-family: var(--mono); font-size: 11.5px; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted); transition: .15s; }
.asset-picker button.on { color: #fff; border-color: var(--blue); background: rgba(77,107,255,.2); }
.preset-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.preset-pick button { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; padding: 10px 4px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); }
.preset-pick button.on { color: var(--pc); border-color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, transparent); }
.rule-list { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.rule-list div { display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.rule-list div::before { content: "§"; font-family: var(--mono); color: #8fa2ff; }
.ai-thinking { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 14px 0 0; min-height: 22px; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); margin: 14px 0; cursor: pointer; }
.check-row input { accent-color: var(--blue); width: 16px; height: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { padding: 18px; }
.stat span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; margin-top: 6px; font-family: var(--mono); font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
#pnlChart { width: 100%; height: 240px; display: block; }
.agent-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 10px; transition: .2s; cursor: pointer; }
.agent-row:hover, .agent-row.sel { border-color: var(--line-2); background: rgba(255,255,255,.02); }
.agent-row h5 { font-size: 15px; display: flex; gap: 10px; align-items: center; }
.agent-row .meta { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.agent-row .r { text-align: right; font-family: var(--mono); }
.agent-row .actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.log { font-family: var(--mono); font-size: 12px; max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.log .e { padding: 9px 10px; border-radius: 8px; display: grid; grid-template-columns: 62px 74px 1fr; gap: 8px; animation: fadeIn .35s; border: 1px solid transparent; }
.log .e:hover { background: rgba(255,255,255,.025); border-color: var(--line); }
.log .t { color: var(--dim); }
.log .k { font-size: 10.5px; letter-spacing: .08em; }
.log .m { color: #c6cbef; word-break: break-word; }
.log .m small { display: block; color: var(--dim); margin-top: 2px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 10px; font-family: var(--mono); color: var(--dim); }
table.receipts { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.receipts th { text-align: left; font-weight: 500; color: var(--dim); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 10px; border-bottom: 1px solid var(--line); }
.receipts td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: #c6cbef; }
.receipts tr:hover td { background: rgba(255,255,255,.02); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.filters button.on { color: var(--text); border-color: var(--blue); background: rgba(77,107,255,.12); }
.demo-banner { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-align: center; padding: 8px; color: #ffd38a; background: rgba(255,181,71,.07); border-bottom: 1px solid rgba(255,181,71,.18); }

.dash-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.builder { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.agent-row { grid-template-columns: minmax(0, 1fr) auto; }
.dash-grid > *, .builder > * { min-width: 0; }
@media (max-width: 1240px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero .wrap, .sec-head, .dev, .presets, .builder, .dash-grid { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; }
  .hero-art { max-width: 480px; margin: 0 auto; width: 100%; }
  .mp-grid { grid-template-columns: 1fr 1fr; }
  .pipe-row, .pipe-branches { grid-template-columns: 1fr 1fr; }
  .pipe-line, .packet { display: none; }
  .preset-tabs { flex-direction: row; overflow-x: auto; }
  .ptab { flex: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .bottom { display: none; }
}
@media (max-width: 720px) {
  .nav-links, .nav-right .hide-sm { display: none; }
  .mp-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .cta-box { flex-direction: column; width: 100%; }
  .preset-pick { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .nav .wrap { gap: 12px; }
  .nav-right { min-width: 0; }
  .nav-right .btn { max-width: 168px; overflow: hidden; text-overflow: ellipsis; display: inline-block; padding: 9px 12px; }
  .demo-banner { font-size: 10px; padding: 6px 12px; line-height: 1.5; }
  .side { gap: 2px; padding: 10px 12px; }
  .side button { white-space: nowrap; flex: none; padding: 9px 12px; font-size: 13.5px; }
  .main { padding: 22px 16px 70px; }
  .view-head h2 { font-size: 27px; }
  .steps { gap: 6px; }
  .steps div { font-size: 9.5px; padding: 9px 8px; letter-spacing: .06em; }
  .composer { padding: 16px; }
  .composer textarea { font-size: 16px; min-height: 96px; }
  .panel { padding: 16px; }
  .stat b { font-size: 20px; }
  .log .e { grid-template-columns: 52px 62px minmax(0, 1fr); }
  table.receipts { font-size: 11.5px; }
  .modal { padding: 22px 18px; }
  .kv b { font-size: 12.5px; }
  .sec-head h2 { font-size: 38px; }
  section.block { padding-top: 90px; }
  .final h2 { font-size: 44px; }
  .prompt-bar { flex-direction: column; }
  .prompt-bar input { padding: 10px 6px; }
  .pipeline { padding: 18px; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
