/* BrainOff market workspace — scoped to the overview analysis drawer. */
#appShell #workspaceMarketDetails,
#appShell #workspaceMarketDetails :is(summary, section, article, div, span, strong, small, p, h3, table, th, td) {
  font-family: var(--workspace-font);
}

#appShell #workspaceMarketDetails {
  color: var(--workspace-ink);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

#appShell #workspaceMarketDetails > summary {
  min-height: 68px;
  padding: 15px 20px;
}

#appShell #workspaceMarketDetails > summary strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

#appShell #workspaceMarketDetails > summary small {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

#appShell #workspaceMarketDetails .workspace-market-content {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

#appShell #workspaceMarketDetails .workspace-market-content > :is(.reference-panel, .qye-panel, .chart-grid, .market-grid) {
  margin: 0;
}

#appShell #workspaceMarketDetails .metric-grid {
  gap: 10px;
}

#appShell #workspaceMarketDetails .metric {
  min-height: 0;
  padding: 13px 14px;
  grid-template-rows: none;
  align-content: start;
  gap: 5px;
}

#appShell #workspaceMarketDetails .metric-label,
#appShell #workspaceMarketDetails .reference-card > span,
#appShell #workspaceMarketDetails .qye-card > span {
  color: var(--workspace-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

#appShell #workspaceMarketDetails .metric strong {
  align-self: start;
  margin-top: 2px;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
}

#appShell #workspaceMarketDetails .metric small,
#appShell #workspaceMarketDetails .reference-card small,
#appShell #workspaceMarketDetails .qye-card small {
  align-self: start;
  color: var(--workspace-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

#appShell #workspaceMarketDetails :is(.reference-panel, .qye-panel, .chart-card, .overview-market > .panel) {
  min-width: 0;
  padding: 15px;
}

#appShell #workspaceMarketDetails :is(.reference-panel, .qye-panel) {
  gap: 11px;
}

#appShell #workspaceMarketDetails .qye-panel {
  border-left-width: 1px;
}

#appShell #workspaceMarketDetails .section-head {
  gap: 10px;
  margin-bottom: 10px;
}

#appShell #workspaceMarketDetails .section-head h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

#appShell #workspaceMarketDetails .section-copy,
#appShell #workspaceMarketDetails .section-head > .muted {
  color: var(--workspace-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

#appShell #workspaceMarketDetails :is(.reference-grid, .qye-summary-grid) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#appShell #workspaceMarketDetails :is(.reference-card, .qye-card) {
  min-height: 0;
  padding: 11px 12px;
  align-content: start;
  gap: 5px;
  border-radius: 9px;
}

#appShell #workspaceMarketDetails :is(.reference-card, .qye-card) strong {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

#appShell #workspaceMarketDetails .qye-card-wide strong {
  font-size: 15px;
  line-height: 1.45;
}

#appShell #workspaceMarketDetails .chart-grid,
#appShell #workspaceMarketDetails .market-grid {
  gap: 10px;
}

#appShell #workspaceMarketDetails .chart-stat {
  gap: 2px;
}

#appShell #workspaceMarketDetails .chart-stat span {
  font-size: 12px;
  font-weight: 500;
}

#appShell #workspaceMarketDetails .chart-stat strong {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

#appShell #workspaceMarketDetails .chart-canvas {
  height: 220px;
}

#appShell #workspaceMarketDetails .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

#appShell #workspaceMarketDetails table {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#appShell #workspaceMarketDetails th,
#appShell #workspaceMarketDetails td {
  padding: 9px 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

#appShell #workspaceMarketDetails th {
  color: var(--workspace-muted);
  font-weight: 600;
}

#appShell #workspaceMarketDetails .heat-label,
#appShell #workspaceMarketDetails .rate-cell {
  font-weight: 500;
}

@media (max-width: 860px) {
  #appShell #workspaceMarketDetails .workspace-market-content {
    padding-inline: 12px;
  }

  #appShell #workspaceMarketDetails :is(.reference-grid, .qye-summary-grid) {
    grid-template-columns: 1fr;
  }

  #appShell #workspaceMarketDetails .trade-heat-wrap table {
    min-width: 620px;
    table-layout: auto;
  }

  #appShell #workspaceMarketDetails .qye-score-wrap table {
    min-width: 700px;
    table-layout: auto;
  }

  #appShell #workspaceMarketDetails .overview-market .table-wrap table {
    min-width: 460px;
    table-layout: auto;
  }
}

@media (max-width: 560px) {
  #appShell #workspaceMarketDetails > summary {
    min-height: 62px;
    padding: 13px 14px;
    gap: 12px;
  }

  #appShell #workspaceMarketDetails .workspace-market-content {
    gap: 10px;
    padding: 0 8px 10px;
  }

  #appShell #workspaceMarketDetails .metric-grid {
    gap: 8px;
  }

  #appShell #workspaceMarketDetails .metric,
  #appShell #workspaceMarketDetails :is(.reference-panel, .qye-panel, .chart-card, .overview-market > .panel) {
    padding: 12px;
  }

  #appShell #workspaceMarketDetails .metric strong {
    font-size: 20px;
  }

  #appShell #workspaceMarketDetails .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  #appShell #workspaceMarketDetails .chart-stat {
    text-align: left;
  }

  #appShell #workspaceMarketDetails .chart-canvas {
    height: 190px;
  }

  #appShell #workspaceMarketDetails th,
  #appShell #workspaceMarketDetails td {
    padding: 8px 7px;
    font-size: 12px;
  }

  #appShell #workspaceMarketDetails th {
    font-size: 11px;
  }

  #appShell #workspaceMarketDetails .heat-label {
    font-size: 12px;
  }
}
