/* Shared materials for the workspaces behind the market overview. Native tables,
   disclosure controls and source states keep their existing behavior. */
:is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view) {
  --ink: #f1f6f3;
  --muted: #aab9b0;
  --edge: rgb(202 241 219 / .13);
  --line: rgb(207 237 220 / .105);
  --blue: #9cedbc;
  --blue-soft: #213e2e;
  --green: #8ce6ae;
  --red: #ffa19f;
  --amber: #efc792;
  --interior-glass: linear-gradient(125deg, rgb(39 57 46 / .30), transparent 48%),
                    linear-gradient(164deg, rgb(27 32 30 / .93), rgb(14 17 17 / .96));
  --interior-edge: inset 0 1px 0 rgb(242 255 246 / .045);
  --interior-field: #111715;
  --interior-chip: rgb(227 245 232 / .045);
  --interior-active: linear-gradient(132deg, #2c4837, #213c2f);
  font-variant-numeric: tabular-nums;
}
:is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view)
:is(.token-desk, .perp-panel, .perp-section, .coach-case, .coach-activity, .coach-journal,
    .coach-empty, .news-wire, .macro-agenda, .ledger, .detail) {
  background: var(--interior-glass);
  border: 1px solid var(--edge);
  border-radius: 17px;
  box-shadow: var(--interior-edge);
  backdrop-filter: none;
}
:is(#desk-view, #perps-view) .perp-section > .perp-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
}
:is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view) :focus-visible {
  outline: 2px solid #99eab6;
  outline-offset: 3px;
}
:is(#desk-view, #perps-view, #launches-view) :is(input, select, textarea),
#coach-view .coach-review-form textarea,
:is(#desk-view, #launches-view) :is(.token-options > summary, .search) {
  background: var(--interior-field);
  color: var(--ink);
  border-color: rgb(197 233 209 / .20);
  border-radius: 11px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / .14);
}
#launches-view .search input {
  background: transparent;
  border: none;
  box-shadow: none;
}
:is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view)
:is(.desk-tabs .filter, .source-filters .filter, .coach-mode, .coach-ticker,
    .network-chip, .token-filters button, .news-filter-option) {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bfcac3;
  background: var(--interior-chip);
  font-weight: 500;
  line-height: 1.55;
}
:is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view)
:is(.desk-tabs .filter.active, .source-filters .filter.active, .network-chip.active,
    .token-filters button.active, .coach-mode[aria-pressed=true],
    .coach-ticker[aria-pressed=true], .news-filter-option[aria-pressed=true]) {
  color: #deffe7;
  background: var(--interior-active);
  border-color: rgb(156 226 183 / .37);
}
:is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view)
:is(.desk-tabs, .source-filters, .coach-controls, .news-filter, .news-mobile-tabs) {
  gap: 5px;
}
#desk-view #desk-content > .desk-tabs, #coach-view .coach-controls {
  border: none;
  padding: 0 0 13px;
  margin: 0;
  gap: 5px;
}
#desk-view #desk-content > .desk-tabs .filter, #coach-view .coach-mode {
  min-height: 38px;
  padding: 6px 15px;
  box-shadow: none;
}
:is(#desk-view, #news-view) .news-observation h3,
#coach-view .coach-case h3, #perps-view .perp-price { letter-spacing: -.02em; }
:is(#desk-view, #news-view) .news-observation h3 { font-weight: 650; }
:is(#desk-view, #news-view) .news-bias {
  min-height: 23px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: color-mix(in srgb, currentColor 5%, transparent);
}
:is(#desk-view, #news-view) .news-bias-bullish { color: #91e9ab; }
:is(#desk-view, #news-view) .news-bias-bearish { color: #ffa4a6; }
:is(#desk-view, #news-view) :is(.news-meta, .news-interpretation, .macro-watch) { font-weight: 400; }
:is(#desk-view, #news-view) a.news-headline:hover { color: #c6f4d8; }
:is(#desk-view, #news-view) .macro-agenda-list > li,
#coach-view .coach-context-row { border-color: var(--line); }

#desk-view .token-modes {
  background: #111714;
  box-shadow: none;
  border-color: var(--edge);
}
#desk-view .token-modes .active {
  color: #e1ffe9;
  background: var(--interior-active);
  box-shadow: inset 0 0 0 1px rgb(157 230 189 / .35);
}
#desk-view .token-table-head, #launches-view .ledger-head, #perps-view .lab-table th {
  background: rgb(235 251 241 / .032);
  color: #b4c4b9;
  border-color: var(--line);
}
#desk-view .token-workspace { border-color: var(--line); }
#desk-view .token-row {
  border-bottom-color: var(--line);
  box-shadow: none;
}
#desk-view .token-row.selected, #launches-view .launch-row.selected {
  background: linear-gradient(100deg, rgb(79 153 114 / .06), rgb(87 173 123 / .14));
}
#desk-view .token-detail {
  background: rgb(7 11 9 / .22);
  border-color: var(--line);
}
:is(#desk-view, #launches-view) :is(.desk-address, .token-options .token-option-fields),
#desk-view .token-health[open] > div {
  color: var(--ink);
  background: #19211d;
  border-color: #35433b;
  border-radius: 11px;
}
#desk-view .token-detail-tabs { border-color: var(--line); gap: 6px 15px; }
#desk-view .token-detail-tabs .active { color: #bbf4cd; border-color: #7ed39b; }
:is(#desk-view, #launches-view) .market-source {
  background: rgb(104 174 131 / .06);
  border-color: rgb(161 225 184 / .22);
  border-radius: 10px;
}
:is(#desk-view, #launches-view) .market-source svg { stroke: #a0dbb2; }
#desk-view .token-row-grade > small, #desk-view .score-scale { color: var(--muted); }
#launches-view .ledger, #launches-view .detail { overflow-wrap: anywhere; }
#perps-view .perp-chart { background: #0e1512; }
#perps-view .perp-section > summary { padding-block: 14px; min-height: 56px; }
:is(#perps-view, #desk-view) .perp-section > summary::marker { color: #85a693; }
#perps-view .perp-price { font-weight: 650; }
#perps-view .perp-setup .perp-price { color: var(--ink); }
#coach-view .coach-brief { --coach-line: var(--line); --coach-muted: var(--muted); }
#coach-view .coach-next {
  border-radius: 11px;
  background: linear-gradient(120deg, #1a2a21, #1c3023);
}
#coach-view .coach-next strong, #coach-view .coach-event-link,
#coach-view .coach-observer-state.running { color: #a7ecc0; }
#coach-view .coach-next .coach-open {
  border: 1px solid rgb(155 228 182 / .35);
  border-radius: 999px;
  color: #dfffe9;
  background: #284535;
}
#coach-view .coach-facts { column-gap: 12px; }

@media (hover: hover) {
  :is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view)
  :is(.desk-tabs button, .coach-mode, .news-filter-option, .source-filters button,
      .network-chip, .coach-ticker, .token-filters button):hover {
    background: #2a3931;
    border-color: #58705f;
    color: #f0fcf4;
  }
  #desk-view .token-row:hover, #launches-view .launch-row:hover {
    background: rgb(173 226 189 / .065);
  }
}
@media (max-width: 680px) {
  :is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view)
  :is(.token-desk, .perp-panel, .perp-section, .coach-case, .coach-activity,
      .coach-journal, .news-wire, .macro-agenda, .ledger, .detail) { border-radius: 14px; }
  #desk-view .token-detail { background: transparent; }
  #desk-view #desk-content > .desk-tabs .filter, #coach-view .coach-mode { font-size: 12px; min-height: 36px; padding: 5px 11px; }
  :is(#perps-view, #launches-view) .source-filters .filter { min-height: 36px; }
  #desk-view .token-filters button, #desk-view .network-chip { min-height: 34px; }
  #coach-view .coach-facts { column-gap: 8px; }
}
@media (prefers-reduced-transparency: reduce) {
  :is(#desk-view, #perps-view, #news-view, #coach-view, #launches-view) {
    --interior-glass: #151c18;
  }
}
