/* Tabasco UI v5.1 — dark, dense terminal layer.
   Loaded last; overrides legacy style.css/themes.css visuals only.
   Fonts self-hosted (CSP font-src 'self'): Inter + JetBrains Mono, SIL OFL 1.1. */

@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/fonts/inter-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:100 800;font-display:swap;src:url(/assets/fonts/jbmono-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:100 800;font-display:swap;src:url(/assets/fonts/jbmono-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* ---------- Tokens ---------- */
html:root{
 --ui-font-family:'Inter';
 --font-ui:var(--ui-font-family,'Inter'),'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
 --font-num:'JetBrains Mono',ui-monospace,'SF Mono',Consolas,monospace;
 --ui-bg:var(--desk-bg,#07080a);--ui-panel:var(--desk-panel,#0c0e11);--ui-line:var(--desk-line,#1a1d22);--ui-text:var(--desk-text,#d9dee5);
 --ui-raise:color-mix(in srgb,var(--ui-panel) 96%,#fff 2.5%);
 --ui-hover:color-mix(in srgb,var(--ui-panel) 92%,#fff 6%);
 --ui-input:color-mix(in srgb,var(--ui-bg) 70%,#000 30%);
 --ui-line-strong:color-mix(in srgb,var(--ui-line) 70%,#fff 10%);
 --ui-muted:#858d98;--ui-faint:#5a626d;--ui-strong:#eef1f5;
 --ui-up:#2ebd85;--ui-down:#f6465d;--ui-focus:#7d8fa8;
 --ui-accent:var(--accent,#e8794f);--ui-mention:#e2a15f;
 --r-sm:4px;--r-md:6px;--r-lg:8px;
 --ease:cubic-bezier(.2,.8,.2,1);
 --green:var(--ui-up);--red:var(--ui-down);
 font-family:var(--font-ui);font-size:12px;
 -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;
 font-feature-settings:'cv11','ss01','calt';
}
html body{background:var(--ui-bg)!important;font-family:var(--font-ui)}
html body button,html body input,html body select,html body textarea{font-family:inherit}

/* Numbers never jitter */
#clock,#latency,#last-price,#change,#funding,#volume,#ohlc,.news-time,.news-age,.price-move,.market-row span:nth-child(n+2),.position-summary b,#account-updated,.quick-buttons button,#chart-presets button,table td,.badge,#news-count,.whale-size strong,.chart-position{font-variant-numeric:tabular-nums;font-feature-settings:'tnum','cv11'}

*{scrollbar-width:thin;scrollbar-color:#24282e transparent}
::-webkit-scrollbar{width:7px;height:7px}::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#24282e;border-radius:7px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#343a42;background-clip:padding-box;border:2px solid transparent}
html body :is(button,a,input,select,textarea):focus-visible{outline:1px solid var(--ui-focus);outline-offset:1px}

/* ---------- Top bar ---------- */
html body .topbar{height:44px!important;padding:0 12px!important;gap:18px;background:var(--ui-bg)!important;border-bottom:1px solid var(--ui-line)!important}
html body .topbar .brand{font-size:12px!important;font-weight:750;letter-spacing:.14em;gap:8px}
html body .topbar .brand>span:last-child{font-weight:500;color:var(--ui-muted)}
html body .brand-logo{width:24px;height:24px}
html body .topbar nav{gap:2px;align-items:center}
html body .topbar nav button{height:28px;padding:0 10px;border-radius:var(--r-md);font-size:11px!important;font-weight:600;letter-spacing:.06em;color:var(--ui-muted);border:0!important;background:transparent}
html body .topbar nav button:hover{background:var(--ui-hover);color:var(--ui-text)}
html body .topbar nav .nav-active{color:var(--ui-strong)!important;background:var(--ui-hover);box-shadow:none}
html body .topbar kbd{font:500 9px var(--font-num)!important;color:var(--ui-faint);margin-left:6px;border:0;padding:0}
html body .top-right{gap:6px!important}
html body #clock{font:500 12px var(--font-num);color:var(--ui-text)}
html body .topbar .status{font-size:10px!important;font-weight:600;letter-spacing:.06em;color:var(--ui-muted);display:flex;align-items:center;padding:0 6px;border:0}
html body .topbar .layout-actions{display:flex;gap:2px}
html body .topbar .layout-actions button,html body .topbar .icon{width:28px!important;height:28px!important;padding:0!important;display:inline-grid;place-items:center;border-radius:var(--r-md);background:transparent;border:0!important;color:var(--ui-muted);font-size:13px!important}
html body .topbar .layout-actions button:hover,html body .topbar .icon:hover{background:var(--ui-hover);color:var(--ui-text)}
html body #user-button{height:28px;padding:0 8px;border-radius:var(--r-md);background:transparent;border:1px solid var(--ui-line);font-size:11.5px!important;font-weight:600}
html body .top-shortcuts button{height:26px;padding:0 10px!important;border-radius:var(--r-md);font-size:11px!important;font-weight:650;background:transparent;border:1px solid var(--ui-line-strong)!important;color:var(--ui-text)}
html body .top-shortcuts button:hover{background:var(--ui-hover)}

/* ---------- Panels ---------- */
html body .terminal-grid{background:var(--ui-bg)!important}
@media(min-width:741px){html body #workspace .terminal-grid.grid-stack{height:calc(100dvh - 44px - 22px - 4px)!important;min-height:0!important;overflow-x:hidden;overflow-y:auto}}
html body #workspace .panel,html body #workspace .workspace-panel{background:var(--ui-panel)!important;border:1px solid var(--ui-line)!important;border-radius:var(--r-lg)!important}
html body .panel-head{height:34px!important;padding:0 10px!important;border-bottom:1px solid var(--ui-line)!important}
html body .panel-head h2{font-size:10.5px!important;font-weight:650;letter-spacing:.09em;color:var(--ui-muted)!important}
html body .panel-head button{font-size:12px!important;border-radius:var(--r-sm);color:var(--ui-muted);padding:3px 5px!important}
html body .panel-head button:hover{background:var(--ui-hover);color:var(--ui-text)}
html body .grip{display:none}
html body .badge{font:600 10px var(--font-num)!important;padding:2px 6px!important;border-radius:var(--r-sm)!important;border:1px solid var(--ui-line)!important;color:var(--ui-muted)!important;background:transparent}
html body .panel-foot{font-size:10px!important;color:var(--ui-faint)}

html body .search-row{margin:6px 8px!important;height:30px;border-radius:var(--r-md)!important;background:var(--ui-input)!important;border:1px solid var(--ui-line)!important;padding-left:9px!important}
html body .search-row:focus-within{border-color:var(--ui-line-strong)!important}
html body .search-row>span{font-size:13px!important}
html body .search-row input{font-size:12px!important;padding:5px 4px!important}
html body .search-row input::placeholder{color:var(--ui-faint)}
html body .search-row select{font-size:11.5px!important;font-weight:600;height:100%;padding:0 8px!important;background:transparent}

/* ---------- News feed (dense) ---------- */
html body .feed-scroll{padding:0 8px 8px!important}
html body #workspace .news-card,html body #workspace .news-card.is-latest{background:var(--ui-raise)!important;border:1px solid var(--ui-line)!important;border-left:2px solid var(--ui-line)!important;border-radius:var(--r-md)!important;padding:6px 10px 6px!important;margin-bottom:4px!important;box-shadow:none!important;transition:border-color .2s var(--ease);animation:none!important}
html body #workspace .news-card:hover{border-color:var(--ui-line-strong)!important}
html body #workspace .news-card.ui-new{animation:ui-arrive .36s var(--ease) both!important}
@keyframes ui-arrive{0%{opacity:0;transform:translateY(-6px)}100%{opacity:1;transform:none}}
html body #workspace .news-card.fresh-news{border-left-color:#c9d1db!important}
html body #workspace .news-card.favorite-source:not(.momentum-up):not(.momentum-down){border-left-color:#f1c84b!important}
html body #workspace .news-card.rising.momentum-up,html body #workspace .news-card.falling.momentum-down{border-left:2px solid rgb(var(--move-rgb))!important}
html body #workspace .news-card header{margin-bottom:3px!important;gap:8px;align-items:center;min-height:20px}
html body .news-identity{display:flex;align-items:center;gap:7px;min-width:0}
html body .news-led{width:6px!important;height:6px!important}
html body #workspace .news-source{font-size:12px!important;font-weight:650!important;color:var(--ui-strong)!important}
html body #workspace .news-handle{font-size:11px!important;color:var(--ui-faint)!important}
html body #workspace .news-time{font:500 11px var(--font-num)!important;color:var(--ui-faint)!important;display:inline-flex;align-items:center;gap:6px}
html body #workspace .news-age{color:var(--ui-muted);font-weight:600}
html body #workspace .source-category,html body #workspace .source-mark{font-size:9.5px!important;font-weight:650;letter-spacing:.03em;padding:1px 6px!important;border-radius:var(--r-sm)!important}
html body #workspace .source-icon svg,html body #workspace .source-icon img{width:16px;height:16px}
html body #workspace .news-avatar{width:20px!important;height:20px!important;border-radius:50%}
html body .news-card .source-favorite{font-size:13px;padding:0 3px;border-radius:var(--r-sm)}
html body .news-card .source-favorite:hover{background:var(--ui-hover)}
html body #workspace .news-title,html body #workspace .news-embedded .news-title{font-family:var(--font-ui)!important;font-size:calc(var(--news-font-size,14px) - 1px)!important;line-height:1.38!important;color:var(--ui-text)!important;font-weight:500!important;margin:0!important}
html body #workspace .news-card.has-headline>.news-content>.news-title{font-weight:600!important;color:var(--ui-strong)!important}
html body #workspace .news-body{font-family:var(--font-ui)!important;font-size:calc(var(--news-font-size,14px) - 2px)!important;line-height:1.48!important;color:#9aa3ae!important;margin:3px 0 0!important}
html body #workspace .news-card button.asset-mention{color:var(--ui-mention);font-weight:inherit;background:none;border:0;padding:0;text-decoration:none}
html body #workspace .news-card button.asset-mention:hover{text-decoration:underline}
html body #workspace .news-embedded{border:1px solid var(--ui-line)!important;border-radius:var(--r-md)!important;background:var(--ui-input)!important;padding:7px 10px!important;margin-top:6px}
html body .read-more{font-size:11px!important;font-weight:600;color:var(--ui-muted)!important}
html body .news-photo{border-radius:var(--r-md);overflow:hidden;border:1px solid var(--ui-line)}
html body .news-link{font-size:11px!important}

html body #workspace .news-trade-row{border-top:1px solid #ffffff08!important;padding-top:4px!important;margin-top:5px!important;gap:8px!important;align-items:center}
html body #workspace .news-trade-row+.news-trade-row{border-top:0!important;margin-top:2px!important;padding-top:0!important}
html body #workspace .news-asset{display:flex;align-items:center;gap:6px;min-width:0!important;flex:0 0 auto}
html body .coin-button{font-size:12px!important;font-weight:650!important;color:var(--ui-strong)!important;display:inline-flex!important;align-items:center;gap:6px;min-width:0!important;white-space:nowrap;padding:0!important}
html body .coin-button small{font-size:10px!important;color:var(--ui-faint)!important;font-weight:500}
html body .coin-logo{width:16px!important;height:16px!important;font-size:8px!important}
html body .price-move{font:600 10.5px var(--font-num)!important;padding:1px 6px!important;border-radius:var(--r-sm)!important;min-width:56px!important;text-align:center;background:transparent!important;border:1px solid var(--ui-line)!important;color:var(--ui-muted)}
html body .price-move.up{color:#4fd69c!important;border-color:#2ebd8538!important}html body .price-move.down{color:#ff6b7f!important;border-color:#f6465d38!important}
html body #workspace .news-trade-row .quick-buttons{gap:4px!important}
html body #workspace .news-trade-row .quick-buttons button,html body #chart-presets button{height:20px;min-height:20px!important;font:600 10.5px var(--font-num)!important;border-radius:var(--r-sm)!important;padding:0 4px!important;background:#2ebd850b!important;border:1px solid #2ebd8526!important;color:#43c690!important;transition:background-color .1s,border-color .1s}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL],html body #chart-presets button[data-trade=SELL]{background:#f6465d0b!important;border-color:#f6465d26!important;color:#f0687a!important}
html body #workspace .news-trade-row .quick-buttons button:not(:disabled):hover,html body #chart-presets button:not(:disabled):hover{background:#2ebd8530!important;border-color:#2ebd8599!important;color:#7be3b6!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body #chart-presets button[data-trade=SELL]:not(:disabled):hover{background:#f6465d30!important;border-color:#f6465d99!important;color:#ff96a3!important}
html body #workspace .quick-buttons button:not(:disabled):active,html body #chart-presets button:not(:disabled):active{transform:scale(.96)}
html body #workspace .quick-buttons button:disabled,html body #chart-presets button:disabled{opacity:.4}
html body .news-automate,html body .news-card header a{color:var(--ui-faint)!important;font-size:11px}

/* ---------- Chart panel ---------- */
html body :is(.chart-panel,.extra-chart) .market-header{min-height:42px!important;padding:5px 10px!important;gap:18px!important;align-items:center!important;border-bottom:1px solid var(--ui-line)}
html body :is(.chart-panel,.extra-chart) .market-header>div:first-child>button{font-size:13.5px!important;font-weight:700;background:transparent;border:0;padding:3px 4px;border-radius:var(--r-sm)}
html body :is(.chart-panel,.extra-chart) .market-header>div:first-child>button:hover{background:var(--ui-hover)}
html body :is(.chart-panel,.extra-chart) .market-header .badge{font-size:9px!important;font-family:var(--font-ui)!important;letter-spacing:.06em}
html body :is(.chart-panel,.extra-chart) .market-stat{flex-direction:column!important;align-items:flex-start!important;gap:1px!important}
html body :is(.chart-panel,.extra-chart) .market-stat small{font-size:9.5px!important;font-weight:600;letter-spacing:.07em;color:var(--ui-faint)}
html body :is(.chart-panel,.extra-chart) .market-stat b{font:600 12.5px var(--font-num)!important;color:var(--ui-text)}
html body :is(.chart-panel,.extra-chart) .market-stat b.positive{color:var(--ui-up)!important}
html body :is(.chart-panel,.extra-chart) .market-stat b.negative{color:var(--ui-down)!important}
html body .chart-tools{min-height:34px!important;height:auto!important;padding:4px 8px!important;gap:6px;border-bottom:1px solid var(--ui-line)!important;font-size:11.5px}
html body #intervals,html body .chart-tools .chart-intervals{display:inline-flex!important;gap:1px!important;padding:2px;background:var(--ui-input);border:1px solid var(--ui-line);border-radius:var(--r-md)}
html body :is(#intervals,.chart-intervals) button{height:22px;min-width:28px;padding:0 7px!important;font:600 10.5px var(--font-num)!important;border:0!important;border-radius:var(--r-sm)!important;background:transparent!important;color:var(--ui-muted)!important}
html body :is(#intervals,.chart-intervals) button:hover{color:var(--ui-text)!important;background:var(--ui-hover)!important}
html body :is(#intervals,.chart-intervals) button.active{background:var(--ui-hover)!important;color:var(--ui-strong)!important;box-shadow:none}
html body .chart-tools button:not(#intervals button):not(.chart-intervals button){height:24px;padding:0 8px;font-size:11.5px!important;border-radius:var(--r-sm);background:transparent;border:1px solid transparent;color:var(--ui-muted)}
html body .chart-tools button:not(#intervals button):not(.chart-intervals button):hover{background:var(--ui-hover);color:var(--ui-text)}
html body .chart-tools .check-inline,html body .chart-quick-toggle,html body .extra-ema-label{font-size:11.5px!important;color:var(--ui-muted)!important;gap:5px!important}
html body .chart-tools input[type=checkbox]{accent-color:#9aa4b1;width:13px;height:13px}
html body #chart-status,html body .chart-tools .extra-status{font-size:10.5px!important;font-weight:600;color:var(--ui-muted)}
html body .chart-tools .divider{height:16px;margin:0 2px}
html body #chart-presets,html body .chart-presets{gap:4px!important;padding:5px 8px!important;border-top:1px solid var(--ui-line)}
html body #chart-presets button{height:26px!important}
html body #chart-presets>span,html body .chart-presets>span{font-size:9.5px!important;font-weight:650;letter-spacing:.07em;color:var(--ui-faint)!important;line-height:1.25}
html body .chart-position{font-family:var(--font-ui)!important}

/* ---------- Command ---------- */
html body .command-top{font-size:10.5px!important;font-weight:650;letter-spacing:.08em;color:var(--ui-muted)}
html body #command-form{gap:8px}
html body #command-form label{color:var(--ui-accent);font-size:14px}
html body #command-input{font:500 12.5px var(--font-num)!important;background:var(--ui-input)!important;border:1px solid var(--ui-line)!important;border-radius:var(--r-md)!important;height:30px;padding:0 10px!important}
html body #command-input:focus{border-color:var(--ui-line-strong)!important}
html body #command-submit{height:28px;padding:0 12px;font-size:11px!important;font-weight:700;letter-spacing:.05em;border-radius:var(--r-md)!important;background:transparent!important;border:1px solid #2ebd8550!important;color:#4fd69c!important}
html body #command-preview{font-size:11.5px}

/* ---------- Positions ---------- */
html body .position-tabs{gap:2px}
html body .position-tabs button{height:26px;padding:0 9px!important;font-size:11px!important;font-weight:650;letter-spacing:.05em;border-radius:var(--r-sm)!important;border:0!important;background:transparent!important;color:var(--ui-muted)!important}
html body .position-tabs button:hover{color:var(--ui-text)!important;background:var(--ui-hover)!important}
html body .position-tabs button.active{color:var(--ui-strong)!important;background:var(--ui-hover)!important;box-shadow:none}
html body .position-tabs button span{font-family:var(--font-num);font-size:10px;color:var(--ui-faint);margin-left:3px}
html body #close-all{height:24px;padding:0 9px;font-size:11px!important;font-weight:600;border-radius:var(--r-sm);color:#f0687a;border:1px solid #f6465d33;background:transparent}
html body .position-summary{gap:12px!important;font-size:11px!important;color:var(--ui-muted)}
html body .position-summary b{font:600 11.5px var(--font-num)!important;color:var(--ui-text);margin-left:3px}
html body .position-summary b.positive{color:var(--ui-up)}html body .position-summary b.negative{color:var(--ui-down)}
html body #account-updated{font:500 10.5px var(--font-num)!important}
html body .positions-panel th{font-size:10px!important;font-weight:650;letter-spacing:.06em;color:var(--ui-faint);text-transform:uppercase}
html body .positions-panel td{font-family:var(--font-num);font-size:11.5px!important}
html body .empty{color:var(--ui-muted)}html body .empty b{font-size:12.5px;color:#b9c0c9}html body .empty p{font-size:11.5px}

/* ---------- Markets / status ---------- */
html body .market-table-head{font-size:9.5px!important;font-weight:650;letter-spacing:.07em;color:var(--ui-faint)}
html body .market-row{font-size:12px!important;border-radius:var(--r-sm);padding:6px 10px!important}
html body .market-row span:first-child{font-weight:650}
html body .market-row span:nth-child(n+2){font-family:var(--font-num);font-size:11.5px}
html body .market-row.active,html body .market-row:hover{background:var(--ui-hover)!important}
html body .statusbar{height:22px;font-size:10px!important;letter-spacing:.05em;color:var(--ui-faint);background:var(--ui-bg)!important;border-top:1px solid var(--ui-line)}
html body #latency{font-family:var(--font-num)}

/* ---------- Toasts / dialogs / views ---------- */
html body #toast-container>*{font-size:12px;border-radius:var(--r-md)!important;box-shadow:0 10px 30px #000a}
html body dialog{color:var(--ui-text)}
html body #confirm-dialog{border-radius:10px;border:1px solid var(--ui-line-strong);background:var(--ui-panel);box-shadow:0 30px 90px #000c;font-size:12.5px}
html body #confirm-dialog .confirm-actions button{height:32px;padding:0 16px;border-radius:var(--r-md);font-weight:650}
html body .calendar-heading h1,html body .desk-section-head h1{font-size:18px!important;font-weight:700;letter-spacing:-.01em}
html body .section-title{font-size:10.5px!important;font-weight:650;letter-spacing:.08em;color:var(--ui-muted)}
html body .macro-card{border-radius:var(--r-lg)!important;border:1px solid var(--ui-line)!important;background:var(--ui-panel)!important}
html body .journal-entry{border-radius:var(--r-lg)!important}
html body .journal-entry p{font-size:13px!important;line-height:1.5}

/* Icons */
html body .ui-ico{width:15px;height:15px;flex-shrink:0;display:block}

/* ================= SETTINGS ================= */
html body #settings-dialog{width:min(1080px,94vw)!important;max-width:none!important;height:min(820px,92dvh)!important;padding:0;border:1px solid var(--ui-line-strong)!important;border-radius:12px!important;background:var(--ui-panel)!important;box-shadow:0 40px 120px #000e!important;overflow:hidden;font-size:12.5px}
html body #settings-dialog[open]{animation:ui-dialog .18s var(--ease)}
@keyframes ui-dialog{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
html body #settings-dialog::backdrop{background:#000000c4!important;backdrop-filter:blur(4px)!important}
html body #settings-dialog .modal-head{height:48px;padding:0 14px 0 18px;border-bottom:1px solid var(--ui-line);background:var(--ui-panel)}
html body #settings-dialog .modal-head h2{font-size:13px!important;font-weight:700!important}
html body #settings-dialog .modal-head h2 span{font-size:12px!important;font-weight:500;color:var(--ui-faint)}
html body #settings-dialog .modal-head button{width:30px;height:30px;display:grid;place-items:center;border-radius:var(--r-md);font-size:18px;line-height:1}
html body #settings-dialog .modal-head button:hover{background:var(--ui-hover);color:var(--ui-text)}
html body .settings-body{grid-template-columns:210px minmax(0,1fr)!important;height:calc(100% - 48px - 54px)!important}
html body .settings-nav{padding:10px 8px!important;gap:1px!important;background:var(--ui-bg)!important;border-right:1px solid var(--ui-line)!important}
html body .settings-nav>small{font-size:9.5px!important;font-weight:700;letter-spacing:.1em;color:var(--ui-faint);padding:12px 8px 4px!important}
html body .settings-nav>small:first-child{padding-top:2px!important}
html body .settings-nav>button{min-height:30px!important;padding:0 8px!important;display:flex;align-items:center;gap:9px;border:0!important;border-radius:var(--r-md)!important;background:transparent!important;color:#9aa2ad!important;font-size:12.5px!important;font-weight:500;text-align:left}
html body .settings-nav>button:hover{background:var(--ui-hover)!important;color:var(--ui-text)!important}
html body .settings-nav>button.active{background:var(--ui-hover)!important;color:var(--ui-strong)!important;font-weight:600;box-shadow:none}
html body .settings-nav .ui-ico{opacity:.7}html body .settings-nav>button.active .ui-ico{opacity:1;color:var(--ui-accent)}
html body .settings-nav-bottom{gap:1px!important;padding-top:12px!important;border-top:1px solid var(--ui-line);margin-top:auto}
html body .settings-nav-bottom button,html body .settings-nav-bottom .import-button{min-height:28px;display:flex;align-items:center;gap:8px;justify-content:flex-start;padding:0 8px!important;font-size:12px!important;font-weight:500;text-align:left;border:0!important;border-radius:var(--r-md);background:transparent!important;color:var(--ui-muted)!important}
html body .settings-nav-bottom button:hover,html body .settings-nav-bottom .import-button:hover{background:var(--ui-hover)!important;color:var(--ui-text)!important}
html body .settings-nav-bottom [data-action=logout]:hover{color:#ff8d9a!important}
html body .settings-main{padding:20px 26px 32px!important}
html body .settings-main>*{max-width:840px}
html body .settings-title{font-size:18px!important;font-weight:700!important;letter-spacing:-.015em!important;margin:0 0 4px!important;color:var(--ui-strong)}
html body .settings-desc{font-size:12.5px!important;color:var(--ui-muted)!important;line-height:1.55!important;margin:0 0 16px!important}
html body #settings-dialog .settings-block{background:var(--ui-raise)!important;border:1px solid var(--ui-line)!important;border-radius:var(--r-lg)!important;padding:4px 16px!important;margin-bottom:12px!important}
html body #settings-dialog .settings-block>h3{font-size:10px!important;font-weight:700!important;letter-spacing:.1em!important;color:var(--ui-muted)!important;margin:12px 0 4px!important}
html body #settings-dialog .settings-block p,html body #settings-dialog .notice{font-size:11.5px!important;color:var(--ui-muted)!important;line-height:1.55!important;margin:10px 0}
html body #settings-dialog .form-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:46px!important;padding:8px 0!important;border-top:0!important;border-bottom:1px solid #ffffff09!important}
html body #settings-dialog .settings-block>.form-row:last-child,html body #settings-dialog .form-row:has(+ p),html body #settings-dialog .form-row:has(+ button){border-bottom:0!important}
html body #settings-dialog .form-row>div{display:flex;flex-direction:column;gap:3px;min-width:0}
html body #settings-dialog .form-row label,html body #settings-dialog .form-row>label{font-size:12.5px!important;font-weight:550!important;color:var(--ui-text)!important}
html body #settings-dialog .form-row small{font-size:11px!important;color:var(--ui-faint)!important;line-height:1.45}
html body #settings-dialog .field{display:flex;flex-direction:column;gap:5px;font-size:11.5px!important;font-weight:550;color:#aab2bc!important;min-width:0}
html body #settings-dialog .field>span small,html body #settings-dialog .field>small{font-size:10.5px;font-weight:400;color:var(--ui-faint)}
html body #settings-dialog .form-grid{gap:12px!important;margin:10px 0 12px}

html body #settings-dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea){min-height:32px;padding:6px 10px!important;font-size:12.5px!important;font-family:var(--font-ui);color:var(--ui-text)!important;background-color:var(--ui-input)!important;border:1px solid var(--ui-line-strong)!important;border-radius:var(--r-md)!important;transition:border-color .12s,box-shadow .12s;width:100%}
html body #settings-dialog .form-row :is(input:not([type=checkbox]):not([type=range]),select){width:min(280px,45%);flex-shrink:0}
html body #settings-dialog :is(input,select,textarea):hover{border-color:#3a414a!important}
html body #settings-dialog :is(input,select,textarea):focus{border-color:#8b97a6!important;box-shadow:0 0 0 3px #8b97a61f;outline:none}
html body #settings-dialog input[type=number]{font-family:var(--font-num)!important}
html body #settings-dialog textarea{font-family:var(--font-num)!important;font-size:12px!important;line-height:1.55;resize:vertical}
html body #settings-dialog select{appearance:none;-webkit-appearance:none;padding-right:30px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23858d98' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 10px center!important}
html body #settings-dialog select[size]:not([size="1"]){background-image:none!important;padding:4px!important}
html body #settings-dialog select[size]:not([size="1"]) option{padding:5px 8px;border-radius:var(--r-sm)}
html body #settings-dialog select[size]:not([size="1"]) option:checked{background:#2a3038 linear-gradient(#2a3038,#2a3038);color:var(--ui-strong)}
html body #settings-dialog input[type=range]{accent-color:var(--ui-text);width:min(280px,45%)}

/* Checkboxes become switches */
html body #settings-dialog input[type=checkbox]{appearance:none;-webkit-appearance:none;flex-shrink:0;position:relative;width:32px!important;height:18px!important;margin:0;border-radius:999px;background:#262a31;border:1px solid #30353d;cursor:pointer;transition:background-color .16s var(--ease),border-color .16s}
html body #settings-dialog input[type=checkbox]::after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#9aa2ad;transition:transform .18s var(--ease),background-color .18s}
html body #settings-dialog input[type=checkbox]:checked{background:var(--ui-up);border-color:var(--ui-up)}
html body #settings-dialog input[type=checkbox]:checked::after{transform:translateX(14px);background:#fff}
html body #settings-dialog input[type=checkbox]:disabled{opacity:.4;cursor:not-allowed}
html body #settings-dialog input[type=checkbox][hidden]{display:none!important}

html body #settings-dialog .settings-main button{min-height:30px;padding:0 12px;font-size:12px!important;font-weight:600;border-radius:var(--r-md)!important;background:var(--ui-hover);border:1px solid var(--ui-line-strong);color:var(--ui-text)}
html body #settings-dialog .settings-main button:hover{background:#22262c;border-color:#3a414a}
html body #settings-dialog [data-action=add-relay]{width:100%;min-height:38px!important;border:1px dashed var(--ui-line-strong)!important;background:transparent!important;color:var(--ui-muted)!important;margin-bottom:12px}
html body #settings-dialog [data-action^=preview-]{margin:4px 0 10px}

html body .settings-footer{height:54px!important;padding:0 14px 0 18px!important;border-top:1px solid var(--ui-line)!important;background:var(--ui-panel)!important}
html body #settings-status{font-size:11.5px!important;color:var(--ui-muted)!important;display:flex;align-items:center;gap:8px}
html body .settings-footer .primary{height:34px;padding:0 18px!important;font-size:12.5px!important;font-weight:650!important;border-radius:var(--r-md)!important;background:#e4e8ee!important;color:#07080a!important;border:0!important}
html body .settings-footer .primary:hover{background:#fff!important}
html body #settings-dialog.is-dirty .settings-footer .primary{background:var(--ui-up)!important;color:#03140c!important;box-shadow:0 0 0 3px #2ebd8526}
html body #settings-dialog.is-dirty #settings-status::before{content:'';width:7px;height:7px;border-radius:50%;background:#f1c84b}

html body #settings-dialog .source-pref-head{font-size:9.5px!important;font-weight:650;letter-spacing:.06em}
html body #settings-dialog .source-pref-row>div{font-size:12px!important}
html body #settings-dialog .x-group{border-radius:var(--r-md)!important}
html body #settings-dialog .x-source-main>a{font-size:12px!important}
html body #settings-dialog .layout-presets>span{font-size:10px!important;font-weight:700;letter-spacing:.1em;color:var(--ui-muted)}

/* ================= AUTOMATION ================= */
html body #settings-dialog .auto-master{display:flex;align-items:center;gap:20px;padding:14px 16px;margin-bottom:10px;border:1px solid var(--ui-line);border-radius:var(--r-lg);background:var(--ui-raise)}
html body #settings-dialog .auto-master.is-on{border-color:#2ebd8566;background:linear-gradient(90deg,#2ebd850d,transparent 60%),var(--ui-raise)}
html body #settings-dialog .auto-master-switch{display:flex;align-items:center;gap:12px;flex:1;cursor:pointer;min-width:0}
html body #settings-dialog .auto-master-switch input[type=checkbox]{width:40px!important;height:22px!important}
html body #settings-dialog .auto-master-switch input[type=checkbox]::after{width:16px;height:16px}
html body #settings-dialog .auto-master-switch input[type=checkbox]:checked::after{transform:translateX(18px)}
html body #settings-dialog .auto-master-switch b{display:block;font-size:14px;color:var(--ui-strong)}
html body #settings-dialog .auto-master-switch small{font-size:11.5px;color:var(--ui-muted)}
html body #settings-dialog .auto-master.is-on .auto-master-switch small{color:#4fd69c}
html body #settings-dialog .auto-cap{display:grid;grid-template-columns:auto 150px;align-items:center;gap:4px 10px}
html body #settings-dialog .auto-cap label{font-size:12px;font-weight:600;color:var(--ui-text)}
html body #settings-dialog .auto-cap label small{display:block;font-size:10.5px;font-weight:400;color:var(--ui-faint)}
html body #settings-dialog .auto-meter{grid-column:1/-1;height:4px;border-radius:4px;background:#ffffff0d;overflow:hidden;margin-top:6px}
html body #settings-dialog .auto-meter i{display:block;height:100%;width:0;background:var(--ui-up);border-radius:4px;transition:width .4s var(--ease)}
html body #settings-dialog #auto-spent{grid-column:1/-1;font:500 10.5px var(--font-num);color:var(--ui-faint)}
html body #settings-dialog .unit-input{position:relative;display:flex;align-items:center}
html body #settings-dialog .unit-input input{padding-right:46px!important}
html body #settings-dialog .unit-input em{position:absolute;right:10px;font:600 10.5px var(--font-num);font-style:normal;color:var(--ui-faint);pointer-events:none}
html body #settings-dialog .auto-help{margin:0 0 16px;font-size:11.5px;color:var(--ui-muted)}
html body #settings-dialog .auto-help>summary{cursor:pointer;width:max-content;color:var(--ui-muted);font-weight:600;padding:2px 0}
html body #settings-dialog .auto-help>summary:hover{color:var(--ui-text)}
html body #settings-dialog .auto-help ul{margin:8px 0 0;padding:10px 14px 10px 28px;border:1px solid var(--ui-line);border-radius:var(--r-md);background:var(--ui-input);line-height:1.6}
html body #settings-dialog .auto-list-head{display:flex;align-items:center;justify-content:space-between;margin:6px 0 8px}
html body #settings-dialog .auto-list-head h3,html body #settings-dialog .auto-activity h3{font-size:10.5px;font-weight:700;letter-spacing:.1em;color:var(--ui-muted);margin:0;display:flex;align-items:center;gap:8px;text-transform:uppercase}
html body #settings-dialog .auto-list-head .primary-ghost{background:var(--ui-text)!important;color:#07080a!important;border:0!important;min-height:28px}
html body #settings-dialog .auto-list-head .primary-ghost:hover{background:#fff!important}
html body #settings-dialog #automation-rules:empty::before{content:'No rules yet. Create one to start trading news automatically.';display:block;padding:22px;text-align:center;color:var(--ui-faint);border:1px dashed var(--ui-line-strong);border-radius:var(--r-lg);margin-bottom:12px}

/* Rule card */
html body #settings-dialog details.automation-rule{border:1px solid var(--ui-line);border-radius:var(--r-lg);background:var(--ui-raise);margin-bottom:8px;padding:0!important;overflow:hidden;transition:border-color .15s}
html body #settings-dialog details.automation-rule:hover{border-color:var(--ui-line-strong)}
html body #settings-dialog details.automation-rule[open]{border-color:#3a414a}
html body #settings-dialog details.automation-rule.is-on{box-shadow:inset 2px 0 0 var(--ui-up)}
html body #settings-dialog details.automation-rule>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;min-height:52px;padding:0 14px!important}
html body #settings-dialog details.automation-rule>summary::-webkit-details-marker{display:none}
html body #settings-dialog details.automation-rule>summary::after{content:'';width:7px;height:7px;margin-left:4px;border-right:1.5px solid var(--ui-muted);border-bottom:1.5px solid var(--ui-muted);transform:rotate(45deg) translateY(-2px);transition:transform .18s var(--ease);flex-shrink:0}
html body #settings-dialog details.automation-rule[open]>summary::after{transform:rotate(-135deg) translateY(-2px)}
html body #settings-dialog .auto-title{display:flex;flex-direction:column;min-width:0;flex:1}
html body #settings-dialog .auto-title b{font-size:13px!important;font-weight:650!important;color:var(--ui-strong)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #settings-dialog .auto-title small{font-size:11px;color:var(--ui-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #settings-dialog .auto-chips{display:flex;gap:5px;flex-shrink:0}
html body #settings-dialog .chip{font:600 10.5px var(--font-num);padding:3px 7px;border-radius:var(--r-sm);border:1px solid var(--ui-line-strong);color:var(--ui-text);white-space:nowrap}
html body #settings-dialog .chip.dim-chip{color:var(--ui-muted)}
html body #settings-dialog .chip.side-BUY{color:#4fd69c;border-color:#2ebd8544;background:#2ebd850d}
html body #settings-dialog .chip.side-SELL{color:#ff6b7f;border-color:#f6465d44;background:#f6465d0d}
html body #settings-dialog .chip.side-AUTO{color:#e2c46f;border-color:#e2c46f44;background:#e2c46f0d}
html body #settings-dialog .auto-state{font-size:10.5px;font-weight:600;color:var(--ui-faint);width:56px;text-align:right}
html body #settings-dialog .automation-rule.is-on .auto-state{color:#4fd69c}
html body #settings-dialog .auto-rule-body{border-top:1px solid var(--ui-line);padding:14px 16px 12px!important;display:flex;flex-direction:column;gap:12px}
html body #settings-dialog .auto-name-row .field{max-width:360px}
html body #settings-dialog .auto-sec{border:1px solid var(--ui-line);border-radius:var(--r-md);padding:12px 14px;background:var(--ui-panel);display:flex;flex-direction:column;gap:12px}
html body #settings-dialog .auto-sec h4{margin:0;font-size:12px;font-weight:650;color:var(--ui-strong);display:flex;align-items:center;gap:8px}
html body #settings-dialog .auto-sec h4 i{font:700 10px var(--font-num);font-style:normal;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:var(--ui-hover);color:var(--ui-muted)}
html body #settings-dialog .auto-sec h4 small{font-size:11px;font-weight:400;color:var(--ui-faint)}
html body #settings-dialog details.auto-sec>summary{list-style:none;cursor:pointer}
html body #settings-dialog details.auto-sec>summary::-webkit-details-marker{display:none}
html body #settings-dialog details.auto-sec>summary h4::after{content:'Show';margin-left:auto;font-size:10.5px;font-weight:600;color:var(--ui-muted)}
html body #settings-dialog details.auto-sec[open]>summary h4::after{content:'Hide'}
html body #settings-dialog details.auto-sec:not([open]){gap:0}
html body #settings-dialog .auto-words{margin:4px 0 14px;background:var(--ui-raise)}
html body #settings-dialog .auto-words>p{margin:0;font-size:11.5px}
html body #settings-dialog .tone-long{color:#4fd69c}html body #settings-dialog .tone-short{color:#ff6b7f}
html body #settings-dialog .auto-grid{display:grid;gap:12px}
html body #settings-dialog .auto-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
html body #settings-dialog .auto-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
html body #settings-dialog .auto-stack{display:flex;flex-direction:column;gap:12px;min-width:0}
html body #settings-dialog .auto-num small{font-size:10.5px;font-weight:400;color:var(--ui-faint)}
html body #settings-dialog .auto-source-field select{min-height:118px}

/* Segmented control */
html body #settings-dialog .seg{display:flex;gap:2px;padding:2px;background:var(--ui-input);border:1px solid var(--ui-line-strong);border-radius:var(--r-md);width:100%}
html body #settings-dialog .seg button{flex:1 1 auto;min-height:26px!important;padding:0 10px!important;border:0!important;border-radius:var(--r-sm)!important;background:transparent!important;color:var(--ui-muted)!important;font-size:11.5px!important;font-weight:600;white-space:nowrap}
html body #settings-dialog .seg button:hover{color:var(--ui-text)!important;background:var(--ui-hover)!important}
html body #settings-dialog .seg button[aria-checked=true]{background:#2a3038!important;color:var(--ui-strong)!important;box-shadow:0 1px 2px #0008}
html body #settings-dialog .seg button.long[aria-checked=true]{background:#2ebd8526!important;color:#4fd69c!important}
html body #settings-dialog .seg button.short[aria-checked=true]{background:#f6465d26!important;color:#ff6b7f!important}
html body #settings-dialog .seg button.auto[aria-checked=true]{background:#e2c46f22!important;color:#e2c46f!important}

/* Exit toggles */
html body #settings-dialog .auto-toggle-group{display:flex;flex-direction:column;border-top:1px solid var(--ui-line);padding-top:4px}
html body #settings-dialog .switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;cursor:pointer}
html body #settings-dialog .switch-row b{display:block;font-size:12.5px;font-weight:600;color:var(--ui-text)}
html body #settings-dialog .switch-row small{font-size:11px;color:var(--ui-faint)}
html body #settings-dialog .auto-reveal{padding:0 0 10px 0;max-width:520px}
html body #settings-dialog .auto-reveal[hidden]{display:none!important}
html body #settings-dialog .auto-reveal>.auto-num{max-width:250px}
html body #settings-dialog .auto-foot{display:flex;justify-content:flex-end;gap:8px;padding-top:2px}
html body #settings-dialog .auto-foot .danger{color:#ff6b7f!important;border-color:#f6465d40!important;background:transparent!important}
html body #settings-dialog .auto-foot .danger:hover{background:#f6465d14!important}

/* Activity */
html body #settings-dialog .auto-activity{margin-top:18px}
html body #settings-dialog .auto-activity h3{margin-bottom:8px}
html body #settings-dialog #automation-events{border:1px solid var(--ui-line);border-radius:var(--r-lg);overflow:hidden;background:var(--ui-raise)}
html body #settings-dialog #automation-events>p{margin:0;padding:14px 16px;font-size:12px}
html body #settings-dialog .automation-event{border-bottom:1px solid var(--ui-line)}
html body #settings-dialog .automation-event:last-child{border-bottom:0}
html body #settings-dialog .automation-event>summary{display:grid;grid-template-columns:130px minmax(0,1fr) 110px 58px 96px;align-items:center;gap:10px;padding:8px 14px;cursor:pointer;list-style:none;font-size:12px}
html body #settings-dialog .automation-event>summary::-webkit-details-marker{display:none}
html body #settings-dialog .automation-event>summary:hover{background:var(--ui-hover)}
html body #settings-dialog .automation-event time{font:500 11px var(--font-num);color:var(--ui-faint)}
html body #settings-dialog .automation-event summary b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #settings-dialog .ev-sym{font:600 11.5px var(--font-num)}
html body #settings-dialog .ev-status{font:700 10px var(--font-num);letter-spacing:.04em;text-align:right;color:var(--ui-muted)}
html body #settings-dialog .automation-event[class*=status-fill] .ev-status,html body #settings-dialog .automation-event.status-opened .ev-status,html body #settings-dialog .automation-event.status-executed .ev-status{color:#4fd69c}
html body #settings-dialog .automation-event[class*=status-error] .ev-status,html body #settings-dialog .automation-event[class*=status-reject] .ev-status,html body #settings-dialog .automation-event[class*=status-fail] .ev-status{color:#ff6b7f}
html body #settings-dialog .automation-event[class*=status-skip] .ev-status{color:var(--ui-faint)}
html body #settings-dialog .automation-event[open]>summary{background:var(--ui-hover)}
html body #settings-dialog .automation-event>:not(summary){margin-left:14px;margin-right:14px}
html body #settings-dialog .automation-event>p{font-size:11.5px!important}
html body #settings-dialog .automation-event .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));font-size:11.5px}
html body #settings-dialog .automation-event>small{display:block;margin-bottom:10px;font-size:10.5px;color:var(--ui-faint)}

/* ---------- Mobile ---------- */
@media(max-width:740px){
 html body .topbar{height:44px!important;padding:0 8px!important;gap:8px}
 html body .topbar .layout-actions{display:none}
 html body #workspace .news-trade-row .quick-buttons button{height:30px;font-size:11px!important}
 html body .mobile-nav button{font-size:10px!important;font-weight:600}
 html body #settings-dialog{width:100vw!important;height:100dvh!important;max-height:none;border-radius:0!important}
 html body .settings-body{height:calc(100% - 48px - 54px)!important}
 html body .settings-nav{flex-direction:row!important;padding:6px!important;gap:2px!important;border-right:0!important;border-bottom:1px solid var(--ui-line)!important}
 html body .settings-nav>small{display:none!important}
 html body .settings-nav>button{white-space:nowrap;flex-shrink:0}
 html body .settings-main{padding:14px 12px 28px!important}
 html body #settings-dialog .form-row{flex-wrap:wrap;gap:8px}
 html body #settings-dialog .form-row :is(input:not([type=checkbox]):not([type=range]),select){width:100%}
 html body #settings-dialog .auto-master{flex-direction:column;align-items:stretch}
 html body #settings-dialog .auto-grid.two,html body #settings-dialog .auto-grid.four{grid-template-columns:1fr 1fr}
 html body #settings-dialog .auto-chips .dim-chip{display:none}
 html body #settings-dialog .seg{flex-wrap:wrap}
 html body #settings-dialog .automation-event>summary{grid-template-columns:1fr auto auto}
 html body #settings-dialog .automation-event>summary time,html body #settings-dialog .automation-event>summary b{grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce){html body *{animation:none!important;transition:none!important}}
html body #settings-dialog .automation-rule>summary::before{content:none!important;display:none!important}
html body #settings-dialog input[type=number]{-moz-appearance:textfield;appearance:textfield}
html body #settings-dialog input[type=number]::-webkit-inner-spin-button,html body #settings-dialog input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* ================= v5.2 PANELS ================= */
/* Header bar is the drag handle; the old corner grip is gone. */
html body.dynamic-workspace .panel-drag{display:none!important}
html body.dynamic-workspace .panel-head{padding-right:6px!important}
html body.layout-editing .panel-bar{cursor:grab;user-select:none;-webkit-user-select:none}
html body.layout-editing .panel-bar:active{cursor:grabbing}
html body .panel-bar{position:relative}
html body .panel-bar .panel-close{width:22px!important;height:22px!important;min-height:0!important;flex:0 0 22px;margin-left:6px;padding:0!important;display:inline-grid!important;place-items:center;border:0!important;border-radius:var(--r-sm)!important;background:transparent!important;color:var(--ui-faint)!important;cursor:pointer;opacity:.75;transition:background-color .12s,color .12s,opacity .12s}
html body .panel-bar .panel-close:hover{opacity:1;background:#f6465d1f!important;color:#ff6b7f!important}
html body .panel-bar .panel-close svg{display:block}
html body:not(.layout-editing) .panel-close{display:none!important}
html body :is(.chart-panel,.extra-chart) .market-header>.panel-close{margin-left:auto}
html body .command-panel .command-top{display:flex;align-items:center;gap:8px}
html body .command-panel .command-top>kbd{margin-left:auto}
html body .positions-panel .panel-bar{gap:10px}
html body .optional-order-panel .panel-head{display:flex;align-items:center;justify-content:space-between}
html body .optional-order-panel .panel-head h2{margin:0}
/* Quiet resize handles: invisible until hover, real cursor feedback. */
html body .grid-stack-item>.ui-resizable-handle{background:none!important;opacity:1!important}
html body .grid-stack-item>.ui-resizable-se{width:14px!important;height:14px!important;right:2px!important;bottom:2px!important;transform:none!important}
html body .grid-stack-item>.ui-resizable-se::after{content:'';position:absolute;right:3px;bottom:3px;width:6px;height:6px;border-right:1.5px solid var(--ui-line-strong);border-bottom:1.5px solid var(--ui-line-strong);opacity:0;transition:opacity .15s}
html body .grid-stack-item:hover>.ui-resizable-se::after{opacity:1}
html body .grid-stack-item.ui-draggable-dragging>.grid-stack-item-content{box-shadow:0 18px 50px #000c,0 0 0 1px #3a414a!important;opacity:.96}
html body .grid-stack-placeholder>.placeholder-content{background:#ffffff06!important;border:1px dashed #3a414a!important;border-radius:var(--r-lg)!important}

/* Panels menu */
html body #add-order-panel,html body #add-chart{display:none!important}
html body .topbar #panels-menu{width:auto!important;padding:0 10px 0 8px!important;gap:6px;display:inline-flex!important;align-items:center;font-size:11.5px!important;font-weight:600;color:var(--ui-text);border:1px solid var(--ui-line)!important}
html body .topbar #panels-menu[aria-expanded=true]{background:var(--ui-hover)}
html body #panels-pop{position:fixed;z-index:300;min-width:220px;padding:6px;background:var(--ui-panel);border:1px solid var(--ui-line-strong);border-radius:var(--r-lg);box-shadow:0 18px 50px #000d;display:flex;flex-direction:column;gap:1px;font-size:12.5px}
html body #panels-pop[hidden]{display:none}
html body #panels-pop small{font-size:9.5px;font-weight:700;letter-spacing:.1em;color:var(--ui-faint);padding:6px 8px 4px}
html body #panels-pop hr{border:0;border-top:1px solid var(--ui-line);margin:5px 2px}
html body #panels-pop button{display:flex;align-items:center;gap:8px;height:30px;padding:0 8px;border:0;border-radius:var(--r-md);background:transparent;color:var(--ui-text);text-align:left;font-size:12.5px;cursor:pointer}
html body #panels-pop button:hover:not(:disabled){background:var(--ui-hover)}
html body #panels-pop button:disabled{opacity:.4;cursor:default}
html body #panels-pop .pm-check{width:16px;text-align:center;color:var(--ui-up);font-weight:700}
html body #panels-pop button[aria-checked=false] .pm-check{color:var(--ui-faint)}
html body #panels-pop em{margin-left:auto;font:500 10.5px var(--font-num);font-style:normal;color:var(--ui-faint)}

/* ================= v5.2 TRADE ROWS (full-width long | short groups) ================= */
html body #workspace .news-trade-row{display:flex!important;flex-wrap:nowrap!important}
html body #workspace .news-trade-row .news-asset{width:170px!important;flex:0 0 170px!important;justify-content:flex-start!important;overflow:hidden}
html body #workspace .news-trade-row .quick-buttons,html body #chart-presets{display:flex!important;flex:1 1 auto!important;max-width:none!important;margin-left:0!important;gap:4px!important;width:auto!important}
html body #workspace .news-trade-row .quick-buttons button,html body #chart-presets button{flex:1 1 0!important;min-width:0!important;height:22px!important;min-height:22px!important;border:0!important;border-radius:3px!important;background:#2ebd851c!important;color:#3fcf8e!important;font:600 11px var(--font-num)!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL],html body #chart-presets button[data-trade=SELL]{background:#f6465d1c!important;color:#f2627a!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY]+button[data-trade=SELL],html body #chart-presets button[data-trade=BUY]+button[data-trade=SELL]{margin-left:14px!important}
html body #workspace .news-trade-row .quick-buttons button:not(:disabled):hover,html body #chart-presets button:not(:disabled):hover{background:#2ebd8545!important;color:#8ff0c3!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body #chart-presets button[data-trade=SELL]:not(:disabled):hover{background:#f6465d45!important;color:#ffa3af!important}
html body #workspace .quick-buttons button:disabled,html body #chart-presets button:disabled{opacity:.55!important}
html body #chart-presets>span{flex:0 0 auto}
@container(max-width:560px){html body #workspace .news-trade-row{flex-wrap:wrap!important;row-gap:4px}html body #workspace .news-trade-row .news-asset{flex:1 1 100%!important;width:100%!important}html body #workspace .news-trade-row .quick-buttons{flex:1 1 100%!important}}

/* ================= v5.2 SETTINGS SECTIONS ================= */
html body .settings-nav>button.group-active{background:var(--ui-hover)!important;color:var(--ui-strong)!important;font-weight:600}
html body .settings-nav>button.group-active .ui-ico{opacity:1;color:var(--ui-accent)}
html body #settings-dialog .settings-subtabs{display:flex;gap:2px;margin:-6px 0 18px;padding:0;border-bottom:1px solid var(--ui-line);max-width:none;overflow-x:auto}
html body #settings-dialog .settings-subtabs button{min-height:34px!important;padding:0 14px!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--ui-muted)!important;font-size:12.5px!important;font-weight:600;box-shadow:inset 0 -2px 0 transparent;white-space:nowrap}
html body #settings-dialog .settings-subtabs button:hover{color:var(--ui-text)!important;background:transparent!important}
html body #settings-dialog .settings-subtabs button.active{color:var(--ui-strong)!important;box-shadow:inset 0 -2px 0 var(--ui-accent)}
/* Source table (News Feed sources) */
html body #settings-dialog #source-search{margin:12px 0 10px!important}
html body #settings-dialog #source-preferences{max-height:58vh;overflow:auto;margin:0 -16px;padding:0 16px 8px}
html body #settings-dialog .source-pref-head,html body #settings-dialog .source-pref-row{grid-template-columns:minmax(180px,1fr) 60px 60px 60px 130px!important;gap:10px!important;border-bottom:1px solid #ffffff09!important}
html body #settings-dialog .source-pref-head{position:sticky;top:0;z-index:2;background:var(--ui-raise);padding:8px 0!important;color:var(--ui-faint)!important}
html body #settings-dialog .source-pref-head>span:not(:first-child){text-align:center}
html body #settings-dialog .source-pref-row{padding:5px 0!important;min-height:40px}
html body #settings-dialog .source-pref-row:hover{background:#ffffff04}
html body #settings-dialog .source-pref-row>input[type=checkbox]{justify-self:center}
html body #settings-dialog .source-pref-row>div{gap:10px!important}
html body #settings-dialog .source-pref-row .source-icon,html body #settings-dialog .source-pref-row img{width:22px!important;height:22px!important;flex-shrink:0;display:inline-grid;place-items:center;border-radius:50%;background:var(--ui-hover);color:var(--ui-muted)}
html body #settings-dialog .source-pref-row .source-icon svg{width:12px;height:12px}
html body #settings-dialog .source-pref-row small{display:inline!important;margin-left:6px!important;text-transform:uppercase;font-size:9.5px!important;letter-spacing:.06em}
html body #settings-dialog .source-pref-row select{min-height:28px!important;padding:3px 26px 3px 8px!important;font-size:11.5px!important}

/* ================= v5.3 ================= */
/* Quick trade under the chart: a slim strip; the chart keeps the space. */
html body #chart-presets{flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:8px!important;padding:5px 8px!important;min-height:0!important;height:auto!important}
html body #chart-presets>span{font-size:9px!important;line-height:1.2!important;width:auto}
html body #chart-presets .quick-buttons{display:flex!important;flex:1 1 auto!important;gap:4px!important;width:auto!important}
html body #chart-presets .quick-buttons button{height:22px!important;min-height:22px!important}
html body .chart-panel .chart-container{flex:1 1 0!important;min-height:120px!important}

/* Mini terminal: Enter submits; no visible EXECUTE button. */
html body #command-submit{display:none!important}

/* News cards: room to breathe (Phoenix-like rhythm). */
html body #workspace .news-card,html body #workspace .news-card.is-latest{padding:10px 14px 10px!important;margin-bottom:6px!important}
html body #workspace .news-card header{margin-bottom:7px!important}
html body #workspace .news-title,html body #workspace .news-embedded .news-title{line-height:1.5!important}
html body #workspace .news-body{margin-top:6px!important;line-height:1.55!important}
html body #workspace .news-embedded{margin-top:9px!important;padding:9px 12px!important}
html body #workspace .news-media,html body #workspace .news-content>.news-photo{margin-top:8px}
html body #workspace .news-trade-row{margin-top:10px!important;padding-top:8px!important}
html body #workspace .news-trade-row+.news-trade-row{margin-top:5px!important;padding-top:0!important}

/* Coin labels: ticker in its own colour, no /USDT suffix, plain coloured change. */
html body #workspace .coin-button{color:#e8b54a!important;font-weight:700!important;letter-spacing:.01em}
html body #workspace .coin-button small{display:none!important}
html body #workspace .coin-button:hover{color:#ffcf6b!important}
html body #workspace .price-move{border:0!important;background:transparent!important;padding:0 2px!important;min-width:0!important;text-align:left!important;font-size:11px!important}
html body #workspace .price-move::before{display:none!important}

/* ================= v5.4 PHONE ================= */
@media(max-width:740px){
 /* iOS zooms into inputs smaller than 16px */
 html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px!important}
 html body{-webkit-text-size-adjust:100%;overscroll-behavior-y:none}
 html body button{touch-action:manipulation}

 /* Top bar: brand + live dot + settings */
 html body .topbar{height:46px!important;padding:0 12px!important}
 html body .topbar .brand>span:last-child{display:none}
 html body .topbar .status{font-size:0!important;padding:0!important;gap:0}
 html body .topbar .status .dot{width:8px;height:8px;margin:0}
 html body #user-button{display:none!important}

 /* Panels go edge to edge */
 html body #workspace .terminal-grid.grid-stack{margin:0!important}
 html body #workspace .grid-stack-item>.grid-stack-item-content{inset:0!important}
 html body #workspace .panel,html body #workspace .workspace-panel{border-radius:0!important;border-left:0!important;border-right:0!important}

 /* News feed */
 html body .feed-panel .panel-head{height:38px!important}
 html body .feed-panel .panel-head h2{font-size:0!important}
 html body .feed-panel .panel-head h2::before{content:"Latest";font-size:13px;font-weight:650;letter-spacing:0;color:var(--ui-text)}
 html body .search-row{margin:6px 10px!important;height:38px}
 html body .feed-scroll{padding:0 8px 10px!important}
 html body #workspace .news-card,html body #workspace .news-card.is-latest{padding:11px 12px!important;border-radius:var(--r-lg)!important;margin-bottom:8px!important}
 html body #workspace .news-card header{flex-wrap:nowrap!important;gap:6px}
 html body #workspace .news-identity{min-width:0;overflow:hidden}
 html body #workspace .news-source{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html body #workspace .news-card .source-category{display:none}
 html body #workspace .news-title,html body #workspace .news-embedded .news-title{font-size:max(14px,calc(var(--news-font-size,14px) - 1px))!important}
 html body #workspace .news-trade-row{flex-wrap:wrap!important;row-gap:6px!important}
 html body #workspace .news-trade-row .news-asset{flex:1 1 100%!important;width:100%!important}
 html body #workspace .news-trade-row .quick-buttons{flex:1 1 100%!important;gap:5px!important}
 html body #workspace .news-trade-row .quick-buttons button{height:34px!important;min-height:34px!important;font-size:12px!important;border-radius:6px!important}
 html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY]+button[data-trade=SELL]{margin-left:10px!important}
 html body .news-photo{max-width:100%!important}

 /* Chart: one-line quote strip and toolbar, swipe for more */
 html body :is(.chart-panel,.extra-chart) .market-header{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:16px!important;min-height:46px!important}
 html body :is(.chart-panel,.extra-chart) .market-header::-webkit-scrollbar,html body .chart-tools::-webkit-scrollbar{display:none}
 html body :is(.chart-panel,.extra-chart) .market-header>*{flex-shrink:0}
 html body .chart-tools{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none}
 html body .chart-tools>*{flex-shrink:0}
 html body :is(#intervals,.chart-intervals) button{height:30px;min-width:36px;font-size:12px!important}
 html body #chart-presets{padding:6px 8px!important}
 html body #chart-presets>span{display:none!important}
 html body #chart-presets .quick-buttons button{height:34px!important;min-height:34px!important;font-size:12px!important}

 /* Command */
 html body .command-panel .command-top{display:none!important}
 html body #command-form{padding:8px 10px!important}
 html body #command-input{height:42px!important}

 /* Positions: scrollable tabs, summary row, cards instead of a wide table */
 html body .positions-panel .panel-head{height:auto!important;flex-wrap:wrap!important;padding:6px 8px!important;gap:6px!important}
 html body .position-tabs{order:1;flex:1 1 100%;display:flex;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap!important}
 html body .position-tabs::-webkit-scrollbar{display:none}
 html body .position-tabs button{white-space:nowrap;flex-shrink:0;height:32px}
 html body .positions-panel .position-summary{order:2;flex:1 1 auto;display:flex!important;flex-wrap:wrap;gap:4px 12px!important;position:static!important}
 html body .positions-panel #close-all{order:3;position:static!important;height:30px;margin-left:auto}
 html body .positions-panel #account-updated{display:none}
 html body #positions-content{overflow-x:hidden!important}
 html body #positions-content :is(table,thead,tbody,tr,td){display:block;width:auto!important}
 html body #positions-content thead{display:none}
 html body #positions-content table{border:0}
 html body #positions-content tbody tr{display:grid!important;grid-template-columns:1fr 1fr;gap:8px 14px;margin:8px;padding:12px;border:1px solid var(--ui-line);border-radius:var(--r-lg);background:var(--ui-raise)}
 html body #positions-content td{padding:0!important;border:0!important;font-size:13px!important;white-space:normal!important;text-align:left!important;min-width:0}
 html body #positions-content td::before{content:attr(data-label);display:block;font:600 10px var(--font-ui);letter-spacing:.06em;color:var(--ui-faint);margin-bottom:2px;text-transform:uppercase}
 html body #positions-content td:first-child{grid-column:1/-1;display:flex;align-items:center;gap:8px;font-size:14px!important;font-weight:650}
 html body #positions-content td:first-child::before,html body #positions-content td:last-child::before,html body #positions-content td:not([data-label])::before,html body #positions-content td[data-label=""]::before{display:none}
 html body #positions-content td:last-child{grid-column:1/-1}
 html body #positions-content td:empty{display:none}
 html body #positions-content .position-actions{display:flex;flex-wrap:wrap;gap:6px!important;min-width:0!important}
 html body #positions-content .position-actions .close-percent{flex:1 1 auto}
 html body #positions-content .position-actions .close-percent button{flex:1;height:32px}
 html body #positions-content .position-actions .close-type button{height:32px}
 html body #positions-content .position-actions>button{flex:1 1 40%;height:36px;font-weight:650}
 html body #positions-content .position-actions>button[data-close-position]{background:#f6465d1f;color:#ff6b7f;border-color:#f6465d55}

 /* Bottom navigation */
 html body .mobile-nav{background:var(--ui-bg)!important;border-top:1px solid var(--ui-line)!important;padding-bottom:env(safe-area-inset-bottom)}
 html body .mobile-nav button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:transparent!important;border:0!important;border-radius:0!important;color:var(--ui-faint)!important;font-size:10px!important;font-weight:600;letter-spacing:.02em}
 html body .mobile-nav button .ui-ico{width:20px;height:20px}
 html body .mobile-nav button.active{color:var(--ui-strong)!important;background:transparent!important;box-shadow:inset 0 2px 0 var(--ui-accent)}
 html body .mobile-nav button.active .ui-ico{color:var(--ui-accent)}

 /* Settings on phone */
 html body #settings-dialog .auto-grid.two{grid-template-columns:1fr!important}
 html body #settings-dialog details.automation-rule>summary{flex-wrap:wrap;row-gap:6px;padding:10px 12px!important}
 html body #settings-dialog .auto-title{flex:1 1 calc(100% - 90px)}
 html body #settings-dialog .auto-chips{order:5;flex:1 1 100%;padding-left:44px}
 html body #settings-dialog .auto-rule-body{padding:12px!important}
 html body #settings-dialog .auto-sec{padding:10px}
 html body #settings-dialog .seg button{min-height:36px!important;flex:1 1 40%}
 html body #settings-dialog .source-pref-head,html body #settings-dialog .source-pref-row{grid-template-columns:minmax(0,1fr) 40px 40px 40px 84px!important;gap:6px!important}
 html body #settings-dialog .settings-subtabs{margin:-4px -12px 14px;padding:0 6px}
 html body .settings-footer .primary{height:42px}
}
@media(max-width:740px){html body[data-mobile-view=account] .terminal-grid>.grid-stack-item[data-widget-id=positions]{height:calc(100% - 56px)!important}html body[data-mobile-view=account] .terminal-grid>.grid-stack-item[data-widget-id=command]{height:56px!important}}
@media(max-width:740px){html body #settings-dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea),html body #command-input,html body #workspace .search-row :is(input,select){font-size:16px!important}}
/* Command panel: the input row doubles as the drag handle on desktop */
html body .command-panel #command-form.panel-bar{display:flex;align-items:center}
html body .command-panel #command-form.panel-bar>label{cursor:grab;padding:0 2px}
html body .command-panel #command-form .panel-close{flex:0 0 22px}

/* ================= v5.5 ================= */
html:root{--ui-body:#9aa3ae;--ui-ticker:#e8b54a;--ui-glass:rgba(255,255,255,.045);--ui-glass-line:rgba(255,255,255,.09)}

/* ---- Coin chips: glass pill holding ticker + move, bigger hit area ---- */
html body #workspace .news-trade-row{display:grid!important;grid-template-columns:172px minmax(0,1fr);align-items:center}
html body #workspace .news-trade-row .news-asset{width:auto!important;flex:none!important;justify-self:start;max-width:100%;display:inline-flex!important;align-items:center;gap:7px!important;height:24px;padding:0 9px 0 4px;border-radius:999px;background:var(--ui-glass);border:1px solid var(--ui-glass-line);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);-webkit-backdrop-filter:blur(8px) saturate(140%);backdrop-filter:blur(8px) saturate(140%);transition:background-color .15s,border-color .15s}
html body #workspace .news-trade-row .news-asset:hover{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16)}
html body #workspace .news-asset .coin-button{color:var(--ui-ticker)!important;gap:6px!important;font-size:12px!important}
html body #workspace .news-asset .coin-logo{width:17px!important;height:17px!important;border-radius:50%}
html body #workspace .news-asset .price-move{padding:0!important;font-size:11px!important}
html body #workspace .news-trade-row .quick-buttons{grid-column:2}
html body #workspace .news-body{color:var(--ui-body)!important}
html body #workspace .coin-button{color:var(--ui-ticker)!important}
html body #workspace .news-card button.asset-mention{padding:0 5px!important;margin:0 1px;border-radius:5px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line)}
@container(max-width:560px){html body #workspace .news-trade-row{grid-template-columns:1fr!important}html body #workspace .news-trade-row .quick-buttons{grid-column:1}}


/* ---- Settings: calmer, roomier, smoother ---- */
html body #settings-dialog{border-radius:16px!important;background:color-mix(in srgb,var(--ui-panel) 96%,transparent)!important;border:1px solid var(--ui-glass-line)!important;box-shadow:0 50px 140px #000,0 0 0 1px #00000080!important}
html body #settings-dialog::backdrop{background:rgba(0,0,0,.62)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)!important}
html body #settings-dialog .modal-head{height:56px;padding:0 14px 0 22px;border-bottom:1px solid var(--ui-line)}
html body #settings-dialog .modal-head h2{font-size:15px!important;letter-spacing:0!important}
html body #settings-dialog .modal-head h2 span{display:none}
html body #settings-dialog .modal-head button{width:36px!important;height:36px!important;border-radius:10px!important;font-size:22px!important}
html body .settings-body{grid-template-columns:224px minmax(0,1fr)!important;height:calc(100% - 56px - 60px)!important}
html body .settings-nav{padding:14px 10px!important;gap:2px!important;background:transparent!important}
html body .settings-nav>small{display:none!important}
html body .settings-nav>button{min-height:36px!important;padding:0 10px!important;border-radius:9px!important;font-size:13px!important;gap:10px!important;transition:background-color .15s,color .15s}
html body .settings-nav>button.group-active,html body .settings-nav>button.active{background:color-mix(in srgb,var(--ui-accent) 14%,transparent)!important;color:var(--ui-strong)!important}
html body .settings-nav>button.group-active .ui-ico,html body .settings-nav>button.active .ui-ico{color:var(--ui-accent)!important;opacity:1}
html body .settings-main{padding:26px 34px 40px!important}
html body .settings-main>*{max-width:780px}
html body #settings-content>*{animation:settings-in .2s var(--ease) both}
@keyframes settings-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
html body .settings-title{font-size:21px!important;letter-spacing:-.02em!important;margin-bottom:6px!important}
html body .settings-desc{font-size:13px!important;margin-bottom:22px!important}
html body #settings-dialog .settings-block{border-radius:14px!important;padding:6px 18px!important;margin-bottom:16px!important;background:var(--ui-glass)!important;border:1px solid var(--ui-glass-line)!important}
html body #settings-dialog .settings-block>h3{font-size:13px!important;font-weight:650!important;letter-spacing:-.005em!important;color:var(--ui-strong)!important;text-transform:lowercase;margin:16px 0 6px!important}
html body #settings-dialog .settings-block>h3::first-letter{text-transform:uppercase}
html body #settings-dialog .form-row{margin:0 -18px!important;padding:12px 18px!important;border-bottom:1px solid rgba(255,255,255,.045)!important;transition:background-color .15s}
html body #settings-dialog .form-row:hover{background:rgba(255,255,255,.018)}
html body #settings-dialog .form-row label,html body #settings-dialog .form-row>label{font-size:13px!important;font-weight:550!important}
html body #settings-dialog .form-row small{font-size:11.5px!important}
html body #settings-dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea){min-height:36px;border-radius:9px!important}
html body #settings-dialog .settings-main button{border-radius:9px!important;min-height:32px}
html body #settings-dialog input[type=checkbox]{width:36px!important;height:20px!important}
html body #settings-dialog input[type=checkbox]::after{width:14px;height:14px}
html body #settings-dialog input[type=checkbox]:checked::after{transform:translateX(16px)}
html body #settings-dialog input[type=range]{-webkit-appearance:none;appearance:none;height:4px;border-radius:4px;background:linear-gradient(var(--ui-accent),var(--ui-accent)) 0/var(--fill,50%) 100% no-repeat,#ffffff1a;outline:none}
html body #settings-dialog input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0009;cursor:pointer}
html body #settings-dialog input[type=range]::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:#fff}
html body .settings-footer{height:60px!important;background:color-mix(in srgb,var(--ui-panel) 80%,transparent)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
html body .settings-footer .primary{height:38px;border-radius:10px!important}
html body #settings-dialog .settings-subtabs{gap:4px!important;border-bottom:0!important;margin:-8px 0 22px!important;padding:3px!important;background:var(--ui-glass);border:1px solid var(--ui-glass-line)!important;border-radius:11px;width:max-content;max-width:100%}
html body #settings-dialog .settings-subtabs button{min-height:30px!important;padding:0 14px!important;border-radius:8px!important;box-shadow:none!important;font-size:12.5px!important}
html body #settings-dialog .settings-subtabs button.active{background:var(--ui-hover)!important;color:var(--ui-strong)!important;box-shadow:0 1px 3px #0007!important}

/* Theme cards */
html body #settings-dialog .theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:6px 0 14px}
html body #settings-dialog .theme-card{display:flex!important;flex-direction:column;align-items:flex-start;gap:3px;min-height:0!important;padding:8px!important;border-radius:12px!important;background:transparent!important;border:1px solid var(--ui-glass-line)!important;text-align:left;cursor:pointer;transition:border-color .15s,transform .15s}
html body #settings-dialog .theme-card:hover{border-color:rgba(255,255,255,.22)!important;transform:translateY(-1px)}
html body #settings-dialog .theme-card[aria-checked=true]{border-color:var(--tc-accent)!important;box-shadow:0 0 0 1px var(--tc-accent),0 6px 20px #0008}
html body #settings-dialog .theme-preview{position:relative;display:grid;grid-template-columns:1.2fr 1fr;grid-template-rows:1fr 1fr;gap:3px;width:100%;height:58px;padding:5px;margin-bottom:5px;border-radius:8px;background:var(--tc-bg);border:1px solid var(--tc-line)}
html body #settings-dialog .theme-preview i{display:block;border-radius:3px;background:var(--tc-panel);border:1px solid var(--tc-line)}
html body #settings-dialog .theme-preview i:first-child{grid-row:1/3}
html body #settings-dialog .theme-preview b{position:absolute;left:10px;top:11px;width:34px;height:4px;border-radius:2px;background:var(--tc-text);box-shadow:0 8px 0 var(--tc-accent),0 16px 0 color-mix(in srgb,var(--tc-text) 45%,transparent)}
html body #settings-dialog .theme-name{font-size:12.5px;font-weight:650;color:var(--ui-strong)}
html body #settings-dialog .theme-card small{font-size:10.5px;color:var(--ui-faint);line-height:1.3}

/* ---- New themes ---- */
html[data-theme=carbon]{--accent:#4c8dff;--ui-focus:#4c8dff}
html[data-theme=nord]{--accent:#5fb3d9;--ui-muted:#8494a8;--ui-faint:#56677c;--ui-body:#a3b4c6;--ui-ticker:#e8c56a}
html[data-theme=amber]{--accent:#ffb000;--ui-strong:#ffd9a0;--ui-muted:#b98a45;--ui-faint:#7a5a2c;--ui-body:#d9a865;--ui-ticker:#ffb000;--ui-mention:#ffd27a;--ui-glass:rgba(255,176,0,.06);--ui-glass-line:rgba(255,176,0,.16);--font-ui:'JetBrains Mono',ui-monospace,monospace}
html[data-theme=matrix]{--accent:#00ff66;--ui-strong:#8dffb4;--ui-muted:#22b358;--ui-faint:#137a3a;--ui-body:#2fdc6c;--ui-ticker:#b6ff3b;--ui-mention:#c8ff6a;--ui-focus:#00ff66;--ui-glass:rgba(0,255,102,.05);--ui-glass-line:rgba(0,255,102,.18);--ui-line-strong:#14502a;--font-ui:'JetBrains Mono',ui-monospace,monospace}
html:is([data-theme=matrix],[data-theme=amber]) body,html:is([data-theme=matrix],[data-theme=amber]) #workspace *{font-family:var(--font-ui)!important}
html[data-theme=matrix] #workspace .news-title{text-shadow:0 0 8px rgba(0,255,102,.28)}
html[data-theme=matrix] #workspace .news-card.has-headline>.news-content>.news-title{color:#a8ffc6!important}
html[data-theme=amber] #workspace .news-title{text-shadow:0 0 8px rgba(255,176,0,.22)}
html:is([data-theme=matrix],[data-theme=amber]) body::after{content:'';position:fixed;inset:0;z-index:9999;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(0,0,0,.18) 0,rgba(0,0,0,.18) 1px,transparent 1px,transparent 3px);mix-blend-mode:multiply;opacity:.55}
html[data-theme=matrix] .topbar .brand,html[data-theme=matrix] .topbar nav .nav-active{color:#00ff66!important}

/* ---- Phone: settings close must be reachable (status bar / notch) ---- */
@media(max-width:740px){
 html body #settings-dialog{padding-top:env(safe-area-inset-top)!important;max-height:100dvh!important}
 html body #settings-dialog .modal-head{position:relative;z-index:5;height:54px}
 html body #settings-dialog .modal-head button{width:44px!important;height:44px!important;margin-right:-6px;touch-action:manipulation}
 html body .settings-body{height:calc(100% - 54px - 60px - env(safe-area-inset-top))!important}
 html body .settings-footer{padding-bottom:env(safe-area-inset-bottom)!important;height:calc(60px + env(safe-area-inset-bottom))!important}
 html body .settings-footer .mobile-close{display:inline-flex!important}
 html body #settings-dialog .theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body #workspace .news-trade-row .news-asset{height:30px;padding:0 11px 0 5px}
 html body .settings-nav>button{flex-shrink:0}
}
html body .settings-footer .mobile-close{display:none;height:38px;padding:0 16px;border-radius:10px;align-items:center;background:var(--ui-hover);border:1px solid var(--ui-line-strong);color:var(--ui-text);font-weight:600;margin-left:auto;margin-right:8px}
@media(max-width:740px){html body #settings-status{font-size:0!important;flex:0 0 auto}html body #settings-dialog.is-dirty #settings-status::before{width:9px;height:9px}html body .settings-footer .primary{white-space:nowrap;padding:0 16px!important}}

/* ================= v5.6 ================= */
/* ---- Coin peek: own typography (Inter, sentence case), interactive ---- */
#coin-peek{position:fixed;z-index:400;width:422px;padding:12px 12px 10px;border-radius:14px;background:color-mix(in srgb,var(--ui-panel) 93%,transparent);border:1px solid var(--ui-glass-line);box-shadow:0 22px 56px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,255,255,.04);-webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%);font-family:Inter,system-ui,sans-serif!important;font-variant-numeric:tabular-nums;animation:peek-in .16s var(--ease)}
#coin-peek *{font-family:inherit!important}
#coin-peek[hidden]{display:none}
@keyframes peek-in{from{opacity:0;transform:translateY(4px) scale(.99)}to{opacity:1;transform:none}}
#coin-peek .cp-head{display:flex;align-items:baseline;gap:8px;padding:0 2px 6px}
#coin-peek .cp-sym{align-self:center;font-weight:700;font-size:12.5px;color:var(--ui-ticker);padding:3px 8px;border-radius:999px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line)}
#coin-peek .cp-price{font-weight:650;font-size:17px;letter-spacing:-.01em;color:var(--ui-strong)}
#coin-peek .cp-change{font-weight:650;font-size:12.5px;color:var(--ui-muted)}
#coin-peek .cp-caption{font-size:11px;color:var(--ui-faint)}
#coin-peek .up{color:#3fd393!important}#coin-peek .down{color:#ff6b7f!important}
#coin-peek .cp-open{margin-left:auto;align-self:center;height:24px;padding:0 9px;font-size:11px;font-weight:600;border-radius:7px;border:1px solid var(--ui-glass-line);background:transparent;color:var(--ui-muted);cursor:pointer}
#coin-peek .cp-open:hover{color:var(--ui-strong);background:var(--ui-hover)}
#coin-peek .cp-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;min-height:18px;padding:0 2px 6px;font-size:11px;color:var(--ui-muted)}
#coin-peek .cp-legend b{font-weight:600;color:var(--ui-text)}
#coin-peek .cp-legend .cp-t{color:var(--ui-faint)}
#coin-peek .cp-legend .cp-vs{padding:1px 6px;border-radius:5px;background:#ffffff0a;font-weight:600}
#coin-peek .cp-dim{color:var(--ui-faint)}
#coin-peek .cp-chart{height:176px;border-radius:10px;overflow:hidden;background:rgba(0,0,0,.18);cursor:crosshair}
#coin-peek.loading .cp-chart{background:linear-gradient(90deg,#ffffff04,#ffffff0b,#ffffff04);background-size:200% 100%;animation:peek-shimmer 1s linear infinite}
@keyframes peek-shimmer{to{background-position:-200% 0}}
#coin-peek .cp-stats{display:grid;grid-template-columns:1.3fr 1fr 1fr .7fr;gap:8px;padding:8px 2px 0}
#coin-peek .cp-stats div{display:flex;flex-direction:column;gap:1px;min-width:0}
#coin-peek .cp-stats small{font-size:10px;color:var(--ui-faint)}
#coin-peek .cp-stats b{font-size:12px;font-weight:600;color:var(--ui-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#coin-peek .cp-stats em{font-style:normal;font-size:10px;color:#c9a24d}

/* ---- Bloomberg retro ---- */
html[data-theme=bloomberg]{--accent:#fb8b1e;--ui-strong:#ffffff;--ui-muted:#c98a35;--ui-faint:#8a5c22;--ui-body:#d6d6d6;--ui-ticker:#ffd400;--ui-mention:#ffd400;--ui-up:#3ddc84;--ui-down:#ff4136;--ui-glass:transparent;--ui-glass-line:#5a4a1a;--ui-line-strong:#3a3a3a;--ui-hover:#1c1c1c;--ui-raise:#000;--font-ui:'JetBrains Mono',ui-monospace,monospace;--r-sm:0px;--r-md:0px;--r-lg:0px}
html[data-theme=bloomberg] body,html[data-theme=bloomberg] #workspace *{font-family:var(--font-ui)!important}
html[data-theme=bloomberg] #workspace .panel,html[data-theme=bloomberg] #workspace .workspace-panel{border-color:#2a2a2a!important;border-radius:0!important}
html[data-theme=bloomberg] #workspace .panel-head{background:#fb8b1e!important;border-bottom:0!important}
html[data-theme=bloomberg] #workspace .panel-head h2,html[data-theme=bloomberg] #workspace .panel-head button,html[data-theme=bloomberg] #workspace .panel-head .badge,html[data-theme=bloomberg] #workspace .positions-panel .panel-head *{color:#000!important;border-color:#00000040!important;font-weight:700!important}
html[data-theme=bloomberg] #workspace .position-tabs button.active{background:#000!important;color:#fb8b1e!important;box-shadow:none}
html[data-theme=bloomberg] #workspace .news-card,html[data-theme=bloomberg] #workspace .news-card.is-latest{background:#000!important;border:0!important;border-bottom:1px solid #222!important;border-left:2px solid transparent!important;border-radius:0!important;margin-bottom:0!important}
html[data-theme=bloomberg] #workspace .news-card.fresh-news{border-left-color:#fb8b1e!important;background:#120b00!important}
html[data-theme=bloomberg] #workspace .news-title{color:#ffb340!important}
html[data-theme=bloomberg] #workspace .news-card.has-headline>.news-content>.news-title{color:#fb8b1e!important}
html[data-theme=bloomberg] #workspace .news-source{color:#fff!important;text-transform:uppercase}
html[data-theme=bloomberg] #workspace .news-time{color:#ffd400!important}
html[data-theme=bloomberg] #workspace .news-trade-row .news-asset{border-radius:0!important;background:transparent!important;border:1px solid #ffd40066!important;box-shadow:none!important;-webkit-backdrop-filter:none;backdrop-filter:none}
html[data-theme=bloomberg] body #workspace .news-trade-row .quick-buttons button,html[data-theme=bloomberg] #chart-presets button{border-radius:0!important;background:#0c2a14!important;color:#3ddc84!important}
html[data-theme=bloomberg] body #workspace .news-trade-row .quick-buttons button[data-trade=SELL],html[data-theme=bloomberg] #chart-presets button[data-trade=SELL]{background:#2e0a07!important;color:#ff4136!important}
html[data-theme=bloomberg] .topbar nav .nav-active{background:#fb8b1e!important;color:#000!important}
html[data-theme=bloomberg] .topbar .brand,html[data-theme=bloomberg] .topbar nav button{color:#fb8b1e}
html[data-theme=bloomberg] #workspace .search-row{border-radius:0!important;border-color:#3a3a3a!important}
html[data-theme=bloomberg] :is(.chart-panel,.extra-chart) .market-stat small{color:#fb8b1e!important}

/* ---- Modern TUI (btop / lazygit feel, Tokyo Night palette) ---- */
html[data-theme=tui]{--accent:#8f9bb3;--ui-strong:#cdd1da;--ui-muted:#7f8491;--ui-faint:#565a66;--ui-body:#a6abb6;--ui-ticker:#b9a27a;--ui-mention:#a99cc0;--ui-up:#8fb57a;--ui-down:#cf7b88;--ui-glass:transparent;--ui-glass-line:#2c2e36;--ui-line-strong:#2c2e36;--ui-hover:#1b1c21;--ui-raise:transparent;--font-ui:'JetBrains Mono',ui-monospace,monospace;--r-sm:3px;--r-md:4px;--r-lg:6px}
html[data-theme=tui] body,html[data-theme=tui] #workspace *{font-family:var(--font-ui)!important}
html[data-theme=tui] #workspace .panel,html[data-theme=tui] #workspace .workspace-panel{border:1px solid #2c2e36!important;border-radius:6px!important;transition:border-color .15s}
html[data-theme=tui] #workspace .workspace-panel.active-chart{border-color:#8f9bb3!important}
html[data-theme=tui] #workspace .panel-head{border-bottom:1px dashed #25272e!important}
html[data-theme=tui] #workspace .panel-head h2{color:#8f9bb3!important;text-transform:lowercase;letter-spacing:0!important;font-weight:600!important}
html[data-theme=tui] #workspace .panel-head h2::before{content:'┤ ';color:#2c2e36}
html[data-theme=tui] #workspace .panel-head h2::after{content:' ├';color:#2c2e36}
html[data-theme=tui] #workspace .news-card,html[data-theme=tui] #workspace .news-card.is-latest{background:transparent!important;border:0!important;border-bottom:1px dashed #25272e!important;border-left:2px solid transparent!important;border-radius:0!important;margin-bottom:0!important}
html[data-theme=tui] #workspace .news-card:hover{background:#17181c!important}
html[data-theme=tui] #workspace .news-card.fresh-news{border-left-color:#8f9bb3!important}
html[data-theme=tui] #workspace .news-source{color:#9aa9bd!important}
html[data-theme=tui] #workspace .source-category{background:transparent!important;border:1px solid #2c2e36!important;color:#a99cc0!important}
html[data-theme=tui] #workspace .news-trade-row .news-asset{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;-webkit-backdrop-filter:none;backdrop-filter:none}
html[data-theme=tui] #workspace .news-trade-row .news-asset::before{content:'[';color:#565a66}
html[data-theme=tui] #workspace .news-trade-row .news-asset::after{content:']';color:#565a66}
html[data-theme=tui] #workspace .news-asset .coin-logo{display:none!important}
html[data-theme=tui] .topbar nav .nav-active{background:transparent!important;color:#8f9bb3!important;box-shadow:inset 0 -2px 0 #8f9bb3}
html[data-theme=tui] .topbar kbd{color:#b9a27a}
html[data-theme=tui] #workspace .search-row{border-style:dashed!important}
html[data-theme=tui] .position-tabs button.active{color:#8f9bb3!important;background:transparent!important;box-shadow:inset 0 -2px 0 #8f9bb3!important}

/* ================= v6 ================= */
/* Quick trade strip follows its checkbox; no "QUICK TRADE USDT" label. */
html body #chart-presets[hidden],html body .chart-presets[hidden]{display:none!important}
html body #chart-presets>span,html body .chart-presets>span{display:none!important}

/* Command suggestions */
html body #command-suggestions{padding:5px!important;border-radius:12px!important;border:1px solid var(--ui-line-strong)!important;background:color-mix(in srgb,var(--ui-panel) 94%,transparent)!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 18px 44px #000b!important;max-height:min(380px,50vh)!important}
html body #command-suggestions button{display:grid!important;grid-template-columns:minmax(0,1fr) auto 92px 64px;align-items:center;gap:10px;height:40px;padding:0 10px!important;border-radius:8px!important;font-size:12px}
html body #command-suggestions button.active{background:var(--ui-hover)!important;color:var(--ui-strong)!important}
html body #command-suggestions .cs-main{display:flex;flex-direction:column;min-width:0;line-height:1.2}
html body #command-suggestions .cs-main b{font-weight:700;color:var(--ui-ticker)}
html body #command-suggestions .cs-main small{font-size:10.5px;color:var(--ui-faint)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #command-suggestions .cs-cmd{font:500 11px var(--font-num);color:var(--ui-muted);padding:2px 7px;border-radius:6px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line)}
html body #command-suggestions button.active .cs-cmd{color:var(--ui-strong)}
html body #command-suggestions .cs-px{font:600 12px var(--font-num);text-align:right;color:var(--ui-text)!important}
html body #command-suggestions .cs-ch{font:600 11px var(--font-num);text-align:right}
html body #command-suggestions .cs-hint{padding:6px 10px 3px;font-size:10.5px;color:var(--ui-faint)}
html body #command-suggestions kbd,html body #command-peek kbd{font:600 9.5px var(--font-num);padding:1px 5px;border-radius:4px;border:1px solid var(--ui-line-strong);color:var(--ui-muted);margin:0}

/* Command preview card */
#command-peek{position:fixed;z-index:101;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--ui-panel) 94%,transparent);border:1px solid var(--ui-line-strong);box-shadow:0 18px 44px #000b;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);font-family:Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums;pointer-events:none}
#command-peek[hidden]{display:none}
#command-peek .cq-head{display:flex;align-items:baseline;gap:8px;min-width:0}
#command-peek .cq-sym{font-size:14px;font-weight:700;color:var(--ui-ticker)}
#command-peek .cq-name{font-size:11px;color:var(--ui-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
#command-peek .cq-px{font-size:15px;font-weight:650;color:var(--ui-strong)}
#command-peek .cq-ch{font-size:11.5px;font-weight:600;color:var(--ui-muted)}
#command-peek .up{color:#3fd393}#command-peek .down{color:#ff6b7f}
#command-peek .cq-chart{height:96px;margin:8px 0 6px;border-radius:8px;overflow:hidden;background:rgba(0,0,0,.18)}
#command-peek.loading .cq-chart{background:linear-gradient(90deg,#ffffff04,#ffffff0b,#ffffff04);background-size:200% 100%;animation:peek-shimmer 1s linear infinite}
#command-peek .cq-foot{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--ui-muted)}
#command-peek .cq-order b{font-weight:650}
#command-peek .cq-meta{color:var(--ui-faint)}

/* Chart right-click: limit order */
html body .chart-context-menu{width:236px!important;padding:8px!important;border-radius:12px!important;background:color-mix(in srgb,var(--ui-panel) 95%,transparent)!important;border:1px solid var(--ui-line-strong)!important;box-shadow:0 18px 44px #000c!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);gap:2px}
html body .chart-context-menu>b{font:600 12px var(--font-num)!important;color:var(--ui-strong)!important;padding:4px 6px 8px!important}
html body .chart-context-menu .ctx-limit{display:flex;flex-direction:column;gap:6px;padding:0 0 8px;margin-bottom:6px;border-bottom:1px solid var(--ui-line)}
html body .chart-context-menu .ctx-limit label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:var(--ui-muted);padding:0 2px}
html body .chart-context-menu .ctx-limit label span{position:relative;display:flex;align-items:center}
html body .chart-context-menu .ctx-limit input{width:120px;height:30px;padding:0 44px 0 8px;border-radius:7px;font:600 12px var(--font-num);background:var(--ui-input);border:1px solid var(--ui-line-strong);color:var(--ui-text)}
html body .chart-context-menu .ctx-limit input:focus{border-color:var(--ui-focus)}
html body .chart-context-menu .ctx-limit em{position:absolute;right:8px;font:600 10px var(--font-num);font-style:normal;color:var(--ui-faint);pointer-events:none}
html body .chart-context-menu .ctx-limit button{height:30px;margin:0!important;border-radius:7px!important;font:600 11.5px var(--font-num)!important;text-align:center!important;border:0!important}
html body .chart-context-menu .ctx-limit button.long{background:#2ebd8524!important;color:#4fd69c!important}
html body .chart-context-menu .ctx-limit button.short{background:#f6465d24!important;color:#ff7a8a!important}
html body .chart-context-menu .ctx-limit button:disabled{opacity:.35;cursor:not-allowed}
html body .chart-context-menu .ctx-limit small{font-size:11px;color:var(--ui-faint);padding:0 4px;line-height:1.45}
html body .chart-context-menu>button{border-radius:7px!important}

/* Calendar: upcoming FOMC decisions */
html body #fomc-future{grid-column:1/-1;display:flex;flex-direction:column;gap:10px;padding:16px!important}
html body #fomc-future .fomc-future-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
html body .fomc-future-item{display:flex;flex-direction:column;gap:9px;padding:12px;border-radius:12px;background:var(--ui-glass);border:1px solid var(--ui-glass-line)}
html body .fomc-future-item header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
html body .fomc-future-item header b{display:block;font-size:13px;color:var(--ui-strong)}
html body .fomc-future-item header small{font-size:10.5px;color:var(--ui-faint)}
html body .fomc-future-item .macro-countdown{font:600 11px var(--font-num);color:var(--ui-muted);white-space:nowrap}
html body .fomc-stack{display:flex;height:8px;border-radius:5px;overflow:hidden;background:#ffffff0a}
html body .fomc-stack i{display:block;height:100%}
html body .fomc-future-item ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
html body .fomc-future-item li{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:var(--ui-body)}
html body .fomc-future-item li span{display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .fomc-future-item li span::before{content:'';width:8px;height:8px;border-radius:2px;background:var(--tone);flex-shrink:0}
html body .fomc-future-item li b{font:600 11.5px var(--font-num);color:var(--ui-text)}
html body .fomc-future-item footer{display:flex;justify-content:space-between;font-size:10.5px;color:var(--ui-faint)}
html body .fomc-future-item footer a{color:var(--ui-muted)}
html body #fomc-future>small{font-size:10.5px;color:var(--ui-faint)}

/* ================= v6.1 media: one standard size per card ================= */
html body #workspace .news-media{display:flex!important;flex-wrap:wrap;gap:6px;margin-top:8px;align-items:flex-start}
html body #workspace .news-photo:not(.expanded-photo){width:176px!important;height:104px!important;max-width:176px!important;max-height:104px!important;padding:0!important;border-radius:8px!important;overflow:hidden;border:1px solid var(--ui-glass-line)!important;background:#000!important;flex:0 0 auto}
html body #workspace .news-photo:not(.expanded-photo) img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;transition:transform .25s var(--ease)}
html body #workspace .news-photo:not(.expanded-photo):hover img{transform:scale(1.04)}
html body #workspace video.news-video{display:block;width:240px!important;max-width:100%!important;height:auto!important;aspect-ratio:16/9;max-height:135px!important;object-fit:cover;background:#000;border-radius:8px;border:1px solid var(--ui-glass-line);transition:width .25s var(--ease),max-height .25s var(--ease)}
html body #workspace video.news-video.is-playing{width:100%!important;max-height:60vh!important;object-fit:contain}
html body #workspace .news-embedded .news-photo:not(.expanded-photo){width:132px!important;height:78px!important;max-width:132px!important;max-height:78px!important}
html body #workspace .news-embedded video.news-video:not(.is-playing){width:180px!important;max-height:101px!important}
html body #workspace .news-card button.asset-mention{padding:0 4px!important;margin:0!important}
@media(max-width:740px){html body #workspace .news-photo:not(.expanded-photo){width:132px!important;height:84px!important;max-width:132px!important;max-height:84px!important}html body #workspace video.news-video:not(.is-playing){width:200px!important;max-height:113px!important}}

/* ================= Market picker ================= */
html body .markets-panel{border-radius:14px!important;border:1px solid var(--ui-line-strong)!important;background:color-mix(in srgb,var(--ui-panel) 97%,transparent)!important;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:0 22px 60px #000d!important;overflow:hidden;z-index:60!important}
html body .markets-panel .search-row{padding:8px 10px!important;gap:8px}
html body .markets-panel #symbol-search{height:34px;font-size:13px}
html body .markets-panel #symbol-search::-webkit-search-cancel-button{-webkit-appearance:none}
html body #market-list{flex:1 1 0;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;padding:2px 6px 6px;-webkit-overflow-scrolling:touch}
html body .market-table-head{grid-template-columns:minmax(0,1fr) 104px 74px!important;padding:6px 16px 6px 44px!important}
html body .market-row{display:grid!important;grid-template-columns:22px minmax(0,1fr) 104px 74px!important;align-items:center;gap:10px!important;height:38px;padding:0 10px!important;border:0!important;border-radius:8px!important;text-align:right;cursor:pointer;content-visibility:auto;contain-intrinsic-size:auto 38px}
html body .market-row .coin-logo{width:22px;height:22px;border-radius:50%;object-fit:cover}
html body .market-row .coin-fallback{display:grid;place-items:center;font-size:10px;font-weight:700;background:var(--ui-glass);color:var(--ui-muted)}
html body .market-row .mr-name{display:flex;flex-direction:column;align-items:flex-start;min-width:0;line-height:1.2;text-align:left}
html body .market-row .mr-name b{font-size:12.5px;font-weight:700;color:var(--ui-strong)}
html body .market-row .mr-name small{max-width:100%;font-size:10.5px;color:var(--ui-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .market-row .mr-px{font:600 12px var(--font-num);color:var(--ui-text)}
html body .market-row .mr-ch{font:600 11.5px var(--font-num)}
html body .market-row.cursor{background:var(--ui-hover)!important;box-shadow:inset 0 0 0 1px var(--ui-line-strong)}
html body .market-row.active{background:color-mix(in srgb,var(--ui-accent,#4c8dff) 14%,transparent)!important}
html body .market-row.active .mr-name b{color:var(--ui-ticker)}
html body .market-empty{margin:24px 0;text-align:center;font-size:12px;color:var(--ui-faint)}
@media(max-width:740px){html body .market-row{grid-template-columns:22px minmax(0,1fr) 92px 66px!important;height:44px}html body .market-table-head{grid-template-columns:minmax(0,1fr) 92px 66px!important}}

/* ================= News Wire panel ================= */
.wire-panel{display:flex;flex-direction:column}
html body .wire-panel .panel-head{height:38px}
html body .wire-panel .search-row{margin:6px 10px!important;height:38px}
html body .wire-panel .search-row input{flex:1;min-width:0}
html body .wire-panel h2,html body.feed-split .feed-panel h2{letter-spacing:.06em}

/* ================= Journal ================= */
html body #journal-view{max-width:1320px;padding:22px 24px 40px}
html body .jr-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}
html body .jr-head h1{margin:0 0 3px;font-size:20px;font-weight:700;color:var(--ui-strong);letter-spacing:-.01em}
html body #journal-day{font-size:11.5px;color:var(--ui-faint)}
html body .jr-tabs{display:flex;gap:4px;padding:3px;border-radius:10px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line)}
html body .jr-tabs button{display:flex;align-items:center;gap:7px;height:30px;padding:0 12px;border:0;border-radius:7px;background:none;font-size:12.5px;font-weight:600;color:var(--ui-muted);cursor:pointer}
html body .jr-tabs button.active{background:var(--ui-hover);color:var(--ui-strong)}
html body .jr-tabs .badge{font-size:10px;padding:1px 6px}
html body .jr-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
html body .jr-seg{display:flex;gap:2px;padding:2px;border-radius:8px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line)}
html body .jr-seg[hidden]{display:none}
html body .jr-seg button{height:26px;padding:0 10px;border:0;border-radius:6px;background:none;font-size:11.5px;font-weight:600;color:var(--ui-muted);cursor:pointer}
html body .jr-seg button.active{background:var(--ui-hover);color:var(--ui-strong)}
html body .jr-search{display:flex;align-items:center;gap:6px;flex:1;min-width:200px;max-width:380px;height:30px;padding:0 10px;margin-left:auto;border-radius:8px;background:var(--ui-input);border:1px solid var(--ui-line)}
html body .jr-search span{color:var(--ui-faint);font-size:12px}
html body .jr-search input{flex:1;min-width:0;height:100%;border:0!important;background:none!important;font-size:12px;padding:0!important;box-shadow:none!important}
html body .jr-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:1px;margin-bottom:16px;border-radius:12px;overflow:hidden;background:var(--ui-line);border:1px solid var(--ui-line)}
html body .jr-stats:empty{display:none}
html body .jr-stats>div{display:flex;flex-direction:column;gap:4px;padding:10px 14px;background:var(--ui-panel);min-width:0}
html body .jr-stats small{font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint)}
html body .jr-stats b{font:650 15px var(--font-num);color:var(--ui-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .jr-stats b em{font-style:normal;font-size:11px;color:var(--ui-faint);margin-right:4px}
html body #journal-view .up{color:#3fd393!important}html body #journal-view .down{color:#ff6b7f!important}
html body .jr-day{display:flex;align-items:baseline;gap:8px;margin:18px 2px 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-muted)}
html body .jr-day span{font-weight:500;letter-spacing:0;text-transform:none;color:var(--ui-faint)}
html body .jr-row{display:grid;grid-template-columns:170px 74px minmax(0,1fr) auto;align-items:start;gap:16px;padding:12px 14px;margin-bottom:6px;border-radius:12px;background:var(--ui-panel);border:1px solid var(--ui-line);transition:border-color .15s}
html body .jr-row:hover{border-color:var(--ui-line-strong)}
html body .jr-asset{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
html body .jr-coin{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 10px 0 4px;border:0;border-radius:999px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line);cursor:pointer;font-size:12.5px}
html body .jr-coin b{font-weight:700;color:var(--ui-ticker)}
html body .jr-coin .coin-logo{width:20px;height:20px}
html body .jr-coin:hover{box-shadow:inset 0 0 0 1px var(--ui-line-strong);background:var(--ui-hover)}
html body .jr-move{font:650 22px var(--font-num);letter-spacing:-.01em}
html body .jr-react{display:flex;flex-direction:column;gap:2px;padding-top:4px}
html body .jr-react b{font:650 14px var(--font-num);color:var(--ui-strong)}
html body .jr-react small{font-size:10.5px;color:var(--ui-faint)}
html body .jr-main{min-width:0}
html body .jr-main header{display:flex;justify-content:space-between;gap:12px;margin-bottom:4px;font-size:11px}
html body .jr-src{font-weight:650;color:var(--ui-muted)}
html body .jr-main time,html body .jr-auto time{font:500 11px var(--font-num);color:var(--ui-faint);white-space:nowrap}
html body .jr-title{margin:0;font-size:13.5px;line-height:1.5;color:var(--ui-text);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
html body .jr-row:hover .jr-title{-webkit-line-clamp:unset}
html body .jr-more{margin-top:6px;font-size:11.5px;color:var(--ui-muted)}
html body .jr-more summary{cursor:pointer;color:var(--ui-faint);list-style:none}
html body .jr-more summary::-webkit-details-marker{display:none}
html body .jr-more summary::before{content:'▸ '}html body .jr-more[open] summary::before{content:'▾ '}
html body .jr-more>div{display:grid;grid-template-columns:auto auto 1fr auto;gap:4px 10px;align-items:baseline;padding:6px 0 0 12px}
html body .jr-more>div p{margin:0;font-size:12px;color:var(--ui-body);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .jr-more a,html body .jr-actions a{color:var(--ui-muted);font-size:12px}
html body .jr-actions{display:flex;align-items:center;gap:6px}
html body .jr-actions button{height:26px;padding:0 10px;border-radius:7px;font-size:11.5px;font-weight:600;background:var(--ui-glass);border:0;box-shadow:inset 0 0 0 1px var(--ui-glass-line);color:var(--ui-muted);cursor:pointer}
html body .jr-actions button:hover{color:var(--ui-strong)}
html body .jr-actions a{display:grid;place-items:center;width:26px;height:26px;border-radius:7px;background:var(--ui-glass)}
html body #journal-more{display:block;margin:14px auto 0;height:32px;padding:0 16px;border-radius:8px;font-size:12px}
html body .jr-loading{padding:30px;text-align:center;color:var(--ui-faint);font-size:12px}
/* Automation log */
html body .jr-auto-head,html body .jr-auto summary{display:grid;grid-template-columns:70px 84px 120px 52px minmax(0,1fr) 92px 92px 86px 70px;align-items:center;gap:10px}
html body .jr-auto-head{padding:0 14px 6px;font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint)}
html body .jr-auto-head span:nth-child(n+6){text-align:right}
html body .jr-auto{margin-bottom:4px;border-radius:10px;background:var(--ui-panel);border:1px solid var(--ui-line)}
html body .jr-auto[open]{border-color:var(--ui-line-strong)}
html body .jr-auto summary{min-height:44px;padding:6px 14px;cursor:pointer;list-style:none;font-size:12px}
html body .jr-auto summary::-webkit-details-marker{display:none}
html body .jr-auto.status-skipped summary{min-height:34px;opacity:.72}
html body .jr-status{justify-self:start;padding:2px 8px;border-radius:999px;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;background:var(--ui-glass);color:var(--ui-muted)}
html body .jr-status.s-filled{background:#2ebd8522;color:#4fd69c}
html body .jr-status.s-rejected{background:#f6465d22;color:#ff7a8a}
html body .jr-status.s-attention,html body .jr-status.s-unknown{background:#e8b54a22;color:#f0c35c}
html body .jr-side{font-size:11px;font-weight:700}
html body .jr-rule{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ui-text)}
html body .jr-num{text-align:right;font:600 12px var(--font-num);color:var(--ui-text)}
html body .jr-dim{color:var(--ui-faint)!important;font-weight:500}
html body .jr-nocoin{color:var(--ui-faint)}
html body .jr-auto .jr-coin{height:26px;justify-self:start}
html body .jr-auto-body{padding:4px 14px 14px;border-top:1px solid var(--ui-line);font-size:12px;color:var(--ui-body)}
html body .jr-reason{margin:10px 0 6px;color:var(--ui-text)}
html body .jr-auto-body a{color:var(--ui-muted)}
html body .jr-auto-body dl{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px 18px;margin:10px 0}
html body .jr-auto-body dl dt{font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint)}
html body .jr-auto-body dl>div{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .jr-auto-body dl dd{margin:0;font:500 12px var(--font-num);color:var(--ui-text)}
html body .jr-auto-body button{height:28px;padding:0 12px;border-radius:7px;font-size:11.5px}
@media(max-width:900px){html body .jr-auto-head{display:none}html body .jr-auto summary{grid-template-columns:auto auto 1fr auto;row-gap:4px}html body .jr-auto summary .jr-rule{grid-column:1/-1;order:9}html body .jr-auto summary .jr-num:not(.up):not(.down){display:none}}
@media(max-width:740px){html body #journal-view{padding:12px}html body .jr-row{grid-template-columns:auto 1fr;gap:8px 12px}html body .jr-asset{flex-direction:row;align-items:center}html body .jr-react{flex-direction:row;align-items:baseline;gap:6px;padding:0;justify-self:end}html body .jr-main{grid-column:1/-1}html body .jr-actions{grid-column:1/-1}html body .jr-move{font-size:18px}html body .jr-search{max-width:none;margin-left:0}html body .jr-main header{flex-wrap:wrap}}

/* ================= v9 ================= */
/* Resize grip: a small, quiet corner mark instead of the thick legacy L */
html body .grid-stack-item>.ui-resizable-se,html body.layout-editing .grid-stack-item>.ui-resizable-se{border:0!important;width:12px!important;height:12px!important;right:1px!important;bottom:1px!important}
html body .grid-stack-item>.ui-resizable-se::after{right:3px!important;bottom:3px!important;width:5px!important;height:5px!important;border-right:1px solid currentColor!important;border-bottom:1px solid currentColor!important;border-bottom-right-radius:1.5px;color:var(--ui-faint);opacity:.28!important;transition:opacity .15s,color .15s}
html body .grid-stack-item:hover>.ui-resizable-se::after{opacity:.6!important}
html body .grid-stack-item>.ui-resizable-se:hover::after{opacity:1!important;color:var(--ui-strong)}

/* Command line fits even a 2-row grid item */
html body #workspace [data-widget-id=command] .workspace-panel{display:flex!important;flex-direction:column;overflow:hidden}
html body #workspace [data-widget-id=command] #command-form{flex:1 1 auto;min-height:0!important;height:auto!important;padding-top:0!important;padding-bottom:0!important;align-items:center}
html body #workspace [data-widget-id=command] #command-form>*{max-height:calc(100% - 4px)}
html body #workspace [data-widget-id=command] #command-input{height:min(30px,calc(100% - 6px))!important;min-height:0!important}

/* Long / short buttons: size is a setting, background stays light */
html{--qt-h:26px;--qt-fs:11.5px}
html[data-trade-size=compact]{--qt-h:21px;--qt-fs:10.5px}
html[data-trade-size=large]{--qt-h:32px;--qt-fs:12.5px}
html body #workspace .news-trade-row .quick-buttons button,html body #chart-presets button{height:var(--qt-h)!important;min-height:var(--qt-h)!important;font-size:var(--qt-fs)!important;border-radius:5px!important;background:#2ebd8512!important;box-shadow:inset 0 0 0 1px #2ebd8522!important;color:#43cf90!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL],html body #chart-presets button[data-trade=SELL]{background:#f6465d12!important;box-shadow:inset 0 0 0 1px #f6465d22!important;color:#f26b80!important}
html body #workspace .news-trade-row .quick-buttons button:not(:disabled):hover,html body #chart-presets button:not(:disabled):hover{background:#2ebd852e!important;box-shadow:inset 0 0 0 1px #2ebd8580!important;color:#7be3b6!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body #chart-presets button[data-trade=SELL]:not(:disabled):hover{background:#f6465d2e!important;box-shadow:inset 0 0 0 1px #f6465d80!important;color:#ff96a3!important}
html body #workspace .news-trade-row{min-height:calc(var(--qt-h) + 4px)}

/* New card: a soft light for its first 10 seconds */
html body #workspace .news-card{transition:box-shadow .8s ease,border-color .8s ease,background-color .8s ease}
html body #workspace .news-card.fresh-news{border-color:color-mix(in srgb,var(--ui-accent,#4c8dff) 38%,var(--ui-line))!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--ui-accent,#4c8dff) 16%,transparent),0 0 18px color-mix(in srgb,var(--ui-accent,#4c8dff) 10%,transparent)!important}
html body #workspace .news-card.fresh-news .news-led{background:var(--ui-accent,#4c8dff)!important;box-shadow:0 0 6px var(--ui-accent,#4c8dff)!important}

/* Surge: +1% within a minute of the news, held for 5 minutes */
html body #workspace .news-card.surge{border-color:#2ebd85a6!important;background:linear-gradient(100deg,#2ebd8526,#2ebd850a 55%,transparent),var(--ui-panel)!important;box-shadow:0 0 0 1px #2ebd8559,0 0 22px #2ebd8538,inset 3px 0 0 #3fd393!important}
html body #workspace .news-card.surge .news-led{background:#5cf0a8!important;box-shadow:0 0 6px #5cf0a8,0 0 16px #3fd393!important;animation:surge-led 1.2s ease-in-out infinite}
@keyframes surge-led{50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){html body #workspace .news-card.surge .news-led{animation:none}}

/* Role gate */
html body .role-gate{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:380px;margin:18px auto 0;text-align:center}
html body .role-gate .role-avatar{width:56px;height:56px;border-radius:50%;box-shadow:0 0 0 2px var(--ui-line-strong)}
html body .role-gate h2{margin:0;font-size:18px;color:var(--ui-strong)}
html body .role-gate p{margin:0;font-size:13px;line-height:1.5;color:var(--ui-body)}
html body .role-gate ol{margin:0;padding:12px 16px 12px 34px;text-align:left;font-size:12.5px;line-height:1.8;color:var(--ui-text);border-radius:10px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line);align-self:stretch}
html body .role-gate .discord-button{align-self:stretch;justify-content:center}
html body .role-gate .role-recheck{align-self:stretch;height:38px;border-radius:9px;font-weight:650;font-size:13px}
html body .role-gate .role-logout{background:none!important;border:0!important;color:var(--ui-faint);font-size:12px;cursor:pointer}
html body .role-gate #login-message{min-height:18px;font-size:12px;color:var(--ui-muted)}
html body .role-gate small{font-size:11px;color:var(--ui-faint)}

/* ================= v11 ================= */
/* News-card trade buttons: wide like the chart strip (narrower coin column, buttons take the rest) */
html body #workspace .news-trade-row{grid-template-columns:minmax(0,138px) minmax(0,1fr)!important;column-gap:10px!important}
html body #workspace .news-trade-row .news-asset{max-width:138px;overflow:hidden}
html body #workspace .news-trade-row .news-asset .price-move{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #workspace .news-trade-row .quick-buttons{display:flex!important;gap:4px!important;width:100%}
html body #workspace .news-trade-row .quick-buttons button{flex:1 1 0!important;min-width:0!important}
html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL]:first-of-type,html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY]+button[data-trade=SELL]{margin-left:8px}
@container(max-width:560px){html body #workspace .news-trade-row{grid-template-columns:1fr!important}}

/* Positions: account figures in a light glass box, no duplicate clock */
html body .positions-panel #account-updated{display:none!important}
html body .positions-panel .position-summary{padding:5px 12px!important;border-radius:8px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line);gap:4px 14px!important;align-items:center}

/* Positions header wraps onto its own line instead of overlapping the tab content */
html body .positions-panel>.panel-head{height:auto!important;min-height:38px;flex-wrap:wrap!important;row-gap:6px;padding-top:4px!important;padding-bottom:6px!important}
html body .positions-panel .position-summary{margin-left:auto}
/* Order history toolbar */
html body .history-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:10px 12px 8px}
html body .history-bar b{font-size:12px;color:var(--ui-strong)}
html body .history-bar button{height:26px;padding:0 10px;border-radius:7px;font-size:11.5px}
html body .history-bar small{flex:1 1 220px;min-width:0;font-size:11px;color:var(--ui-faint)}
html body .history-loading{padding:16px 12px;color:var(--ui-faint);font-size:12px}

/* FOMC: meeting tabs, legend, change column, clickable future cards */
html body .fomc-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0 10px}
html body .fomc-tabs button{height:26px;padding:0 10px;border-radius:7px;font-size:11.5px;font-weight:600;background:var(--ui-glass)!important;border:0!important;box-shadow:inset 0 0 0 1px var(--ui-glass-line);color:var(--ui-muted)}
html body .fomc-tabs button.active{background:var(--ui-hover)!important;color:var(--ui-strong);box-shadow:inset 0 0 0 1px var(--ui-line-strong)}
html body .fomc-tabs em{font-style:normal;font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint);margin-left:3px}
html body .fomc-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;min-height:22px;margin-top:8px;font-size:11px;color:var(--ui-muted)}
html body .fomc-legend .fl-time{font:600 11px var(--font-num);color:var(--ui-faint)}
html body .fomc-legend .fl-item{display:inline-flex;align-items:center;gap:5px}
html body .fomc-legend .fl-item i{width:8px;height:8px;border-radius:2px;background:var(--c)}
html body .fomc-legend .fl-item b{font:650 11.5px var(--font-num);color:var(--ui-strong)}
html body .fomc-legend .fl-event{padding:1px 7px;border-radius:999px;background:#e8b54a1f;color:#f0c35c;font-weight:600}
html body #fomc-expectations .probability-row{grid-template-columns:minmax(0,1fr) auto auto!important;align-items:baseline}
html body #fomc-expectations .probability-row i{grid-column:1/-1!important}
html body .fomc-delta{font:600 11px var(--font-num);font-style:normal;color:var(--ui-faint)}
html body .fomc-delta.up{color:#3fd393}html body .fomc-delta.down{color:#ff6b7f}
html body .fomc-loading{padding:40px 0;text-align:center;color:var(--ui-faint);font-size:12px}
html body .fomc-future-item[data-fomc-meeting]{cursor:pointer;transition:box-shadow .15s,background .15s}
html body .fomc-future-item[data-fomc-meeting]:hover{box-shadow:inset 0 0 0 1px var(--ui-line-strong)}
html body .fomc-future-item.active{box-shadow:inset 0 0 0 1px var(--ui-accent,#4c8dff)!important;background:color-mix(in srgb,var(--ui-accent,#4c8dff) 8%,var(--ui-glass))!important}

/* ================= FOMC chart v2 ================= */
html body #fomc-history{position:relative;height:340px!important;margin:6px 0 4px!important;border-radius:10px;background:linear-gradient(180deg,rgba(255,255,255,.018),transparent 70%)}
html body .fomc-overlay{position:absolute;inset:0 60px 26px 0;pointer-events:none;z-index:3;overflow:hidden}
html body .fo-line{position:absolute;top:0;bottom:0;width:0;border-left:1px dashed rgba(232,181,74,.42)}
html body .fo-line.fomc{border-left-color:rgba(130,174,240,.6)}
html body .fo-line span{position:absolute;top:2px;left:3px;max-width:120px;padding:1px 6px;border-radius:5px;background:rgba(18,20,24,.88);box-shadow:inset 0 0 0 1px rgba(232,181,74,.35);font:600 9.5px var(--font-ui,Inter),sans-serif;color:#f0c35c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:auto;cursor:help}
html body .fo-line.fomc span{color:#9cc0f5;box-shadow:inset 0 0 0 1px rgba(130,174,240,.4)}
html body .fomc-legend .fl-item{border:0;background:none;padding:2px 6px;border-radius:6px;cursor:pointer;color:var(--ui-muted);font-size:11px}
html body .fomc-legend .fl-item:hover{background:var(--ui-hover)}
html body .fomc-legend .fl-item.off{opacity:.38}
html body .fomc-legend .fl-item.off b{text-decoration:line-through}
html body .fomc-insights{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin:12px 0 4px}
html body .fomc-insights h4{margin:0 0 6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-faint)}
html body .fi-move{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto;gap:1px 10px;width:100%;padding:6px 8px;margin-bottom:3px;border:0;border-radius:8px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line);text-align:left;cursor:pointer;font-size:11.5px;color:var(--ui-text)}
html body .fi-move:hover{box-shadow:inset 0 0 0 1px var(--ui-line-strong)}
html body .fi-move time{font:600 11px var(--font-num);color:var(--ui-faint)}
html body .fi-move span{display:flex;align-items:center;gap:5px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .fi-move span i{width:8px;height:8px;border-radius:2px;background:var(--c);flex:none}
html body .fi-move b{font:650 12px var(--font-num)}
html body .fi-move em{grid-column:1/-1;font-style:normal;font-size:10.5px;color:var(--ui-muted)}
html body .fi-ahead{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1px 10px;padding:6px 8px;margin-bottom:3px;border-radius:8px;background:var(--ui-glass);font-size:11.5px}
html body .fi-ahead time{font:600 11px var(--font-num);color:#f0c35c}
html body .fi-ahead em{grid-column:1/-1;font-style:normal;font-size:10.5px;color:var(--ui-faint)}
html body .up{color:#3fd393}html body .down{color:#ff6b7f}

/* ================= Wallets page ================= */
html body #wallets-view{max-width:1480px;margin:auto;padding:22px 24px 40px}
html body .w-conn{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--ui-muted)}
html body .w-add{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
html body .w-add input{height:30px;padding:0 10px;border-radius:8px;font-size:12px;background:var(--ui-input);border:1px solid var(--ui-line)}
html body .w-add input#wallet-add-address{width:300px;font-family:var(--font-num)}
html body .w-add input#wallet-add-label{width:130px}
html body .w-add button{height:30px;padding:0 14px;border-radius:8px;font-size:12px;font-weight:650}
html body .w-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
html body .w-table{border-radius:12px;border:1px solid var(--ui-line);background:var(--ui-panel);overflow:hidden}
html body .w-row{display:grid;grid-template-columns:minmax(150px,1.3fr) 104px 104px 110px 96px minmax(130px,1fr) minmax(110px,1fr) 26px;align-items:center;gap:12px;min-height:52px;padding:6px 14px;border-top:1px solid var(--ui-line);cursor:pointer;transition:background .12s}
html body .w-row:first-child{border-top:0}
html body .w-row:not(.w-head):hover{background:var(--ui-hover)}
html body .w-row.open{background:color-mix(in srgb,var(--ui-accent,#4c8dff) 8%,transparent);box-shadow:inset 3px 0 0 var(--ui-accent,#4c8dff)}
html body .w-head{min-height:34px;cursor:default;font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint)}
html body .w-head button{border:0;background:none;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;cursor:pointer}
html body .w-head button.active{color:var(--ui-strong)}
html body .w-row .r{text-align:right;justify-self:end}
html body .w-id{display:flex;flex-direction:column;min-width:0}
html body .w-id b{font-size:13px;font-weight:650;color:var(--ui-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .w-id small{font:500 10.5px var(--font-num);color:var(--ui-faint)}
html body .w-num{font:600 12.5px var(--font-num);color:var(--ui-text)}
html body .w-num.up{color:#3fd393}html body .w-num.down{color:#ff6b7f}
html body .w-spark{width:100%;height:28px;display:block;color:var(--ui-muted)}
html body .w-spark.up{color:#3fd393}html body .w-spark.down{color:#ff6b7f}
html body .w-spark-empty{color:var(--ui-faint)}
html body .w-expo{display:flex;flex-direction:column;gap:4px;min-width:0}
html body .w-bar{display:block;height:6px;border-radius:3px;background:#ff6b7f;overflow:hidden}
html body .w-bar i{display:block;height:100%;background:#3fd393}
html body .w-expo small{font:500 10.5px var(--font-num);color:var(--ui-muted)}
html body .w-pos{display:flex;flex-wrap:wrap;gap:3px}
html body .w-pos em{font-style:normal;font:650 10.5px var(--font-num);padding:1px 6px;border-radius:5px;background:var(--ui-glass)}
html body .w-pos em.up{background:#2ebd851c}html body .w-pos em.down{background:#f6465d1c}
html body .w-remove{width:24px;height:24px;border:0;border-radius:6px;background:none;color:var(--ui-faint);font-size:16px;line-height:1;cursor:pointer;opacity:0;transition:opacity .12s}
html body .w-row:hover .w-remove{opacity:1}
html body .w-remove:hover{background:#f6465d22;color:#ff7a8a}
html body .w-err .w-errmsg{grid-column:2/-2;font-size:11.5px;color:#ff7a8a}
html body .w-empty{padding:40px 24px;text-align:center;border-radius:12px;border:1px dashed var(--ui-line-strong);color:var(--ui-muted)}
html body .w-empty b{display:block;margin-bottom:6px;font-size:14px;color:var(--ui-strong)}
html body .w-empty p{margin:0 auto;max-width:440px;font-size:12.5px;line-height:1.5}
html body .w-coin{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px 0 3px;border:0;border-radius:999px;background:var(--ui-glass);box-shadow:inset 0 0 0 1px var(--ui-glass-line);font-size:12px;cursor:pointer;justify-self:start}
html body .w-coin.static{padding:0 8px;cursor:default}
html body .w-coin b{color:var(--ui-ticker);font-weight:700}
html body .w-coin .coin-logo{width:18px;height:18px}
html body .w-activity{position:sticky;top:12px;max-height:calc(100dvh - 120px);overflow:auto;border-radius:12px;border:1px solid var(--ui-line);background:var(--ui-panel);padding:10px 12px}
html body .w-activity h3{margin:2px 0 8px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-faint)}
html body .w-ev{padding:7px 0;border-top:1px solid var(--ui-line);font-size:11.5px}
html body .w-ev:first-child{border-top:0}
html body .w-ev>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body .w-ev>div:first-child{justify-content:space-between;margin-bottom:4px}
html body .w-ev b{font-weight:650;color:var(--ui-strong)}
html body .w-ev time{font:500 10.5px var(--font-num);color:var(--ui-faint)}
html body .w-ev-empty{font-size:11.5px;line-height:1.5}
html body .wd{margin-top:14px;padding:16px;border-radius:12px;border:1px solid var(--ui-line-strong);background:var(--ui-panel)}
html body .wd-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}
html body .wd-head h2{margin:0 0 2px;font-size:17px;color:var(--ui-strong)}
html body .wd-head a{font:500 11px var(--font-num);color:var(--ui-muted)}
html body .wd-close{width:28px;height:28px;border-radius:7px;font-size:16px}
html body .wd-stats{margin-bottom:14px}
html body .wd-chart-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
html body .wd-chart{height:260px;margin-bottom:12px}
html body .wd-title{display:flex;align-items:center;gap:8px;margin:16px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-muted)}
html body .wd-title span{font-weight:600;color:var(--ui-faint)}
html body .wd-table{border-radius:10px;border:1px solid var(--ui-line);overflow:auto}
html body .wd-tr{display:grid;grid-template-columns:110px 60px repeat(8,minmax(78px,1fr));align-items:center;gap:10px;min-height:38px;padding:4px 12px;border-top:1px solid var(--ui-line);font-size:12px;min-width:860px}
html body .wd-fills .wd-tr{grid-template-columns:150px 110px minmax(100px,1fr) repeat(4,minmax(84px,1fr))}
html body .wd-tr:first-child{border-top:0}
html body .wd-th{min-height:30px;font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint)}
html body .wd-tr .r{text-align:right}
html body .wd-tr small{font-size:10.5px;color:var(--ui-faint)}
html body .wd-tr time{font:500 11px var(--font-num);color:var(--ui-muted)}
html body .w-side{font-size:11px;font-weight:700}
html body .wd-none{padding:6px 2px;font-size:12px}
@media(max-width:1100px){html body .w-layout{grid-template-columns:1fr}html body .w-activity{position:static;max-height:360px}}
@media(max-width:900px){html body .w-row{grid-template-columns:minmax(0,1fr) auto auto;row-gap:4px}html body .w-head{display:none}html body .w-row .w-trend,html body .w-row>span:nth-child(5),html body .w-pos{display:none}html body .w-expo{grid-column:1/-1}html body .w-remove{opacity:1}}
@media(max-width:740px){html body #wallets-view{padding:12px;height:calc(100dvh - 115px);overflow:auto}html body .w-add{margin-left:0;width:100%}html body .w-add input#wallet-add-address{flex:1 1 100%;width:auto}html body .w-add input#wallet-add-label{flex:1}html body #fomc-history{height:260px!important}}


/* Calendar: upcoming FOMC meetings fill the left column under the countdown */
@media(min-width:1000px){
html body .macro-overview{grid-template-columns:minmax(300px,1fr) minmax(480px,2fr)!important;grid-template-rows:auto 1fr;align-items:start}
html body .macro-overview>#fomc-overview{grid-column:1;grid-row:1}
html body .macro-overview>#fomc-future{grid-column:1!important;grid-row:2;align-self:stretch}
html body .macro-overview>#fomc-expectations{grid-column:2;grid-row:1/span 2}
html body #fomc-overview .fomc-dates{display:none}
html body #fomc-future .fomc-future-list{grid-template-columns:1fr!important;gap:8px}
html body #fomc-future .fomc-future-item{padding:10px 12px;gap:7px}
}

/* Momentum alerts: up stays green, sharp drops are red */
html body #workspace .news-card.momentum-card.alert-down{border-color:#f6465d8c!important;background:linear-gradient(100deg,#f6465d24,#f6465d08 55%,transparent),var(--ui-panel)!important;box-shadow:0 0 0 1px #f6465d4d,0 0 20px #f6465d2e,inset 3px 0 0 #ff6b7f!important}
html body #workspace .news-card.momentum-card.alert-down .news-time b{color:#ff8a98!important;border-color:#f6465d66!important}
html body #workspace .news-card.momentum-card.alert-down .news-led{background:#ff6b7f!important;box-shadow:0 0 6px #ff6b7f!important}

/* Journal · Earnings dry run */
html body .er-src-table{border-radius:10px;border:1px solid var(--ui-line);background:var(--ui-panel);overflow:hidden;margin-bottom:6px}
html body .er-src{display:grid;grid-template-columns:minmax(0,1fr) 80px 70px 190px;gap:10px;padding:7px 14px;border-top:1px solid var(--ui-line);font-size:12px;color:var(--ui-text)}
html body .er-src:first-child{border-top:0}
html body .er-src span:not(:first-child){text-align:right;font:600 12px var(--font-num)}
html body .er-src-head{font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-faint)}
html body .er-src-head span:not(:first-child){font:inherit}
html body .er-row{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:16px;align-items:start;padding:12px 14px;margin-bottom:6px;border-radius:12px;background:var(--ui-panel);border:1px solid var(--ui-line)}
html body .er-row.signal{border-color:var(--ui-line-strong)}
html body .er-left{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
html body .er-side{font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--ui-glass);color:var(--ui-muted)}
html body .er-side.up{background:#2ebd8522;color:#4fd69c}html body .er-side.down{background:#f6465d22;color:#ff7a8a}html body .er-side.warn{background:#e8b54a22;color:#f0c35c}
html body .er-main{min-width:0}
html body .er-main header{display:flex;align-items:center;gap:8px;margin-bottom:4px;font-size:11px}
html body .er-main header time{margin-left:auto}
html body .er-rank{font:600 10.5px var(--font-num);padding:1px 6px;border-radius:5px;background:var(--ui-glass);color:var(--ui-muted)}
html body .er-rank.first{background:#2ebd8522;color:#4fd69c}
html body .er-figs{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:6px;font:500 12px var(--font-num);color:var(--ui-text)}
html body .er-fig b{font-family:var(--font-ui,Inter);font-weight:650;color:var(--ui-muted);margin-right:3px}
html body .er-fig em{font-style:normal;font-weight:650;margin-left:3px}
html body .er-figs small{font-family:var(--font-ui,Inter);font-size:11px;color:var(--ui-faint)}
html body .er-moves{display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:96px}
html body .er-mv{font:600 11.5px var(--font-num)}
@media(max-width:740px){html body .er-row{grid-template-columns:1fr}html body .er-left{flex-direction:row;align-items:center}html body .er-moves{flex-direction:row;align-items:center;gap:10px}html body .er-src{grid-template-columns:minmax(0,1fr) 54px 44px 110px}}


/* Earnings events: one card per company, headline timeline inside */
html body .er-event{margin-bottom:8px;border-radius:12px;background:var(--ui-panel);border:1px solid var(--ui-line);overflow:hidden}
html body .er-event.signal{border-color:var(--ui-line-strong)}
html body .er-ev-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;padding:10px 14px;border-bottom:1px solid var(--ui-line)}
html body .er-ev-head .er-left{flex-direction:row;align-items:center}
html body .er-path{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px;font-weight:700}
html body .er-path small{font-weight:500;color:var(--ui-faint)}
html body .er-path i{font-style:normal;color:var(--ui-faint)}
html body .er-flip{font-style:normal;font-size:10.5px;font-weight:650;padding:1px 7px;border-radius:999px;background:#e8b54a22;color:#f0c35c}
html body .er-ev-head .er-moves{flex-direction:row;gap:12px}
html body .er-lines{display:flex;flex-direction:column}
html body .er-line{display:grid;grid-template-columns:70px 170px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:6px 14px;border-top:1px solid var(--ui-line);font-size:11.5px}
html body .er-line:first-child{border-top:0}
html body .er-line time{font:500 11px var(--font-num);color:var(--ui-faint)}
html body .er-who{display:flex;align-items:center;gap:6px;min-width:0;color:var(--ui-muted);font-weight:600;white-space:nowrap;overflow:hidden}
html body .er-text{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ui-text)}
html body .er-line .er-figs{margin:0;flex-wrap:nowrap}
html body .er-line .er-side{font-size:10.5px}
@media(max-width:1100px){html body .er-line{grid-template-columns:64px minmax(0,1fr) auto}html body .er-line .er-text{grid-column:1/-1;order:5;white-space:normal}html body .er-line .er-figs{grid-column:1/-1;flex-wrap:wrap}}
@media(max-width:740px){html body .er-ev-head{grid-template-columns:1fr}}

/* Automation: phrases first, new rules flash once */
html body .auto-words{margin:4px 0 14px}
html body .auto-words-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
html body .auto-words-head p{margin:0;font-size:11.5px;line-height:1.5}
html body .auto-words-head button{flex:none;height:30px;padding:0 12px;border-radius:8px;font-size:12px}
html body .auto-words textarea{min-height:150px}
html body .automation-rule.just-added{animation:rule-flash 1.6s ease-out}
@keyframes rule-flash{0%{box-shadow:0 0 0 2px var(--ui-accent,#4c8dff),0 0 24px color-mix(in srgb,var(--ui-accent,#4c8dff) 40%,transparent)}100%{box-shadow:0 0 0 0 transparent}}
html body .jr-actions button[data-journal-automate]{color:var(--ui-accent,#f0b90b)}

/* Automation rule: compact accordion + source combobox */
html body .automation-rule .auto-rule-body{display:flex;flex-direction:column;gap:6px}
html body .automation-rule .auto-name-row{margin-bottom:2px}
html body .auto-acc{padding:0!important;border-radius:10px!important;border:1px solid var(--ui-line)!important;background:var(--ui-glass)!important;overflow:hidden}
html body .auto-acc>summary{list-style:none;cursor:pointer;padding:9px 12px}
html body .auto-acc>summary::-webkit-details-marker{display:none}
html body .auto-acc>summary h4{display:flex;align-items:center;gap:8px;margin:0!important;min-width:0}
html body .auto-acc>summary h4::after{margin-left:auto;flex:none;transform:none!important;font-size:10.5px;color:var(--ui-faint)}
html body .auto-acc .sec-sum{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;color:var(--ui-muted)!important}
html body .auto-acc[open]>summary{border-bottom:1px solid var(--ui-line)}
html body .auto-acc-body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:10px}
html body .auto-acc-body .auto-note{margin:0;font-size:11px}
html body .auto-src-pick{position:relative;display:flex;flex-direction:column;gap:6px}
html body .auto-src-chip{align-self:flex-start;max-width:100%;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;background:color-mix(in srgb,var(--ui-accent,#4c8dff) 14%,transparent);color:var(--ui-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .auto-src-chip.empty{background:#f6465d1c;color:#ff8a98}
html body .auto-src-pick .auto-source-search{height:32px}
html body .auto-src-results{position:absolute;z-index:30;top:100%;left:0;right:0;margin-top:4px;max-height:260px;overflow:auto;padding:4px;border-radius:10px;border:1px solid var(--ui-line-strong);background:var(--ui-panel);box-shadow:0 14px 36px #000b}
html body .auto-src-results button{display:block;width:100%;padding:7px 10px;border:0;border-radius:7px;background:none;text-align:left;font-size:12px;color:var(--ui-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
html body .auto-src-results button.active,html body .auto-src-results button:hover{background:var(--ui-hover)}
html body .auto-src-results p{margin:6px 10px;font-size:12px}

/* Positions: compact cards that fit a narrow panel */
html body .pos-list{display:flex;flex-direction:column;gap:6px;padding:6px 8px 8px}
html body .pos-card{display:flex;flex-direction:column;gap:5px;padding:8px 10px;border-radius:10px;background:var(--ui-glass);border:1px solid var(--ui-line);border-left:3px solid #3fd393}
html body .pos-card.is-short{border-left-color:#ff6b7f}
html body .pos-main{display:flex;align-items:center;gap:8px;min-width:0}
html body .pos-sym{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px 0 3px!important;border:0!important;border-radius:999px!important;background:var(--ui-hover)!important;font-size:12.5px}
html body .pos-sym b{color:var(--ui-ticker);font-weight:700}
html body .pos-sym .coin-logo{width:18px;height:18px}
html body .pos-side{font-size:10.5px;font-weight:700;letter-spacing:.04em}
html body .pos-size{font:600 12px var(--font-num);color:var(--ui-text)}
html body .pos-size small,html body .pos-meta small{font-size:10px;color:var(--ui-faint);font-weight:500}
html body .pos-pnl{margin-left:auto;font:700 13.5px var(--font-num);white-space:nowrap}
html body .pos-pnl small{font-size:11px;font-weight:600;opacity:.85}
html body .pos-meta{display:flex;flex-wrap:wrap;align-items:center;gap:2px 14px;font:500 11.5px var(--font-num);color:var(--ui-muted)}
html body .pos-meta .pos-prot{margin-left:auto}
html body .pos-card .position-actions{display:flex!important;flex-wrap:wrap;align-items:center;gap:5px;margin:0!important}
html body .pos-card .close-percent,html body .pos-card .close-type{display:flex!important;gap:0;padding:2px;border-radius:7px;background:var(--ui-input);border:1px solid var(--ui-line)}
html body .pos-card .close-percent button,html body .pos-card .close-type button{height:22px;min-width:0;padding:0 7px!important;border:0!important;border-radius:5px!important;background:none!important;font:600 11px var(--font-num)!important;color:var(--ui-muted)}
html body .pos-card .close-percent button.active,html body .pos-card .close-type button.active{background:var(--ui-hover)!important;color:var(--ui-strong)}
html body .pos-card .close-limit{width:96px;height:26px;padding:0 8px;font:600 11.5px var(--font-num);border-radius:7px}
html body .pos-card .pos-be{height:26px;padding:0 9px!important;border-radius:7px!important;font-size:11px!important;margin-left:auto}
html body .pos-card .pos-close{height:26px;padding:0 14px!important;border-radius:7px!important;font-size:11.5px!important;font-weight:700!important;background:#f6465d26!important;border:1px solid #f6465d66!important;color:#ff8a98!important}
html body .pos-card .pos-close:hover{background:#f6465d40!important;color:#ffb3bd!important}

/* ================= Positions panel v3: one compact language for every tab ================= */
html body .positions-panel>.panel-head{min-height:0!important;padding:4px 8px 5px!important;gap:4px 8px!important;align-items:center}
html body .positions-panel .position-tabs{display:flex;gap:2px;padding:2px;border-radius:8px;background:var(--ui-glass)}
html body .positions-panel .position-tabs button{height:24px;padding:0 9px!important;border:0!important;border-radius:6px!important;background:none!important;font:600 11px var(--font-ui,Inter)!important;letter-spacing:0!important;text-transform:none!important;color:var(--ui-muted)!important;box-shadow:none!important}
html body .positions-panel .position-tabs button.active{background:var(--ui-hover)!important;color:var(--ui-strong)!important}
html body .positions-panel .position-tabs button span{margin-left:3px;font:600 10px var(--font-num);color:var(--ui-faint)}
html body .positions-panel #close-all{height:24px;padding:0 9px!important;font-size:11px!important;border-radius:6px!important;margin-left:auto}
html body .positions-panel .position-summary{order:9;flex:1 1 100%;justify-content:flex-start;margin:0!important;padding:3px 9px!important;gap:2px 12px!important;font-size:10.5px!important;border-radius:6px}
html body .positions-panel .position-summary b{font-size:11px!important}
html body .positions-panel .panel-head .panel-close{order:2}
html body #positions-content{padding:0!important}
html body .pl-list{display:flex;flex-direction:column}
html body .pl-row{display:grid;align-items:center;gap:8px;min-height:30px;padding:3px 10px;border-bottom:1px solid var(--ui-line);font:500 11px var(--font-num);color:var(--ui-text)}
html body .pl-row:hover{background:var(--ui-hover)}
html body .pl-row .r{text-align:right;justify-self:end;white-space:nowrap}
html body .pl-row time{color:var(--ui-faint);white-space:nowrap}
html body .pl-row small{font-size:9.5px;color:var(--ui-faint)}
html body .pl-dim{color:var(--ui-muted)}
html body .pl-order{grid-template-columns:minmax(78px,auto) 40px minmax(0,1fr) auto auto 22px}
html body .pl-log{grid-template-columns:58px minmax(78px,auto) auto auto minmax(0,1fr)}
html body .pl-cycle{grid-template-columns:minmax(78px,auto) 44px minmax(0,1fr) auto 70px}
html body .pl-ord{grid-template-columns:92px minmax(78px,auto) auto auto minmax(0,1fr) 60px}
html body .pl-detail{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ui-muted)}
html body .pl-sym{display:inline-flex;align-items:center;gap:5px;justify-self:start;height:20px;padding:0 7px 0 2px!important;border:0!important;border-radius:999px!important;background:var(--ui-glass)!important;font-size:11px!important}
html body .pl-sym b{font-weight:700;color:var(--ui-ticker)}
html body .pl-sym .coin-logo{width:15px;height:15px}
html body .pl-x{width:22px;height:22px;padding:0!important;border:0!important;border-radius:6px!important;background:none!important;color:var(--ui-faint)!important;font-size:15px!important;line-height:1}
html body .pl-x:hover{background:#f6465d22!important;color:#ff8a98!important}
html body .pl-mini{height:20px;padding:0 7px!important;font-size:10.5px!important;border-radius:5px!important}
html body .positions-panel .history-bar{display:flex;align-items:center;gap:8px;padding:5px 10px!important;border-bottom:1px solid var(--ui-line);font-size:11px}
html body .positions-panel .history-bar b{font:650 11px var(--font-num)}
html body .pl-warn{padding:1px 7px;border-radius:999px;background:#e8b54a1f;color:#f0c35c;font-size:10.5px;font-weight:600;cursor:help}
html body .pl-refresh{margin-left:auto;width:24px;height:24px;padding:0!important;border-radius:6px!important;font-size:13px!important}
html body .pl-more>summary{list-style:none;cursor:pointer;padding:6px 10px;font-size:10.5px;font-weight:650;letter-spacing:.05em;text-transform:uppercase;color:var(--ui-faint);border-bottom:1px solid var(--ui-line)}
html body .pl-more>summary::-webkit-details-marker{display:none}
html body .pl-more>summary span{margin-left:4px;font-family:var(--font-num)}
html body .positions-panel .history-loading{margin:0;padding:12px 10px!important;font-size:11px}
/* Position cards, tighter */
html body .pos-list{gap:4px!important;padding:4px 6px 6px!important}
html body .pos-card{gap:3px!important;padding:6px 8px!important;border-radius:8px!important}
html body .pos-sym{height:20px!important;font-size:11px!important}
html body .pos-sym .coin-logo{width:15px!important;height:15px!important}
html body .pos-side{font-size:10px!important}
html body .pos-size{font-size:11px!important}
html body .pos-pnl{font-size:12px!important}
html body .pos-pnl small{font-size:10px!important}
html body .pos-meta{font-size:10.5px!important}
html body .pos-card .close-percent button,html body .pos-card .close-type button{height:20px!important;padding:0 6px!important;font-size:10.5px!important}
html body .pos-card .pos-be,html body .pos-card .pos-close,html body .pos-card .close-limit{height:24px!important;font-size:10.5px!important}
html body .positions-panel .empty{padding:16px 10px!important}
html body .positions-panel .empty b{font-size:12px!important}
html body .positions-panel .empty p{font-size:11px!important}
html body .positions-panel .empty .empty-icon{display:none}

/* Links inside news text */
html body #workspace .news-link,html body .news-link{display:inline!important;color:#7fb2ff!important;text-decoration:none!important;border:0!important;box-shadow:none!important;background:none!important;padding:0!important;word-break:break-all;transition:color .12s}
html body #workspace .news-link:hover,html body .news-link:hover{color:#a9cbff!important;text-decoration:underline!important;text-underline-offset:2px}

html body .positions-panel #all-entry-stop{height:24px;padding:0 9px!important;margin-left:auto;font-size:11px!important;font-weight:600;border-radius:6px!important;border:1px solid var(--ui-line-strong)!important;background:transparent!important;color:var(--ui-text)!important;white-space:nowrap}
html body .positions-panel #all-entry-stop:not(:disabled):hover{background:var(--ui-hover)!important}
html body .positions-panel #all-entry-stop:disabled{opacity:.4}
html body .positions-panel #all-entry-stop+#close-all{margin-left:0!important}

/* Coin chips and lists use the text colour; names inside the news text keep their accent */
html:root,html[data-theme]{--ui-ticker:var(--ui-strong)}

/* Long / short buttons everywhere: outline only, transparent inside */
html body button.long:not([role=radio]),html body .quick-buttons button[data-trade=BUY],html body #chart-presets button[data-trade=BUY],html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY],html body .chart-context-menu .ctx-limit button.long{background:transparent!important;border:1px solid #2ebd8599!important;box-shadow:none!important;border-radius:4px!important;color:#3fcf8e!important;font-weight:500!important}
html body button.short:not([role=radio]),html body .quick-buttons button[data-trade=SELL],html body #chart-presets button[data-trade=SELL],html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL],html body .chart-context-menu .ctx-limit button.short{background:transparent!important;border:1px solid #f6465d99!important;box-shadow:none!important;border-radius:4px!important;color:#f2627a!important;font-weight:500!important}
html body button.long:not([role=radio]):not(:disabled):hover,html body .quick-buttons button[data-trade=BUY]:not(:disabled):hover,html body #chart-presets button[data-trade=BUY]:not(:disabled):hover,html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY]:not(:disabled):hover,html body .chart-context-menu .ctx-limit button.long:not(:disabled):hover{background:transparent!important;border-color:#3fcf8e!important;box-shadow:none!important;color:#7be3b6!important}
html body button.short:not([role=radio]):not(:disabled):hover,html body .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body #chart-presets button[data-trade=SELL]:not(:disabled):hover,html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body .chart-context-menu .ctx-limit button.short:not(:disabled):hover{background:transparent!important;border-color:#ff7a8a!important;box-shadow:none!important;color:#ff96a3!important}

/* ================= Chart panels: minimal header, more chart ================= */
html body :is(.chart-panel,.extra-chart) .market-header .badge{display:none!important}
html body :is(.chart-panel,.extra-chart) .market-stat:has(#last-price,.extra-price,#change,.extra-change) small{display:none!important}
html body .chart-presets .quick-buttons,html body #chart-presets .quick-buttons{display:flex!important;flex:1 1 auto;gap:4px!important;width:100%}
html body .chart-presets .quick-buttons button{flex:1 1 0!important;min-width:0!important}
html body .quick-buttons button[data-trade=BUY]+button[data-trade=SELL]{margin-left:8px!important}
html body .chart-presets>span{display:none!important}
@media(min-width:741px){
html body :is(.chart-panel,.extra-chart) .market-header{min-height:26px!important;height:26px;padding:0 8px!important;gap:10px!important;flex-wrap:nowrap!important;overflow:visible!important}
html body :is(.chart-panel,.extra-chart) .market-header>div:first-child>button{font-size:12px!important;padding:1px 4px!important}
html body :is(.chart-panel,.extra-chart) .market-stat{flex-direction:row!important;align-items:baseline!important;gap:3px!important;white-space:nowrap}
html body :is(.chart-panel,.extra-chart) .market-stat small{font-size:9.5px!important;font-weight:500;letter-spacing:0!important}
html body :is(.chart-panel,.extra-chart) .market-stat b{font-size:11px!important}
html body .chart-tools{min-height:22px!important;padding:1px 8px!important;gap:4px!important;flex-wrap:nowrap!important;overflow:hidden;font-size:10.5px!important}
html body #intervals,html body .chart-tools .chart-intervals{padding:1px!important}
html body #intervals button,html body .chart-tools .chart-intervals button{height:16px!important;min-height:16px!important;padding:0 5px!important;font-size:10px!important}
html body .chart-tools button:not(#intervals button):not(.chart-intervals button){height:18px!important;padding:0 5px!important;font-size:10.5px!important}
html body .chart-tools .check-inline,html body .chart-quick-toggle,html body .extra-ema-label{font-size:10.5px!important;gap:3px!important}
html body .chart-tools input[type=checkbox]{width:11px!important;height:11px!important}
html body #chart-status,html body .chart-tools .extra-status{font-size:9.5px!important}
html body .chart-tools .divider{height:12px!important;margin:0 1px!important}
html body .chart-presets,html body #chart-presets{padding:2px 6px 3px!important;min-height:0!important;height:auto!important;border-top:1px solid var(--ui-line)}
html body .chart-presets button,html body #chart-presets button{height:20px!important;min-height:20px!important;font-size:10.5px!important}
html body #workspace .chart-panel #chart-presets button,html body #workspace .extra-chart .chart-presets button{height:20px!important;min-height:20px!important}
html body .chart-bottom{display:none!important}
/* Close controls float on the chart instead of taking a row */
html body .chart-position-actions:empty{display:none}
html body :is(.chart-panel,.extra-chart) .chart-position-actions{position:absolute;top:52px;left:8px;z-index:6;display:flex;flex-direction:column;gap:2px;margin:0!important;padding:2px 5px;border-radius:6px;background:color-mix(in srgb,var(--ui-panel) 88%,transparent)}
html body .chart-position-actions .position-actions{display:flex!important;align-items:center;gap:4px;margin:0!important}
html body .chart-position-actions .close-percent,html body .chart-position-actions .close-type{display:flex!important;gap:0}
html body .chart-position-actions button{height:17px!important;min-height:0!important;padding:0 4px!important;font-size:10px!important;border-radius:4px!important}
html body .chart-position-actions .close-limit{width:72px;height:17px;font-size:10px}
html body .chart-position-actions b{font-size:10px}
}

/* Long / short: faint liquid glass, colour only as a hint until hovered */
html{--up-rgb:46,189,133;--down-rgb:246,70,93;--t-border:.2;--t-text:.62;--t-fill:0}
html[data-trade-tint=normal]{--t-border:.45;--t-text:.85;--t-fill:.03}
html[data-trade-tint=strong]{--t-border:.8;--t-text:1;--t-fill:.1}
html body button.long:not([role=radio]),html body .quick-buttons button[data-trade=BUY],html body #chart-presets button[data-trade=BUY],html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY],html body .chart-context-menu .ctx-limit button.long{background:rgba(var(--up-rgb),var(--t-fill))!important;border:1px solid rgba(var(--up-rgb),var(--t-border))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;color:rgba(var(--up-rgb),var(--t-text))!important;font-weight:500!important}
html body button.short:not([role=radio]),html body .quick-buttons button[data-trade=SELL],html body #chart-presets button[data-trade=SELL],html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL],html body .chart-context-menu .ctx-limit button.short{background:rgba(var(--down-rgb),var(--t-fill))!important;border:1px solid rgba(var(--down-rgb),var(--t-border))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;color:rgba(var(--down-rgb),var(--t-text))!important;font-weight:500!important}
html body button.long:not([role=radio]):not(:disabled):hover,html body .quick-buttons button[data-trade=BUY]:not(:disabled):hover,html body #chart-presets button[data-trade=BUY]:not(:disabled):hover,html body #workspace .news-trade-row .quick-buttons button[data-trade=BUY]:not(:disabled):hover,html body .chart-context-menu .ctx-limit button.long:not(:disabled):hover{background:rgba(var(--up-rgb),.1)!important;border-color:rgba(var(--up-rgb),.7)!important;color:rgb(var(--up-rgb))!important}
html body button.short:not([role=radio]):not(:disabled):hover,html body .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body #chart-presets button[data-trade=SELL]:not(:disabled):hover,html body #workspace .news-trade-row .quick-buttons button[data-trade=SELL]:not(:disabled):hover,html body .chart-context-menu .ctx-limit button.short:not(:disabled):hover{background:rgba(var(--down-rgb),.1)!important;border-color:rgba(var(--down-rgb),.7)!important;color:rgb(var(--down-rgb))!important}

/* Positions: one thin row per position, shared close options in the header */
html body .pos-close-opts{display:flex;align-items:center;gap:4px}
html body .pos-close-opts[hidden]{display:none}
html body .pos-close-opts>div{display:flex;padding:1px;border-radius:6px;background:var(--ui-glass)}
html body .pos-close-opts button{height:20px;min-width:0;padding:0 5px!important;border:0!important;border-radius:5px!important;background:none!important;font:600 10px var(--font-num)!important;color:var(--ui-faint)!important}
html body .pos-close-opts button.active{background:var(--ui-hover)!important;color:var(--ui-strong)!important}
html body .positions-panel #all-entry-stop,html body .positions-panel #close-all{height:20px!important;padding:0 6px!important;font-size:10px!important;border-radius:5px!important}
html body .positions-panel .position-tabs button{height:20px!important;padding:0 7px!important;font-size:10.5px!important}
html body .positions-panel .position-summary{padding:2px 8px!important}
html body .pos-table{container-type:inline-size}
html body .pos-table:has(.close-limit:not([hidden])){--pos-act:154px}
html body .pos-row{display:grid;grid-template-columns:minmax(92px,1.1fr) minmax(58px,.8fr) minmax(58px,.8fr) minmax(58px,.8fr) minmax(56px,.8fr) minmax(78px,1fr) var(--pos-act,88px);align-items:center;column-gap:8px;min-height:26px;padding:1px 8px;border-bottom:1px solid var(--ui-line);font:500 10.5px var(--font-num);color:var(--ui-text)}
html body .pos-row:not(.pos-head):hover{background:var(--ui-hover)}
html body .pos-row.is-long{box-shadow:inset 2px 0 0 #2ebd8580}
html body .pos-row.is-short{box-shadow:inset 2px 0 0 #f6465d80}
html body .pos-row>.r{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .pos-head{min-height:20px;font:600 9.5px var(--font-ui,Inter);color:var(--ui-faint);border-bottom:1px solid var(--ui-line)}
html body .pos-id{display:flex;align-items:center;gap:5px;min-width:0}
html body .pos-row .pos-sym{display:inline-flex;align-items:center;gap:4px;height:18px!important;padding:0 6px 0 2px!important;border:0!important;border-radius:999px!important;background:var(--ui-glass)!important;font-size:10.5px!important;min-width:0}
html body .pos-row .pos-sym .coin-logo{width:14px!important;height:14px!important}
html body .pos-row .pos-side{font:700 9.5px var(--font-num)!important;font-style:normal;white-space:nowrap}
html body .pos-row .pos-size,html body .pos-row .pos-entry,html body .pos-row .pos-mark{font-size:10.5px!important;color:var(--ui-muted)}
html body .pos-row .pos-pnl{margin:0;font:650 11px var(--font-num)!important}
html body .pos-row .pos-prot{font-size:9.5px;color:var(--ui-faint)}
html body .pos-row .position-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:3px;margin:0!important;flex-wrap:nowrap}
html body .pos-row .close-limit{width:62px;height:18px!important;padding:0 4px!important;font:600 10px var(--font-num)!important;border-radius:4px}
html body .pos-row .pos-be,html body .pos-row .pos-close{height:18px!important;margin:0!important;padding:0 6px!important;border-radius:4px!important;font:600 10px var(--font-ui,Inter)!important}
html body .pos-row .pos-be{background:transparent!important;border:1px solid var(--ui-line-strong)!important;color:var(--ui-muted)!important}
html body .pos-row .pos-close{background:transparent!important;border:1px solid #f6465d55!important;color:#eb7d8c!important}
html body .pos-row .pos-close:hover{background:#f6465d1f!important;color:#ff96a3!important}
@container (max-width:560px){html body .pos-row{grid-template-columns:minmax(84px,1fr) minmax(52px,.7fr) minmax(52px,.7fr) minmax(50px,.7fr) var(--pos-act,88px)}html body .pos-row>.pos-size,html body .pos-row>.pos-prot{display:none}}
@container (max-width:400px){html body .pos-row{grid-template-columns:minmax(0,1fr) auto var(--pos-act,88px)}html body .pos-row>.pos-entry,html body .pos-row>.pos-mark{display:none}html body .pos-head{display:none}}

/* Chart right-click menu: small enough for a compact chart */
html body .chart-context-menu{width:164px!important;padding:5px!important;gap:3px!important;border-radius:8px!important;display:flex;flex-direction:column}
html body .chart-context-menu>b{padding:0 2px 2px!important;font:600 10.5px var(--font-num)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .chart-context-menu .ctx-limit{display:grid!important;grid-template-columns:1fr 1fr;gap:3px!important;padding:0!important;margin:0!important;border:0!important}
html body .chart-context-menu .ctx-limit label{grid-column:1/-1;padding:0 2px!important;font-size:10px!important}
html body .chart-context-menu .ctx-limit input{width:104px!important;height:20px!important;padding:0 34px 0 5px!important;border-radius:4px!important;font-size:10.5px!important}
html body .chart-context-menu .ctx-limit em{right:5px!important;font-size:9px!important}
html body .chart-context-menu .ctx-limit button,html body .chart-context-menu .ctx-prot button{height:20px!important;min-height:0!important;margin:0!important;padding:0 2px!important;border-radius:4px!important;font:500 10px var(--font-num)!important;text-align:center!important;white-space:nowrap}
html body .chart-context-menu .ctx-limit small{grid-column:1/-1;font-size:10px!important;line-height:1.35}
html body .chart-context-menu .ctx-prot{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding-top:3px;border-top:1px solid var(--ui-line)}

/* Candle hover: % move beside the cursor */
html body .candle-tip{position:absolute;z-index:7;display:grid;grid-template-columns:auto auto;align-items:baseline;gap:0 8px;padding:3px 7px;border-radius:6px;background:color-mix(in srgb,var(--ui-panel) 90%,transparent);border:1px solid var(--ui-line-strong);pointer-events:none;white-space:nowrap;font:500 10px var(--font-num);color:var(--ui-muted)}
html body .candle-tip[hidden]{display:none}
html body .candle-tip b{font:700 12.5px var(--font-num)}
html body .candle-tip small{justify-self:end;font-size:9.5px;color:var(--ui-faint)}
html body .candle-tip span{grid-column:1/-1}

/* ================= Appearance options ================= */
html body .ap-sec{margin-bottom:6px;border-radius:10px;border:1px solid var(--ui-line);background:var(--ui-glass)}
html body .ap-sec>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:9px 12px;font-size:12.5px;font-weight:650;color:var(--ui-strong)}
html body .ap-sec>summary::-webkit-details-marker{display:none}
html body .ap-sec>summary::after{content:'+';color:var(--ui-faint);font-weight:500}
html body .ap-sec[open]>summary::after{content:'−'}
html body .ap-sec[open]>summary{border-bottom:1px solid var(--ui-line)}
html body .ap-body{padding:4px 12px 10px}
html body .ap-body .form-row{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:34px;padding:3px 0;border:0!important}
html body .ap-body .form-row label{font-size:12px;color:var(--ui-text)}
html body .ap-body .form-row small{display:block;font-size:10.5px;color:var(--ui-faint)}
html body .ap-body .form-row select{height:28px;width:auto;min-width:150px;font-size:12px}
html body .ap-swatches{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}
html body .ap-swatch{width:20px;height:20px;padding:0!important;border-radius:50%!important;border:2px solid transparent!important;background:var(--c)!important;box-shadow:inset 0 0 0 1px #0006;cursor:pointer}
html body .ap-swatch.none{background:transparent!important;border:1px dashed var(--ui-line-strong)!important;color:var(--ui-faint);font-size:12px;line-height:1}
html body .ap-swatch.active{border-color:var(--ui-strong)!important}
html body .ap-custom{width:24px;height:22px;padding:0;border:0;background:none;cursor:pointer}
html body .ap-buttons{display:flex;gap:6px;flex-wrap:wrap}
html body .ap-buttons button{height:28px;padding:0 10px;font-size:11.5px;border-radius:7px}
html body .ap-keys{margin:6px 0 2px;font-size:11.5px;line-height:1.7;color:var(--ui-body)}
html body .ap-foot{display:flex;justify-content:flex-end;padding:6px 0}
html body .ap-foot button{height:28px;padding:0 10px;font-size:11.5px;border-radius:7px}
html[data-palette]:not([data-palette=classic]) body :is(.positive,.up,.jr-move.up){color:var(--ui-up)!important}
html[data-palette]:not([data-palette=classic]) body :is(.negative,.down,.jr-move.down){color:var(--ui-down)!important}
html[data-radius=sharp]{--r-sm:0;--r-md:0;--r-lg:0}
html[data-radius=sharp] body :is(.panel,.workspace-panel,.news-card,.pos-row,.quick-buttons button,#chart-presets button,.chart-presets button,.news-embedded,.news-photo){border-radius:0!important}
html[data-radius=round]{--r-sm:8px;--r-md:12px;--r-lg:16px}
html[data-radius=round] body :is(.panel,.workspace-panel,.news-card,.news-embedded){border-radius:16px!important}
html[data-radius=round] body :is(.quick-buttons button,#chart-presets button,.chart-presets button){border-radius:9px!important}
html[data-spacing=tight] body #workspace .news-card{padding:6px 10px!important;margin-bottom:3px!important}
html[data-spacing=airy] body #workspace .news-card{padding:16px 18px!important;margin-bottom:12px!important}
html[data-line-height=compact] body :is(.news-title,.news-body){line-height:1.3!important}
html[data-line-height=relaxed] body :is(.news-title,.news-body){line-height:1.75!important}
html[data-mentions=plain] body #workspace .news-card button.asset-mention{background:none!important;box-shadow:none!important;padding:0!important;margin:0!important}
html[data-mentions=off] body #workspace .news-card button.asset-mention{background:none!important;box-shadow:none!important;padding:0!important;margin:0!important;color:inherit!important;font-weight:inherit!important}
html[data-no-avatars=true] body .news-avatar{display:none!important}
html[data-no-coin-icons=true] body :is(.news-asset,.pos-sym,.pl-sym,.jr-coin,.w-coin,.market-row) .coin-logo{display:none!important}
html[data-no-source-badges=true] body :is(.source-category,.source-mark){display:none!important}
html[data-no-trade-row=true] body #workspace .news-trade-row .quick-buttons{display:none!important}
html[data-no-trade-row=true] body #workspace .news-trade-row{display:inline-flex!important;margin-right:4px;border:0!important}
html[data-no-fresh=true] body #workspace .news-card.fresh-news{box-shadow:none!important;border-color:var(--ui-line)!important}
html[data-no-surge=true] body #workspace .news-card.surge{box-shadow:none!important;background:var(--ui-panel)!important;border-color:var(--ui-line)!important}
html[data-no-surge=true] body #workspace .news-card.surge .news-led{animation:none!important}
html[data-no-motion=true] body *{animation:none!important;transition:none!important}
html[data-no-candle-tip=true] body .candle-tip{display:none!important}
html[data-toast-pos=bottom-left] #toast-container{left:16px;right:auto}
html[data-toast-pos=top-right] #toast-container{top:52px;bottom:auto}
html[data-toast-pos=top-left] #toast-container{top:52px;bottom:auto;left:16px;right:auto}
html[data-toast-pos=top-center] #toast-container{top:52px;bottom:auto;left:50%;right:auto;transform:translateX(-50%)}
html body #settings-content .ap-body .form-row>div:first-child{flex:1 1 auto;min-width:0;display:block}
html body #settings-content .ap-swatches{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;flex:0 0 auto;gap:5px}
html body #settings-content .ap-swatch{flex:0 0 20px;width:20px!important;height:20px!important;min-width:0;min-height:0!important}
html body #settings-content .ap-custom{flex:0 0 24px;width:24px!important;height:22px!important;min-height:0!important;padding:0!important}
html body #settings-content .ap-buttons{flex:0 0 auto;display:flex!important;flex-direction:row!important}
html body #settings-content .ap-buttons button{width:auto!important}
html body #settings-content .ap-body .form-row input[type=checkbox]{flex:0 0 auto}
html body #settings-content .ap-body .form-row input[type=range]{flex:0 0 150px;width:150px}

/* Every chart strip is identical: amounts centred inside their button */
html body .chart-presets .quick-buttons button,html body #chart-presets .quick-buttons button,html body #workspace .news-trade-row .quick-buttons button{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0 4px!important;line-height:1!important;font-family:var(--font-num)!important}
html body .chart-presets{gap:8px!important}
html body :is(.chart-panel,.extra-chart) .chart-tools :is(#intervals,.chart-intervals) button{font-size:10px!important;padding:0 5px!important}
html body #workspace .extra-chart .chart-presets .quick-buttons button,html body .extra-chart .chart-presets .quick-buttons button{font-family:var(--font-num)!important;font-size:10.5px!important}
html body .chart-presets .quick-buttons button{font-variant-numeric:tabular-nums!important;font-feature-settings:'tnum','cv11'!important;transition:background-color .1s ease,border-color .1s ease!important}

/* Positions: panel close always sits in the top-right corner */
html body .positions-panel>.panel-head{position:relative;padding-right:30px!important}
html body .positions-panel>.panel-head>.panel-close{position:absolute!important;top:5px;right:6px;margin:0!important;order:0}

/* Positions header: All SL and Close all stay together at the far right */
html body .positions-panel .pos-head-actions{display:flex;align-items:center;gap:4px;margin-left:auto;flex:0 0 auto}
html body .positions-panel .pos-head-actions #all-entry-stop,html body .positions-panel .pos-head-actions #close-all{margin:0!important;order:0!important;white-space:nowrap}
@media(min-width:741px){
html body .positions-panel>.panel-head{column-gap:5px!important}
html body .positions-panel .position-tabs{gap:0!important}
html body .positions-panel .position-tabs button{padding:0 5px!important;font-size:10px!important}
html body .positions-panel .position-tabs button span{margin-left:2px}
html body .pos-close-opts{gap:2px}
html body .pos-close-opts button{padding:0 3px!important}
html body .positions-panel #all-entry-stop,html body .positions-panel #close-all{padding:0 5px!important}
}

/* TUI: a new card breathes with a faint grey light for its first 10 seconds.
   The light lives on a layer of its own: !important box-shadows would otherwise override the animation. */
@keyframes tui-breathe{0%,100%{opacity:.18}50%{opacity:1}}
html[data-theme=tui]:not([data-no-fresh=true]) body #workspace .news-card.fresh-news:not(.surge){position:relative;border-left-color:transparent!important;box-shadow:none!important}
html[data-theme=tui]:not([data-no-fresh=true]) body #workspace .news-card.fresh-news:not(.surge)::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(190,196,208,.34),inset 0 0 18px rgba(190,196,208,.08);animation:tui-breathe 2.4s ease-in-out infinite}
html[data-theme=tui]:not([data-no-fresh=true]) body #workspace .news-card.fresh-news:not(.surge) .news-led{background:#cdd1da!important;box-shadow:0 0 6px rgba(205,209,218,.65)!important;animation:tui-breathe 2.4s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){html[data-theme=tui] body #workspace .news-card.fresh-news:not(.surge)::after,html[data-theme=tui] body #workspace .news-card.fresh-news:not(.surge) .news-led{animation:none;opacity:.7}}
html[data-theme=tui][data-no-motion=true] body #workspace .news-card.fresh-news:not(.surge)::after{opacity:.7}

/* X session problem */
#x-lock-banner{position:fixed;top:48px;left:50%;transform:translateX(-50%);z-index:40;display:flex;align-items:center;gap:10px;max-width:min(720px,calc(100vw - 24px));padding:6px 8px 6px 12px;border-radius:8px;background:color-mix(in srgb,var(--ui-panel) 94%,transparent);border:1px solid #e8b54a66;box-shadow:0 8px 24px #0008;font-size:11.5px;line-height:1.4;color:var(--ui-text)}
#x-lock-banner b{color:#f0c35c}
#x-lock-banner a{color:#7fb2ff}
#x-lock-banner button{flex:none;width:22px;height:22px;padding:0;border:0;background:none;color:var(--ui-faint);font-size:15px;cursor:pointer}

/* Keyword highlights: colour only, the text keeps its size and font */
html body mark[style]{background:transparent!important;font:inherit!important;line-height:inherit!important;padding:0!important;border-radius:0!important;text-shadow:none!important}
.hl-table{display:grid;margin:8px 0 12px;border-top:1px solid var(--ui-line)}
.hl-row{display:grid;grid-template-columns:170px minmax(0,1fr);gap:12px;padding:9px 0;border-bottom:1px solid var(--ui-line)}
.hl-row:last-child{border-bottom:0}
.hl-group{display:flex;align-items:center;gap:7px;align-self:start;min-height:24px;font-size:11.5px}
.hl-group b{font-weight:600;color:var(--hl)}
.hl-group small,#hl-count{color:var(--ui-faint);font-size:10px;font-weight:400;letter-spacing:0}
html body #settings-dialog .hl-all{margin-left:auto;height:22px;min-height:0;padding:0 8px;font-size:10.5px;background:none;border:1px solid var(--ui-line);border-radius:5px;color:var(--ui-muted);cursor:pointer}
.hl-words{display:flex;flex-wrap:wrap;gap:4px}
html body #settings-dialog .hl-chip{height:24px;min-height:0;padding:0 8px;font-size:11px;font-weight:400;background:none;border:1px solid var(--ui-line);border-radius:5px;color:var(--ui-faint);cursor:pointer}
html body #settings-dialog .hl-chip:hover{color:var(--ui-text);border-color:var(--ui-muted)}
html body #settings-dialog .hl-chip.on{color:var(--hl);border-color:color-mix(in srgb,var(--hl) 55%,transparent);background:color-mix(in srgb,var(--hl) 10%,transparent)}
.hl-group input[type=color],.hl-add input[type=color],.hl-own input[type=color]{flex:none;width:18px!important;height:18px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:4px;background:none!important;cursor:pointer}
.hl-add{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.hl-add input:not([type=color]){flex:1;min-width:0}
html body #settings-dialog .hl-add button{flex:none;height:30px;min-height:0;padding:0 14px}
.hl-own-list{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:12px}
.hl-own{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 3px 0 6px;font-size:11px;color:var(--hl);border:1px solid color-mix(in srgb,var(--hl) 55%,transparent);border-radius:5px}
html body #settings-dialog .hl-own button{width:20px;height:20px;min-height:0;padding:0;background:none;border:0;color:var(--ui-faint);font-size:14px;cursor:pointer}
.hl-none{color:var(--ui-faint);font-size:11px}
@media(max-width:640px){.hl-row{grid-template-columns:1fr;gap:6px}}
html body #settings-dialog .hl-chip,html body #settings-dialog .hl-all{height:24px!important;min-height:0!important;padding:0 8px!important;font-size:11px!important;font-weight:400!important;background:none!important;border:1px solid var(--ui-line)!important;border-radius:5px!important;color:var(--ui-faint)!important;box-shadow:none!important}
html body #settings-dialog .hl-chip:hover,html body #settings-dialog .hl-all:hover{color:var(--ui-text)!important;border-color:var(--ui-muted)!important}
html body #settings-dialog .hl-chip.on{color:var(--hl)!important;border-color:color-mix(in srgb,var(--hl) 55%,transparent)!important;background:color-mix(in srgb,var(--hl) 10%,transparent)!important}
html body #settings-dialog .hl-row input[type=color],html body #settings-dialog .hl-add input[type=color],html body #settings-dialog .hl-own input[type=color]{appearance:none;-webkit-appearance:none;flex:none;width:16px!important;height:16px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:4px!important;background:none!important;box-shadow:none!important;overflow:hidden;cursor:pointer}
html body #settings-dialog input[type=color]::-webkit-color-swatch-wrapper{padding:0}
html body #settings-dialog input[type=color]::-webkit-color-swatch{border:0;border-radius:4px}
html body #settings-dialog input[type=color]::-moz-color-swatch{border:0;border-radius:4px}
#settings-dialog#settings-dialog .hl-row input[type=color],#settings-dialog#settings-dialog .hl-add input[type=color],#settings-dialog#settings-dialog .hl-own input[type=color]{width:16px!important;height:16px!important;min-width:0!important;padding:0!important;border:0!important;background:transparent!important}
#settings-dialog#settings-dialog .hl-row input[type=color]::-webkit-color-swatch,#settings-dialog#settings-dialog .hl-add input[type=color]::-webkit-color-swatch,#settings-dialog#settings-dialog .hl-own input[type=color]::-webkit-color-swatch{display:block!important;border:0!important;border-radius:4px!important}
.hl-row{grid-template-columns:195px minmax(0,1fr)}

/* TUI: every news item sits in its own thin box */
html[data-theme=tui] body #workspace .news-card:not(.surge),html[data-theme=tui] body #workspace .news-card.is-latest:not(.surge),html[data-theme=tui]:not([data-no-fresh=true]) body #workspace .news-card.fresh-news:not(.surge){border:1px solid #33363f!important;border-radius:0!important;margin-bottom:6px!important}
html[data-theme=tui] body #workspace .news-card:last-child{margin-bottom:0!important}

/* Chart headers: no picker arrow, long symbols stay on one line */
html body #workspace :is(#symbol-picker,.extra-picker)>span{display:none!important}
html body #workspace :is(#symbol-picker,.extra-picker){white-space:nowrap!important}
/* Selected chart: a quiet one-pixel frame */
html body #workspace .workspace-panel.active-chart,html[data-theme] body #workspace .workspace-panel.active-chart{border:1px solid color-mix(in srgb,var(--ui-text) 22%,var(--ui-line))!important;box-shadow:none!important;outline:0!important}
/* Own words inside a category row */
#settings-dialog#settings-dialog .hl-add select{flex:none;width:130px!important;height:30px;min-height:0;font-size:11px}
#settings-dialog#settings-dialog .hl-add input[type=color][hidden]{display:none!important}
html body #settings-dialog .hl-chip.hl-extra{display:inline-flex;align-items:center;gap:3px;padding:0 3px 0 8px!important;cursor:default}
html body #settings-dialog .hl-extra button{width:16px;height:16px;min-height:0;padding:0;background:none;border:0;color:inherit;opacity:.65;font-size:13px;line-height:1;cursor:pointer}
html body #settings-dialog .hl-extra button:hover{opacity:1}

/* Desktop app key */
.dk-key{display:flex;align-items:center;gap:8px;margin:10px 0 0}
.dk-key code{flex:1;min-width:0;overflow-wrap:anywhere;padding:7px 9px;font-size:11px;user-select:all;background:var(--ui-bg,#0005);border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-text)}
.dk-warn{color:#f0c35c!important}
.dk-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 12px}
.dk-download{display:inline-flex;align-items:center;height:30px;padding:0 12px;font-size:11.5px;border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-text);text-decoration:none}
.dk-shortcut{display:flex;gap:6px;align-items:center}

/* Calendar chart: plain lines, quiet event markers, details on click */
html body #fomc-history{background:none!important;height:360px!important}
html body .fomc-overlay{overflow:hidden}
html body .fo-line{border-left:1px dashed rgba(170,180,195,.22)!important}
html body .fo-line.fomc{border-left-color:rgba(130,174,240,.5)!important}
html body .fo-mark{position:absolute;top:2px;left:-1px;height:17px;max-width:130px;padding:0 6px;border:1px solid var(--ui-line);border-radius:3px;background:var(--ui-panel);color:var(--ui-muted);font:500 10px var(--font-ui,Inter),sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;pointer-events:auto}
html body .fo-mark:hover{color:var(--ui-strong);border-color:var(--ui-muted)}
html body .fo-line.fomc .fo-mark{color:#9cc0f5;border-color:rgba(130,174,240,.45)}
html body .fo-mark.dot{left:-5px;width:9px;height:9px;padding:0;border-radius:50%;background:var(--ui-muted);border-color:transparent}
html body .fo-line.fomc .fo-mark.dot{background:#9cc0f5}
html body .fo-pop{position:absolute;top:24px;z-index:5;width:290px;max-height:calc(100% - 34px);overflow:auto;padding:10px 12px;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:6px;box-shadow:0 8px 24px #0009;font-size:11.5px;color:var(--ui-body)}
html body .fo-pop[hidden]{display:none}
html body .fo-close{position:absolute;top:5px;right:5px;width:20px;height:20px;padding:0;border:0;background:none;color:var(--ui-faint);font-size:15px;cursor:pointer}
html body .fo-event+.fo-event{margin-top:10px;padding-top:10px;border-top:1px solid var(--ui-line)}
html body .fo-event h5{margin:0;padding-right:18px;font-size:12.5px;font-weight:650;color:var(--ui-strong)}
html body .fo-event time{display:block;margin-top:1px;font:500 10.5px var(--font-num);color:var(--ui-faint)}
html body .fo-figures{display:flex;gap:16px;margin-top:8px}
html body .fo-figures small{display:block;font-size:10px;color:var(--ui-faint)}
html body .fo-figures b{font:650 13px var(--font-num);color:var(--ui-strong)}
html body .fo-event em{display:block;margin-top:4px;font-style:normal;font-size:10.5px;color:var(--ui-muted)}
html body .fo-event h6{margin:9px 0 4px;font-size:10px;font-weight:600;color:var(--ui-faint)}
html body .fo-event ul{list-style:none;margin:0;padding:0;display:grid;gap:3px}
html body .fo-event li{display:grid;grid-template-columns:minmax(0,1fr) auto 52px;gap:8px;align-items:center}
html body .fo-event li span{display:flex;align-items:center;gap:5px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .fo-event li i{flex:none;width:7px;height:7px;border-radius:2px;background:var(--c)}
html body .fo-event li b{font:500 10.5px var(--font-num);color:var(--ui-muted)}
html body .fo-event li u{text-decoration:none;text-align:right;font:650 10.5px var(--font-num);color:var(--ui-muted)}
html body .fo-event li u.up{color:var(--ui-up,#2ebd85)}html body .fo-event li u.down{color:var(--ui-down,#f6465d)}
/* Journal: favourite star */
html body .jr-favorite{display:inline-block;margin-right:5px;padding:0;border:0;background:none;color:var(--ui-faint);font-size:12px;line-height:1;cursor:pointer}
html body .jr-favorite:hover,html body .jr-favorite[aria-pressed=true]{color:#f1c84b}

/* Calendar legend: fixed widths, so moving the mouse never changes its height */
html body .fomc-legend .fl-time{display:inline-block;min-width:150px;white-space:nowrap}
html body .fomc-legend .fl-item{white-space:nowrap}
html body .fomc-legend .fl-item b{display:inline-block;min-width:44px;text-align:right;font-variant-numeric:tabular-nums}
html body #fomc-history{contain:strict}
