:root {
  --bg: #0b0507;
  --panel: #13090c;
  --panel2: #1a0c11;
  --line: rgba(255, 60, 95, 0.16);
  --line2: rgba(255, 255, 255, 0.06);
  --text: #f6ecef;
  --muted: #a38991;
  --accent: #ff2d55;
  --accent2: #ff8a3d;
  --green: #2ee59d;
  --red: #ff4d6d;
  --amber: #ffc24b;
  --r: 18px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); }
code, .mono { font-family: var(--mono); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.bg-glow { position: fixed; inset: -20% -10% auto -10%; height: 70vh; background: radial-gradient(60% 60% at 50% 0%, rgba(255, 45, 85, 0.22), transparent 70%); pointer-events: none; z-index: 0; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(11, 5, 7, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line2); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.08em; }
.top-right { display: flex; align-items: center; gap: 8px; }
.badge { font: 700 10.5px/1 var(--mono); letter-spacing: 0.08em; padding: 5px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--amber); }
.badge.live { color: var(--green); border-color: rgba(46, 229, 157, 0.35); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.down { background: var(--red); box-shadow: 0 0 10px var(--red); }
.chip { font: 600 12.5px var(--mono); color: var(--text); background: var(--panel2); border: 1px solid var(--line); padding: 7px 10px; border-radius: 99px; cursor: pointer; }

/* layout */
.view > *, .col > * { min-width: 0; }
.view { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 16px 14px 60px; display: grid; gap: 14px; }
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.glow { box-shadow: 0 0 0 1px rgba(255, 45, 85, 0.08), 0 20px 60px -30px rgba(255, 45, 85, 0.55); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
h1, h2, h3 { margin: 0 0 6px; line-height: 1.15; }
h3 { font-size: 15px; letter-spacing: 0.02em; }
.label { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* buttons */
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform 0.08s, opacity 0.2s; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.linklike { background: none; border: 0; color: var(--accent2); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* landing */
.hero { text-align: center; padding: 40px 6px 10px; }
.hero h1 { font-size: clamp(32px, 8vw, 58px); font-weight: 850; letter-spacing: -0.02em; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: #d8c3ca; max-width: 620px; margin: 12px auto 22px; font-size: 16.5px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.pill { display: inline-block; font: 700 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; margin-bottom: 12px; }
.grid3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature p { color: #cdb7be; margin: 0; font-size: 14px; }
.ficon { font-size: 24px; margin-bottom: 6px; }
.pricing h2 { font-size: 30px; }
.price { font-size: 1.15em; font-weight: 850; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.checks { padding: 0; list-style: none; margin: 12px 0 18px; }
.checks li { padding: 5px 0 5px 26px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.risk { border-color: rgba(255, 194, 75, 0.25); }
.risk p { color: #d9c7b2; margin: 0 0 6px; }
.prose p { color: #d8c3ca; }

/* balance */
.bal-top { display: flex; justify-content: space-between; gap: 10px; }
.bal { font: 800 44px/1.05 var(--mono); letter-spacing: -0.03em; margin: 4px 0 2px; }
.bal small { font-size: 0.55em; color: var(--muted); font-weight: 700; }
.sub { color: var(--muted); font: 600 13px var(--mono); }
.pnl.up { color: var(--green); }
.pnl.down { color: var(--red); }
.bal-side { text-align: right; }
.mult { display: inline-block; font: 800 13px var(--mono); padding: 6px 10px; border-radius: 10px; background: rgba(46, 229, 157, 0.12); color: var(--green); border: 1px solid rgba(46, 229, 157, 0.3); }
.mult.down { background: rgba(255, 77, 109, 0.12); color: var(--red); border-color: rgba(255, 77, 109, 0.3); }
.chart { width: 100%; height: 170px; margin-top: 10px; display: block; }
.tabs, .seg { display: flex; gap: 6px; }
.tabs { justify-content: flex-end; margin-top: 6px; }
.tabs button, .seg button { background: transparent; border: 1px solid var(--line2); color: var(--muted); font: 700 12px var(--mono); padding: 5px 9px; border-radius: 8px; cursor: pointer; }
.tabs button.on, .seg button.on { color: var(--text); border-color: var(--accent); background: rgba(255, 45, 85, 0.12); }

/* control */
.control { display: flex; align-items: center; justify-content: space-between; }
.bot-state { font-weight: 800; font-size: 18px; }
.bot-state.on { color: var(--green); }
.bot-state.off { color: var(--amber); }
.switch { position: relative; width: 58px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #2a1419; border: 1px solid var(--line); border-radius: 99px; transition: 0.2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #b39aa1; transition: 0.2s; }
.switch input:checked + span { background: rgba(46, 229, 157, 0.2); border-color: rgba(46, 229, 157, 0.5); }
.switch input:checked + span::after { transform: translateX(26px); background: var(--green); box-shadow: 0 0 12px var(--green); }

/* agents */
.agents { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.agent { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 12px; position: relative; overflow: hidden; }
.agent .nm { display: flex; align-items: center; gap: 7px; font: 700 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.agent .st { font: 800 16px var(--mono); margin-top: 6px; }
.agent .sb { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.agent .pulse.off { background: var(--amber); animation: none; }
.agent.flash { border-color: var(--accent); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(46, 229, 157, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0); } }

/* positions + feed */
.list { display: grid; gap: 8px; }
.pos { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); }
.pos .sym { font-weight: 800; }
.pos .meta { font: 12px var(--mono); color: var(--muted); }
.pos .m { font: 800 15px var(--mono); }
.up { color: var(--green); }
.down { color: var(--red); }
.feed { display: grid; gap: 2px; max-height: 420px; overflow-y: auto; font: 12.5px/1.45 var(--mono); }
.fi { display: grid; grid-template-columns: 44px 50px minmax(0, 1fr); gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line2); align-items: start; }
.fi .t { color: var(--muted); }
.tag { font-weight: 800; font-size: 10.5px; padding: 2px 6px; border-radius: 6px; text-align: center; }
.tag.buy { background: rgba(46, 229, 157, 0.14); color: var(--green); }
.tag.sell, .tag.close { background: rgba(255, 138, 61, 0.14); color: var(--accent2); }
.tag.skip { background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.tag.fail { background: rgba(255, 77, 109, 0.16); color: var(--red); }
.tag.note { background: rgba(255, 194, 75, 0.12); color: var(--amber); }
.fi .fx { word-break: break-word; }
.fi .why { color: var(--muted); }
.fi b { color: var(--text); }

/* wallet + forms */
.addr-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.addr-row code { flex: 1; background: var(--panel); border: 1px solid var(--line2); padding: 9px 10px; border-radius: 10px; overflow-x: auto; white-space: nowrap; font-size: 12.5px; }
.pay-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 4px; }
.input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px 11px; font: 14px var(--mono); width: 100%; }
.pay-row .input { width: 140px; flex: 1; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.form label { font-size: 13px; color: var(--muted); display: grid; gap: 5px; }
.form .full { grid-column: 1 / -1; display: grid; gap: 6px; }
details.danger { margin-top: 10px; border-top: 1px solid var(--line2); padding-top: 10px; }
details.danger summary { cursor: pointer; color: var(--red); font-weight: 700; font-size: 13px; }
.secret { display: block; margin-top: 8px; padding: 10px; border-radius: 10px; background: #220c12; border: 1px solid var(--red); word-break: break-all; font-size: 12px; }

/* paywall */
.paywall h2 { font-size: 24px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 2, 3, 0.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(420px, 100%); background: var(--panel2); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px -20px rgba(255, 45, 85, 0.45); }
.x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.wallet-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.wallet-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line2); color: var(--text); cursor: pointer; font-weight: 700; text-decoration: none; font-size: 15px; width: 100%; }
.wallet-item img { width: 28px; height: 28px; border-radius: 8px; }
.wallet-item:hover { border-color: var(--accent); }
.recap { text-align: center; }
.recap-from { font: 700 22px var(--mono); color: var(--muted); margin-top: 8px; }
.recap-to { font: 850 40px var(--mono); }
.recap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.recap-grid div { background: var(--panel); border-radius: 12px; padding: 10px; display: grid; }
.recap-grid b { font: 800 20px var(--mono); }
.recap-grid span { font-size: 12px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: #1f0d13; border: 1px solid var(--line); padding: 11px 16px; border-radius: 12px; max-width: 92vw; font-size: 14px; box-shadow: 0 10px 40px -10px #000; }
.toast.err { border-color: var(--red); }

}
.form label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
.form label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.announce { order: -1; background: linear-gradient(90deg, rgba(255, 45, 85, 0.18), rgba(255, 138, 61, 0.14)); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 14px; }


/* ================= TERMINAL (signed-in app) ================= */
.term { position: relative; z-index: 1; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; max-width: 1480px; margin: 0 auto; padding: 14px; padding-bottom: 40px; }
.term.hidden { display: none; }
.side { position: sticky; top: 70px; align-self: start; display: grid; gap: 10px; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 10px; max-height: calc(100vh - 90px); overflow-y: auto; }
.side-label { font: 600 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 0; }
.side-nav { display: grid; gap: 2px; }
.side-nav button { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #cdb7be; font: 600 14px inherit; font-family: inherit; text-align: left; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.side-nav button span { width: 18px; text-align: center; color: var(--muted); }
.side-nav button em { margin-left: auto; font: 700 11px var(--mono); font-style: normal; color: var(--muted); background: rgba(255, 255, 255, 0.05); padding: 2px 7px; border-radius: 99px; }
.side-nav button.on { background: rgba(255, 45, 85, 0.14); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.side-nav button.on span { color: var(--accent); }
.side-agents { display: grid; gap: 6px; }
.sa { display: grid; grid-template-columns: 26px minmax(0, 1fr) 44px; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); transition: border-color 0.3s, box-shadow 0.3s; }
.sa .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.sa b { display: block; font-size: 13px; }
.sa small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa .bars { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.sa .bars i { flex: 1; background: currentColor; opacity: 0.75; border-radius: 1px; min-height: 2px; transition: height 0.6s; }
.sa.flash, .agent.flash { border-color: var(--accent); box-shadow: 0 0 22px -6px var(--accent); }
.side-wallet { margin-top: 4px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 45, 85, 0.22), rgba(255, 138, 61, 0.1)); border: 1px solid var(--line); }
.sw-bal { font: 800 22px var(--mono); margin-top: 4px; }
.sw-bal small { font-size: 12px; color: var(--muted); }
.main { display: grid; gap: 14px; align-content: start; min-width: 0; }
.main > *, .pane > *, .ov-top > *, .ov-bottom > * { min-width: 0; }
.pane { display: grid; gap: 14px; align-content: start; }
.pane.hidden { display: none; }

/* ticker tape */
.tape { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape-track { display: flex; gap: 22px; width: max-content; padding: 9px 0; animation: tape 40s linear infinite; font: 600 12.5px var(--mono); white-space: nowrap; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-track span { display: inline-flex; gap: 7px; align-items: center; }
.tape-track b { color: var(--text); }
.tape-track i { font-style: normal; color: var(--muted); }
.tape-track .dot-v { width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* overview grid */
.ov-top { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.ov-bottom { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 1fr); }
.eq-head { display: flex; justify-content: space-between; gap: 10px; }
.eq-side { text-align: right; }
.bal { font: 800 46px/1.05 var(--mono); letter-spacing: -0.03em; margin: 4px 0 2px; }
.chart-wrap { position: relative; }
.chart path.line { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 1.6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; right: 6%; font: 800 12.5px var(--mono); padding: 4px 8px; border-radius: 8px; background: rgba(46, 229, 157, 0.16); border: 1px solid rgba(46, 229, 157, 0.45); color: var(--green); animation: rise 3.2s ease-out forwards; white-space: nowrap; }
.bubble.down { background: rgba(255, 77, 109, 0.16); border-color: rgba(255, 77, 109, 0.45); color: var(--red); }
@keyframes rise { 0% { opacity: 0; transform: translateY(10px) scale(0.9); } 12% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-90px); } }
.eq-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.eq-stats div { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 8px 10px; }
.eq-stats b { display: block; font: 800 15px var(--mono); }
.eq-stats span { font-size: 11px; color: var(--muted); }
.num-flash { animation: numflash 0.9s; }
@keyframes numflash { 0% { text-shadow: 0 0 18px var(--green); } 100% { text-shadow: none; } }

/* radar */
.radar-card { display: grid; align-content: start; }
.radar { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 4px auto 8px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 45, 85, 0.12), rgba(255, 45, 85, 0.02) 70%); border: 1px solid var(--line); overflow: hidden; }
.radar-rings { position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 calc(16.66% - 1px), rgba(255, 60, 95, 0.18) calc(16.66% - 1px) 16.66%); }
.radar-rings::before, .radar-rings::after { content: ""; position: absolute; background: rgba(255, 60, 95, 0.14); }
.radar-rings::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.radar-rings::after { top: 50%; left: 0; right: 0; height: 1px; }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255, 45, 85, 0.45), rgba(255, 45, 85, 0.08) 40deg, transparent 70deg); animation: sweep 4s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-core { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.blip { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; font: 700 10.5px var(--mono); white-space: nowrap; animation: blipin 0.6s ease-out; }
.blip i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: ping 1.8s infinite; }
.blip.smart i { background: #b69cff; box-shadow: 0 0 10px #8b5cf6; }
.blip.blocked i { background: var(--red); box-shadow: 0 0 10px var(--red); animation: none; opacity: 0.8; }
.blip span { background: rgba(11, 5, 7, 0.78); padding: 2px 5px; border-radius: 6px; border: 1px solid var(--line2); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(46, 229, 157, 0); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes blipin { from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } }
.radar-legend { display: flex; gap: 12px; justify-content: center; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--green); }
.lg.smart::before { background: #b69cff; }
.lg.blocked::before { background: var(--red); }

/* agent cards */
.agents { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.agent { transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s; }
.agent .ic { position: absolute; right: 10px; top: 10px; font-size: 16px; opacity: 0.85; }
.agent.flash { transform: translateY(-2px); }
.agent .act { margin-top: 6px; font-size: 11.5px; color: #cdb7be; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* positions table */
.ptable { display: grid; gap: 4px; font: 12.5px var(--mono); }
.prow { display: grid; grid-template-columns: minmax(0, 1.4fr) 64px 78px 64px 60px; gap: 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line2); animation: rowin 0.5s ease-out; }
.prow.head { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; animation: none; }
.prow b { font-family: -apple-system, "Inter", sans-serif; font-weight: 800; }
.prow .venue { display: block; font-size: 10.5px; color: var(--muted); }
.st { font: 800 10px var(--mono); padding: 3px 7px; border-radius: 6px; text-align: center; }
.st.open { background: rgba(46, 229, 157, 0.14); color: var(--green); }
.st.tp { background: rgba(255, 138, 61, 0.16); color: var(--accent2); }
.st.stop { background: rgba(255, 77, 109, 0.16); color: var(--red); }
.prow .sellb { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 8px; font: 700 11px var(--mono); cursor: pointer; }
@keyframes rowin { from { opacity: 0; transform: translateX(-8px); background: rgba(255, 45, 85, 0.12); } }

/* treemap */
.treemap { position: relative; height: 250px; border-radius: 12px; overflow: hidden; }
.tm { position: absolute; padding: 7px; border-radius: 8px; border: 2px solid var(--bg); font: 700 11.5px var(--mono); overflow: hidden; transition: all 0.7s cubic-bezier(.2, .8, .2, 1); }
.tm.up { background: linear-gradient(160deg, #1fbf7f, #0f7a50); color: #eafff5; }
.tm.down { background: linear-gradient(160deg, #c2304c, #7a1428); color: #ffe9ee; }
.tm small { display: block; font-size: 10.5px; opacity: 0.9; }
.tm.open::after { content: "LIVE"; position: absolute; right: 6px; top: 6px; font-size: 8.5px; padding: 1px 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.3); }
.empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }

/* terminal log */
.termlog { height: 250px; overflow: hidden; display: flex; flex-direction: column; gap: 3px; font: 11.5px/1.5 var(--mono); background: #0a0406; border-radius: 10px; padding: 8px; border: 1px solid var(--line2); }
.termlog div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logline 0.45s ease-out; }
.termlog .t { color: #6f5960; margin-right: 6px; }
.termlog .k-buy { color: var(--green); }
.termlog .k-sell, .termlog .k-close { color: var(--accent2); }
.termlog .k-skip { color: #8a6f77; }
.termlog .k-fail { color: var(--red); }
.termlog .k-note { color: var(--amber); }
@keyframes logline { from { opacity: 0; transform: translateY(-6px); background: rgba(255, 45, 85, 0.14); } }

/* boot */
.boot { position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; justify-items: center; gap: 10px; background: radial-gradient(60% 60% at 50% 35%, #3a0b17, #0b0507 70%); transition: opacity 0.6s; }
.boot.fade { opacity: 0; pointer-events: none; }
.orb { position: relative; width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff5a78, #b3001e 60%, #4a0010); box-shadow: 0 0 60px rgba(255, 45, 85, 0.6), inset 0 -10px 30px rgba(0, 0, 0, 0.4); animation: breathe 2.4s ease-in-out infinite; }
.orb img { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)) brightness(1.4); }
.orb-ring { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(255, 90, 120, 0.55); border-top-color: transparent; animation: sweep 2.2s linear infinite; }
.orb-ring.r2 { inset: -28px; border-color: rgba(255, 138, 61, 0.3); border-bottom-color: transparent; animation-duration: 3.6s; animation-direction: reverse; }
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 0 90px rgba(255, 45, 85, 0.8), inset 0 -10px 30px rgba(0, 0, 0, 0.4); } }
.boot-title { font: 850 26px var(--mono); letter-spacing: 0.2em; margin-top: 26px; }
.boot-sub { color: var(--muted); font: 13px var(--mono); }
.boot-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font: 13px var(--mono); min-width: 290px; }
.boot-list li { display: flex; gap: 10px; opacity: 0; animation: bootin 0.4s forwards; }
.boot-list li i { font-style: normal; width: 16px; color: var(--muted); }
.boot-list li.ok i { color: var(--green); }
.boot-list li.warn i { color: var(--amber); }
.boot-list li span { color: var(--muted); margin-left: auto; padding-left: 12px; }
@keyframes bootin { to { opacity: 1; } }

/* mobile tab bar */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .ov-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ov-bottom > :first-child { grid-column: 1 / -1; }
  .agents { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .term { grid-template-columns: minmax(0, 1fr); padding: 10px 10px 86px; }
  .side { display: none; }
  .ov-top, .ov-bottom { grid-template-columns: minmax(0, 1fr); }
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agents > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bal { font-size: 40px; }
  .eq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: minmax(0, 1.3fr) 58px 70px 56px 52px; gap: 6px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(13, 6, 9, 0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
  .tabbar button { display: grid; justify-items: center; gap: 2px; min-height: 48px; background: none; border: 0; color: var(--muted); font: 600 11px inherit; font-family: inherit; cursor: pointer; }
  .tabbar button span { font-size: 17px; }
  .tabbar button.on { color: var(--text); }
  .tabbar button.on span { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .tape-track, .radar-sweep, .orb, .orb-ring, .blip i, .chart path.line { animation: none !important; stroke-dashoffset: 0; }
}
