:root {
  color-scheme: dark;
  font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #101222; --card: #1a1d32; --foreground: #f3f2fc;
  --muted: #a4aac7; --border: #2c304a; --primary: #ba90ff;
  --cyan: #75ebf2; --green: #83eac3; --negative: #ff9cb5;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin:0; min-width:320px; color:var(--foreground); background:radial-gradient(ellipse at 0 0,#3a2b55,transparent 38%),radial-gradient(ellipse at 100% 80%,#12384b,transparent 36%),#222638 }
a { color:inherit; text-decoration:none }
button,input { font:inherit }
button { cursor:pointer }
:focus-visible { outline:2px solid var(--cyan); outline-offset:3px }
h1,h2,p { margin:0 }
small { color:var(--muted) }
.startup { max-width:700px; margin:4rem auto; padding:2rem }
.desk-shell { width:min(1480px,calc(100% - 64px)); margin:32px auto; border:1px solid #333951; border-radius:25px; display:grid; grid-template-columns:214px minmax(0,1fr); background:var(--background); min-height:calc(100vh - 64px); box-shadow:0 20px 65px #05071288 }
.sidebar { position:sticky; top:0; min-width:0; height:min(100vh,900px); display:flex; flex-direction:column; padding:28px 18px 20px; background:#16192b; border-right:1px solid #292d43; border-radius:24px 0 0 24px }
.brand { display:flex; align-items:center; gap:10px; font-weight:680; white-space:nowrap; letter-spacing:-.015em }
.brand small,.sidebar-foot small { display:block; font-weight:400; font-size:11px; margin-top:1px }
.brand-icon { display:grid; place-items:center; width:36px; height:36px; color:#fbf5ff; background:linear-gradient(145deg,#c668ec,#7656d9); border-radius:11px; box-shadow:0 4px 18px #b047f044; flex:none }
nav { display:grid; gap:6px; margin:42px 0 16px }
nav a { display:flex; align-items:center; gap:11px; padding:10px 11px; font-weight:550; border-radius:8px; color:var(--muted) }
nav a:hover,nav a:focus-visible { background:#29213e; color:#f7efff }
nav .home-link { background:linear-gradient(95deg,#503260,#29203e); color:#f9edff; box-shadow:inset 3px 0 #d387f7 }
nav svg { color:#d591f5 }
.sidebar-foot { margin-top:auto; display:flex; gap:10px; align-items:center; padding:13px 9px 4px; border-top:1px solid var(--border); font-size:12px }
.mini-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:currentColor; flex:none }
.sidebar-foot .mini-dot { color:var(--cyan) }
.skip-link { position:absolute; left:-999px; z-index:2 }
.skip-link:focus { left:30px; top:10px; background:var(--background); padding:10px }
.workspace { min-width:0; padding:27px 30px 32px; scroll-margin-top:12px }
.page-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:23px }
.page-header h1 { letter-spacing:-.06em; font-size:clamp(26px,3vw,37px); line-height:1.2 }
.page-header p { color:var(--muted); margin-top:4px }
.header-badges { display:flex; gap:8px; flex-wrap:wrap }
.card { min-width:0; border:1px solid #282c45; border-radius:14px; background:var(--card) }
.card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; padding:19px 19px 0 }
.card-title { font-weight:665; font-size:16px; letter-spacing:-.025em; line-height:1.25 }
.card-description { margin-top:5px; color:var(--muted); font-size:12px }
.card-content { padding:14px 19px 17px }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:14px }
.metric { padding:15px 16px; min-height:112px }
.metric-top { display:flex; justify-content:space-between; gap:7px; align-items:center; font-size:12px; font-weight:625 }
.metric-top svg { flex:none }
.metric-value { display:block; margin:6px 0 3px; font-variant-numeric:tabular-nums; letter-spacing:-.05em; font-size:clamp(25px,3vw,34px); line-height:1.15 }
.metric p { color:var(--muted); font-size:11px }
.metric-violet { background:linear-gradient(115deg,#8340af,#5e43bc 65%,#5642a4); border-color:#9d64cb }
.metric-cyan { background:linear-gradient(115deg,#0a747f,#136ea0 62%,#3856a0); border-color:#379cac }
.metric-violet p,.metric-cyan p { color:#f2eaff }
.chart-grid { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(225px,1fr); gap:14px; margin-bottom:14px }
.chart-value { text-align:right; flex:none }
.chart-value strong { color:var(--cyan); font-variant-numeric:tabular-nums }
.chart-value span { display:block; color:var(--muted); font-size:11px }
.equity { width:100%; display:block; min-height:116px }
.equity text { font:12px system-ui; fill:var(--muted) }
.gridline { stroke:#323650; stroke-width:1 }
.baseline { stroke:#9866d5; stroke-width:1.45; stroke-dasharray:4 4 }
.equity-line { fill:none; stroke:#78e6f5; stroke-width:2.5 }
.equity-dot { fill:#85f0f6; stroke:#1d5270; stroke-width:2 }
.chart-empty { color:var(--muted); padding:42px 10px; display:flex; align-items:center; justify-content:center; gap:10px; font-size:12px }
.market-labels,.market-line { display:grid; grid-template-columns:1fr .8fr .8fr; gap:5px; align-items:center; text-align:right; font-variant-numeric:tabular-nums }
.market-labels { color:var(--muted); font-size:11px }
.market-labels span:first-child,.market-line strong { text-align:left }
.market-line { padding:10px 0; font-size:12px; border-bottom:1px solid var(--border) }
.market-line strong { display:flex; align-items:center; gap:6px }
.market-line i { height:8px; width:8px; border-radius:50%; background:#ffbd78 }
.market-line .sol { background:#bc94ff }
.negative { color:var(--negative) }
.up { color:var(--green) }
.readiness-note { display:flex; gap:8px; align-items:flex-start; margin-top:13px; border:1px solid #373452; background:#22213a; border-radius:8px; padding:8px; font-size:12px }
.readiness-note svg { flex:none; color:var(--primary) }
.readiness-note small { display:block; font-size:11px }
.feed-card { scroll-margin-top:18px }
.feed-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap }
.filters { display:flex; gap:4px; padding:3px; border:1px solid var(--border); background:#141728; border-radius:9px }
.button { color:var(--muted); padding:6px 10px; border:0; background:transparent; border-radius:6px; font-size:12px }
.button:hover,.button.selected { background:#332549; color:#f4e8ff }
.search { display:flex; gap:7px; align-items:center; border:1px solid var(--border); border-radius:8px; color:var(--muted); padding:0 9px }
.search:focus-within { outline:1px solid var(--primary) }
.input { padding:7px 0; border:0; color:var(--foreground); background:transparent; min-width:0; width:145px; font-size:12px }
.input:focus-visible { outline:none }
.table-container { width:100%; overflow-x:auto; border:1px solid var(--border); border-radius:9px; max-height:410px }
.table { width:100%; border-collapse:separate; border-spacing:0; min-width:600px; text-align:left; font-variant-numeric:tabular-nums }
.table-head { padding:9px 12px; color:#b9bdd8; font-weight:600; font-size:11px; background:#20233a; position:sticky; top:0 }
.table-cell { border-top:1px solid var(--border); padding:8px 12px; white-space:nowrap; font-size:12px }
.table-row:hover .table-cell { background:#20243b }
.table-cell small { display:block; max-width:200px; overflow:hidden; text-overflow:ellipsis; margin-top:2px; font-size:10px }
.coin { display:flex; align-items:center; gap:8px; min-width:85px }
.coin-link { display:inline-flex; align-items:center; gap:8px; border-radius:6px }
.coin-link svg { color:var(--muted); flex:none }
.coin-link:hover,.coin-link:focus-visible,.coin-link:hover svg,.coin-link:focus-visible svg { color:var(--cyan) }
.coin-link:hover strong,.coin-link:focus-visible strong { text-decoration:underline; text-underline-offset:3px }
.coin-avatar { flex:none; display:grid; place-items:center; border-radius:8px; width:31px; height:31px; background:#3b315f; color:#e5ccff; font-weight:700 }
.avatar-1 { background:#1d4656; color:#98ecf0 }
.avatar-2 { background:#543045; color:#f7b2d1 }
.coin-name { display:block; max-width:155px; overflow:hidden; text-overflow:ellipsis }
.badge { display:inline-flex; gap:6px; align-items:center; border-radius:6px; padding:4px 8px; white-space:nowrap; font-size:10px; font-weight:680; background:#30344e; color:#e3e4f5; border:1px solid transparent; line-height:1.25; align-self:flex-start }
.badge.violet { color:#e7c8ff; background:#392750; border-color:#5c3e75 }
.badge.positive { color:#9cf3cc; background:#1a3f3d; border-color:#2b6254 }
.badge.warning { color:#ffe2a2; background:#463922; border-color:#6c5430 }
.badge.info { color:#aeeef9; background:#203e54; border-color:#31536a }
.badge.danger { color:#ffc0cb; background:#49283c; border-color:#6f3c56 }
.feed-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:11px; margin-top:10px }
.empty { padding:18px 10px; text-align:center; color:var(--muted); font-size:12px }
.decisions { margin-top:14px; scroll-margin-top:18px }
.decision { display:grid; grid-template-columns:65px 1fr auto; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--border) }
.decision strong,.decision small { display:block; overflow-wrap:anywhere }
.error-strip { color:var(--negative); margin-bottom:12px }
@media(max-width:1050px) {
  .desk-shell { width:calc(100% - 32px); margin:16px auto; grid-template-columns:162px minmax(0,1fr) }
  .sidebar { padding-inline:12px }
  .workspace { padding-inline:18px }
  .brand { font-size:12px }
  .metric { padding-inline:12px }
}
@media(max-width:825px) {
  .desk-shell { grid-template-columns:minmax(0,1fr) }
  .sidebar { position:static; border-radius:24px 24px 0 0; border-right:0; border-bottom:1px solid var(--border); height:auto; flex-direction:row; justify-content:space-between; align-items:center; padding:12px 15px }
  nav { display:flex; margin:0; gap:2px }
  nav a { padding:7px; gap:5px; font-size:11px }
  nav svg { width:14px }
  .sidebar-foot { display:none }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)) }
}
@media(max-width:590px) {
  .desk-shell { width:100%; margin:0; border:0; border-radius:0 }
  .sidebar { border-radius:0; flex-wrap:wrap; gap:8px }
  .workspace { padding:18px 12px 24px }
  .page-header { align-items:flex-start }
  .page-header p { font-size:11px }
  .chart-grid { grid-template-columns:minmax(0,1fr) }
  .card-header { padding-inline:13px }
  .card-content { padding-inline:13px }
  .header-badges { justify-content:flex-end }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto } }

.worker-panel,.trading-panel { margin:14px 0; scroll-margin-top:18px }
.worker-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(132px,1fr)); gap:8px }
.worker { min-width:0; border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#171a2c }
.worker-details { padding:10px 11px 12px }
.worker-heading { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px 6px }
.worker-heading strong { font-size:12px }
.worker p { font-size:11px; color:var(--muted); margin:5px 0 0 }
.bot-avatar {
  --stage-hue: 180;
  --pose: bot-rest;
  --cycle: 4s;
  display:flex; align-items:center; justify-content:center; gap:5px;
  height:114px; isolation:isolate; overflow:hidden; border-bottom:1px solid var(--border);
  background:radial-gradient(ellipse 65% 75% at 50% 64%,hsl(var(--stage-hue) 56% 37% / .36),transparent),
    linear-gradient(155deg,#20263c,#101425 72%);
}
.bot-avatar[data-bot="chart"] { --stage-hue: 225 }
.bot-avatar[data-bot="forecast"] { --stage-hue: 268 }
.bot-avatar[data-bot="risk"] { --stage-hue: 146 }
.bot-avatar[data-bot="debate"] { --stage-hue: 315 }
.bot-character {
  --hue: 177;
  --shape: 44% 48% 40% 36% / 56% 54% 39% 38%;
  --offset: 0s;
  position:relative; width:73px; height:72px; flex-shrink:0;
}
.bot-character::before {
  content:""; position:absolute; left:7%; right:7%; bottom:-4%; height:13%; border-radius:50%;
  background:#080b18ad; filter:blur(3px); animation:bot-ground var(--cycle) ease-in-out var(--offset) infinite;
}
.bot-puppet {
  position:absolute; inset:0; transform-origin:50% 92%;
  animation:var(--pose) var(--cycle) ease-in-out var(--offset) infinite;
}
.bot-body {
  position:absolute; inset:9% 3% 5%; border-radius:var(--shape);
  background:radial-gradient(ellipse at 31% 19%,#fff9,transparent 42%),
    radial-gradient(ellipse at 72% 73%,hsl(var(--hue) 90% 55% / .52),transparent 62%),
    linear-gradient(142deg,hsl(var(--hue) 90% 70%),hsl(var(--hue) 67% 46%) 64%,hsl(var(--hue) 74% 27%));
  box-shadow:inset 0 2px 5px #fff4,inset -3px -5px 7px #0d143d5c,0 7px 14px #090c1f56;
}
.bot-feet { position:absolute; inset:auto 16% 0; height:23%; }
.bot-feet::before,.bot-feet::after {
  content:""; position:absolute; bottom:0; width:43%; height:85%; border-radius:54% 57% 46% 47%;
  background:linear-gradient(150deg,hsl(var(--hue) 62% 58%),hsl(var(--hue) 70% 27%));
  box-shadow:inset 0 2px 3px #fff3;
}
.bot-feet::after { right:0 }
.bot-face {
  position:absolute; inset:40% 26% auto; height:36%; color:#19172b;
  animation:bot-look 6.2s ease-in-out var(--offset) infinite;
}
.bot-eyes { display:flex; justify-content:space-between; align-items:center; padding:0 4%; }
.bot-eyes span {
  width:21%; aspect-ratio:.81; border-radius:50%; background:currentColor;
  box-shadow:inset 0 -1px 2px #08091d9e,0 1px 1px #fff3;
  animation:bot-blink 4.8s ease-in-out var(--offset) infinite;
}
.bot-eyes span::before {
  content:""; display:block; width:32%; aspect-ratio:1; border-radius:50%;
  background:#fff9; margin:21% 0 0 22%;
}
.bot-mouth {
  display:block; width:26%; height:26%; margin:12% auto 0;
  border:solid currentColor; border-width:0 0 2px; border-radius:0 0 60% 60%;
}
.bot-accessory { position:absolute; pointer-events:none; }
.bot-character[data-character="scanner"] .bot-accessory {
  top:0; left:19%; width:7%; height:28%; background:#206a74; border-radius:5px; transform:rotate(-23deg);
  box-shadow:inset 2px 0 0 #a4f8f56e;
}
.bot-character[data-character="scanner"] .bot-accessory::before {
  content:""; position:absolute; top:-20%; left:-75%; width:247%; aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle at 32% 24%,#fffbc1,#ffbc5a 53%,#b86a35); box-shadow:0 0 9px #ffbc5a73;
}
.bot-character[data-character="chart"] { --hue: 218; --shape: 37% 39% 29% 35% / 45% 46% 30% 34%; --offset:-.38s; }
.bot-character[data-character="chart"] .bot-accessory {
  top:46%; left:24%; width:52%; height:4%; border-radius:4px; background:#303368;
}
.bot-character[data-character="chart"] .bot-accessory::before,.bot-character[data-character="chart"] .bot-accessory::after {
  content:""; position:absolute; top:-5px; width:47%; height:16px; border:2px solid #303368;
  border-radius:41%; background:linear-gradient(135deg,#dfebff55,transparent 52%); box-shadow:0 1px 1px #1221416b;
}
.bot-character[data-character="chart"] .bot-accessory::after { right:0 }
.bot-character[data-character="forecast"] { --hue: 264; --shape: 52% 48% 46% 50% / 62% 59% 38% 37%; --offset:-1.3s; }
.bot-character[data-character="forecast"] .bot-accessory {
  top:3%; right:6%; width:26%; aspect-ratio:1; transform:rotate(17deg);
  background:linear-gradient(145deg,#fff4c9,#fbb96d 62%,#e18855);
  clip-path:polygon(50% 0,62% 35%,100% 47%,65% 62%,57% 100%,39% 66%,0 55%,33% 38%);
}
.bot-character[data-character="risk"] { --hue: 147; --shape: 43% 42% 32% 32% / 42% 41% 31% 31%; --offset:-.7s; }
.bot-character[data-character="risk"] .bot-accessory {
  bottom:11%; right:11%; width:27%; height:27%;
  background:linear-gradient(150deg,#fff1bd,#f2bd57 58%,#a86e38);
  clip-path:polygon(50% 0,95% 18%,86% 65%,50% 100%,14% 65%,5% 18%);
}
.bot-character[data-character="risk"] .bot-accessory::after {
  content:""; position:absolute; top:29%; left:31%; width:32%; height:22%;
  transform:rotate(-45deg); border:solid #644327; border-width:0 0 2px 2px;
}
.bot-character[data-character="bull"],.bot-character[data-character="bear"] { width:49px; height:52px; }
.bot-character[data-character="bull"] { --hue: 30; --shape: 39% 43% 38% 42% / 50% 55% 40% 44%; --offset:-1.5s; }
.bot-character[data-character="bear"] { --hue: 323; --shape: 56% 49% 39% 35% / 57% 56% 38% 41%; --offset:-2.8s; }
.bot-character[data-character="bull"] .bot-accessory,.bot-character[data-character="bear"] .bot-accessory {
  inset:5% 6% auto; height:27%; z-index:-1;
}
.bot-character[data-character="bull"] .bot-accessory::before,.bot-character[data-character="bull"] .bot-accessory::after,
.bot-character[data-character="bear"] .bot-accessory::before,.bot-character[data-character="bear"] .bot-accessory::after {
  content:""; position:absolute; top:0; width:35%; height:100%;
}
.bot-character[data-character="bull"] .bot-accessory::before,.bot-character[data-character="bull"] .bot-accessory::after {
  border-radius:18% 73% 30% 69%; transform:rotate(-24deg); background:linear-gradient(#fff2d6,#c57b52);
}
.bot-character[data-character="bull"] .bot-accessory::after { right:0; transform:scaleX(-1) rotate(-24deg); }
.bot-character[data-character="bear"] .bot-accessory::before,.bot-character[data-character="bear"] .bot-accessory::after {
  border-radius:50%; background:radial-gradient(circle at 55% 58%,#732b61 0 25%,#e686b8 32%,#b851a1);
}
.bot-character[data-character="bear"] .bot-accessory::after { right:0 }
.bot-avatar[data-motion="running"] { --pose:bot-hop; --cycle:1.65s }
.bot-avatar[data-motion="scheduled"] { --pose:bot-nod; --cycle:2.9s }
.bot-avatar[data-motion="delayed"] { --stage-hue:40; --pose:bot-hesitate; --cycle:3.2s }
.bot-avatar[data-motion="error"] { --stage-hue:344; --pose:bot-wobble; --cycle:2.9s }
.bot-avatar[data-motion="unknown"] { --pose:bot-search; --cycle:3.8s }
.bot-avatar[data-motion="unconfigured"] { --pose:bot-doze; --cycle:5.8s }
.bot-avatar[data-motion="running"] .bot-mouth { border-width:0; background:currentColor; border-radius:25% 25% 55% 55%; }
.bot-avatar[data-motion="delayed"] .bot-mouth,.bot-avatar[data-motion="unknown"] .bot-mouth {
  width:18%; height:27%; border:1.5px solid currentColor; border-radius:50%;
}
.bot-avatar[data-motion="error"] .bot-mouth { border-width:2px 0 0; border-radius:65% 65% 0 0; }
.bot-avatar[data-motion="unconfigured"] .bot-eyes span { animation:bot-sleep 5.8s ease-in-out var(--offset) infinite; }
@keyframes bot-rest {
  0%,100% { transform:translateY(0) scale(1.02,.98) rotate(-2deg) }
  50% { transform:translateY(-2px) scale(.98,1.02) rotate(2deg) }
}
@keyframes bot-hop {
  0%,100% { transform:translateY(0) scale(1,1) rotate(-2deg) }
  20% { transform:scale(1.08,.91) }
  51% { transform:translateY(-9px) scale(.94,1.06) rotate(4deg) }
  71% { transform:translateY(-3px) scale(.99,1.02) }
  86% { transform:scale(1.05,.94) }
}
@keyframes bot-nod {
  0%,100% { transform:rotate(-4deg) }
  35% { transform:translateY(2px) scale(1.04,.95) rotate(4deg) }
  61% { transform:translateY(-3px) scale(.98,1.03) rotate(1deg) }
}
@keyframes bot-hesitate {
  0%,100% { transform:translateX(-2px) rotate(-6deg) }
  32%,50% { transform:scale(1.07,.94) rotate(4deg) }
  76% { transform:translate(4px,-3px) rotate(8deg) }
}
@keyframes bot-wobble {
  0%,100% { transform:rotate(-2deg) }
  12% { transform:translate(-2px,-2px) rotate(-9deg) }
  24% { transform:translate(3px,-3px) rotate(8deg) }
  40% { transform:scale(1.06,.92) rotate(-4deg) }
  65% { transform:scale(.98,1.02) }
}
@keyframes bot-search {
  0%,100% { transform:translateX(-4px) rotate(-7deg) }
  52% { transform:translate(4px,-2px) rotate(7deg) }
}
@keyframes bot-doze {
  0%,100% { transform:scale(1.03,.97) rotate(-5deg) }
  50% { transform:translateY(-2px) scale(.98,1.03) rotate(-2deg) }
}
@keyframes bot-look {
  0%,100% { transform:translateX(-1px) }
  48%,65% { transform:translateX(2px) }
}
@keyframes bot-ground {
  0%,100% { opacity:.76; transform:scale(.97) }
  50% { opacity:.46; transform:scale(.83,.92) }
}
@keyframes bot-blink {
  0%,42%,49%,100% { transform:scaleY(1) }
  45% { transform:scaleY(.13) }
}
@keyframes bot-sleep {
  0%,100% { transform:scaleY(.19) }
  48% { transform:scaleY(.43) }
}
@keyframes bot-soft {
  0%,100% { opacity:.87 }
  50% { opacity:1 }
}
@media(prefers-reduced-motion:reduce) {
  .bot-puppet { animation:bot-soft 6s ease-in-out var(--offset) infinite; }
  .bot-face,.bot-eyes span,.bot-character::before { animation:none; }
  .bot-avatar[data-motion="unconfigured"] .bot-eyes span { animation:none; transform:scaleY(.3); }
}
.chart-toolbar,.chart-summary,.chart-legend,.chart-intervals { display:flex; flex-wrap:wrap; align-items:center; gap:8px }
.chart-toolbar { justify-content:space-between }
.chart-toolbar select { color:inherit; background:#252641; border:1px solid var(--border);
  border-radius:7px; padding:8px; max-width:100% }
.chart-intervals .button[aria-pressed="true"] { background:#493769; color:#f3ddff }
.chart-summary { margin:12px 0 3px }.chart-summary small,.chart-legend { color:var(--muted); font-size:11px }
.fomo-link,.chart-shortcut { display:inline-flex; align-items:center; gap:4px; color:#aeeef9; font-size:12px }
.chart-provider-links { display:flex; flex-wrap:wrap; gap:8px 14px }
.chart-shortcut { display:flex; width:max-content; margin-top:4px }

.theme-switch { border:1px solid var(--border); color:var(--foreground); align-self:center }
.chart-tools,.activity-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.chart-tools { padding:8px 0; }
.chart-tools select { color:inherit; background:#252641; border:1px solid var(--border); border-radius:7px; padding:5px 7px; }
.chart-tools .button[aria-pressed="true"] { background:#493769; color:#f3ddff }
.instrument-metrics {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:1px;
  margin:14px 0 5px; background:var(--border); border:1px solid var(--border); border-radius:9px; overflow:hidden;
}
.instrument-metrics div { min-width:0; background:var(--card); padding:8px 10px; }
.instrument-metrics dt { color:var(--muted); font-size:11px }
.instrument-metrics dd { margin:2px 0 0; font-size:14px; font-weight:670; font-variant-numeric:tabular-nums; overflow-wrap:anywhere }
.chart-summary { min-height:20px; }
.desk-chart .chart-legend { margin-top:7px }
.desk-opencharts-canvas { height:clamp(360px,48vw,550px); border:1px solid var(--border); border-radius:7px; }
.desk-opencharts-controls { display:flex; align-items:center; gap:12px; padding:6px 0; font-size:12px; }
.desk-opencharts-controls details { position:relative; }
.desk-opencharts-controls summary { cursor:pointer; }
.desk-opencharts-controls details > div {
  position:absolute; z-index:30; top:calc(100% + 6px); left:0; display:grid; gap:6px; width:max-content;
  background:var(--card); color:var(--foreground); border:1px solid var(--border); border-radius:7px; padding:10px;
}
.desk-opencharts-controls label { display:flex; align-items:center; gap:8px; }
.market-activity { margin-top:15px; border-top:1px solid var(--border); padding-top:12px; }
.activity-toolbar { justify-content:space-between; margin-bottom:9px }
.activity-table { min-width:500px }
.activity-table a { text-decoration:underline; text-underline-offset:2px; color:var(--cyan) }

.openui-workspace { margin:14px 0; scroll-margin-top:18px }
.openui-tabs,.openui-actions,.saved-heading,.saved-dashboard-head,.saved-controls { display:flex; align-items:center; gap:8px }
.openui-tabs { margin-bottom:10px }
.openui-tabs .selected { background:#493769; color:#f3ddff; border-color:#7652a7 }
.openui-composer { display:grid; gap:8px }
.openui-composer input,.openui-composer textarea {
  box-sizing:border-box; width:100%; border:1px solid var(--border); border-radius:9px;
  background:var(--background); color:var(--foreground); padding:10px 12px; font:inherit;
}
.openui-composer textarea { resize:vertical; min-height:76px; line-height:1.45 }
.openui-composer input:focus,.openui-composer textarea:focus { outline:2px solid #8d63c8; outline-offset:1px }
.openui-actions { justify-content:flex-end }
.openui-submit { background:linear-gradient(135deg,#7546b3,#5d3592); color:#fff; border-color:#9066c5 }
.openui-current,.saved-dashboard { margin-top:12px; border:1px solid var(--border); border-radius:11px; background:var(--background); overflow:hidden }
.openui-result { min-height:72px; padding:12px; color:var(--foreground) }
.openui-setup,.openui-error { margin:10px 0 0; border-radius:8px; padding:10px 12px; font-size:12px }
.openui-setup { background:#28243d; color:#d8c9ee }
.openui-error { background:#4e1f2a; color:#ffd9df }
.saved-dashboards { margin-top:18px; border-top:1px solid var(--border); padding-top:15px }
.saved-heading,.saved-dashboard-head { justify-content:space-between }
.saved-heading h3 { margin:0; font-size:14px }
.saved-heading small,.saved-dashboard-head small { color:var(--muted) }
.saved-grid { display:grid; gap:10px; margin-top:10px }
.saved-dashboard-head { padding:10px 12px; border-bottom:1px solid var(--border); flex-wrap:wrap }
.saved-dashboard-head strong,.saved-dashboard-head small { display:block }
.saved-dashboard-head small { margin-top:3px; font-size:10px }
.saved-controls { flex-wrap:wrap }
@media(max-width:680px) {
  .openui-actions,.saved-dashboard-head { align-items:stretch }
  .saved-dashboard-head { flex-direction:column }
  .saved-controls .button { flex:1 }
}
.fomo-thesis { padding:8px 3px; }
.fomo-thesis p { margin:5px 0 }
.fomo-thesis code { display:block; color:var(--muted); overflow-wrap:anywhere; user-select:all }

:root[data-theme="light"] {
  color-scheme:light;
  --background:#f8f7fc; --card:#ffffff; --foreground:#221d38; --muted:#57526d; --border:#dcd6e9;
  --primary:#633ab2; --cyan:#04666d; --green:#087250; --negative:#a82951;
}
[data-theme="light"] body { background:radial-gradient(ellipse at 0 0,#e5d8fa,transparent 50%),#eeedf6 }
[data-theme="light"] .desk-shell { border-color:#ddd6e9; box-shadow:0 16px 48px #37275b20 }
[data-theme="light"] .sidebar { background:#f0edf8; border-color:var(--border) }
[data-theme="light"] nav svg { color:#7649aa }
[data-theme="light"] nav a:hover,[data-theme="light"] nav a:focus-visible,[data-theme="light"] nav .home-link {
  background:#e9def6; color:#482777;
}
[data-theme="light"] nav .home-link { box-shadow:inset 3px 0 #9357cf }
[data-theme="light"] .card { border-color:var(--border) }
[data-theme="light"] .metric-violet { color:#fff; border-color:#9971cd }
[data-theme="light"] .metric-cyan { color:#fff; border-color:#3b8caa }
[data-theme="light"] .gridline { stroke:#e8e1f0 }
[data-theme="light"] .equity-line { stroke:#007c83 }
[data-theme="light"] .equity-dot { fill:#27aaad; stroke:#0c676c }
[data-theme="light"] .readiness-note { background:#f3eefb; border-color:#dfd3f0 }
[data-theme="light"] .filters,[data-theme="light"] .chart-toolbar select,[data-theme="light"] .chart-tools select { background:#f5f2fa; }
[data-theme="light"] .button:hover,[data-theme="light"] .button.selected,[data-theme="light"] .button[aria-pressed="true"] {
  background:#e9dff8; color:#4b2c78;
}
[data-theme="light"] .table-head,[data-theme="light"] .table-row:hover .table-cell { background:#f5f1fa; color:var(--foreground); }
[data-theme="light"] .worker { background:#fbf9fe }
[data-theme="light"] .bot-avatar {
  background:radial-gradient(ellipse 72% 83% at 50% 63%,hsl(var(--stage-hue) 65% 80% / .58),transparent),
    linear-gradient(145deg,#f7f4fc,#ede8f6);
}
[data-theme="light"] .bot-character::before { background:#55436554 }
[data-theme="light"] .fomo-link,[data-theme="light"] .chart-shortcut { color:#176371 }
[data-theme="light"] .badge { background:#eee9f6; color:#49415d; border-color:#e1d9ed }
[data-theme="light"] .badge.violet { background:#f0e2fc; color:#5b2a84; border-color:#e0cbf3 }
[data-theme="light"] .badge.positive { background:#dcf4ea; color:#155c48; border-color:#bfe7d8 }
[data-theme="light"] .badge.warning { background:#fff3d6; color:#724a06; border-color:#f0dbad }
[data-theme="light"] .badge.info { background:#e1f3fa; color:#185774; border-color:#c5e5ef }
[data-theme="light"] .badge.danger { background:#fae4eb; color:#8d3152; border-color:#f0cdd9 }

@font-face {
  font-family: Geist;
  src: url("/vendor/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root { font-family: Geist, system-ui, sans-serif; --accent: #ff806a; }
:root[data-theme="dark"] {
  --background:#151322; --card:#201b30; --border:#373047;
  --muted:#b5abc7; --foreground:#f6f2ff; --cyan:#6ce3e4;
}
body { background:var(--background); }
.desk-shell { border:0; box-shadow:none; margin:0 auto; width:min(1550px,100%); min-height:100vh; border-radius:0; }
.sidebar { background:var(--card); border-color:var(--border); border-radius:0; height:100vh; }
.workspace { padding:28px clamp(14px,3vw,44px); }
.page-header h1 { font-size:clamp(24px,3vw,34px); letter-spacing:-.04em; }
.card,.metric-violet,.metric-cyan { background:var(--card); border-color:var(--border); border-radius:12px; }
.metric-violet .metric-value,.metric-cyan .metric-value { color:var(--cyan); }
.metric-violet p,.metric-cyan p { color:var(--muted); }
.metric-value { font-size:clamp(22px,2.8vw,32px); }
.brand-icon { color:#18101b; background:var(--accent); box-shadow:none; }
.navigation-menu a[aria-current] { background:var(--accent); color:#241420; }
.navigation-menu a[aria-current] svg { color:inherit; }
.button,.navigation-menu a,.kibo-theme button,.desk-settings summary {
  transition: background-color 160ms, color 160ms, transform 160ms;
}
.button:active,.navigation-menu a:active,.kibo-theme button:active { transform:translateY(1px); }
.button:disabled { opacity:.5; cursor:default; }
.button[aria-pressed="true"] { border:1px solid currentColor; }
.table-row:hover { background:color-mix(in srgb,var(--cyan) 7%,transparent); }
.kibo-status { display:inline-flex; align-items:center; gap:7px; font-size:11px; font-weight:550; }
.kibo-status-dot { width:8px; height:8px; flex:none; border-radius:50%; background:#e5ac50; }
.kibo-status[data-status="online"] .kibo-status-dot { background:#29bb8a; box-shadow:0 0 0 3px #29bb8a26; }
.kibo-status[data-status="offline"] .kibo-status-dot { background:#ef667d; }
.kibo-theme { display:flex; gap:3px; }
.kibo-theme button,.desk-settings summary { background:transparent; color:var(--foreground); border:1px solid var(--border); border-radius:7px; padding:5px 10px; }
.kibo-theme button:hover,.desk-settings summary:hover { background:var(--background); }
.kibo-theme button[aria-pressed="true"] { background:var(--accent); color:#241420; }
.desk-settings { position:relative; }
.desk-settings summary { cursor:pointer; list-style:none; font-size:12px; }
.desk-popover { position:absolute; z-index:4; right:0; top:calc(100% + 6px); padding:7px; background:var(--card); border:1px solid var(--border); border-radius:9px; }
.pagination { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin:8px 0; }
.drawer { margin:0 0 0 auto; height:100%; max-height:none; width:min(100%,420px); max-width:100%; border:1px solid var(--border); color:var(--foreground); background:var(--card); padding:24px; }
.drawer::backdrop { background:#090611a6; }
.drawer .item { display:grid; gap:10px; margin:16px 0; overflow-wrap:anywhere; }
.desk-resize { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin:0 0 14px; color:var(--muted); font-size:11px; }
.desk-resize input { accent-color:var(--accent); }
.desk-toast,.desk-loading { display:flex; align-items:center; gap:8px; margin-bottom:14px; padding:10px; background:var(--card); border:1px solid var(--border); border-radius:8px; }
.desk-spinner { width:15px; height:15px; border:2px solid var(--border); border-top-color:var(--cyan); border-radius:50%; animation:desk-rotate .8s linear infinite; }
@keyframes desk-rotate { to { transform:rotate(360deg) } }
.message-scroller { max-height:550px; overflow:auto; margin:14px 0 0; }
@media (max-width:760px) {
  .sidebar { height:auto; }
  .chart-grid { grid-template-columns:minmax(0,1fr) !important; }
  .desk-resize { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition:none !important; animation-duration:.01ms !important; }
}
.desk-login { display:grid; gap:10px; }
.desk-login input,.desk-login button { width:100%; border:1px solid var(--border); padding:10px; border-radius:8px; }
.desk-login input { color:var(--foreground); background:var(--background); }
.desk-login button { color:#241420; background:var(--accent); }
.desk-login button:hover { filter:brightness(1.12); }
.desk-login [role="alert"] { color:var(--negative); }
