/* Duo's trading surface uses opaque iOS-style grouped cards, not stacked blur. */
html:root.ivy-duo-mode .dt-panel {--dt-bg:#f2f2f7;--dt-card:#fff;--dt-text:#1c1c1e;--dt-muted:#72727c;--dt-line:#e6e6ed;--dt-blue:#007aff;position:fixed!important;inset:0 auto auto 0!important;width:var(--duo-workspace-width,81dvw)!important;height:var(--duo-workspace-height,100dvh)!important;max-width:none!important;max-height:none!important;transform:none;margin:0!important;padding:0!important;border:0!important;border-radius:var(--duo-workspace-corners,0 8px 8px 0)!important;background:var(--dt-bg)!important;color:var(--dt-text)!important;z-index:12001!important;overflow:hidden!important;box-shadow:none!important;backdrop-filter:none!important;transition:opacity .2s!important;container-type:inline-size;}
html:root.ivy-duo-mode.dark-mode .dt-panel {--dt-bg:#101113;--dt-card:#1c1d21;--dt-text:#f5f5f7;--dt-muted:#a0a1ac;--dt-line:#303137;--dt-blue:#64b4ff;color-scheme:dark;}
html:root.ivy-duo-mode .dt-panel:not(.is-open) {display:none!important;}
html:root.ivy-duo-mode .dt-panel.is-open {display:block!important;opacity:1!important;pointer-events:auto!important;}
html:root.ivy-duo-mode .dt-panel :is(button,input,select,summary) {font-family:-apple-system,BlinkMacSystemFont,'Inter',sans-serif;letter-spacing:normal!important;font-style:normal!important;}
html:root.ivy-duo-mode .dt-panel * {box-sizing:border-box;}
html:root.ivy-duo-mode .dt-panel .dt-shell {height:100%;display:flex;flex-direction:column;font:14px/1.4 -apple-system,BlinkMacSystemFont,'Inter',sans-serif;}
html:root.ivy-duo-mode .dt-panel .dt-header {display:flex;justify-content:space-between;align-items:center;padding:22px 20px 16px;flex:none;}
html:root.ivy-duo-mode .dt-panel h1 {font:700 28px/1.2 -apple-system,BlinkMacSystemFont,'Inter',sans-serif;letter-spacing:-1px;margin:5px 0 0;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel h2 {font:600 17px/1.3 -apple-system,BlinkMacSystemFont,'Inter',sans-serif;letter-spacing:-.3px;margin:0;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel .dt-eyebrow {font-size:9px;letter-spacing:1.5px!important;font-weight:600;color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel .dt-muted {font-size:11px;line-height:1.5;color:var(--dt-muted);margin:0;}
html:root.ivy-duo-mode .dt-panel .dt-done {border:0;background:none;color:var(--dt-blue);min-height:44px;padding:8px;font-size:13px;font-weight:600;}
html:root.ivy-duo-mode .dt-panel .dt-main {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 16px 20px;scrollbar-width:thin;}
html:root.ivy-duo-mode .dt-panel .dt-page {display:flex;flex-direction:column;gap:14px;}
html:root.ivy-duo-mode .dt-panel [hidden] {display:none!important;}
html:root.ivy-duo-mode .dt-panel .dt-tabs {display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:10px 12px 24px;border-top:1px solid var(--dt-line);flex:none;}
html:root.ivy-duo-mode .dt-panel .dt-tab {border:0;background:none;color:var(--dt-muted);border-radius:14px;min-height:44px;font-size:11px;font-weight:600;}
html:root.ivy-duo-mode .dt-panel .dt-tab[aria-current=page] {background:var(--dt-card);color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel :is(.dt-quote,.dt-trade-card,.dt-account,.sim-desk-metrics,.sim-open-positions-panel,.sim_PNL-panel,.sim_ledger-panel) {background:var(--dt-card)!important;border:0!important;border-radius:22px!important;padding:18px!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html:root.ivy-duo-mode .dt-panel :is(.trading__sim-panel-current-block,.trading__sim-panel-asset-selector,.trading__sim-panel-live,.trading__sim-stats-bar,.sim-desk-metrics,.trading__sim-panel-graph,.sim-open-positions-panel,.sim_balance-pill,.sim_equity,.sim_PNL-panel,.sim_ledger-panel) {position:relative!important;inset:auto!important;width:auto!important;height:auto!important;min-width:0!important;max-height:none!important;margin:0!important;transform:none!important;}
html:root.ivy-duo-mode .dt-panel .dt-quote-top {display:flex;justify-content:space-between;align-items:center;gap:8px;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-asset-name {display:flex;align-items:center;gap:7px;background:none;border:0;color:var(--dt-text);font-size:15px;min-height:40px;padding:0;}
html:root.ivy-duo-mode .dt-panel .asset-icon {font-size:22px;}
html:root.ivy-duo-mode .dt-panel .dropdown-arrow {font-size:9px;color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live {
 --dt-signal:#8e8e93;display:inline-flex;align-items:center;gap:6px;flex:none;
 font:500 11px/1.3 -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:0;padding:0;
 background:none;white-space:nowrap;border:0;border-radius:0;color:var(--dt-muted);filter:none;box-shadow:none;
}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live[data-feed-state=live] {--dt-signal:#248a3d;color:#248a3d;}
html:root.ivy-duo-mode.dark-mode .dt-panel .trading__sim-panel-live[data-feed-state=live] {--dt-signal:#30d158;color:#30d158;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live[data-feed-state=simulated] {--dt-signal:#b77916;}
html:root.ivy-duo-mode.dark-mode .dt-panel .trading__sim-panel-live[data-feed-state=simulated] {--dt-signal:#e5ad4a;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live .dot {position:relative;top:auto;display:block;flex:none;width:5px;height:5px;border-radius:50%;font-size:0;line-height:0;color:var(--dt-signal);background:currentColor;filter:none;animation:none;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live[data-feed-state=connecting] .dot {background:none;box-shadow:inset 0 0 0 1px currentColor;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live[data-feed-state=live] .dot::after {content:"";position:absolute;inset:-3px;border:1px solid currentColor;border-radius:50%;opacity:0;animation:dt-signal-arrive 1.4s ease-out;}
@keyframes dt-signal-arrive {0%{opacity:.45;transform:scale(.45)}100%{opacity:0;transform:scale(1.6)}}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel .trading__sim-panel-live .dot::after {animation:none!important;}}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-current-block {background:none;border:0;box-shadow:none;padding:10px 0 16px;}
html:root.ivy-duo-mode .dt-panel .current-price {position:static;font:700 clamp(24px,9cqw,38px)/1.2 -apple-system,sans-serif;color:var(--dt-text);letter-spacing:-1px;overflow-wrap:anywhere;}
html:root.ivy-duo-mode .dt-panel .percent-health {display:none;}
html:root.ivy-duo-mode .dt-panel .trading__sim-stats-bar {display:grid;grid-template-columns:1fr 1fr;gap:12px;background:none;border:0;padding:12px 0 0;border-top:1px solid var(--dt-line);}
html:root.ivy-duo-mode .dt-panel .stat-item {position:static;display:flex;flex-direction:column;gap:4px;}
html:root.ivy-duo-mode .dt-panel .stat-label {font:500 9px/1.4 -apple-system,sans-serif;letter-spacing:.6px;color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel .stat-value {position:static;font:600 13px/1.3 -apple-system,sans-serif;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel :is(.stat-item-vol,.up-dash-left,.up-dash-right,.down-dash-left,.down-dash-right,.asset-category-btn[data-category^=mystery],.graph-panel-live-orders) {display:none!important;}
html:root.ivy-duo-mode .dt-panel .asset-dropdown-panel {position:absolute!important;top:44px!important;left:0!important;right:auto!important;width:min(280px,65cqw)!important;z-index:100;background:var(--dt-card)!important;color:var(--dt-text);border:1px solid var(--dt-line);border-radius:18px;box-shadow:0 14px 40px #0002;backdrop-filter:none;}
html:root.ivy-duo-mode .dt-panel .asset-dropdown-panel:not(.is-open) {display:none;}
html:root.ivy-duo-mode .dt-panel :is(.asset-category-btn,.asset-item,.asset-item-name,.asset-item-pair) {color:var(--dt-text);font-style:normal;}
html:root.ivy-duo-mode .dt-panel .asset-item {min-height:44px;}
/* A quiet asset heading; the same native menu as Month owns its opening motion. */
html:root.ivy-duo-mode .dt-panel .dt-stock-picker {
 position:relative;display:inline-grid;grid-template-columns:32px minmax(0,auto) 12px;grid-template-rows:22px 18px;align-content:center;align-items:center;column-gap:9px;
 min-height:48px;max-width:100%;padding:2px 0;border:0;border-radius:10px;color:var(--dt-text);background:none;box-shadow:none;
 font:600 17px/1.2 -apple-system,BlinkMacSystemFont,sans-serif;cursor:pointer;
 transform-origin:left center;transition:opacity .18s ease,transform .24s cubic-bezier(.2,.8,.2,1);
}
html:root.ivy-duo-mode .dt-panel .dt-stock-picker>span {position:relative;z-index:1;pointer-events:none;}
html:root.ivy-duo-mode .dt-panel .dt-stock-icon {grid-column:1;grid-row:1/3;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;font-size:19px;font-weight:600;line-height:1;background:color-mix(in srgb,var(--dt-asset-color) 10%,var(--dt-card));color:color-mix(in srgb,var(--dt-asset-color) 75%,#000);}
html:root.ivy-duo-mode.dark-mode .dt-panel .dt-stock-icon {background:color-mix(in srgb,var(--dt-asset-color) 16%,var(--dt-card));color:color-mix(in srgb,var(--dt-asset-color) 65%,#fff);}
html:root.ivy-duo-mode .dt-panel .dt-stock-name {grid-column:2;grid-row:1;white-space:nowrap;letter-spacing:-.35px;}
html:root.ivy-duo-mode .dt-panel .dt-stock-detail {grid-column:2/4;grid-row:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dt-muted);font-size:11px;font-weight:400;line-height:16px;}
html:root.ivy-duo-mode .dt-panel .dt-stock-chevron {grid-column:3;grid-row:1;align-self:center;width:6px;height:6px;margin:0 3px 3px 0;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel .dt-stock-picker:active {opacity:.6;transform:scale(.98);}
html:root.ivy-duo-mode .dt-panel .dt-stock-select {position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;font-size:16px;cursor:pointer;appearance:auto;-webkit-appearance:auto;}
html:root.ivy-duo-mode .dt-panel .dt-stock-picker:has(select:focus-visible) {outline:2px solid var(--dt-blue);outline-offset:4px;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel .dt-stock-picker {transition:none;}html:root.ivy-duo-mode .dt-panel .dt-stock-picker:active {transform:none;}}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-graph {display:flex;flex-direction:column;gap:10px;border:0;background:var(--dt-card);border-radius:22px;padding:12px 0;box-shadow:none;overflow:hidden;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-graph>:not(:is(.dt-timeframes,.trading__sim-panel-graph-inner,.dt-analysis,.dt-option-row,.dt-chart-readout,.dt-chart-controls,.dt-chart-options,.dt-chart-offscreen)) {display:none!important;}
html:root.ivy-duo-mode .dt-panel .trading__sim-panel-graph-inner {position:relative!important;inset:auto!important;width:100%!important;height:clamp(210px,29vh,320px)!important;min-height:0!important;border:0!important;border-radius:0!important;background:var(--dt-card)!important;box-shadow:none!important;transform:none!important;overflow-x:auto!important;overflow-y:hidden!important;}
html:root.ivy-duo-mode .dt-panel .candle-container {height:100%!important;min-height:0!important;top:0!important;bottom:auto!important;}
html:root.ivy-duo-mode .dt-panel :is(.timestamp-slider-container,.sim-zoom-ctl) {display:none!important;}
html:root.ivy-duo-mode .dt-panel .dt-timeframes {display:flex;gap:3px;background:var(--dt-bg);border-radius:11px;margin:0 12px;padding:3px;}
html:root.ivy-duo-mode .dt-panel .dt-timeframe {flex:1;min-height:32px;border:0;border-radius:8px;background:none;color:var(--dt-muted);font-size:11px;font-weight:600;}
html:root.ivy-duo-mode .dt-panel .dt-timeframe[aria-pressed=true] {background:var(--dt-card);color:var(--dt-text);box-shadow:0 1px 3px #0001;}
html:root.ivy-duo-mode .dt-panel .dt-analysis {padding:0 12px;}
html:root.ivy-duo-mode .dt-panel summary {cursor:pointer;color:var(--dt-blue);font-size:12px;min-height:36px;padding:9px 0;}
html:root.ivy-duo-mode .dt-panel .sim-chart-toolbar {position:static!important;display:flex;flex-direction:column;gap:8px;width:100%!important;min-width:0;transform:none!important;}
html:root.ivy-duo-mode .dt-panel :is(.sim-indicator-dock,.sim-chart-tool-dock,.trend-style-buttons) {position:static!important;display:flex;flex-wrap:wrap;gap:3px;width:100%;max-width:none;min-width:0;background:var(--dt-bg);box-shadow:none;border:0;border-radius:10px;backdrop-filter:none;padding:4px;}
html:root.ivy-duo-mode .dt-panel :is(.sim-chart-tool,.trend-style-btn,.sim-indicator-toggle) {min-height:34px;color:var(--dt-muted);font-size:10px;border:0;box-shadow:none;background:none;}
html:root.ivy-duo-mode .dt-panel :is(.sim-chart-tool.is-active,.trend-style-btn.active,.sim-indicator-toggle.is-active) {background:var(--dt-card);color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .sim-chart-style-slot {flex:1;min-width:0;}
html:root.ivy-duo-mode .dt-panel .dt-leverage {display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:16px;}
html:root.ivy-duo-mode .dt-panel .dt-leverage input {margin-left:auto;width:70px;min-width:0;border:0;background:var(--dt-bg);color:var(--dt-text);border-radius:10px;padding:10px;font-size:14px;}
html:root.ivy-duo-mode .dt-panel .dt-actions {display:grid;grid-template-columns:1fr 1fr;gap:10px;}
html:root.ivy-duo-mode .dt-panel .dt-actions button {position:static!important;inset:auto!important;width:100%!important;height:auto!important;transform:none!important;border:0!important;border-radius:14px;min-height:48px;font-size:13px;font-weight:600;font-style:normal;letter-spacing:0;box-shadow:none!important;}
html:root.ivy-duo-mode .dt-panel :is(.sim_buy,.sim_quick-buy) {background:#14805e!important;color:white!important;}
html:root.ivy-duo-mode .dt-panel :is(.sim_sell,.sim_quick-sell) {background:#c74257!important;color:white!important;}
html:root.ivy-duo-mode .dt-panel .dt-quick {margin:10px 0;}
html:root.ivy-duo-mode .dt-panel .dt-quick .dt-muted {margin-bottom:10px;}
html:root.ivy-duo-mode .dt-panel .sim_equity {display:flex;flex-direction:column;align-items:flex-start;background:none;border:0;box-shadow:none;padding:8px 0 16px;}
html:root.ivy-duo-mode .dt-panel :is(.sim-panel-equity,.sim_equity-icons) {display:none;}
html:root.ivy-duo-mode .dt-panel .sim_equity-value {position:static;font:700 30px/1.2 -apple-system,sans-serif;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel .sim_balance-pill {display:flex;gap:8px;align-items:baseline;background:none;border:0;border-top:1px solid var(--dt-line);padding:14px 0 0;box-shadow:none;}
html:root.ivy-duo-mode .dt-panel .sim_balance-pill::before {content:'Cash';font-size:12px;color:var(--dt-muted);margin-right:auto;}
html:root.ivy-duo-mode .dt-panel .sim_balance-pill-value {font:600 16px/1.3 -apple-system,sans-serif;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel .sim_balance-pill-suffix {display:none;}
html:root.ivy-duo-mode .dt-panel .sim-desk-metrics {display:grid;grid-template-columns:1fr 1fr;gap:18px;overflow:visible;}
html:root.ivy-duo-mode .dt-panel .sim-desk-metric {padding:0;border:0;gap:6px;}
html:root.ivy-duo-mode .dt-panel .sim-desk-metric span {font:500 9px/1.3 -apple-system,sans-serif;color:var(--dt-muted);white-space:normal;letter-spacing:.3px;}
html:root.ivy-duo-mode .dt-panel .sim-desk-metric strong {font:600 16px/1.3 -apple-system,sans-serif;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel .sim-open-positions-panel.opp-collapsed {display:block!important;}
html:root.ivy-duo-mode .dt-panel :is(.opp-header,.sim-pending-orders__header) {position:static;font:600 13px/1.4 -apple-system,sans-serif;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel :is(.opp-list,.sim_ledger-panel-receipts-container,.sim_PNL-panel-content,.sim_PNL-value) {position:relative!important;inset:auto!important;width:100%!important;height:auto!important;max-height:none;transform:none!important;}
html:root.ivy-duo-mode .dt-panel .opp-empty {color:var(--dt-muted);font-size:12px;padding:20px 0;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-value {font:600 20px/1.4 -apple-system,sans-serif;color:var(--dt-text);margin-top:12px;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel-toggle {position:absolute;top:12px;right:12px;left:auto;bottom:auto;transform:none;width:32px;height:32px;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel-detail {position:relative;inset:auto;width:100%;}
/* Expanded trades follow the card theme instead of the legacy pale text. */
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel-detail {--dt-pnl-gain:#208238;--dt-pnl-loss:#c93434;color:var(--dt-text);}
html:root.ivy-duo-mode.dark-mode .dt-panel .sim_PNL-panel-detail {--dt-pnl-gain:#30d158;--dt-pnl-loss:#ff6961;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-group {margin:14px 0 0;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-asset {color:var(--dt-text);font-size:13px;letter-spacing:normal;border-color:var(--dt-line);padding-bottom:7px;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-order {gap:12px;flex-wrap:wrap;padding:9px 0;border-color:var(--dt-line);font-size:12px;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-qty {color:var(--dt-text);font-size:12px;overflow-wrap:anywhere;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-pnl {margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-pnl[data-result=gain] {color:var(--dt-pnl-gain)!important;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-detail-pnl[data-result=loss] {color:var(--dt-pnl-loss)!important;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel-detail-empty {color:var(--dt-muted);font-size:13px;letter-spacing:normal;}
html:root.ivy-duo-mode .dt-panel .sim_ledger-panel-name {display:none;}
html:root.ivy-duo-mode .dt-panel #receipts-container:empty::after {content:'No trades yet. Your practice orders and receipts will appear here.';display:block;padding:22px 0;color:var(--dt-muted);font-size:13px;line-height:1.6;}
html:root.ivy-duo-mode .dt-panel .dt-order-cover {position:absolute;inset:0;z-index:300;display:flex;align-items:flex-end;justify-content:center;background:#0006;padding:10px;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup.is-open {position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:480px;max-height:100%;height:auto!important;overflow:auto!important;margin:0;padding:16px;background:var(--dt-card)!important;color:var(--dt-text)!important;border:0;border-radius:24px;box-shadow:0 12px 40px #0003;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-header {position:sticky;top:-16px;z-index:5;background:var(--dt-card);padding:12px 0;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-close {min-width:40px;min-height:40px;color:var(--dt-muted);background:var(--dt-bg);border-radius:50%;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup :is(label,span,p,output,button) {font-family:-apple-system,sans-serif;font-style:normal;letter-spacing:normal;}
html:root.ivy-duo-mode .dt-panel :is(.sim-action-popup-label,.sim-risk-desk__header,.sim-action-popup-hint,.sim-risk-desk__hint,.sim-action-popup-summary-row) {color:var(--dt-muted);font-size:11px;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup :is(input,select) {background:var(--dt-bg)!important;color:var(--dt-text)!important;border:1px solid var(--dt-line)!important;border-radius:10px;font-size:16px;min-width:0;min-height:40px;}
html:root.ivy-duo-mode .dt-panel .sim-order-types {background:var(--dt-bg);border:0;}
html:root.ivy-duo-mode .dt-panel .sim-order-type {font-size:11px;min-height:36px;color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel .sim-order-type.is-active {background:var(--dt-card);color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .sim-risk-desk {background:var(--dt-bg);border:0;box-shadow:none;}
html:root.ivy-duo-mode .dt-panel .sim-risk-desk__grid {grid-template-columns:repeat(2,minmax(0,1fr));}
html:root.ivy-duo-mode .dt-panel .sim-risk-desk__grid label span {color:var(--dt-muted);font-size:11px;}
html:root.ivy-duo-mode .dt-panel .sim-risk-size {font-size:10px;color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-confirm {font-size:13px;min-height:48px;border-radius:14px;background:var(--dt-blue);color:white;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel,html:root.ivy-duo-mode .dt-panel * {animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

html:root.ivy-duo-mode .dt-panel .current-price {text-align:left;}
html:root.ivy-duo-mode .dt-panel .trading__sim-stats-bar {border-radius:0;}
html:root.ivy-duo-mode .dt-panel .candle.gold :is(.body,.wick) {background:#16835f!important;box-shadow:none!important;}
html:root.ivy-duo-mode .dt-panel .candle.red :is(.body,.wick) {background:#d84d61!important;box-shadow:none!important;}
html:root.ivy-duo-mode .dt-panel .chart-area-svg polyline {stroke:#16835f!important;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-value {text-align:left;color:var(--dt-text)!important;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-value [class] {font-size:11px;color:var(--dt-muted)!important;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-side {color:var(--dt-blue)!important;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-market {color:var(--dt-blue);font-size:11px;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-summary {background:var(--dt-bg);border:0;border-radius:12px;padding:12px;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-summary-row--total {color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-error {color:#c74257;background:#c7425710;border:0;font-size:11px;}


html:root.ivy-duo-mode .dt-panel {--dt-profit:#16835f;--dt-loss:#c74257;}
html:root.ivy-duo-mode.dark-mode .dt-panel {--dt-profit:#56cf9c;--dt-loss:#ff8997;}
html:root.ivy-duo-mode .dt-panel :is(span[style*="201, 255, 178"],span[style*="201,255,178"]) {color:var(--dt-profit)!important;}
html:root.ivy-duo-mode .dt-panel :is(span[style*="255, 184, 184"],span[style*="255,184,184"]) {color:var(--dt-loss)!important;}
html:root.ivy-duo-mode .dt-panel :is(.opp-card,.sim-pending-order,.sim_ledger-panel-receipt) {position:relative;width:100%;background:var(--dt-bg);border:0;border-radius:14px;box-shadow:none;padding:14px;margin:10px 0;backdrop-filter:none;}
html:root.ivy-duo-mode .dt-panel :is(.opp-asset,.opp-val,.rcpt-val,.sim-pending-order strong) {font:600 12px/1.5 -apple-system,sans-serif;color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel :is(.opp-lbl,.opp-meta,.opp-pct,.rcpt-lbl,.rcpt-time,.sim-pending-order span) {font:500 10px/1.5 -apple-system,sans-serif;color:var(--dt-muted);letter-spacing:0;}
html:root.ivy-duo-mode .dt-panel :is(.opp-row,.rcpt-row) {display:flex;justify-content:space-between;gap:8px;margin-top:8px;}
html:root.ivy-duo-mode .dt-panel :is(.opp-close-btn,.sim-pending-order button) {font-size:11px;min-height:40px;color:var(--dt-blue);background:var(--dt-card);border:0;border-radius:10px;}
html:root.ivy-duo-mode .dt-panel .opp-side {font:600 10px/1.3 -apple-system,sans-serif;}
html:root.ivy-duo-mode .dt-panel .sim-desk-metric strong.is-positive {color:var(--dt-profit);}
html:root.ivy-duo-mode .dt-panel .sim-desk-metric strong.is-negative {color:var(--dt-loss);}
html:root.ivy-duo-mode .dt-panel .sim-chart-toolbar {height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;pointer-events:auto;padding:0;}
html:root.ivy-duo-mode .dt-panel :is(.sim-chart-tool-dock,.sim-indicator-dock,.trend-style-buttons) {height:auto!important;overflow:visible!important;flex:none;}
html:root.ivy-duo-mode .dt-panel .sim-chart-tool-dock {justify-content:space-between;}
html:root.ivy-duo-mode .dt-panel .sim-chart-style-slot {order:-1;flex:0 0 100%;}
html:root.ivy-duo-mode .dt-panel .trend-style-buttons {justify-content:space-between;}
html:root.ivy-duo-mode .dt-panel .trend-style-btn {position:static!important;inset:auto!important;transform:none!important;flex:1;min-width:30px;max-width:60px;height:34px!important;display:grid;place-items:center;}
html:root.ivy-duo-mode .dt-panel .trend-style-icon {width:18px;height:18px;}
html:root.ivy-duo-mode .dt-panel .sim-chart-tool-divider {display:none;}
html:root.ivy-duo-mode .dt-panel .trading__sim-stats-bar {background:transparent!important;}
html:root.ivy-duo-mode .dt-panel .opp-side--long {color:var(--dt-profit);background:#16835f12;border:0;}
html:root.ivy-duo-mode .dt-panel .opp-side--short {color:var(--dt-loss);background:#c7425712;border:0;}
html:root.ivy-duo-mode .dt-panel .rcpt-row {flex-direction:row;align-items:baseline;}
html:root.ivy-duo-mode .dt-panel .rcpt-val {text-align:right;}
@container(min-width:650px){
 html:root.ivy-duo-mode .dt-panel .dt-market {display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr);grid-template-rows:max-content 1fr;align-items:start;}
 html:root.ivy-duo-mode .dt-panel .dt-market>.trading__sim-panel-graph {grid-column:2;grid-row:1/3;}
 html:root.ivy-duo-mode .dt-panel .dt-market>.dt-trade-card {grid-column:1;}
 html:root.ivy-duo-mode .dt-panel .trading__sim-panel-graph-inner {height:360px!important;}
 html:root.ivy-duo-mode .dt-panel .dt-portfolio {display:grid;grid-template-columns:1fr 1fr;align-items:start;}
 html:root.ivy-duo-mode .dt-panel .sim-open-positions-panel {grid-column:1/-1;}
 html:root.ivy-duo-mode .dt-panel :is(.opp-list,#receipts-container) {display:grid;grid-template-columns:1fr 1fr;gap:12px;}
}

html:root.ivy-duo-mode .dt-panel :is(.trading__sim-panel-current-block,.trading__sim-stats-bar,.trading__sim-panel-graph,.trading__sim-panel-graph-inner) {backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
/* A compact order sheet; advanced risk controls stay within reach. */
html:root.ivy-duo-mode .dt-panel .dt-ticket-quote {flex:none;padding:0 0 12px;}
html:root.ivy-duo-mode .dt-panel .dt-ticket-price {display:flex;align-items:baseline;justify-content:space-between;gap:12px;}
html:root.ivy-duo-mode .dt-panel .dt-ticket-price strong {font:700 25px/1.3 -apple-system,sans-serif;letter-spacing:-.7px;}
html:root.ivy-duo-mode .dt-panel .dt-ticket-price>span {font-size:9px;}
html:root.ivy-duo-mode .dt-panel .dt-ticket-spark svg {display:block;width:100%;height:62px;margin:8px 0 2px;}
html:root.ivy-duo-mode .dt-panel .dt-ticket-spark>span {font-size:9px;}
html:root.ivy-duo-mode .dt-panel .dt-ticket-explanation {margin:0 0 14px;font:400 12px/1.5 -apple-system,sans-serif;color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel :is(.sim-action-popup-hint,.sim-action-popup-qty-select,.sim-action-popup-market) {display:none!important;}
html:root.ivy-duo-mode .dt-panel .dt-market-order :is(.sim-action-popup-label:first-of-type,.sim-action-popup-price-row) {display:none!important;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-qty-input {display:block;width:100%;flex:1;}
html:root.ivy-duo-mode .dt-panel .sim-order-types {position:static;flex:none;}
html:root.ivy-duo-mode .dt-panel .dt-protection {margin:8px 0 14px;flex:none;}
html:root.ivy-duo-mode .dt-panel .dt-protection summary {font-size:12px;}
html:root.ivy-duo-mode .dt-panel .sim-risk-desk {margin-top:8px;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-label {font-size:12px;text-transform:none;margin-bottom:6px;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-error {margin:6px 0;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup-confirm {text-transform:none!important;margin-top:10px;flex:none;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup.dt-order-leaving {display:flex!important;visibility:visible!important;opacity:1!important;position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:480px;max-height:100%;height:auto!important;overflow:auto!important;margin:0;padding:16px;background:var(--dt-card)!important;color:var(--dt-text)!important;border:0;border-radius:24px;backdrop-filter:none!important;pointer-events:none;}
html:root.ivy-duo-mode .dt-panel .dt-protection:not([open]) .sim-risk-desk {display:none;}

html:root.ivy-duo-mode .dt-panel .dt-empty-quantity .sim-action-popup-error {display:none;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup .sim-order-type {text-transform:none;}
html:root.ivy-duo-mode .dt-panel .dt-progress {display:flex;flex-direction:column;gap:14px;}
html:root.ivy-duo-mode .dt-panel .dt-progress-controls {display:flex;flex-direction:column;gap:8px;}
html:root.ivy-duo-mode .dt-panel .dt-progress-controls .dt-timeframes {margin:0;background:var(--dt-card);}
html:root.ivy-duo-mode .dt-panel .dt-progress-picker {border:0;border-radius:12px;background:var(--dt-card);color:var(--dt-text);padding:12px;font-size:14px;width:100%;}
html:root.ivy-duo-mode .dt-panel :is(.dt-progress-hero,.dt-progress-stats,.dt-history-trade) {border-radius:22px;background:var(--dt-card);padding:18px;display:flex;flex-direction:column;gap:10px;min-width:0;}
html:root.ivy-duo-mode .dt-panel .dt-progress-value {font-size:clamp(24px,9cqw,36px);letter-spacing:-1px;line-height:1.2;overflow-wrap:anywhere;}
html:root.ivy-duo-mode .dt-panel .dt-progress-change {font-size:13px;}
html:root.ivy-duo-mode .dt-panel .dt-progress-change.is-positive {color:var(--dt-profit);}
html:root.ivy-duo-mode .dt-panel .dt-progress-change.is-negative {color:var(--dt-loss);}
html:root.ivy-duo-mode .dt-panel .dt-progress-chart {display:block;width:100%;height:auto;max-height:180px;}
html:root.ivy-duo-mode .dt-panel :is(.dt-progress-axis,.dt-history-top,.dt-history-row,.dt-progress-stats>div) {display:flex;justify-content:space-between;align-items:baseline;gap:10px;}
html:root.ivy-duo-mode .dt-panel .dt-progress-axis {font-size:9px;color:var(--dt-muted);}
html:root.ivy-duo-mode .dt-panel :is(.dt-history-row strong,.dt-progress-stats strong) {font-size:13px;text-align:right;overflow-wrap:anywhere;}
html:root.ivy-duo-mode .dt-panel .dt-progress-more {min-height:44px;border:0;border-radius:12px;background:var(--dt-card);color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .dt-old-receipts>p {margin-bottom:12px;}

html:root.ivy-duo-mode .dt-panel .dt-progress-waiting {padding:20px 0;color:var(--dt-muted);font-size:13px;line-height:1.5;}

html:root.ivy-duo-mode .dt-panel .dt-progress-chart {max-height:230px;}
html:root.ivy-duo-mode .dt-panel .dt-receipt-stack {display:block;background:none;padding:0;border:0;border-radius:20px;isolation:isolate;}
html:root.ivy-duo-mode .dt-panel .dt-opening-receipt {position:relative;z-index:2;display:flex;flex-direction:column;gap:10px;background:var(--dt-card);border:1px solid transparent;border-radius:20px;padding:18px;}
html:root.ivy-duo-mode .dt-panel .dt-receipt-stack.is-selected .dt-opening-receipt {border-color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .dt-opening-receipt>strong {font-size:14px;}
html:root.ivy-duo-mode .dt-panel .dt-closing-receipt {position:relative;z-index:1;margin:-22px 8px 0;padding:22px 12px 0;border-radius:0 0 18px 18px;background:color-mix(in srgb,var(--dt-card),var(--dt-blue) 9%);transition:margin .28s ease,transform .28s ease,border-radius .28s ease;}
html:root.ivy-duo-mode .dt-panel .dt-close-toggle {width:100%;min-height:54px;padding:10px 0;display:flex;flex-direction:column;align-items:flex-start;gap:5px;border:0;background:none;color:var(--dt-text);text-align:left;}
html:root.ivy-duo-mode .dt-panel .dt-close-toggle strong {font-size:13px;}
html:root.ivy-duo-mode .dt-panel .dt-close-cue {font-size:11px;color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .dt-close-details:not([hidden]) {display:flex;flex-direction:column;gap:10px;padding:4px 0 16px;animation:dt-receipt-reveal .28s ease both;}
html:root.ivy-duo-mode .dt-panel .dt-receipt-stack.is-raised .dt-closing-receipt {z-index:3;margin:-50px 0 0;padding-top:6px;border-radius:18px;box-shadow:0 -8px 24px #00000014;transform:translateY(-3px);}
@keyframes dt-receipt-reveal {from {opacity:0;transform:translateY(10px);}to {opacity:1;transform:translateY(0);}}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel :is(.dt-closing-receipt,.dt-close-details) {transition:none!important;animation:none!important;}}
html:root.ivy-duo-mode .dt-panel .dt-progress-stats>div>strong {flex-shrink:0;white-space:nowrap;}

/* Compact Progress: trade details stay inside the chart until requested. */
html:root.ivy-duo-mode .dt-panel .dt-progress-hero {gap:6px;padding:18px 16px 10px;}
html:root.ivy-duo-mode .dt-panel .dt-progress-value {color:var(--dt-text);font-size:34px;letter-spacing:-1.2px;}
html:root.ivy-duo-mode .dt-panel .dt-progress-chart {max-height:240px;margin-top:14px;}
html:root.ivy-duo-mode .dt-panel .dt-chart-surface {position:relative;}
html:root.ivy-duo-mode .dt-panel .dt-trade-marker {cursor:pointer;outline:none;}
html:root.ivy-duo-mode .dt-panel .dt-trade-marker:focus-visible>rect:nth-child(2) {stroke-width:3;}
html:root.ivy-duo-mode .dt-panel .dt-chart-popover {position:absolute;z-index:4;inset:8px 0 auto;max-height:190px;overflow:auto;background:var(--dt-card);border:1px solid color-mix(in srgb,var(--dt-muted),transparent 75%);box-shadow:0 6px 22px #0002;border-radius:16px;padding:8px 32px 8px 10px;animation:dt-receipt-reveal .18s ease both;}
html:root.ivy-duo-mode .dt-panel .dt-chart-event {width:100%;display:flex;flex-direction:column;gap:5px;text-align:left;padding:9px 0;border:0;background:none;color:var(--dt-text);min-height:44px;}
html:root.ivy-duo-mode .dt-panel .dt-chart-event strong {font-size:12px;}
html:root.ivy-duo-mode .dt-panel .dt-chart-receipt-link {font-size:11px;color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .dt-chart-dismiss {position:absolute;right:0;top:0;width:36px;height:36px;background:none;border:0;color:var(--dt-muted);font-size:22px;}
html:root.ivy-duo-mode .dt-panel .dt-period-details>summary {padding:8px 4px;color:var(--dt-muted);font-size:12px;cursor:pointer;}
html:root.ivy-duo-mode .dt-panel .dt-period-details .dt-progress-stats {margin-top:8px;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel .dt-chart-popover {animation:none;}}

html:root.ivy-duo-mode .dt-panel .dt-chart-popover {inset:48px 0 auto;animation:dt-chart-unfold .36s cubic-bezier(.22,1,.36,1) both;}
@keyframes dt-chart-unfold {0%{opacity:0;transform:translateY(-6px) scale(.94);}70%{opacity:1;transform:translateY(0) scale(1.006);}100%{opacity:1;transform:translateY(0) scale(1);}}
html:root.ivy-duo-mode .dt-panel .dt-closing-receipt {transition:margin .36s cubic-bezier(.22,1,.36,1),transform .36s cubic-bezier(.22,1,.36,1),border-radius .36s cubic-bezier(.22,1,.36,1);}
html:root.ivy-duo-mode .dt-panel .dt-close-details:not([hidden]) {animation:none;overflow:hidden;box-sizing:border-box;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel .dt-chart-popover {animation:none;}}
/* The same push/back geometry and timing as Duo Settings. */
html:root.ivy-duo-mode .dt-panel .dt-shell {position:relative;overflow:hidden;}
html:root.ivy-duo-mode .dt-panel .dt-option-row {display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:52px;padding:14px 16px;border:0;border-radius:14px;background:var(--dt-card);color:var(--dt-text);font:400 15px/1.4 -apple-system,sans-serif;text-align:left;cursor:pointer;}
html:root.ivy-duo-mode .dt-panel .dt-option-row>span:last-child {font-size:23px;color:var(--dt-muted);line-height:1;}
html:root.ivy-duo-mode .dt-panel .dt-subpage {min-height:100%;background:var(--dt-bg);}
html:root.ivy-duo-mode .dt-panel .dt-subpage-header {display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-bottom:20px;}
html:root.ivy-duo-mode .dt-panel .dt-subpage-back {display:inline-flex;align-items:center;min-height:44px;margin:-8px 0 0 -8px;padding:8px;border:0;border-radius:12px;background:none;color:var(--dt-blue);font-size:15px;}
html:root.ivy-duo-mode .dt-panel .dt-subpage-body {display:flex;flex-direction:column;gap:16px;}
html:root.ivy-duo-mode .dt-panel .dt-nav-ghost {position:absolute;z-index:2;overflow:hidden;pointer-events:none;background:var(--dt-bg);padding:16px;box-sizing:border-box;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel {min-height:0!important;display:block!important;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel-content {min-height:0!important;padding-bottom:0!important;margin-bottom:0!important;}
html:root.ivy-duo-mode .dt-panel .dt-pnl-reveal {display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .34s cubic-bezier(.32,.72,0,1),opacity .22s ease;}
html:root.ivy-duo-mode .dt-panel .sim_PNL-panel.is-open .dt-pnl-reveal {grid-template-rows:1fr;opacity:1;}
html:root.ivy-duo-mode .dt-panel .dt-pnl-reveal>.sim_PNL-panel-detail {display:block!important;min-height:0!important;overflow:hidden!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;visibility:visible!important;opacity:1!important;}
html:root.ivy-duo-mode .dt-panel .dt-subpage .sim-risk-desk {display:block!important;}
html:root.ivy-duo-mode .dt-panel .dt-subpage .sim-chart-toolbar {display:flex!important;max-height:none!important;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel .dt-pnl-reveal {transition:none;}}

html:root.ivy-duo-mode .dt-panel .sim-action-popup.dt-has-subpage {height:var(--dt-subpage-height)!important;}
html:root.ivy-duo-mode .dt-panel .sim-action-popup .dt-subpage {background:var(--dt-card);}
html:root.ivy-duo-mode .dt-panel .dt-subpage .sim-chart-toolbar {padding:12px;background:var(--dt-card);border-radius:18px;}
html:root.ivy-duo-mode .dt-panel .dt-subpage :is(.trend-style-btn,.sim-chart-tool,.sim-indicator-toggle) {min-height:44px;font-size:12px;}
html:root.ivy-duo-mode .dt-panel .trend-style-icon {color:inherit!important;stroke:currentColor!important;}

html:root.ivy-duo-mode .dt-panel :is(.dt-nav-moving,.dt-nav-ghost) {transition:none!important;}
/* Both Settings and Trading now animate the same transform-based surfaces. */
html:root.ivy-duo-mode .dt-panel .dt-main {position:relative;background:var(--dt-bg);}
html:root.ivy-duo-mode .dt-panel .dt-order-navigation {position:relative;display:flex;justify-content:center;width:100%;max-height:100%;min-height:0;}
html:root.ivy-duo-mode .dt-panel .dt-nav-ghost {flex:none;pointer-events:none;overflow:hidden;}
html:root.ivy-duo-mode .dt-panel .dt-navigation-running {overflow:hidden!important;}
html:root.ivy-duo-mode .dt-panel .dt-navigation-running>.dt-main,
html:root.ivy-duo-mode .dt-panel .dt-navigation-running>.dt-order-navigation,
html:root.ivy-duo-mode .dt-panel .dt-nav-ghost {transition:none!important;will-change:transform;}

/* Compact grouped trade controls. */
html:root.ivy-duo-mode .dt-panel .dt-trade-card {padding:0 16px 16px!important;border-radius:18px!important;}
html:root.ivy-duo-mode .dt-panel .dt-leverage {min-height:56px;margin:0 0 14px;padding:8px 0;border-bottom:1px solid var(--dt-line);font-size:15px;}
html:root.ivy-duo-mode .dt-panel .dt-leverage-value {display:flex;align-items:center;justify-content:flex-end;margin-left:auto;gap:2px;color:var(--dt-blue);font-size:17px;font-weight:500;}
html:root.ivy-duo-mode .dt-panel .dt-leverage input {width:56px;min-height:40px;margin:0;padding:4px 0;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:6px;color:var(--dt-blue);font-size:17px;font-weight:500;text-align:right;appearance:textfield;-moz-appearance:textfield;}
html:root.ivy-duo-mode .dt-panel .dt-leverage input::-webkit-inner-spin-button,
html:root.ivy-duo-mode .dt-panel .dt-leverage input::-webkit-outer-spin-button {-webkit-appearance:none;margin:0;}
html:root.ivy-duo-mode .dt-panel .dt-trade-card .dt-actions {gap:10px;}
html:root.ivy-duo-mode .dt-panel .dt-trade-card .dt-actions button {min-height:44px;border-radius:12px;font-size:14px;font-weight:600;transition:opacity .12s ease,scale .18s cubic-bezier(.22,1,.36,1);}
html:root.ivy-duo-mode .dt-panel .dt-trade-card .sim_buy {background:var(--dt-blue)!important;color:#fff!important;}
html:root.ivy-duo-mode .dt-panel .dt-trade-card .sim_sell {background:color-mix(in srgb,var(--dt-loss),transparent 88%)!important;color:var(--dt-loss)!important;}
html:root.ivy-duo-mode .dt-panel .dt-trade-card .dt-actions button:active {opacity:.75;scale:.98;}
html:root.ivy-duo-mode .dt-panel .dt-trade-footnote {margin:-4px 12px 0;font-size:11px;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .dt-panel .dt-trade-card .dt-actions button {transition:none;scale:1;}}
/* Leverage edits inline, without a field outline on touch focus. */
html:root.ivy-duo-mode .dt-panel .dt-leverage input,
html:root.ivy-duo-mode .dt-panel .dt-leverage input:focus {outline:none!important;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0;caret-color:var(--dt-blue);}
html:root.ivy-duo-mode .dt-panel .dt-leverage input:focus-visible {text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px;}

.duo-trading-handle,.duo-trading-launch-dot {display:none;}
html:root.ivy-duo-mode .dt-panel {overflow:hidden!important;isolation:isolate;transition:none!important;}
html:root.ivy-duo-mode .dt-panel:not(.is-open) {display:none!important;}
html:root.ivy-duo-mode .dt-panel.is-open {display:block!important;opacity:1!important;pointer-events:auto!important;}
html:root.ivy-duo-mode .duo-trading-handle:not([hidden]) {display:flex;position:fixed;z-index:12010;width:120px;height:44px;align-items:center;justify-content:center;background:none!important;border:0!important;box-shadow:none!important;touch-action:none;cursor:grab;}
.duo-trading-handle span {display:block;width:80px;height:5px;border-radius:10px;background:#aaaab888;box-shadow:inset 0 1px 0 #ffffff88;}
html:root.ivy-duo-mode .duo-trading-launch-dot.is-active {display:block;position:fixed;z-index:12009;width:20px;height:20px;background:#8e8e93;border-radius:50%;pointer-events:none;}
html:root.ivy-duo-mode .dt-panel.duo-settings-revealing {transition:none!important;will-change:translate,scale;}
html:root.ivy-duo-mode .dt-panel.duo-settings-dragging {translate:var(--duo-drag-x,0px) var(--duo-drag-y,0px)!important;scale:var(--duo-drag-scale,1)!important;transform-origin:center!important;transition:none!important;}
html:root.ivy-duo-mode .dt-panel.duo-settings-collapsing {clip-path:inset(0 round var(--duo-close-round,32px))!important;pointer-events:none!important;}

html:root.ivy-duo-mode .dt-panel .dt-main {padding-top:max(16px,env(safe-area-inset-top));}
html:root.ivy-duo-mode .dt-panel .dt-tabs {padding-bottom:46px;}

/* Keep the grabber in the panel's transformed layer, with no separate easing. */
html:root.ivy-duo-mode .dt-panel .duo-trading-handle:not([hidden]) {position:absolute!important;left:calc(50% - 60px)!important;top:auto!important;bottom:1px!important;margin:0!important;transform:none!important;translate:none!important;scale:none!important;transition:none!important;animation:none!important;}
html:root.ivy-duo-mode .dt-panel .duo-trading-handle span {transition:none!important;animation:none!important;}

html:root.ivy-duo-mode .dt-panel .dt-progress-chart {user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}

/* Cash is an inset card row, not the legacy clipped glass pill. */
html:root.ivy-duo-mode .dt-panel .dt-account .sim_balance-pill {border-radius:0!important;overflow:visible!important;max-width:none;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;font-style:normal;letter-spacing:normal;box-shadow:none!important;}
html:root.ivy-duo-mode .dt-panel .dt-account .sim_balance-pill::before {font-style:normal;flex-shrink:0;}
html:root.ivy-duo-mode .dt-panel .dt-account .sim_balance-pill-value {min-width:0;overflow-wrap:anywhere;white-space:normal;text-align:right;text-shadow:none!important;}

/* Android: move the chart and sheet as one composited surface, like Settings. */
html:root.ivy-duo-mode .dt-panel.dt-compositor-motion {transform:translate3d(0,0,0) scale(1);transform-origin:center!important;}
html:root.ivy-duo-mode .dt-panel.dt-compositor-motion.is-open {will-change:transform!important;}
html:root.ivy-duo-mode .dt-panel.dt-compositor-motion.duo-settings-dragging {translate:none!important;scale:none!important;will-change:transform!important;}
html:root.ivy-duo-mode .dt-panel.dt-compositor-motion.duo-settings-collapsing {clip-path:none!important;}

html:root.ivy-duo-mode .dt-panel .dt-progress-position-status {margin:4px 0 0;color:var(--dt-text);font-size:12px;line-height:1.5;}
html:root.ivy-duo-mode .dt-panel .dt-progress-explanation {margin:8px 0 4px;color:var(--dt-muted);font-size:12px;line-height:1.5;}
html:root.ivy-duo-mode .dt-panel .dt-chart-surface>.dt-progress-more {display:block;margin:0 auto;background:none;font-size:12px;min-height:36px;}

/* Compact graph mode control uses the shared toolbar optic unchanged. */
html:root.ivy-duo-mode .dt-panel .dt-progress-modes {position:relative;isolation:isolate;display:flex;align-self:flex-end;gap:2px;padding:3px;margin:0 0 10px;border-radius:999px;background:var(--dt-bg);}
html:root.ivy-duo-mode .dt-panel .dt-progress-modes>button {position:relative;z-index:1;min-width:66px;min-height:32px;padding:5px 12px;border:0;border-radius:999px;background:transparent;box-shadow:none;color:var(--dt-muted);font-size:12px;font-weight:500;}
html:root.ivy-duo-mode .dt-panel .dt-progress-modes>button[aria-pressed=true] {color:var(--dt-text);}
html:root.ivy-duo-mode .dt-panel .dt-progress-modes>button:focus-visible {outline:2px solid var(--dt-blue);outline-offset:3px;}

/* Open Duo: preserve Market's two-column dashboard beside the navigation rail. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-shell {display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:12px;padding-right:58px;box-sizing:border-box;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-main {grid-column:1;min-width:0;height:100%;box-sizing:border-box;padding:20px 0 20px 20px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-tabs {grid-column:2;align-self:end;justify-self:center;display:flex;flex-direction:column;gap:5px;width:78px;box-sizing:border-box;padding:6px!important;margin:0 0 48px;border:0;border-radius:39px;background:#e7e7ed;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-tabs .dt-tab {flex:none;min-height:66px;width:66px;padding:8px 2px;border-radius:33px;font-size:10px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas.dark-mode .dt-panel .dt-tabs {background:#25262c;}

/* Trading navigation sits above its quick-control pill on the same centreline. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-shell {grid-template-columns:minmax(0,1fr) 88px;padding-right:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-tabs {margin-bottom:190px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .trading__sim-panel.dt-panel > .duo-quick-pill {right:26px!important;}

/* Size the chart from the panel, leaving a complete compact dashboard below. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-shell {grid-template-rows:minmax(0,1fr);}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market {display:grid;height:100%;min-height:0;box-sizing:border-box;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(140px,1fr) auto auto auto;gap:8px 12px;align-items:stretch;align-content:start;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market > .trading__sim-panel-graph {grid-column:1/-1;grid-row:1;min-height:0;gap:4px;padding:8px 0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market .trading__sim-panel-graph-inner {flex:1 1 0;height:auto!important;min-height:0!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market .dt-chart-readout {min-height:24px;padding-top:2px;padding-bottom:2px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market > .dt-quote {grid-column:1;grid-row:2/4;padding:12px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market > .dt-trade-card {grid-column:2;grid-row:2;padding:0 12px 10px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market .dt-leverage {min-height:40px;margin-bottom:8px;padding:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market > .dt-quick {grid-column:2;grid-row:3;margin:0;padding:0 12px!important;border-radius:14px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market > .dt-quick summary {min-height:36px;padding:6px 0;box-sizing:border-box;font-size:12px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market > .dt-trade-footnote {grid-column:1/-1;grid-row:4;margin:0;font-size:10px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-quote .trading__sim-panel-current-block {margin:6px 0!important;padding:0!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-quote .current-price {font-size:28px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-quote .trading__sim-stats-bar {padding-top:8px!important;margin-top:6px!important;}

/* Open Duo Portfolio: paired summaries, with positions beside live P&L. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:12px;align-items:start;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio > .dt-account {grid-column:1;grid-row:1;align-self:stretch;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio > .sim-desk-metrics {grid-column:2;grid-row:1;align-self:stretch;align-content:center;gap:20px 16px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio > .sim_PNL-panel {grid-column:1;grid-row:2;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio > .sim-open-positions-panel {grid-column:2;grid-row:2;min-height:0!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio .opp-empty {padding:18px 0 8px;margin:0;text-align:left;font-style:normal;letter-spacing:normal;font-size:13px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio .opp-header {letter-spacing:normal;text-transform:none;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-portfolio .sim-desk-metric strong {overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}

/* The chart reserves the same lower workspace in both states. Hide dashboards
   without removing their layout boxes while the ticket occupies that workspace. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel:has(.dt-order-cover:not([hidden])) .dt-market > :not(.trading__sim-panel-graph) {visibility:hidden;pointer-events:none;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-order-cover {inset:auto 100px 16px 20px;height:288px;padding:0;background:transparent;box-sizing:border-box;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup:is(.is-open,.dt-order-leaving) {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:40px auto auto auto auto;gap:6px 16px;align-content:start;width:100%!important;max-width:none;height:100%!important;box-sizing:border-box;padding:12px!important;overflow:visible!important;box-shadow:0 4px 16px #0001;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-header {grid-column:1/-1;grid-row:1;position:static;padding:0;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-ticket-quote {grid-column:1;grid-row:2;padding:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-ticket-spark {display:none;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-ticket-price {flex-wrap:wrap;gap:2px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-ticket-price strong {font-size:22px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-ticket-explanation {grid-column:1;grid-row:3/6;margin:0;font-size:11px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-order-types {grid-column:2;grid-row:2;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-label {grid-column:2;margin:0;font-size:10px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-price-row {grid-column:2;grid-row:4;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-label:first-of-type {grid-row:3;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-label:last-of-type {grid-row:5;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-qty-row {grid-column:2;grid-row:6;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market-order .sim-action-popup-label:last-of-type {grid-row:3;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-market-order .sim-action-popup-qty-row {grid-row:4;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup > .dt-option-row {grid-column:3;grid-row:2;font-size:11px;padding:4px;min-height:36px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-summary {grid-column:3;grid-row:3/5;padding:8px;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-confirm {grid-column:3;grid-row:5/7;margin:0;min-height:40px;align-self:end;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-error {grid-column:1;grid-row:6;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-order-navigation {height:100%;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup.dt-has-subpage {display:block!important;height:100%!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup .sim-risk-desk__grid {grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;}

/* Compact ticket occupies only the dashboard space; the chart keeps its original layout. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .dt-order-cover {height:190px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup:is(.is-open,.dt-order-leaving) {grid-template-rows:28px 36px 14px 36px 14px 36px;gap:2px 12px;padding:8px 12px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-close {min-height:28px;min-width:28px;width:28px;height:28px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup .sim-order-type {min-height:30px;padding:4px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup :is(input,select) {min-height:34px;height:34px;padding:5px 8px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-summary {grid-row:3/6;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup-confirm {grid-row:6;min-height:34px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup .dt-subpage-header {margin:0;padding:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .dt-panel .sim-action-popup .sim-risk-desk {margin-top:4px;padding:8px;}
