/* QuantDesk Aurora — sole dashboard stylesheet.
 * Gradient stops: WebGradients (itmeo), MIT. See docs/WEBGRADIENTS-LICENSE.txt.
 * Add component rules here; do not restore historical inline themes.
 */
:root{
  color-scheme:light;
  --bg:#f4f5fa;--panel:#ffffff;--panel2:#eef1f7;--line:#e6e9f1;--line2:#d5dae6;
  --ink:#20283f;--ink2:#526078;--mut:#707d94;--dim:#a9b2c4;
  --up:#138369;--up2:#e6f7ef;--dn:#d64465;--dn2:#ffedf1;
  --amb:#a26917;--cyn:#3e79cc;--vio:#7961be;--grn:#138369;
  --gradient-brand:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  --gradient-sky:linear-gradient(120deg,#a1c4fd 0%,#c2e9fb 100%);
  --gradient-mint:linear-gradient(120deg,#84fab0 0%,#8fd3f4 100%);
  --radius:20px;--shadow:0 6px 30px #263b6010;
}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--ink);font:13px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}
button,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}
button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid #667eea;outline-offset:3px}
button{color:inherit}canvas{display:block;width:100%;height:100%}
.num,table{font-variant-numeric:tabular-nums}.sp{flex:1}
.u,.up{color:var(--up)}.d,.dn{color:var(--dn)}.a{color:var(--amb)}
::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background:var(--line2);border-radius:9px}
#app{max-width:1800px;margin:0 auto;padding:24px 28px 28px 232px;display:flex;flex-direction:column;gap:20px}
.top{min-height:58px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.brand{position:fixed;left:26px;top:30px;z-index:32;font-size:19px;font-weight:850;letter-spacing:-.8px}
.brand b{color:#7366c5}.brand small{display:block;font-size:9px;letter-spacing:1.5px;color:var(--mut);font-weight:600;margin-top:5px}
.nav{position:fixed;left:0;top:0;bottom:0;width:204px;padding:128px 16px 32px;display:flex;flex-direction:column;gap:8px;background:#fff;border-right:1px solid var(--line);z-index:30}
.nav::after{content:"QUANTDESK / LIVE WORKSPACE";margin-top:auto;padding:30px 12px 0;font-size:9px;letter-spacing:1px;color:var(--mut)}
.nav button,.nav-link{border:0;background:transparent;text-align:left;padding:13px 12px;border-radius:11px;color:var(--ink2);font-size:11px;font-weight:650;letter-spacing:.7px;display:flex;align-items:center;gap:12px;min-height:46px;text-decoration:none}
.nav button::before,.nav-link::before{display:none}
.nav-icon{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.nav button:hover,.nav-link:hover{background:var(--panel2)}.nav button.on{background:var(--gradient-brand);color:white;box-shadow:0 6px 16px #667eea30}
.capital{display:flex;align-items:center;gap:10px;padding:12px 18px;border-radius:14px;background:var(--gradient-brand);color:#fff;box-shadow:0 6px 20px #667eea25}
.capital .ck{font-size:11px;opacity:.85}.capital b{font-size:18px;font-weight:750}.capital .sep{width:1px;height:22px;background:#ffffff40;margin:0 4px}
.capital.off{background:var(--panel2);color:var(--ink2);box-shadow:none}
.tag,.chip{display:inline-flex;align-items:center;gap:4px;padding:4px 9px;white-space:nowrap;border:1px solid var(--line);border-radius:7px;color:var(--ink2);font-size:10px;font-weight:600;background:#ffffff80}
.tag.live,.chip.g{color:var(--up);background:var(--up2);border-color:transparent}
.tag.off,.chip.r{color:var(--dn);background:var(--dn2);border-color:transparent}
.tag.warn,.chip.a{color:var(--amb);background:#fff4dc;border-color:transparent}
.tag.live::before{content:"";width:5px;height:5px;background:currentColor;border-radius:50%}
#modeTag,#round,#lat{display:none}
#clock{margin-left:auto;font-size:18px;letter-spacing:1px;font-weight:650}#clock small{font-size:9px;color:var(--mut);margin-left:6px}
.top .btn{background:white}.strip{border-top:1px solid var(--line);border-bottom:1px solid var(--line);height:34px;overflow:hidden;white-space:nowrap}
.strip .in{display:inline-block;font-size:11px;line-height:32px;animation:mq var(--mq-dur,40s) linear infinite;will-change:transform}
.strip:hover .in{animation-play-state:paused}.strip .m{margin:0 14px;color:var(--mut)}
@keyframes mq{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.viewbar{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;padding:4px 0}
.viewbar b{font-size:28px;letter-spacing:-1px;font-weight:750}.viewbar #viewDesc{color:var(--mut);font-size:12px}.viewbar #viewCount{font-size:10px;color:var(--mut)}.viewbar .fresh{font-size:10px;color:var(--up)}
.dashboard-shell{display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:start;gap:20px}
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;min-width:0;align-items:stretch}
.c3{grid-column:span 3}.c4{grid-column:span 4}.c5{grid-column:span 5}.c6{grid-column:span 6}.c7{grid-column:span 7}.c8{grid-column:span 8}.c12{grid-column:span 12}
.panel{position:relative;display:flex;flex-direction:column;min-width:0;min-height:240px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.panel.view-hidden,.panel.real-only-hidden{display:none!important}
.ph{display:flex;align-items:center;gap:8px;padding:18px 20px 12px;color:var(--ink2);font-size:11px;font-weight:700;letter-spacing:.3px;flex-wrap:wrap}
.pb{padding:8px 20px 20px;min-height:0;min-width:0;flex:1;overflow:auto}.pb.fill{display:flex;flex-direction:column}
.panel[data-k="bot"],.panel[data-k="kline"]{min-height:460px;height:auto!important;grid-column:span 6}
.panel[data-k="bot"]{background:linear-gradient(#ffffffb8,#ffffffb8),var(--gradient-sky)}
.panel[data-k="edge"]{background:linear-gradient(#ffffffc4,#ffffffc4),var(--gradient-mint);min-height:250px}
.panel[data-k="graph"],.panel[data-k="monte"],.panel[data-k="regime"],.panel[data-k="osc"]{min-height:290px}
.panel[data-k="pipeline"]{min-height:122px;height:auto!important}
.panel[data-k="kernel"],.panel[data-k="ai"],.panel[data-k="logs"]{height:auto!important}
body[data-view="overview"] .panel{order:20}
body[data-view="overview"] .panel[data-k="bot"]{order:1}
body[data-view="overview"] .panel[data-k="kline"]{order:2}
body[data-view="overview"] .panel[data-k="logs"]{order:3}
body[data-view="overview"] .panel[data-k="edge"]{order:4;grid-column:span 4}
body[data-view="overview"] .panel[data-k="regime"]{order:5;grid-column:span 4}
body[data-view="overview"] .panel[data-k="funding"]{order:6;grid-column:span 4}
body[data-view="overview"] .panel[data-k="graph"]{order:7;grid-column:span 7}
body[data-view="overview"] .panel[data-k="monte"]{order:8;grid-column:span 5}
body[data-view="overview"] .panel[data-k="pipeline"]{order:9}
body[data-view="overview"] .panel[data-k="ai"]{order:31}
.pnl{font-size:clamp(28px,3vw,48px);font-weight:750;letter-spacing:-2px;line-height:1.2;margin:4px 0 22px}
.pnl>span:last-child:not(:first-child){display:block;margin-top:8px;letter-spacing:0}
.stat4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:10px 0 18px}
.st .k,.eqwrap .k{color:var(--mut);font-size:10px}.st .v{font-size:17px;font-weight:650;margin-top:3px}
.eqwrap{border-top:1px solid #b9c8df66;margin-top:14px;padding-top:12px}.eqwrap .k{margin-bottom:8px}
.income-head{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.income-head>b{font-size:12px;color:var(--mut);font-weight:600}
.income-periods{display:flex;justify-content:space-between;gap:5px;background:transparent;padding:0;margin-top:8px;order:3;width:100%}
.income-periods button{flex:1;padding:7px 5px;border:0;border-radius:999px;color:var(--mut);background:transparent;font-size:11px;font-weight:650;cursor:pointer}
.income-periods button:hover{color:var(--ink2);background:#ffffff70}
.income-periods button.on{color:#fff;background:#232733;box-shadow:0 4px 12px #263b6020}
.income-total{font-size:25px;font-weight:760;margin:10px 0 0;letter-spacing:-.7px}
.income-chart{height:230px;position:relative;margin:3px -2px 0}
.income-note{font-size:10px;color:var(--mut);line-height:1.7;overflow-wrap:anywhere;margin-top:4px}
.riskbar{display:flex;align-items:center;gap:10px;margin-top:14px}.bar{position:relative;height:5px;flex:1;border-radius:9px;background:var(--line);overflow:hidden}.bar i{position:absolute;inset:0 auto 0 0;background:var(--up)}
.hint,.empty{font-size:12px;line-height:1.8;color:var(--mut)}.empty{padding:22px;text-align:center}kbd{background:var(--panel2);padding:2px 6px;border-radius:4px;font-size:11px}
.kh{display:flex;align-items:center;gap:10px;flex-wrap:wrap}#kpx{font-size:32px;line-height:1.2;letter-spacing:-1px;font-weight:750}
.tf{border:1px solid var(--line);background:var(--panel);padding:5px 8px;margin:2px;border-radius:7px;font-size:10px}.tf.on{background:var(--gradient-brand);color:white;border-color:transparent}
.kwrap{position:relative;flex:1;min-height:280px;margin-top:14px}
.tip{position:absolute;display:none;pointer-events:none;background:white;border:1px solid var(--line);box-shadow:0 8px 24px #263b6020;border-radius:10px;padding:10px;font-size:11px;z-index:9;min-width:140px}
.tip .t{color:var(--mut)}.tip .r{display:flex;justify-content:space-between;gap:16px}
table{width:100%;border-collapse:collapse;font-size:11px}th,td{padding:10px 9px;text-align:right;white-space:nowrap;border-bottom:1px solid var(--line)}
th{font-size:10px;color:var(--mut);font-weight:500}th:first-child,td:first-child{text-align:left}tr:last-child td{border:0}
.yes,.no{font-size:10px;border-radius:4px;padding:2px 5px}.yes{color:var(--up);background:var(--up2)}.no{color:var(--dn);background:var(--dn2)}
.book{font-size:12px}.brow{position:relative;display:grid;grid-template-columns:1fr 1fr;line-height:24px;padding:0 6px}.brow i{position:absolute;right:0;top:1px;bottom:1px;opacity:.12}.brow.a i{background:var(--dn)}.brow.b i{background:var(--up)}.brow span{position:relative}.brow .sz{text-align:right;color:var(--ink2)}
.bmid{display:flex;justify-content:space-between;border-block:1px solid var(--line);padding:8px;color:var(--mut)}.bmid b{color:var(--ink);font-size:16px}
.mx{display:grid;gap:5px;font-size:11px}.mx .hd,.mx .rl{padding:6px;color:var(--mut);font-size:10px}.cell{text-align:center;padding:7px 2px;border-radius:5px;color:#182038;font-weight:650}.mxfoot{font-size:10px;color:var(--mut);margin-top:14px}
.regwrap{display:grid;grid-template-columns:1fr 108px;gap:10px;min-height:200px}.regcv{position:relative;min-height:180px}
.regleg{display:flex;flex-direction:column;justify-content:center;gap:10px}.regleg .it{display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--line);padding:7px 0;font-size:11px}.regleg .it i{width:7px;height:7px;border-radius:50%}.regleg .it b{margin-left:auto;font-size:14px}
.oscwrap{position:relative;min-height:220px;flex:1}.sigline{display:flex;gap:10px;flex-wrap:wrap;color:var(--mut);font-size:10px;margin-top:10px}
.cycle{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cycle .node{border:1px solid var(--line);border-radius:9px;padding:8px}.cycle small{display:block;color:var(--mut)}.cycle b{font-size:18px}.cycle .hot{border-color:var(--up)}.edgebox{padding:12px;background:#fff5df;border-radius:10px;color:var(--amb);margin-top:10px}
.edge-hero{display:flex;flex-direction:column;justify-content:center;height:100%;padding:6px 0}.edge-value{font-size:38px;letter-spacing:-1.5px;font-weight:750;color:var(--up)}.edge-symbol{font-size:15px;font-weight:650;margin-top:4px}
.edge-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}.edge-meta div{font-size:10px;color:var(--mut)}.edge-meta b{display:block;color:var(--ink);font-size:13px;margin-top:3px}
.pipeline-body{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:4px 18px 18px}
.pipe-step{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;border-radius:8px;background:var(--panel2);color:var(--mut);font-size:10px;padding:8px;overflow:hidden}
.pipe-step::after{content:"";position:absolute;bottom:0;left:0;width:var(--progress,0);height:2px;background:var(--vio)}.pipe-step.done{background:var(--up2);color:var(--up)}.pipe-step.done::after{width:100%;background:var(--up)}.pipe-step.active{background:#edeaff;color:var(--vio)}.pipe-step small{font-size:9px}
.graph-wrap,.monte-wrap{position:relative;min-height:230px;height:100%}.graph-wrap canvas,.monte-wrap canvas{position:absolute;inset:0}
.graph-legend{position:absolute;left:8px;top:0;z-index:2;font-size:9px;color:var(--mut);display:flex;gap:10px}
.graph-legend span::before{content:"";display:inline-block;background:var(--c);width:6px;height:6px;border-radius:50%;margin-right:4px}
.graph-kpis{position:absolute;bottom:0;left:8px;right:8px;display:flex;gap:15px;pointer-events:none}
.graph-kpis div,.monte-kpis div{font-size:9px;color:var(--mut);padding:5px;background:#ffffffe6;border-radius:6px}.graph-kpis b,.monte-kpis b{display:block;color:var(--ink);font-size:12px}
.monte-kpis{position:absolute;right:0;top:8px;display:grid;gap:6px;pointer-events:none}
.panel[data-k="logs"]{min-height:0}
.log-shell{height:auto;overflow:visible;background:#fafbfe}.log-table{min-width:0;color:var(--ink2);font:11px/1.7 ui-monospace,Menlo,monospace}
.log-row{display:grid;grid-template-columns:155px 42px 44px minmax(0,1fr);gap:10px;padding:9px 18px;border-bottom:1px solid var(--line);white-space:normal}
.log-msg{min-width:0;overflow-wrap:anywhere}
.log-time,.log-level{color:var(--mut)}.log-svc{color:var(--cyn)}.log-level.WARN{color:var(--amb)}.log-level.ERROR{color:var(--dn)}.log-empty{padding:20px;color:var(--mut)}
.workbench{position:sticky;top:20px;max-height:calc(100vh - 40px);display:flex;flex-direction:column;min-width:0;border-radius:var(--radius);border:1px solid var(--line);background:white;overflow:hidden;box-shadow:var(--shadow)}
.wb-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:18px 16px;border-bottom:1px solid var(--line);font-size:9px;color:var(--mut)}.wb-head b{font-size:11px;color:var(--ink);letter-spacing:.5px}
.wb-scroll{overflow-y:auto;min-height:0;padding:0 16px 16px}.wb-section{padding-top:18px}.wb-title{display:flex;align-items:center;gap:5px;font-size:9px;color:var(--mut);margin-bottom:12px}.wb-title b{color:var(--ink);font-size:12px}
.wb-task{padding:12px;border:1px solid var(--line);border-left:3px solid var(--up);border-radius:10px;margin-bottom:9px}.wb-task.arb{border-left-color:var(--vio)}.wb-task .row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.wb-task .row b{font-size:12px}.wb-task .desc{font-size:11px;color:var(--mut);margin-top:7px;line-height:1.7}
.wb-trigger,.wb-pulse{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.wb-trigger div,.wb-pulse div{font-size:10px;color:var(--mut);background:var(--bg);padding:9px;border-radius:8px}.wb-trigger b,.wb-pulse b{display:block;font-size:12px;color:var(--ink);margin-top:4px}
.wb-event{display:grid;grid-template-columns:40px 1fr auto;gap:7px;padding:10px 0;border-bottom:1px solid var(--line);font-size:10px}.wb-event time{color:var(--mut)}.wb-event .p{color:var(--up)}
.wb-empty{font-size:11px;color:var(--mut);padding:12px;background:var(--bg);border-radius:9px;line-height:1.7}
.wb-news-sources{display:flex;flex-wrap:wrap;gap:4px}.wb-news-sources span{font-size:9px;color:var(--mut)}.wb-news-sources .on{color:var(--up)}
.wb-news-digest{background:linear-gradient(120deg,#f1edff,#eef7ff);padding:12px;border-radius:10px;color:var(--ink2);font-size:11px;margin:10px 0}.wb-news-digest b,.wb-news-digest small{display:block}.wb-news-digest b{color:var(--vio);margin-bottom:6px}.wb-news-digest small{color:var(--mut);margin-top:5px}
.wb-news{display:block;text-decoration:none;color:inherit;padding:12px 0;border-bottom:1px solid var(--line)}.wb-news:hover .headline{color:var(--vio)}.wb-news .meta{font-size:9px;color:var(--mut);display:flex;gap:7px}.wb-news .headline{font-size:12px;font-weight:600;line-height:1.6;margin-top:5px}.wb-news .summary{font-size:10px;color:var(--mut);margin-top:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wb-close,.wb-mobile-toggle{display:none}
.kernel-head{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.kernel-stat{padding:16px;border-radius:12px;background:var(--bg)}.kernel-stat small{display:block;color:var(--mut);font-size:11px}.kernel-stat b{font-size:22px;display:block;margin-top:5px}
.kernel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.kernel-item{border:1px solid var(--line);border-radius:10px;padding:12px;min-width:0}.kernel-item .ki{display:flex;align-items:center;gap:8px}.kernel-item .dot{width:6px;height:6px;border-radius:50%;background:var(--up)}.kernel-item.off .dot{background:var(--amb)}.kernel-item b{font-size:12px}.kernel-item small{display:block;font-size:10px;color:var(--mut);overflow-wrap:anywhere;margin-top:5px}
.kernel-section{margin-top:18px;border-top:1px solid var(--line);padding-top:16px}.kernel-section h4{font-size:12px;margin-bottom:12px}.kernel-health{display:flex;flex-wrap:wrap;gap:7px}.kernel-health span{padding:5px 9px;border:1px solid var(--line);border-radius:6px;font-size:10px}.kernel-health .online{color:var(--up)}.kernel-health .error{color:var(--dn)}
.panel[data-k="research"]{height:auto!important}.research-hero{display:flex;justify-content:space-between;gap:20px;padding:22px;border-radius:14px;background:linear-gradient(120deg,#eef0ff,#e8f7f6)}.research-hero.hold{background:linear-gradient(120deg,#fff5e6,#f8f1ff)}.research-hero small{display:block;color:var(--mut);font-size:10px}.research-hero strong{display:block;font-size:24px;margin-top:5px}.research-hero p{font-size:11px;color:var(--mut);margin-top:6px}.research-audits{display:flex;align-items:flex-end;justify-content:flex-end;gap:7px;flex-wrap:wrap}.research-audits span{border:1px solid var(--line);border-radius:8px;padding:7px 9px;font-size:10px;background:#ffffffaa}.research-audits .ok{color:var(--up)}.research-audits .bad{color:var(--dn)}.research-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.research-card{border:1px solid var(--line);border-left:3px solid var(--amb);border-radius:12px;padding:14px;min-width:0}.research-card.qualified{border-left-color:var(--up)}.research-card-head{display:flex;align-items:center;gap:8px}.research-card-head b{font-size:14px}.research-card-head .chip{margin-left:auto}.research-card .radar-metrics{grid-template-columns:repeat(4,1fr)}.research-card p{font-size:10px;color:var(--mut);margin-top:10px}.research-card details{margin-top:9px}.research-card code{display:block;margin-top:8px;padding:8px;background:var(--bg);border-radius:7px;white-space:normal;overflow-wrap:anywhere;font-size:10px}.research-weights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.research-weight{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--bg)}.research-weight span{font-size:11px}.research-weight b{float:right;font-size:14px}.research-weight i{position:absolute;bottom:0;left:0;height:3px;background:var(--up)}.research-warning{margin-top:15px;padding:13px;border:1px solid #ecd9b4;background:#fff9ee;border-radius:10px;font-size:11px}.research-warning ul{margin:7px 0 0;padding-left:18px;color:var(--mut)}.research-actions{display:flex;align-items:center;gap:12px;margin-top:16px;font-size:10px;color:var(--mut)}.research-actions a{color:var(--vio);font-weight:650;text-decoration:none}.research-actions span{margin-left:auto}
.decision-hero{padding:22px;border-radius:14px;background:linear-gradient(120deg,#eef0ff,#e8f7f6);margin-bottom:14px}.decision-hero strong{font-size:22px}.decision-hero p{font-size:12px;color:var(--ink2);margin-top:7px}.decision-hero.empty{text-align:left}
.need-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.need-card,.radar-card,.strategy-card,.smart-card{border:1px solid var(--line);border-radius:12px;padding:14px;min-width:0}
.need-card b,.strategy-card b,.smart-card b{font-size:12px}.need-card span,.strategy-card span,.smart-card span{font-size:10px;color:var(--vio);float:right}.need-card p,.radar-card p,.strategy-card p,.smart-card p{font-size:11px;line-height:1.7;color:var(--mut);margin-top:8px;overflow-wrap:anywhere;clear:both}
.radar-list,.strategy-list,.smart-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.radar-top{display:flex;align-items:center;gap:8px}.radar-top b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.radar-top span{font-size:10px;color:var(--vio);margin-left:auto}
.radar-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}.radar-metrics div{font-size:10px;color:var(--mut)}.radar-metrics b{display:block;font-size:14px;color:var(--ink);margin-top:4px}
.ai-shell{display:grid;grid-template-rows:auto minmax(240px,1fr) auto;height:650px;background:#fafbff}.ai-banner{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 20px;font-size:11px;color:var(--mut)}.ai-banner b{color:var(--vio)}
.ai-suggestions{display:flex;gap:7px;flex-wrap:wrap;padding:0 20px 10px}.ai-suggestions button{background:white;border:1px solid var(--line);border-radius:20px;padding:6px 10px;font-size:11px;color:var(--ink2)}.ai-suggestions button:hover{border-color:var(--vio)}
.ai-messages{overflow:auto;display:flex;flex-direction:column;gap:14px;padding:20px}.ai-msg,.ai-proposal{max-width:90%;border-radius:14px;padding:14px 18px;white-space:pre-wrap;font-size:13px;line-height:1.8;overflow-wrap:anywhere}
.ai-msg.user{align-self:flex-end;background:var(--gradient-brand);color:white}.ai-msg.assistant{align-self:flex-start;background:white;border:1px solid var(--line)}.ai-msg.system{align-self:center;font-size:11px;color:var(--mut);text-align:center}
.ai-msg.assistant{white-space:normal;width:min(880px,100%);max-width:100%;font-size:14px}
.markdown{line-height:1.8}.markdown p{margin:8px 0}.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-size:16px;line-height:1.5;margin:22px 0 10px;color:var(--ink);letter-spacing:0}
.markdown>:first-child{margin-top:0}.markdown strong{font-weight:700}.markdown ul,.markdown ol{padding-left:24px;margin:10px 0}.markdown li{margin:5px 0}
.markdown code{background:var(--panel2);border-radius:4px;padding:2px 5px;font:12px ui-monospace,monospace}
.markdown pre{background:var(--panel2);border-radius:10px;padding:14px;white-space:pre-wrap;overflow-wrap:anywhere}.markdown pre code{padding:0}
.markdown-table{max-width:100%;overflow-x:auto;margin:14px 0;border:1px solid var(--line);border-radius:10px}.markdown table{font-size:12px;table-layout:fixed}
.markdown td,.markdown th{white-space:normal;overflow-wrap:anywhere;text-align:left;vertical-align:top;padding:10px 12px}.markdown th{background:var(--panel2);font-weight:650;color:var(--ink)}
.markdown a{color:var(--cyn);text-decoration:underline}.markdown blockquote{padding:10px 15px;border-left:3px solid var(--vio);background:var(--bg);margin:10px 0}.markdown hr{border:0;border-top:1px solid var(--line);margin:16px 0}
.ai-compose{display:grid;grid-template-columns:1fr auto;gap:10px;padding:16px;border-top:1px solid var(--line);background:white}.ai-compose textarea{min-height:56px;max-height:140px;padding:12px;border:1px solid var(--line2);border-radius:12px;background:var(--bg);resize:vertical;color:var(--ink)}
.ai-send{border:0;border-radius:12px;background:var(--gradient-brand);color:white;padding:0 24px;font-weight:650}
.ai-proposal{background:#fff6e5;border:1px solid #e8d4ac;align-self:flex-start}.ai-proposal b{display:block;color:var(--amb);margin-bottom:6px}.ai-proposal .actions{display:flex;gap:9px;margin-top:10px}.ai-proposal button{padding:6px 10px;border:1px solid var(--line2);border-radius:7px;background:white}.ai-proposal button.confirm{color:var(--amb)}
.foot{display:flex;flex-wrap:wrap;gap:8px 20px;padding:8px 0;color:var(--mut);font-size:9px}.foot b{font-weight:500;color:var(--ink2);margin-left:5px}
@media(min-width:1500px){.stat4{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1350px){#app{padding-left:212px;padding-right:20px}.nav{width:188px}.brand{left:20px}.dashboard-shell{grid-template-columns:minmax(0,1fr)}.workbench{position:static;max-height:none}.wb-scroll{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:0 20px 20px}.panel[data-k="bot"],.panel[data-k="kline"]{min-height:440px}}
@media(max-width:900px){#app{padding:16px 16px 28px 178px}.nav{width:160px;padding-inline:10px}.brand{left:16px;font-size:17px}.brand small{font-size:7px}.capital{padding:10px 12px}.capital b{font-size:15px}.top{gap:8px}.top #connTag{display:none}.viewbar #viewDesc{flex-basis:100%;order:5}.viewbar b{font-size:24px}.grid{gap:14px}.ph{padding:16px 14px 8px}.pb{padding:8px 14px 16px}.c3,.c4,.c5,.c6,.c7,.c8{grid-column:span 6}.panel[data-k="bot"],.panel[data-k="kline"]{grid-column:span 12}body[data-view="overview"] .panel[data-k]{grid-column:span 6}body[data-view="overview"] .panel:is([data-k="bot"],[data-k="kline"],[data-k="graph"],[data-k="monte"],[data-k="pipeline"],[data-k="logs"],[data-k="ai"],[data-k="kernel"]){grid-column:span 12}.pipeline-body{grid-template-columns:repeat(3,1fr)}.kernel-grid,.need-list{grid-template-columns:1fr 1fr}}
@media(max-width:620px){
 #app{padding:14px 12px 28px 108px;gap:14px}.brand{position:fixed;left:10px;top:20px;width:86px;font-size:14px;line-height:1.15}.brand small{display:none}.top{gap:12px}.top #clock{font-size:16px}.top .sp,.top .btn{display:none}.capital{order:5;flex-basis:100%;justify-content:space-between}.capital .ck{font-size:10px}
 .nav{top:0;bottom:0;left:0;right:auto;width:96px;height:100vh;padding:82px 8px 18px;border:0;border-right:1px solid var(--line);flex-direction:column;gap:5px;overflow-y:auto;overflow-x:hidden;background:#fffffff5;backdrop-filter:blur(18px)}
 .nav::after{display:none}.nav button,.nav-link{flex:0 0 auto;width:100%;min-height:48px;padding:8px 7px;font-size:9px;line-height:1.25;letter-spacing:.2px}.nav button::before,.nav-link::before,.nav button::after,.nav-link::after{display:none}.strip .in{font-size:10px}.viewbar b{font-size:25px}
 .nav-label{display:block;min-width:0;overflow-wrap:anywhere}.nav-icon{width:17px;height:17px;flex-basis:17px}.nav button,.nav-link{gap:6px}
 .log-row{grid-template-columns:1fr auto auto;gap:5px;padding:10px 14px}.log-msg{grid-column:1/-1}
 .grid{gap:14px}.grid .panel,body[data-view="overview"] .panel[data-k]{grid-column:span 12}.panel{border-radius:16px}.panel[data-k="bot"],.panel[data-k="kline"]{min-height:420px}.pnl{font-size:38px}.stat4{grid-template-columns:1fr 1fr}.kwrap{min-height:250px}
 .wb-scroll{display:block;padding:0 16px 16px}.kernel-head,.kernel-grid,.need-list,.radar-list,.strategy-list,.smart-list,.research-list,.research-weights{grid-template-columns:1fr}.kernel-head{grid-template-columns:1fr 1fr}.kernel-stat{padding:12px}.kernel-stat b{font-size:18px}.research-hero{display:block}.research-audits{justify-content:flex-start;margin-top:14px}.research-card .radar-metrics{grid-template-columns:1fr 1fr}.research-actions{display:block}.research-actions span{display:block;margin-top:8px}
 .ai-shell{height:650px;max-height:80vh}.ai-banner{padding:12px}.ai-banner .sp{display:none}.ai-suggestions{padding:0 12px 8px}.ai-messages{padding:12px}.ai-msg,.ai-proposal{max-width:96%;padding:12px}.ai-compose{padding:10px}.ai-send{padding:0 16px}
}
/* Shared desktop shell: aligns the board with the stock terminal rail and
   prevents a narrower browser window from horizontally cropping navigation. */
@media(min-width:621px){html,body{max-width:100%;overflow-x:hidden}}
.system-console{background:#07111c;border-color:#17334a;color:#dcecff;box-shadow:0 22px 70px #06101f38,inset 0 0 80px #0b203455}.system-console .ph{color:#8ea7bd;border-color:#17334a}.system-shell{position:relative;padding:18px;background-image:linear-gradient(#18d9bf0b 1px,transparent 1px),linear-gradient(90deg,#18d9bf0b 1px,transparent 1px);background-size:28px 28px}.system-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.system-summary div{padding:14px;border:1px solid #18364d;background:#091827cc;border-radius:10px}.system-summary small{display:block;color:#6f8ba2;font-size:9px;letter-spacing:.14em}.system-summary b{display:block;color:#dffcff;font-size:20px;margin-top:5px}.fabric-stage{height:340px;margin:14px 0;border:1px solid #17334a;border-radius:12px;background:radial-gradient(circle at 50% 50%,#102b3d 0,#081420 56%,#050c14 100%);overflow:hidden}.fabric-stage canvas{width:100%;height:100%}.unit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.unit-card{padding:13px;border:1px solid #18364d;border-radius:10px;background:#091827e8}.unit-head{display:flex;align-items:center;gap:8px}.unit-head i{width:7px;height:7px;border-radius:50%;background:#8190a8;box-shadow:0 0 9px #8190a8}.unit-card.online .unit-head i,.unit-card.ready .unit-head i{background:#20e4bd;box-shadow:0 0 14px #20e4bd}.unit-card.stale .unit-head i,.unit-card.error .unit-head i{background:#ff647c;box-shadow:0 0 14px #ff647c}.unit-head b{font-size:12px}.unit-head span{margin-left:auto;color:#6f8ba2;font:9px ui-monospace,monospace}.unit-card p{color:#7894aa;font-size:10px;margin:7px 0 12px}.unit-meta{display:flex;justify-content:space-between;gap:8px;color:#5f788d;font-size:9px}.unit-meta b{display:block;color:#a9c2d7;margin-top:3px}.system-guard{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:14px;padding:12px;border:1px solid #17334a;border-radius:10px;color:#7894aa;font-size:10px}.system-guard b{color:#20e4bd;margin-right:6px}.system-guard span{padding:5px 8px;background:#0d2031;border-radius:5px}.system-empty{color:#7894aa;padding:18px}
@media(max-width:900px){.unit-grid{grid-template-columns:1fr 1fr}.fabric-stage{height:300px}}
@media(max-width:620px){.system-summary,.unit-grid{grid-template-columns:1fr 1fr}.fabric-stage{height:260px}.system-shell{padding:12px}}
.unit-card{position:relative;overflow:hidden}.unit-card::after{content:"";position:absolute;inset:0;transform:translateX(-120%);background:linear-gradient(100deg,transparent,#20e4bd12,transparent);animation:unitSweep 4.8s linear infinite}.unit-card.online .unit-head i,.unit-card.ready .unit-head i{animation:unitPulse 1.8s ease-in-out infinite}@keyframes unitPulse{50%{transform:scale(1.6);opacity:.55}}@keyframes unitSweep{to{transform:translateX(120%)}}
.unit-card{display:block;width:100%;min-height:0;text-align:left;color:inherit;font:inherit;cursor:pointer}.unit-card:hover,.unit-card.selected{border-color:#20e4bd88;background:#0c2130}.unit-card.selected{box-shadow:inset 0 0 24px #20e4bd0d}.system-lower{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;margin-top:10px}.system-inspector,.system-events{min-height:230px;padding:16px;border:1px solid #18364d;border-radius:10px;background:#081622e8}.sys-eyebrow{color:#20e4bd;font:9px ui-monospace,monospace;letter-spacing:.14em}.system-lower h3{margin:5px 0 8px;color:#dffcff;font-size:16px}.system-lower p{color:#7894aa;font-size:11px;line-height:1.7}.inspector-title{display:flex;align-items:center;gap:8px}.inspector-title h3{margin-right:auto}.inspector-title>i,.system-event>i{width:7px;height:7px;border-radius:50%;background:#8190a8}.inspector-title>i.online,.inspector-title>i.ready,.system-event>i.online,.system-event>i.ready{background:#20e4bd;box-shadow:0 0 10px #20e4bd}.inspector-title>i.error,.inspector-title>i.stale,.system-event>i.error,.system-event>i.stale{background:#ff647c}.inspector-title>span{color:#7894aa;font:9px ui-monospace,monospace}.inspector-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:14px}.inspector-kpis div{padding:9px;background:#0d2031;border-radius:7px;color:#5f788d;font-size:9px}.inspector-kpis b{display:block;color:#afc8dc;margin-top:5px;overflow-wrap:anywhere}.route-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.route-list span{padding:5px 7px;border:1px solid #18364d;border-radius:5px;color:#7894aa;font-size:9px}.system-events-head{display:flex;align-items:center}.system-events-head>div{margin-right:auto}.system-event-list{max-height:168px;overflow:auto;margin-top:10px}.system-event{display:grid;grid-template-columns:58px 8px 80px 1fr;align-items:center;gap:8px;padding:9px 0;border-top:1px solid #142b3e;font-size:9px}.system-event time,.system-event span{color:#607b91}.system-event b{color:#afc8dc}
@media(max-width:900px){.system-lower{grid-template-columns:1fr}}
body[data-view="system"]{background:#030912;color:#dcecff}body[data-view="system"]::before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 55% 35%,#123a4f55,transparent 38%),linear-gradient(#0b203322 1px,transparent 1px),linear-gradient(90deg,#0b203322 1px,transparent 1px);background-size:auto,48px 48px,48px 48px}body[data-view="system"] #app{position:relative}body[data-view="system"] .top{background:#06101bea;border-color:#143047;box-shadow:0 12px 40px #0008}body[data-view="system"] .brand,body[data-view="system"] #clock{color:#e8f8ff}body[data-view="system"] .capital{background:#091a29;border-color:#173a52}body[data-view="system"] .viewbar{padding:28px 4px 18px;border-color:#143047}body[data-view="system"] .viewbar b{color:#f0fbff;font-size:36px;letter-spacing:-1px}body[data-view="system"] .viewbar #viewDesc{color:#63839a}body[data-view="system"] .viewbar #viewCount,body[data-view="system"] .viewbar .fresh{color:#20e4bd}body[data-view="system"] .strip{opacity:.45}body[data-view="system"] .foot{color:#547087}body[data-view="system"] .nav{background:#050d17f2;border-color:#143047;box-shadow:16px 0 45px #0007}body[data-view="system"] .nav button{color:#69869d}body[data-view="system"] .nav button.on{color:#dffcff;background:linear-gradient(135deg,#0b635b,#432a8c);box-shadow:0 10px 28px #462a8c55,0 0 24px #20e4bd22}body[data-view="system"] .system-console{border:1px solid #1a4059;background:linear-gradient(145deg,#071522f5,#040b13f8);box-shadow:0 30px 100px #000b,0 0 0 1px #20e4bd0b inset;border-radius:18px}body[data-view="system"] .system-console>.ph{padding:18px 22px;color:#6e90a8;letter-spacing:.12em}body[data-view="system"] .system-shell{padding:22px;background-size:40px 40px}body[data-view="system"] .system-summary{gap:12px}body[data-view="system"] .system-summary div{padding:18px 20px;background:linear-gradient(145deg,#0a1c2b,#07131f);border-color:#183c54;border-radius:12px}body[data-view="system"] .system-summary small{color:#527087}body[data-view="system"] .system-summary b{font-size:27px;color:#e8fbff}body[data-view="system"] .fabric-stage{height:430px;margin:16px 0;background:radial-gradient(circle at 50% 50%,#103148 0,#071724 45%,#030a12 100%);border-color:#1a4059;box-shadow:inset 0 0 80px #0008,0 0 36px #20e4bd0a}body[data-view="system"] .unit-grid{grid-template-columns:repeat(9,minmax(0,1fr));gap:7px}body[data-view="system"] .unit-card{padding:10px 8px;background:#071622;border-color:#14364c;border-radius:9px}body[data-view="system"] .unit-head b{font-size:10px;white-space:nowrap}body[data-view="system"] .unit-head span{display:none}body[data-view="system"] .unit-card p{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:6px 0 9px}body[data-view="system"] .unit-meta{display:block}body[data-view="system"] .unit-meta span{display:block;margin-top:4px}body[data-view="system"] .unit-meta span:last-child{display:none}body[data-view="system"] .system-lower{grid-template-columns:.9fr 1.1fr;gap:12px;margin-top:12px}body[data-view="system"] .system-inspector,body[data-view="system"] .system-events{background:linear-gradient(145deg,#081a28,#06111c);border-color:#173a52;border-radius:12px}body[data-view="system"] .system-guard{border-color:#173a52;background:#071621}body[data-view="system"] .system-guard span{background:#0b2131;color:#6f91a8}@media(max-width:1350px){body[data-view="system"] .unit-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:620px){body[data-view="system"] .viewbar b{font-size:27px}body[data-view="system"] .fabric-stage{height:340px}body[data-view="system"] .unit-grid{grid-template-columns:1fr 1fr}body[data-view="system"] .system-lower{grid-template-columns:1fr}}
body[data-view="system"] .dashboard-shell{display:block}body[data-view="system"] .workbench,body[data-view="system"] .wb-mobile-toggle{display:none!important}body[data-view="system"] .grid{width:100%;max-width:none}
body[data-view="system"] .fabric-stage{background:linear-gradient(180deg,#07131e,#050e17);border-radius:10px}
body[data-view="system"] .fabric-stage{position:relative}body[data-view="system"] .fabric-stage::after{content:"LIVE SYSTEM TOPOLOGY";position:absolute;right:14px;bottom:10px;color:#2c536a;font:8px ui-monospace,monospace;letter-spacing:.16em;pointer-events:none}
@media(max-width:900px){body[data-view="system"] .system-summary{grid-template-columns:1fr 1fr}body[data-view="system"] .fabric-stage{height:620px}}
body[data-view="system"]{--hud:#24e6c5;--hud2:#8c63ff;--hudline:#1b4960;background:#02060d}body[data-view="system"] .system-console{position:relative;overflow:hidden;clip-path:polygon(0 0,calc(100% - 22px) 0,100% 22px,100% 100%,22px 100%,0 calc(100% - 22px))}body[data-view="system"] .system-console::before{content:"";position:absolute;z-index:4;left:-30%;top:-2px;width:30%;height:2px;background:linear-gradient(90deg,transparent,#72ffe8,transparent);box-shadow:0 0 18px #24e6c5;animation:hudRail 5s linear infinite;pointer-events:none}body[data-view="system"] .system-console>.ph::before{content:"QD // CONTROL PLANE 09";color:#24e6c5;margin-right:12px;font:8px ui-monospace,monospace;letter-spacing:.15em}body[data-view="system"] .system-summary div{position:relative;overflow:hidden;clip-path:polygon(0 0,calc(100% - 11px) 0,100% 11px,100% 100%,0 100%)}body[data-view="system"] .system-summary div::before{content:"";position:absolute;left:0;top:0;width:28px;height:2px;background:var(--hud);box-shadow:0 0 12px var(--hud)}body[data-view="system"] .system-summary div::after{content:"";position:absolute;right:8px;top:8px;width:18px;height:18px;border-top:1px solid #28546c;border-right:1px solid #28546c}body[data-view="system"] .fabric-stage{clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px));box-shadow:inset 0 0 100px #000,inset 0 0 35px #20e4bd10,0 0 40px #20e4bd0c}body[data-view="system"] .fabric-stage::before{content:"";position:absolute;z-index:2;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 49.8%,#21e7c514 50%,transparent 50.2%),linear-gradient(transparent 49.8%,#21e7c514 50%,transparent 50.2%);animation:radarBreath 3s ease-in-out infinite}body[data-view="system"] .unit-card{clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,8px 100%,0 calc(100% - 8px));transition:border-color .25s,background .25s,transform .25s}body[data-view="system"] .unit-card:hover{transform:translateY(-2px);box-shadow:0 8px 26px #0008,inset 0 0 18px #24e6c510}body[data-view="system"] .system-inspector,body[data-view="system"] .system-events{clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%)}body[data-view="system"] .system-guard{border-left:2px solid var(--hud);box-shadow:inset 14px 0 24px #24e6c507}.system-ambient{position:absolute;z-index:0;inset:0;overflow:hidden;pointer-events:none}.system-ambient i{position:absolute;width:2px;height:2px;background:#7affec;border-radius:50%;box-shadow:0 0 8px #24e6c5;animation:dataFall linear infinite}.system-ambient i:nth-child(1){left:8%;animation-duration:5s}.system-ambient i:nth-child(2){left:27%;animation-duration:7s;animation-delay:-3s}.system-ambient i:nth-child(3){left:43%;animation-duration:4.5s;animation-delay:-1s}.system-ambient i:nth-child(4){left:61%;animation-duration:8s;animation-delay:-6s}.system-ambient i:nth-child(5){left:78%;animation-duration:5.5s;animation-delay:-2s}.system-ambient i:nth-child(6){left:94%;animation-duration:7.5s;animation-delay:-4s}.system-shell,.system-console>.ph{position:relative;z-index:1}@keyframes hudRail{to{left:100%}}@keyframes radarBreath{50%{opacity:.35}}@keyframes dataFall{0%{top:-2%;opacity:0}10%{opacity:.8}80%{opacity:.2}100%{top:102%;opacity:0}}

/* Agent Lab — restrained research-console treatment inspired by scientific instruments. */
body[data-view="system"]{--lab-ink:#172135;--lab-muted:#7b8597;--lab-line:#dfe3e9;--lab-paper:#f4f5f2;--lab-card:#fff;--lab-purple:#7457e8;--lab-green:#168b68;background:#e9ebe8;color:var(--lab-ink)}
body[data-view="system"]::before{background:linear-gradient(90deg,#d8ddd8 1px,transparent 1px),linear-gradient(#d8ddd8 1px,transparent 1px);background-size:32px 32px;opacity:.28}
body[data-view="system"] .top{background:#f7f8f5f2;border-color:#d9ddd9;box-shadow:0 8px 24px #1721350b}
body[data-view="system"] .brand,body[data-view="system"] #clock{color:var(--lab-ink)}
body[data-view="system"] .capital{background:#fff;border-color:#d9ddd9;color:var(--lab-ink)}
body[data-view="system"] .nav{background:#f7f8f5f5;border-color:#d9ddd9;box-shadow:12px 0 32px #1721350a}
body[data-view="system"] .nav button{color:#798294}body[data-view="system"] .nav button.on{color:#172135;background:#dfff58;box-shadow:none}
body[data-view="system"] .viewbar{border-color:#d8ddd9}body[data-view="system"] .viewbar b{color:#172135;font-size:32px}body[data-view="system"] .viewbar #viewDesc{color:#7b8597}body[data-view="system"] .viewbar #viewCount,body[data-view="system"] .viewbar .fresh{color:#168b68}
body[data-view="system"] .system-console{background:var(--lab-paper);border:1px solid #d2d7d3;border-radius:4px;clip-path:none;box-shadow:0 24px 70px #17213514;overflow:hidden}
body[data-view="system"] .system-console::before{height:3px;background:#dfff58;box-shadow:none;animation:hudRail 7s linear infinite}
body[data-view="system"] .system-console>.ph{padding:14px 18px;background:#fff;border-color:#dfe3df;color:#172135;font-weight:800;letter-spacing:.04em}
body[data-view="system"] .system-console>.ph::before{content:"QD / LAB-09";color:#6e7787;background:#eff1ee;border:1px solid #dce0dc;padding:4px 7px;margin-right:10px;border-radius:3px}
body[data-view="system"] .system-console .chip{background:#eef0ed;border-color:#daddd9;color:#596274}body[data-view="system"] .system-console .chip.g{background:#dfff58;border-color:#cbe94d;color:#263200}
body[data-view="system"] .system-shell{padding:12px;background:none}
body[data-view="system"] .system-summary{gap:8px}
body[data-view="system"] .system-summary div{min-height:78px;padding:13px 15px;background:#fff;border:1px solid #dfe3df;border-radius:4px;clip-path:none;box-shadow:none}
body[data-view="system"] .system-summary div::before{width:3px;height:100%;background:#cfd5d0;box-shadow:none}body[data-view="system"] .system-summary div:first-child::before{background:#dfff58}body[data-view="system"] .system-summary div:nth-child(3)::before{background:#ef755f}body[data-view="system"] .system-summary div::after{display:none}
body[data-view="system"] .system-summary small{color:#8a93a1;font-size:8px}body[data-view="system"] .system-summary b{font-size:25px;color:#172135}
.system-conclusion{display:flex;align-items:center;gap:12px;margin-top:8px;padding:11px 14px;background:#fff;border:1px solid #dfe3df;border-left:3px solid #7457e8;color:#172135}.system-conclusion small{flex:none;color:#8a93a1;font:700 8px ui-monospace,monospace;letter-spacing:.12em}.system-conclusion b{font-size:11px;line-height:1.5}
.lab-section-head{display:flex;align-items:center;gap:9px;height:30px;margin-top:8px;color:#7d8695;font:700 8px ui-monospace,monospace;letter-spacing:.1em}.lab-section-head b{color:#172135}.lab-section-head i{height:1px;flex:1;background:#d7dcd8}.lab-section-head em{font-style:normal;color:#9aa1ac;letter-spacing:0}
body[data-view="system"] .fabric-stage{position:relative;height:390px;margin:0;background:#fff;border:1px solid #dfe3df;border-radius:4px;clip-path:none;box-shadow:inset 0 0 0 1px #fff}
body[data-view="system"] .fabric-stage::before{z-index:0;background:radial-gradient(circle at 50% 50%,#7457e80b,transparent 36%),linear-gradient(90deg,#edf0ed 1px,transparent 1px),linear-gradient(#edf0ed 1px,transparent 1px);background-size:auto,24px 24px,24px 24px;animation:none}
body[data-view="system"] .fabric-stage canvas{position:relative;z-index:1}
body[data-view="system"] .fabric-stage::after{z-index:2}
body[data-view="system"] .unit-grid{grid-template-columns:repeat(9,minmax(0,1fr));gap:5px}
body[data-view="system"] .unit-card{position:relative;min-height:142px;padding:9px 8px;background:#fff;border:1px solid #dfe3df;border-radius:4px;clip-path:none;color:#172135;box-shadow:none;overflow:hidden}
body[data-view="system"] .unit-card::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:#cfd5d0}body[data-view="system"] .unit-card.online::after,body[data-view="system"] .unit-card.ready::after{background:#36a17f}body[data-view="system"] .unit-card.selected{background:#f2efff;border-color:#7457e8;box-shadow:0 0 0 1px #7457e8}body[data-view="system"] .unit-card.selected::after{background:#7457e8}
body[data-view="system"] .unit-card:hover{transform:translateY(-2px);box-shadow:0 7px 18px #17213512}
body[data-view="system"] .unit-head b{color:#172135;font-size:9px}body[data-view="system"] .unit-head i{width:6px;height:6px}body[data-view="system"] .unit-card p{height:26px;margin:7px 0;color:#697486;line-height:1.45;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}body[data-view="system"] .unit-progress{height:3px;margin:7px 0;background:#ecefeb;overflow:hidden}body[data-view="system"] .unit-progress i{display:block;height:100%;background:#36a17f;transition:width .6s ease}body[data-view="system"] .phase-blocked .unit-progress i,body[data-view="system"] .phase-error .unit-progress i{background:#ef755f}body[data-view="system"] .phase-waiting .unit-progress i{background:#b8c0ba}body[data-view="system"] .unit-metrics{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:6px 0}.unit-metrics span{color:#9aa1ac;font-size:7px}.unit-metrics b{display:block;color:#303b4e;font-size:8px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body[data-view="system"] .unit-meta{color:#9aa1ac}body[data-view="system"] .unit-meta b{color:#525d70}
body[data-view="system"] .system-lower{gap:8px;margin-top:8px}body[data-view="system"] .system-inspector,body[data-view="system"] .system-events{background:#fff;border:1px solid #dfe3df;border-radius:4px;clip-path:none;color:#172135}body[data-view="system"] .sys-eyebrow{color:#8a93a1}body[data-view="system"] .system-inspector p,body[data-view="system"] .system-event span{color:#737e90}
body[data-view="system"] .system-event{grid-template-columns:52px 8px 30px 72px 1fr}body[data-view="system"] .system-event em{font-style:normal;color:#7457e8;font-size:8px}body[data-view="system"] .system-event-list{max-height:220px}
body[data-view="system"] .system-lower h3{color:#172135}
body[data-view="system"] .sys-eyebrow{color:#59677c;font-weight:800}
body[data-view="system"] .system-inspector p{color:#3f4d62}
body[data-view="system"] .system-event{border-color:#cbd2da}
body[data-view="system"] .system-event time{color:#536176}
body[data-view="system"] .system-event b{color:#29364a}
body[data-view="system"] .system-event span{color:#435168}
body[data-view="system"] .system-event em{color:#5b3fd1;font-weight:800}
body[data-view="system"] .unit-card p{color:#435168}
body[data-view="system"] .unit-metrics span{color:#657186}
body[data-view="system"] .unit-metrics b{color:#1d2a3f}
body[data-view="system"] .unit-meta{color:#657186}
body[data-view="system"] .unit-meta b{color:#27354a}
body[data-view="system"] .route-list span{color:#40536d;border-color:#9aadc0;background:#f8fafb}
body[data-view="system"] .system-guard{margin-top:8px;background:#fff;border:1px solid #dfe3df;border-left:3px solid #dfff58;border-radius:4px;color:#737e90;box-shadow:none}body[data-view="system"] .system-guard b{color:#172135}body[data-view="system"] .system-guard span{background:#f0f2ef;color:#687284}
body[data-view="system"] .system-ambient{display:none}
body[data-view="system"] .foot{color:#8b939f}
@media(max-width:1350px){body[data-view="system"] .unit-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:620px){body[data-view="system"] .system-summary{grid-template-columns:1fr 1fr}body[data-view="system"] .fabric-stage{height:330px}body[data-view="system"] .unit-grid{grid-template-columns:1fr 1fr}.lab-section-head em{display:none}}

/* ===== 手机一屏改造 (2026-09-19) =====
   原来 <=620px 时左侧固定导航占掉 108px, 375px 竖屏下正文只剩约 240px。
   这里把导航改成底部标签条(腾回全宽), 并把四个关键数字提到最上面。 */
.mkey{display:none}
.mkey .mk{display:flex;flex-direction:column;gap:3px;padding:11px 12px;border-radius:12px;background:var(--panel2)}
.mkey .mk small{font-size:10px;color:var(--mut)}
.mkey .mk b{font-size:17px;font-weight:750;line-height:1.15}
.mkey .mk b.up{color:var(--up)}
.mkey .mk b.down{color:var(--dn)}
.mkey .mk em{font-size:10px;font-style:normal;color:var(--mut);overflow-wrap:anywhere}
@media(max-width:620px){
  #app{padding:14px 12px calc(86px + env(safe-area-inset-bottom))}
  .brand{position:static;left:auto;top:auto;width:auto;font-size:17px;line-height:1.15}
  .brand small{display:block;font-size:7px;margin-top:3px}
  .nav{top:auto;bottom:0;left:0;right:0;width:auto;height:auto;padding:6px 6px calc(6px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--line);flex-direction:row;gap:4px;overflow:visible;background:#fffffff2;backdrop-filter:blur(18px)}
  .nav::after{display:none}
  .nav button,.nav-link{flex:1 1 0;width:auto;min-width:0;min-height:52px;padding:7px 2px;flex-direction:column;gap:4px;font-size:8px;letter-spacing:0;text-align:center;justify-content:center}
  .nav-label{display:block;min-width:0;overflow-wrap:anywhere;line-height:1.15}
  .nav-icon{width:19px;height:19px;flex-basis:19px}
  body[data-view="overview"] .mkey{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:2px 0 2px}
  body[data-view="system"] .nav{background:#050d17f2;border-top:1px solid #143047}
}

/* ===== 一键回到顶部 (2026-09-19) =====
   只在窄屏出现(桌面有常驻左侧导航, 不需要); 滚过 400px 才冒出来。 */
.totop{display:none;position:fixed;right:16px;z-index:40;align-items:center;justify-content:center;width:46px;height:46px;border:1px solid var(--line2);border-radius:50%;background:#fffffff2;color:var(--ink2);box-shadow:0 6px 22px #263b6026;backdrop-filter:blur(12px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility 0s linear .2s}
.totop svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.totop.on{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .2s ease,visibility 0s linear 0s}
/* 作战室入口是 <a> 不是 <button>（能中键开新标签），SYSTEM 视图的深色导航要单独给它上色 */
body[data-view="system"] .nav-link{color:#69869d}body[data-view="system"] .nav-link:hover{color:#dffcff;background:#0b1a28}
@media(max-width:620px){.totop{display:flex;bottom:calc(84px + env(safe-area-inset-bottom))}}
@media(min-width:621px) and (max-width:900px){.totop{display:flex;bottom:24px}}
@media(prefers-reduced-motion:reduce){.totop{backdrop-filter:none}}

/* ===== 动作动态化 (2026-09-23) =====
   要解决的问题: 平台明明在自动干活, 屏上却像一堆静止数字, 看不出"一连串动作"。
   三处补动效, 全部纯 CSS, 零外部依赖:
     ① 执行周期 6 步依次流过白光 + 当前步进度条循环推进 + 刚完成的步骤亮一下
     ② 最近执行的新动作从右侧滑入、底色闪一下再落定
     ③ 正在工作里每台机器人一条按真实轮询周期循环的节拍条
   注意: 每 2 秒重建 innerHTML 会打断 CSS 动画, 所以配套改了 JS 只更新变化的节点。 */

/* ① 执行周期 · EXECUTION CYCLE */
.pipe-step{transition:background .3s,color .3s,box-shadow .3s}
.pipe-step::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg,transparent 18%,rgba(255,255,255,.62) 50%,transparent 82%);
  transform:translateX(-135%);animation:pipeFlow 5.4s linear infinite;
  animation-delay:calc(var(--i,0) * .42s)}
@keyframes pipeFlow{0%{transform:translateX(-135%)}34%,100%{transform:translateX(135%)}}
.pipe-step.active{box-shadow:inset 0 0 0 1px rgba(121,97,190,.45),0 0 14px rgba(121,97,190,.18);
  animation:pipeBreath 2.4s ease-in-out infinite}
@keyframes pipeBreath{50%{box-shadow:inset 0 0 0 1px rgba(121,97,190,.9),0 0 22px rgba(121,97,190,.36)}}
.pipe-step.active::after{width:0;background:linear-gradient(90deg,var(--vio),#a58cff);
  animation:pipeFill 2.4s cubic-bezier(.4,0,.2,1) infinite}
@keyframes pipeFill{0%{width:0;opacity:1}72%{width:100%;opacity:1}100%{width:100%;opacity:.2}}
.pipe-step.done{animation:pipeSettle .9s ease-out both}
@keyframes pipeSettle{from{box-shadow:inset 0 0 0 1px rgba(19,131,105,.85),0 0 16px rgba(19,131,105,.3)}to{box-shadow:none}}

/* ② 最近执行 */
.wb-event{position:relative;border-radius:6px}
.wb-event.b{background:linear-gradient(90deg,rgba(62,121,204,.13),transparent 46%)}
.wb-event.s{background:linear-gradient(90deg,rgba(19,131,105,.15),transparent 46%)}
.wb-event.is-new{animation:evIn .9s cubic-bezier(.22,.9,.28,1) both,evFlash 2.4s ease-out .15s both}
@keyframes evIn{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
@keyframes evFlash{0%{background-color:rgba(121,97,190,.3)}100%{background-color:transparent}}

/* ③ 正在工作 · 节拍条 */
.wb-heart{margin-top:10px;height:3px;border-radius:2px;background:var(--bg);overflow:hidden}
.wb-heart i{display:block;height:100%;width:0;border-radius:2px;background:var(--up);
  animation:heartRun 3s linear infinite}
.wb-heart.arb i{background:var(--vio)}
@keyframes heartRun{0%{width:0;opacity:.4}88%{width:100%;opacity:1}100%{width:100%;opacity:.15}}

/* ===== 第二批: 让"活着"这件事全屏都看得见 (2026-09-23) =====
   第一批只让"执行周期/最近执行/正在工作"三块动起来, 屏上别处还是死的。
   这一批补四条"在线信号", 全部纯 CSS、零外部依赖:
     ④ 顶部状态条: 一道极淡的光缓慢扫过, 作为整屏的底噪
     ⑤ 实时徽章的绿点改成呼吸灯 (tag.live 与所有 .chip.g)
     ⑥ 成交带最新一笔持续呼吸 —— 数据在流
     ⑦ 运行日志最新一行左侧流光 —— 刚写进来的那条
     ⑧ 执行周期当前步加流动斜纹 —— 比纯色更像"正在跑"
   最后统一尊重系统的"减少动态效果"设置。 */

/* ④ 顶部状态条 · 缓慢扫过的光 */
.top{position:relative;overflow:hidden}
.top::after{content:"";position:absolute;top:0;bottom:0;left:-220px;width:220px;
  pointer-events:none;z-index:0;
  background:linear-gradient(90deg,transparent,rgba(121,97,190,.13),transparent);
  animation:topSweep 9s linear infinite}
@keyframes topSweep{0%{left:-220px}100%{left:100%}}

/* ⑤ 在线徽章呼吸灯 */
.tag.live::before{animation:dotPulse 1.9s ease-in-out infinite}
.chip.g{position:relative;padding-left:17px}
.chip.g::before{content:"";position:absolute;left:6px;top:50%;margin-top:-2.5px;
  width:5px;height:5px;border-radius:50%;background:currentColor;
  animation:dotPulse 1.9s ease-in-out infinite}
@keyframes dotPulse{
  0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(19,131,105,.5)}
  50%{opacity:.45;box-shadow:0 0 0 5px rgba(19,131,105,0)}}

/* ⑥ 成交带最新一笔 */
#tape tr:nth-child(2){animation:tapeFresh 2.3s ease-in-out infinite}
@keyframes tapeFresh{
  0%,100%{background:rgba(121,97,190,.05)}
  50%{background:rgba(121,97,190,.17)}}

/* ⑦ 运行日志最新一行 */
.log-row:first-child{position:relative;animation:logFresh 2.6s ease-in-out infinite}
.log-row:first-child::before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;
  background:linear-gradient(180deg,var(--up),transparent);
  animation:logBar 2.6s ease-in-out infinite}
@keyframes logFresh{
  0%,100%{background:rgba(19,131,105,.04)}
  50%{background:rgba(19,131,105,.12)}}
@keyframes logBar{0%,100%{opacity:.3}50%{opacity:1}}

/* ⑧ 执行周期当前步 · 流动斜纹 */
.pipe-step.active{
  background-image:repeating-linear-gradient(135deg,rgba(121,97,190,.14) 0 6px,transparent 6px 12px);
  background-size:200% 100%;
  animation:pipeStripe 1.1s linear infinite,pipeBreath 2.4s ease-in-out infinite}
@keyframes pipeStripe{to{background-position:-24px 0}}

/* 尊重系统设置: 用户开了"减少动态效果"就全部停掉 */
@media(prefers-reduced-motion:reduce){
  .pipe-step::before,.pipe-step.active,.pipe-step.done,.pipe-step.active::after,
  .wb-event.is-new,.wb-heart i,.top::after,.tag.live::before,.chip.g::before,
  #tape tr:nth-child(2),.log-row:first-child,.log-row:first-child::before{
    animation:none!important}
}

/* ===== 紧急修复: "减少动态效果"把全屏动画一刀切了 (2026-09-23) =====
   原版 board.css 第 174 行有:
     @media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;...}}
   只要系统或浏览器处于"减少动效"模式, 这条把屏上所有动画(含原来就有的跑马灯)全干掉,
   于是不管新加多少动效都看不见。这台看板的用处就是"让人看见它在干活",
   所以这里把新加的动效显式抢回来: 选择器特异性高于 *, 同样带 !important, 后者生效。
   只影响下面列出来的这些, 页面其它地方仍然尊重"减少动效"设置。 */

@media(prefers-reduced-motion:reduce){
  .top::after{animation-name:topSweep!important;animation-duration:9s!important;
    animation-timing-function:linear!important;animation-iteration-count:infinite!important}

  .tag.live::before,.chip.g::before{animation-name:dotPulse!important;
    animation-duration:1.9s!important;animation-timing-function:ease-in-out!important;
    animation-iteration-count:infinite!important}

  #tape tr:nth-child(2){animation-name:tapeFresh!important;animation-duration:2.3s!important;
    animation-timing-function:ease-in-out!important;animation-iteration-count:infinite!important}

  .log-row:first-child{animation-name:logFresh!important;animation-duration:2.6s!important;
    animation-timing-function:ease-in-out!important;animation-iteration-count:infinite!important}
  .log-row:first-child::before{animation-name:logBar!important;animation-duration:2.6s!important;
    animation-timing-function:ease-in-out!important;animation-iteration-count:infinite!important}

  /* 这里不能写 animation 简写: 简写会把 animation-delay 重置成 0, 六步的波浪就没了 */
  .pipe-step::before{animation-name:pipeFlow!important;animation-duration:5.4s!important;
    animation-timing-function:linear!important;animation-iteration-count:infinite!important;
    animation-delay:calc(var(--i,0) * .42s)!important}

  .pipe-step.active{animation-name:pipeStripe,pipeBreath!important;
    animation-duration:1.1s,2.4s!important;animation-timing-function:linear,ease-in-out!important;
    animation-iteration-count:infinite!important}
  .pipe-step.active::after{animation-name:pipeFill!important;animation-duration:2.4s!important;
    animation-timing-function:cubic-bezier(.4,0,.2,1)!important;animation-iteration-count:infinite!important}
  .pipe-step.done{animation-name:pipeSettle!important;animation-duration:.9s!important;
    animation-timing-function:ease-out!important;animation-fill-mode:both!important}

  .wb-heart i{animation-name:heartRun!important;animation-duration:3s!important;
    animation-timing-function:linear!important;animation-iteration-count:infinite!important}

  .wb-event.is-new{animation-name:evIn,evFlash!important;animation-duration:.9s,2.4s!important;
    animation-timing-function:cubic-bezier(.22,.9,.28,1),ease-out!important;
    animation-delay:0s,.15s!important;animation-fill-mode:both!important;
    animation-iteration-count:1!important}
}

/* ===== "搞点帅的" (2026-09-23 晚) =====
   ① 首屏三个核心面板: 一道光沿着边框跑一圈 (border beam)
   ② 顶部"真实权益"胶囊: 一道高光扫过
   ③ 品牌字 DESK: 金属流光
   ④ 页面底噪: 极淡网格缓慢漂移 + 一道柔光缓慢下扫
   ⑤ 面板入场: 依次浮现, 不再是硬邦邦整屏砸出来
   全部纯 CSS, 零外部依赖, 不动任何逻辑代码。 */

/* ① 边框流光 —— 只给首屏三个核心面板, 二十个全给会拖慢这台机器 */
@property --beam{syntax:'<angle>';initial-value:0deg;inherits:false}
.panel[data-k="bot"]::before,.panel[data-k="edge"]::before,.panel[data-k="kline"]::before{
  content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;
  pointer-events:none;z-index:6;
  background:conic-gradient(from var(--beam),
    transparent 0 5%,#7961be 10%,#20e4bd 15%,transparent 21%,transparent 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  animation:beamRun 5s linear infinite}
@keyframes beamRun{to{--beam:360deg}}

/* ② 权益胶囊高光扫过 */
.capital{position:relative;overflow:hidden}
.capital::after{content:"";position:absolute;top:0;bottom:0;left:-70px;width:70px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent);
  animation:capShine 3.4s ease-in-out infinite}
@keyframes capShine{0%{left:-70px}50%,100%{left:130%}}

/* ③ 品牌字流光 —— 用 @supports 包住: 万一浏览器不支持文字裁剪,
   至少字还是看得见的, 不会变透明消失 */
@supports (background-clip:text) or (-webkit-background-clip:text){
  .brand b{
    background:linear-gradient(90deg,#7366c5 0%,#20e4bd 45%,#7366c5 90%);
    background-size:220% 100%;
    -webkit-background-clip:text;background-clip:text;color:transparent;
    animation:brandShine 4.5s linear infinite}
  @keyframes brandShine{from{background-position:220% 0}to{background-position:-120% 0}}
}

/* ④ 页面底噪: 网格 + 缓慢下扫的柔光 */
#app::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.75;
  background-image:linear-gradient(rgba(121,97,190,.045) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(121,97,190,.045) 1px,transparent 1px);
  background-size:100% 46px,46px 100%;
  animation:gridDrift 14s linear infinite}
@keyframes gridDrift{to{background-position:0 46px,46px 0}}
#app::after{content:"";position:fixed;left:0;right:0;height:220px;top:-240px;
  pointer-events:none;z-index:0;
  background:linear-gradient(180deg,transparent,rgba(121,97,190,.05),transparent);
  animation:pageSweep 13s linear infinite}
@keyframes pageSweep{to{top:110%}}

/* ⑤ 面板依次浮现 */
.grid>.panel{animation:panelIn .55s cubic-bezier(.2,.85,.25,1) both}
.grid>.panel:nth-child(1){animation-delay:.03s}
.grid>.panel:nth-child(2){animation-delay:.07s}
.grid>.panel:nth-child(3){animation-delay:.11s}
.grid>.panel:nth-child(4){animation-delay:.15s}
.grid>.panel:nth-child(5){animation-delay:.19s}
.grid>.panel:nth-child(6){animation-delay:.23s}
.grid>.panel:nth-child(7){animation-delay:.27s}
.grid>.panel:nth-child(8){animation-delay:.31s}
.grid>.panel:nth-child(n+9){animation-delay:.35s}
@keyframes panelIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ===== 数字上的"帅" (2026-09-23 深夜) =====
   JS 里 animateNumber() 每次数值真的变化时，都会给元素挂一个 `number-tick` class，
   还专门写了 `el.classList.remove(...); void el.offsetWidth; el.classList.add(...)`
   来强制重排、重启 CSS 动画 —— 钩子埋得非常完整。
   但 board.css 里 `number-tick` 这个 class **一次都没出现过**，等于从来没接过电。
   这一批把它接上，再补数字的字形和质感。 */

/* ① 数字跳动: 辉光闪一下 + 底色轻扫
   刻意不用 transform —— .num 大多是 inline 元素，transform 对 inline 是无效的，
   硬改 display:inline-block 又会动到布局。text-shadow / background 对 inline 天生有效。 */
.number-tick{animation:numTick .55s ease-out;border-radius:5px}
@keyframes numTick{
  0%{text-shadow:0 0 0 rgba(121,97,190,0);background-color:rgba(121,97,190,.20)}
  28%{text-shadow:0 0 15px rgba(121,97,190,.55)}
  100%{text-shadow:0 0 0 rgba(121,97,190,0);background-color:transparent}}

/* ② 大数字刷新时不左右抖: 补等宽字形
   .num 早就有 tabular-nums，这里补上没被覆盖到的大号数字 */
.capital b,.viewbar b,.mkey .mk b,.edge-value,#kpx,#botPnl{font-variant-numeric:tabular-nums}

/* ③ K线主价格: 渐变流光 + 荧光管微光
   用 @supports 兜底 —— 万一浏览器不支持文字裁剪，字不会变透明消失 */
@supports (background-clip:text) or (-webkit-background-clip:text){
  #kpx{
    background:linear-gradient(115deg,#2b2447 0%,#7961be 42%,#138369 78%,#2b2447 100%);
    background-size:220% 100%;
    -webkit-background-clip:text;background-clip:text;color:transparent;
    animation:numShine 6.5s linear infinite}
  @keyframes numShine{from{background-position:220% 0}to{background-position:-120% 0}}
}
#kpx{text-shadow:0 0 24px rgba(121,97,190,.16)}

/* ===== 布局收紧: 侧栏收成图标条 + 全局留白压缩 (2026-09-23 深夜) =====
   硕哥三条: ① 左边可以隐藏 ② 整体很大又很空 ③ 侧栏老毛病不跟随页面。
   一个方案全解: 侧栏平时收成 60px 图标条, 悬停才展开成浮层 —— 内容区立刻宽出 140px,
   那一大块"脱节的空白"也没了; 再把全局 gap / 内边距 / 卡片最小高度收紧, 空洞感消失。
   注意: 本段在文件最末, 同特异性的规则(包括前面各媒体查询里的)都会被这里覆盖。 */

/* --- ① 侧栏: 平时只留图标, 悬停展开 --- */
.nav{width:60px;padding:88px 8px 20px;align-items:center;transition:width .22s ease}
.nav:hover{width:204px;align-items:stretch;box-shadow:14px 0 34px rgba(23,33,53,.14)}
.nav::after{display:none}          /* 底部那行落款是空白的主要来源, 去掉 */
.nav button,.nav-link{width:44px;min-height:44px;justify-content:center;padding:12px 0;gap:0;overflow:hidden}
.nav:hover button,.nav:hover .nav-link{width:100%;justify-content:flex-start;padding:13px 12px;gap:12px}
.nav .nav-label{display:none}
.nav:hover .nav-label{display:inline}

/* 品牌字: 窄条时竖排成 QUANT / DESK 两行, 正好当个 logo 块;
   侧栏展开时用 :has 让它恢复一行大字 (Chrome 105+ 支持, 不支持就保持两行, 不影响用) */
.brand{left:0;top:20px;width:60px;padding:0 7px;box-sizing:border-box;
  font-size:13px;line-height:1.15;letter-spacing:0;overflow-wrap:anywhere;text-align:center}
.brand small{display:none}
.top:has(.nav:hover) .brand{left:26px;width:auto;font-size:19px;letter-spacing:-.8px;
  overflow-wrap:normal;text-align:left}
.top:has(.nav:hover) .brand small{display:block;font-size:9px;letter-spacing:1.5px;margin-top:5px}

/* --- ② 全局留白收紧 --- */
#app{padding:16px 20px 20px 84px;gap:14px}
.grid{gap:14px}
.panel{min-height:196px}
.ph{padding:14px 16px 10px}
.pb{padding:6px 16px 16px}

/* ===== 第二轮收紧: 打破"两堵墙", 把被拉高的空白画布压回去 (2026-09-23) =====
   体检发现: grid 默认 align-items:stretch, 同一行里矮的那张会被拉到跟最高的一样高。
   于是 [bot](内容实打实 815px) 把旁边的 [kline] 一起拉成 866px,
   而 K 线画布是被 flex:1 撑到 699px 的 —— 里面只有几条线, 大片空白, 这就是"又大又空"。
   处方: 行内不再互相拉齐 + 画布限高 + 收益图压矮, 内容有多少占多少。 */

/* --- ① 行内不拉齐: 每张卡片按自己内容的高度站, 不再互相撑成一堵墙 --- */
.grid{align-items:start}
body[data-view="overview"] .grid{align-items:start}

/* --- ② K 线画布限高: 280~460 浮动, 不再无限吃空间 --- */
.kwrap{flex:0 1 auto;min-height:280px;max-height:460px}
.panel[data-k="kline"] .kwrap{max-height:440px}

/* --- ③ 收益图压矮一点, 省出的空间留给别的卡 --- */
.income-chart{height:170px}

/* --- ④ 卡片内部留白再收一档 --- */
.eqwrap{margin-top:10px;padding-top:10px}
.stat4{margin:8px 0 12px;gap:12px}
.pb>.num{margin-bottom:2px}

/* --- ⑤ SYSTEM 大块在总览页也收一点, 别把页面拉到快 5000px --- */
body[data-view="overview"] .panel[data-k="system"] .fabric-stage{height:300px}
body[data-view="overview"] .panel[data-k="system"] .system-lower>section{min-height:200px}

/* ===== 第三轮: 侧栏改成"跟着页面一起滚" (2026-09-23, 硕哥选 A) =====
   原状: .nav 是 position:fixed —— 页面滚到哪它都钉在最左边不动, 像浮在页面外面;
   而顶栏 .top 是会正常滚走的, 两者不同步, 这就是"侧栏不跟随页面"的老毛病。
   改成 absolute: 它回到页面正常流程里, 页面往上滚它就跟着往上走, 左侧整个是一体的。

   三个必须一起处理的坑:
   ① .nav 的爹是 .top, .top 的爹是 #app(#app 有 84px 左内边距)。
     absolute 会相对 .top 定位 → 侧栏会跑进内容区(x=84)压住面板。
     而 .top 的 position:relative 是我为了顶栏扫光加的 —— 去掉它, .nav 就回到相对整张文档
     定位, left:0 正好是页面最左边, 跟原来 fixed 的观感完全一样。
   ② .top::after 是那道扫光, 原来靠 .top 当定位参照 + overflow:hidden 裁 -,
     .top 变 static 后它会撑满全屏变成一道竖光 → 给它固定 58px 高(=顶栏高度)补回来。
   ③ 品牌字 .brand 同为 fixed, 不一起改就会一个人钉在那儿陪滚。
   限定 min-width:621px —— ≤620px 那条移动端规则里侧栏是贴屏幕底部的横导航, 必须保留 fixed。 */

@media(min-width:621px){
  .top{position:static;overflow:visible}
  .top::after{top:0;bottom:auto;height:58px}
  .nav{position:absolute;top:0;bottom:auto;left:0;right:auto;height:auto;min-height:100vh}
  .brand{position:absolute}
}

/* ===== 移植 bencho 的 Tilt（2026-09-24，硕哥说"搬代码"）=====
   出处: bencho.dev 的 src/lab/Tilt.tsx，MIT 许可，零依赖（原版只要 React）。
   原版参数照抄: TILT=10 度（最大倾角）、SHADE=60（凹陷深度 0..100）、弹簧速度 50。
   只按看板卡片更大这一点改了尺寸: 透视 800px、按下深度 10px、圆角沿用面板自己的。

   原作者的三个设计要点，一并照搬（这几条是这个效果"像真的"的原因）:
   ① 弹簧挂在"位置"上，不是挂在"角度"上 —— 凹陷渐变、旋转、阴影读的是同一个数字，
      三件事不会互相打架。
   ② 卡片是被"按进去"(translateZ 往里)，不是抬起来 —— 所以阴影必须收紧，
      不能像常规 hover 那样放大，否则跟"压下去"的观感打架。
   ③ 阴影聚在指针那一侧（压得最深的地方），高光在它的镜像位置（翘起来的那一边）。

   配套 JS 在 board-ui.js 末尾（同一个 IIFE 风格，静止时不跑计时器）。 */

/* 入场动画 panelIn 的终帧是 transform:none，填充模式 both 会一直压住 JS 写的 transform，
   所以等它播完给面板解锁（.tilt-ready 由 JS 在 animationend 时加上）。 */
.grid>.panel.tilt-ready{animation:none}

/* 凹陷 + 对侧高光这一层。不吃鼠标事件，纯视觉。 */
.tilt-sheen{
  position:absolute; inset:0; z-index:1; opacity:0;
  border-radius:inherit; pointer-events:none;
  transition:opacity .18s ease;
}


/* ===== 移植 bencho 的 humidity 圆盘（2026-09-24，第二个搬过来的零件）=====
   出处: bencho.dev 的 src/lab/Humidity.tsx，MIT 许可，deps:[]（零依赖）。
   原版是一个可拖的仪表环：60 根刻度、扫 300 度、底部留 60 度缺口，
   值是弹簧（会冲过头再回落），点亮的刻度带着一道慢慢行进的波，波幅跟着读数变大。

   原版参数照抄：N=60 根、START=120 度、SWEEP=300 度、R=52（刻度带内半径）、
   亮刻度长 24 / 暗刻度 21、头部"彗星"额外 8、波幅 2.6、弹簧刚度 0.16 / 阻尼 0.76。
   改了的：直径 250→200px（放进看板面板）、四个档位的颜色改成"越高越糟"的语义
   （原版是湿度，低了才报警；这里是手续费占比，低才好）。 */

.dial-row{display:flex;gap:16px;justify-content:space-evenly;flex-wrap:wrap;padding:4px 4px 2px}
.dial-cell{display:flex;flex-direction:column;align-items:center;gap:7px}
.dial-cap{font-size:11px;font-weight:650;color:var(--ink2);letter-spacing:.4px;text-align:center}
.dial-sub{font-size:10px;color:var(--mut);text-align:center}

.hum{--hum-lit:#12b055;position:relative;display:flex;flex-direction:column;align-items:center;color:var(--ink)}
.hum[data-state="crit"]{--hum-lit:#e8443a}
.hum[data-state="low"]{--hum-lit:#d97706}
.hum[data-state="high"]{--hum-lit:#2563eb}
body[data-theme="dark"] .hum{--hum-lit:#3ce085}
body[data-theme="dark"] .hum[data-state="crit"]{--hum-lit:#ff6b5e}
body[data-theme="dark"] .hum[data-state="low"]{--hum-lit:#f0a02a}
body[data-theme="dark"] .hum[data-state="high"]{--hum-lit:#5b9bff}

.hum-dial{position:relative;width:200px;height:200px}
.hwheel{position:absolute;inset:0;width:200px;height:200px;outline:none}
/* 读数：数字和 % 一样大，是"62%"这一个整体，不是数字后面挂个符号 */
.hwheel-readout{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);
  display:flex;align-items:baseline;justify-content:center;gap:2px;pointer-events:none}
.hum-figure{font-size:34px;font-weight:500;letter-spacing:-.045em;line-height:1;font-variant-numeric:tabular-nums}
.hum-unit{font-size:34px;font-weight:500;letter-spacing:-.045em;line-height:1;color:var(--mut);opacity:.55}

@media(max-width:900px){
  .hum-dial{width:158px;height:158px}
  .hum-figure,.hum-unit{font-size:27px}
}


/* ===== 圆盘: 没数据时压暗（2026-09-24 补）=====
   成交率是"越高越好"的指标，还没挂过单时它算出 0，会被判成危险档、显示一个红圈。
   那是"没数据"，不是"很危险"。所以整只压暗，配底下的"还没有挂单记录"一起看。
   停机就显示停机，不编一个数出来充样子。 */
.hum[data-nodata="1"] .hwheel{opacity:.22}
.hum[data-nodata="1"] .hum-figure,.hum[data-nodata="1"] .hum-unit{color:var(--mut)}


/* ===== 圆盘: 没数据时连颜色也降成灰（2026-09-24 补二）=====
   只压透明度还不够。成交率是"越高越好"，还没挂过单时它是 0，会落进危险档，
   压暗之后仍是个淡淡的红圈 —— 看着像出事了，其实只是还没数据。
   所以把亮刻度的颜色也换成灰色，剩下的只有底下一句"还没有挂单记录"。 */
.hum[data-nodata="1"]{--hum-lit:var(--mut)}
