:root{
  --bg:#0b0e11; --panel:#12161f; --panel2:#181d29; --panel3:#1e2534;
  --border:#232b3a; --text:#eaecef; --muted:#848e9c;
  --yellow:#f0b90b; --green:#0ecb81; --red:#f6465d; --blue:#3b82f6; --purple:#a78bfa;
}
*{margin:0;padding:0;box-sizing:border-box}
[hidden]{display:none!important}
body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Helvetica Neue',Arial,sans-serif;font-size:15px;line-height:1.45;overflow:hidden;-webkit-font-smoothing:antialiased}
.mono{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-variant-numeric:tabular-nums}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#2a3242;border-radius:4px}
::-webkit-scrollbar-track{background:transparent}

/* ===== LAYOUT ===== */
.app{display:flex;height:100vh}
.sidebar{width:236px;background:var(--panel);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0}
.logo{display:flex;align-items:center;gap:10px;padding:20px 18px;border-bottom:1px solid var(--border)}
.logo-icon{width:36px;height:36px;border-radius:9px;background:linear-gradient(135deg,var(--yellow),#c99400);display:flex;align-items:center;justify-content:center;color:#000;font-size:17px}
.logo h1{font-size:16px;font-weight:800;letter-spacing:.3px}
.logo span{display:block;font-size:11px;color:var(--muted);font-weight:500;letter-spacing:1px;text-transform:uppercase}
.nav{padding:14px 10px;flex:1}
.nav-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1.2px;padding:12px 12px 6px}
.nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;color:var(--muted);text-decoration:none;font-size:14px;font-weight:500;margin-bottom:2px;cursor:pointer;transition:.15s}
.nav a i{width:18px;text-align:center}
.nav a:hover{background:var(--panel2);color:var(--text)}
.nav a.active{background:rgba(240,185,11,.1);color:var(--yellow)}
.nav .badge{margin-left:auto;background:var(--red);color:#fff;font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px}
.sidebar-footer{padding:10px;border-top:1px solid var(--border);position:relative}
.avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--blue),var(--purple));display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
.account-trigger{width:100%;height:48px;border:1px solid transparent;background:transparent;color:var(--text);display:flex;align-items:center;gap:10px;padding:6px;border-radius:8px;cursor:pointer;text-align:left;transition:.15s}
.account-trigger:hover,.account-trigger[aria-expanded="true"]{background:var(--panel2);border-color:var(--border)}
.account-summary{display:flex;flex:1;min-width:0;flex-direction:column;line-height:1.3}
.account-summary b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-summary span{font-size:12px;color:var(--muted)}
.account-chevron{font-size:10px;color:var(--muted);transition:transform .15s}
.account-trigger[aria-expanded="true"] .account-chevron{transform:rotate(180deg)}
.account-menu{display:none;position:absolute;left:10px;right:10px;bottom:68px;background:var(--panel2);border:1px solid var(--border);border-radius:8px;box-shadow:0 18px 45px rgba(0,0,0,.55);padding:8px;z-index:80}
.account-menu.show{display:block}
.account-menu-head{display:flex;align-items:center;gap:10px;padding:8px 8px 12px;border-bottom:1px solid var(--border)}
.account-menu-head>span:last-child{display:flex;min-width:0;flex-direction:column}
.account-menu-head b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu-head small{font-size:12px;color:var(--muted);margin-top:2px}
.account-meta{padding:10px 8px;border-bottom:1px solid var(--border);display:grid;gap:7px}
.account-meta div{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}
.account-meta span{color:var(--muted)}
.account-meta b{font-weight:600;color:var(--text)}
.account-menu-action{width:100%;height:36px;border:0;background:transparent;color:var(--text);display:grid;grid-template-columns:18px 1fr 12px;align-items:center;gap:8px;padding:0 9px;margin-top:4px;border-radius:6px;cursor:pointer;text-align:left;font-family:inherit;font-size:13px}
.account-menu-action:hover{background:var(--panel3)}
.account-menu-action i:last-child{font-size:9px;color:var(--muted)}
.account-menu-action.danger{color:var(--red);grid-template-columns:18px 1fr}

