:root{color-scheme:dark;--bg:#101318;--panel:#161a21;--raised:#1d232c;--line:#2a303a;--text:#e6e9ee;--muted:#8b95a6;--accent:#78d9c2;--green:#69cdb2;--red:#ec7b89}*{box-sizing:border-box}body{margin:0;font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer;color:var(--text);background:var(--raised);border:1px solid var(--line);border-radius:5px;padding:7px 12px;white-space:nowrap}button:hover{background:#2a3440;border-color:#556170}button:disabled{opacity:.4;cursor:not-allowed}button.active{color:var(--accent);background:#243b38;border-color:#42665e}.primary{background:var(--accent);color:#122820;border-color:var(--accent);font-weight:650;padding:10px 18px}.primary:hover{background:#a1ead7;border-color:#a1ead7}.text-btn{background:transparent;border:0;color:var(--muted);padding:4px 8px}.text-btn:hover{color:var(--text);background:transparent}.icon-btn{background:none;font-size:20px;border:0}.top{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;background:#14181e}.brand{color:inherit;text-decoration:none;display:flex;align-items:center;gap:11px}.brand strong{font-size:19px;letter-spacing:2px}.brand-mark{color:var(--accent);font-size:31px;line-height:1}.brand-sub{color:#626f80;font-size:10px;letter-spacing:2px;margin:3px 0 0 12px}.top-right{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px}.local-dot,.live-dot{width:6px;height:6px;display:inline-block;background:var(--green);border-radius:50%}#home{max-width:1220px;margin:auto;padding:58px 32px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:45px}.eyebrow{color:var(--accent);font-size:10px;letter-spacing:3px}h1{font-size:32px;font-weight:550;letter-spacing:1px;margin:15px 0 9px}.intro p,.muted{color:var(--muted)}.data-strip{display:flex;align-items:center;gap:14px;background:var(--panel);border:1px solid var(--line);padding:17px 20px;border-radius:8px}.data-strip #archive-status{flex:1;color:var(--muted);font-size:12px}.section-title{display:flex;justify-content:space-between;align-items:center}.section-title h2{font-size:18px;font-weight:500;margin:32px 0 18px}.section-title span{color:var(--muted)}.empty{border:1px dashed #323c49;border-radius:8px;padding:48px;text-align:center;color:var(--muted)}.empty strong{font-size:18px;display:block;color:var(--text);margin:10px}.practice-row{display:grid;grid-template-columns:1fr 110px 180px 90px 100px;align-items:center;padding:20px;border-bottom:1px solid var(--line);background:var(--panel)}.practice-row:first-child{border-radius:8px 8px 0 0}.practice-row strong{display:block;font-size:15px;font-weight:550}.practice-row small{color:var(--muted)}.home-foot{display:grid;grid-template-columns:repeat(3,1fr);gap:50px;border-top:1px solid var(--line);margin-top:54px;padding-top:30px}.home-foot span{color:var(--accent);font-size:11px}.home-foot h3{font-size:15px;font-weight:500}.home-foot p{color:var(--muted);font-size:12px}.workspace-head{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:var(--panel);border-bottom:1px solid var(--line)}.workspace-head>div{display:flex;gap:14px;align-items:center}.divider{height:15px;width:1px;background:var(--line)}.tag{font-size:10px;color:var(--muted);border:1px solid var(--line);padding:2px 6px;border-radius:3px}#save-status{font-size:11px;color:var(--muted)}.replaybar{display:flex;align-items:center;justify-content:space-between;padding:10px 18px;border-bottom:1px solid var(--line);gap:15px}.transport,.layout-tools{display:flex;align-items:center;gap:8px}.square{width:38px;padding:7px}.clock{display:flex;align-items:center;gap:14px}.clock strong{font:15px ui-monospace,SFMono-Regular,monospace;letter-spacing:.4px}.clock span{color:var(--muted);font-size:10px}.news-strip{display:flex;gap:12px;align-items:center;min-height:37px;padding:5px 19px;background:#1e1b20;border-bottom:1px solid #332d33;font-size:11px}.news-strip strong{font-weight:500;color:#d9bdc1}.news-dot{background:var(--red);width:6px;height:6px;border-radius:50%}#news-status{flex:1;color:var(--muted)}.news-strip.urgent #news-status{color:var(--red)}.desk{display:flex;height:calc(100vh - 411px);min-height:410px}.draw-tools{width:48px;flex-shrink:0;border-right:1px solid var(--line);display:flex;align-items:center;flex-direction:column;padding:6px 0;gap:4px;background:var(--panel)}.draw-tools button{padding:3px 0;width:34px;height:34px;background:transparent;border:0;font-size:20px;color:#a4afbf}.draw-tools button:hover{color:var(--accent);background:var(--raised)}.draw-tools span{height:1px;width:26px;background:var(--line);margin:5px}.charts{display:grid;flex:1;min-width:0;background:#101318;gap:2px;padding:2px}.layout-2{grid-template-columns:1fr 1fr}.layout-3,.layout-4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.layout-3 .chart-cell:first-child{grid-row:span 2}.chart-cell{position:relative;min-height:0;min-width:0;border:1px solid #252c35;border-radius:3px;display:flex;flex-direction:column;overflow:hidden}.chart-cell.selected{border-color:#729b94;box-shadow:inset 0 0 0 1px #729b9433}.chart-head{display:flex;align-items:center;height:36px;gap:8px;padding:0 9px;background:#141920;flex-shrink:0}.chart-head strong{font-size:12px}.chart-head select{padding:2px 4px;font-size:11px;border:0;background:transparent}.chart-head button{padding:0;background:none;border:0}.chart-role{margin-left:auto;color:#69847e;font-size:9px;letter-spacing:1px}.chart-canvas{flex:1;min-height:0}.chart-watermark{position:absolute;left:17px;bottom:33px;color:#313c48;pointer-events:none;font-size:10px;letter-spacing:2px}.order-panel{width:284px;flex-shrink:0;border-left:1px solid var(--line);background:var(--panel);padding:15px;overflow:auto}.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}h2{margin:0;font-size:15px}h3{font-size:12px;font-weight:550;margin:0}.target{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between;text-align:left;background:#1a2028;padding:10px 12px}.target span{font-size:10px;color:var(--muted);width:100%;margin-bottom:3px}.target strong{font-size:18px}.target small{color:var(--muted);align-self:center}.mode-switch{display:flex;background:#0f1319;margin:14px 0 10px;padding:3px;border-radius:5px}.mode-switch button{width:50%;background:transparent;border:0;padding:5px}.mode-switch button.active{background:#29363b;color:var(--accent)}.quote-row{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin:10px 0}.quote-row strong{color:var(--text);font-family:monospace}.order-panel label{display:flex;flex-wrap:wrap;color:#aeb7c3;font-size:11px;margin-top:10px;align-items:center;gap:5px}.order-panel label kbd{margin-left:auto}.order-panel input{width:100%;margin-top:3px}input,select,textarea{color:var(--text);background:#11161d;border:1px solid #303a47;border-radius:5px;padding:8px 10px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 2px #78d9c210}input:disabled{color:#7a8c9b;background:#1b2027}kbd{font:10px ui-monospace,monospace;background:#ffffff0a;color:#8c99a9;border:1px solid #ffffff12;border-radius:3px;padding:1px 4px}.primary kbd{color:#225548;border-color:#22554844}.r-buttons{display:flex;gap:6px;margin-top:9px}.r-buttons button{padding:3px 8px;flex:1;font-size:10px;background:transparent}.sizing{margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}.sizing>div{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.sizing span{color:var(--muted);font-size:11px}#quantity{font-size:24px;font-weight:500}#quantity small{font-size:11px;color:var(--muted)}#order-help{font-size:10px;color:var(--muted);min-height:29px}.submit{width:100%;display:flex;justify-content:space-between;align-items:center}.position-block{border-top:1px solid var(--line);margin-top:18px;padding-top:13px}#position-details{font-size:11px;margin:10px 0}.position-actions{display:flex;gap:7px}.position-actions button{width:50%;font-size:11px}.panel-foot{font-size:9px;color:#657184;margin-top:16px}.ledger{border-top:1px solid var(--line);height:157px;background:var(--panel)}.ledger-tabs{display:flex;align-items:center;height:39px;border-bottom:1px solid var(--line);padding:0 18px;gap:17px}.ledger-tabs>button{background:none;border:0;padding:9px 0;font-size:11px;border-radius:0;color:var(--muted)}.ledger-tabs>button.active{border-bottom:2px solid var(--accent);color:var(--text)}.ledger-tabs span{color:var(--muted);margin-left:4px}.account-line{display:flex;margin-left:auto;gap:24px;font-size:10px}.account-line b{font-family:monospace;margin-left:5px;font-weight:500;color:var(--text)}#ledger-content{height:118px;overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:11px}th{font-weight:400;color:#788799;padding:6px 18px;border-bottom:1px solid #252c35}td{padding:7px 18px;border-bottom:1px solid #232a33;font-family:ui-monospace,"PingFang SC",monospace}td button{padding:2px 8px;font-size:10px}.ledger-empty{padding:28px;color:#6d7b8e;text-align:center;font-size:11px}.statusbar{display:flex;justify-content:space-between;padding:7px 16px;color:#7e8a9a;font-size:10px;border-top:1px solid var(--line)}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.modal-head h2{font-size:22px;font-weight:500}.modal-head button{background:transparent;border:0;font-size:23px;color:var(--muted)}dialog{border:1px solid #394450;background:#181e26;color:var(--text);border-radius:12px;max-width:820px;width:620px;max-height:90vh;padding:27px;box-shadow:0 30px 120px #0009}dialog::backdrop{background:#060a10bb;backdrop-filter:blur(4px)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.form-grid label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--muted)}.form-grid .full{grid-column:1/-1}.hint{font-size:11px;color:var(--muted);margin:12px 0;line-height:1.8}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:23px}.error{color:var(--red);font-size:12px;min-height:20px;margin-top:12px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}.stat-grid>div{background:#10161e;border:1px solid var(--line);border-radius:6px;padding:15px}.stat-grid span{font-size:11px;color:var(--muted);display:block}.stat-grid strong{display:block;font:21px monospace;margin-top:8px}.summary-table{max-height:230px;overflow:auto}.settings-section{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:18px}.settings-section h3{margin-bottom:14px;font-size:14px}.hotkey-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.hotkey-grid label{font-size:11px;color:var(--muted)}.hotkey-grid input{width:100%;margin-top:5px}#toast{position:fixed;bottom:32px;left:50%;transform:translateX(-50%);border:1px solid #4c665f;background:#22352f;color:#def4e9;padding:12px 24px;border-radius:7px;box-shadow:0 8px 30px #0008;z-index:50;max-width:80vw;display:none}#toast.error-toast{border-color:#875d66;background:#3c252c;color:#ffdbe0}.news-event{display:flex;align-items:center;gap:20px;padding:12px 0;border-bottom:1px solid var(--line)}.news-event b{color:var(--red);font-weight:400}textarea{width:100%;resize:vertical}.busy{cursor:progress}@media(max-width:1100px){.brand-sub{display:none}.clock{flex-direction:column;gap:0}.order-panel{width:250px;padding:11px}.account-line{gap:12px}.charts.layout-2{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.desk{min-height:620px}.home-foot{gap:20px}}@media(max-width:760px){.top{padding:0 15px}.intro{align-items:flex-start;gap:15px}h1{font-size:23px}.brand-sub,.top-right>span{display:none}.data-strip{flex-wrap:wrap}.practice-row{grid-template-columns:1fr 100px;gap:10px}.practice-row>span{display:none}.home-foot{grid-template-columns:1fr}#workspace{min-width:900px}dialog{width:95vw}.form-grid{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,1fr)}}

/* Dense execution ledger: columns keep their intrinsic width on wide windows. */
#ledger-content table{width:max-content;min-width:780px;max-width:100%;table-layout:auto}#ledger-content th,#ledger-content td{padding:6px 12px;white-space:nowrap;font-variant-numeric:tabular-nums}#ledger-content th:nth-child(3),#ledger-content td:nth-child(3){max-width:240px;overflow:hidden;text-overflow:ellipsis}#ledger-content td.pnl{font-weight:600;text-align:right;min-width:100px}#ledger-content th:last-child{padding-right:24px}.order-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.order-options label{min-width:0;margin-top:3px}.order-options select{width:100%;padding:5px;font-size:11px}.order-options [hidden]{display:none!important}.order-options #manual-qty-label{grid-column:1/-1}.draft-hint{display:flex;justify-content:space-between;align-items:center;margin-top:5px;font-size:10px;color:#ac9bfd}.draft-hint button{font-size:10px}.draw-tools{overflow:visible;z-index:3}.draw-tools button{position:relative;flex-shrink:0}.draw-tools button::after{content:attr(data-tooltip);position:absolute;left:42px;top:50%;transform:translateY(-50%);background:#283542;color:#f0f5fa;border:1px solid #455566;border-radius:5px;padding:6px 10px;font-size:12px;pointer-events:none;opacity:0;transition:opacity .1s;z-index:30;box-shadow:0 4px 18px #0006}.draw-tools button:hover::after,.draw-tools button:focus-visible::after{opacity:1}.draw-tools button.draw-active{color:#ac9bfd;background:#2b2940}.drawing-edit-hint{font-size:11px;color:var(--muted);margin:8px 0 0}.point-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.point-grid input{width:100%}.tool-color{height:35px;padding:3px!important}.draw-tools button#drawing-settings{font-size:18px}

#admission-dialog{width:min(540px,calc(100vw - 32px));padding:32px;border:1px solid #40534f;border-radius:16px;background:#161c24;color:#e7edf4;box-shadow:0 24px 80px #0009}
#admission-dialog::backdrop{background:#080c12ed}
.queue-card h2{font-size:24px;line-height:1.5;margin:16px 0}.queue-card p{line-height:1.8}.queue-card .form-actions{flex-wrap:wrap}.queue-status{font-size:12px;color:#91dbc7;cursor:pointer}
.session-jumps{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border,#29303a);flex-wrap:wrap}.session-jumps .muted{font-size:12px}.session-jumps button{padding:5px 12px;font-size:12px}#jump-progress{margin-left:auto;color:#78d9c2;font-size:12px}.replaybar{flex-wrap:wrap;gap:10px}

/* Linear-inspired workspace. Layers: charts 0, tools 3, selection 4, popover 8, modal top layer.
   Dials: DESIGN_VARIANCE 4 / MOTION_INTENSITY 2 / VISUAL_DENSITY 8.
   Brand accent is violet; green/red remain reserved for price and risk semantics. */
:root{--bg:#101114;--panel:#16171c;--raised:#212228;--line:#2c2d35;--text:#f0f0f3;--muted:#a0a1ae;--accent:#aaa4f4;--accent-surface:#292639;--green:#69cdb2;--red:#ec7b89;--border:var(--line)}
body{font-size:13px;letter-spacing:.01em;background:var(--bg);font-variant-numeric:tabular-nums}
[hidden]{display:none!important}button{border-radius:6px;font-weight:500;transition:background-color .12s,border-color .12s}button:hover{background:#2b2c34;border-color:#525360}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button.active{background:var(--accent-surface);border-color:#575078;color:#c7c2ff}.primary{background:#dedbef;border-color:#dedbef;color:#201b32}.primary:hover{background:#f0edf9;border-color:#f0edf9}.primary kbd{color:#49425e;border-color:#77708455;background:#fff3}
.top{height:52px;background:#131418;padding:0 24px}.brand strong{font-size:17px;letter-spacing:.5px}.brand-mark{font-size:25px}.brand-sub{font-size:9px;letter-spacing:1.6px;color:var(--muted)}.icon-btn{display:grid;place-items:center;width:32px;height:32px;padding:0}.top-right{font-size:11px}
#home{max-width:1200px;padding:64px 32px}.intro{margin-bottom:36px}.intro h1{font-size:34px;letter-spacing:-1px;font-weight:600}.eyebrow{letter-spacing:1px;color:var(--muted);font-size:11px}.intro p{font-size:14px}.data-strip{background:var(--panel);border-color:var(--line);border-radius:8px}.practice-row{background:transparent;padding:18px 16px}.practice-row:hover{background:var(--panel)}.home-foot{gap:32px;margin-top:48px}.home-foot span{color:var(--muted)}.empty{background:var(--panel);border:1px solid var(--line);color:var(--muted)}
.workspace-head{height:40px;background:#16171b;padding:0 16px}.workspace-head button{font-size:11px;padding:5px 8px}.workspace-head strong{font-weight:550}.tag{color:var(--muted);border-radius:4px}.replaybar{padding:8px 16px;min-height:54px;flex-wrap:nowrap;background:#131418}.replaybar button{padding:6px 10px;font-size:12px}.transport{gap:5px}.clock{gap:12px}.clock strong{font-size:14px;letter-spacing:0}.clock span{color:var(--muted)}.layout-tools{gap:5px}.layout-tools .muted{font-size:11px}.session-jumps{padding:5px 16px;min-height:35px;gap:7px;background:#131418}.session-jumps button{font-size:11px;padding:3px 9px;background:transparent;border-color:transparent}.session-jumps button:hover{background:var(--raised);border-color:var(--line)}.session-jumps .muted{font-size:10px}.news-strip{min-height:30px;padding:3px 16px;background:#18171c;border-color:var(--line);font-size:10px}.news-strip strong{color:#c6b2b9}.news-strip .text-btn{font-size:10px}#jump-progress{color:var(--accent)}
.desk{position:relative;height:calc(100dvh - 376px);min-height:440px}.draw-tools{width:46px;gap:3px;padding:7px 4px;background:#16171b}.draw-tools button{display:grid;place-items:center;height:30px;width:34px;font-size:14px;border-radius:5px;color:#b8b8c3}.draw-tools button:hover{background:#272630;color:var(--text)}.draw-tools button::after{left:40px;background:#292a33;border-color:#444550;color:var(--text);font-size:11px}.draw-tools button:not([data-tooltip])::after{display:none}.draw-tools .tool-divider{height:1px;width:24px;background:var(--line);margin:4px auto}.draw-tools .draw-active,.draw-tools button.active{background:var(--accent-surface);color:var(--accent)}#favorite-tools{display:flex;flex-direction:column;gap:3px;max-height:180px;overflow-y:auto;scrollbar-width:thin}.draw-tools span{width:auto;height:auto;background:transparent;margin:0}
.charts{padding:3px;gap:3px;background:#101114}.chart-cell{background:#131418;border-color:#2a2b33;border-radius:5px}.chart-cell.selected{border-color:#827bac;box-shadow:inset 0 0 0 1px #827bac22}.chart-head{height:34px;padding:0 10px;background:#191a20}.chart-head strong{font-weight:600}.chart-role{color:#acabbc;letter-spacing:0}.chart-watermark{color:#444550;font-size:9px;letter-spacing:1px}.chart-head select{color:#d6d5e1}
.order-panel{width:270px;padding:14px;background:#17181d}.panel-title{margin-bottom:12px}.panel-title h2{font-size:13px;font-weight:600}.target{background:#202127;border-color:#32333c;border-radius:6px;padding:8px 10px}.target strong{font-size:17px}.mode-switch{background:#101114;border:1px solid #292a32;margin:10px 0;padding:2px}.mode-switch button.active{background:#302b42;color:#d5cef8}.order-panel label{color:#b5b5c1;margin-top:8px}.order-panel input{padding:6px 9px}.order-panel input:disabled{background:#202127;color:#b6b5c2}.order-panel small{color:var(--muted)}input,select,textarea{background:#111216;border-color:#363741;border-radius:6px}input::placeholder,textarea::placeholder{color:#9c9daa}input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px #aaa4f419}.quote-row{margin:9px 0}.sizing{margin-top:12px}.position-block{margin-top:14px}.panel-foot{color:var(--muted);font-size:10px}.target small{font-size:10px}.submit{font-size:12px;padding:9px 12px}kbd{color:#b8b4cf;background:#24232c;border-color:#3a3846;border-radius:4px}.ledger{background:#17181d;height:136px}.ledger-tabs{height:36px;padding:0 16px}.ledger-tabs>button{font-size:11px;padding:8px 0}.ledger-tabs>button.active{border-bottom-color:var(--accent)}#ledger-content{height:100px}#ledger-content th{background:#191a20;color:var(--muted);position:sticky;top:0}#ledger-content td{border-color:#292a32}th,td{border-color:var(--line)}.ledger-empty{color:var(--muted);padding:24px}.statusbar{height:29px;align-items:center;padding:4px 14px;color:var(--muted);background:#131418}.account-line{gap:20px}.point-grid label{color:var(--muted);font-size:12px;display:grid;gap:7px}
dialog{background:#1b1c22;border-color:#41424e;border-radius:12px;padding:24px;width:600px;box-shadow:0 24px 90px #05050899}dialog::backdrop{background:#08090bc9;backdrop-filter:none}.modal-head{margin-bottom:18px}.modal-head h2{font-size:18px;font-weight:600}.form-grid{gap:16px}.form-actions{border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.form-actions button{font-size:12px}.stat-grid>div{background:var(--bg);border-color:var(--line)}#toast{background:#25232e;border-color:#655e82;color:#eeeafc;font-size:12px;border-radius:8px}#admission-dialog{background:var(--panel);border-color:var(--line)}.queue-status{color:var(--accent)}
.tool-library{position:absolute;left:52px;top:8px;z-index:8;width:284px;max-height:min(660px,calc(100dvh - 220px));background:#202127;border:1px solid #464550;border-radius:10px;box-shadow:0 12px 40px #05050899;display:flex;flex-direction:column}.tool-library-head{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px}.tool-library-head button{padding:3px;border:0;background:transparent;display:grid;place-items:center}.tool-search{padding:0 12px 10px;color:var(--muted);font-size:10px;display:grid;gap:5px}.tool-search input{width:100%;padding:7px 9px;font-size:12px}.tool-library-body{overflow:auto;padding:0 6px 8px}.tool-library section{padding:5px 0}.tool-library h3{padding:6px 10px;color:#aaa8b9;font-size:10px;font-weight:500}.tool-choice{display:flex;border-radius:5px;align-items:center}.tool-choice:hover{background:#30303a}.tool-choice button{background:transparent;border:0;border-radius:5px;padding:8px;display:flex;align-items:center;gap:10px;font-size:12px}.tool-choice button:first-child{flex:1;text-align:left}.tool-choice button:last-child{color:#aaa8b9}.tool-choice button[aria-pressed=true]{color:#c4bbff}.tool-choice svg{flex-shrink:0}.drawing-selection{position:absolute;top:44px;left:70px;z-index:4;display:flex;align-items:center;gap:3px;border:1px solid #4d495d;background:#25232e;border-radius:7px;padding:4px 5px;box-shadow:0 4px 16px #08090b66}.drawing-selection strong{font-size:11px;font-weight:500;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 10px 0 6px}.drawing-selection button{display:grid;place-items:center;background:transparent;border:0;padding:5px;color:#cbc6df}.property-tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:20px;gap:22px}.property-tabs button{padding:8px 1px;border:0;border-radius:0;background:none;color:var(--muted)}.property-tabs button[aria-selected=true]{color:var(--text);border-bottom:2px solid var(--accent)}[data-property-panel]{min-height:180px}.form-grid input[type=color]{height:36px;width:100%;padding:4px}.check-row{display:flex;gap:9px;align-items:center;margin:12px 0;color:var(--text);font-size:12px}.check-row input,.period-checks input{accent-color:#aaa4f4}.period-checks{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;font-size:11px;color:var(--muted)}.period-checks label{display:flex;align-items:center;gap:5px}.object-list{max-height:55vh;overflow:auto}.object-row{display:flex;align-items:center;border-bottom:1px solid var(--line);gap:4px;padding:6px 0}.object-row button{background:transparent;border:0;padding:8px;display:grid;place-items:center}.object-row button:first-child{flex:1;display:flex;flex-direction:column;align-items:flex-start;min-width:0}.object-row strong{font-size:12px;font-weight:500;max-width:100%;overflow:hidden;text-overflow:ellipsis}.object-row small{font-size:10px;color:var(--muted)}.object-row button:hover{background:var(--raised)}
@media(min-width:1500px){.order-panel{width:288px}.desk{min-height:500px}}
@media(max-width:1100px){.desk{min-height:620px}.order-panel{width:248px}.clock{gap:1px}.brand-sub{display:none}.workspace-head{gap:10px}}
@media(max-width:760px){#workspace{min-width:0}.top{padding:0 12px}.workspace-head{height:auto;min-height:44px;flex-wrap:wrap;padding:6px 10px}.replaybar{flex-wrap:wrap;padding:8px}.clock{order:3;width:100%;flex-direction:row;justify-content:space-between}.layout-tools{margin-left:auto}.session-jumps{padding:5px 8px}.news-strip{flex-wrap:wrap;padding:5px 8px}.desk{height:auto;min-height:0;display:grid;grid-template-columns:42px minmax(0,1fr)}.draw-tools{width:42px;grid-column:1;grid-row:1}.charts{height:680px;grid-column:2;grid-row:1}.charts.layout-2,.charts.layout-3,.charts.layout-4{grid-template-columns:1fr;grid-template-rows:repeat(2,1fr)}.charts.layout-3{height:930px;grid-template-rows:repeat(3,1fr)}.charts.layout-4{height:1200px;grid-template-rows:repeat(4,1fr)}.layout-3 .chart-cell:first-child{grid-row:auto}.order-panel{grid-column:1/-1;width:auto;border-top:1px solid var(--line);border-left:0;padding:16px}.ledger{height:175px}.ledger-tabs{height:auto;min-height:36px;flex-wrap:wrap;gap:14px;padding:0 10px}.account-line{width:100%;margin:0;padding-bottom:5px;gap:10px}.statusbar{height:auto;flex-wrap:wrap;gap:6px}.tool-library{left:46px;width:min(284px,calc(100vw - 54px))}.drawing-selection{left:48px;max-width:calc(100vw - 58px)}.drawing-selection strong{max-width:100px}#home{padding:32px 16px}.intro{display:block}.intro h1{font-size:26px}.intro .primary{margin-top:12px}.home-foot{grid-template-columns:1fr;gap:12px}.form-grid,.point-grid{grid-template-columns:1fr}.period-checks{grid-template-columns:repeat(3,1fr)}dialog{padding:18px}.form-actions{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){button{transition:none}button:active:not(:disabled){transform:none}}

/* Playback remains compact alongside the clock and layout controls. */
.replaybar{flex-wrap:wrap}.transport{flex-wrap:wrap}#play-speed{width:66px;padding:5px;font-size:12px}#play-status{font-size:11px}#play-status:empty{display:none}

#protection-speed{width:134px;font-size:12px;padding:5px}#save-status{min-width:66px;text-align:right}

/* Vela owns chart chrome; the host supplies simulated trading and account controls. */
#workspace .desk{grid-template-columns:minmax(0,1fr) 280px}#workspace .draw-tools,#workspace .tool-library,#workspace .drawing-selection,#workspace button[data-layout],#workspace .layout-tools>.muted{display:none!important}.vela-host{display:block!important;min-width:0;min-height:550px;height:65vh;position:relative}.vela-host>div{height:100%}#workspace .replaybar{flex-wrap:wrap}@media(max-width:900px){#workspace .desk{grid-template-columns:minmax(0,1fr)}.vela-host{height:70vh;min-height:400px}}

.vela-host .vela-bb-clock{display:none}

/* Supported periods stay visible; narrow screens wrap rather than hide them. */
.vela-host .vela-widget-topbar{flex-wrap:wrap}
.vela-host .vela-widget-tf-group{min-width:0;flex-wrap:wrap}
.vela-host .vela-widget-tf-chips{flex-wrap:wrap}
.vela-host .vela-widget-tf{padding:0 6px;font-size:12px}
.vela-host .vela-workspace[data-layout='mobile'] .vela-widget-topbar{display:flex}
.vela-host .vela-workspace[data-layout='mobile'] .vela-widget-topbar>:not(.vela-widget-tf-group){display:none}
/* Zag reprojects positioner styles on hover and drops its imperative z-index.
   Keep native menu surfaces above the chart even after that projection. */
.vela-host .vela-ui-layer[data-scope='menu'][data-part='positioner']{z-index:var(--vela-z-menu)}

/* Preserve the current candle image while an affected chart changes market. */
.vela-chart-loading{position:absolute;inset:0;z-index:20;overflow:hidden;background:var(--vela-bg,#151619);pointer-events:auto;cursor:wait}
.vela-loading-frame{width:100%;height:100%;display:block;opacity:.75}
.vela-loading-notice{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;gap:10px;align-items:center;white-space:nowrap;padding:10px 14px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);font-size:12px;box-shadow:0 4px 16px #0005}
.vela-loading-notice button{font-size:12px;padding:4px 9px;cursor:pointer}
/* Tradovate-style floating order panel; the chart keeps the full desk width. */
#workspace .desk{grid-template-columns:minmax(0,1fr)!important}
#workspace .order-panel{position:fixed;z-index:40;top:150px;right:18px;display:block;width:calc(var(--order-width,300px)*var(--order-scale,.9));height:auto;max-height:none;min-height:0;padding:0;margin:0;border:1px solid var(--line);border-radius:6px;background:var(--panel);box-shadow:0 8px 24px #0006;overflow:hidden;grid-column:auto}
.order-shell{position:relative;width:var(--order-width,300px);zoom:var(--order-scale,.9)}
.order-drag-handle{height:36px;display:flex;align-items:center;gap:7px;padding:0 8px;border-bottom:1px solid var(--line);background:var(--raised);cursor:grab;touch-action:none;user-select:none}
.order-drag-handle:active{cursor:grabbing}.order-drag-handle h2{font-size:13px;font-weight:600;margin:0;white-space:nowrap}.order-grip{color:var(--muted);font-size:18px}.order-collapsed-summary{display:none;font-size:11px;color:var(--accent);white-space:nowrap}
.order-drag-handle #order-panel-scale{margin-left:auto;width:64px;height:25px;padding:2px 4px;font-size:11px}
.order-drag-handle #order-panel-toggle{border:0;background:transparent;padding:0;width:25px;height:25px;display:grid;place-items:center;font-size:20px;color:var(--text)}
.order-body{padding:10px 12px 16px;max-height:calc((100dvh - 24px)/var(--order-scale,.9) - 36px);overflow:auto}
.order-body .mode-switch{margin-top:10px}.order-body .target{padding-top:2px}.order-body .target strong{font-size:19px}.order-body .sizing{margin-top:12px;padding-top:10px}.order-body .panel-foot{margin-bottom:0}
.order-resize-handle{position:absolute;bottom:0;right:0;width:16px;height:16px;color:var(--muted);cursor:ew-resize;touch-action:none;font-size:12px;text-align:right}
#workspace .order-panel.collapsed{width:max-content;max-width:calc(100vw - 16px)}.order-panel.collapsed .order-shell{width:max-content}.order-panel.collapsed .order-drag-handle{border:0}.order-panel.collapsed .order-collapsed-summary{display:inline}.order-panel.collapsed #order-panel-toggle{margin-left:6px}
.order-panel [hidden]{display:none!important}
@media(max-width:420px){#workspace .order-panel:not(.collapsed){max-width:calc(100vw - 16px)}}
.vela-host[data-loading-charts] .vela-widget-tf-group,.vela-host[data-loading-charts] .vela-widget-symbol{pointer-events:none;opacity:.65}

#exam-status{display:grid;gap:6px;padding:12px 18px;border-bottom:1px solid var(--line);font-size:12px;background:#171722;color:var(--text)}#exam-status small{color:var(--muted);line-height:1.6}
/* Long rule editors stay inside narrow browser panes. */
dialog{max-width:min(820px,calc(100vw - 24px))}
#exam-editor{padding:14px 0;border-top:1px solid var(--line);margin-top:12px}
#exam-editor .form-grid label:has(input[type="checkbox"]){display:flex;align-items:center;justify-content:space-between;gap:12px}
#exam-editor input[type="checkbox"]{width:auto;margin:0;flex-shrink:0}
