/* Daylight palette: neutral surfaces, ink typography and restrained jade accents. */
.theme-toggle{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;padding:7px;border:1px solid var(--border,#294252);border-radius:50%;background:var(--surface-2,#102333);color:var(--muted,#93a9b9);cursor:pointer}.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.theme-toggle:hover{color:var(--accent,#75dfd1)}.theme-toggle:focus-visible{outline:2px solid var(--accent,#75dfd1);outline-offset:3px}.auth-theme-toggle{position:absolute;right:20px;top:max(18px,env(safe-area-inset-top));z-index:3;width:36px;height:36px}.topbar{gap:8px}.topbar .theme-toggle{width:30px;height:30px}.topbar .brand{min-width:0}.topbar .mode-pill{margin-left:auto}@media(max-width:420px){.topbar{padding-inline:12px;gap:6px}.topbar .brand{font-size:14px}.topbar .brand span{display:none}.topbar .icon-button{width:28px;height:32px}.topbar .mode-pill{font-size:10px;padding:3px 5px}.topbar .avatar-button{width:30px;height:30px}}
:root[data-theme="light"]{color-scheme:light;--bg:#f3f6f8;--surface:#ffffff;--surface-2:#f4f7f9;--surface-3:#eaf0f4;--border:#dfe7ec;--text:#192c3c;--muted:#647889;--accent:#087f6b;--accent-soft:#e7f5ef;--blue:#326baa;--blue-soft:#eaf1fb;--warning:#99691a;--danger:#c6435d;--danger-soft:#fff0f3}
[data-theme="light"] body{background:radial-gradient(ellipse at 90% 0,#e8f4f1,transparent 34rem),var(--bg);color:var(--text)}
[data-theme="light"] .topbar{background:#f9fbfceF;border-bottom-color:var(--border)}[data-theme="light"] .topbar .brand span{color:#607e87}[data-theme="light"] .mode-pill{color:#367d6e;border-color:#d0e5dc;background:#eef7f3}[data-theme="light"] .avatar-button{box-shadow:none;background:linear-gradient(145deg,#c9eee2,#8fd6c1);border-color:#a6d7c9;color:#185c4d}
[data-theme="light"] :is(.panel,.portfolio-card,.profile-card,.market-insight-card,.settings-group,.ai-brief-card){background:#fff;border-color:var(--border);box-shadow:0 4px 20px #29475205}
[data-theme="light"] :is(.portfolio-card,.funding-card){background:linear-gradient(120deg,#fff 25%,#eef7f4);border-color:#d8e8e1;box-shadow:0 8px 25px #44685e07}
[data-theme="light"] .portfolio-card::after{border-color:#087f6b0b;box-shadow:0 0 0 25px #087f6b03,0 0 0 50px #087f6b02}
[data-theme="light"] .polished-profile{background:none;border:0;box-shadow:none}
[data-theme="light"] .bottom-nav{background:#fffffff2;border-color:var(--border);box-shadow:0 -5px 24px #20374704}[data-theme="light"] .bottom-nav button{color:#6b7e8c}[data-theme="light"] .bottom-nav button.active{color:var(--accent)}[data-theme="light"] .bottom-nav button.active::before{box-shadow:none}
[data-theme="light"] :is(.portfolio-head p,.live-copy,.empty,.muted,.asset-context,.asset-conversion,.home-assets .balance-row>span,.home-assets .period-buttons select,.home-running small,.home-run-metrics small,.recommend-card>small,.exchange-balance small,.balance-details,.profile-menu small,.polished-profile .profile-info small,.news-tabs button,.feed-status,.feed-time,.news-time,.news-entry>small,.news-entry p,.insight-time,.insight-source,.ratio-scope,.scale-labels,.fear-value span,.insight-empty,.help-item p,.rule-list dt,.live-row small,.metric-grid small,.drawer-brand,.drawer-links span,.bt-heading p,.bt-back,.bt-config,.bt-config small,.bt-quote span,.bt-legend,.bt-metrics span,.bt-event small,.bt-return small,.bt-return em,.bt-result details,.bt-controls label,.bt-interval,.bt-cancel,.copy-demo-note,.copy-footnote,.copy-performance small,.copy-metrics small,.copy-identity>span,.copy-metrics em,.copy-route small,.copy-preview-rules span,.strategy-detail-title .eyebrow,.strategy-detail-actions small,.strategy-back,.strategy-row-arrow,.strategy-row-metric b:not(.positive),.copy-intro p,.avatar-editor small){color:var(--muted)}
[data-theme="light"] :is(.profile-menu>button,.profile-menu>a,.drawer-links button,.news-entry a,.news-tabs button.active,.bt-config b,.copy-preview-rules b,.copy-preview-result p,.copy-preview-result small,.adaptive-research summary){color:var(--text)}
[data-theme="light"] :is(.live-row,.news-entry,.profile-menu>button,.profile-menu>a,.drawer-links button,.help-item,.exchange-balance,.home-assets .period-buttons,.strategy-market-row,.copy-card footer,.bt-event,.bt-metrics,.bt-return,.adaptive-research){border-color:var(--border)}
[data-theme="light"] :is(.text-action,.recommend-link,.news-entry a>small,.bt-eyebrow,.live-form .avatar-upload,.copy-kicker){color:var(--accent)}
[data-theme="light"] .news-time span{color:#536d7c}
[data-theme="light"] :is(.demo-label,.paper-badge,.bt-badge){background:#f1f6f6;border-color:#dfe9e8;color:#527269}
[data-theme="light"] :is(.live-form input,.live-form select,.live-form textarea,.bt-controls select,.bt-interval select){background:#f8fafb;border-color:#d7e2e8;color:var(--text)}
[data-theme="light"] input::placeholder{color:#81919f}[data-theme="light"] .live-form label{color:#5e7483}[data-theme="light"] input:focus-visible,[data-theme="light"] select:focus-visible{outline:2px solid #087f6b55;outline-offset:2px}
[data-theme="light"] .live-button{background:#137e6c;color:#fff}[data-theme="light"] .live-button.secondary{background:#eff5f6;border-color:#d7e4e7;color:#365768}[data-theme="light"] .live-button.danger{background:#fff0f3;color:#b73752}[data-theme="light"] .status-banner{background:#f0f7f4;border-color:#d3e6dd;color:#3e6e60}
[data-theme="light"] :is(.home-assets select,.period-buttons button,.bt-periods button,.strategy-filters button,.market-filters button){background:#f7faf9;border-color:#d9e4e4;color:#5f7684}[data-theme="light"] :is(.period-buttons button.active,.bt-periods button.active,.strategy-filters button.active,.market-filters button.active){background:#e3f2ec;border-color:#b6dacc;color:#126d58}[data-theme="light"] .asset-context select{background:#ffffff90;border-color:#d9e4e1}
[data-theme="light"] :is(.recommend-card,.strategy-detail-actions button){background:#f7fafb;border-color:#e0e8ec;color:var(--text);box-shadow:none}[data-theme="light"] .strategy-detail-actions button>span{color:var(--accent)}
[data-theme="light"] .strategy-running-card{background:linear-gradient(125deg,#fff,#eff7f4);border-color:#d8e7e0;box-shadow:none}[data-theme="light"] .running-stat{border-color:#dce7e4}[data-theme="light"] .running-stat span{color:var(--muted)}[data-theme="light"] .strategy-overview .running-stat strong:has(.positive){color:var(--accent)}[data-theme="light"] .strategy-overview .running-stat strong:has(.negative){color:var(--danger)}[data-theme="light"] .strategy-market-row:hover{background:#f5f9fa}
[data-theme="light"] .plaza-tabs{background:#edf2f5;border-color:#e1e8ed}[data-theme="light"] .plaza-tabs button{color:#647987}[data-theme="light"] .plaza-tabs button.active{background:#fff;border-color:#d7e4e2;color:#176f5c;box-shadow:0 2px 6px #20374708}
[data-theme="light"] .copy-card{--copy-accent:#177c68;background:#fff;border-color:#dce6eb;box-shadow:0 3px 12px #29475204}[data-theme="light"] .copy-card.blue{--copy-accent:#326caa}[data-theme="light"] .copy-card.violet{--copy-accent:#7860ab}[data-theme="light"] .copy-avatar{background:#f4f8f9;border-color:#e0e8eb}[data-theme="light"] .copy-exchange{background:#f5f7f9;border-color:#e2e8ee;color:#60788b}[data-theme="light"] .copy-tags span{background:#f2f6f8;color:#5e7685}[data-theme="light"] .copy-card footer button{background:#edf7f2;border-color:#cee5d9;color:#25775e}[data-theme="light"] .copy-path{color:#607c89}[data-theme="light"] .copy-path>span:not(:nth-child(2)){background:#f5f9fa;border-color:#dce6ea}[data-theme="light"] .copy-route{background:#f6f9fa;border-color:#dfe8eb}[data-theme="light"] .copy-route>span{color:var(--accent)}[data-theme="light"] .copy-preview-result{background:#eff8f3;border-color:#d1e7d9}[data-theme="light"] .copy-preview-result b{color:#23755b}
[data-theme="light"] :is(dialog,.account-drawer){color:var(--text);background:#fff;border-color:#d8e3e9;box-shadow:0 20px 80px #162f4426}[data-theme="light"] dialog::backdrop{background:#18304255;backdrop-filter:blur(4px)}[data-theme="light"] dialog#modal #modal-close,[data-theme="light"] .drawer-close{background:#eff3f6;color:#526c7d;border-color:#e0e7ed}[data-theme="light"] .account-drawer{background:linear-gradient(155deg,#f1f8f5,#fff 45%)}[data-theme="light"] .auth-logout{color:#b5425a;border-color:#eedce0;background:#fff7f8}
[data-theme="light"] .fear-value strong{color:var(--accent)}[data-theme="light"] .ratio-values span{color:#087b65}[data-theme="light"] .ratio-values span:last-child{color:#c3465d}[data-theme="light"] .sentiment-scale i{box-shadow:0 0 0 2px #fff;background:#3f5868}[data-theme="light"] .chart polyline{stroke:#178f79}[data-theme="light"] .exchange-logo{background:#edf3fd;color:#38699f;border-color:#d7e4f7}
[data-theme="light"] .bt-progress{background:#e1e9ed}[data-theme="light"] .bt-progress i{background:#299a80}[data-theme="light"] .bt-stage .live-title span{color:#367b69}[data-theme="light"] .bt-error{background:#fff1f3;color:#ac3450;border-color:#f1d0d9}[data-theme="light"] .bt-event-icon{background:#e8f5ed;color:#217e5e}[data-theme="light"] .bt-event-icon.exit{background:#fff3df;color:#9b6621}[data-theme="light"] .bt-dot{background:#248465}[data-theme="light"] .bt-dot.close{background:#a86d23}[data-theme="light"] #toast{background:#223b4b;color:#fff;box-shadow:0 8px 30px #1c34422b}
/* Auth shares the user's theme without changing admin styling. */
[data-theme="light"] .auth-screen:not(.auth-admin){--auth-bg:#f3f6f8;--auth-text:#192c3c;--auth-muted:#647889;--auth-border:#d9e3e9;--auth-accent:#087f6b;background:#f3f6f8;color:var(--auth-text);color-scheme:light}
[data-theme="light"] .auth-screen:not(.auth-admin)::before{background:radial-gradient(ellipse at 25% 10%,#dfeee6,transparent 55%)}[data-theme="light"] .auth-screen:not(.auth-admin)::after{opacity:.25}
[data-theme="light"] .auth-screen:not(.auth-admin) .auth-shell{background:#fff;border-color:#e0e8ed;box-shadow:0 20px 70px #264e4d09}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-brand{background:#edf6f1;color:var(--text)}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-panel{background:#fff;border-color:#dfe8e7}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-panel h1{color:var(--text)}[data-theme="light"] .auth-screen:not(.auth-admin) :is(.auth-subtitle,.auth-field label,.auth-demo-note,.auth-eye,.auth-wordmark>span,.auth-switch-line){color:#60798a}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-field input{color:var(--text);background:#f7fafb;border-color:#d7e3e8;box-shadow:none}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-field input:-webkit-autofill{-webkit-text-fill-color:#192c3c;-webkit-box-shadow:0 0 0 1000px #f7fafb inset}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-field input:focus{border-color:#75b8a3;box-shadow:0 0 0 3px #087f6b0a}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-submit{background:#147d69;color:#fff;border-color:#147d69;box-shadow:0 6px 18px #147d6915}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-switch{color:#13735f}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-symbol{background:linear-gradient(145deg,#fff,#dcf0e7);color:#28866c;border-color:#b4daca;box-shadow:0 8px 30px #2b816f0a}[data-theme="light"] .auth-symbol svg{filter:none}[data-theme="light"] .auth-symbol::after{background:#71b9a1;box-shadow:none}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-message[data-error="true"]{color:#bd3f57}[data-theme="light"] .auth-screen:not(.auth-admin) .auth-demo-note{border-color:#e1e8eb}
@media(max-width:700px){[data-theme="light"] .auth-screen:not(.auth-admin) :is(.auth-shell,.auth-panel,.auth-brand){background:none;border:0;box-shadow:none}}
[data-theme="light"] .profile-sheet{--profile-line:#e3eaed;--profile-field:#f5f8f9;--profile-ink:#223844;--profile-muted:#70838e;--profile-accent:#247c64}[data-theme="light"] .portrait-camera{border-color:#fff;background:#deeee7;color:#35765e}[data-theme="light"] .profile-portrait .avatar{background:linear-gradient(145deg,#e1f2e9,#b8dfcd);color:#36715e;box-shadow:0 6px 20px #355e4810}
/* A permanent LD monogram; the separate account avatar is home-only. */
.topbar .platform-identity{display:flex;align-items:center;gap:10px;min-width:0;margin-right:auto}.topbar .home-user-avatar{width:29px;height:29px;flex:0 0 29px;border-radius:8px;padding:0;overflow:hidden;box-shadow:none;border:1px solid #47796e;background:#214e44;color:#b8eadb;font-size:12px;font-weight:600}.topbar .home-user-avatar[hidden]{display:none!important}.topbar .platform-brand{display:flex;gap:9px;align-items:center;flex-shrink:0}.topbar .platform-brand .platform-symbol{display:grid;place-items:center;width:33px;height:36px;flex-shrink:0;border-radius:10px;background:linear-gradient(150deg,#234840,#122d2a);border:1px solid #4e79695e;color:#bbe4cd;box-shadow:inset 0 1px 0 #d5f3d90d;font-size:inherit}.platform-symbol svg{width:29px;height:29px}.topbar .platform-brand .platform-wordmark{display:flex;flex-direction:column;gap:4px;color:var(--text);line-height:1.1}.platform-wordmark b{font-size:16px;letter-spacing:.07em;font-weight:600;white-space:nowrap}.platform-wordmark .platform-tagline{font-size:7px;letter-spacing:.12em;color:var(--muted);font-weight:500;white-space:nowrap}.topbar .mode-pill{margin-left:0}.home-user-avatar:focus-visible,.platform-brand:focus-visible{outline:2px solid var(--accent);outline-offset:4px}[data-theme="light"] .topbar .platform-brand .platform-symbol{background:linear-gradient(145deg,#1c5749,#174839);border-color:#194e40;color:#e0eddf;box-shadow:0 3px 10px #285a4610}[data-theme="light"] .topbar .home-user-avatar{background:#e4efe9;border-color:#c8ddd2;color:#337361}@media(max-width:420px){.topbar .platform-identity{gap:7px}.topbar .platform-brand{gap:7px}.topbar .platform-brand .platform-symbol{width:28px;height:32px;border-radius:9px}.platform-symbol svg{width:25px;height:25px}.platform-wordmark b{font-size:13px;letter-spacing:.03em}.platform-wordmark .platform-tagline{font-size:6px;letter-spacing:.025em}.topbar .platform-brand .platform-wordmark{gap:4px}.topbar .home-user-avatar{width:26px;height:26px;flex-basis:26px;border-radius:7px}}@media(max-width:360px){.topbar{gap:4px;padding-inline:10px}.topbar .platform-identity{gap:6px}.topbar .platform-brand{gap:6px}.topbar .icon-button{width:25px}.topbar .theme-toggle{width:27px}.topbar .mode-pill{padding:3px 4px;font-size:9px}}
.topbar .platform-wordmark b{color:var(--text)}
[data-theme="light"] :is(.wallet-card,.exchange-sheet){--wallet-ink:#233947;--wallet-muted:#708390;--wallet-line:#e3eaed;--wallet-soft:#f3f7f6;--wallet-accent:#287961}[data-theme="light"] .wallet-card{background:linear-gradient(135deg,#fff 55%,#f7faf9);border-color:#dee8e5;box-shadow:0 4px 18px #23483a05}[data-theme="light"] .exchange-brand-icon{border-color:#e5ebef}[data-theme="light"] .exchange-brand-icon.weex{border-color:#111}

/* Restrained depth shared by controls, with lighter treatment for list rows. */
:root{--control-top:#ffffff18;--control-bottom:#0005;--control-shadow:#0002;--control-pressed:#0004}
:root[data-theme="light"]{--control-top:#fff;--control-bottom:#2542581c;--control-shadow:#25425812;--control-pressed:#25425818}
body :is(button,a.live-button,[role="button"]){box-shadow:inset 0 1px 0 var(--control-top),inset 0 -1px 0 var(--control-bottom),0 2px 0 var(--control-bottom),0 4px 10px var(--control-shadow)!important;transition:box-shadow .16s ease,translate .16s ease,filter .16s ease;-webkit-tap-highlight-color:transparent}
body :is(.live-button,.auth-submit,.auth-code-button){box-shadow:inset 0 1px 0 #ffffff50,inset 0 -1px 0 var(--control-bottom),0 3px 0 var(--control-bottom),0 6px 14px var(--control-shadow)!important}
body :is(.text-action,.profile-sheet-back,.exchange-remove,.strategy-back,.news-tabs button,.profile-menu>button,.drawer-links button,.security-menu button,.wallet-exchange,.exchange-connection-row,.strategy-market-row){box-shadow:inset 0 1px 0 #ffffff04,0 1px 2px var(--control-shadow)!important}
body :is(.topbar .icon-button,.bottom-nav button){border-radius:9px}
body .bottom-nav button{box-shadow:inset 0 1px 0 var(--control-top),0 2px 4px var(--control-shadow)!important}
body :is(button,a.live-button,[role="button"]):focus-visible{outline:2px solid var(--accent,#75dfd1);outline-offset:3px}
@media(hover:hover){body :is(button,a.live-button,[role="button"]):not(:disabled):hover{filter:brightness(1.04)}}
body :is(button,a.live-button,[role="button"]):not(:disabled):active{translate:0 1px;box-shadow:inset 0 2px 4px var(--control-pressed),0 1px 0 var(--control-top)!important}
body button:disabled{translate:none;box-shadow:inset 0 1px 0 var(--control-top)!important}
[data-theme="light"] .exchange-brand-icon{border-color:#e3e9ee;box-shadow:inset 0 1px 0 #fff,0 2px 0 #cbd5df80,0 4px 8px #25425812}
[data-theme="light"] .exchange-brand-icon.weex{border-color:#363a40;box-shadow:inset 0 1px 0 #ffffff25,0 2px 0 #090c1250,0 4px 8px #25425818}
@media(prefers-reduced-motion:reduce){body :is(button,a.live-button,[role="button"]){transition:none}body :is(button,a.live-button,[role="button"]):active{translate:none}}

/* Header icon controls share one box; zero padding prevents SVG overflow on mobile. */
body .topbar :is(.icon-button,.theme-toggle){box-sizing:border-box;display:flex;align-items:center;justify-content:center;align-self:center;flex:0 0 32px;width:32px;height:32px;min-width:0;min-height:0;padding:0;margin:0;line-height:1;border:1px solid var(--border,#294252);border-radius:9px;background:var(--surface-2,#102333);box-shadow:inset 0 1px 0 var(--control-top),0 1px 0 var(--control-bottom),0 2px 5px var(--control-shadow)!important}
body .topbar :is(.icon-button,.theme-toggle)>svg{display:block;flex:0 0 18px;width:18px;height:18px;margin:0;padding:0;overflow:visible}
@media(max-width:420px){body .topbar :is(.icon-button,.theme-toggle){width:28px;height:28px;flex-basis:28px;border-radius:8px}body .topbar :is(.icon-button,.theme-toggle)>svg{width:17px;height:17px;flex-basis:17px}}
@media(max-width:360px){body .topbar :is(.icon-button,.theme-toggle){width:26px;height:26px;flex-basis:26px}}

/* Distinct SVG navigation icons, consistent strokes and restrained active surfaces. */
body .bottom-nav{padding-top:5px;column-gap:4px}
body .bottom-nav button{padding:3px 0 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1;box-shadow:none!important;border-radius:12px}
body .bottom-nav button::before{display:none}
body .bottom-nav .nav-icon{display:flex;align-items:center;justify-content:center;width:40px;height:32px;border:1px solid transparent;border-radius:10px;box-sizing:border-box;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease}
body .bottom-nav .nav-icon svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
body .bottom-nav .nav-label{display:block;font-size:10px;font-weight:500;line-height:14px;letter-spacing:.04em}
body .bottom-nav button.active .nav-icon{background:linear-gradient(145deg,#25443e,#142e2c);border-color:#8bd7c329;box-shadow:inset 0 1px 0 #ffffff14,0 2px 4px #0002}
body .bottom-nav button.active .nav-label{font-weight:600}
[data-theme="light"] body .bottom-nav button.active .nav-icon{background:linear-gradient(145deg,#f0fbf6,#dcefe6);border-color:#c7e2d7;box-shadow:inset 0 1px 0 #fff,0 2px 3px #224b3d0c}
body .bottom-nav button:not(:disabled):active{box-shadow:none!important}
body .bottom-nav button:not(:disabled):active .nav-icon{box-shadow:inset 0 2px 3px var(--control-pressed)}
@media(prefers-reduced-motion:reduce){body .bottom-nav .nav-icon{transition:none}}

/* Obsidian night palette: neutral surfaces, silver controls, semantic market colors. */
:root[data-theme="dark"]{color-scheme:dark;--bg:#080809;--surface:#121214;--surface-2:#1b1b1e;--surface-3:#242427;--border:#303034;--text:#f0f0f2;--muted:#99999f;--accent:#e2e2e6;--accent-soft:#ffffff0c;--blue:#94b9ed;--blue-soft:#94b9ed14;--danger:#f08090;--danger-soft:#f0809012;--control-top:#ffffff12;--control-bottom:#0007;--control-shadow:#0003;--control-pressed:#0005}
[data-theme="dark"] body{background:var(--bg);color:var(--text)}
[data-theme="dark"] .topbar{background:#0c0c0eef;border-color:#ffffff0b}
[data-theme="dark"] :is(.panel,.portfolio-card,.profile-card,.market-insight-card,.settings-group,.ai-brief-card){background:#141416;border-color:#2a2a2e;box-shadow:0 5px 20px #0002}
[data-theme="dark"] :is(.home-assets,.funding-card,.wallet-card,.strategy-running-card){background:linear-gradient(135deg,#222225,#141416 75%);border-color:#353539}
[data-theme="dark"] .portfolio-card::after{border-color:#ffffff04;box-shadow:0 0 0 25px #ffffff02,0 0 0 50px #ffffff01}
[data-theme="dark"] .polished-profile{background:none;border:0;box-shadow:none}
[data-theme="dark"] .bottom-nav{background:#101012f5;border-color:#ffffff10;box-shadow:0 -6px 24px #0003}
[data-theme="dark"] body .bottom-nav button{color:#898990}
[data-theme="dark"] body .bottom-nav button.active{color:#f3f3f5}
[data-theme="dark"] body .bottom-nav button.active .nav-icon{background:linear-gradient(145deg,#36363b,#232326);border-color:#ffffff1c;box-shadow:inset 0 1px 0 #ffffff16,0 2px 4px #0004}
[data-theme="dark"] .topbar .platform-brand .platform-symbol{background:linear-gradient(145deg,#37373d,#1b1b1e);border-color:#ffffff20;color:#eeeeef;box-shadow:inset 0 1px 0 #ffffff10}
[data-theme="dark"] :is(.mode-pill,.demo-label,.paper-badge,.bt-badge){background:#202023;border-color:#38383d;color:#bcbcc2}
[data-theme="dark"] :is(.avatar-button,.topbar .home-user-avatar,.profile-portrait .avatar,.account-drawer .avatar){background:linear-gradient(145deg,#414146,#262629);color:#eeeef0;border-color:#505056}
[data-theme="dark"] :is(.wallet-card,.exchange-sheet){--wallet-ink:#eeeef0;--wallet-muted:#99999f;--wallet-line:#303034;--wallet-soft:#212124;--wallet-accent:#d2d2d8}
[data-theme="dark"] .profile-sheet{--profile-line:#303034;--profile-field:#1e1e21;--profile-ink:#eeeef0;--profile-muted:#99999f;--profile-accent:#d2d2d8}
[data-theme="dark"] .portrait-camera{background:#39393f;color:#eeeef0;border-color:#171719}
[data-theme="dark"] :is(dialog,.account-drawer){background:#171719;border-color:#36363b;color:var(--text);box-shadow:0 24px 80px #0008}
[data-theme="dark"] dialog::backdrop{background:#0009;backdrop-filter:blur(5px)}
[data-theme="dark"] :is(dialog#modal #modal-close,.drawer-close){background:#29292d;color:#c7c7ce;border-color:#404047}
[data-theme="dark"] :is(.live-form input,.live-form select,.live-form textarea,.bt-controls select,.bt-interval select){background:#202023;border-color:#3a3a40;color:var(--text)}
[data-theme="dark"] .live-form label{color:#b6b6bd}
[data-theme="dark"] input::placeholder{color:#818189}
[data-theme="dark"] :is(.live-button,.auth-submit){background:linear-gradient(145deg,#efeff1,#d0d0d6);color:#18181b;border-color:#ffffff40}
[data-theme="dark"] .live-button.secondary{background:linear-gradient(145deg,#2e2e33,#222226);border-color:#414148;color:#e0e0e5}
[data-theme="dark"] .live-button.danger{background:#352227;color:#f5a0ac;border-color:#624047}
[data-theme="dark"] :is(.home-assets select,.period-buttons button,.bt-periods button,.strategy-filters button,.market-filters button){background:#232326;border-color:#37373d;color:#adadb5}
[data-theme="dark"] :is(.period-buttons button.active,.bt-periods button.active,.strategy-filters button.active,.market-filters button.active){background:#3b3b41;border-color:#57575f;color:#f3f3f5}
[data-theme="dark"] :is(.recommend-card,.strategy-detail-actions button,.copy-card){background:linear-gradient(140deg,#202023,#171719);border-color:#343439;color:var(--text)}
[data-theme="dark"] :is(.text-action,.recommend-link,.news-entry a>small,.copy-kicker,.strategy-detail-actions button>span){color:#d0d0d7}
[data-theme="dark"] :is(.strategy-type-icon,.copy-avatar){background:#2a2a2f;border-color:#414147;color:#d6d6dd}
[data-theme="dark"] .strategy-market-row:hover{background:#202023}
[data-theme="dark"] .plaza-tabs{background:#0e0e10;border-color:#303034}
[data-theme="dark"] .plaza-tabs button{color:#9999a2}
[data-theme="dark"] .plaza-tabs button.active{background:linear-gradient(145deg,#35353b,#27272c);border-color:#494951;color:#f2f2f5}
[data-theme="dark"] :is(.running-stat,.live-row,.news-entry,.profile-menu>button,.profile-menu>a,.drawer-links button,.help-item,.home-assets .period-buttons,.strategy-market-row,.copy-card footer,.bt-event,.bt-metrics,.bt-return,.adaptive-research){border-color:#303034}
[data-theme="dark"] :is(.profile-menu>button,.profile-menu>a,.drawer-links button,.news-entry a,.news-tabs button.active,.bt-config b,.copy-preview-rules b){color:#e6e6eb}
[data-theme="dark"] :is(.copy-exchange,.copy-tags span,.copy-path>span:not(:nth-child(2)),.copy-route,.copy-preview-result,.status-banner){background:#232326;border-color:#3b3b41;color:#b7b7bf}
[data-theme="dark"] :is(.copy-card footer button,.copy-preview-result b,.copy-route>span){background:#2a2a2e;border-color:#46464d;color:#dddde3}
[data-theme="dark"] :is(.copy-preview-result p,.copy-preview-result small,.news-time span){color:#b7b7bf}
[data-theme="dark"] .bt-progress{background:#303035}
[data-theme="dark"] .bt-progress i{background:#bfc0c8}
[data-theme="dark"] .bt-stage .live-title span{color:#c9c9d1}
[data-theme="dark"] #toast{background:#35353b;color:#fff;border-color:#50505a;box-shadow:0 8px 30px #0006}
[data-theme="dark"] .positive{color:#72d6aa}
[data-theme="dark"] .negative{color:#f08090}
[data-theme="dark"] .auth-screen:not(.auth-admin){--auth-bg:#080809;--auth-text:#efeff2;--auth-muted:#99999f;--auth-border:#38383e;--auth-accent:#dddde3;background:#080809;color:#efeff2}
[data-theme="dark"] .auth-screen:not(.auth-admin)::before{background:radial-gradient(ellipse at 50% 10%,#ffffff09,transparent 60%)}
[data-theme="dark"] .auth-screen:not(.auth-admin)::after{opacity:.12;filter:grayscale(1)}
[data-theme="dark"] .auth-screen:not(.auth-admin) :is(.auth-shell,.auth-panel,.auth-brand){background:#141416;border-color:#303034}
[data-theme="dark"] .auth-screen:not(.auth-admin) :is(.auth-panel h1,.auth-wordmark strong){color:#eeeef2}
[data-theme="dark"] .auth-screen:not(.auth-admin) :is(.auth-subtitle,.auth-field label,.auth-demo-note,.auth-eye,.auth-wordmark>span,.auth-switch-line){color:#a0a0a9}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-field input{background:#202023;border-color:#393940;color:#eeeef2;box-shadow:inset 0 1px 0 #ffffff05}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-field input:focus{border-color:#858590;box-shadow:0 0 0 3px #ffffff08}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-field input:-webkit-autofill{-webkit-text-fill-color:#eeeef2;-webkit-box-shadow:0 0 0 1000px #202023 inset}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-submit{background:linear-gradient(145deg,#efeff2,#cfcfd6);border-color:#ffffff50;color:#18181b}
[data-theme="dark"] .auth-screen:not(.auth-admin) :is(.auth-code-button,.auth-symbol){background:linear-gradient(145deg,#333339,#202024);border-color:#494951;color:#dcdce3}
[data-theme="dark"] .auth-symbol svg{filter:none}
[data-theme="dark"] .auth-symbol::after{background:#bfbfc9;box-shadow:none}
[data-theme="dark"] .auth-brand-rule{background:linear-gradient(90deg,transparent,#9c9ca7,transparent);box-shadow:none}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-switch{color:#d8d8df}
@media(max-width:700px){[data-theme="dark"] .auth-screen:not(.auth-admin) :is(.auth-shell,.auth-panel,.auth-brand){background:none;border:0;box-shadow:none}}
[data-theme="dark"] :is(.portfolio-head p,.live-copy,.empty,.muted,.asset-context,.asset-conversion,.home-assets .balance-row>span,.home-assets .period-buttons select,.home-running small,.home-run-metrics small,.recommend-card>small,.exchange-balance small,.balance-details,.profile-menu small,.polished-profile .profile-info small,.news-tabs button,.feed-status,.feed-time,.news-time,.news-entry>small,.news-entry p,.insight-time,.insight-source,.ratio-scope,.scale-labels,.fear-value span,.insight-empty,.help-item p,.rule-list dt,.live-row small,.metric-grid small,.drawer-brand,.drawer-links span,.bt-heading p,.bt-back,.bt-config,.bt-config small,.bt-quote span,.bt-legend,.bt-metrics span,.bt-event small,.bt-return small,.bt-return em,.bt-result details,.bt-controls label,.bt-interval,.bt-cancel,.copy-demo-note,.copy-footnote,.copy-performance small,.copy-metrics small,.copy-identity>span,.copy-metrics em,.copy-route small,.copy-preview-rules span,.strategy-detail-title .eyebrow,.strategy-detail-actions small,.strategy-back,.strategy-row-arrow,.strategy-row-metric b:not(.positive),.copy-intro p,.avatar-editor small){color:var(--muted)}

/* Balanced period controls and a time-proportional, shape-preserving asset curve. */
body .home-assets .period-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;gap:6px;width:100%}
body .home-assets .period-buttons>button,body .home-assets .more-period>summary{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:4px;width:100%;height:32px;min-width:0;margin:0;padding:0 3px;border:1px solid var(--border);border-radius:8px;background:var(--surface-2);color:var(--muted);font:inherit;font-size:11px;line-height:1;cursor:pointer;box-shadow:inset 0 1px 0 var(--control-top),0 2px 3px var(--control-shadow)!important}
body .home-assets .period-buttons>button.active,body .home-assets .more-period>summary.active{background:var(--surface-3);color:var(--accent);border-color:var(--muted)}
body .home-assets .more-period{position:relative;min-width:0;z-index:2}
body .home-assets .more-period>summary{list-style:none}
body .home-assets .more-period>summary::-webkit-details-marker{display:none}
body .home-assets .more-period>summary svg{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:1.4;flex:none}
body .home-assets .more-period>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body .home-assets .period-menu{position:absolute;top:38px;right:0;width:100px;padding:5px;display:grid;gap:4px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 6px 20px #0003}
body .home-assets .period-menu button{width:100%;height:32px;margin:0;padding:0;color:var(--text);background:var(--surface-2);border-radius:6px;border:0}
body .home-assets .equity-curve{display:block;width:100%;height:110px;margin:12px 0 0;overflow:visible;color:#c3c4d1}
[data-theme="light"] body .home-assets .equity-curve{color:#338f7c}
.equity-line{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.equity-grid{fill:none;stroke:var(--muted);stroke-opacity:.1;stroke-width:.6;vector-effect:non-scaling-stroke}
.equity-point{fill:currentColor;stroke:var(--surface);stroke-width:1.5;vector-effect:non-scaling-stroke}
.curve-range{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:9px;line-height:1.5;margin-top:5px;font-variant-numeric:tabular-nums}
.curve-range>span:last-child{text-align:right}.curve-loading{min-height:110px;display:grid;place-items:center;color:var(--muted);font-size:11px}

/* Reference-led night refresh: black canvas, charcoal surfaces, electric-lime accents. */
:root[data-theme="dark"]{--bg:#000;--surface:#171717;--surface-2:#212121;--surface-3:#303030;--border:#333;--text:#f5f5f5;--muted:#969696;--accent:#c1ff35;--accent-soft:#c1ff3512;--danger:#f34e9d;--danger-soft:#f34e9d15}
[data-theme="dark"] .topbar{background:#080808f2}
[data-theme="dark"] :is(.panel,.portfolio-card,.profile-card,.market-insight-card,.settings-group,.ai-brief-card){background:#191919;border-color:#2a2a2a}
[data-theme="dark"] :is(.home-assets,.funding-card,.wallet-card,.strategy-running-card){background:linear-gradient(135deg,#202020,#141414);border-color:#303030}
[data-theme="dark"] .polished-profile{background:none;border:0}
[data-theme="dark"] .topbar .platform-brand .platform-symbol{background:linear-gradient(145deg,#262a1c,#171914);border-color:#c1ff3526;color:#c1ff35}
[data-theme="dark"] :is(.live-button,.auth-screen:not(.auth-admin) .auth-submit){background:linear-gradient(145deg,#d0ff60,#b9f52e);color:#111600;border-color:#d9ff88}
[data-theme="dark"] .live-button.secondary{background:linear-gradient(145deg,#303030,#232323);border-color:#414141;color:#eee}
[data-theme="dark"] .live-button.danger{background:#32101f;color:#ff79b8;border-color:#702c4b}
[data-theme="dark"] body .bottom-nav{background:#080808f7;border-color:#242424}
[data-theme="dark"] body .bottom-nav button.active{color:#c1ff35}
[data-theme="dark"] body .bottom-nav button.active .nav-icon{background:linear-gradient(145deg,#282e1a,#191d12);border-color:#c1ff3524;box-shadow:inset 0 1px 0 #e6ffad12,0 2px 4px #0004}
[data-theme="dark"] body .home-assets .equity-curve{color:#c1ff35}
[data-theme="dark"] body .home-assets .period-buttons>button.active,[data-theme="dark"] body .home-assets .more-period>summary.active{background:#2c2c2c;color:#c1ff35;border-color:#c1ff3540}
[data-theme="dark"] :is(.bt-periods button.active,.strategy-filters button.active,.market-filters button.active){background:#2c2c2c;color:#c1ff35;border-color:#c1ff3540}
[data-theme="dark"] .plaza-tabs button.active{background:linear-gradient(145deg,#343434,#282828);border-color:#535a41;color:#c1ff35}
[data-theme="dark"] :is(.text-action,.recommend-link,.news-entry a>small,.strategy-detail-actions button>span,.auth-screen:not(.auth-admin) .auth-switch){color:#c5ed77}
[data-theme="dark"] :is(.wallet-card,.exchange-sheet){--wallet-accent:#c5ed77}
[data-theme="dark"] .profile-sheet{--profile-accent:#c5ed77}
[data-theme="dark"] .portrait-camera{background:#c1ff35;color:#171d0b;border-color:#171717}
[data-theme="dark"] .strategy-type-icon.adaptive{background:#c1ff3512;color:#c1ff35;border-color:#c1ff352a}
[data-theme="dark"] .strategy-type-icon.trend{background:#ad95ff14;color:#bca4ff;border-color:#ad95ff2a}
[data-theme="dark"] .strategy-type-icon.oscillator{background:#ffc27314;color:#ffc273;border-color:#ffc2732a}
[data-theme="dark"] .copy-card{--copy-accent:#c1ff35}
[data-theme="dark"] .copy-card.blue{--copy-accent:#8ebdff}
[data-theme="dark"] .copy-card.violet{--copy-accent:#b9a0ff}
[data-theme="dark"] .copy-avatar{color:var(--copy-accent)}
[data-theme="dark"] .copy-card footer button{background:#282c21;color:#c5ed77;border-color:#454e34}
[data-theme="dark"] .positive{color:#c1ff35}
[data-theme="dark"] .negative{color:#f34e9d}
[data-theme="dark"] .market-row .positive{background:#c1ff3514;border-radius:6px;padding:6px 8px}
[data-theme="dark"] .market-row .negative{background:#f34e9d14;border-radius:6px;padding:6px 8px}
[data-theme="dark"] .fear-value strong{color:#c1ff35}
[data-theme="dark"] .ratio-values span{color:#c1ff35}
[data-theme="dark"] .ratio-values span:last-child{color:#f34e9d}
[data-theme="dark"] .ratio-scale{background:#d84b90}
[data-theme="dark"] .ratio-scale span{background:#b4e73d}
[data-theme="dark"] .sentiment-scale{background:linear-gradient(90deg,#e35e9c,#e0bc69,#b9ec47)}
[data-theme="dark"] .bt-progress i{background:#c1ff35}
[data-theme="dark"] .bt-dot{background:#c1ff35}
[data-theme="dark"] .bt-event-icon{background:#c1ff3512;color:#c1ff35}
[data-theme="dark"] .bt-event-icon.exit{background:#ffc27315;color:#ffc273}
[data-theme="dark"] .bt-error{background:#32101f;border-color:#702c4b;color:#ff79b8}
[data-theme="dark"] .auth-screen:not(.auth-admin){--auth-bg:#000;--auth-accent:#c1ff35;background:#000}
[data-theme="dark"] .auth-screen:not(.auth-admin)::before{background:radial-gradient(ellipse at 50% 8%,#c1ff3508,transparent 52%)}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-symbol{background:linear-gradient(145deg,#2b3020,#171914);border-color:#c1ff3530;color:#c1ff35}
[data-theme="dark"] .auth-symbol::after{background:#c1ff35;box-shadow:0 0 12px #c1ff3522}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-field input:focus{border-color:#a0be63;box-shadow:0 0 0 3px #c1ff350a}
[data-theme="dark"] .auth-screen:not(.auth-admin) .auth-code-button{background:#272727;color:#c5ed77;border-color:#454b3b}

/* Hide scroll indicators while retaining native touch, wheel and keyboard scrolling. */
html,body,body *{scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar,body::-webkit-scrollbar,body *::-webkit-scrollbar{display:none;width:0;height:0}
/* Compact asset summary with balanced spacing rather than scaling its contents. */
body .home-assets{padding:18px 20px 15px!important}
body .home-assets .portfolio-head{gap:12px}
body .home-assets .portfolio-head p{font-size:13px;line-height:1.5}
body .home-assets .portfolio-head select{padding:5px 8px;font-size:11px;min-height:28px}
body .home-assets .balance-row{margin:11px 0 8px;gap:7px;flex-wrap:wrap}
body .home-assets .balance-row strong{font-size:clamp(27px,7.6vw,35px);line-height:1.15;letter-spacing:-.035em}
body .home-assets .balance-row>span{font-size:11px;margin-bottom:3px}
body .home-assets .asset-context{gap:8px;flex-wrap:wrap;line-height:1.5;font-size:10px}
body .home-assets .asset-context select{padding:4px 5px}
body .home-assets .period-buttons{margin-top:11px;padding-top:11px;gap:6px}
body .home-assets .equity-curve{height:88px;margin-top:9px}
body .home-assets .curve-range{margin-top:3px;font-size:9px;line-height:1.4}
body .home-assets .curve-loading{min-height:88px}
body .home-assets #curve>.empty{min-height:88px;display:grid;place-items:center;padding:12px 0 6px;font-size:11px;line-height:1.6}
body .home-assets .asset-conversion{margin-top:5px;line-height:1.5}
@media(max-width:360px){body .home-assets{padding:16px 16px 14px!important}body .home-assets .period-buttons{gap:5px}}
@media(min-width:850px){body .home-assets{padding:20px 24px 17px!important}body .home-assets .equity-curve{height:100px}}

/* Collapsed balance-side sparkline; full controls appear only on explicit expansion. */
body .home-assets .asset-balance-preview{display:grid;grid-template-columns:minmax(0,1fr) 90px;align-items:center;gap:12px;margin:8px 0 7px}
body .home-assets .asset-balance-preview .balance-row{min-width:0;margin:0;row-gap:3px}
body .home-assets .asset-balance-preview .balance-row strong{max-width:100%;overflow-wrap:anywhere;font-size:clamp(25px,7vw,35px)}
body .home-assets .asset-spark-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:90px;min-height:65px;margin:0;padding:0;border:0;border-radius:9px;background:transparent;color:var(--accent);box-shadow:none!important}
body .home-assets #asset-sparkline{display:grid;place-items:center;width:90px;height:52px}
body .home-assets #asset-sparkline>svg{display:block;width:90px;height:52px}
body .home-assets #asset-sparkline>small{font-size:10px;color:var(--muted);font-weight:400}
body .home-assets .spark-chevron{width:10px;height:10px;fill:none;stroke:var(--muted);stroke-width:1.4;transition:transform .18s ease}
body .home-assets .asset-spark-button[aria-expanded="true"] .spark-chevron{transform:rotate(180deg)}
body .home-assets #asset-curve-detail[hidden]{display:none!important}
body .home-assets #asset-curve-detail:not([hidden]){animation:asset-detail-in .18s ease-out}
@keyframes asset-detail-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:360px){body .home-assets .asset-balance-preview{grid-template-columns:minmax(0,1fr) 72px;gap:8px}body .home-assets .asset-spark-button,body .home-assets #asset-sparkline,body .home-assets #asset-sparkline>svg{width:72px}body .home-assets .asset-balance-preview .balance-row strong{font-size:25px}}
@media(prefers-reduced-motion:reduce){body .home-assets #asset-curve-detail:not([hidden]){animation:none}body .home-assets .spark-chevron{transition:none}}

/* Expanded asset view: compact summary, smaller controls, taller chart. */
body .home-assets:has(.asset-spark-button[aria-expanded="true"]){padding-top:13px!important}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .portfolio-head p{font-size:12px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .portfolio-head select{min-height:24px;padding:3px 6px;font-size:10px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .asset-balance-preview{grid-template-columns:minmax(0,1fr) 72px;margin:3px 0 2px;gap:10px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .balance-row strong{font-size:clamp(23px,6.3vw,30px);line-height:1.12}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .balance-row>span{font-size:10px;margin-bottom:2px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .asset-spark-button{width:72px;min-height:46px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) #asset-sparkline,body .home-assets:has(.asset-spark-button[aria-expanded="true"]) #asset-sparkline>svg{width:66px;height:38px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .spark-chevron{width:8px;height:8px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .asset-context{font-size:9px;line-height:1.4;gap:6px}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .asset-context select{padding:3px 4px;font-size:9px}
body .home-assets #asset-curve-detail .period-buttons{margin-top:8px;padding-top:9px;gap:7px}
body .home-assets #asset-curve-detail .period-buttons>button,body .home-assets #asset-curve-detail .more-period>summary{height:26px;font-size:10px;border-radius:7px}
body .home-assets #asset-curve-detail .period-menu{top:32px}
body .home-assets #asset-curve-detail .equity-curve{height:166px;margin-top:10px}
body .home-assets #asset-curve-detail .curve-loading,body .home-assets #asset-curve-detail #curve>.empty{min-height:166px}
body .home-assets #asset-curve-detail .curve-range{margin-top:4px}
@media(max-width:360px){body .home-assets #asset-curve-detail .period-buttons{gap:5px}body .home-assets #asset-curve-detail .equity-curve{height:150px}}
@media(min-width:850px){body .home-assets #asset-curve-detail .equity-curve{height:190px}}

/* Period extrema use nonzero observations and the selected valuation currency. */
body .home-assets .curve-extremes{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:13px;color:var(--muted);font-size:9px;line-height:1.5}
body .home-assets .curve-extremes>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px;min-width:0;max-width:50%}
body .home-assets .curve-extremes>div:last-child{justify-content:flex-end;text-align:right}
body .home-assets .curve-extremes b{font-size:11px;font-weight:550;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body .home-assets .curve-extremes small{font-size:8px}
body .home-assets #asset-curve-detail .curve-extremes+.equity-curve{margin-top:4px}

/* Data labels are anchored to actual extrema, outside the SVG to avoid text stretching. */
body .home-assets .asset-chart-stage{position:relative;height:166px;margin-top:10px}
body .home-assets #asset-curve-detail .asset-chart-stage .equity-curve{height:100%;margin:0}
.curve-point-label{position:absolute;z-index:1;max-width:95%;font-size:10px;line-height:16px;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--text);background:var(--surface);border-radius:4px;padding:0 4px;pointer-events:none}
.curve-point-label.above{margin-top:-7px;transform:translate(-50%,-100%)}
.curve-point-label.below{margin-top:7px;transform:translate(-50%,0)}
.curve-point-label.left.above{transform:translate(0,-100%)}.curve-point-label.left.below{transform:none}
.curve-point-label.right.above{transform:translate(-100%,-100%)}.curve-point-label.right.below{transform:translate(-100%,0)}
@media(max-width:360px){body .home-assets .asset-chart-stage{height:150px}.curve-point-label{font-size:9px}}
@media(min-width:850px){body .home-assets .asset-chart-stage{height:190px}}

body .home-assets .asset-chart-stage.is-zero .equity-line{stroke:none}
body .home-assets .curve-zero-line{position:absolute;left:1.333%;right:1.333%;bottom:1px;height:2px;background:var(--accent);border-radius:2px}
body .home-assets .asset-chart-stage.is-zero .curve-point-label{top:auto!important;bottom:8px;margin:0;transform:none}

/* White and blue daylight theme; financial gain/loss colors remain semantic. */
:root[data-theme="light"]{--bg:#f4f7fc;--surface:#fff;--surface-2:#f1f5fc;--surface-3:#e5edfb;--border:#dce5f2;--text:#1c2b43;--muted:#78869a;--accent:#3478ed;--accent-soft:#3478ed0d;--blue:#3478ed;--blue-soft:#3478ed12}
[data-theme="light"] body{background:var(--bg)}
[data-theme="light"] .topbar{background:#ffffffed;border-color:#e3eaf4}
[data-theme="light"] :is(.home-assets,.portfolio-card,.wallet-card,.funding-card,.strategy-running-card){background:linear-gradient(135deg,#fff 45%,#f1f6ff);border-color:#dce6f6;box-shadow:0 5px 20px #2e589009}
[data-theme="light"] .portfolio-card::after{border-color:#3478ed05;box-shadow:0 0 0 25px #3478ed02}
[data-theme="light"] .topbar .platform-brand .platform-symbol{background:linear-gradient(145deg,#4488f7,#2860ca);border-color:#2e6bd2;color:#fff;box-shadow:0 3px 8px #3478ed18}
[data-theme="light"] :is(.mode-pill,.demo-label,.paper-badge,.bt-badge){background:#eef4ff;border-color:#d8e5fa;color:#5680ba}
[data-theme="light"] :is(.avatar-button,.topbar .home-user-avatar,.profile-portrait .avatar,.account-drawer .avatar){background:linear-gradient(145deg,#e6efff,#c6dafb);color:#3766aa;border-color:#c4d7f5}
[data-theme="light"] :is(.live-button,.auth-screen:not(.auth-admin) .auth-submit){background:linear-gradient(145deg,#4a8af3,#2d6ce3);border-color:#3573df;color:#fff}
[data-theme="light"] .live-button.secondary{background:#eef4ff;border-color:#d4e2f8;color:#3566ad}
[data-theme="light"] .live-button.danger{background:#fff0f3;border-color:#f3d3db;color:#bd405a}
[data-theme="light"] :is(.recommend-card,.strategy-detail-actions button){background:#f7faff;border-color:#dfe8f6}
[data-theme="light"] :is(.text-action,.recommend-link,.news-entry a>small,.copy-kicker,.strategy-detail-actions button>span){color:#3979d7}
[data-theme="light"] body .bottom-nav button.active{color:#3478ed}
[data-theme="light"] body .bottom-nav button.active .nav-icon{background:linear-gradient(145deg,#f0f5ff,#dce9ff);border-color:#c9dbf8;box-shadow:inset 0 1px 0 #fff,0 2px 3px #3469ac10}
[data-theme="light"] body .home-assets .equity-curve{color:#3478ed}
[data-theme="light"] :is(.home-assets select,.period-buttons button,.bt-periods button,.strategy-filters button,.market-filters button){background:#f4f7fd;border-color:#dbe5f5;color:#74839b}
[data-theme="light"] :is(.period-buttons button.active,.bt-periods button.active,.strategy-filters button.active,.market-filters button.active){background:#e9f1ff;border-color:#bad1f6;color:#2b6ddc}
[data-theme="light"] body .home-assets .period-buttons>button.active,[data-theme="light"] body .home-assets .more-period>summary.active{background:#eaf2ff;border-color:#b5cdf3;color:#2b6ddc}
[data-theme="light"] .plaza-tabs{background:#edf3fc;border-color:#dce6f5}
[data-theme="light"] .plaza-tabs button.active{background:#fff;border-color:#cbdcf5;color:#3478ed}
[data-theme="light"] :is(.wallet-card,.exchange-sheet){--wallet-accent:#3979d7;--wallet-soft:#f0f5fd;--wallet-line:#e1e9f5}
[data-theme="light"] .profile-sheet{--profile-accent:#3979d7;--profile-field:#f4f7fd;--profile-line:#e1e9f5}
[data-theme="light"] .portrait-camera{background:#dfebff;color:#3979d7}
[data-theme="light"] .account-drawer{background:linear-gradient(155deg,#edf4ff,#fff 50%)}
[data-theme="light"] :is(.copy-card footer button,.copy-preview-result,.status-banner){background:#edf4ff;border-color:#d3e2f8;color:#4e74aa}
[data-theme="light"] :is(.copy-preview-result b,.copy-route>span,.bt-stage .live-title span){color:#3979d7}
[data-theme="light"] .auth-screen:not(.auth-admin){--auth-accent:#3478ed;--auth-bg:#f4f7fc;background:#f4f7fc}
[data-theme="light"] .auth-screen:not(.auth-admin)::before{background:radial-gradient(ellipse at 25% 10%,#e0ebff,transparent 55%)}
[data-theme="light"] .auth-screen:not(.auth-admin) .auth-brand{background:#f0f5ff}
[data-theme="light"] .auth-screen:not(.auth-admin) .auth-symbol{background:linear-gradient(145deg,#fff,#dae8ff);border-color:#bbd2f8;color:#3478ed;box-shadow:0 8px 24px #3478ed0d}
[data-theme="light"] .auth-symbol::after{background:#78a5f4}
[data-theme="light"] .auth-screen:not(.auth-admin) :is(.auth-switch,.auth-code-button){color:#3478ed}
[data-theme="light"] .auth-screen:not(.auth-admin) .auth-code-button{background:#edf4ff;border-color:#cbdcf5}
[data-theme="light"] .auth-screen:not(.auth-admin) .auth-field input:focus{border-color:#7da9f2;box-shadow:0 0 0 3px #3478ed0c}
[data-theme="light"] input:focus-visible,[data-theme="light"] select:focus-visible{outline-color:#3478ed66}
@media(max-width:700px){[data-theme="light"] .auth-screen:not(.auth-admin) .auth-brand{background:none}}

body .home-assets .asset-balance-copy{min-width:0}
body .home-assets .asset-daily-pnl{margin-top:7px;color:var(--muted);font-size:10px;line-height:1.5;text-align:left;overflow-wrap:anywhere}
body .home-assets:has(.asset-spark-button[aria-expanded="true"]) .asset-daily-pnl{margin-top:5px;font-size:9px}

.topbar #account-source-button{display:flex;align-items:center;justify-content:center;gap:3px;flex-shrink:0;min-height:26px;font:inherit;font-size:10px;padding:4px 7px;line-height:1.2}
.topbar #account-source-button svg{width:9px;height:9px;fill:none;stroke:currentColor;stroke-width:1.4;flex:none}
.asset-account-options{display:grid;gap:12px}
.asset-account-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:17px 15px;text-align:left;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text)}
.asset-account-option b{display:block;font-size:14px;font-weight:550}
.asset-account-option small{display:block;color:var(--muted);font-size:11px;line-height:1.6;margin-top:6px}
.asset-account-option i{display:grid;place-items:center;width:21px;height:21px;flex-shrink:0;border:1px solid var(--border);border-radius:50%;font-size:12px;font-style:normal;color:var(--accent)}
.asset-account-option.selected{border-color:var(--accent);background:var(--accent-soft)}
.asset-account-option.selected i{border-color:var(--accent)}
.asset-account-note{font-size:10px;line-height:1.8;color:var(--muted);margin:19px 0 0}
@media(max-width:360px){.topbar #account-source-button{font-size:9px;padding:3px 4px;gap:2px}.topbar #account-source-button svg{width:8px;height:8px}}

/* Messaging preview: familiar conversation rows with distinct compact avatars. */
.news-tabs{gap:0;justify-content:space-between}
.news-tabs button{white-space:nowrap;font-size:13px}
.message-hub{--message-hover:var(--surface-2);background:var(--surface);border:1px solid var(--border);border-radius:18px;overflow:hidden}
.message-demo-note{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:15px 17px;border-bottom:1px solid var(--border)}
.message-demo-note>span{font-size:12px;font-weight:550;color:var(--text)}
.message-demo-note small{font-size:9px;color:var(--muted)}
body .conversation-row{display:flex;align-items:center;gap:11px;width:100%;min-width:0;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:17px 15px;text-align:left;background:transparent;color:var(--text);box-shadow:none!important}
body .conversation-row:last-child{border-bottom:0}
body .conversation-row.pinned{background:var(--accent-soft)}
.conversation-avatar{display:grid;place-items:center;width:43px;height:43px;flex:0 0 43px;border-radius:14px;font-size:17px;font-weight:600;border:1px solid #ffffff12;box-shadow:inset 0 1px 0 #ffffff22,0 2px 5px #0001}
.conversation-avatar.blue{background:linear-gradient(145deg,#5a9af8,#3b6ed1);color:#fff;font-size:14px}
.conversation-avatar.violet{background:linear-gradient(145deg,#a78aed,#7760bc);color:#fff}
.conversation-avatar.mint{background:linear-gradient(145deg,#77cbb8,#419483);color:#fff;font-size:23px}
.conversation-avatar.amber{background:linear-gradient(145deg,#e2bf80,#b08c50);color:#fff}
.conversation-avatar.slate{background:linear-gradient(145deg,#91a2bc,#677991);color:#fff}
.conversation-copy{flex:1;min-width:0;display:grid;gap:8px}
.conversation-heading{display:flex;gap:6px;align-items:center;min-width:0}
.conversation-heading b{font-size:13px;font-weight:550;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.conversation-pin{color:var(--muted);font-size:8px;white-space:nowrap;border:1px solid var(--border);padding:1px 3px;border-radius:3px}
.conversation-preview{font-size:11px;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.5}
.conversation-meta{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;align-self:stretch;flex-shrink:0;min-width:32px;gap:8px}
.conversation-meta time{font-size:9px;color:var(--muted);line-height:17px}
.conversation-unread{display:grid;place-items:center;min-width:17px;height:17px;padding:0 5px;border-radius:10px;background:#e4567b;color:white;font-size:9px}
.conversation-muted{font-size:8px;color:var(--muted)}
.demo-chat-header{display:flex;align-items:center;gap:12px;padding-right:26px}
.demo-chat-header h2{font-size:17px;margin:0 0 6px}.demo-chat-header small{font-size:10px;color:var(--muted)}
.demo-chat-disclaimer{text-align:center;font-size:9px;color:var(--muted);margin:20px 0 10px}
.demo-chat-messages{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:15px 12px;display:grid;gap:16px}
.demo-chat-messages>time{font-size:9px;color:var(--muted);text-align:center}
.demo-chat-line{display:flex;justify-content:flex-start}.demo-chat-line.out{justify-content:flex-end}
.demo-chat-line p{max-width:88%;margin:0;padding:11px 13px;line-height:1.8;font-size:12px;border-radius:4px 13px 13px 13px;background:var(--surface);color:var(--text);border:1px solid var(--border);overflow-wrap:anywhere}
.demo-chat-line.out p{background:var(--accent-soft);border-color:var(--border);border-radius:13px 4px 13px 13px}
.demo-chat-composer{display:flex;justify-content:space-between;align-items:center;margin-top:14px;padding:12px 14px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--muted);font-size:11px}
.demo-chat-composer svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
@media(max-width:360px){.news-tabs button{font-size:12px}.conversation-row{gap:9px}.message-demo-note{padding-inline:14px}.message-demo-note small{font-size:8px}}

/* Standalone messenger: doodle wallpaper and familiar avatar/bubble composition. */
body.chat-view{overflow:hidden}
body.chat-view .app-shell>.topbar,body.chat-view .bottom-nav{display:none}
body.chat-view #page{padding:0;margin:0}
.chat-page{--chat-bg:#151b21;--chat-bar:#191b20;--chat-in:#272c34;--chat-out:#37422c;position:fixed;inset:0;z-index:35;height:100dvh;display:flex;flex-direction:column;background:var(--chat-bg);color:var(--text);max-width:760px;margin:auto;isolation:isolate}
[data-theme="light"] .chat-page{--chat-bg:#e8eff7;--chat-bar:#f7f9fc;--chat-in:#fff;--chat-out:#d2e6ff}
.chat-page-header{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:8px;flex-shrink:0;padding:calc(8px + env(safe-area-inset-top)) 10px 9px;background:var(--chat-bar);border-bottom:1px solid var(--border)}
.chat-page-header>div{text-align:center;min-width:0}.chat-page-header h1{font-size:16px;font-weight:600;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-page-header small{display:block;font-size:9px;color:var(--muted);margin-top:4px}
body .chat-page :is(.chat-page-header button,.chat-input-row button){display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:none;color:var(--text);box-shadow:none!important}
.chat-page-header button svg,.chat-input-row button svg{display:block;width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.chat-page-notice{flex-shrink:0;font-size:9px;text-align:center;padding:7px 12px;background:var(--chat-bar);color:var(--muted)}
.chat-page-scroll{position:relative;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 28px;isolation:isolate;background:radial-gradient(ellipse at 10% 0,#89a9bb0b,transparent 70%)}
.chat-page-scroll::before{content:'';position:absolute;inset:0;min-height:100%;z-index:-1;background:url('/static/chat-doodles.svg') repeat;background-size:290px 290px;opacity:.13;pointer-events:none}
[data-theme="light"] .chat-page-scroll::before{opacity:.16}
.chat-timestamp{width:fit-content;margin:0 auto 24px;padding:4px 11px;border-radius:12px;background:#7d8ea218;font-size:9px;color:var(--muted)}
.chat-message{display:flex;align-items:flex-start;gap:10px;margin-bottom:22px}
.chat-message.out{flex-direction:row-reverse}
.chat-message>.conversation-avatar{width:35px;height:35px;flex-basis:35px;border-radius:9px;font-size:12px}
.chat-message-content{max-width:calc(100% - 65px);min-width:0}
.chat-message-content>small{display:block;font-size:9px;color:var(--muted);margin:0 0 5px 2px}
.chat-message-content p{position:relative;padding:10px 12px;margin:0;border-radius:5px 12px 12px 12px;background:var(--chat-in);color:var(--text);font-size:14px;line-height:1.75;overflow-wrap:anywhere;box-shadow:0 2px 3px #00000008}
.chat-message.in .chat-message-content p::before{content:'';position:absolute;left:-5px;top:11px;width:8px;height:8px;background:var(--chat-in);transform:rotate(45deg)}
.chat-message.out .chat-message-content p{background:var(--chat-out);border-radius:12px 5px 12px 12px}
.chat-message.out .chat-message-content p::after{content:'';position:absolute;right:-5px;top:11px;width:8px;height:8px;background:var(--chat-out);transform:rotate(45deg)}
.chat-history-end{text-align:center;font-size:9px;color:var(--muted);margin:30px 0 0}
.chat-page-footer{flex-shrink:0;padding:9px 8px calc(9px + env(safe-area-inset-bottom));background:var(--chat-bar);border-top:1px solid var(--border)}
.chat-input-row{display:flex;align-items:center;gap:4px}.chat-input-row input{width:0;min-width:0;flex:1;height:37px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text);padding:8px 10px;font-size:13px;outline:none}.chat-input-row input::placeholder{color:var(--muted)}
@media(min-width:760px){.chat-page{border-inline:1px solid var(--border)}.chat-page-scroll{padding-inline:24px}}

.api-check-entry{margin:16px 0 22px}.api-health-summary{padding:16px;background:var(--accent-soft);border:1px solid var(--border);border-radius:12px;margin:18px 0 8px}.api-health-summary b{display:block;font-size:15px}.api-health-summary span{display:block;font-size:12px;margin:8px 0;color:var(--text)}.api-health-summary small{font-size:10px;color:var(--muted)}.api-health-row{padding:15px 0;border-bottom:1px solid var(--border)}.api-health-row>div{display:flex;justify-content:space-between;gap:10px}.api-health-row b{font-size:12px;font-weight:550}.api-health-status{font-size:10px}.api-health-status.ok{color:#55ab89}.api-health-status.error{color:var(--danger)}.api-health-status.pending{color:var(--muted)}.api-health-row p{font-size:11px;line-height:1.7;color:var(--muted);margin:7px 0 3px}.api-health-row>small{font-size:9px;color:var(--muted)}.api-health-note{font-size:10px;line-height:1.8;margin:17px 0}

/* Approved LD candlestick brand mark: identical geometry at every touchpoint. */
.topbar .platform-symbol .lingdong-brand-glyph{width:29px;height:29px;display:block;flex:none;fill:currentColor;stroke:none}
.auth-symbol .lingdong-brand-glyph{display:block;fill:currentColor;stroke:none;filter:none}
@media(max-width:420px){.topbar .platform-symbol .lingdong-brand-glyph{width:26px;height:26px}}

/* Shared mobile back navigation: readable label and 44px touch target. */
body :is(.strategy-back,.profile-sheet-back,.bt-back){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:96px;max-width:calc(100% - 44px);padding:10px 16px 10px 12px;margin:0 0 18px;border:1px solid #dce5f3;border-radius:14px;background:linear-gradient(180deg,#fff,#f2f6fd);color:#34547b!important;font-family:inherit;font-size:14px;font-weight:600;line-height:22px;letter-spacing:.01em;text-decoration:none;box-shadow:inset 0 1px 0 #fff,0 3px 8px #2648750a!important;cursor:pointer;touch-action:manipulation;vertical-align:middle;transition:background .15s ease,border-color .15s ease,transform .15s ease}
body :is(.strategy-back,.profile-sheet-back,.bt-back) .back-control-icon{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body :is(.strategy-back,.profile-sheet-back,.bt-back)>span{color:inherit;font:inherit;white-space:nowrap}
[data-theme="dark"] body :is(.strategy-back,.profile-sheet-back,.bt-back),body[data-theme="dark"] :is(.strategy-back,.profile-sheet-back,.bt-back){background:linear-gradient(180deg,#262628,#1d1d1f);border-color:#3b3b3e;color:#e6e6e8!important;box-shadow:inset 0 1px 0 #ffffff08,0 3px 8px #0002!important}
body :is(.strategy-back,.profile-sheet-back,.bt-back):active{transform:translateY(1px);box-shadow:inset 0 1px 3px #00000010!important}
body :is(.strategy-back,.profile-sheet-back,.bt-back):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.running-list-header>div{margin-top:0}.running-list-header .strategy-back{margin-bottom:20px}
#chat-page-back{min-width:44px;min-height:44px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center}#chat-page-back svg{width:23px;height:23px}
@media(prefers-reduced-motion:reduce){body :is(.strategy-back,.profile-sheet-back,.bt-back){transition:none}}

body .news-read-button{display:block;width:100%;text-align:left;padding:8px 0 0;border:0;background:transparent;color:inherit;box-shadow:none!important;cursor:pointer}body .news-read-button h3{font-size:15px;line-height:1.65;margin:0 0 9px}body .news-read-button>small{font-size:11px;color:var(--accent)}.news-read-button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.news-article-content{padding:24px 20px}.news-article-category{font-size:11px;color:var(--accent);letter-spacing:.05em}.news-article-content h1{font-size:23px;line-height:1.5;letter-spacing:-.02em;margin:14px 0 18px;overflow-wrap:anywhere}.news-article-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;color:var(--muted);padding-bottom:20px;border-bottom:1px solid var(--border)}.news-article-body{padding:12px 0 24px;font-size:16px;line-height:1.95;overflow-wrap:anywhere}.news-article-source{border-top:1px solid var(--border);padding-top:16px;color:var(--muted);font-size:11px;line-height:1.8}.news-article-source a{display:inline-flex;align-items:center;min-height:44px;color:var(--accent)}

.news-article-attribution{font-size:12px;color:var(--muted);line-height:1.9;margin-top:18px}.news-article-attribution a{color:var(--accent)}.news-article-body img{max-width:100%;height:auto;border-radius:10px}.news-article-body table{display:block;overflow-x:auto;max-width:100%}.news-article-body h2{font-size:20px}.news-article-body h3{font-size:18px}.news-article-body a{color:var(--accent)}
/* Five evenly spaced news destinations, with breathing room at both edges. */
body .news-tabs-five{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:6px;margin:0 8px 20px;overflow:visible;border:1px solid var(--border);border-radius:16px;background:var(--card)}body .news-tabs-five button{width:100%;min-width:0;min-height:42px;padding:8px 2px;font-size:12px;white-space:nowrap;border-radius:11px;letter-spacing:0}.insight-page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.insight-page-heading h2{font-size:17px;margin:0 0 6px}.insight-page-heading small{color:var(--muted);font-size:11px}.heatmap-controls{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.heatmap-controls>div{display:flex;gap:5px}.heatmap-controls button{min-height:34px;padding:6px 10px;border:1px solid var(--border);border-radius:9px;background:transparent;color:var(--muted);font-size:11px}.heatmap-controls button.active{color:var(--accent);border-color:var(--accent)}.liquidation-chart{display:block;width:100%;height:auto;min-height:235px}.liquidation-chart text{font-size:11px;fill:var(--muted)}.liquidation-chart rect[data-heat-cell]{cursor:pointer}.heatmap-selection{font-size:11px;line-height:1.7;min-height:36px;color:var(--muted)}.heatmap-legend{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted)}.heatmap-legend i{flex:1;height:6px;border-radius:9px;background:linear-gradient(90deg,#25136e,#1855a4,#19bfa8,#e8db42)}.heatmap-total{display:flex;justify-content:space-between;gap:10px;margin:24px 0 12px;font-size:12px}.heatmap-total strong{font-size:18px}.analyst-disclaimer{font-size:12px;line-height:1.8;color:var(--muted);background:var(--card);border:1px solid var(--border);border-radius:11px;padding:12px;margin:16px 0}.analyst-entry{padding:20px 0;border-top:1px solid var(--border)}.analyst-byline{display:flex;align-items:center;gap:10px}.analyst-avatar{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--border);border-radius:12px;color:var(--accent);background:var(--card)}.analyst-byline b{font-size:13px}.analyst-byline small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.liquidation-panel .copy-footnote a{color:var(--accent)}

.analyst-sources{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.analyst-sources>span{font-size:11px;border:1px solid var(--border);padding:8px 10px;border-radius:10px;color:var(--text)}.analyst-sources small{margin-left:7px;color:var(--accent);font-size:9px}

.news-source-badges{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.news-source-badges span{padding:5px 8px;border:1px solid var(--border);border-radius:8px;color:var(--muted);font-size:10px}
body .square-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.community-composer{padding:18px}.community-composer label{display:block;font-size:14px;font-weight:600;margin-bottom:12px}.community-composer textarea,.community-chat-form textarea,#community-comment-form textarea{display:block;width:100%;box-sizing:border-box;background:transparent;color:inherit;font:inherit;font-size:14px;line-height:1.7;border:1px solid var(--border);border-radius:12px;padding:12px;resize:vertical;min-height:76px}.community-composer footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.community-composer footer span,.community-note,.community-recommend-note{font-size:11px;color:var(--muted);line-height:1.8}.community-recommend-note{margin:0 14px 18px}.community-avatar{width:34px;height:34px;flex:0 0 34px;border-radius:11px;overflow:hidden;display:inline-grid;place-items:center;border:1px solid var(--border);color:var(--accent);font-size:13px}.community-avatar img{width:100%;height:100%;object-fit:cover}.community-post header,.community-comment header,.community-chat-message>div{display:flex;align-items:center;gap:9px}.community-post header b,.community-comment header b,.community-chat-message b{font-size:12px;overflow-wrap:anywhere}.community-post header small,.community-comment header small,.community-chat-message small{font-size:10px;color:var(--muted);margin-left:auto}.community-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.9;margin:18px 0}.community-post footer{display:flex;flex-wrap:wrap;gap:10px;border-top:1px solid var(--border);padding-top:12px}.community-post footer button{background:transparent;border:0;color:var(--muted);font-size:12px;min-height:36px;padding:6px 10px;box-shadow:none!important}.community-post footer button.liked{color:var(--accent)}.community-featured{display:inline-block;margin-top:12px;color:var(--accent);font-size:10px}.community-room h2{font-size:17px;margin:0 0 8px}.community-room header>small{font-size:11px;color:var(--muted)}.community-chat-messages{max-height:52vh;overflow-y:auto;margin:20px 0;overscroll-behavior:contain}.community-chat-message{margin:18px 0}.community-chat-message p{margin:9px 0 0 43px;background:var(--card);border:1px solid var(--border);border-radius:2px 14px 14px 14px;padding:12px;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.community-chat-message.mine p{border-color:var(--accent)}.community-chat-form{display:flex;gap:10px;align-items:flex-end}.community-chat-form textarea{flex:1;min-width:0}.community-chat-form button{min-width:64px}.community-comment{padding:14px 0;border-top:1px solid var(--border)}#community-feed-status,#community-chat-status,#community-post-error,#community-comment-error{font-size:12px;color:var(--danger);line-height:1.7}#community-feed-status:empty,#community-chat-status:empty,#community-post-error:empty,#community-comment-error:empty{display:none}
.community-demo-banner{margin:-5px 12px 18px;font-size:11px;line-height:1.7;color:var(--muted);text-align:center}
/* Square: edge-aligned streams and compact conversation rows. */
.square-stream,.square-announcements{padding:0 4px 22px;background:transparent;border:0;border-radius:0;box-shadow:none}
.community-post{padding:22px 8px;margin:0;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;box-shadow:none;position:relative}
.community-post:first-child{padding-top:12px}.community-post header b{font-size:14px}.community-post header small{font-size:11px}.community-post .community-avatar{width:38px;height:38px;flex-basis:38px;background:var(--accent-soft)}
.community-post .community-content{margin:12px 0 12px 47px;font-size:14px;line-height:1.85}.community-post .community-featured{margin-left:47px}.community-post footer{border:0;padding:0;margin-left:37px;gap:8px}.community-post footer button{min-height:40px}.square-announcements .news-entry{padding:22px 10px}
body .community-fab{position:fixed;bottom:calc(94px + env(safe-area-inset-bottom));right:max(22px,calc((100vw - 720px)/2));z-index:25;display:grid;place-items:center;width:56px;height:56px;min-width:56px;padding:0;border-radius:50%;border:1px solid #ffffff35;background:var(--accent);color:#101409;box-shadow:0 8px 24px #0003!important;cursor:pointer}
[data-theme="light"] .community-fab{background:#3478ef;color:#fff}.community-fab svg{display:block;width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.community-fab:active{transform:scale(.96)}.community-composer{padding:6px 0}.community-composer h2{margin:0 0 22px}.community-composer textarea{min-height:180px;border:0;border-radius:0;padding:8px 0;outline-offset:4px}
.message-hub{background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}body .conversation-row{padding:18px 8px;gap:13px;min-height:86px}body .conversation-row.pinned{background:transparent}body .conversation-row:active{background:var(--accent-soft)}.conversation-row .conversation-avatar{width:48px;height:48px;flex-basis:48px;border-radius:12px}.conversation-heading b{font-size:15px}.conversation-preview{font-size:12px}.conversation-meta time{font-size:10px}.conversation-pin{display:none}
.chat-page{--chat-bg:#18232d;--chat-in:#253541;--chat-out:#345646}.chat-page-scroll{background:radial-gradient(ellipse at top left,#72969b17,transparent 75%)}[data-theme="light"] .chat-page{--chat-bg:#e4eee7;--chat-in:#fff;--chat-out:#d8efce;--chat-bar:#f8faf9}.chat-page-scroll::before{background-size:320px 320px;opacity:.18;background-attachment:local}[data-theme="light"] .chat-page-scroll::before{opacity:.2}
.chat-page-header{grid-template-columns:44px minmax(0,1fr) 44px}.chat-identity{display:flex;flex-direction:column;align-items:center;flex:0 0 52px;width:52px;gap:6px}.chat-identity>small{font-size:10px;line-height:14px;color:var(--muted);max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-identity .conversation-avatar{width:36px;height:36px;flex-basis:36px;border-radius:10px;font-size:13px;overflow:hidden}.chat-identity img{width:100%;height:100%;object-fit:cover}.chat-message{gap:7px;margin-bottom:22px}.chat-message-content{padding-top:20px;max-width:calc(100% - 65px)}.chat-message-content p{white-space:pre-wrap;border-radius:5px 16px 16px 16px}.chat-message.out .chat-message-content p{border-radius:16px 5px 16px 16px}.chat-input-row{gap:10px;padding:2px 5px}.chat-input-row input{height:44px;border-radius:22px;padding:10px 16px;font-size:15px}.chat-page .chat-input-row .chat-send{width:44px;height:44px;border-radius:50%;background:var(--accent);color:#101409}[data-theme="light"] .chat-page .chat-input-row .chat-send{background:#3478ef;color:white}
@media(max-width:360px){.community-post{padding-inline:2px}.community-post .community-content{margin-left:0}.community-post footer{margin-left:-8px}.conversation-heading b{font-size:14px}.community-fab{right:16px}}
/* Composer, contacts, and request inbox share the square's restrained layout. */
body .square-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.square-tabs button{padding-inline:4px!important;font-size:13px}
.compose-page{padding:0 6px}.compose-page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0 22px;border-bottom:1px solid var(--border)}.compose-page-head h1{font-size:17px;margin:0}.compose-page-head .strategy-back{margin:0}.compose-page-head .live-button{min-height:40px;padding:8px 18px;font-size:13px}.compose-author{display:flex;align-items:center;gap:10px;margin:25px 0 16px}.compose-author b{font-size:14px}.compose-author small{margin-left:auto;color:var(--muted);font-size:11px}#community-publish-form textarea{display:block;width:100%;min-height:280px;resize:vertical;padding:8px 0;border:0;background:transparent;color:var(--text);font:inherit;font-size:16px;line-height:1.85;outline-offset:4px}.compose-bottom{display:flex;justify-content:space-between;padding:16px 0;border-top:1px solid var(--border);font-size:12px;color:var(--muted)}#compose-error,#contact-request-error{font-size:12px;color:var(--danger)}
.contacts-toolbar{display:flex;gap:12px;align-items:center;padding:8px}.contacts-toolbar label{display:flex;align-items:center;gap:9px;flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--border);border-radius:13px;padding:10px 12px}.contacts-toolbar svg{width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:1.6}.contacts-toolbar input{min-width:0;width:100%;border:0;background:transparent;color:var(--text);font:inherit;font-size:14px;outline:none}body #contacts-add{width:44px;height:44px;border:0;border-radius:13px;background:var(--accent-soft);color:var(--accent);font-size:27px;box-shadow:none!important}.contacts-count{margin:14px 10px 0;font-size:11px;color:var(--muted)}.contact-chevron{font-size:22px;color:var(--muted)}.social-request{background:var(--chat-in);padding:18px;margin:0 0 16px;border-radius:14px;box-shadow:0 2px 7px #00000008}.social-request header{display:flex;gap:12px;align-items:center}.social-request h2{font-size:15px;margin:6px 0 0}.social-request header small{color:var(--muted);font-size:11px}.social-request p{font-size:14px;line-height:1.8;margin:16px 0;overflow-wrap:anywhere}.social-request-actions{display:flex;gap:12px;justify-content:flex-end}.social-request-actions button{min-width:74px;min-height:40px;border-radius:10px;border:1px solid var(--border);background:transparent;color:var(--muted);box-shadow:none!important}.social-request-actions button:last-child{background:var(--accent-soft);color:var(--accent)}.social-request-status{display:block;text-align:right;color:var(--muted);font-size:12px}.system-notifications .chat-page-scroll{padding-top:22px}
.strategy-backtest-link{display:flex;justify-content:space-between;width:100%;padding:15px 4px;margin:0 0 14px;background:transparent;border:0;border-bottom:1px solid var(--border);color:var(--accent);font-size:14px;box-shadow:none!important}.strategy-config-compact{padding:17px!important}.strategy-config-compact h2,.strategy-orders h2{font-size:16px;margin:0}.compact-config-grid{display:grid!important;grid-template-columns:1fr 1fr;gap:12px!important;align-items:end}.compact-config-grid label{display:grid;gap:6px;font-size:11px;color:var(--muted)}.compact-config-grid input,.compact-config-grid select{width:100%;min-width:0;height:40px;padding:8px 10px;border-radius:10px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font-size:13px}.compact-config-grid .live-button{height:40px;min-height:40px;padding:8px;font-size:13px}.compact-config-actions{display:flex;gap:8px;margin-top:14px}.compact-config-actions button{flex:1;min-width:0;font-size:12px;padding:10px 5px;min-height:40px}.compact-config-note{font-size:11px;color:var(--muted);line-height:1.6;margin:12px 0 0}.strategy-orders{margin:22px 0}.strategy-orders>.live-title{padding:0 4px;margin-bottom:12px}body .compact-position{display:block;width:100%;padding:18px;text-align:left;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);box-shadow:none!important}.compact-position header{display:flex;align-items:center;gap:10px;font-size:14px}.compact-position header span{font-size:11px}.compact-position header i{font-style:normal;margin-left:auto;color:var(--muted)}.position-profit{display:flex;justify-content:space-between;margin:20px 0}.position-profit>span,.position-essentials>span{display:grid;gap:8px}.position-profit small,.position-essentials small{color:var(--muted);font-size:10px;font-weight:400}.position-profit strong{font-size:24px}.position-profit>span:last-child{text-align:right}.position-essentials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.position-essentials b{font-size:12px}.position-essentials>span:last-child{text-align:right}body .compact-trade{display:flex;width:100%;gap:12px;align-items:center;text-align:left;padding:15px 4px;background:transparent;color:var(--text);border:0;border-bottom:1px solid var(--border);box-shadow:none!important}.compact-trade>span:first-child{flex:1}.compact-trade b{font-size:13px}.compact-trade small{display:block;margin-top:6px;color:var(--muted);font-size:11px}.compact-trade strong{font-size:14px}
.strategy-detail-toolbar{display:flex;justify-content:flex-start;margin:0 0 16px}body .strategy-backtest-link{display:inline-flex;align-items:center;justify-content:center;gap:16px;width:auto;min-height:36px;margin:0;padding:8px 13px;border:1px solid var(--border);border-radius:10px;background:var(--surface);font-size:12px;line-height:1.4}.strategy-example-card{padding:18px 16px 12px!important}.strategy-example-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.strategy-example-heading small{display:block;font-size:11px;color:var(--muted);margin-bottom:10px}.strategy-example-heading strong{font-size:30px;font-weight:650;letter-spacing:-.8px;color:var(--accent);font-variant-numeric:tabular-nums}.strategy-example-heading em{font-style:normal;font-size:17px;margin-left:3px}.strategy-example-tag{font-size:10px;padding:5px 8px;border:1px solid var(--border);border-radius:6px;color:var(--muted)}.strategy-example-periods{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:20px 0 8px}.strategy-example-periods button{min-height:34px;padding:7px 5px;font-size:12px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);box-shadow:none!important}.strategy-example-periods button.active{background:var(--accent-soft);color:var(--accent);border-color:var(--border)}.strategy-example-svg{display:block;width:100%;height:auto;min-height:165px;color:var(--accent);overflow:visible}.strategy-example-svg .example-grid{stroke:var(--border);stroke-width:1;stroke-dasharray:3 5}.strategy-example-svg text{fill:var(--muted);font-size:12px;font-family:inherit}.strategy-example-note{color:var(--muted);font-size:10px;line-height:1.7;margin:9px 0 0}
.strategy-detail-title.strategy-title-compact{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:4px 10px 6px 2px}.strategy-title-compact .strategy-type-icon{width:38px;height:38px;min-width:0}.strategy-title-compact .strategy-title-name{min-width:0}.strategy-title-compact h1{font-size:18px;line-height:1.5;margin:0;overflow-wrap:anywhere}.strategy-title-actions{display:flex;flex-direction:column;align-items:center;gap:7px;flex-shrink:0}.strategy-account-caption{font-size:10px;line-height:1.4;color:var(--muted);font-weight:400}.strategy-title-actions .strategy-backtest-link{min-height:34px;padding:7px 10px;gap:8px;font-size:11px;white-space:nowrap}@media(max-width:360px){.strategy-detail-title.strategy-title-compact{grid-template-columns:30px minmax(0,1fr) auto;gap:7px;padding-right:8px}.strategy-title-compact .strategy-type-icon{width:30px;height:30px;font-size:17px}.strategy-title-compact h1{font-size:16px}.strategy-title-actions .strategy-backtest-link{padding-inline:8px;font-size:10px}}
/* Let the title row use the full page width, independent of legacy header columns. */
.strategy-detail-head:has(.strategy-title-compact){display:block;width:100%;box-sizing:border-box}.strategy-detail-head>.strategy-title-compact{width:100%;box-sizing:border-box;padding-right:6px}.strategy-title-compact>.strategy-title-actions{justify-self:end;align-items:flex-end;margin-left:auto}.strategy-title-actions>.strategy-account-caption{padding-right:3px}
.conversation-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.social-group-actions{display:flex;gap:10px;padding:8px}.social-group-actions button{min-height:38px;padding:8px 16px;background:var(--accent-soft);color:var(--accent);border:1px solid var(--border);border-radius:10px;box-shadow:none!important}#live-chat-error{font-size:11px;color:var(--danger);margin:0 10px 5px}#live-chat-error:empty{display:none}.chat-message-content>small{margin-top:5px;text-align:right;font-size:9px}

.live-group-identity{display:flex;align-items:center;gap:12px}.live-group-identity .conversation-avatar{overflow:hidden;flex-shrink:0}

/* Disable double-tap zoom while retaining pinch zoom and scrolling. */
html,body{touch-action:manipulation}button,a,input,textarea,select{touch-action:manipulation}
.bottom-nav [data-view="square"],[data-square-category="messages"]{position:relative;overflow:visible}
.social-unread-badge{position:absolute;top:2px;right:5px;z-index:3;display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;border-radius:12px;background:#ef4444;color:#fff;font-size:10px;font-weight:600;line-height:17px;box-shadow:0 0 0 2px var(--surface);pointer-events:none;font-variant-numeric:tabular-nums}
.community-unread-badge{position:absolute;top:2px;right:5px;z-index:3;display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;border-radius:12px;background:#ef4444;color:#fff;font-size:10px;font-weight:600;line-height:17px;box-shadow:0 0 0 2px var(--surface);pointer-events:none;font-variant-numeric:tabular-nums}.community-unread-badge.dot{width:8px;min-width:8px;height:8px;padding:0;top:4px;right:8px}
.bottom-nav .social-unread-badge{top:4px;right:calc(50% - 26px)}[data-square-category="messages"] .social-unread-badge{top:0;right:2px}
@media(max-width:760px){input,textarea,select,.chat-input-row input{font-size:16px!important}}
