#console[data-mobile-view="market"] .mobile-view:not([data-view="market"]),
#console[data-mobile-view="history"] .mobile-view:not([data-view="history"]),
#console[data-mobile-view="strategies"] .mobile-view:not([data-view="strategies"]),
#console[data-mobile-view="account"] .mobile-view:not([data-view="account"]){display:none}

@media(min-width:701px){
 #mobileNav{display:flex;position:sticky;top:0;z-index:20;gap:4px;margin:0 0 18px;padding:8px 0;background:#101413;border-bottom:1px solid var(--line)}
 #mobileNav button{min-height:40px;border:0;background:transparent;color:var(--muted);padding:8px 16px;border-radius:4px}
 #mobileNav button.active{background:#272b20;color:var(--amber)}
 #mobileNav button svg{width:17px;height:17px}
 #mobileNav button>span{position:relative}
 #mobileNav #navBalance{margin-left:4px}
}

.history-view{min-width:0;padding:14px 0 40px}
.history-heading{align-items:flex-start;min-height:56px;margin-bottom:16px}
.history-heading h2{font-size:20px;margin:0 0 4px}
.history-heading p{margin:0;font-variant-numeric:tabular-nums}
.history-result{display:inline-block;flex-shrink:0;border:1px solid var(--line);color:var(--muted);font-size:12px;padding:6px 9px;border-radius:4px}
.history-result[data-status="resolved"]{color:var(--green);border-color:#4f8e70}
.history-result[data-status="pending"]{color:var(--amber);border-color:#927a40}
.history-layout{display:grid;grid-template-columns:minmax(190px,235px) minmax(0,1fr);gap:24px}
.history-market-list{min-width:0;border-right:1px solid var(--line);padding-right:16px}
.history-market-list .section-heading{margin-bottom:5px}
.history-market-list h3,.history-plot h3{font-size:13px;margin:0}
.history-market-list .icon-button{width:34px;height:34px;min-height:34px;flex-basis:34px;padding:7px}
.history-market-list .icon-button svg{width:16px;height:16px}
.history-market-items{max-height:66vh;overflow-y:auto;overscroll-behavior:contain}
.history-market-items button{display:block;width:100%;min-height:46px;padding:8px 6px;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;text-align:left;color:#dce6df;font-size:12px}
.history-market-items button.active{color:var(--amber);background:#2c2a20}
.history-market-items button small{display:block;margin-top:3px;color:var(--muted);font-size:10px}
.history-market-items p{font-size:12px}
#historyOlder{width:100%;margin-top:10px;font-size:12px;min-height:36px}
.history-main{min-width:0}
#historyMessage{min-height:30px;margin:0 0 14px}
.history-training{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 12px;font-size:12px}
.history-training label{font-weight:600;color:#dce6df}
.history-training select{min-width:185px;max-width:min(100%,340px);min-height:34px}
.history-training button{min-height:34px;padding:5px 14px}
.history-training [role="status"]{color:var(--muted);overflow-wrap:anywhere}
.history-charts{position:relative;min-width:0}
.history-plot{border-top:1px solid var(--line);padding:10px 0 12px;min-width:0}
.history-plot-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:26px;margin-bottom:6px}
.history-legend{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--muted)}
.history-legend span{white-space:nowrap}
.history-legend span::before{content:"";display:inline-block;width:13px;height:3px;margin-right:5px;vertical-align:middle;background:currentColor}
.history-legend .chainlink{color:#5dd3ae}.history-legend .twap{color:#9fc3e7}.history-legend .ptb{color:#e9bd63}
.history-legend .up{color:#5dd3ae}.history-legend .down{color:#f08b88}
.history-legend .entry,.history-action-entry{color:#ffd166}
.history-legend .exit,.history-action-exit{color:#9ac5ff}
.history-legend .signal-live,.history-signal-live{color:#d6b8ff}
.history-legend .signal-paper,.history-signal-paper{color:#e8edf0}
.history-legend .signal-unknown,.history-signal-unknown{color:#b9c6ca}
.history-legend .train-entry{color:#ffab70}.history-legend .train-exit{color:#64d9ef}
.history-legend .entry::before,.history-legend .exit::before,.history-legend .signal-live::before,.history-legend .signal-paper::before,.history-legend .signal-unknown::before,.history-legend .train-entry::before,.history-legend .train-exit::before{content:none}
.history-canvas{display:block;width:100%;height:245px;margin:0;touch-action:none;cursor:crosshair;outline-offset:2px}
.history-crosshair{position:absolute;z-index:3;width:1px;background:#e5ede3;box-shadow:0 0 0 1px #101413;pointer-events:none}
.history-selection{min-height:95px;border-top:1px solid var(--line);padding:12px 0;font-variant-numeric:tabular-nums}
.history-selection>time{display:block;font-weight:600;font-size:12px;margin-bottom:10px}
.history-selection-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 14px}
.history-selection-values>div{min-width:0}
.history-selection-values span{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.history-selection-values strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-event-note{margin:8px 0 0;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.history-event-note strong{font-weight:600}
.history-training-note{color:#ffcfaa}
.history-training-results{border-top:1px solid var(--line);font-size:11px}
.history-training-results:empty{display:none}
.history-training-results h3{font-size:13px;margin:12px 0 5px}
.history-training-results p{margin:4px 0 8px;line-height:1.45}
.history-training-point{display:block;width:100%;padding:6px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;text-align:left;color:#e5ede3;font-size:11px;font-variant-numeric:tabular-nums}
.history-training-point:hover:not(:disabled){background:#2c2a20}
.history-training-point.entry{color:#ffab70}.history-training-point.exit{color:#64d9ef}
.history-training-limits{overflow-wrap:anywhere}
.history-fills,.history-signals{border-top:1px solid var(--line);padding:12px 0;font-size:12px}
.history-fills h3,.history-signals h3{font-size:13px;margin:0 0 8px}
.history-fills .muted,.history-signals .muted{margin:0}
.history-fills table,.history-signals table{font-size:12px}
.history-fills th,.history-fills td,.history-signals th,.history-signals td{padding:6px 8px;font-size:11px}
.history-fills .scroll,.history-signals .scroll{max-height:220px}
.history-signals table{min-width:700px}
.history-fill-time{min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--green);font-size:inherit;white-space:nowrap;text-decoration:underline;text-underline-offset:2px}
.history-fill-time:hover:not(:disabled){background:transparent;color:#a2eed0}
.history-time-link{color:var(--green);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.history-time-link:hover{color:#a2eed0}
#table th,#table td{padding-top:7px;padding-bottom:7px}
#table td{font-size:12px}

@media(max-width:700px){
 .history-view{padding:14px 0 24px}
 .history-heading h2{font-size:17px}
 .history-layout{display:block}
 .history-market-list{border-right:0;border-bottom:1px solid var(--line);padding:0 0 12px;margin-bottom:14px}
 .history-market-items{display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;max-height:none;scrollbar-width:thin}
 .history-market-items button{flex:0 0 145px;border:1px solid var(--line);border-radius:4px;min-height:52px;padding:6px}
 #historyOlder{width:auto;margin-top:8px}
 .history-plot-heading{display:block}
 .history-legend{justify-content:flex-start;margin-top:5px;gap:5px 12px}
 .history-training select{flex:1 1 180px;min-width:0}.history-training [role="status"]{flex-basis:100%}
 .history-canvas{height:200px}
 .history-selection-values{grid-template-columns:repeat(2,minmax(0,1fr))}
 #table.account-table tr{padding:10px 0;gap:5px 10px}
 #table.account-table td{font-size:11px}
 #table.account-table td::before{margin-bottom:2px}
 #ensemblePositions table{min-width:760px}
}
