/* Opaque, readable defaults. Blur is reserved for navigation and controls. */
:root{--bg:#0a0d14;--side:#10141e;--surface:#141a26;--elevated:#1a2130;--border:#323b50;--line:#252d3e;--text:#f0f1f8;--muted:#a5adc3;--dim:#8893ad;--accent:#b3a2ff;--accent-bg:#302b50;--green:#59d5b0;--red:#f48b9f;--radius:19px;--glass-edge:#a5b6ed35;--glass:#171e2e;--nav-space:0px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{background:radial-gradient(ellipse at 68% 5%,#28224c42,transparent 43%),radial-gradient(ellipse at 7% 67%,#1c28402b,transparent 45%),var(--bg);color:var(--text)}
.sidebar{background:#0e121bee;border-right-color:#bac7f013}.workspace{background:transparent}.brand-mark{border-radius:50%;background:repeating-radial-gradient(circle,#a997ff 0 2px,#242347 3px 8px);box-shadow:0 0 0 1px #b2a1ff50}
.workspace-label{color:var(--muted);letter-spacing:1.5px}.side-note{opacity:.8}.nav-item{border-radius:13px}.nav-item.active{background:linear-gradient(120deg,#7660c735,#4e497120);color:#ddd5ff}
.topbar{height:66px;margin:16px 30px 0;padding:0 18px;border:1px solid var(--glass-edge);border-radius:23px;background:var(--glass);box-shadow:inset 0 1px 0 #d6ddff0b,0 8px 24px #0002}
.breadcrumb{gap:11px}.topbar-wordmark{display:flex;align-items:center;gap:10px;font-size:20px!important;font-weight:720!important;letter-spacing:-.5px}.scope-radar{display:inline-block;width:31px;height:31px;position:relative;border-radius:50%;border:1px solid #af9dff9c;background:repeating-radial-gradient(circle at center,#b6a7ff90 0 2px,#373361 3px 6px,#292844 7px 9px);box-shadow:0 0 16px #8a73ed22;flex:none}.scope-radar:after{content:"";position:absolute;width:13px;height:1px;background:#d1c7ff;left:15px;top:14px;transform:rotate(-45deg);transform-origin:left}.section-symbol{color:#afa3d4;width:20px;opacity:.7}
.top-actions{gap:10px}.exchange-badge{width:28px;height:28px;border-radius:7px;background:#1168f6;color:white;box-shadow:inset 0 1px 0 #a6d5ff75}.exchange-badge svg{width:25px;height:25px}.prototype-badge{color:#b8c2da;font-size:11px}.prototype-badge i{width:6px;height:6px;background:#949aab}.prototype-badge.connected i{background:#59d5b0;box-shadow:0 0 8px #59d5b045}.top-actions #help-button{background:transparent;color:var(--muted)}
.live-banner{margin-top:10px;border:0;background:transparent;color:var(--muted);font-size:11px}.live-banner .demo-chip{font-size:9px;border-radius:5px;background:#1a2e2a}
main{padding-top:24px}.page-heading h1{letter-spacing:-.8px}.eyebrow{color:var(--muted)}
.button,.icon-button,.sort-select,.search-box,.tabs,.field input,.field select{border:1px solid var(--glass-edge);border-radius:12px;background:#1a2130;color:var(--text);box-shadow:inset 0 1px 0 #e5e9ff0a}
.button{min-height:40px;font-size:12px}.button.primary{background:linear-gradient(135deg,#8f76ea,#6750bd);border-color:#b7a3ff80;color:white;box-shadow:inset 0 1px 0 #e2d8ff4d,0 3px 14px #6847ba24}.button.ghost:hover,.icon-button:hover{background:#252d40;border-color:#9c9fbd6b}.icon-button{width:42px;height:42px}.button:focus-visible,.icon-button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #b8a6ff;outline-offset:3px}
.text-button{color:#b9abed}.panel,.summary,.event-card,.trade-card,.source-card,.scan-controls,.movement-card,.watch-prompt,.empty-screen{background:#131925;border-color:#8f9eb426;border-radius:var(--radius);box-shadow:none}.market-table-wrap{background:#101620;border-color:#8f9eb426;border-radius:var(--radius)}.market-table th{background:#171d2a;color:#a0abc3}.market-table td{border-color:#a4b5de0e}.market-table tr:hover td{background:#1b2231}.tab.active{background:#4a3f6c80;color:#e1d7ff}.chart,.technical-panel{background:#0e141f;border-color:#a2b0d325}.field input,.field select{color:var(--text);background:#151c29}.page-footer{color:#8490a8}.toast{background:#22283cf5;border-color:#afb4dd4f;font-size:12px;z-index:2200}
.nav-development,.nav-item>small{display:none}.mobile-nav{border:1px solid var(--glass-edge);border-radius:24px;background:var(--glass);box-shadow:inset 0 1px 0 #dde3ff16,0 8px 30px #0006}
dialog{background:#171d2c;border:1px solid #a4acc355;border-radius:23px}dialog::backdrop{background:#040710a8;backdrop-filter:none}.modal-error{font-size:13px;line-height:1.6}.disclosure{color:var(--muted)}
body.agent-mode{overflow:hidden;height:var(--scope-visible-height,100dvh)}
.agent-mode .app-shell{position:fixed;left:0;right:0;top:var(--scope-visible-top,0px);height:var(--scope-visible-height,100dvh);min-height:0}
.agent-mode .workspace{height:100%;display:flex;flex-direction:column;min-height:0}.agent-mode .topbar,.agent-mode .live-banner{flex:none}.agent-mode .live-banner{font-size:10px;margin-top:8px;margin-bottom:0;line-height:1.4}.agent-mode .page-footer{display:none}
.agent-mode #main{display:flex;flex:1;min-height:0;padding-top:14px;padding-bottom:16px;overflow:hidden}
.agent-workspace{width:100%;height:100%;max-width:900px;min-height:0;display:flex;flex-direction:column;margin:0 auto}
.agent-toolbar{flex:none;padding:0 2px 14px}.agent-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:13px}.agent-title-row h1{font-size:29px;line-height:1.15;font-weight:650;letter-spacing:-.8px;margin:0}.agent-header-actions{display:flex;gap:9px}.agent-status{display:inline-flex;align-items:center;gap:6px;font-size:10px;line-height:1.4;color:var(--muted);margin-top:5px}.agent-status i{width:5px;height:5px;border-radius:50%;background:#a7aabb}.agent-status.connected i{background:var(--green)}
.agent-select-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 44px;gap:9px}.agent-select-row select,.agent-settings-selects select{width:100%;min-width:0;min-height:43px;border:1px solid var(--glass-edge);border-radius:13px;padding:8px 12px;background:#1a2130;color:#e6e8f2;font:inherit;font-size:14px;text-overflow:ellipsis}.agent-select-row .icon-button{width:44px;height:44px}
#agent-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#655b85 transparent;margin:0 -3px;padding:2px 3px 14px;outline-offset:-2px;overflow-anchor:none}
.agent-message-list{display:flex;flex-direction:column;gap:18px;min-width:0}.agent-message-list .ai-thread-toolbar{margin:0}.agent-message-list .ai-thread-panel{margin:0 0 4px}.agent-message-list .ai-welcome{margin:auto 0;min-height:230px;display:flex;flex-direction:column;justify-content:center}.agent-message-list .ai-welcome h2{font-size:23px}.agent-message-list .ai-welcome p{font-size:13px;line-height:1.7}.ai-welcome .ai-symbol{border-radius:50%;background:radial-gradient(circle at 30% 25%,#6654a4,#24273c);border-color:#9b8dcc55}
.agent-workspace .personal-message{background:#151b29;border:1px solid #a8b7e02e;border-radius:19px;padding:17px 18px;margin:0;min-width:0;box-shadow:inset 0 1px 0 #f2f3ff06}.agent-workspace .personal-message.from-user{align-self:flex-end;background:linear-gradient(125deg,#49348d,#342769);border-color:#b29cff65;max-width:91%;border-radius:19px 19px 5px 19px;padding:12px 16px}.agent-workspace .personal-message.from-assistant{width:100%;margin-right:0}.agent-workspace .personal-message.ai-waiting{width:auto;min-width:110px;align-self:flex-start}.agent-workspace .personal-message-label{font-size:11px;color:#ccc4ed;margin-bottom:9px;min-height:26px}.agent-workspace .from-assistant .personal-message-label{font-weight:650;color:#ded6ff}.agent-workspace .from-user .personal-message-label{margin:0 0 4px;min-height:0;color:#cdc5e7}.agent-workspace .personal-message-text{font-size:14px;line-height:1.7}.agent-workspace .ai-copy-answer{font-size:11px;min-height:30px;padding:4px}.agent-workspace .ai-rich-text h2,.agent-workspace .ai-rich-text h3{font-size:18px}.agent-workspace .ai-answer-sources{background:#202737;border:1px solid #aab7dd29;border-radius:12px;padding:12px;margin-top:16px}.agent-workspace .ai-answer-sources>summary{font-size:12px;color:#d2cbe5;min-height:22px}.agent-workspace .ai-answer-meta{border:0;padding:0;margin:12px 0;color:var(--muted);font-size:11px}.agent-workspace .ai-drawing{border:0;padding:0;margin:15px 0;background:transparent}.agent-workspace .ai-drawing-controls{gap:9px;margin:12px 0}.agent-workspace .ai-drawing-controls .button,.agent-workspace .ai-drawing-controls .text-button{font-size:11px;min-height:37px}.agent-workspace .ai-drawing-canvas{border-radius:10px}.agent-workspace .ai-drawing>summary{font-size:12px}.agent-workspace .ai-drawing-objects p{font-size:12px}
#personal-chat .agent-compose{flex:none;margin:10px 0 0;padding:9px 10px;background:var(--glass);border:1px solid #b7b8e04f;border-radius:23px;box-shadow:inset 0 1px 0 #e3e8ff16,0 5px 24px #0003}.agent-compose-line{display:flex;align-items:flex-end;gap:10px}.agent-compose .agent-attach{width:41px;height:41px;border-radius:50%;flex:none;background:#272e44}.agent-compose #ai-draft{font-family:inherit;flex:1;min-width:0;width:auto;resize:none;min-height:41px;max-height:112px;line-height:1.5;font-size:16px;box-sizing:border-box;padding:9px 0;border:0;background:transparent;overflow-y:auto;margin:0;color:var(--text)}.agent-compose #ai-draft::placeholder{color:#a7a7cb}.agent-compose .agent-send{height:41px;min-height:41px;width:41px;padding:0;border-radius:50%;display:grid;place-items:center;flex:none}.agent-compose-note{font-size:11px;line-height:1.5;margin:0 5px 8px;color:#b5bcd0}.agent-compose .ai-draft-image{padding:0 5px 8px;margin:0;background:transparent;display:flex;align-items:center;gap:12px}.agent-compose .ai-draft-image img{max-height:70px;max-width:100px}.agent-compose .ai-draft-image figcaption{display:grid;font-size:10px;margin:0}.agent-compose .ai-image-context-note{border:0;background:transparent;padding:0 5px 7px;margin:0;font-size:10px}
.agent-settings{padding:0;width:min(640px,calc(100% - 24px));max-height:min(850px,calc(var(--scope-visible-height,100dvh) - 24px));height:auto;color:var(--text);border-color:#b9b7eb80;border-radius:28px;overflow:hidden;box-shadow:0 20px 80px #0008;background:#191f31}
.agent-settings[open]{display:flex;flex-direction:column}.agent-sheet-handle{width:42px;height:4px;flex:none;border-radius:8px;background:#8b8cbd70;margin:12px auto 0}.agent-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px 15px;flex:none}.agent-sheet-heading h2{font-size:23px;font-weight:650;letter-spacing:-.5px;margin:0}.agent-sheet-heading .icon-button{border-radius:50%;flex:none}.agent-settings-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:0 22px 4px}.agent-settings-selects{display:grid;grid-template-columns:1fr 1fr;gap:12px}.agent-settings-selects .field{font-size:12px;gap:5px;margin-bottom:15px}.agent-settings-selects select{font-size:15px;background:#242b3d}
.agent-settings-group{background:#202737;border:1px solid #9aa6cc40;border-radius:17px;margin-bottom:16px;overflow:hidden}.agent-setting-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:16px;border-bottom:1px solid #a9b6dc26;font-size:14px;line-height:1.4}.agent-setting-row:last-child{border-bottom:0}.agent-setting-row>span{display:flex;align-items:center;gap:13px}.agent-setting-row svg,.agent-setting-link>svg,.agent-setting-details>summary>svg{flex:none;color:#c0c6e3}.agent-setting-row small,.agent-setting-details small{display:block;color:var(--muted);font-size:11px;margin-top:3px;font-weight:400}.agent-toggle{appearance:none;-webkit-appearance:none;position:relative;width:42px;height:25px;flex:none;border:1px solid #afb8d23b;border-radius:20px;background:#4b536d;margin:0;cursor:pointer}.agent-toggle:before{content:"";position:absolute;left:3px;top:3px;width:17px;height:17px;border-radius:50%;background:#e8eaf3;box-shadow:0 2px 5px #0003}.agent-toggle:checked{background:#8a71e2}.agent-toggle:checked:before{left:20px;background:white}.agent-toggle:disabled{opacity:.45;cursor:default}
.agent-setting-link,.agent-setting-details>summary{width:100%;display:flex;align-items:center;gap:13px;border:0;border-bottom:1px solid #a9b6dc26;background:transparent;padding:17px 16px;color:var(--text);font:inherit;font-size:14px;text-align:left;cursor:pointer;list-style:none;min-height:58px}.agent-setting-details>summary::-webkit-details-marker{display:none}.agent-setting-link>span,.agent-setting-details>summary>span{flex:1}.agent-setting-link>svg:last-child{transform:rotate(-90deg)}.agent-setting-details:last-child>summary{border-bottom:0}.agent-setting-details[open]>summary{border-bottom:1px solid #a9b6dc26}.agent-setting-copy{padding:2px 16px 16px;font-size:12px;line-height:1.7;color:#b9c0d5}.agent-setting-copy p{margin:12px 0}.agent-setting-copy .disclosure{font-size:11px}.agent-setting-copy .cloud-ai-admin{border:0;background:transparent;padding:0;margin:15px 0 0;border-radius:0}.agent-setting-copy .ai-thread-toolbar{gap:8px}.agent-setting-copy .button{font-size:11px}.agent-setting-copy .field input{font-size:16px}.agent-sheet-footer{padding:6px 22px 20px;flex:none}.agent-sheet-footer .button{justify-content:center;min-height:47px;width:100%;font-size:14px}.agent-settings::backdrop{background:#04071099;backdrop-filter:none}
@supports((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.topbar,.mobile-nav,#personal-chat .agent-compose{background:#1b2234c9;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.agent-settings{background:#1d2436ed;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}}
@media(max-width:760px){
 :root{--nav-space:92px}.topbar{height:57px;margin:12px 12px 0;padding:0 13px;border-radius:20px}.topbar-wordmark{font-size:18px!important;gap:9px}.scope-radar{width:29px;height:29px}.section-symbol{display:none}.top-actions{gap:8px}.prototype-badge{font-size:10px}.top-actions #help-button{width:28px;height:30px}.exchange-badge{width:26px;height:26px}.live-banner{margin-left:18px;margin-right:18px;font-size:10px;gap:8px}.live-banner .demo-chip{font-size:8px}main{padding-left:16px;padding-right:16px}.page-heading h1{font-size:27px}.panel-title{font-size:13px}.panel-subtitle,.rule-text strong{font-size:11px}.market-table th{font-size:10px}.market-table td{font-size:12px}.asset strong{font-size:11px}.text-button{font-size:11px;min-height:30px}.disclosure{font-size:11px}
 .mobile-nav{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));height:66px;max-width:510px;margin:0 auto;padding:5px 7px;display:flex;align-items:center;justify-content:space-around;inset-block-start:auto}.mobile-nav a{min-width:0;flex:1;min-height:54px;font-size:9px;gap:6px;border-radius:16px;color:#a8b4cf}.mobile-nav a svg{width:21px;height:21px}.mobile-nav a.active{color:#e1d7ff;background:radial-gradient(ellipse at center,#8870df40,#66509313);text-shadow:0 0 14px #a28aff3b}.mobile-nav a.active svg{stroke:#b29bff;filter:drop-shadow(0 0 5px #a18bff60)}.mobile-nav a .nav-development{display:none}.page-footer{padding-bottom:110px}.toast{bottom:calc(90px + env(safe-area-inset-bottom))}
 .agent-mode #main{padding:11px 14px calc(var(--nav-space) + env(safe-area-inset-bottom));min-height:0}.agent-mode .mobile-nav{top:calc(var(--scope-visible-top,0px) + var(--scope-visible-height,100dvh) - 76px - env(safe-area-inset-bottom));bottom:auto}.agent-mode .live-banner{max-height:30px;overflow:auto}.agent-toolbar{padding-bottom:13px}.agent-title-row{margin-bottom:12px}.agent-title-row h1{font-size:27px}.agent-status{font-size:9px}.agent-header-actions .icon-button{width:40px;height:40px;border-radius:13px}.agent-select-row{gap:8px;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 42px}.agent-select-row select{font-size:16px;padding-left:10px;padding-right:7px;min-height:42px}.agent-select-row .icon-button{width:42px;height:42px}.agent-message-list{gap:15px}.agent-workspace .personal-message{padding:15px;border-radius:18px}.agent-workspace .personal-message.from-user{padding:11px 14px;max-width:94%}.agent-workspace .personal-message-text{font-size:14px}.agent-workspace .ai-rich-text h2,.agent-workspace .ai-rich-text h3{font-size:17px}.agent-workspace .ai-drawing-controls .button{font-size:11px;padding:8px}.agent-settings{position:fixed;top:auto;left:0;right:0;bottom:0;margin:0 auto;width:100%;max-width:640px;max-height:calc(var(--scope-visible-height,100dvh) - 28px);border-radius:26px 26px 0 0}.agent-sheet-heading{padding:16px 18px 14px}.agent-sheet-heading h2{font-size:23px}.agent-settings-scroll{padding:0 18px 4px}.agent-settings-selects{gap:10px}.agent-settings-selects select{font-size:16px;min-height:46px}.agent-setting-row,.agent-setting-link,.agent-setting-details>summary{padding:15px 14px;font-size:14px}.agent-sheet-footer{padding:4px 18px calc(16px + env(safe-area-inset-bottom))}.agent-setting-copy{font-size:12px}.agent-mode .toast{bottom:auto;top:calc(var(--scope-visible-top,0px) + 80px);max-width:90vw}
}
@media(max-height:540px){.agent-mode .topbar{height:43px;margin-top:5px}.agent-mode .live-banner{display:none}.agent-toolbar{padding-bottom:7px}.agent-title-row{margin-bottom:5px}.agent-title-row h1{font-size:23px}.agent-status{display:none}.agent-mode .agent-select-row select{min-height:35px}.agent-mode .agent-select-row .icon-button{height:35px}.agent-header-actions .icon-button{height:34px}.agent-mode #main{padding-top:8px}.agent-compose #ai-draft{max-height:66px}.agent-compose .ai-draft-image img{max-height:42px}.agent-sheet-heading{padding-top:10px;padding-bottom:10px}}
@media(prefers-reduced-motion:reduce){.agent-settings,.agent-toggle:before,.mobile-nav a{transition:none;animation:none}.ai-wait-dots i{animation:none}.mobile-nav a.active svg{filter:none}}

/* Keep the live badge; move verbose polling details to connection settings. */
.agent-mode .live-banner{display:none}

.ai-thread-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.ai-thread-panel-heading strong{font-size:14px}.ai-thread-panel-heading .icon-button{width:38px;height:38px}
