/* Shared navigation for the market desks. */
#workspace:not([hidden]){
  --gutter:clamp(24px,3.5vw,58px);
  --ink:#eff5f2;--muted:#aab9b1;
  background-color:#0a0d0e;
  background-image:
    radial-gradient(ellipse 64% 285px at 86% -48px,#259e72 0%,#166c51c7 37%,#193d3280 68%,transparent),
    radial-gradient(ellipse 51% 243px at 8% -115px,#558668bd 0%,#2f503c89 52%,transparent),
    linear-gradient(180deg,#182b23 0,#101916 160px,#0a0d0e 410px);
}
#workspace .terminal-nav,#workspace main{max-width:1500px}
#workspace .terminal-nav{
  display:grid;grid-template-columns:minmax(130px,1fr) auto minmax(160px,1fr);align-items:center;
  min-height:66px;gap:14px;padding:9px var(--gutter);border:0;
}
#workspace .terminal-nav::after{content:'';height:1px;position:absolute;inset:auto var(--gutter) 0;background:linear-gradient(90deg,#e1ffe410,#e1ffe438 48%,#e1ffe410)}
#workspace .brand{gap:9px;flex-direction:row;align-items:center}
#workspace .brand .radar-word{width:88px}
#workspace .brand img.radar-emblem{width:33px;height:33px;box-shadow:none}
#workspace .nav-capsule{
  display:flex;align-items:center;justify-content:center;gap:2px;padding:4px 5px;
  border-radius:38px;background:linear-gradient(162deg,#cdf6dc12,#04140d38);
  border:1px solid #d0f6d62b;box-shadow:inset 0 1px #f1ffef0e;
}
#workspace .nav-capsule .nav-item,#workspace .nav-capsule .nav-item.active{
  width:auto;min-width:0;height:37px;padding:0 11px;min-height:37px;gap:6px;
  border:1px solid transparent;border-radius:24px;box-shadow:none;background:none;color:#c6d6cb;
}
#workspace .nav-capsule .nav-item span,#workspace .nav-capsule .nav-item.active span{display:inline;font:510 12px/1.35 Vazirmatn,sans-serif}
#workspace .nav-capsule .nav-item svg{width:16px;height:16px;filter:none}
#workspace .nav-capsule .nav-item:not(.active):is(:hover,:focus-visible)::after{content:none}
#workspace .nav-capsule .nav-item:not(.active):hover{background:#ebfff414;color:#f3fff3}
#workspace .nav-capsule .nav-item.active{
  background:linear-gradient(155deg,#cef8db22,#87c89d12);color:#f1fff4;border-color:#e1ffdc4a;
  box-shadow:inset 0 1px #ffffff0c;
}
.desk-search{
  display:flex;gap:7px;align-items:center;justify-content:center;min-height:36px;padding:5px 8px 5px 10px;
  color:#d9e7de;border:1px solid #ddfdea34;border-radius:22px;background:#093a272b;
  font:500 12px/1.4 Vazirmatn,sans-serif;cursor:pointer;
}
.desk-search>svg{width:16px;height:16px}.desk-search kbd{font:500 10px/1.4 system-ui,sans-serif;letter-spacing:.02em;border:1px solid #c9e4d22a;border-radius:4px;padding:1px 4px;color:#c2d1c6}
.desk-search:hover{background:#c3f3c71a;color:#fff}
.desk-search:focus-visible,#desk-palette :focus-visible{outline:2px solid #ade9b8;outline-offset:3px}
#workspace .shell-tools{gap:6px}
#workspace .shell-tools .tool-circle{width:36px;height:36px;min-height:36px;background:#153a2d4d;border-color:#ddfdea31}
#workspace .shell-tools .tool-circle:hover,#workspace .shell-tools .tool-circle:focus-visible{background:#c7efcc16;color:#f2fff3}
#workspace #device-open{color:#c5f4d6;background:#b1eac411}
#workspace .shell-dropdown{background:#16211deF;backdrop-filter:blur(18px);border:1px solid #b3d4be3c;box-shadow:0 16px 48px #01060588}
#workspace .shell-dropdown button{min-height:40px}
#workspace .shell-dropdown button svg{width:16px;height:16px;flex:none}
#workspace:is([data-view=home],[data-view=coach]) .page-header,
#workspace .page-header{
  display:flex;align-items:center;justify-content:space-between;min-height:0;position:relative;isolation:auto;overflow:visible;
  margin:0;padding:clamp(15px,1.5vw,25px) 0 clamp(13px,1.3vw,21px);
  border:0;border-radius:0;background:transparent;box-shadow:none;gap:10px;
}
#workspace:is([data-view=home],[data-view=coach]) .page-header::before,
#workspace:is([data-view=home],[data-view=coach]) .page-header::after{content:none}
#workspace[data-view=home] .header-copy{padding:0}
#workspace .page-header h1{font-size:clamp(24px,2.2vw,35px);font-weight:550;letter-spacing:-.025em;line-height:1.4}
#workspace .page-header p{font-size:12.5px;font-weight:400}
#workspace[data-view=home] .header-actions{display:flex;flex-flow:row wrap;gap:14px;align-items:center}
#workspace[data-view=home] .header-actions #connection{position:static;font-size:11px;padding:2px 0;color:#c7dccd}
#workspace[data-view=home] .header-actions .feed-open{
  display:inline-flex;gap:7px;align-items:center;min-height:34px;padding:5px 12px;border-radius:18px;
  border:1px solid #c9eacd36;background:#e5ffe90c;font:510 12px/1.5 Vazirmatn,sans-serif;color:#e0ebe1;
}
@media(min-width:761px){
  #workspace .nav-capsule .nav-item:not(.active){
    width:36px;padding:0;border-radius:50%;border:1px solid #e0fce41e;background:#effff305;color:#dce9e0;
  }
  #workspace .nav-capsule .nav-item:not(.active) span{display:none}
  #workspace .nav-capsule .nav-item:not(.active):is(:hover,:focus-visible)::after{
    content:attr(title);display:block;position:absolute;inset:calc(100% + 9px) auto auto 50%;
    transform:translateX(-50%);padding:5px 9px;white-space:nowrap;pointer-events:none;z-index:25;
    width:max-content;border:1px solid #4d6859;background:#17281f;color:#e9f9ee;
    border-radius:6px;font:500 11px/1.65 Vazirmatn,sans-serif;
  }
  #workspace .terminal-nav .nav-item.active{padding-inline:15px}
  #workspace[data-view=home] .page-header .feed-open{color:#062b1c;background:linear-gradient(165deg,#c4eccb,#83cfa9);border-color:#b3dfc154}
}
#workspace[data-view=home] .header-actions .feed-open:hover{background:#d5ffdf19}
#market-board{gap:15px}
.feature-row{display:grid;grid-template-columns:minmax(0,1.71fr) minmax(315px,1fr);gap:15px;align-items:stretch}
.feature-row>*{min-width:0}
#market-board[data-layout=coach] .feature-row{grid-template-columns:minmax(300px,1fr) minmax(0,1.32fr)}
.shell-dropdown .arrange-home{display:grid;gap:4px;margin:5px 4px 0;padding:8px 6px 2px;border-top:1px solid #b3d6bd26;color:#bbd3c0;font-size:11px}
.shell-dropdown .arrange-home select{width:100%;color:#e5f3e8;background:#1c3023;border-radius:7px;border:1px solid #93bd9b55;padding:5px 7px;font:500 12px/1.6 Vazirmatn,sans-serif}
#workspace .metric-strip{
  gap:0;padding:0;border:1px solid #9eb7ac2c;border-radius:15px;overflow:hidden;
  background:linear-gradient(115deg,#131b19,#19231e 52%,#18221d);
}
#workspace .metric-strip .metric-tile{
  --metric-inset:clamp(12px,1.35vw,24px);display:grid;grid-template-columns:minmax(0,1fr) 17px;grid-template-rows:auto auto auto;
  align-content:center;min-height:112px;padding:11px var(--metric-inset);gap:1px 4px;
  border:0;border-inline-end:1px solid #c5d6cb1f;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;
}
#workspace .metric-strip .metric-tile:last-child{border-inline-end:0}
#workspace .metric-strip .metric-tile:hover{background:#deffde07}
#workspace .metric-strip .metric-tile:focus-visible{outline-offset:-3px}
#workspace .metric-strip .metric-top{grid-column:1/-1;grid-row:1;display:flex;align-items:center;gap:7px;padding:0;margin:0;direction:rtl}
#workspace .metric-strip .metric-title{font:480 12px/1.6 Vazirmatn,sans-serif;color:#c1cdc5}
#workspace .metric-strip .metric-icon{position:static;width:20px;height:20px;display:grid;place-items:center;border:0;border-radius:0;background:none;box-shadow:none;color:#a8c7b5}
#workspace .metric-strip .metric-icon svg{width:16px;height:16px;filter:none}
#workspace .metric-strip .metric-amount{grid-row:2;grid-column:1/-1;justify-content:flex-end;align-items:baseline;padding:0;margin:2px 0 0}
#workspace .metric-strip .metric-number{font-size:clamp(24px,2vw,33px);font-weight:490;line-height:1.1}
#workspace .metric-strip .metric-foot{grid-row:3;grid-column:1/-1;min-height:0;padding:3px 0 0;margin:0;background:none;border:0}
#workspace .metric-strip .metric-foot-label{padding:0;border:0;background:none;color:#a7b8ad;font-weight:400}
#workspace .metric-strip .metric-up{color:#9ee7b4}#workspace .metric-strip .metric-down{color:#f4aba4}
#workspace .metric-strip .metric-foot>svg{width:13px;height:13px;color:#9daea2}
#market-board .pulse-row{grid-template-columns:minmax(0,1.71fr) minmax(315px,1fr);gap:15px}
#market-board .brief-row{gap:15px}
#market-board .pulse-panel,#market-board .brief-card{border-color:#c6e1cd22;border-top-color:#d3ebd72f}
#market-board .pulse-head h2,#market-board .brief-head h2{font-weight:560}
#market-board .pulse-panel:not(.pulse-gauge),#market-board .brief-card{
  background:linear-gradient(145deg,#19211e,#111815 62%,#101512);
}
#market-board .pulse-signal-row{border-color:transparent;border-bottom-color:#d6f6df12;border-radius:5px;background:#d8f4df04}
#market-board .pulse-signal-row:hover{background:#b6f2c80c}
#market-board .brief-headline:last-child{border-bottom:0}
#workspace footer{font-size:10.5px}

#desk-palette{
  width:min(480px,calc(100% - 24px));max-height:min(80dvh,550px);box-sizing:border-box;overflow:auto;
  margin:min(16vh,145px) auto auto;padding:16px;color:#eff7f1;border:1px solid #94bc9f5c;
  border-radius:18px;background:linear-gradient(148deg,#203c2e,#131f19 42%,#0f1714);
  box-shadow:inset 0 1px #f1fff020,0 28px 85px #01040284;
}
#desk-palette::backdrop{background:#040907ab;backdrop-filter:blur(7px)}
.palette-head,.palette-query,.palette-option{display:flex;align-items:center;gap:10px}
.palette-head{justify-content:space-between;margin-bottom:12px}
.palette-head h2{margin:0;font:550 19px/1.5 Vazirmatn,sans-serif}
#desk-palette .tool-circle{width:32px;height:32px;min-height:32px}
.palette-query{border:1px solid #7ba18766;background:#0a1610;border-radius:10px;padding-inline:12px}
.palette-query:focus-within{border-color:#a2d8ae}
.palette-query>svg{width:18px;height:18px;color:#a4cbb3}
#desk-palette .palette-query input{flex:1;min-width:0;width:100%;font:450 14px/1.65 Vazirmatn,sans-serif;background:transparent;box-shadow:none;border:0;outline:0;padding:10px 0;color:#f3fff4}
.palette-results{max-height:min(49dvh,360px);overflow:auto;overscroll-behavior:contain;margin-top:10px;scrollbar-width:thin}
.palette-option{min-height:47px;padding:6px 9px;color:#cfdbd2;cursor:pointer;border:1px solid transparent;border-radius:9px}
.palette-option[aria-selected=true]{background:#b1ecbb0c;border-color:#b9e8c322;color:#f3fff3}
.palette-symbol{display:grid;place-items:center;flex:none;width:33px;height:33px;border:1px solid #b4dbbc24;border-radius:10px;color:#b6dcc1;background:#d0f5d907}
.palette-name{display:flex;align-items:baseline;gap:9px;min-width:0;flex-wrap:wrap}
.palette-name bdi{font-weight:550;font-size:14px;overflow-wrap:anywhere}.palette-name small{color:#a0b2a6;font-size:11px}
.palette-option>svg{margin-inline-start:auto;flex:none;color:#91ab9a;width:14px}
.palette-empty{min-height:128px;display:grid;gap:4px;align-content:center;justify-items:center;text-align:center;color:#c3d8c8}
.palette-empty strong{font-weight:550}.palette-empty span{font-size:12px;color:#9eb0a4}
@media(min-width:761px) and (max-width:1100px){
  #workspace .terminal-nav{grid-template-columns:auto minmax(0,1fr) auto;gap:8px}
  #workspace .nav-capsule{justify-self:center}
  #workspace .nav-capsule .nav-item,#workspace .nav-capsule .nav-item.active{padding:0 8px;gap:4px}
  .desk-search span,.desk-search kbd{display:none}.desk-search{min-width:36px;padding:5px}
}
@media(max-width:940px){
  .feature-row,#market-board .pulse-row{grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr)}
}
@media(max-width:840px){
  .feature-row,#market-board[data-layout=coach] .feature-row{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:760px){
  #workspace:not([hidden]){--gutter:clamp(12px,3.3vw,22px);padding-bottom:calc(75px + env(safe-area-inset-bottom));background-size:auto;min-height:100dvh}
  #workspace .terminal-nav{grid-template-columns:1fr auto;gap:9px;min-height:57px;padding:8px var(--gutter);z-index:15;backdrop-filter:none;transform:none}
  #workspace .brand img.radar-emblem{width:28px;height:28px}#workspace .brand .radar-word{width:74px}
  #workspace .shell-tools{grid-column:2}.desk-search{height:34px;min-height:34px;padding:4px 9px;font-size:11.5px}.desk-search kbd{display:none}
  #workspace .shell-tools .tool-circle{width:34px;height:34px;min-height:34px}
  #workspace .nav-capsule{
    position:fixed;left:50%;bottom:max(8px,env(safe-area-inset-bottom));top:auto;transform:translateX(-50%);
    display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;width:min(calc(100% - 16px),465px);max-width:none;
    padding:4px;box-sizing:border-box;border:1px solid #bfe8ca4d;border-radius:19px;
    background:linear-gradient(150deg,#24372df5,#12201afb);box-shadow:inset 0 1px #effff016,0 4px 22px #0008;
    backdrop-filter:blur(16px);
  }
  #workspace .nav-capsule .nav-item,#workspace .nav-capsule .nav-item.active{
    display:flex;align-items:center;justify-content:center;flex-flow:column;gap:3px;
    width:100%;height:46px;min-height:46px;padding:3px 0;border-radius:14px;
  }
  #workspace .nav-capsule .nav-item span,#workspace .nav-capsule .nav-item.active span{display:none}
  #workspace .nav-capsule .nav-item::after,#workspace .nav-capsule .nav-item:not(.active):is(:hover,:focus-visible)::after{
    content:attr(data-short);position:static;width:auto;transform:none;padding:0;border:0;background:none;box-shadow:none;color:inherit;
    font:520 11px/1.2 Vazirmatn,sans-serif;
  }
  #workspace main :is(button,a,input,summary,select,textarea,[tabindex]){scroll-margin-block-end:85px}
  #workspace .page-header,#workspace:is([data-view=home],[data-view=coach]) .page-header{padding:14px 0 12px;min-height:0;margin:0;border-radius:0}
  #workspace[data-view=home] .page-header h1,#workspace .page-header h1{font-size:23px}
  #workspace[data-view=home] .header-actions{align-items:flex-end;flex-direction:column-reverse;gap:4px}
  #workspace[data-view=home] .header-actions #connection{font-size:10px}
  #workspace[data-view=home] .header-actions .feed-open{display:flex;min-height:28px;padding:3px 8px;font-size:10px}
  #market-board,.feature-row,#market-board .pulse-row,#market-board .brief-row{gap:10px}
  #market-board .pulse-row,#market-board .brief-row{grid-template-columns:minmax(0,1fr)}
  #market-board .brief-news{grid-column:auto}
  #workspace .metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  #workspace .metric-strip .metric-tile{min-height:90px;padding:8px 12px}
  #workspace .metric-strip .metric-tile:nth-child(2){border-inline-end:0}
  #workspace .metric-strip .metric-tile:nth-child(-n+2){border-bottom:1px solid #c5d6cb1f}
  #workspace .metric-strip .metric-number{font-size:24px}
  #desk-palette{margin:9dvh auto auto;padding:13px}
}
@media(prefers-reduced-transparency:reduce){#workspace .nav-capsule{background:#19271f;backdrop-filter:none}#desk-palette::backdrop{backdrop-filter:none}}

/* Four separate readouts follow the shape of the reference on wide screens. */
@media(min-width:761px){
  #market-board[data-layout=lists] .metric-strip{
    order:-1;gap:10px;background:none;box-shadow:none;border:0;border-radius:0;overflow:visible;
  }
  #market-board[data-layout=lists] .metric-strip .metric-tile{
    min-height:98px;padding:10px 16px 8px;gap:1px 8px;
    background:linear-gradient(156deg,#d8f3e010,#d4e9df03 58%),#121a17c9;
    border:1px solid #c4d7cb24;border-radius:13px;box-shadow:inset 0 1px #e9ffef08;
  }
  #market-board[data-layout=lists] .metric-strip .metric-tile:hover{background-color:#1b2922;border-color:#c4d7cb56}
  #market-board[data-layout=lists] .metric-strip .metric-number{font-size:clamp(22px,2vw,33px);letter-spacing:-.04em}
  #market-board[data-layout=lists] .metric-strip .metric-icon{
    width:28px;height:28px;border-radius:50%;border-color:#daf5e524;color:#cde6d7;background:#e0f4e60a;
  }
  #market-board[data-layout=lists] .metric-strip .metric-icon svg{width:15px;height:15px}
  #market-board[data-layout=lists] .metric-strip .metric-foot{border-top:1px solid #becdc115;padding-top:4px;margin-top:3px}
}
@media(max-width:760px){
  #workspace:not([hidden]){
    --gutter:clamp(12px,3.8vw,22px);
    background-image:radial-gradient(ellipse 95% 175px at 95% -45px,#287c5dd6,transparent),linear-gradient(180deg,#172a22,#101713 140px,#0a0d0e 355px);
    padding-bottom:calc(84px + env(safe-area-inset-bottom));
  }
  #workspace .terminal-nav{min-height:56px;padding-block:4px}
  #workspace .shell-tools{gap:2px}
  #workspace .shell-tools .tool-circle,#workspace .desk-search{
    min-width:44px;width:44px;min-height:44px;height:44px;padding:0;
    border-color:transparent;background:transparent;box-shadow:none;color:#e1eee6;
  }
  #workspace .shell-tools #device-open{border:0;background:transparent;color:#dff9e9}
  #workspace .shell-tools :is(.tool-circle,.desk-search) svg{width:19px;height:19px}
  #workspace .desk-search span{display:none}
  #workspace .shell-dropdown :is(button,select){min-height:44px}
  #workspace .nav-capsule{
    border-color:#a8c8b537;border-radius:17px;
    background:linear-gradient(130deg,#213229f2,#151f1afa 68%);box-shadow:0 5px 24px #0206038c,inset 0 1px #e5f9ea11;
  }
  #workspace .nav-capsule .nav-item svg{width:18px;height:18px}
  #workspace .nav-capsule .nav-item.active{background:#d0f2d9;color:#132b20;border-color:#c0e7ca;border-radius:12px}
  #workspace[data-view=home] .header-actions #feed-open{display:none}
  #workspace[data-view=home] .page-header{padding:14px 0 13px}
  #workspace[data-view=home] .page-header h1{font-size:24px}
  #workspace .header-copy p{font-size:11.5px}
}
@media(display-mode:standalone){
  #workspace .terminal-nav{padding-top:max(6px,env(safe-area-inset-top))}
  #workspace .nav-capsule{overscroll-behavior:contain}
}