.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:60px;background:var(--panel);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:18px;padding:0 22px;flex-shrink:0}
.topbar h2{font-size:17px;font-weight:700}
.search{background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:8px 12px;display:flex;align-items:center;gap:8px;width:230px}
.search input{background:none;border:none;outline:none;color:var(--text);font-family:inherit;width:100%}
.search i{color:var(--muted);font-size:12px}
.topbar .spacer{flex:1}
.ticker{display:flex;align-items:center;gap:8px;font-size:12px}
.ticker .coin{display:flex;align-items:center;gap:6px;background:var(--panel2);border:1px solid var(--border);padding:6px 11px;border-radius:8px}
.ticker b{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.up{color:var(--green)} .down{color:var(--red)}
.net-badge{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;padding:6px 12px;border-radius:8px;letter-spacing:.5px}
.net-badge.testnet{background:rgba(240,185,11,.12);color:var(--yellow);border:1px solid rgba(240,185,11,.3)}
.net-badge.mainnet{background:rgba(246,70,93,.12);color:var(--red);border:1px solid rgba(246,70,93,.35)}
.exchange-badge{display:inline-flex;align-items:center;justify-content:center;font-size:9.5px;font-weight:800;padding:1px 6px;border-radius:6px;letter-spacing:.3px;line-height:1.5}
.exchange-badge.lg{font-size:11px;padding:6px 12px;border-radius:8px;letter-spacing:.5px}
.live-dot{width:7px;height:7px;border-radius:50%;background:currentColor;animation:pulse 1.6s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
.icon-btn{background:var(--panel2);border:1px solid var(--border);color:var(--muted);width:38px;height:38px;border-radius:8px;cursor:pointer;position:relative;font-size:14px;transition:.15s}
.icon-btn:hover{color:var(--text);border-color:#33405a}
.icon-btn .dot{position:absolute;top:4px;right:4px;min-width:15px;height:15px;padding:0 3px;background:var(--red);color:#fff;border-radius:8px;border:2px solid var(--panel);display:none;align-items:center;justify-content:center}
.onboarding-help-button{flex:0 0 auto}
.onboarding-help-dot{position:absolute;top:6px;right:6px;width:7px;height:7px;border-radius:50%;background:var(--yellow);box-shadow:0 0 0 2px var(--panel2)}
.onboarding-panel{position:fixed;z-index:90;top:72px;right:14px;display:flex;width:min(390px,calc(100vw - 28px));max-height:calc(100vh - 86px);flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:0 24px 64px rgba(0,0,0,.48);opacity:0;visibility:hidden;transform:translateX(24px);transition:opacity .18s ease,transform .22s cubic-bezier(.16,1,.3,1),visibility 0s linear .22s}
.onboarding-panel.show{opacity:1;visibility:visible;transform:translateX(0);transition-delay:0s}
.onboarding-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:19px 18px 16px;border-bottom:1px solid var(--border)}
.onboarding-panel-head h3{margin:0;font-size:16px;line-height:1.35}.onboarding-panel-head p{margin:4px 0 0;color:var(--muted);font-size:12.5px;line-height:1.45}
.onboarding-progress{padding:16px 18px 14px;background:var(--panel2)}
.onboarding-progress>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;font-size:12px}.onboarding-progress strong{color:var(--text);font-weight:650}.onboarding-progress span{color:var(--muted);font-variant-numeric:tabular-nums}
.onboarding-progress-track{height:5px;overflow:hidden;border-radius:4px;background:var(--panel3)}.onboarding-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:var(--yellow);transition:width .25s cubic-bezier(.16,1,.3,1)}
.onboarding-steps{display:flex;min-height:0;flex:0 1 auto;flex-direction:column;margin:0;padding:5px 18px 10px;overflow-y:auto;list-style:none}
.onboarding-steps li[hidden]{display:none}
.onboarding-steps li{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:11px;align-items:center;padding:15px 0;border-bottom:1px solid var(--border)}
.onboarding-step-state{display:grid;width:34px;height:34px;place-items:center;border:1px solid var(--border);border-radius:9px;background:var(--panel2);color:var(--muted);font-size:13px}.onboarding-steps li.complete .onboarding-step-state{border-color:rgba(14,203,129,.3);background:rgba(14,203,129,.1);color:var(--green)}
.onboarding-steps li strong{display:block;color:var(--text);font-size:13.5px;line-height:1.35}.onboarding-steps li p{margin:3px 0 0;color:var(--muted);font-size:11.5px;line-height:1.45}
.onboarding-steps li>button{min-height:32px;padding:0 9px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);color:var(--text2);font:inherit;font-size:11.5px;font-weight:650;cursor:pointer;transition:border-color .15s ease,background .15s ease,color .15s ease}.onboarding-steps li>button:hover{border-color:#3a465c;background:var(--panel3);color:var(--text)}.onboarding-steps li.complete>button{color:var(--muted)}
.onboarding-ready{display:grid;grid-template-columns:24px 1fr;gap:10px;align-items:start;margin:0 18px 14px;padding:12px;border:1px solid rgba(14,203,129,.28);border-radius:9px;background:rgba(14,203,129,.08)}.onboarding-ready>i{margin-top:2px;color:var(--green)}.onboarding-ready strong,.onboarding-ready span{display:block}.onboarding-ready strong{font-size:13px}.onboarding-ready span{margin-top:2px;color:var(--text2);font-size:11.5px;line-height:1.45}
.onboarding-panel-foot{display:grid;grid-template-columns:1fr;gap:8px;padding:14px 18px 13px;border-top:1px solid var(--border);background:var(--panel2)}.onboarding-panel-foot .btn{width:100%;min-height:36px;justify-content:center}.onboarding-panel-foot .onboarding-explore{color:var(--text2)}.onboarding-panel-foot span{margin-top:2px;color:var(--muted);font-size:11px;line-height:1.45;text-align:center}

/* Driver.js is only the spotlight layer; these overrides keep it in SignalPilot's visual system. */
.driver-popover.signalpilot-tour{max-width:320px;padding:15px 16px;border:1px solid #30394a;border-radius:11px;background:var(--panel2);color:var(--text);box-shadow:0 18px 48px rgba(0,0,0,.52)}
.driver-popover.signalpilot-tour .driver-popover-title{color:var(--text);font-family:inherit;font-size:15px;line-height:1.35;font-weight:700}.driver-popover.signalpilot-tour .driver-popover-description{margin-top:6px;color:var(--text2);font-family:inherit;font-size:12.5px;line-height:1.55}.driver-popover.signalpilot-tour .driver-popover-progress-text{color:var(--muted);font-family:inherit;font-size:10.5px}
.driver-popover.signalpilot-tour button{min-height:32px;padding:0 11px;border:1px solid var(--border);border-radius:7px;background:var(--panel3);color:var(--text);font-family:inherit;font-size:11.5px;font-weight:650;text-shadow:none}.driver-popover.signalpilot-tour button:hover,.driver-popover.signalpilot-tour button:focus{border-color:#46536b;background:#252d3d;color:var(--text)}
.driver-popover.signalpilot-tour .driver-popover-next-btn,.driver-popover.signalpilot-tour .driver-popover-done-btn{border-color:var(--yellow);background:var(--yellow);color:#080a0e}.driver-popover.signalpilot-tour .driver-popover-next-btn:hover,.driver-popover.signalpilot-tour .driver-popover-done-btn:hover{background:#ffcf33;color:#080a0e}.driver-popover.signalpilot-tour .driver-popover-close-btn{color:var(--muted)}
.driver-popover.signalpilot-tour .driver-popover-arrow-side-left.driver-popover-arrow{border-left-color:var(--panel2)}.driver-popover.signalpilot-tour .driver-popover-arrow-side-right.driver-popover-arrow{border-right-color:var(--panel2)}.driver-popover.signalpilot-tour .driver-popover-arrow-side-top.driver-popover-arrow{border-top-color:var(--panel2)}.driver-popover.signalpilot-tour .driver-popover-arrow-side-bottom.driver-popover-arrow{border-bottom-color:var(--panel2)}
body.onboarding-guided-tour .page.active{animation:none}
@media(max-width:700px){.onboarding-panel{top:66px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 74px)}.onboarding-steps li{grid-template-columns:34px minmax(0,1fr)}.onboarding-steps li>button{grid-column:2;justify-self:start}.onboarding-panel-foot span{text-align:left}}
@media(prefers-reduced-motion:reduce){.onboarding-panel,.onboarding-progress-track i{transition:none}.driver-overlay{transition:none!important}}
.icon-btn .dot b{font-size:8px;line-height:1;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.notif-wrap{position:relative}
.notif-panel{position:absolute;right:0;top:48px;width:320px;background:var(--panel2);border:1px solid var(--border);border-radius:12px;display:none;z-index:50;box-shadow:0 12px 40px rgba(0,0,0,.5);overflow:hidden}
.notif-panel.show{display:block}
.notif-panel h4{padding:13px 15px;border-bottom:1px solid var(--border);font-size:13px}
.notif-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding-right:10px}
.notif-heading h4{border:0}
#notifList{max-height:380px;overflow-y:auto}
.notif-item{padding:11px 15px;border-bottom:1px solid var(--border);font-size:13px;display:flex;gap:10px}
.notif-item i{margin-top:2px}
.notif-item .notif-copy{min-width:0}
.notif-item .notif-title{font-weight:600;color:var(--text)}
.notif-item span{color:var(--muted);display:block;font-size:12px;margin-top:2px;white-space:normal;overflow-wrap:anywhere}

.content{flex:1;overflow-y:auto;padding:24px}
.page{display:none;animation:fadeIn .25s ease}
.page.active{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.page-head h3{font-size:24px;font-weight:700;letter-spacing:-.02em}
.page-head p{color:var(--muted);font-size:14px;margin-top:4px;line-height:1.5}
.page-actions{display:flex;align-items:center;gap:10px;min-width:0}
.compact-value{font-size:16px!important;line-height:1.3!important}

/* ===== COMPONENTS ===== */
.card{background:var(--panel);border:1px solid var(--border);border-radius:12px}
.card-h{padding:15px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.card-h h4{font-size:16px;font-weight:650;letter-spacing:-.01em}
.card-actions{display:flex;align-items:center;gap:8px}
.card-subtitle{color:var(--muted);font-size:12px;margin-top:4px}
.equity-summary{display:flex;align-items:baseline;gap:9px;min-height:32px;margin-top:7px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.equity-summary strong{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:clamp(21px,1.7vw,26px);line-height:1.15;color:var(--text);letter-spacing:-.025em}
.equity-summary span{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:13px;font-weight:700;color:var(--muted)}
.equity-summary span.up{color:var(--green)}
.equity-summary span.down{color:var(--red)}
.equity-summary small{font-size:12px;color:var(--muted)}
.equity-chart-wrap{position:relative;min-width:0;outline:none;cursor:crosshair}
.equity-chart-wrap:focus-visible{outline:2px solid var(--yellow);outline-offset:4px;border-radius:4px}
.equity-chart-wrap canvas{display:block;width:100%;height:250px;touch-action:pan-y}
.equity-tooltip{position:absolute;z-index:2;top:10px;left:0;min-width:112px;padding:8px 10px;border:1px solid #33405a;border-radius:7px;background:var(--panel3);box-shadow:0 8px 24px rgba(0,0,0,.28);pointer-events:none;transform:translateX(10px);font-variant-numeric:tabular-nums}
.equity-tooltip.align-right{transform:translateX(calc(-100% - 10px))}
.equity-tooltip span{display:block;color:var(--muted);font-size:12px;white-space:nowrap}
.equity-tooltip strong{display:block;margin-top:2px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:13px;white-space:nowrap}
.card-b{padding:18px}
.grid{display:grid;gap:16px}
.grid>*{min-width:0}
.g5{grid-template-columns:repeat(5,1fr)}
.g6{grid-template-columns:repeat(6,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g2-1{grid-template-columns:2fr 1fr}
.g1-2{grid-template-columns:1fr 2fr}

.stat{padding:18px}
.stat .label{color:var(--muted);font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px}
.stat .label i{font-size:13px}
.stat .value{font-size:24px;font-weight:700;margin:9px 0 4px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.stat .delta{font-size:13px;font-weight:400}
.stat .spark{margin-top:10px}

/* Signals uses the V2 summary composition with V1 colors and live data. */
.signals-page-head h3{font-size:clamp(25px,2.2vw,34px);line-height:1.2}
.signals-page-head .page-actions{align-self:flex-end}
.signals-page-head .dashboard-running-state{font-size:13px}
.signals-refresh{display:inline-flex;align-items:center;gap:8px}
.signals-summary-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.signals-summary-item{position:relative;min-width:0;padding:18px 20px}
.signals-summary-item+.signals-summary-item::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.signals-summary-item>span,.signals-summary-item>small{display:block;color:var(--muted);line-height:1.45}
.signals-summary-item>span{font-size:14px;font-weight:600}
.signals-summary-item>small{font-size:13px;font-weight:400}
.signals-summary-item>strong{display:block;margin:8px 0 4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:24px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
.signals-summary-item>strong.up{color:var(--green)}
.signals-history-head{min-height:70px}
.signals-history-head .card-subtitle{font-size:13px}
@media(max-width:1000px){
  .signals-summary-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .signals-summary-item:nth-child(3)::before{display:none}
  .signals-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
}
@media(max-width:480px){
  .signals-summary-rail{grid-template-columns:1fr}
  .signals-summary-item{padding:15px}
  .signals-summary-item+.signals-summary-item::before{display:none}
  .signals-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
  .signals-history-head{align-items:flex-start;flex-direction:column}
}

/* Positions & Orders: V2's grouped summary and one shared activity header. */
.positions-page-head h3{font-size:clamp(25px,2.2vw,34px);line-height:1.2}
.positions-page-head .page-actions{align-self:flex-end}
.positions-refresh{display:inline-flex;align-items:center;gap:8px}
.positions-summary-rail{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.positions-summary-item{position:relative;min-width:0;padding:18px 20px}
.positions-summary-item+.positions-summary-item::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.positions-summary-item>span,.positions-summary-item>small{display:block;color:var(--muted);line-height:1.45}
.positions-summary-item>span{font-size:14px;font-weight:600}
.positions-summary-item>small{font-size:13px;font-weight:400}
.positions-summary-item>strong{display:block;margin:8px 0 4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:clamp(17px,1.45vw,23px);line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.positions-summary-item>strong.up{color:var(--green)}
.positions-summary-item>strong.down{color:var(--red)}
.positions-activity-head{min-height:70px;gap:20px}
.positions-activity-head .card-subtitle{font-size:13px}
.positions-activity-head .tabs{flex-shrink:0}
.positions-tab-meta{padding:10px 18px;border-bottom:1px solid var(--border);color:var(--muted);font-size:13px}
.positions-table{min-width:1380px}
.position-pnl-stack{display:flex;flex-direction:column;align-items:flex-start;gap:3px;line-height:1.2;white-space:nowrap}
.position-pnl-stack strong{font-size:14px;font-weight:700}
.position-pnl-stack small{font-size:12px;font-weight:600}
.position-realized-pnl{white-space:nowrap}
.position-protection-toggle{display:flex;width:100%;min-width:150px;align-items:center;justify-content:space-between;gap:16px;padding:5px 7px;border:0;border-radius:7px;background:transparent;color:var(--text);text-align:left;cursor:pointer;transition:background-color .16s ease,color .16s ease}
.position-protection-toggle:hover{background:var(--panel3)}
.position-protection-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.position-protection-toggle>i{color:var(--dim);font-size:11px;transition:transform .18s cubic-bezier(.22,1,.36,1),color .16s ease}
.position-protection-toggle[aria-expanded="true"]>i{transform:rotate(180deg)}
.position-protection-toggle:hover>i{color:var(--text)}
.position-protection-summary{display:flex;min-width:0;flex-direction:column;gap:3px;line-height:1.25}
.position-protection-summary>strong{font-size:13px;font-weight:700;color:var(--text)}
.position-protection-summary>small{font-size:12px;font-weight:400;color:var(--muted);white-space:nowrap}
.position-protection-summary>.position-protection-stage{display:inline-flex;align-items:center;gap:5px;color:var(--text)}
.position-protection-summary>.position-protection-stage i{color:var(--muted);font-size:10px}
.position-protection-summary b{font-weight:600}
.position-protection-details>td{padding:0!important;background:var(--panel2)}
.position-protection-detail-inner{padding:18px 24px 22px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.position-protection-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:12px}
.position-protection-detail-heading>div:first-child{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.position-protection-detail-heading>div:first-child>strong{font-size:14px;color:var(--text)}
.position-protection-detail-heading>div:first-child>span{font-size:12px;color:var(--muted)}
.position-account-return{display:grid;grid-template-columns:auto auto;column-gap:8px;align-items:baseline;text-align:right;white-space:nowrap}
.position-account-return small,.position-account-return span{font-size:11px;color:var(--muted)}
.position-account-return strong{font-size:14px}.position-account-return span{grid-column:1/-1}
.position-protection-notice{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:12px;align-items:baseline;max-width:940px;margin:-2px 0 12px;padding:9px 0;border-block:1px solid var(--border);font-size:12px}
.position-protection-notice strong{color:var(--text);font-weight:650}
.position-protection-notice span{color:var(--muted);line-height:1.45}
.position-protection-ladder{width:100%;max-width:940px;border-collapse:collapse}
.position-protection-ladder th,.position-protection-ladder td{padding:9px 14px;text-align:left}
.position-protection-ladder th:first-child,.position-protection-ladder td:first-child{padding-left:0}
.position-protection-ladder th{border-bottom:1px solid var(--border);font-size:11px;font-weight:600;color:var(--dim);text-transform:uppercase;letter-spacing:.04em}
.position-protection-ladder td{border-bottom:1px solid var(--border);font-size:13px;color:var(--text)}
.position-protection-ladder tbody tr:last-child td{border-bottom:0}
.position-protection-ladder .protection-projected-pnl{font-variant-numeric:tabular-nums}
.position-protection-ladder .protection-projected-pnl strong{display:block;font-weight:650}
.position-protection-ladder .protection-projected-pnl small{display:block;margin-top:2px;color:var(--muted);font-size:11px;font-weight:400}
.position-protection-ladder .protection-projected-pnl .protection-account-impact{color:var(--text2);font-weight:600}
.protection-order-status{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;text-transform:capitalize}
.protection-order-status>span{width:6px;height:6px;border-radius:50%;background:var(--dim)}
.protection-order-status.active{color:var(--green)}
.protection-order-status.active>span{background:var(--green)}
.protection-order-status.pending{color:var(--blue)}
.protection-order-status.pending>span{background:var(--blue)}
.protection-order-status.unknown{color:var(--yellow)}
.protection-order-status.unknown>span{background:var(--yellow)}
.position-protection-empty{padding:18px 0!important;color:var(--muted)!important}
@media(prefers-reduced-motion:reduce){.position-protection-toggle,.position-protection-toggle>i{transition:none}}
.trade-daily-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--border);background:var(--panel2)}
.trade-daily-summary-item{position:relative;min-width:0;padding:15px 18px}
.trade-daily-summary-item+.trade-daily-summary-item::before{content:"";position:absolute;top:15px;bottom:15px;left:0;width:1px;background:var(--border)}
.trade-daily-summary-item>span,.trade-daily-summary-item>small{display:block;color:var(--muted);line-height:1.4}
.trade-daily-summary-item>span{font-size:14px;font-weight:600}
.trade-daily-summary-item>strong{display:block;margin:6px 0 3px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:20px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.trade-daily-summary-item>strong.up{color:var(--green)}
.trade-daily-summary-item>strong.down{color:var(--red)}
.trade-daily-summary-item>small{font-size:13px;font-weight:400;overflow-wrap:anywhere}
.trade-daily-summary-primary{background:rgba(59,130,246,.035)}
.positions-trade-toolbar{gap:16px}
.positions-trade-toolbar .card-subtitle{font-size:13px}
@media(max-width:1200px){
  .positions-summary-rail{grid-template-columns:repeat(3,minmax(0,1fr))}
  .positions-summary-item:nth-child(4)::before{display:none}
  .positions-summary-item:nth-child(n+4){border-top:1px solid var(--border)}
}
@media(max-width:800px){
  .positions-summary-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .positions-summary-item:nth-child(4)::before{display:block}
  .positions-summary-item:nth-child(odd)::before{display:none}
  .positions-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
  .positions-activity-head{align-items:flex-start;flex-direction:column;gap:12px}
  .trade-daily-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trade-daily-summary-item:nth-child(3)::before{display:none}
  .trade-daily-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
}
@media(max-width:480px){
  .positions-summary-rail{grid-template-columns:1fr}
  .positions-summary-item{padding:15px}
  .positions-summary-item+.positions-summary-item::before{display:none}
  .positions-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
  .positions-activity-head .tabs{max-width:100%;overflow-x:auto}
  .trade-daily-summary{grid-template-columns:1fr}
  .trade-daily-summary-item{padding:14px 15px}
  .trade-daily-summary-item+.trade-daily-summary-item::before{display:none}
  .trade-daily-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
}

/* Settings: account-wide state before detailed controls. */
.settings-page-head h3{font-size:clamp(25px,2.2vw,34px);line-height:1.2}
.settings-page-head .page-actions{align-self:flex-end}
.settings-refresh{display:inline-flex;align-items:center;gap:8px}
[data-action^="refresh-"][data-busy="true"] i{animation:refresh-control-spin .8s linear infinite}
@keyframes refresh-control-spin{to{transform:rotate(360deg)}}
.settings-summary-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.settings-summary-item{position:relative;min-width:0;padding:18px 20px}
.settings-summary-item+.settings-summary-item::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.settings-summary-item>span,.settings-summary-item>small{display:block;color:var(--muted);line-height:1.45}
.settings-summary-item>span{font-size:14px;font-weight:600}
.settings-summary-item>small{font-size:13px;font-weight:400;overflow-wrap:anywhere}
.settings-summary-item>strong{display:block;margin:8px 0 4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:24px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.settings-summary-item>strong.up{color:var(--green)}
.settings-summary-item>strong.warning{color:var(--yellow)}
.exchange-settings-card{min-width:0;overflow:hidden}
.exchange-settings-head{min-height:68px;padding:14px 18px}
.exchange-settings-title{display:flex;align-items:center;gap:11px;min-width:0}
.exchange-settings-title>div{min-width:0}
.exchange-settings-title h4{margin:0;font-size:15px;line-height:1.3}
.exchange-settings-title p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.35}
.exchange-settings-icon{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;background:rgba(59,130,246,.12);color:#7dabff}
.exchange-settings-body{padding:16px 18px 18px}
.exchange-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.exchange-settings-body>.field,.exchange-settings-grid .field{min-width:0;margin-bottom:14px}
.exchange-environment-control{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:42px;padding:0 12px;border:1px solid var(--border);border-radius:8px;background:var(--panel2)}
.exchange-environment-control>div{min-width:0}
.exchange-environment-control b{display:block;color:var(--text);font-size:13px;line-height:1.3}
.exchange-environment-control span{display:none}
.exchange-trading-controls{margin:0 0 14px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.exchange-trading-controls .check-row{min-height:58px;padding:10px 0}
.exchange-position-grid{margin-bottom:0}
.exchange-settings-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-top:14px}
.exchange-settings-actions .btn{justify-content:center;min-height:38px}
.exchange-capabilities{margin-top:14px;padding:2px 13px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.exchange-capability-row{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:43px;border-bottom:1px solid var(--border)}
.exchange-capability-row:last-child{border-bottom:0}
.exchange-capability-row>span:first-child{color:var(--muted);font-size:12.5px;line-height:1.4}
.exchange-capability-row .pill{flex:0 0 auto}
.exchange-capabilities-note{display:flex;align-items:flex-start;gap:7px;margin:11px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
.exchange-capabilities-note i{padding-top:2px;color:#7dabff}
.fee-reporting-card{margin-bottom:16px;overflow:hidden}
.fee-reporting-head{min-height:68px;padding:14px 18px}
.fee-reporting-title{display:flex;align-items:center;gap:11px;min-width:0}
.fee-reporting-title>div{min-width:0}
.fee-reporting-title h4{margin:0;font-size:15px;line-height:1.3}
.fee-reporting-title p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.35}
.fee-reporting-icon{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;background:rgba(59,130,246,.12);color:#7dabff}
.fee-reporting-body{padding:18px}
.fee-simulation-control{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.fee-simulation-control>div{min-width:0}
.fee-simulation-control b{display:block;color:var(--text);font-size:13px;line-height:1.4}
.fee-simulation-control span{display:block;margin-top:3px;color:var(--muted);font-size:12px;line-height:1.4}
.fee-reporting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.fee-reporting-grid .field{min-width:0;margin:0}
.fee-reporting-save{margin-top:16px}
.notification-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;margin-bottom:16px}
.notification-settings-card{display:flex;min-width:0;height:100%;flex-direction:column;overflow:hidden}
.notification-settings-head{min-height:68px;gap:16px;padding:14px 18px}
.notification-settings-title{display:flex;align-items:center;gap:11px;min-width:0}
.notification-settings-title>div{min-width:0}
.notification-settings-title h4{margin:0;font-size:15px;line-height:1.3}
.notification-settings-title p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.35}
.notification-settings-head>.pill{flex:0 0 auto}
.notification-settings-icon{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;font-size:14px}
.notification-settings-icon.telegram{background:rgba(59,130,246,.12);color:#60a5fa}
.notification-settings-icon.discord{background:rgba(88,101,242,.14);color:#7c89ff}
.notification-settings-body{display:flex;flex:1 1 auto;flex-direction:column;padding:18px}
.notification-settings-body>.f2{margin-bottom:0}
.notification-settings-body>.field{margin-bottom:16px}
.notification-event-list{min-width:0;margin:0;padding:0;border:0}
.notification-event-list .check-row{min-height:52px;padding:9px 0}
.notification-settings-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:auto;padding-top:16px}
.notification-settings-actions .btn{min-width:88px;justify-content:center}
.notification-settings-actions .notification-disconnect{color:var(--muted)}
.notification-settings-actions .notification-disconnect:hover{border-color:rgba(246,70,93,.4);color:var(--red)}
@media(max-width:1000px){
  .settings-summary-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .settings-summary-item:nth-child(3)::before{display:none}
  .settings-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
}
@media(max-width:480px){
  .settings-summary-rail{grid-template-columns:1fr}
  .settings-summary-item{padding:15px}
  .settings-summary-item+.settings-summary-item::before{display:none}
  .settings-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
}
@media(max-width:760px){
  .exchange-settings-grid{grid-template-columns:1fr}
  .exchange-settings-head{align-items:flex-start}
  .exchange-settings-actions{grid-template-columns:1fr}
  .fee-reporting-grid{grid-template-columns:1fr}
  .fee-reporting-head{align-items:flex-start}
  .notification-settings-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){[data-action^="refresh-"][data-busy="true"] i{animation:none}}

/* Dashboard layout: V1 data and palette in a quieter shared metric strip. */
.dashboard-overview{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:4px 0 22px}
.dashboard-overview h3{font-size:clamp(25px,2.2vw,34px);font-weight:700;letter-spacing:-.025em;line-height:1.2}
.dashboard-overview p{margin-top:7px;color:var(--muted);font-size:14px;line-height:1.55}
.dashboard-overview-status{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:9px 12px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--muted);font-size:13px;line-height:1.3;white-space:nowrap}
.dashboard-overview-status i{font-size:13px}
.dashboard-overview-status.fresh{border-color:rgba(14,203,129,.22);background:rgba(14,203,129,.07);color:#65ddb1}
.dashboard-overview-status.warning{border-color:rgba(240,185,11,.3);background:rgba(240,185,11,.08);color:var(--yellow)}
.dashboard-metric-rail{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.dashboard-metric-rail>.dashboard-metric{position:relative;min-width:0;padding:18px 20px}
.dashboard-metric-rail>.dashboard-metric+.dashboard-metric::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.dashboard-metric-rail .label i{display:none}
.dashboard-metric-rail .label{font-size:14px}
.dashboard-metric-rail .value{overflow-wrap:anywhere}
.dashboard-metric-rail>.dashboard-metric:first-child .value{font-size:clamp(23px,2vw,29px);letter-spacing:-.025em}
.dashboard-metric-rail .delta{line-height:1.45;overflow-wrap:anywhere}
.dashboard-primary{grid-template-columns:minmax(0,2.05fr) minmax(340px,.95fr)}
.dashboard-primary>.card{min-width:0}
.dashboard-equity-header{align-items:flex-start;gap:16px}
.dashboard-equity-header>div:first-child{min-width:0}
.dashboard-equity-header #equityTitle i,.dashboard-primary .risk-monitor-card .card-h h4 i{display:none}
.btn.btn-ghost.dashboard-header-link{border-color:transparent;background:transparent;color:var(--muted)}
.btn.btn-ghost.dashboard-header-link:hover{border-color:transparent;background:var(--panel2);color:var(--text)}
.dashboard-header-link .fa-arrow-right{transition:transform .18s ease-out}
.dashboard-header-link:hover .fa-arrow-right,.dashboard-header-link:focus-visible .fa-arrow-right{transform:translateX(3px)}
.dashboard-header-link:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.dashboard-header-link .fa-arrow-right{transition:none}.dashboard-header-link:hover .fa-arrow-right,.dashboard-header-link:focus-visible .fa-arrow-right{transform:none}}
.dashboard-primary .risk-monitor-card{min-height:390px}
.dashboard-primary .risk-monitor-body{gap:14px}
.dashboard-primary .risk-metrics{grid-template-columns:1fr;gap:11px}
.dashboard-primary .risk-metric-head{margin-bottom:6px}
.dashboard-primary .risk-metric>.risk-track{mask-image:repeating-linear-gradient(to right,#000 0 calc(10% - 3px),transparent calc(10% - 3px) 10%)}
@media(max-width:1500px){
  .dashboard-metric-rail{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-metric-rail>.dashboard-metric:nth-child(3n+1)::before{display:none}
  .dashboard-metric-rail>.dashboard-metric:nth-child(n+4){border-top:1px solid var(--border)}
}
@media(max-width:1100px){
  .dashboard-primary{grid-template-columns:1fr}
  .dashboard-primary .risk-monitor-card{min-height:0}
}
@media(max-width:700px){
  .dashboard-overview{align-items:flex-start;flex-direction:column;gap:8px;margin-bottom:18px}
  .dashboard-overview-status{white-space:normal}
  .dashboard-metric-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-metric-rail>.dashboard-metric{padding:15px}
  .dashboard-metric-rail>.dashboard-metric:nth-child(3n+1)::before{display:block}
  .dashboard-metric-rail>.dashboard-metric:nth-child(odd)::before{display:none}
  .dashboard-metric-rail>.dashboard-metric:nth-child(n+3){border-top:1px solid var(--border)}
.dashboard-equity-header{flex-wrap:wrap}
}

.bots-summary-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.bots-summary-item{position:relative;min-width:0;padding:18px 20px}
.bots-summary-item+.bots-summary-item::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.bots-summary-item>span,.bots-summary-item>small{display:block;color:var(--muted);font-size:13px;line-height:1.45}
.bots-summary-item>span{font-size:14px;font-weight:600}
.bots-summary-item>span em{font-size:12px;font-style:normal;font-weight:500}
.bots-summary-item>small{font-weight:400}
.bots-summary-item>strong{display:block;margin:8px 0 4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:24px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
.bots-summary-item>strong.up{color:var(--green)}
.bots-summary-item>strong.down{color:var(--red)}
.bots-summary-item>strong em{color:var(--muted);font-size:14px;font-style:normal;font-weight:500}
@media(max-width:1000px){
  .bots-summary-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bots-summary-item:nth-child(3)::before{display:none}
  .bots-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
}
@media(max-width:480px){
  .bots-summary-rail{grid-template-columns:1fr}
  .bots-summary-item{padding:15px}
  .bots-summary-item+.bots-summary-item::before{display:none}
.bots-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
}
.bots-collection{min-width:0}
.bots-collection .card-h{min-height:58px}
.bots-collection-body{padding:16px}
.bots-collection-body .bot-card{min-width:0}
.bots-sync{color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:700px){
  .bots-collection .card-h{align-items:center}
  .bots-collection-body{padding:12px}
}

.pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;padding:4px 10px;border-radius:20px;letter-spacing:.3px}
.pill.green{background:rgba(14,203,129,.12);color:var(--green)}
.pill.red{background:rgba(246,70,93,.12);color:var(--red)}
.pill.yellow{background:rgba(240,185,11,.12);color:var(--yellow)}
.pill.blue{background:rgba(59,130,246,.12);color:var(--blue)}
.pill.gray{background:rgba(132,142,156,.12);color:var(--muted)}
.pill.purple{background:rgba(167,139,250,.12);color:var(--purple)}

.btn{border:none;border-radius:8px;padding:9px 16px;font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:.15s}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn-primary{background:var(--yellow);color:#000}
.btn-primary:hover{background:#ffcf33}
.btn-ghost{background:var(--panel2);color:var(--text);border:1px solid var(--border)}
.btn-ghost:hover{border-color:#33405a}
.btn-danger{background:rgba(246,70,93,.12);color:var(--red);border:1px solid rgba(246,70,93,.3)}
.btn-danger:hover{background:rgba(246,70,93,.22)}
.btn-sm{padding:6px 11px;font-size:13px}
.btn-icon{width:30px;height:30px;padding:0;justify-content:center;background:var(--panel2);border:1px solid var(--border);color:var(--muted);border-radius:7px;cursor:pointer;transition:.15s}
.btn-icon:hover{color:var(--text)}

table{width:100%;border-collapse:collapse}
.table-card{overflow-x:auto}
.history-list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-right:16px}
.history-pager{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:max-content;padding:10px 16px;border-top:1px solid var(--border);color:var(--muted);font-size:12px}
.history-list-head .history-pager{padding:8px 0;border-top:0}
.history-pager-status{font-variant-numeric:tabular-nums;white-space:nowrap}
.history-pager-actions{display:flex;align-items:center;gap:6px}
.history-pager-actions button{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0 11px;border:1px solid var(--border);border-radius:8px;background:var(--panel2);color:var(--muted);font:inherit;font-weight:600;cursor:pointer}
.history-pager-actions button:hover:not(:disabled){border-color:var(--muted);color:var(--text);background:var(--panel3)}
.history-pager-actions button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.history-pager-actions button:disabled{cursor:not-allowed;opacity:.42}
.history-pager-page{min-width:72px;text-align:center;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.history-new-activity{gap:7px;color:var(--text)!important}
.history-new-activity i{color:var(--blue)}
@media(max-width:700px){.history-list-head{align-items:stretch;flex-direction:column;padding:8px 12px 0}.history-pager{align-items:flex-start;flex-direction:column;gap:8px;padding:10px 12px}.history-list-head .history-pager{width:100%}.history-pager-actions{max-width:100%;overflow-x:auto;padding-bottom:2px}.history-pager-actions button{min-height:44px}.history-new-activity{order:-1}}
.execution-timeline{display:grid;grid-template-columns:repeat(2,max-content);gap:4px 12px;min-width:210px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;line-height:1.4}
.execution-timeline span{display:flex;align-items:baseline;justify-content:space-between;gap:7px;color:var(--muted)}
.execution-timeline b{color:var(--text);font-weight:600}
.execution-timeline .timeline-total{color:var(--blue)}
.execution-timeline.legacy{display:block;min-width:0}
th{text-align:left;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600;padding:11px 18px;border-bottom:1px solid var(--border);white-space:nowrap}
td{padding:13px 18px;border-bottom:1px solid var(--border);font-size:14px;white-space:nowrap}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:rgba(255,255,255,.015)}
.pair-cell{display:flex;align-items:center;gap:10px;font-weight:600}
.pair-cell small{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-top:2px}
.coin-ic{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;flex-shrink:0}

.tabs{display:flex;gap:4px;background:var(--panel2);border:1px solid var(--border);padding:4px;border-radius:9px;width:fit-content}
.tabs button{background:none;border:none;color:var(--muted);padding:7px 15px;border-radius:6px;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}
.tabs button.active{background:var(--panel3);color:var(--text)}
.tabs button:disabled{color:#4a5468;cursor:not-allowed;opacity:.6}

.switch{position:relative;width:34px;height:18px;flex-shrink:0}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;inset:0;background:#2a3242;border-radius:20px;cursor:pointer;transition:.2s}
.slider:before{content:"";position:absolute;width:14px;height:14px;left:2px;top:2px;background:#fff;border-radius:50%;transition:.2s}
.switch input:checked + .slider{background:var(--green)}
.switch input:checked + .slider:before{transform:translateX(16px)}

.progress{height:6px;background:var(--panel3);border-radius:4px;overflow:hidden}
.progress i{display:block;height:100%;background:var(--yellow);border-radius:4px}

.code{background:#0d1117;border:1px solid var(--border);border-radius:10px;padding:15px 17px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;line-height:1.7;overflow-x:auto;color:#c9d1d9}
.code .k{color:#79c0ff}.code .s{color:#a5d6ff}.code .n{color:#ffa657}.code .c{color:#6e7681}

.flow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.flow-box{background:var(--panel2);border:1px solid var(--border);border-radius:10px;padding:13px 16px;text-align:center;flex:1;min-width:130px}
.flow-box i{font-size:19px;margin-bottom:7px;display:block}
.flow-box b{font-size:13px;display:block}
.flow-box span{font-size:12px;color:var(--muted)}
.flow .arrow{color:var(--muted);font-size:15px}

/* Bot cards */
.bot-card{padding:18px;display:flex;flex-direction:column;gap:13px;transition:.15s}
.bot-card:hover{border-color:#33405a;transform:translateY(-2px)}
.bot-top{display:flex;justify-content:space-between;align-items:flex-start}
.bot-top h5{font-size:16px;font-weight:700}
.bot-top .strat{font-size:12px;color:var(--muted);margin-top:3px}
/* Why a paused bot stopped. Without this the card said only "PAUSED" and
   the reason had to be read out of the database. */
.pause-why{font-size:12px;color:var(--yellow);background:rgba(234,179,8,.10);border:1px solid rgba(234,179,8,.28);border-radius:8px;padding:6px 9px;margin-top:-2px}
.pause-why i{margin-right:5px}
.bot-pnl{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:23px;font-weight:700}
.bot-pnl-label{color:var(--muted);font-size:13px}
.bot-meta{display:flex;gap:16px;font-size:13px;color:var(--muted)}
.bot-meta{flex-wrap:wrap}
.bot-meta b{color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.bot-meta b.up{color:var(--green)}.bot-meta b.down{color:var(--red)}
.bot-meta .entry-occupancy{display:inline-flex;gap:10px}
.bot-meta b.at-cap{color:var(--yellow)}
.bot-actions{display:flex;gap:8px;border-top:1px solid var(--border);padding-top:13px}
.bot-action-icons{display:flex;flex:0 0 auto;gap:6px}
.bot-action-icons .btn-icon{flex:0 0 30px}
.bot-action-icons .bot-action-delete{color:var(--red)}
.bot-action-icons .bot-action-delete:hover,.bot-action-icons .bot-action-delete:focus-visible{border-color:color-mix(in srgb,var(--red) 52%,var(--border));background:color-mix(in srgb,var(--red) 10%,var(--panel2));color:var(--red)}
@media(max-width:480px){.bot-actions{flex-wrap:wrap}.bot-actions>.btn{flex-basis:100%!important}.bot-action-icons{width:100%;justify-content:flex-end}}
.running-bots-table{min-width:700px}
.running-bots-table td{vertical-align:middle}
.running-bot,.running-last-signal{display:flex;flex-direction:column;gap:2px;line-height:1.35}
.running-bot strong,.running-last-signal strong{font-size:13px;font-weight:650}
.running-bot small,.running-last-signal small{color:var(--muted);font-size:12px;font-weight:400}

/* Feed */
.action-badge{width:54px;font-size:9px;font-weight:800;padding:4px 5px;border-radius:5px;letter-spacing:0;text-align:center;white-space:nowrap}
.action-badge.buy,.action-badge.cover{background:rgba(14,203,129,.15);color:var(--green)}
.action-badge.sell,.action-badge.short{background:rgba(246,70,93,.15);color:var(--red)}
.dashboard-activity-grid{grid-template-columns:minmax(0,2.35fr) minmax(280px,.95fr)}
.dashboard-live-state,.dashboard-running-state{display:inline-flex;align-items:center;gap:6px;color:var(--green);font-size:12px;font-weight:650;white-space:nowrap}
.dashboard-live-state{font-size:11px;letter-spacing:.03em}
@media(prefers-reduced-motion:reduce){.dashboard-live-state .live-dot,.dashboard-running-state .live-dot{animation:none}}
.dashboard-feed{overflow-x:auto}
.feed-table{min-width:760px;table-layout:fixed}
.feed-table th,.feed-table td{padding:12px 8px}
.feed-table th:nth-child(1){width:20%}.feed-table th:nth-child(2){width:20%}.feed-table th:nth-child(3){width:9%}.feed-table th:nth-child(4),.feed-table th:nth-child(5){width:15%}.feed-table th:nth-child(6){width:21%}
.feed-table td{font-size:13px}
.feed-time{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:11px!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.feed-bot{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.3}
.feed-bot b,.feed-bot span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feed-bot span{color:var(--muted);font-size:12px}
.feed-table .action-badge{font-size:10px}
.feed-price{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px!important;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.feed-result{display:inline-flex;align-items:center;gap:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:capitalize;font-size:12px}
.feed-result.green{color:var(--green)}.feed-result.red{color:var(--red)}.feed-result.yellow{color:var(--yellow)}
.feed-total{color:inherit;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.feed-table .feed-empty{padding:26px 16px;color:var(--muted);font-size:13px;text-align:center}
.dashboard-allocation-body{display:block}
.dashboard-market-watch{border-top:1px solid var(--border);margin-top:18px;padding-top:14px}
.dashboard-market-watch h4{font-size:13px;margin-bottom:10px}
@media(max-width:1100px){.dashboard-activity-grid{grid-template-columns:1fr}.dashboard-allocation-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.dashboard-market-watch{border-top:0;border-left:1px solid var(--border);margin-top:0;padding:0 0 0 24px}}
@media(max-width:700px){.dashboard-allocation-body{grid-template-columns:1fr}.dashboard-market-watch{border-left:0;border-top:1px solid var(--border);padding:14px 0 0}}

/* Dashboard risk monitor */
.risk-monitor-card{display:flex;min-height:342px;flex-direction:column}
.risk-monitor-body{display:flex;flex:1;flex-direction:column;gap:18px}
.risk-state{display:flex;align-items:center;gap:9px;min-height:38px;padding:9px 11px;border:1px solid rgba(59,130,246,.24);border-radius:8px;background:rgba(59,130,246,.08);color:#93b8ff;font-size:13px;font-weight:600}
.risk-state.safe{border-color:rgba(14,203,129,.24);background:rgba(14,203,129,.08);color:#65ddb1}
.risk-state.warning{border-color:rgba(240,185,11,.28);background:rgba(240,185,11,.09);color:#ffd65c}
.risk-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px}
.risk-metric-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:12px;color:var(--muted)}
.risk-metric-head b{color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;font-weight:600;white-space:nowrap}
.risk-track{height:5px;overflow:hidden;border-radius:4px;background:var(--panel3)}
.risk-track i{display:block;height:100%;border-radius:4px;background:var(--green)}
.risk-track i.near{background:var(--yellow)}
.risk-track i.over{background:var(--red)}
.risk-symbols{min-height:0}
.risk-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;color:var(--muted);font-size:12px}
.risk-section-title span:first-child{color:var(--text);font-weight:600}
.risk-section-title span:last-child{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.risk-symbol-row{display:grid;grid-template-columns:66px minmax(60px,1fr) auto;align-items:center;gap:9px;padding:5px 0;font-size:12px}
.risk-symbol-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.risk-symbol-row .risk-track{height:4px}
.risk-symbol-value{color:var(--muted);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;white-space:nowrap}
.risk-symbol-value.over{color:var(--red)}
.risk-empty{padding:8px 0;color:var(--muted);font-size:12px}
.risk-monitor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 18px;border-top:1px solid var(--border);color:var(--muted);font-size:12px}
.risk-monitor-footer i{margin-right:7px;color:var(--green)}
.risk-monitor-footer.warning i{color:var(--yellow)}

/* Donut */
.donut-wrap{display:flex;align-items:center;gap:22px}
.donut{width:130px;height:130px;border-radius:50%;background:conic-gradient(#f7931a 0 42%,#627eea 42% 68%,#14f195 68% 84%,#f0b90b 84% 100%);position:relative;flex-shrink:0}
.donut:after{content:"";position:absolute;inset:22px;background:var(--panel);border-radius:50%}
.donut b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:15px;z-index:1;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.legend{flex:1}
.legend div{display:flex;align-items:center;gap:9px;font-size:13px;padding:5px 0;color:var(--muted)}
.legend i{width:9px;height:9px;border-radius:3px}
.legend b{margin-left:auto;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.allocation-summary{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px}
.allocation-summary b{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:16px}
.allocation-row{margin-top:10px}
.allocation-row-head{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-bottom:5px}
.allocation-row-head span{color:var(--muted)}
.allocation-bar{height:5px;background:var(--panel3);border-radius:3px;overflow:hidden}
.allocation-bar i{display:block;height:100%;border-radius:3px}

/* Advanced settings */
details.adv{margin-top:16px;border:1px solid var(--border);border-radius:10px;background:var(--panel2);overflow:hidden}
details.adv summary{cursor:pointer;padding:12px 14px;font-weight:600;font-size:13px;list-style:none;display:flex;align-items:center;gap:9px;color:var(--text)}
details.adv summary::-webkit-details-marker{display:none}
details.adv summary::after{content:'\f078';font-family:'Font Awesome 6 Free';font-weight:900;margin-left:auto;font-size:11px;color:var(--muted);transition:.15s}
details.adv[open] summary::after{transform:rotate(180deg)}
details.adv summary i{color:var(--yellow)}
.adv-body{padding:4px 14px 16px;border-top:1px solid var(--border)}
.adv-body .f2,.adv-body .field{margin-top:12px}

/* Modal */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.65);backdrop-filter:blur(3px);display:none;align-items:center;justify-content:center;z-index:100}
.overlay.show{display:flex}
.auth-bootstrap{background:var(--bg);backdrop-filter:none}
.auth-bootstrap-content{display:flex;align-items:center;gap:14px;padding:18px 20px;border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:0 18px 50px rgba(0,0,0,.24)}
.auth-bootstrap-logo{width:42px;height:42px;flex:0 0 42px;border-radius:11px;font-size:17px}
.auth-bootstrap-content strong,.auth-bootstrap-content span{display:block}
.auth-bootstrap-content strong{font-size:15px}
.auth-bootstrap-content span{margin-top:2px;color:var(--muted);font-size:12px}
.auth-bootstrap-spinner{margin-left:8px;color:var(--yellow);font-size:14px}
.modal{background:var(--panel);border:1px solid var(--border);border-radius:14px;width:520px;max-width:92vw;max-height:90vh;overflow-y:auto;animation:fadeIn .2s}
.modal-h{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.modal-h h3{font-size:18px}
.modal-b{padding:22px}
.modal-f{padding:16px 22px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:10px}
.field{margin-bottom:16px}
.field label{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:7px}
.has-help{display:flex!important;align-items:center;gap:5px}
.help-tip{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 16px;border:0;background:transparent;color:#6f7d91;cursor:help;font-size:11px;padding:0;border-radius:50%}
.help-tip:hover,.help-tip:focus-visible,.help-tip[aria-expanded="true"]{color:var(--blue);outline:none;background:rgba(59,130,246,.12)}
.help-tooltip{position:fixed;display:none;z-index:140;width:max-content;max-width:min(280px,calc(100vw - 24px));padding:8px 10px;border:1px solid #33405a;border-radius:6px;background:#1e2534;color:var(--text);box-shadow:0 10px 28px rgba(0,0,0,.5);font-size:12px;line-height:1.45;pointer-events:none}
.help-tooltip.show{display:block}
.field input,.field select{width:100%;background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:10px 13px;color:var(--text);font-family:inherit;font-size:14px;outline:none}
.field textarea{width:100%;resize:vertical;min-height:150px;background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:11px 13px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;line-height:1.55;outline:none}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--yellow)}
.bot-import-intro{margin-bottom:16px;color:var(--muted);font-size:13px;line-height:1.55}
.bot-import-source-actions{display:flex;align-items:center;gap:10px;margin-bottom:16px}.bot-import-source-actions span{min-width:0;overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.bot-import-field-help{display:block;margin-top:7px;color:var(--muted);font-size:11px;line-height:1.45}
.bot-import-confirm{display:flex;align-items:flex-start;gap:9px;margin:-3px 0 16px;color:var(--text2);font-size:12px;line-height:1.45;cursor:pointer}.bot-import-confirm input{flex:0 0 auto;margin-top:2px;accent-color:var(--yellow)}
.bot-import-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:4px 0 16px;border-block:1px solid var(--border)}
.bot-import-preview>div{padding:11px 10px}.bot-import-preview>div+div{border-left:1px solid var(--border)}
.bot-import-preview span,.bot-import-preview small{display:block;color:var(--muted);font-size:11px}.bot-import-preview strong{display:block;margin:3px 0;color:var(--text);font-size:13px}.bot-import-preview .bot-import-destination{grid-column:1/-1;border-top:1px solid var(--border);border-left:0}
.bot-import-review-note{margin-bottom:16px}
@media(max-width:600px){.bot-import-preview{grid-template-columns:1fr}.bot-import-preview>div+div{border-top:1px solid var(--border);border-left:0}.bot-import-source-actions{align-items:flex-start;flex-direction:column}}
/* Risk settings: compact V2 structure with units that read as part of each value. */
.risk-management-head{min-height:72px}
.risk-management-title{display:flex;align-items:center;gap:11px;min-width:0}
.risk-management-title>div{min-width:0}
.risk-management-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;border-radius:8px;background:rgba(255,77,103,.12);color:var(--red);font-size:13px}
.risk-management-title .card-subtitle{font-size:13px;font-weight:400;line-height:1.35}
.risk-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 14px}
.risk-settings-grid .field{min-width:0;margin:0}
.risk-settings-grid .field label{color:var(--muted);font-size:12px}
.risk-settings-grid .field>input,.input-unit{min-height:42px}
.risk-field-help{display:block;margin-top:6px;color:var(--muted);font-size:12px;line-height:1.4}
.account-wide-limit-field{transition:opacity .15s ease}
.account-wide-limit-field.is-disabled{opacity:.5}
.account-wide-limit-field.is-disabled label{cursor:default}
.account-wide-limit-field.is-disabled .input-unit{box-shadow:none}
.risk-advanced{margin-block:16px 2px!important}
.risk-advanced .adv-body{padding-bottom:14px}
.risk-advanced .field{max-width:calc(50% - 7px);margin-bottom:0}
.input-unit{display:flex;align-items:stretch;width:100%;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel2);transition:border-color .15s ease,box-shadow .15s ease}
.input-unit:focus-within{border-color:var(--yellow);box-shadow:0 0 0 2px rgba(240,185,11,.08)}
.input-unit:has(.field-invalid){border-color:var(--red);box-shadow:0 0 0 2px rgba(255,77,103,.1)}
.input-unit input{min-width:0;width:100%;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.input-unit span{display:flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:44px;padding:0 11px;border-left:1px solid var(--border);color:var(--muted);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:11px;white-space:nowrap}
input[type="number"]{-moz-appearance:textfield;appearance:textfield}
input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(max-width:700px){
  .risk-management-head{align-items:center}
  .risk-management-head>.pill{flex:0 0 auto}
  .risk-settings-grid{grid-template-columns:1fr}
  .risk-advanced .field{max-width:none}
}
/* Selects outside a .field wrapper get no styling from the rule above and
   fall back to the browser default, which is white on this dark theme. */
.select-inline{background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:6px 10px;color:var(--text);font-family:inherit;font-size:13px;outline:none;cursor:pointer}
.select-inline:focus{border-color:var(--yellow)}
.mmt-price-source{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 13px;margin-bottom:12px;background:var(--panel2);border:1px solid var(--border);border-radius:8px}
.mmt-price-source>div{min-width:0}
.mmt-price-source label{display:block;font-size:12px;font-weight:650;color:var(--text);margin-bottom:3px}
.mmt-price-source p{font-size:13px;line-height:1.45;color:var(--muted);max-width:42ch}
.mmt-price-source select{flex:0 0 auto;max-width:245px}
/* Webhooks: delivery health first, configuration second. */
.webhooks-page-head h3{font-size:clamp(25px,2.2vw,34px);line-height:1.2}
.webhooks-page-head .page-actions{align-self:flex-end}
.webhooks-page-head>div:first-child{max-width:72ch}
.webhooks-refresh{display:inline-flex;align-items:center;gap:8px}
.webhooks-summary-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.webhooks-summary-item{position:relative;min-width:0;padding:18px 20px}
.webhooks-summary-item+.webhooks-summary-item::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.webhooks-summary-item>span,.webhooks-summary-item>small{display:block;color:var(--muted);line-height:1.45}
.webhooks-summary-item>span{font-size:14px;font-weight:600}
.webhooks-summary-item>small{font-size:13px;font-weight:400;overflow-wrap:anywhere}
.webhooks-summary-item>strong{display:block;margin:8px 0 4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:24px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.webhooks-summary-item>strong.up{color:var(--green)}
.webhooks-summary-item>strong.warning{color:var(--yellow)}
.webhooks-summary-item>strong.down{color:var(--red)}
.delivery-health-card{overflow:hidden}
.delivery-health-head,.webhook-security-head{min-height:68px;padding:14px 18px}
.delivery-health-title,.webhook-security-title{display:flex;align-items:center;gap:11px;min-width:0}
.delivery-health-title h4,.webhook-security-title h4{margin:0;font-size:15px;line-height:1.3}
.delivery-health-title p,.webhook-security-title p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.35}
.delivery-health-icon{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;background:rgba(0,208,156,.1);color:var(--green)}
.delivery-health-body{padding:16px 18px 18px}
.delivery-health-list{margin:0}
.delivery-health-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:43px;border-bottom:1px solid var(--border)}
.delivery-health-row:first-child{min-height:35px;padding-bottom:8px}
.delivery-health-row:last-child{border-bottom:0}
.delivery-health-row dt{color:var(--muted);font-size:12.5px;line-height:1.4}
.delivery-health-row dd{margin:0;color:var(--text);font-size:12.5px;font-weight:650;text-align:right;font-variant-numeric:tabular-nums}
.delivery-health-row dd.mono{font-size:12px}
.delivery-timing-note{display:grid;grid-template-columns:25px minmax(0,1fr);gap:10px;align-items:start;margin-top:14px;padding:12px 13px;border:1px solid rgba(59,130,246,.22);border-radius:9px;background:rgba(59,130,246,.1);color:var(--text)}
.delivery-timing-note>i{padding-top:2px;color:#7dabff;text-align:center}
.delivery-timing-note div{display:flex;min-width:0;flex-direction:column;gap:2px}
.delivery-timing-note b{font-size:12.5px;line-height:1.4}
.delivery-timing-note span{color:var(--muted);font-size:12px;line-height:1.45}
.webhook-security-card{overflow:hidden}
.webhook-security-icon{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;background:rgba(59,130,246,.12);color:#7dabff}
.webhook-security-body{padding:16px 18px 18px}
.webhook-security-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 14px;margin-bottom:6px}
.webhook-security-fields .field{min-width:0;margin:0}
.webhook-security-fields .field label{min-height:18px;color:var(--muted);font-size:12px}
.webhook-security-fields .field>input,.webhook-security-fields .input-unit{min-height:42px}
.webhook-security-controls{margin-top:7px}
.webhook-security-controls .check-row{min-height:60px;padding:10px 0;gap:18px}
.webhook-security-controls .cr-t{min-width:0}
.webhook-security-controls .cr-t b{font-size:12.5px;line-height:1.4}
.webhook-security-controls .cr-t span{display:block;margin-top:3px;line-height:1.4}
.webhook-security-controls .switch:has(input:disabled){opacity:1}
.webhook-security-controls .switch:has(input:disabled) .slider{cursor:default}
.webhook-security-controls .switch input:not(:checked)+.slider{background:#202938}
.webhook-security-actions{display:flex;justify-content:flex-start;padding-top:15px}
.webhook-security-actions .btn{min-height:38px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.webhook-credentials-card{margin-bottom:16px;overflow:hidden}
.webhook-config-head{min-height:70px;padding:14px 18px}
.webhook-config-title{display:flex;align-items:center;gap:11px;min-width:0}
.webhook-config-title>div{min-width:0}
.webhook-config-title h4{margin:0;font-size:15px;line-height:1.3}
.webhook-config-title p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.35}
.webhook-config-icon{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;font-size:13px}
.webhook-config-icon.credentials,.webhook-config-icon.payload{background:rgba(59,130,246,.13);color:#7dabff}
.webhook-config-icon.template{background:rgba(0,208,156,.1);color:var(--green)}
.webhook-source-picker{display:flex;align-items:center;gap:10px;width:auto;min-width:0}
.webhook-source-picker label{flex:0 0 auto;color:var(--text);font-size:13.5px;font-weight:700;white-space:nowrap}
.webhook-source-picker .webhook-source-select{flex:0 1 265px;width:265px;max-width:100%}
.webhook-source-select{position:relative;min-width:0;border:1px solid var(--border);border-radius:8px;background:var(--panel2);transition:border-color .15s ease,box-shadow .15s ease}
.webhook-source-select:focus-within{border-color:var(--yellow);box-shadow:0 0 0 2px rgba(240,185,11,.08)}
.webhook-source-select select{width:100%;min-width:0;min-height:38px;padding:0 34px 0 11px;border:0;outline:0;appearance:none;background:transparent;color:var(--text);font-family:inherit;font-size:13px;font-weight:600;text-overflow:ellipsis}
.webhook-source-select>i{position:absolute;top:50%;right:11px;color:var(--muted);font-size:10px;pointer-events:none;transform:translateY(-50%)}
.webhook-source-picker select:disabled{color:var(--muted)}
.webhook-credentials-body{padding:20px 18px 18px}
.webhook-credentials-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.webhook-credential-column{display:flex;min-width:0;flex-direction:column}
.webhook-field-heading{margin-bottom:12px}
.webhook-field-heading h5{margin:0;color:var(--text);font-size:13px;line-height:1.4}
.webhook-field-heading p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.4}
.credential-value-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.credential-value{display:flex;align-items:center;min-width:0;min-height:42px;padding:0 12px;border:1px solid var(--border);border-radius:8px;background:#0d1117}
.credential-value code{display:block;min-width:0;overflow:hidden;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:11.5px;text-overflow:ellipsis;white-space:nowrap}
#webhookUrl{color:#7ee787}
.credential-copy{min-width:108px;justify-content:center;white-space:nowrap}
.credential-rotate{width:100%;justify-content:center;margin-top:10px}
.credential-rotation-note{margin-top:10px;padding:9px 11px;border:1px solid rgba(0,208,156,.25);border-radius:8px;background:rgba(0,208,156,.07);color:#77dbbf;font-size:12px;line-height:1.45}
.credential-rotation-note[hidden]{display:none}
.credential-security-note{display:grid;grid-template-columns:20px minmax(0,1fr);gap:8px;align-items:start;margin-top:10px;padding:10px 11px;border:1px dashed #3b4960;border-radius:8px;color:var(--muted)}
.credential-security-note i{padding-top:2px;color:#7dabff;text-align:center}
.credential-security-note p{margin:0;font-size:12px;line-height:1.45}
.webhook-payload-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:16px;align-items:stretch}
.webhook-payload-card,.webhook-template-card{min-width:0;overflow:hidden}
.webhook-payload-card,.webhook-template-card{height:100%}
.payload-action-field{margin-bottom:14px}
.payload-action-field>label{display:block;margin-bottom:7px;color:var(--muted);font-size:12px;font-weight:600}
.payload-action-tabs{display:flex;gap:4px;width:fit-content;padding:4px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.payload-action-tabs button{min-height:34px;padding:0 14px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-family:inherit;font-size:12.5px;cursor:pointer}
.payload-action-tabs button:hover:not(:disabled),.payload-action-tabs button:focus-visible{color:var(--text)}
.payload-action-tabs button:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:3px}
.payload-action-tabs button.active{background:var(--panel3);color:var(--text);font-weight:650}
.payload-action-tabs button:disabled{opacity:.45;cursor:not-allowed}
.webhook-payload-body,.webhook-template-body{padding:18px}
.webhook-code-panel{position:relative;min-width:0}
.webhook-code-panel .code{height:216px;min-height:216px;margin:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.payload-safety-note{display:grid;grid-template-columns:22px minmax(0,1fr);gap:9px;align-items:start;margin-top:14px;padding:12px 13px;border:1px solid rgba(59,130,246,.22);border-radius:9px;background:rgba(59,130,246,.1);color:var(--text)}
.payload-safety-note>i{padding-top:2px;color:#7dabff;text-align:center}
.payload-safety-note>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.payload-safety-note b{font-size:12.5px;line-height:1.4}
.payload-safety-note span{color:var(--muted);font-size:12px;line-height:1.45}
.emulation-result{display:grid;grid-template-columns:22px minmax(0,1fr);gap:9px;align-items:start;margin-top:10px;padding:11px 13px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.emulation-result[hidden]{display:none}
.emulation-result>i{padding-top:2px;text-align:center}
.emulation-result>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.emulation-result b{color:var(--text);font-size:12.5px;text-transform:capitalize}
.emulation-result span{overflow-wrap:anywhere;color:var(--muted);font-size:12px;line-height:1.4}
.emulation-result.success>i{color:var(--green)}
.emulation-result.failure>i{color:var(--red)}
.template-source-field{margin-bottom:14px}
.template-source-field label{font-size:12px}
.template-source-field select{min-height:42px}
.provider-template-panel{position:relative;min-width:0}
.provider-template-code{height:216px;min-height:216px;margin:0;padding-right:52px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.provider-template-copy{position:absolute;top:10px;right:10px;width:36px;height:36px;background:#151d2a}
.webhook-flow-card .card-h{min-height:56px}
.webhook-flow-card .flow-box{padding:11px 14px}
.provider-tabs button{display:inline-flex;align-items:center;gap:7px}
.provider-tabs button:disabled{opacity:.48}
.provider-access-note{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;margin:-4px 0 16px;padding:11px 12px;border:1px solid rgba(240,185,11,.32);border-radius:8px;background:rgba(240,185,11,.07);color:#d7c68b;font-size:12px;line-height:1.45}
.provider-access-note>i{color:var(--yellow)}
.provider-access-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.provider-access-copy b{color:#ead99d;font-size:12px}
.provider-access-copy span{color:#c5b77f}
.provider-access-confirm{display:flex;align-items:center;gap:10px}
.provider-access-confirm .btn{min-height:30px;padding:5px 10px;font-size:11px}
@media(max-width:1000px){
  .webhooks-summary-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .webhooks-summary-item:nth-child(3)::before{display:none}
  .webhooks-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
}
@media(max-width:760px){
  .webhooks-page-head .page-actions{align-self:stretch;justify-content:space-between}
  .provider-access-note{grid-template-columns:auto 1fr}
  .provider-access-confirm{grid-column:1/-1;justify-content:flex-end;padding-top:2px}
  .webhook-security-fields{grid-template-columns:1fr}
  .webhook-credentials-grid{grid-template-columns:1fr}
  .webhook-credential-column+.webhook-credential-column{padding-top:16px;border-top:1px solid var(--border)}
}
@media(max-width:480px){
  .webhooks-page-head .page-actions{align-items:stretch;flex-direction:column}
  .webhooks-page-head .provider-tabs{width:100%}
  .webhooks-page-head .provider-tabs button{flex:1;justify-content:center}
  .webhooks-refresh{justify-content:center}
  .webhooks-summary-rail{grid-template-columns:1fr}
  .webhooks-summary-item{padding:15px}
  .webhooks-summary-item+.webhooks-summary-item::before{display:none}
  .webhooks-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
  .delivery-health-head,.webhook-security-head{align-items:flex-start}
  .delivery-health-title p,.webhook-security-title p{max-width:26ch}
  .delivery-health-row{gap:12px}
  .delivery-health-row dt{max-width:55%}
  .webhook-security-controls .check-row{align-items:flex-start}
  .webhook-config-head{align-items:flex-start;flex-direction:column}
  .webhook-source-picker{width:100%;min-width:0;max-width:none}
  .webhook-source-picker .webhook-source-select{flex:1 1 auto;width:auto}
  .credential-value-row{grid-template-columns:1fr}
  .credential-copy{width:100%}
  .payload-action-tabs{width:100%;justify-content:space-between;gap:4px}
  .webhook-config-head>.btn{width:100%;justify-content:center}
}
.provider-template-note{display:grid;grid-template-columns:22px 1fr;gap:9px;align-items:start;padding:11px 12px;margin-bottom:12px;border:1px solid #30405c;border-radius:8px;background:var(--panel2)}
.provider-template-note>i{margin-top:2px;color:var(--blue)}
.provider-template-note>div{display:flex;flex-direction:column;gap:3px}
.provider-template-note b{font-size:12px;color:var(--text)}
.provider-template-note span{max-width:64ch;color:var(--muted);font-size:12px;line-height:1.45}
.feature-toggle{display:inline-flex;align-items:center;gap:7px;min-width:92px;justify-content:center;padding:6px 9px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);color:var(--muted);font-family:inherit;font-size:11px;font-weight:600;cursor:pointer;transition:border-color .16s ease,background .16s ease,color .16s ease}
.feature-toggle:hover{border-color:#49566d;color:var(--text)}
.feature-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.feature-toggle.enabled{border-color:rgba(59,130,246,.48);background:rgba(59,130,246,.11);color:#91b8ff}
.trade-filters{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.trade-group-table{min-width:1120px}
.trade-time-column{width:188px}
.trade-time-heading{display:inline-flex;align-items:center;gap:3px}
.trade-time-heading select,.trade-time-heading button{border:1px solid transparent;background:transparent;color:var(--muted);font:inherit;font-size:inherit;font-weight:inherit;text-transform:uppercase;letter-spacing:inherit;cursor:pointer}
.trade-time-heading select{max-width:128px;padding:5px 22px 5px 5px;border-radius:5px}
.trade-time-heading button{display:inline-grid;width:27px;height:27px;padding:0;border-radius:5px;place-items:center}
.trade-time-heading select:hover,.trade-time-heading button:hover{border-color:var(--border);background:var(--panel2);color:var(--text)}
.trade-time-heading select:focus-visible,.trade-time-heading button:focus-visible{outline:2px solid var(--blue);outline-offset:1px;color:var(--text)}
.trade-time-heading select:disabled,.trade-time-heading button:disabled{cursor:wait;opacity:.55}
.trade-group-row>td{padding-block:15px;background:var(--panel)}
.trade-group-row:hover>td{background:var(--panel2)}
.trade-group-toggle{display:inline-flex;align-items:center;gap:11px;min-width:170px;border:0;background:none;color:var(--text);padding:0;text-align:left;font:inherit;cursor:pointer}
.trade-group-toggle i{width:15px;color:var(--blue);font-size:11px;text-align:center;transition:transform .18s ease}
.trade-group-toggle b,.trade-group-toggle small{display:block}
.trade-group-toggle b{font-size:13px}
.trade-group-toggle small{margin-top:3px;color:var(--muted);font-size:12px;font-weight:400}
.trade-position-pair{display:flex;align-items:center;gap:7px}
.trade-protection-marker{display:inline-flex;align-items:center;color:var(--muted);font-size:11px}
.trade-protection-marker.protected{color:var(--green)}
.trade-protection-marker.triggered{color:var(--blue)}
.trade-protection-marker.skipped{color:var(--muted)}
.trade-protection-marker.failed{color:var(--red)}
.trade-group-toggle .trade-protection-marker>i,.trade-protection-legend .trade-protection-marker>i{color:inherit}
.trade-protection-legend{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid var(--border);color:var(--muted);font-size:11px}
.trade-protection-legend>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.trade-protection-legend .trade-protection-marker{width:13px;justify-content:center}
.trade-group-toggle:hover b{text-decoration:underline;text-underline-offset:3px}
.trade-group-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:5px;border-radius:2px}
.trade-group-details[hidden]{display:none}
.trade-group-details>td{padding:0;background:var(--panel2)}
.trade-group-detail-inner{padding:15px 18px 18px;border-bottom:1px solid var(--border)}
.trade-group-detail-heading{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:11px}
.trade-group-detail-heading strong{font-size:12px}
.trade-group-detail-heading span{color:var(--muted);font-size:11px}
.trade-group-financials{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:14px;color:var(--muted);font-size:12px}
.trade-group-financials span{display:inline-flex;gap:6px;align-items:baseline}
.trade-group-financials b{color:var(--text);font-weight:600}
.trade-protection-audit{margin:0 0 14px;border-block:1px solid var(--border)}
.trade-protection-audit-row{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:12px;align-items:start;padding:11px 0}
.trade-protection-audit-row+.trade-protection-audit-row{border-top:1px solid var(--border)}
.trade-protection-audit-row>.pill{margin-top:1px}
.trade-protection-audit-row strong{display:block}
.trade-protection-audit-row strong{font-size:12px;color:var(--text);margin-bottom:3px}
.trade-protection-audit-row div>span{display:block;font-size:11px;color:var(--muted);line-height:1.55}
.trade-position-link{appearance:none;border:0;padding:0;background:none;color:var(--blue);font-size:inherit;line-height:inherit;font-variant-numeric:tabular-nums;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer}
.trade-position-link:hover{color:var(--text)}
.trade-position-link:focus-visible{border-radius:2px;outline:2px solid var(--blue);outline-offset:2px;color:var(--text)}
.trade-position-focus-context{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 16px;border-block:1px solid var(--border);background:rgba(59,130,246,.06);color:var(--muted);font-size:12px}
.trade-position-focus-context[hidden]{display:none}
.trade-position-focus-context span{display:flex;align-items:center;gap:7px;min-width:0}
.trade-position-focus-context span>i,.trade-position-focus-context strong{color:var(--blue)}
.trade-position-focus-context button{display:inline-flex;align-items:center;gap:6px;flex:none;border:0;padding:4px 0;background:none;color:var(--blue);font:inherit;font-weight:600;cursor:pointer}
.trade-position-focus-context button:hover{text-decoration:underline;text-underline-offset:3px;color:var(--text)}
.trade-position-focus-context button:focus-visible{border-radius:2px;outline:2px solid var(--blue);outline-offset:3px}
@media(max-width:700px){.trade-position-focus-context{align-items:flex-start;flex-direction:column;padding-inline:12px}}
@keyframes trade-position-focus{0%{background:rgba(59,130,246,.18)}35%{background:rgba(59,130,246,.1)}100%{background:var(--panel)}}
.trade-group-row.trade-group-focus>td{animation:trade-position-focus 2.4s cubic-bezier(.16,1,.3,1)}
@media(prefers-reduced-motion:reduce){.trade-group-row.trade-group-focus>td{animation:none;background:var(--panel2)}}
.trade-event-badge{white-space:nowrap}
.trade-event-none{color:var(--muted)}
.trade-net-unavailable,.trade-net-unavailable small{display:block;color:var(--muted)}
.trade-net-unavailable small{margin-top:3px;font-size:12px;font-weight:400;white-space:normal}
.trade-net-estimate{font-size:12px;font-weight:600}
.trade-group-details table{min-width:1180px;border:1px solid var(--border);border-radius:7px;overflow:hidden}
.trade-group-details th{background:var(--panel);font-size:11px;padding:9px 11px}
.trade-group-details td{font-size:13px;padding:10px 11px}
.trade-group-empty{text-align:center;color:var(--muted);padding:30px}
.support-account-loading{display:flex;align-items:center;justify-content:center;gap:9px;min-height:120px;color:var(--muted);font-size:13px}
.support-account-view{margin-bottom:18px;border-block:1px solid var(--border);overflow:hidden;background:var(--panel)}
.support-account-view-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:var(--panel2)}
.support-account-view-head h4{font-size:13px;color:var(--text)}
.support-account-view-head h4 i{margin-right:7px;color:var(--blue)}
.support-account-view-head p{margin-top:3px;color:var(--muted);font-size:12px}
.support-readonly-badge{display:inline-flex;align-items:center;gap:6px;flex:none;color:var(--muted);font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.04em}
.support-readonly-badge i{color:var(--blue)}
.support-activity-tabs{display:flex;gap:2px;padding:7px 10px;border-block:1px solid var(--border);overflow-x:auto;background:var(--panel)}
.support-activity-tabs button{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:7px 10px;border:0;border-radius:6px;background:none;color:var(--muted);font:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer}
.support-activity-tabs button span{min-width:20px;padding:2px 6px;border-radius:999px;background:var(--panel3);color:var(--muted);font-size:11px;text-align:center;font-variant-numeric:tabular-nums}
.support-activity-tabs button:hover{color:var(--text);background:var(--panel2)}
.support-activity-tabs button[aria-selected="true"]{color:var(--text);background:var(--panel3)}
.support-activity-tabs button[aria-selected="true"] span{color:var(--blue)}
.support-activity-tabs button:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.support-activity-panel[hidden]{display:none}
.support-activity-panel .table-wrap{max-height:460px;overflow:auto}
.support-activity-panel table{min-width:980px}
.support-trade-history-panel .table-wrap{max-height:none}
.support-trade-history-panel .trade-group-detail-inner{min-width:1080px}
.support-trade-pager{padding-inline:16px}
.support-account-subline{display:block;margin-top:3px;color:var(--muted);font-size:11px;white-space:nowrap}
.support-account-time{white-space:nowrap;color:var(--muted)}
.support-account-reason{min-width:190px;max-width:360px;white-space:normal;line-height:1.4}
.support-account-empty{padding:28px!important;text-align:center;color:var(--muted)}
.support-payload summary{color:var(--blue);font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.support-payload summary:focus-visible{border-radius:2px;outline:2px solid var(--blue);outline-offset:2px}
.support-payload pre{max-width:520px;max-height:220px;margin-top:8px;padding:10px;border-radius:6px;overflow:auto;background:var(--bg);color:var(--muted);font-size:11px;white-space:pre-wrap;word-break:break-word}
@media(max-width:700px){.support-account-view-head{align-items:flex-start;flex-direction:column}.support-readonly-badge{align-self:flex-start}.support-activity-tabs{padding-inline:8px}}
.field .unit-select{width:auto;padding:6px 10px;font-size:12px}
.form-error{display:none;border-left:3px solid var(--red);background:rgba(255,77,103,.08);color:var(--red);padding:10px 12px;margin-bottom:16px;font-size:12px;line-height:1.45}
.form-error.show{display:block}
.protection-scope-note{display:grid;grid-template-columns:20px minmax(0,1fr);gap:10px;align-items:start;margin-bottom:16px;padding:11px 12px;border:1px solid rgba(59,130,246,.32);border-radius:8px;background:rgba(59,130,246,.08)}
.protection-scope-note>i{margin-top:2px;color:#7dabff}
.protection-scope-note>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.protection-scope-note b{font-size:12.5px;color:#b8d0ff}
.protection-scope-note span{font-size:12.5px;line-height:1.45;color:#9aafd4}
.protection-position-summary{margin:-4px 0 18px;padding:13px 14px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.protection-position-summary>div{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.protection-position-pair{font-size:14px;font-weight:700;letter-spacing:.01em;color:var(--text)}
.protection-position-summary dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0}
.protection-position-summary dl>div{min-width:0}
.protection-position-summary dt{margin-bottom:3px;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--dim)}
.protection-position-summary dd{margin:0;overflow:hidden;font-size:12.5px;color:var(--text);text-overflow:ellipsis;white-space:nowrap}
.field-invalid{border-color:var(--red)!important;box-shadow:0 0 0 2px rgba(255,77,103,.1)}
.field-warning{display:block;margin-top:7px;font-size:11.5px;line-height:1.4}
.bot-sizing-preview{margin:0 0 10px;color:var(--green);font-size:12px;line-height:1.5}
.bot-account-risk-note{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.5}
.tp-targets.field-invalid{padding:8px;border:1px solid var(--red);border-radius:8px}
.f2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.tp-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}
.tp-header label{margin:0}
.tp-title{display:flex;align-items:center;gap:5px}
.tp-labels,.tp-target{display:grid;grid-template-columns:1fr 1fr 36px;gap:10px;align-items:center}
.tp-labels{font-size:12px;color:var(--muted);margin-bottom:6px}
.tp-targets{display:grid;gap:8px}
.tp-target input{width:100%;background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:10px 13px;color:var(--text);font-family:inherit;font-size:13px;outline:none}
.tp-target input:focus{border-color:var(--yellow)}
.tp-target .tp-allocation[readonly]{color:#aeb9ca;background:#111722;cursor:not-allowed}
.check-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--border)}
.check-row:last-child{border:none}
.check-row .cr-t b{font-size:13px;display:block}
.check-row .cr-t span{font-size:12px;color:var(--muted)}
#oppositeProfitProtectionRow{gap:20px;border-bottom:0;padding-bottom:6px}
.opposite-profit-settings{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:14px;padding:6px 0 14px;border-bottom:1px solid var(--border)}
.opposite-profit-settings .field{margin:0}
.opposite-profit-settings .field>label{font-size:12px}
@media(max-width:440px){
  .opposite-profit-settings{grid-template-columns:1fr}
  .opposite-profit-settings .field:last-child{width:112px}
}

/* Toasts */
.toasts{position:fixed;top:72px;right:22px;z-index:200;display:flex;flex-direction:column;gap:10px}
.toast{background:var(--panel2);border:1px solid var(--border);border-left:3px solid var(--yellow);border-radius:10px;padding:13px 17px;min-width:290px;max-width:360px;box-shadow:0 10px 35px rgba(0,0,0,.5);animation:slideIn .25s;display:flex;gap:11px;font-size:13px}
.toast.green{border-left-color:var(--green)} .toast.red{border-left-color:var(--red)} .toast.blue{border-left-color:var(--blue)}
.toast i{margin-top:2px}
.toast .tt{font-weight:600}
.toast .ts{font-size:11.5px;color:var(--muted);margin-top:2px}
@keyframes slideIn{from{transform:translateX(40px);opacity:0}to{transform:none;opacity:1}}

.url-box{display:flex;align-items:center;gap:10px;background:#0d1117;border:1px solid var(--border);border-radius:10px;padding:12px 15px}
.url-box code{flex:1;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12.5px;color:#7ee787;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.step{display:flex;gap:13px;padding:10px 0}
.step .num{width:24px;height:24px;border-radius:50%;background:rgba(240,185,11,.15);color:var(--yellow);font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.step p{font-size:12.5px;color:var(--muted);line-height:1.55}
.step p b{color:var(--text)}
.danger-zone{border:1px solid rgba(246,70,93,.35)!important}

/* Backtesting */
#page-backtesting>.backtest-lab{display:contents}
#page-backtesting>.backtest-lab[hidden]{display:none}
#page-backtesting>.backtest-lab>.card-b{display:contents}
.backtest-workspace{grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);align-items:start;margin-bottom:16px}
.backtest-legacy{margin-bottom:16px;overflow:hidden}
.backtest-legacy>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;cursor:pointer;list-style:none}
.backtest-legacy>summary::-webkit-details-marker{display:none}
.backtest-legacy>summary span{display:flex;align-items:center;gap:9px}
.backtest-legacy>summary i{color:var(--muted)}
.backtest-legacy>summary small,.backtest-legacy-note{color:var(--muted);font-size:12px}
.backtest-legacy[open]>summary{border-bottom:1px solid var(--border)}
.backtest-legacy-note{margin:13px 16px 0;line-height:1.5}
.backtest-legacy .backtest-workspace{display:block;margin:12px 0 0}
.backtest-legacy .backtest-workspace>.card{border:0;border-radius:0}
.backtest-legacy-result-label{display:flex;align-items:center;gap:12px;margin-bottom:14px;padding:11px 13px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.backtest-legacy-result-label b{font-size:12.5px}
.backtest-legacy-result-label span{color:var(--muted);font-size:12px}
.backtest-run-list{max-height:650px;overflow-y:auto}
.backtest-run{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:13px 16px;border-bottom:1px solid var(--border);cursor:pointer}
.backtest-run:last-child{border-bottom:none}
.backtest-run:hover,.backtest-run.selected{background:rgba(255,255,255,.025)}
.backtest-run input{accent-color:var(--yellow)}
.backtest-run-copy{min-width:0}
.backtest-run-copy b{font-size:14px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.backtest-run-copy span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.backtest-run-metric{text-align:right;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:13px;font-weight:700}
.backtest-run-metric span{display:block;font-family:inherit;font-size:12px;margin-top:3px}
/* Stays faint until the row is hovered so the list does not read as a wall
   of delete buttons, but is always reachable by keyboard. */
.backtest-run-delete{padding:5px 8px;opacity:0;transition:opacity .12s ease}
.backtest-run:hover .backtest-run-delete,.backtest-run-delete:focus-visible{opacity:1}
.backtest-run-delete:hover{color:var(--red)}
.backtest-empty{padding:32px 18px;text-align:center;color:var(--muted);font-size:12px}
.signal-row-delete{padding:5px 8px;opacity:0;transition:opacity .12s ease}
.signal-row:hover .signal-row-delete,.signal-row-delete:focus-visible{opacity:1}
.signal-row-delete:hover{color:var(--red)}
.backtest-metrics{margin-bottom:16px}
.backtest-results-grid{grid-template-columns:minmax(0,2fr) minmax(280px,1fr);margin-bottom:16px}
.backtest-chart-wrap{height:290px;position:relative;padding:12px 16px 16px}
.backtest-chart-wrap canvas{width:100%;height:100%;display:block}
#backtestChartEmpty,#backtestExcursionEmpty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;color:var(--muted);font-size:12px}
.backtest-inputs>.card-b{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px}
.backtest-inputs>.card-b>.f2{display:contents}
.backtest-inputs .field{min-width:0;margin:0}
.backtest-inputs .backtest-section-intro,.backtest-inputs .tp-header,.backtest-inputs .tp-labels,.backtest-inputs .tp-targets,.backtest-inputs .adv,.backtest-inputs .form-error{grid-column:1/-1}
.backtest-section-intro{display:flex;align-items:baseline;gap:12px;padding-bottom:2px}
.backtest-section-intro b{font-size:13px}
.backtest-section-intro span{color:var(--muted);font-size:12px}
#backtestTargets .tp-labels,#backtestTargets .tp-target{grid-template-columns:50px minmax(0,1fr) minmax(0,1fr) 36px}
.backtest-inputs .tp-labels,.backtest-inputs .tp-target{grid-template-columns:50px minmax(0,1fr) minmax(0,1fr) 36px}
.backtest-target-name{font-size:12px;color:var(--text)}
.backtest-lab{margin:0;overflow:visible}
.backtest-lab[hidden]{display:none}
.backtest-lab>.card-h{display:none}
.backtest-lab>.card-b{padding:0}
.backtest-lab-head h4 i{margin-right:8px;color:var(--blue)}
.backtest-lab-head>div{min-width:0}
.backtest-lab-source{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--panel)}
.backtest-lab-source>div:first-child{display:grid;min-width:0;grid-template-columns:auto minmax(0,1fr);gap:2px 9px;align-items:baseline}
.backtest-lab-source span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.backtest-lab-source b{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.backtest-lab-source small{grid-column:1/-1;color:var(--muted);font-size:12px;line-height:1.45}
.backtest-lab-source-actions{display:flex;flex:0 0 auto;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.backtest-lab.has-imported-snapshot .backtest-lab-source b{color:#8fb9f9}
.backtest-lab-note{display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;align-items:start;margin:0;padding:11px 13px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.backtest-lab-note>i{display:grid;width:30px;height:30px;place-items:center;border-radius:8px;background:rgba(59,130,246,.1);color:#7dabff}
.backtest-lab-note b,.backtest-lab-note span{display:block}
.backtest-lab-note b{font-size:13px}
.backtest-lab-note span{max-width:75ch;margin-top:3px;color:var(--muted);font-size:12px;line-height:1.5}
.backtest-lab-strategy{margin:0;border:1px solid var(--border);border-radius:10px;background:var(--panel2)}
.backtest-lab-strategy>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 14px;cursor:pointer;list-style:none}
.backtest-lab-strategy>summary::-webkit-details-marker{display:none}
.backtest-lab-strategy>summary span{display:flex;align-items:center;gap:9px;color:var(--text);font-size:13px;font-weight:700;text-transform:none;letter-spacing:0}
.backtest-lab-strategy>summary span i{color:var(--yellow)}
.backtest-lab-strategy>summary small{color:var(--muted);font-size:12px;font-weight:400;text-align:right}
.backtest-lab-strategy[open]>summary{border-bottom:1px solid var(--border)}
.backtest-lab-strategy-grid{display:grid;grid-template-columns:1fr;gap:14px;padding:15px}
.backtest-lab-strategy-grid .field{min-width:0;margin:0}
.backtest-lab-advanced{margin:0 15px 15px;border-top:1px solid var(--border)}
.backtest-lab-advanced>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0 0;cursor:pointer;list-style:none}
.backtest-lab-advanced>summary::-webkit-details-marker{display:none}
.backtest-lab-advanced>summary span{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700}
.backtest-lab-advanced>summary i{color:var(--muted)}
.backtest-lab-advanced>summary small{color:var(--muted);font-size:11.5px;font-weight:400;text-align:right}
.backtest-lab-advanced-grid{display:grid;grid-template-columns:1fr;gap:14px;padding-top:14px}
.backtest-lab-advanced-grid .field{min-width:0;margin:0}
.backtest-lab-experiment{border:1px solid var(--border);border-radius:10px;overflow:hidden}
.backtest-lab-section-head{padding:12px 14px;border-bottom:1px solid var(--border)}
.backtest-lab-section-head b,.backtest-lab-section-head span{display:block}
.backtest-lab-section-head b{font-size:13px}
.backtest-lab-section-head span{margin-top:3px;color:var(--muted);font-size:12px}
.backtest-lab-controls{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;align-items:end;padding:14px}
.backtest-lab-controls .field{min-width:0;margin:0}
.backtest-lab-run{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding-top:2px}
.backtest-lab-experiment>.form-error{margin:0 14px 14px}
.backtest-replay-guide{margin:0 14px 14px;border-top:1px solid var(--border)}
.backtest-replay-guide>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;cursor:pointer;list-style:none}
.backtest-replay-guide>summary::-webkit-details-marker{display:none}
.backtest-replay-guide>summary span{display:flex;align-items:center;gap:8px;color:var(--text);font-size:12.5px;font-weight:700}
.backtest-replay-guide>summary i{color:var(--blue)}
.backtest-replay-guide>summary small{color:var(--muted);font-size:11.5px;font-weight:400;text-align:right}
.backtest-replay-guide[open]>summary{border-bottom:1px solid var(--border)}
.backtest-replay-guide-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-top:14px}
.backtest-replay-guide article{min-width:0;padding:2px 18px 4px 0}
.backtest-replay-guide article+article{padding-right:0;padding-left:18px;border-left:1px solid var(--border)}
.backtest-replay-guide-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.backtest-replay-guide-title span{display:block;margin-bottom:3px;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.backtest-replay-guide-title h5{font-size:13px;line-height:1.35}
.backtest-replay-guide-selected{display:none;flex:0 0 auto;padding:3px 7px;border-radius:999px;background:rgba(59,130,246,.12);color:#72a7ff;font-size:11px;line-height:1.3}
.backtest-replay-guide article.is-selected .backtest-replay-guide-selected{display:block}
.backtest-replay-guide article p{margin-top:10px;color:var(--muted);font-size:12px;line-height:1.55}
.backtest-replay-guide article p strong{color:var(--text)}
.backtest-replay-guide .backtest-replay-guide-question{color:var(--text);font-weight:600}
.backtest-replay-guide-note{grid-column:1/-1;display:flex;gap:9px;margin:14px 0 0;padding:10px 12px;border-radius:8px;background:rgba(240,185,11,.08);color:var(--muted);font-size:12px;line-height:1.5}
.backtest-replay-guide-note i{margin-top:2px;color:var(--yellow)}
.backtest-replay-guide-note strong{color:var(--text)}
.backtest-lab-run-feedback{display:grid;flex:1;min-width:0;gap:8px;max-width:760px}
.backtest-lab-run-copy{display:flex;align-items:baseline;justify-content:space-between;gap:18px;min-width:0}
.backtest-lab-run-copy span{color:var(--muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.backtest-lab-run-copy time{flex:0 0 auto;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.backtest-lab[aria-busy="true"] .backtest-lab-run-copy span,.backtest-lab[aria-busy="true"] .backtest-lab-run-copy time{color:var(--text)}
.backtest-lab-progress{position:relative;height:6px;overflow:hidden;border-radius:3px;background:var(--panel3)}
.backtest-lab-progress span{position:absolute;inset-block:0;inset-inline-start:0;width:0;border-radius:inherit;background:var(--blue);transition:width .2s ease-out}
.backtest-lab-progress.is-indeterminate span{width:34%;opacity:.7}
@media(prefers-reduced-motion:reduce){.backtest-lab-progress span{transition:none}}
.backtest-lab-results{margin:0;padding:0;border-top:0}
.backtest-lab-results[hidden]{display:none}
.backtest-lab-stale{display:flex;align-items:center;gap:10px;margin-bottom:14px;padding:10px 12px;border:1px solid rgba(240,185,11,.45);border-radius:9px;background:rgba(240,185,11,.08);color:var(--text);font-size:12px;line-height:1.45}
.backtest-lab-stale[hidden]{display:none}
.backtest-lab-stale i{flex:0 0 auto;color:var(--yellow)}
.backtest-lab-result-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:13px}
.backtest-lab-result-head h5{font-size:15px;line-height:1.35}
.backtest-lab-result-head p{max-width:72ch;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.5}
.backtest-lab-meta{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex:0 0 auto;color:var(--muted);font-size:11px;text-align:right}
.backtest-lab-settings-used{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:13px;border:1px solid var(--border);border-radius:9px;overflow:hidden;background:var(--panel2)}
.backtest-lab-settings-used>span{min-width:0;padding:9px 11px;border-inline-end:1px solid var(--border)}
.backtest-lab-settings-used>span:last-child{border-inline-end:0}
.backtest-lab-settings-used>span:nth-child(4n){border-inline-end:0}
.backtest-lab-settings-used>span:nth-child(-n+4){border-bottom:1px solid var(--border)}
.backtest-lab-settings-used small,.backtest-lab-settings-used b{display:block;overflow-wrap:anywhere}
.backtest-lab-settings-used small{margin-bottom:3px;color:var(--muted);font-size:11px}
.backtest-lab-settings-used b{font-size:11.5px;line-height:1.4}
.backtest-lab-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:9px}
.backtest-lab-table{min-width:940px}
.backtest-lab-table th{font-size:11px;letter-spacing:.04em}
.backtest-lab-table td{vertical-align:top}
.backtest-lab-table td:first-child{min-width:150px}
.backtest-lab-table td:first-child>b,.backtest-lab-table td:first-child>span{display:block}
.backtest-lab-table td:first-child>span{margin-top:3px;color:var(--muted);font-size:11px}
.backtest-lab-table tr.recommended{background:rgba(59,130,246,.055)}
.backtest-lab-table tbody tr{cursor:pointer}
.backtest-lab-table tbody tr:hover,.backtest-lab-table tbody tr.selected{background:rgba(255,255,255,.03)}
.backtest-lab-profile,.backtest-lab-measure{display:flex;flex-direction:column;gap:3px}
.backtest-lab-profile b,.backtest-lab-measure b{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12.5px}
.backtest-lab-profile span,.backtest-lab-measure span{color:var(--muted);font-size:11px;line-height:1.4}
.backtest-lab-evidence{display:inline-flex;align-items:flex-start;gap:6px;max-width:230px;color:var(--muted);font-size:11.5px;line-height:1.4}
.backtest-lab-evidence i{margin-top:2px;color:var(--dim)}
.backtest-lab-evidence.ready{color:#8fb9f9}
.backtest-lab-evidence.ready i{color:var(--blue)}
.backtest-lab-inspector{margin-top:18px;padding-top:18px;border-top:1px solid var(--border)}
.backtest-lab-inspector-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:14px}
.backtest-lab-inspector-head h5{font-size:14px}
.backtest-lab-inspector-head p{margin-top:3px;color:var(--muted);font-size:12px}
.backtest-lab-profile-tabs{display:flex;gap:4px;padding:3px;border:1px solid var(--border);border-radius:9px;background:var(--panel2)}
.backtest-lab-profile-tabs button{min-height:30px;padding:5px 10px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.backtest-lab-profile-tabs button:hover{color:var(--text)}
.backtest-lab-profile-tabs button[aria-selected="true"]{background:var(--panel3);color:var(--text);box-shadow:0 2px 7px rgba(0,0,0,.18)}
.backtest-lab-profile-tabs button:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}
.backtest-lab-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid var(--border);border-radius:10px;overflow:hidden}
.backtest-lab-metric{min-width:0;padding:12px 14px;border-right:1px solid var(--border)}
.backtest-lab-metric:last-child{border-right:0}
.backtest-lab-metric span,.backtest-lab-metric small{display:block;color:var(--muted);font-size:12px}
.backtest-lab-metric b{display:block;margin:5px 0 2px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:15px;white-space:nowrap}
.backtest-lab-economics{margin-top:14px;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.backtest-lab-intrabar{margin-top:14px;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.backtest-lab-intrabar>summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 14px;cursor:pointer;list-style:none}
.backtest-lab-intrabar>summary::-webkit-details-marker{display:none}
.backtest-lab-intrabar>summary span,.backtest-lab-intrabar>summary small{display:block}
.backtest-lab-intrabar>summary small{margin-top:3px;color:var(--muted);font-size:12px;font-weight:400}
.backtest-lab-intrabar>summary strong{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12.5px;white-space:nowrap}
.backtest-lab-intrabar>summary:after{content:'›';color:var(--muted);font-size:18px;transform:rotate(90deg);transition:transform .15s ease}
.backtest-lab-intrabar[open]>summary{border-bottom:1px solid var(--border)}
.backtest-lab-intrabar[open]>summary:after{transform:rotate(270deg)}
.backtest-lab-intrabar-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--border)}
.backtest-lab-intrabar-table{max-height:260px;overflow:auto;border:0;border-radius:0}
.backtest-lab-intrabar-table table{min-width:880px}
.backtest-lab-intrabar-table th{position:sticky;top:0;background:var(--panel2);font-size:11px}
.backtest-lab-intrabar-table td{font-size:11.5px}
.backtest-lab-intrabar .yellow{color:var(--yellow)}
.backtest-lab-diagnostics{margin-top:14px;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.backtest-lab-diagnostic-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border-bottom:1px solid var(--border)}
.backtest-lab-diagnostic-metrics .backtest-lab-metric{border-right:1px solid var(--border)}
.backtest-lab-diagnostic-metrics .backtest-lab-metric:last-child{border-right:0}
.backtest-lab-excursion{position:relative;height:250px;padding:10px 12px 12px}
.backtest-lab-excursion canvas{display:block;width:100%;height:100%}
#backtestLabExcursionEmpty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;color:var(--muted);font-size:12px}
.backtest-lab-economics-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:12px 14px;border-bottom:1px solid var(--border)}
.backtest-lab-economics-head h6{font-size:13px;line-height:1.35}
.backtest-lab-economics-head p{max-width:72ch;margin-top:3px;color:var(--muted);font-size:12px;line-height:1.45}
.backtest-lab-economics-head>strong{flex:0 0 auto;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12.5px;font-variant-numeric:tabular-nums}
.backtest-lab-economics-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.backtest-lab-economics-metrics .backtest-lab-metric{border-bottom:1px solid var(--border)}
.backtest-lab-economics-metrics .backtest-lab-metric:last-child{border-right:0}
.backtest-lab-win-hurdle{padding:12px 14px 14px}
.backtest-lab-win-hurdle-labels{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px;color:var(--muted);font-size:12px}
.backtest-lab-win-hurdle-labels b{margin-left:4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:12px;font-variant-numeric:tabular-nums}
.backtest-lab-win-hurdle-track{position:relative;height:9px;border-radius:999px;background:var(--panel3)}
.backtest-lab-win-hurdle-track i{position:absolute;inset:0 auto 0 0;border-radius:999px;background:var(--red)}
.backtest-lab-win-hurdle-track i.ahead{background:var(--green)}
.backtest-lab-win-hurdle-track span{position:absolute;top:-4px;width:2px;height:17px;margin-left:-1px;border-radius:1px;background:var(--yellow)}
.backtest-lab-analysis-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(250px,.8fr);gap:14px;margin-top:14px}
.backtest-lab-chart-panel,.backtest-lab-breakdown{min-width:0;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.backtest-lab-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:11px 13px;border-bottom:1px solid var(--border)}
.backtest-lab-panel-head b,.backtest-lab-panel-head span{display:block}
.backtest-lab-panel-head b{font-size:12.5px}
.backtest-lab-panel-head span{margin-top:2px;color:var(--muted);font-size:11px}
.backtest-lab-panel-head .backtest-lab-path{margin:0;padding:3px 7px;border-radius:999px;background:var(--panel3);font-size:11px;white-space:nowrap}
.backtest-lab-chart{position:relative;height:250px;padding:10px 12px 12px}
.backtest-lab-chart canvas{display:block;width:100%;height:100%}
#backtestLabChartEmpty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;color:var(--muted);font-size:12px}
.backtest-lab-breakdown>#backtestLabBreakdown{padding:2px 13px}
.backtest-lab-breakdown .quality-row{padding:9px 0;font-size:11.5px}
.backtest-lab-positions,.backtest-lab-candidates{margin-top:14px}
.backtest-lab-positions>summary,.backtest-lab-candidates>summary{display:flex;width:max-content;gap:7px;margin-bottom:9px;cursor:pointer;color:var(--text);font-size:12px;font-weight:700}
.backtest-lab-positions>summary span,.backtest-lab-candidates>summary span{color:var(--muted);font-weight:500}
.backtest-lab-positions .table-card,.backtest-lab-candidates .table-card{max-height:330px;overflow:auto;border:1px solid var(--border);border-radius:9px}
.backtest-lab-positions table{min-width:1760px}
.backtest-lab-candidates table{min-width:900px}
.backtest-lab-positions th,.backtest-lab-candidates th{position:sticky;top:0;z-index:1;background:var(--panel2);font-size:11px}
.backtest-lab-positions td,.backtest-lab-candidates td{font-size:11.5px}
.backtest-lab-positions .pill{font-size:11px}
.backtest-position-audit{min-width:135px}
.backtest-position-audit>summary{width:max-content;cursor:pointer;color:var(--blue);font-weight:600}
.backtest-position-audit>div{display:grid;gap:7px;margin-top:8px;padding:8px;border:1px solid var(--border);border-radius:7px;background:var(--panel2)}
.backtest-position-audit span,.backtest-position-audit time,.backtest-position-audit b,.backtest-position-audit small{display:block}
.backtest-position-audit time,.backtest-position-audit small{color:var(--muted);font-size:11px}
.backtest-position-audit b{margin:1px 0;font-size:11px;font-weight:600;text-transform:capitalize}
.backtest-lab-limitations{margin-top:12px;color:var(--muted);font-size:12px}
.backtest-lab-limitations summary{width:max-content;cursor:pointer;color:var(--text);font-weight:600}
.backtest-lab-limitations ul{margin:9px 0 0 18px;line-height:1.65}
.backtest-lab-limitations li+li{margin-top:2px}
/* ===== ACCESS EXPIRY ===== */
.expiry-banner{display:none;align-items:center;gap:12px;padding:11px 14px;margin-bottom:16px;border-radius:9px;border:1px solid var(--yellow);background:rgba(240,185,11,.09);font-size:12.5px}
.expiry-banner.show{display:flex}
.expiry-banner.critical{border-color:var(--red);background:rgba(246,70,93,.1)}
.expiry-banner i{color:var(--yellow);flex-shrink:0}
.expiry-banner.critical i{color:var(--red)}
.expiry-banner span{flex:1}
.expiry-banner .btn{flex-shrink:0}
.access-status{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:8px;background:var(--panel3);flex-wrap:wrap}
.access-label{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.6px;margin-right:8px}
.access-status b{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:14px}
.access-status b.warn{color:var(--yellow)}
.access-status b.critical{color:var(--red)}
.access-expiry{color:var(--muted);font-size:11px}

.quality-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-size:13px}
.quality-row:last-child{border-bottom:none}
.quality-row span{color:var(--muted)}
.quality-row b{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;text-align:right}
#backtestResults>.card,#backtestComparison{margin-bottom:16px}
.backtest-lab-archive{margin-bottom:16px;overflow:hidden}
.backtest-lab-archive[hidden]{display:none}
.backtest-lab-archive h4 i{margin-right:8px;color:var(--blue)}
.backtest-lab-archive-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.backtest-lab-archive-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto;gap:11px;align-items:center;padding:13px 16px;border-bottom:1px solid var(--border)}
.backtest-lab-archive-row:nth-child(odd){border-right:1px solid var(--border)}
.backtest-lab-archive-row input{accent-color:var(--yellow)}
.backtest-lab-archive-copy{min-width:0}
.backtest-lab-archive-copy b,.backtest-lab-archive-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.backtest-lab-archive-copy b{font-size:13px}
.backtest-lab-archive-copy span{margin-top:3px;color:var(--muted);font-size:11.5px}
.backtest-lab-archive-metric{text-align:right}
.backtest-lab-archive-metric b,.backtest-lab-archive-metric span{display:block;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.backtest-lab-archive-metric b{font-size:13px}
.backtest-lab-archive-metric span{margin-top:3px;color:var(--muted);font-size:11px}
.backtest-lab-archive-actions{display:flex;gap:3px}
.backtest-lab-archive-comparison{margin:0 14px 14px;overflow:auto;border:1px solid var(--border);border-radius:9px}
.backtest-lab-archive-comparison table{min-width:1100px}
@media(max-width:900px){.backtest-lab-archive-list{grid-template-columns:1fr}.backtest-lab-archive-row:nth-child(odd){border-right:0}.backtest-lab-diagnostic-metrics,.backtest-lab-intrabar-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Operational telemetry */
.telemetry-page-head h3{font-size:clamp(25px,2.2vw,34px);line-height:1.2}
.telemetry-page-head .page-actions{align-self:flex-end}
.telemetry-refresh{display:inline-flex;align-items:center;gap:8px}
.telemetry-summary-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.telemetry-summary-item{position:relative;min-width:0;padding:18px 20px}
.telemetry-summary-item+.telemetry-summary-item::before{content:"";position:absolute;top:18px;bottom:18px;left:0;width:1px;background:var(--border)}
.telemetry-summary-item>span,.telemetry-summary-item>small{display:block;color:var(--muted);line-height:1.45}
.telemetry-summary-item>span{font-size:14px;font-weight:600}
.telemetry-summary-item>small{font-size:13px;font-weight:400;overflow-wrap:anywhere}
.telemetry-summary-item>strong{display:block;margin:8px 0 4px;color:var(--text);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:24px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
.telemetry-summary-item>strong.down{color:var(--red)}
@media(max-width:1000px){
  .telemetry-summary-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .telemetry-summary-item:nth-child(3)::before{display:none}
  .telemetry-summary-item:nth-child(n+3){border-top:1px solid var(--border)}
}
@media(max-width:480px){
  .telemetry-summary-rail{grid-template-columns:1fr}
  .telemetry-summary-item{padding:15px}
  .telemetry-summary-item+.telemetry-summary-item::before{display:none}
  .telemetry-summary-item:nth-child(n+2){border-top:1px solid var(--border)}
}
.incident-list{display:grid;gap:10px}
.incident{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--panel2)}
.incident.critical,.incident.error{border-left:3px solid var(--red)}
.incident.warning{border-left:3px solid var(--yellow)}
.incident.info{border-left:3px solid var(--blue)}
.incident.resolved{opacity:.62}
.incident-marker{padding-top:3px;text-align:center;color:var(--blue)}
.incident.critical .incident-marker,.incident.error .incident-marker{color:var(--red)}
.incident.warning .incident-marker{color:var(--yellow)}
.incident-head{display:flex;justify-content:space-between;gap:14px;align-items:center}
.incident-head time,.incident-meta{color:var(--muted);font-size:12px}
.incident-body p{font-size:14px;line-height:1.5;margin:8px 0;color:var(--text)}
.incident-recovery{display:flex;gap:8px;align-items:flex-start;padding:9px 10px;margin:8px 0;border-radius:8px;background:rgba(59,130,246,.08);font-size:12px;line-height:1.45}
.incident-recovery b{white-space:nowrap;color:var(--blue)}
.incident-recovery.auto_repairing{background:rgba(240,185,11,.09)}
.incident-recovery.auto_repairing b{color:var(--yellow)}
.incident-recovery.action_required{background:rgba(246,70,93,.09)}
.incident-recovery.action_required b{color:var(--red)}
.incident-recovery.recovered{background:rgba(34,197,94,.09)}
.incident-recovery.recovered b{color:var(--green)}
.incident-detail{margin:8px 0;color:var(--muted);font-size:12px}
.incident-detail summary{cursor:pointer;color:var(--text)}
.incident-detail code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px;padding:9px;border-radius:7px;background:var(--panel);color:var(--muted)}
.incident-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
@media(max-width:700px){.incident{grid-template-columns:26px minmax(0,1fr)}.incident-actions{grid-column:2}.incident-head{align-items:flex-start;flex-direction:column;gap:7px}.telemetry-filters{align-items:stretch;flex-direction:column}}

@media(max-width:1250px){.g3{grid-template-columns:repeat(2,minmax(0,1fr))}.ticker .coin{padding:6px 8px}.topbar{gap:10px}}
@media(max-width:1100px){.g4,.g5,.g6{grid-template-columns:repeat(2,1fr)}.g2-1,.g1-2,.backtest-workspace,.backtest-results-grid{grid-template-columns:1fr}.sidebar{width:64px}.logo h1,.nav a span,.nav-label,.account-summary,.account-chevron,.nav .badge{display:none}.account-trigger{justify-content:center;padding:6px}.account-menu{left:54px;right:auto;bottom:10px;width:248px}.search{width:180px}.ticker{display:none}}
@media(max-width:1300px){.backtest-inputs>.card-b{grid-template-columns:repeat(2,minmax(0,1fr))}.backtest-lab-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.backtest-lab-controls .field:first-child{grid-column:1/-1}.backtest-lab-settings-used{grid-template-columns:repeat(3,minmax(0,1fr))}.backtest-lab-settings-used>span:nth-child(4n){border-inline-end:1px solid var(--border)}.backtest-lab-settings-used>span:nth-child(3n){border-inline-end:0}.backtest-lab-settings-used>span:nth-child(-n+6){border-bottom:1px solid var(--border)}.backtest-lab-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.backtest-lab-metric:nth-child(3){border-right:0}.backtest-lab-metric:nth-child(-n+3){border-bottom:1px solid var(--border)}}
@media(max-width:1180px){#page-backtesting.active{display:flex;flex-direction:column;gap:16px}#page-backtesting>.page-head{order:0;width:100%}#page-backtesting .backtest-lab-source{order:1;width:100%}#page-backtesting>.backtest-inputs{order:2;width:100%}#page-backtesting .backtest-lab-note{order:3;width:100%}#page-backtesting .backtest-lab-strategy{order:4;position:static;width:100%}#page-backtesting .backtest-lab-experiment{order:5;width:100%}#page-backtesting .backtest-lab-results{order:6;width:100%}#page-backtesting>.backtest-lab-archive{order:7;width:100%}#page-backtesting>#backtestResults{order:8;width:100%}#page-backtesting>#backtestComparison{order:9;width:100%}.backtest-lab-strategy-grid,.backtest-lab-advanced-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.backtest-lab-analysis-grid{grid-template-columns:1fr}.backtest-lab-inspector-head{align-items:stretch;flex-direction:column}.backtest-lab-profile-tabs{align-self:flex-start;max-width:100%;overflow-x:auto}.backtest-lab-economics-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.backtest-lab-economics-metrics .backtest-lab-metric:nth-child(2){border-right:0}.backtest-lab-economics-metrics .backtest-lab-metric:nth-child(3){border-right:1px solid var(--border)}}
@media(max-width:700px){body{overflow:auto}.app{min-height:100vh;height:auto}.sidebar{position:fixed;left:0;top:0;bottom:0;z-index:60}.main{margin-left:64px;min-width:0}.topbar{height:auto;min-height:60px;padding:10px 12px;flex-wrap:wrap}.topbar h2{order:1}.topbar .spacer{order:2}.net-badge,.notif-wrap,.topbar>.icon-btn{order:3}.search{order:4;width:100%}.content{padding:14px;overflow:visible}.g4,.g3,.g2,.f2{grid-template-columns:1fr!important}.page-head{align-items:flex-start;gap:12px;flex-direction:column}.page-head>div:last-child{width:100%;flex-wrap:wrap}.page-actions{width:100%;justify-content:space-between}.page-actions .tabs{max-width:calc(100% - 46px);overflow-x:auto}.card-h{gap:10px;align-items:flex-start}.card-h .tabs{max-width:100%;overflow-x:auto}.tabs button{padding:7px 10px}.stat .value{font-size:22px}.mmt-price-source{align-items:stretch;flex-direction:column}.mmt-price-source select{width:100%;max-width:none}.notif-panel{position:fixed;right:10px;left:74px;top:112px;width:auto}.modal{max-width:calc(100vw - 24px)}.modal-b{padding:16px}.protection-position-summary dl{grid-template-columns:1fr}.bot-meta{gap:10px}.toasts{left:74px;right:10px;top:120px}.toast{min-width:0;width:100%}}
@media(max-width:700px){.backtest-inputs>.card-b{grid-template-columns:1fr}.backtest-section-intro{align-items:flex-start;flex-direction:column;gap:3px}.backtest-inputs .tp-labels{display:none}.backtest-inputs .tp-target{grid-template-columns:42px minmax(0,1fr) 36px}.backtest-inputs .tp-target .tp-unit-input:nth-of-type(2){grid-column:2}.backtest-inputs .tp-target .btn-icon{grid-column:3;grid-row:1/3}.backtest-lab-strategy>summary,.backtest-lab-advanced>summary,.backtest-lab-run,.backtest-lab-result-head,.backtest-lab-source{align-items:stretch;flex-direction:column}.backtest-lab-strategy>summary small,.backtest-lab-advanced>summary small{text-align:left}.backtest-lab-strategy-grid,.backtest-lab-advanced-grid,.backtest-lab-controls{grid-template-columns:1fr}.backtest-lab-controls .field:first-child{grid-column:auto}.backtest-replay-guide>summary{align-items:flex-start;flex-direction:column;gap:3px}.backtest-replay-guide>summary small{text-align:left}.backtest-replay-guide-body{grid-template-columns:1fr}.backtest-replay-guide article,.backtest-replay-guide article+article{padding:2px 0 14px;border-left:0}.backtest-replay-guide article+article{padding-top:14px;border-top:1px solid var(--border)}.backtest-lab-source-actions{justify-content:flex-start}.backtest-lab-meta{align-items:flex-start;text-align:left}.backtest-lab-settings-used{grid-template-columns:1fr}.backtest-lab-settings-used>span{border-inline-end:0;border-bottom:1px solid var(--border)}.backtest-lab-settings-used>span:last-child{border-bottom:0}.backtest-lab-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.backtest-lab-metric{border-bottom:1px solid var(--border)}.backtest-lab-metric:nth-child(2n){border-right:0}.backtest-lab-metric:nth-last-child(-n+2){border-bottom:0}.backtest-lab-economics-head,.backtest-lab-intrabar>summary{align-items:flex-start;flex-direction:column;gap:8px}.backtest-lab-win-hurdle-labels{align-items:flex-start;flex-direction:column;gap:4px}}
@media(max-width:700px){.card-actions{flex-wrap:wrap;justify-content:flex-end}.risk-monitor-card{min-height:0}.risk-metrics{grid-template-columns:1fr}.risk-symbol-row{grid-template-columns:60px minmax(48px,1fr) auto}}
@media(min-width:901px) and (max-width:1300px){.backtest-lab-economics-metrics .backtest-lab-metric:nth-child(3){border-right:1px solid var(--border)}}
@media(max-width:700px){.backtest-lab-economics-metrics .backtest-lab-metric:nth-last-child(-n+2){border-bottom:1px solid var(--border)}}

/* Backtesting workspace: compact setup summary with an off-canvas editor. */
#page-backtesting.active{display:flex;flex-direction:column;gap:16px}
#page-backtesting>.page-head{order:0;width:100%;margin:0}
#page-backtesting .backtest-lab-source{order:1;width:100%}
#page-backtesting>.backtest-setup-summary{order:2;width:100%}
#page-backtesting .backtest-lab-note{order:3;width:100%}
#page-backtesting .backtest-lab-experiment{order:4;width:100%}
#page-backtesting .backtest-lab-results{order:5;width:100%}
#page-backtesting>.backtest-lab-archive{order:6;width:100%}
#page-backtesting>#backtestResults{order:7;width:100%}
#page-backtesting>#backtestComparison{order:8;width:100%}
.backtest-setup-summary{display:grid;grid-template-columns:minmax(175px,.8fr) minmax(0,3.6fr) auto;gap:18px;align-items:center;padding:13px 14px}
.backtest-setup-heading{display:flex;align-items:center;gap:10px;min-width:0}
.backtest-setup-icon{display:grid;width:32px;height:32px;flex:0 0 32px;place-items:center;border-radius:8px;background:rgba(59,130,246,.1);color:#72a7ff}
.backtest-setup-heading h4{font-size:14px;line-height:1.3}
.backtest-setup-heading p{margin-top:2px;color:var(--muted);font-size:11.5px}
.backtest-setup-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-width:0;margin:0}
.backtest-setup-facts>div{min-width:0;padding:1px 14px;border-left:1px solid var(--border)}
.backtest-setup-facts dt{color:var(--muted);font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.backtest-setup-facts dd,.backtest-setup-facts small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.backtest-setup-facts dd{margin:4px 0 0;color:var(--text);font-size:12.5px;font-weight:700}
.backtest-setup-facts small{margin-top:3px;color:var(--muted);font-size:11px}
.backtest-setup-edit{white-space:nowrap}
.backtest-setup-overlay{position:fixed;inset:0;z-index:150;display:flex;justify-content:flex-end;background:rgba(3,7,13,.66);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease-out,visibility 0s linear .18s}
.backtest-setup-overlay.show{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .18s ease-out}
.backtest-setup-drawer{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(640px,calc(100vw - 72px));height:100dvh;border-left:1px solid var(--border);background:var(--panel);box-shadow:-18px 0 48px rgba(0,0,0,.34);transform:translateX(24px);transition:transform .22s cubic-bezier(.22,1,.36,1)}
.backtest-setup-overlay.show .backtest-setup-drawer{transform:translateX(0)}
.backtest-setup-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px 20px;border-bottom:1px solid var(--border)}
.backtest-setup-drawer-head h3{font-size:18px;line-height:1.3}
.backtest-setup-drawer-head p{max-width:58ch;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.backtest-setup-drawer-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 20px 24px;scrollbar-color:#344057 var(--panel)}
.backtest-setup-drawer-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 20px;border-top:1px solid var(--border);background:var(--panel)}
.backtest-setup-drawer-foot>span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11.5px;line-height:1.4}
.backtest-setup-drawer-foot>span i{color:var(--blue)}
.backtest-setup-drawer .backtest-inputs{display:block;margin:0;border:0;border-radius:0;background:transparent}
.backtest-setup-drawer .backtest-inputs>.card-h{display:flex;padding:18px 0 12px;border-bottom:0}
.backtest-setup-drawer .backtest-inputs>.card-b{display:block;padding:8px 0 22px}
.backtest-setup-drawer .backtest-inputs>.card-b>.f2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.backtest-setup-drawer .backtest-inputs .field{margin-bottom:12px}
.backtest-setup-drawer .backtest-inputs .tp-header{margin-top:5px}
.backtest-setup-drawer .backtest-inputs .tp-labels,.backtest-setup-drawer .backtest-inputs .tp-target{grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 36px}
.backtest-setup-drawer details.adv{margin-top:16px}
.backtest-setup-drawer .backtest-lab-strategy{display:block;position:static;width:auto;margin:0 -20px;border-width:1px 0 0;border-radius:0;background:transparent}
.backtest-setup-drawer .backtest-lab-strategy>summary{padding:17px 20px;background:var(--panel2)}
.backtest-setup-drawer .backtest-lab-strategy-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 20px}
.backtest-setup-drawer .backtest-lab-strategy-grid .field{margin:0}
.backtest-advanced-groups{margin:0 20px 2px;border-top:1px solid var(--border)}
.backtest-advanced-heading{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:16px 0 9px}
.backtest-advanced-heading b{font-size:13px}
.backtest-advanced-heading span{color:var(--muted);font-size:11.5px}
.backtest-advanced-group{border-top:1px solid var(--border)}
.backtest-advanced-group:last-child{border-bottom:1px solid var(--border)}
.backtest-advanced-group>summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px 0;cursor:pointer;list-style:none}
.backtest-advanced-group>summary::-webkit-details-marker{display:none}
.backtest-advanced-group>summary span{font-size:12.5px;font-weight:700}
.backtest-advanced-group>summary small{max-width:34ch;color:var(--muted);font-size:11px;text-align:right}
.backtest-advanced-group>summary::after{content:'\f078';grid-column:3;font-family:'Font Awesome 6 Free';font-size:10px;font-weight:900;color:var(--muted);transition:transform .15s ease}
.backtest-advanced-group[open]>summary::after{transform:rotate(180deg)}
.backtest-advanced-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:3px 0 16px}
.backtest-advanced-group-grid .field{min-width:0;margin:0}
body.backtest-setup-open{overflow:hidden}
@media(prefers-reduced-motion:reduce){.backtest-setup-overlay,.backtest-setup-drawer,.backtest-advanced-group>summary::after{transition:none}}
@media(max-width:1250px){.backtest-setup-summary{grid-template-columns:minmax(170px,.8fr) minmax(0,3fr) auto}.backtest-setup-facts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:12px}.backtest-setup-facts>div:nth-child(3),.backtest-setup-facts>div:nth-child(4){padding-top:10px;border-top:1px solid var(--border)}}
@media(max-width:820px){.backtest-setup-summary{grid-template-columns:minmax(0,1fr) auto}.backtest-setup-facts{grid-column:1/-1;grid-row:2}.backtest-setup-facts>div:first-child,.backtest-setup-facts>div:nth-child(3){border-left:0}.backtest-setup-drawer{width:calc(100vw - 64px)}.backtest-setup-drawer .backtest-lab-strategy-grid,.backtest-advanced-group-grid{grid-template-columns:1fr}}
@media(max-width:700px){.backtest-setup-summary{grid-template-columns:1fr}.backtest-setup-edit{grid-row:2;width:100%}.backtest-setup-facts{grid-row:3;grid-template-columns:1fr}.backtest-setup-facts>div{padding:10px 0;border-top:1px solid var(--border);border-left:0}.backtest-setup-drawer{width:100vw}.backtest-setup-drawer-head{padding:15px 16px}.backtest-setup-drawer-body{padding:0 16px 20px}.backtest-setup-drawer-foot{align-items:stretch;flex-direction:column;padding:12px 16px}.backtest-setup-drawer-foot .btn{width:100%}.backtest-setup-drawer .backtest-inputs>.card-b>.f2{grid-template-columns:1fr}.backtest-setup-drawer .backtest-lab-strategy{margin-inline:-16px}.backtest-setup-drawer .backtest-lab-strategy>summary{padding-inline:16px}.backtest-setup-drawer .backtest-lab-strategy-grid{padding-inline:16px}.backtest-advanced-groups{margin-inline:16px}.backtest-advanced-group>summary{grid-template-columns:1fr auto}.backtest-advanced-group>summary small{display:none}.backtest-advanced-group>summary::after{grid-column:2}}

/* Performance analytics: compact dashboard answer and auditable drill-down. */
.dashboard-primary{grid-template-columns:minmax(420px,1.65fr) minmax(300px,.72fr) minmax(300px,.72fr)}
.dashboard-performance-card{min-width:0;overflow:hidden}
.dashboard-performance-head{min-height:58px}
.dashboard-performance-tabs button{padding:6px 10px;font-size:11px}
.dashboard-performance-body{display:grid;grid-template-columns:minmax(0,1fr) 128px;padding:16px 18px 14px}
.dashboard-performance-hero{border:0;background:transparent;color:var(--text);text-align:left;cursor:pointer;min-width:0;padding:0}
.dashboard-performance-hero>span,.dashboard-performance-metrics span,.dashboard-performance-days span,.dashboard-performance-footer>span{display:block;color:var(--muted);font-size:12px}
.dashboard-performance-hero>strong{display:block;margin:3px 0;color:var(--green);font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:27px;line-height:1.15;font-variant-numeric:tabular-nums}
.dashboard-performance-hero>strong.down{color:var(--red)}
.dashboard-performance-hero>strong.performance-flat{color:var(--muted)}
.dashboard-performance-hero>small{display:block;color:var(--muted);font-size:11px}
.dashboard-performance-hero:focus-visible{outline:2px solid var(--yellow);outline-offset:5px;border-radius:4px}
.dashboard-performance-spark{align-self:center;height:54px;min-width:0}
.dashboard-performance-spark svg{display:block;width:100%;height:100%}
.dashboard-performance-metrics{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:15px -18px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.dashboard-performance-metrics>div{min-width:0;padding:12px 14px}
.dashboard-performance-metrics>div+div{border-left:1px solid var(--border)}
.dashboard-performance-metrics strong{display:block;margin:4px 0 1px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:16px;font-variant-numeric:tabular-nums}
.dashboard-performance-metrics strong.up{color:var(--green)}.dashboard-performance-metrics strong.down{color:var(--red)}
.dashboard-performance-metrics strong.performance-flat{color:var(--muted)}
.dashboard-performance-metrics small{display:block;color:var(--muted);font-size:10px;line-height:1.3}
.dashboard-performance-days{grid-column:1/-1;padding-top:12px}
.dashboard-performance-days>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}.dashboard-performance-days>div:first-child small{color:var(--muted);font-size:11px}
.dashboard-performance-day-strip{display:grid;grid-template-columns:repeat(14,minmax(5px,1fr));gap:5px}
.dashboard-performance-day-strip i{display:block;height:22px;border:1px solid var(--border);border-radius:3px;background:var(--panel2)}
.dashboard-performance-footer{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(40px,1fr) auto;align-items:center;gap:8px;padding-top:12px;font-size:11px}
.dashboard-performance-footer>span:last-child{grid-column:1/-1;text-align:right;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.dashboard-performance-win-track{height:5px;border-radius:3px;background:rgba(246,70,93,.35);overflow:hidden}.dashboard-performance-win-track i{display:block;height:100%;background:var(--green)}
.dashboard-performance-footer strong{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:11px}

.performance-page-head{margin-bottom:16px}
.performance-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-width:0;padding:12px 14px;margin-bottom:16px}
.performance-custom-dates,.performance-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.performance-filters{margin-left:auto}
.performance-toolbar label{display:grid;gap:5px;color:var(--muted);font-size:11px;font-weight:600}
.performance-toolbar select,.performance-toolbar input{height:34px;min-width:132px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);color:var(--text);padding:0 10px;font:inherit;font-size:12px}
.performance-toolbar select:focus-visible,.performance-toolbar input:focus-visible{outline:2px solid var(--yellow);outline-offset:1px}
.performance-answer{margin-bottom:16px;overflow:hidden}
.performance-answer-main{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px}
.performance-answer-main h4{font-size:14px;color:var(--muted);font-weight:600}
.performance-answer-main strong{display:block;margin:5px 0 3px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:34px;line-height:1.15;font-variant-numeric:tabular-nums}
.performance-answer-main strong.up{color:var(--green)}.performance-answer-main strong.down{color:var(--red)}
.performance-answer-main p{color:var(--muted);font-size:12px}
.performance-verdict{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border-radius:8px;background:var(--panel2);color:var(--muted);font-size:12px;font-weight:700}
.performance-verdict.profitable{background:rgba(14,203,129,.1);color:var(--green)}.performance-verdict.losing{background:rgba(246,70,93,.1);color:var(--red)}
.performance-answer-breakdown{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--border)}
.performance-answer-breakdown>div{position:relative;padding:15px 20px}.performance-answer-breakdown>div+div{border-left:1px solid var(--border)}
.performance-answer-breakdown span,.performance-answer-breakdown small{display:block;color:var(--muted);font-size:11px}.performance-answer-breakdown strong{display:block;margin-top:5px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:16px;font-variant-numeric:tabular-nums}
.performance-answer strong.performance-flat,.performance-breakdowns .performance-flat,.performance-day-record .performance-flat{color:var(--muted)}
.performance-quality{display:none;padding:10px 20px;border-top:1px solid rgba(240,185,11,.24);background:rgba(240,185,11,.07);color:var(--yellow);font-size:12px;line-height:1.5}.performance-quality.show{display:block}
.performance-metric-rail{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:16px;overflow:hidden}
.performance-metric-rail>div{min-width:0;padding:17px 20px}.performance-metric-rail>div+div{border-left:1px solid var(--border)}
.performance-metric-rail span,.performance-metric-rail small{display:block;color:var(--muted);font-size:11px}.performance-metric-rail strong{display:block;margin:7px 0 3px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:20px;font-variant-numeric:tabular-nums}
.performance-curve-card{margin-bottom:16px}.performance-meta{color:var(--muted);font-size:12px}.performance-curve-wrap{position:relative;height:310px;padding:12px 18px 18px}.performance-curve-wrap canvas{display:block;width:100%;height:100%}
.performance-calendar-legend{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;white-space:nowrap}.performance-calendar-legend i{width:9px;height:9px;border-radius:2px}.performance-calendar-legend .loss{background:rgba(246,70,93,.65)}.performance-calendar-legend .flat{background:var(--panel3)}.performance-calendar-legend .profit{background:rgba(14,203,129,.65)}
.performance-calendar-month{margin-bottom:22px}.performance-calendar-month:last-child{margin-bottom:0}.performance-calendar-month h5{margin-bottom:10px;font-size:13px}.performance-calendar-weekdays,.performance-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.performance-calendar-weekdays span{padding:0 5px 3px;color:var(--muted);font-size:10px;text-align:right;text-transform:uppercase}.performance-calendar-day{position:relative;min-height:54px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);color:var(--text);padding:7px;text-align:left;cursor:pointer}.performance-calendar-day:hover{border-color:var(--muted)}.performance-calendar-day:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}.performance-calendar-day.selected{border-color:var(--yellow)}.performance-calendar-day.empty{visibility:hidden}.performance-calendar-day time{display:block;color:var(--muted);font-size:10px}.performance-calendar-day strong{display:block;margin-top:7px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}.performance-calendar-day strong.performance-flat{color:var(--muted)}.performance-day-detail{margin-top:16px;border-top:1px solid var(--border);padding-top:16px}.performance-day-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.performance-day-detail-head p{color:var(--muted);font-size:12px}.performance-day-records{display:grid;gap:1px;background:var(--border);border:1px solid var(--border);border-radius:8px;overflow:hidden}.performance-day-record{display:grid;grid-template-columns:150px minmax(140px,1fr) 100px 120px 120px;gap:12px;padding:10px 12px;background:var(--panel2);font-size:12px;align-items:center}.performance-day-record small{display:block;color:var(--muted)}
.performance-breakdowns{min-width:0;margin-bottom:16px}.performance-breakdowns .card-h{flex-wrap:wrap}.performance-breakdowns .table-wrap{max-width:100%;overflow-x:auto}.performance-breakdowns table{min-width:760px}.performance-breakdowns td:first-child{font-weight:700;text-transform:capitalize}
@media(max-width:1500px){.dashboard-primary{grid-template-columns:minmax(420px,1.5fr) minmax(300px,.75fr)}.dashboard-primary .risk-monitor-card{grid-column:1/-1;min-height:0}.dashboard-primary .risk-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.dashboard-primary{grid-template-columns:1fr}.dashboard-primary .risk-monitor-card{grid-column:auto}.dashboard-primary .risk-metrics{grid-template-columns:1fr}.performance-metric-rail{grid-template-columns:repeat(3,minmax(0,1fr))}.performance-metric-rail>div:nth-child(4){border-left:0}.performance-metric-rail>div:nth-child(n+4){border-top:1px solid var(--border)}}
@media(max-width:760px){.performance-toolbar>.tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}.performance-toolbar>.tabs::-webkit-scrollbar{display:none}.performance-toolbar>.tabs button,.dashboard-performance-tabs button{min-height:44px}.performance-filters{width:100%;margin-left:0}.performance-filters label{flex:1}.performance-toolbar select,.performance-toolbar input{width:100%;min-width:0;min-height:44px}.performance-answer-main{align-items:flex-start;flex-direction:column}.performance-answer-breakdown{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-answer-breakdown>div:nth-child(3){border-left:0}.performance-answer-breakdown>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-metric-rail{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-metric-rail>div:nth-child(odd){border-left:0}.performance-metric-rail>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-day-record{grid-template-columns:1fr 1fr}.performance-day-record>*:nth-child(n+3){text-align:left}.performance-calendar-day{min-height:45px;padding:5px}.performance-calendar-day strong{font-size:9px}.performance-calendar-weekdays,.performance-calendar-grid{gap:3px}.performance-calendar-legend{display:none}}
@media(max-width:480px){.dashboard-performance-body{grid-template-columns:1fr}.dashboard-performance-spark{display:none}.dashboard-performance-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-performance-metrics>div:nth-child(3){grid-column:1/-1;border-top:1px solid var(--border);border-left:0}.dashboard-performance-metrics span,.dashboard-performance-days span,.dashboard-performance-footer>span{font-size:11px}.dashboard-performance-footer strong{font-size:11px}.performance-answer-breakdown,.performance-metric-rail{grid-template-columns:1fr}.performance-answer-breakdown>div+div,.performance-metric-rail>div+div{border-left:0}.performance-answer-breakdown>div:nth-child(n+2),.performance-metric-rail>div:nth-child(n+2){border-top:1px solid var(--border)}.performance-calendar-day strong{font-size:0}.performance-calendar-day strong::after{content:attr(data-sign);font-size:11px}}

/* Performance workspace: completed-position analysis, not raw ledger browsing. */
.performance-toolbar{position:relative;padding:11px 13px;margin-bottom:14px;background:var(--panel)}
.performance-toolbar label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.performance-result-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(380px,.92fr);gap:14px;margin-bottom:14px}
.performance-result-grid .performance-answer{margin:0}.performance-answer-main{align-items:flex-start;padding:20px 22px 18px}.performance-answer-main h4,.performance-closed-head h4{font-size:13px;color:var(--muted);font-weight:650}.performance-answer-main p,.performance-closed-head p{font-size:11px;line-height:1.45}.performance-verdict{font-size:11px;white-space:nowrap}
.performance-answer-breakdown{grid-template-columns:repeat(3,minmax(0,1fr))}.performance-answer-breakdown>div{padding:13px 18px}.performance-answer-breakdown span{font-size:10px}.performance-answer-breakdown strong{font-size:15px}
.performance-closed-summary{display:flex;flex-direction:column;overflow:hidden}.performance-closed-head{display:flex;justify-content:space-between;gap:18px;padding:20px 22px 15px}.performance-closed-head>strong{font:700 25px 'SFMono-Regular',Consolas,monospace;font-variant-numeric:tabular-nums}.performance-closed-outcomes{display:flex;align-items:baseline;gap:8px;padding:2px 22px 17px}.performance-closed-outcomes>strong{font-size:25px}.performance-closed-outcomes>span{color:var(--muted);font-size:11px}.performance-closed-outcomes>div{margin-left:auto;text-align:right}.performance-closed-outcomes b,.performance-closed-outcomes small{display:block}.performance-closed-outcomes b{font:700 13px 'SFMono-Regular',Consolas,monospace}.performance-closed-outcomes small{margin-top:3px;color:var(--muted);font-size:10px}.performance-closed-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:auto;border-top:1px solid var(--border)}.performance-closed-metrics>div{padding:13px 16px}.performance-closed-metrics>div+div{border-left:1px solid var(--border)}.performance-closed-metrics span{display:block;color:var(--muted);font-size:10px}.performance-closed-metrics strong{display:block;margin-top:5px;font:700 15px 'SFMono-Regular',Consolas,monospace;font-variant-numeric:tabular-nums}
.performance-curve-card{margin-bottom:14px}.performance-curve-wrap{height:270px;padding:10px 18px 16px}.performance-meta{font-size:11px}
.performance-calendar-card{margin-bottom:14px}.performance-calendar-head{align-items:flex-start}.performance-calendar-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end}.performance-month-nav{display:grid;grid-template-columns:32px minmax(132px,auto) 32px;align-items:center;gap:5px}.performance-month-nav strong{text-align:center;font-size:12px}.performance-month-nav button{padding:0;min-width:32px}.performance-calendar-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);gap:18px;align-items:start}
.performance-calendar-day{min-height:88px;padding:8px;transition:border-color .18s ease,transform .18s ease}.performance-calendar-day:hover{border-color:#596579;transform:translateY(-1px)}.performance-calendar-day.selected{border-color:var(--yellow);box-shadow:0 0 0 1px rgba(240,185,11,.18)}.performance-calendar-day strong{margin-top:10px;font-size:12px}.performance-calendar-day>span{display:block;margin-top:7px;color:var(--muted);font-size:9px;line-height:1.35}.performance-calendar-legend{margin-top:11px;font-size:10px}
.performance-day-detail{min-height:346px;margin:0;border-top:0;border-left:1px solid var(--border);padding:0 0 0 18px}.performance-day-empty{min-height:310px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:var(--muted);text-align:center}.performance-day-empty i{font-size:22px}.performance-day-empty strong{color:var(--text);font-size:13px}.performance-day-empty span{max-width:28ch;font-size:11px;line-height:1.45}.performance-day-empty.compact{min-height:100px}.performance-day-detail-head{margin-bottom:13px}.performance-day-detail-head h5{font-size:13px}.performance-day-detail-head p{margin-top:3px;font-size:10px}.performance-day-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border);border-radius:8px;overflow:hidden}.performance-day-summary>div{padding:9px 10px;background:var(--panel2)}.performance-day-summary>div:nth-child(even){border-left:1px solid var(--border)}.performance-day-summary>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-day-summary span{display:block;color:var(--muted);font-size:9px}.performance-day-summary strong{display:block;margin-top:4px;font:700 11px 'SFMono-Regular',Consolas,monospace;font-variant-numeric:tabular-nums}.performance-day-section-title{display:flex;justify-content:space-between;margin:16px 0 8px;font-size:11px}.performance-day-section-title span{color:var(--muted)}.performance-position-row{padding:10px 0;border-top:1px solid var(--border)}.performance-position-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px}.performance-position-row-head>div{display:flex;align-items:center;gap:7px}.performance-position-row-meta,.performance-position-row-prices{display:flex;gap:10px;flex-wrap:wrap;margin-top:7px;color:var(--muted);font-size:9px}.performance-position-row-meta span+span::before,.performance-position-row-prices span+span::before{content:'·';margin-right:10px}.performance-position-row-prices b{color:var(--text);font-weight:600}
.performance-breakdowns table{min-width:860px}.performance-answer .performance-flat,.performance-breakdowns .performance-flat,.performance-day-detail .performance-flat{color:var(--muted)}
@media(max-width:1180px){.performance-result-grid,.performance-calendar-layout{grid-template-columns:1fr}.performance-day-detail{min-height:0;border-left:0;border-top:1px solid var(--border);padding:18px 0 0}.performance-day-empty{min-height:140px}}
@media(max-width:760px){.performance-toolbar{position:static}.performance-calendar-controls{align-items:stretch;flex-direction:column;width:100%}.performance-calendar-controls>.tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}.performance-month-nav{align-self:stretch}.performance-calendar-day{min-height:72px;padding:6px}.performance-calendar-day strong{font-size:10px}.performance-calendar-day>span{font-size:8px}.performance-curve-wrap{height:230px}}
@media(max-width:520px){.performance-answer-breakdown,.performance-closed-metrics{grid-template-columns:1fr}.performance-answer-breakdown>div+div,.performance-closed-metrics>div+div{border-left:0;border-top:1px solid var(--border)}.performance-calendar-day{min-height:52px}.performance-calendar-day strong{margin-top:6px;font-size:9px}.performance-calendar-day>span{display:none}.performance-day-summary{grid-template-columns:1fr}.performance-day-summary>div:nth-child(even){border-left:0}.performance-day-summary>div+div{border-top:1px solid var(--border)}}

/* P&L calendar — dense monthly ledger with weekly rollups. */
.performance-calendar-card{overflow:hidden}.performance-calendar-card .performance-calendar-head{min-height:58px;align-items:center;padding:0 16px}.performance-calendar-card .performance-calendar-head h4{font-size:13px}.performance-calendar-card .performance-month-nav{grid-template-columns:34px minmax(120px,auto) 34px;gap:8px}.performance-calendar-card .performance-month-nav strong{color:var(--text);font-size:13px}.performance-calendar-card .performance-month-nav button{height:32px;border-color:var(--border);background:var(--panel2)}
.performance-calendar-summary{display:flex;align-items:stretch;gap:0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:0 14px}.performance-calendar-summary>div{min-width:150px;padding:14px 16px}.performance-calendar-summary span{display:block;color:var(--muted);font-size:10px}.performance-calendar-summary strong{display:block;margin-top:4px;font:700 18px 'SFMono-Regular',Consolas,monospace;font-variant-numeric:tabular-nums}.performance-calendar-summary strong.up{color:var(--green)}.performance-calendar-summary strong.down{color:var(--red)}
.performance-calendar-body{padding:14px}.performance-calendar{overflow-x:auto;scrollbar-color:var(--panel3) transparent}.performance-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(82px,1fr)) minmax(88px,.9fr);gap:6px;min-width:760px}.performance-calendar-weekdays{display:contents}.performance-calendar-weekdays span{padding:0 6px 3px;color:#8ea2c7;font-size:10px;text-align:left;text-transform:none}
.performance-calendar-day{min-height:78px;border:1px solid var(--border);border-radius:7px;padding:7px 8px;background:var(--panel2);transition:border-color .16s ease,filter .16s ease}.performance-calendar-day:hover{border-color:#66748b;transform:none;filter:brightness(1.08)}.performance-calendar-day time{color:#9aabc5;font-size:10px}.performance-calendar-day strong{margin-top:10px;color:var(--text);font:700 13px 'SFMono-Regular',Consolas,monospace}.performance-calendar-day>span{margin-top:7px;color:#9aabc5;font-size:9px}.performance-calendar-day.profit.soft{background:rgba(14,203,129,.12)}.performance-calendar-day.profit.medium{background:rgba(14,203,129,.22)}.performance-calendar-day.profit.strong{background:rgba(14,203,129,.34)}.performance-calendar-day.loss.soft{background:rgba(246,70,93,.12)}.performance-calendar-day.loss.medium{background:rgba(246,70,93,.22)}.performance-calendar-day.loss.strong{background:rgba(246,70,93,.36)}.performance-calendar-day.flat{background:var(--panel2)}.performance-calendar-day.unavailable{cursor:default;border-style:dashed;background:transparent;opacity:.52}.performance-calendar-day.unavailable:hover{border-color:var(--border);filter:none}.performance-calendar-day.outside{visibility:hidden}.performance-calendar-day.selected{border-color:var(--yellow);box-shadow:inset 0 0 0 1px var(--yellow)}
.performance-calendar-week{min-height:78px;border:1px solid var(--border);border-left:2px solid var(--yellow);border-radius:7px;padding:7px 9px;background:rgba(12,18,28,.72)}.performance-calendar-week>span{display:block;color:var(--yellow);font-size:10px}.performance-calendar-week>strong{display:block;margin-top:10px;font:700 13px 'SFMono-Regular',Consolas,monospace;font-variant-numeric:tabular-nums}.performance-calendar-week>small{display:block;margin-top:7px;color:#9aabc5;font-size:9px}.performance-calendar-week.profit>strong{color:var(--green)}.performance-calendar-week.loss>strong{color:var(--red)}.performance-calendar-week.flat>strong{color:var(--muted)}
.performance-calendar-card .performance-calendar-legend{display:flex;align-items:center;gap:6px;margin-top:12px;color:#8ea2c7;font-size:10px}.performance-calendar-card .performance-calendar-legend i{display:block;width:13px;height:13px;border:1px solid var(--border);border-radius:3px}.performance-calendar-card .performance-calendar-legend .loss.strong{background:rgba(246,70,93,.72)}.performance-calendar-card .performance-calendar-legend .loss{background:rgba(246,70,93,.32)}.performance-calendar-card .performance-calendar-legend .flat{background:var(--panel2)}.performance-calendar-card .performance-calendar-legend .profit{background:rgba(14,203,129,.32)}.performance-calendar-card .performance-calendar-legend .profit.strong{background:rgba(14,203,129,.72)}
.performance-calendar-card .performance-day-detail{min-height:0;margin-top:16px;border-left:0;border-top:1px solid var(--border);padding:16px 0 0}.performance-calendar-card .performance-day-detail[hidden]{display:none}.performance-calendar-card .performance-day-summary{grid-template-columns:repeat(6,minmax(0,1fr))}.performance-calendar-card .performance-day-summary>div{border-top:0}.performance-calendar-card .performance-day-summary>div+div{border-left:1px solid var(--border)}
@media(max-width:760px){.performance-calendar-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0}.performance-calendar-summary>div{min-width:0;padding:12px 14px}.performance-calendar-summary>div:nth-child(even){border-left:1px solid var(--border)}.performance-calendar-summary>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-calendar-card .performance-calendar-head{align-items:center;flex-direction:row}.performance-calendar-card .performance-month-nav{width:auto}.performance-calendar-body{padding:12px}.performance-calendar-card .performance-day-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-calendar-card .performance-day-summary>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-calendar-card .performance-day-summary>div:nth-child(odd){border-left:0}}

.performance-kpi-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px;overflow:hidden;background:var(--panel2)}
.performance-kpi-rail>div{position:relative;min-width:0;padding:15px 18px}
.performance-kpi-rail>div+div::before{content:"";position:absolute;top:15px;bottom:15px;left:0;width:1px;background:var(--border)}
.performance-kpi-rail span,.performance-kpi-rail small{display:block;color:var(--muted);line-height:1.4}
.performance-kpi-rail span{font-size:14px;font-weight:600}
.performance-kpi-rail strong{display:block;margin:6px 0 3px;color:var(--text);font:700 20px/1.2 'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-variant-numeric:tabular-nums;white-space:nowrap}
.performance-kpi-rail small{font-size:13px;font-weight:400;overflow-wrap:anywhere}
.performance-kpi-rail strong.up{color:var(--green)}.performance-kpi-rail strong.down{color:var(--red)}
.performance-calendar-summary small{display:block;margin-top:4px;color:#8ea2c7;font-size:9px}.performance-calendar-body{padding:12px}.performance-calendar-main{min-width:0}.performance-calendar-grid{gap:5px}.performance-calendar-day,.performance-calendar-week{min-height:71px}.performance-calendar-day strong,.performance-calendar-week>strong{margin-top:8px}.performance-calendar-day>span,.performance-calendar-week>small{margin-top:5px}
.performance-calendar-body.detail-open{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.72fr);gap:16px;align-items:start}.performance-calendar-body.detail-open .performance-day-detail{margin-top:0;border-top:0;border-left:1px solid var(--border);padding:0 0 0 16px}.performance-calendar-body.detail-open .performance-day-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-calendar-body.detail-open .performance-day-summary>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-calendar-body.detail-open .performance-day-summary>div:nth-child(odd){border-left:0}
@media(max-width:1180px){.performance-kpi-rail{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-kpi-rail>div:nth-child(3)::before{display:none}.performance-kpi-rail>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-calendar-body.detail-open{grid-template-columns:1fr}.performance-calendar-body.detail-open .performance-day-detail{border-left:0;border-top:1px solid var(--border);padding:16px 0 0}}
@media(max-width:560px){.performance-kpi-rail{grid-template-columns:1fr}.performance-kpi-rail>div+div::before{display:none}.performance-kpi-rail>div:nth-child(n+2){border-top:1px solid var(--border)}}

/* Keep Performance typography and secondary colors on the shared app tokens. */
.performance-calendar-weekdays span,.performance-calendar-day time,.performance-calendar-day>span,.performance-calendar-week>small,.performance-calendar-card .performance-calendar-legend,.performance-calendar-summary small{color:var(--muted)}
.performance-calendar-day{color:var(--text);font-family:inherit}.performance-calendar-day:hover{border-color:var(--muted)}
.performance-calendar-day strong,.performance-calendar-week>strong{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}
.performance-calendar-week{border-left-width:1px;background:var(--panel2)}
.performance-day-detail[aria-busy="true"] .performance-day-empty i{color:var(--yellow)}

/* Calendar is the primary performance workspace. */
.performance-calendar-card .performance-calendar-head{min-height:74px;padding:13px 18px;background:var(--panel)}
.performance-calendar-title{display:flex;align-items:center;gap:12px;min-width:0}
.performance-calendar-title>i{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border:1px solid var(--border);border-radius:9px;background:var(--panel2);color:var(--blue);font-size:15px}
.performance-calendar-card .performance-calendar-head h4{font-size:16px;font-weight:650;letter-spacing:-.01em}
.performance-calendar-title p{margin-top:3px;color:var(--muted);font-size:12px;line-height:1.4}
.performance-calendar-card .performance-month-nav{grid-template-columns:36px minmax(142px,auto) 36px;gap:8px}
.performance-calendar-card .performance-month-nav strong{font-size:14px;font-weight:650;white-space:nowrap}
.performance-month-button{display:grid;place-items:center;width:36px;height:36px;min-width:36px;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--panel2);color:var(--muted);font-family:inherit;line-height:1;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
.performance-month-button i{display:block;font-size:12px;line-height:1}
.performance-month-button:hover:not(:disabled){border-color:#33405a;background:var(--panel3);color:var(--text)}
.performance-month-button:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}
.performance-month-button:disabled{opacity:.35;cursor:not-allowed}
.performance-calendar-summary{padding:0 18px;background:rgba(24,29,41,.34)}
.performance-calendar-summary>div{flex:1;min-width:0;padding:16px 18px}
.performance-calendar-summary>div+div{border-left:1px solid var(--border)}
.performance-calendar-summary span{font-size:12px;font-weight:500}
.performance-calendar-summary strong{margin-top:5px;font-size:19px}
.performance-calendar-summary small{margin-top:5px;font-size:12px;line-height:1.35}
.performance-calendar-period-row{display:flex;align-items:flex-end;gap:12px;min-width:0;padding:10px 18px;border-bottom:1px solid var(--border);background:var(--panel);flex-wrap:wrap}
.performance-calendar-period-row .dashboard-performance-tabs{flex:0 0 auto}
.performance-calendar-period-row .performance-filters{margin-left:auto}
.performance-calendar-period-row .performance-custom-dates{flex-basis:100%;justify-content:flex-end;margin-left:0}
.performance-calendar-period-row label{display:grid;gap:5px;color:var(--muted);font-size:11px;font-weight:650;letter-spacing:.03em;text-transform:uppercase}
.performance-calendar-period-row select,.performance-calendar-period-row input{height:34px;min-width:132px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);color:var(--text);padding:0 10px;font:inherit;font-size:12px}
.performance-calendar-period-row select:focus-visible,.performance-calendar-period-row input:focus-visible{outline:2px solid var(--yellow);outline-offset:1px}
.performance-calendar-weekdays span{padding:0 7px 5px;font-size:12px;font-weight:600}
.performance-calendar-day,.performance-calendar-week{min-height:78px;padding:8px 9px}
.performance-calendar-day time{font-size:12px;font-weight:500}
.performance-calendar-day strong,.performance-calendar-week>strong{margin-top:8px;font-size:14px}
.performance-calendar-day>span,.performance-calendar-week>small{margin-top:6px;font-size:12px;line-height:1.35}
.performance-calendar-day>span b{display:block;margin-top:2px;font-size:11px;font-weight:700}
.performance-calendar-account-return{cursor:help;text-decoration:underline dotted;text-decoration-thickness:1px;text-underline-offset:3px}
.performance-calendar-week>span{font-size:12px;font-weight:650}
.performance-calendar-card .performance-calendar-legend{font-size:12px}
.performance-day-detail-head h5{font-size:15px}
.performance-day-detail-head p{font-size:12px}
.performance-day-summary span{font-size:12px}
.performance-day-summary strong{font-size:13px}
.performance-day-section-title,.performance-position-row-head{font-size:13px}
.performance-position-row-meta,.performance-position-row-prices{font-size:12px}
.performance-day-empty strong{font-size:14px}.performance-day-empty span{font-size:12px}

@media(max-width:1100px){
  .performance-calendar-period-row{align-items:stretch;flex-direction:column}
  .performance-calendar-period-row .dashboard-performance-tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}
  .performance-calendar-period-row .dashboard-performance-tabs::-webkit-scrollbar{display:none}
  .performance-calendar-period-row .performance-filters{width:100%;margin-left:0}
  .performance-calendar-period-row .performance-filters label{flex:1}
  .performance-calendar-period-row .performance-custom-dates{width:100%;margin-left:0}
  .performance-calendar-period-row .performance-custom-dates label{flex:1}
  .performance-calendar-period-row select,.performance-calendar-period-row input{width:100%;min-width:0}
}
@media(max-width:620px){
  .performance-calendar-card .performance-calendar-head{align-items:flex-start;flex-direction:column;gap:12px;padding:14px}
  .performance-calendar-card .performance-month-nav{width:100%;grid-template-columns:40px minmax(0,1fr) 40px}
  .performance-month-button{width:40px;height:40px}
  .performance-calendar-period-row{padding:10px 14px}
  .performance-calendar-period-row .dashboard-performance-tabs{width:100%}
  .performance-calendar-summary{padding:0}
  .performance-calendar-summary>div{padding:13px 14px}
  .performance-calendar-day strong{font-size:12px}
}

.performance-targets-card{margin-bottom:14px;overflow:hidden}
.performance-targets-head{align-items:center;gap:20px}.performance-targets-coverage{margin-left:auto;color:var(--muted);font-size:11px;text-align:right}
.performance-targets-coverage,.performance-excursion-coverage{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.performance-sample-label{display:inline-flex;align-items:center;gap:6px;color:var(--yellow);font-size:11px}.performance-sample-button{display:inline-flex;align-items:center;gap:7px;margin-top:12px}.performance-targets-empty>div{max-width:48ch}
.performance-targets-insight{display:flex;align-items:flex-start;gap:11px;padding:13px 18px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:rgba(59,130,246,.055)}
.performance-targets-insight i{margin-top:2px;color:var(--blue)}.performance-targets-insight strong,.performance-targets-insight span{display:block}.performance-targets-insight strong{font-size:12px}.performance-targets-insight span{margin-top:3px;color:var(--muted);font-size:11px;line-height:1.45}.performance-targets-insight.caution{background:rgba(240,185,11,.055)}.performance-targets-insight.caution i{color:var(--yellow)}
.performance-target-ladder{display:grid;grid-template-columns:minmax(210px,.58fr) minmax(0,1.42fr);gap:28px;align-items:end;padding:18px 0 20px;border-bottom:1px solid var(--border)}
.performance-target-ladder-copy{align-self:center}.performance-target-ladder-copy strong,.performance-target-ladder-copy span,.performance-target-ladder-copy small{display:block}.performance-target-ladder-copy strong{font-size:14px}.performance-target-ladder-copy span{margin-top:5px;color:var(--text);font-size:12px}.performance-target-ladder-copy small{max-width:42ch;margin-top:8px;color:var(--muted);font-size:11px;line-height:1.45}
.performance-target-ladder-chart{display:grid;grid-template-columns:repeat(var(--target-count,5),minmax(74px,1fr));gap:10px;align-items:end;min-width:0}.performance-target-stage{display:grid;grid-template-columns:1fr auto;align-items:baseline;column-gap:6px;min-width:0}.performance-target-stage-bar{grid-column:1/-1;display:flex;align-items:flex-end;height:86px;margin-bottom:8px;border:1px solid var(--border);border-radius:5px 5px 2px 2px;background:var(--panel2);overflow:hidden}.performance-target-stage-bar i{display:block;width:100%;min-height:2px;background:var(--blue)}.performance-target-stage>strong{font-size:12px}.performance-target-stage>b{font:700 12px 'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-variant-numeric:tabular-nums}.performance-target-stage>span{grid-column:1/-1;margin-top:3px;color:var(--muted);font-size:10px}.performance-target-stage>em{grid-column:1/-1;margin-top:6px;font-size:10px;font-style:normal;font-weight:650;line-height:1.3}.performance-target-stage>em.positive{color:var(--green)}.performance-target-stage>em.watch,.performance-target-stage>em.waiting{color:var(--yellow)}.performance-target-stage>em.review{color:var(--red)}
.performance-targets-table{padding:0 18px}.performance-targets-columns,.performance-target-row{display:grid;grid-template-columns:82px minmax(230px,1.65fr) minmax(92px,.62fr) minmax(100px,.7fr) minmax(130px,.82fr) minmax(88px,.58fr);gap:16px;align-items:center}.performance-targets-columns{padding:10px 0 8px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.045em}.performance-target-row{min-height:74px;border-top:1px solid var(--border)}
.performance-target-name strong,.performance-target-stat strong,.performance-target-reach strong{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-variant-numeric:tabular-nums}.performance-target-name strong{display:block;font-size:14px}.performance-target-confidence{display:block;margin-top:4px;color:var(--muted);font-size:11px}.performance-target-confidence.low{color:var(--yellow)}
.performance-target-reach>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.performance-target-reach strong{font-size:13px}.performance-target-reach span,.performance-target-stat span{color:var(--muted);font-size:11px}.performance-target-track{position:relative;height:7px;margin-top:7px;border-radius:2px;background:var(--panel3);overflow:hidden}.performance-target-track i{display:block;height:100%;border-radius:inherit;background:var(--blue)}.performance-target-track b{position:absolute;inset:0 auto 0 0;border-right:1px dashed #8ea2c7;pointer-events:none}
.performance-target-stat strong,.performance-target-stat span{display:block}.performance-target-stat strong{font-size:12px}.performance-target-stat span{margin-top:4px}.performance-targets-note{display:flex;align-items:flex-start;gap:8px;padding:10px 18px;border-top:1px solid var(--border);color:var(--muted);font-size:11px;line-height:1.45}.performance-targets-note i{margin-top:2px;color:#8ea2c7}.performance-targets-empty{min-height:118px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted);text-align:left}.performance-targets-empty i{font-size:18px}.performance-targets-empty strong,.performance-targets-empty span{display:block}.performance-targets-empty strong{color:var(--text);font-size:12px}.performance-targets-empty span{margin-top:4px;font-size:11px}
@media(max-width:1080px){.performance-target-ladder{grid-template-columns:1fr}.performance-targets-columns{display:none}.performance-target-row{grid-template-columns:78px minmax(220px,1fr) repeat(4,minmax(94px,.55fr));gap:12px}.performance-targets-table{overflow-x:auto}.performance-target-row{min-width:860px}}
@media(max-width:560px){.performance-targets-head{align-items:flex-start;flex-direction:column}.performance-targets-coverage{margin-left:0;justify-content:flex-start;text-align:left}.performance-targets-table{padding:0 12px}.performance-target-ladder-chart{min-width:max(100%,calc(var(--target-count,5)*78px))}.performance-target-stage-bar{height:72px}.performance-target-row{grid-template-columns:72px minmax(190px,1fr) repeat(4,minmax(88px,.5fr));min-width:800px}.performance-targets-insight,.performance-targets-note{padding-left:14px;padding-right:14px}}

.performance-excursion-card{margin-bottom:14px;overflow:hidden}.performance-excursion-head{align-items:center;gap:20px}.performance-excursion-coverage{margin-left:auto;color:var(--muted);font-size:11px;text-align:right}.performance-excursion-body{display:grid;grid-template-columns:minmax(440px,.95fr) minmax(0,1.55fr);border-top:1px solid var(--border)}
.performance-excursion-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-right:1px solid var(--border)}.performance-excursion-stats>div{min-height:102px;padding:17px 18px}.performance-excursion-stats>div:nth-child(even){border-left:1px solid var(--border)}.performance-excursion-stats>div:nth-child(n+3){border-top:1px solid var(--border)}.performance-excursion-stats span,.performance-excursion-stats small{display:block;color:var(--muted)}.performance-excursion-stats span{font-size:11px}.performance-excursion-stats strong{display:block;margin:7px 0 4px;font:700 19px 'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-variant-numeric:tabular-nums}.performance-excursion-stats strong.down{color:var(--red)}.performance-excursion-stats small{font-size:11px;line-height:1.4}
.performance-excursion-stats>.performance-excursion-verdict{grid-column:1/-1;display:flex;align-items:flex-start;gap:10px;min-height:0;background:rgba(59,130,246,.05)}.performance-excursion-verdict i{margin-top:2px;color:var(--blue)}.performance-excursion-verdict p{margin:0}.performance-excursion-verdict p strong,.performance-excursion-verdict p span{display:block}.performance-excursion-verdict p strong{font:650 12px/1.35 inherit}.performance-excursion-verdict p span{margin-top:4px;font-size:11px;line-height:1.5}
.performance-excursion-plot{min-width:0;padding:14px 18px 10px}.performance-excursion-plot-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:5px}.performance-excursion-plot-head strong,.performance-excursion-plot-head span{display:block}.performance-excursion-plot-head strong{font-size:12px}.performance-excursion-plot-head>div>span{margin-top:3px;color:var(--muted);font-size:11px}.performance-excursion-legend{display:flex;gap:13px;color:var(--muted);font-size:10px}.performance-excursion-legend span{display:flex;align-items:center;gap:5px}.performance-excursion-legend i{width:7px;height:7px;border-radius:50%;background:var(--muted)}.performance-excursion-legend i.win{background:var(--green)}.performance-excursion-legend i.loss{background:var(--red)}
.performance-excursion-plot svg{display:block;width:100%;height:210px;overflow:visible}.performance-excursion-plot svg .grid line{stroke:var(--border);stroke-width:1}.performance-excursion-plot svg .axis{stroke:#596579;stroke-width:1}.performance-excursion-plot svg text{fill:var(--muted);font:10px 'SFMono-Regular',Consolas,'Liberation Mono',monospace}.performance-excursion-plot .dots circle{stroke:var(--panel);stroke-width:1.5;opacity:.9}.performance-excursion-plot .dots .win{fill:var(--green)}.performance-excursion-plot .dots .loss{fill:var(--red)}.performance-excursion-plot .dots .flat{fill:var(--muted)}
.performance-excursion-axis-guide{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:7px 0 2px;color:var(--muted);font-size:10px}.performance-excursion-axis-guide span{display:flex;align-items:center;gap:5px}.performance-excursion-axis-guide span:last-child{margin-left:auto}.performance-excursion-axis-guide i{color:#8ea2c7}
@media(max-width:1040px){.performance-excursion-body{grid-template-columns:1fr}.performance-excursion-stats{border-right:0;border-bottom:1px solid var(--border)}}
@media(max-width:560px){.performance-excursion-head{align-items:flex-start;flex-direction:column}.performance-excursion-coverage{margin-left:0;justify-content:flex-start;text-align:left}.performance-excursion-stats{grid-template-columns:1fr}.performance-excursion-stats>div{min-height:0}.performance-excursion-stats>div:nth-child(even){border-left:0}.performance-excursion-stats>div+div{border-top:1px solid var(--border)}.performance-excursion-plot{overflow-x:auto}.performance-excursion-plot svg,.performance-excursion-plot-head,.performance-excursion-axis-guide{min-width:620px}}
/* Performance v2: answer first, then evidence and strategy diagnostics. */
.performance-v2-scope{margin:-2px 2px 14px;color:var(--muted);font-size:11px}
.performance-v2-notice{display:none;margin:-2px 0 14px;padding:10px 13px;border:1px solid rgba(240,185,11,.35);border-radius:8px;background:rgba(240,185,11,.08);color:#f5d47c;font-size:11px}
.performance-v2-notice.show{display:block}
.performance-v2-overview{display:grid;grid-template-columns:minmax(285px,.78fr) minmax(0,1.5fr);margin-bottom:14px;overflow:hidden}
.performance-v2-answer{min-width:0;padding:24px;border-right:1px solid var(--border)}
.performance-v2-answer h4,.performance-v2-section-head h4{font-size:14px}
.performance-v2-answer>p{margin:15px 0 2px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.performance-v2-answer>span{display:block;color:var(--muted);font-size:11px}
.performance-v2-hero{display:block;margin:2px 0;font:700 30px/1.35 'SFMono-Regular',Consolas,'Liberation Mono',monospace;font-variant-numeric:tabular-nums}
.performance-v2-outcome{margin:15px 0 17px;color:var(--muted);font-size:11px}
.performance-v2-outcome-bar,.performance-v2-ratio{display:flex;height:9px;margin-bottom:7px;overflow:hidden;border-radius:3px;background:var(--panel2)}
.performance-v2-outcome-bar i,.performance-v2-ratio i{display:block}.performance-v2-outcome-bar .win{background:var(--green)}.performance-v2-outcome-bar .loss{background:var(--red)}.performance-v2-outcome-bar .flat{background:var(--muted)}
.performance-v2-mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding-top:15px;border-top:1px solid var(--border)}
.performance-v2-mini-stats strong,.performance-v2-mini-stats span{display:block;min-width:0}.performance-v2-mini-stats strong{font:700 16px/1.25 'SFMono-Regular',Consolas,monospace;white-space:nowrap}.performance-v2-mini-stats span{margin-top:3px;color:var(--muted);font-size:10px}
.performance-v2-trend{min-width:0;padding:20px 22px}.performance-v2-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid var(--border)}.performance-v2-section-head.compact{padding:0 0 13px;border:0}.performance-v2-section-head p{margin:4px 0 0;color:var(--muted);font-size:11px}.performance-v2-section-head>span{color:var(--muted);font-size:11px;text-align:right;white-space:nowrap}
.performance-v2-chart-tabs button{min-height:30px;padding:5px 10px}.performance-v2-chart-tabs button[aria-pressed="true"]{background:var(--panel2);color:var(--yellow)}
.performance-v2-chart{min-height:224px}.performance-v2-chart svg{display:block;width:100%;height:224px;overflow:visible}.performance-v2-chart text{fill:var(--muted);font:10px 'SFMono-Regular',Consolas,monospace}.performance-v2-chart-grid line{stroke:var(--border);stroke-width:1}.performance-v2-zero{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 5}
.performance-v2-disclosure{margin-top:10px}.performance-v2-disclosure summary,.performance-v2-section-details summary,.performance-v2-methodology>summary{color:var(--muted);font-size:11px;cursor:pointer}.performance-v2-disclosure summary:focus-visible,.performance-v2-section-details summary:focus-visible,.performance-v2-methodology>summary:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}
.performance-v2-targets{margin-bottom:14px;overflow:hidden}.performance-v2-target-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:28px;padding:20px}.performance-v2-target-key,.performance-v2-target-row{display:grid;grid-template-columns:94px minmax(130px,1fr) 112px;gap:14px;align-items:center}.performance-v2-target-key{padding:0 0 10px;color:var(--muted);font-size:10px}.performance-v2-target-key span:last-child{text-align:right}.performance-v2-target-row{width:100%;min-height:62px;padding:12px 0;border:0;border-top:1px solid var(--border);border-radius:0;background:transparent;color:var(--text);text-align:left}.performance-v2-target-row:hover{background:var(--panel2)}.performance-v2-target-row:focus-visible{position:relative;z-index:1;outline:2px solid var(--yellow);outline-offset:-2px}.performance-v2-target-row[aria-pressed="true"] .performance-v2-target-name strong{color:var(--yellow)}.performance-v2-target-name strong,.performance-v2-target-name small,.performance-v2-target-value small{display:block}.performance-v2-target-name small,.performance-v2-target-value small{margin-top:3px;color:var(--muted);font-size:10px}.performance-v2-bar-caption{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.performance-v2-bar-caption small{color:var(--muted);font-size:10px}.performance-v2-target-track{display:block;height:11px;margin-top:6px;border-radius:2px;background:#263147;overflow:hidden}.performance-v2-target-track i{display:block;height:100%;border-radius:2px;background:var(--blue)}.performance-v2-target-value{text-align:right;font:700 13px 'SFMono-Regular',Consolas,monospace}.performance-v2-target-insight{min-width:0;padding-left:25px;border-left:1px solid var(--border)}.performance-v2-target-insight h5{margin:0 0 7px;font-size:17px}.performance-v2-target-insight p{max-width:62ch;margin:6px 0 13px;color:var(--muted);font-size:11px;overflow-wrap:anywhere}.performance-v2-insight-value{display:block;margin-top:16px;font:700 25px 'SFMono-Regular',Consolas,monospace}.performance-v2-target-insight dl{display:grid;grid-template-columns:1fr auto;gap:9px;margin:14px 0;font-size:11px}.performance-v2-target-insight dt{color:var(--muted)}.performance-v2-target-insight dd{margin:0;font-weight:700;text-align:right}.performance-v2-takeaway{margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}.performance-v2-footnote{margin:14px 0 0;color:var(--muted);font-size:10px}.performance-v2-section-details{padding:14px 20px;border-top:1px solid var(--border)}.performance-v2-section-details p{max-width:85ch;color:var(--muted);font-size:10px}
.performance-v2-analysis-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}.performance-v2-analysis-grid>.card{margin:0;overflow:hidden}.performance-v2-section-body{min-width:0;padding:20px}.performance-v2-ratio-labels{display:flex;justify-content:space-between;color:var(--text);font-size:13px}.performance-v2-ratio{margin:10px 0 8px}.performance-v2-ratio .long{background:var(--green)}.performance-v2-ratio .short{background:var(--red)}.performance-v2-ratio-note{margin:0 0 24px;color:var(--muted);font-size:12px}.performance-v2-comparison{display:grid;grid-template-columns:1fr 1fr;gap:24px}.performance-v2-comparison>div+div{padding-left:24px;border-left:1px solid var(--border)}.performance-v2-comparison h5{margin:0;color:var(--text);font-size:14px}.performance-v2-comparison>div>strong{display:block;margin:7px 0 1px;font:700 24px 'SFMono-Regular',Consolas,monospace}.performance-v2-comparison>div>small{display:block;color:var(--muted);font-size:12px}.performance-v2-comparison p{margin:10px 0 0;color:var(--text);font-size:13px;line-height:1.55}.performance-v2-direction-takeaway{margin-top:24px;padding-top:20px;border-top:1px solid var(--border)}.performance-v2-direction-takeaway h5{margin:0 0 8px;font-size:14px}.performance-v2-direction-takeaway p{margin:6px 0;color:var(--text);font-size:13px;line-height:1.5}.performance-v2-direction-takeaway b{font-weight:700}
.performance-v2-insights-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}.performance-v2-insights-grid>.card{display:flex;min-width:0;margin:0;overflow:hidden;flex-direction:column}.performance-v2-insights-grid .card-h{min-height:67px}.performance-v2-insights-grid .card-h>span{color:var(--muted);font-size:12px;text-align:right}.performance-v2-insights-grid .performance-v2-section-body{flex:1}.performance-v2-direction{overflow:hidden}
.performance-v2-capture{overflow:hidden}.performance-v2-capture-layout{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(0,1.2fr);gap:28px}.performance-v2-capture-layout>div>strong{font:700 24px 'SFMono-Regular',Consolas,monospace}.performance-v2-capture-layout h5{font-size:13px}.performance-v2-capture-layout p{max-width:65ch;color:var(--muted);font-size:12px;line-height:1.5}.performance-v2-path-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:15px 0}.performance-v2-path-values strong,.performance-v2-path-values span{display:block}.performance-v2-path-values strong{font:700 18px 'SFMono-Regular',Consolas,monospace}.performance-v2-path-values span{margin-top:4px;color:var(--muted);font-size:12px}
.performance-v2-empty{display:grid;place-content:center;min-height:150px;padding:24px;text-align:center;color:var(--muted)}.performance-v2-empty strong{margin-bottom:7px;color:var(--text);font-size:14px}.performance-v2-empty span{font-size:12px;line-height:1.5}.performance-v2-methodology{margin-bottom:14px;overflow:hidden}.performance-v2-methodology>summary{padding:16px 20px}.performance-v2-methodology dl{max-width:90ch}.performance-v2-methodology dt{margin-top:13px;color:var(--text);font-size:11px;font-weight:700}.performance-v2-methodology dd{margin:3px 0 0;color:var(--muted);font-size:11px}.performance-v2-breakdown-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:22px;padding-top:18px;border-top:1px solid var(--border)}.performance-v2-breakdown-head h5{margin:0}
@media(max-width:1180px){.performance-v2-overview{grid-template-columns:minmax(260px,1fr) minmax(0,1.25fr)}.performance-v2-target-layout{grid-template-columns:minmax(0,1.55fr) minmax(225px,1fr);gap:20px}.performance-v2-target-key,.performance-v2-target-row{grid-template-columns:82px minmax(110px,1fr) 96px;gap:10px}}
@media(max-width:1180px){.performance-v2-insights-grid{grid-template-columns:1fr}.performance-v2-capture-layout{grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr)}}
@media(max-width:900px){.performance-v2-overview{grid-template-columns:1fr}.performance-v2-answer{border-right:0;border-bottom:1px solid var(--border)}.performance-v2-target-layout{grid-template-columns:1fr}.performance-v2-target-insight{padding:20px 0 0;border-left:0;border-top:1px solid var(--border)}.performance-v2-analysis-grid{grid-template-columns:1fr}}
@media(max-width:620px){.performance-v2-answer{padding:19px}.performance-v2-trend{padding:18px 14px}.performance-v2-section-head{align-items:flex-start;flex-wrap:wrap;padding:16px}.performance-v2-section-head.compact{padding:0 0 12px}.performance-v2-chart-tabs{width:100%;overflow-x:auto}.performance-v2-chart{overflow-x:auto}.performance-v2-chart svg{min-width:560px}.performance-v2-mini-stats{grid-template-columns:1fr 1fr}.performance-v2-mini-stats>div:last-child{grid-column:1/-1}.performance-v2-target-layout{padding:16px}.performance-v2-target-key,.performance-v2-target-row{grid-template-columns:66px minmax(92px,1fr) 84px;gap:8px}.performance-v2-bar-caption{align-items:flex-start;flex-direction:column;gap:0}.performance-v2-target-value{font-size:11px}.performance-v2-comparison{gap:14px}.performance-v2-comparison>div+div{padding-left:14px}.performance-v2-capture-layout{grid-template-columns:1fr;gap:20px}.performance-v2-path-values{grid-template-columns:1fr}.performance-v2-breakdown-head{align-items:flex-start;flex-direction:column}}
