.analyst-viz-host {
  position: relative;
  min-height: 240px;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--viz-background, #fff);
}

.analyst-viz-message {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 20px;
  color: var(--muted, #667085);
  font-size: 11px;
  text-align: center;
}

.analyst-viz-message.error { color: #a13f4d; }
.analyst-viz-title { padding: 11px 13px 0; color: var(--viz-foreground, #1b2434); font-size: 11px; font-weight: 760; }
.analyst-viz-billboard-host .bb { width: 100%; }
.analyst-viz-billboard-host .bb-axis text,
.analyst-viz-billboard-host .bb-legend-item text { fill: var(--viz-foreground, #4b5563); font-size: 10px; }
.analyst-viz-billboard-host .bb-axis path,
.analyst-viz-billboard-host .bb-axis line { stroke: var(--viz-grid, #e5e8ef); }
.analyst-viz-billboard-host .bb-grid line { stroke: var(--viz-grid, #e5e8ef); }
.analyst-viz-billboard-host .bb-tooltip { border: 1px solid #d8deea; box-shadow: 0 8px 22px rgba(33, 48, 82, .14); font-size: 10px; }
.analyst-viz-billboard-host .bb-tooltip th { position: static; background: #f7f8fb; }

.analyst-viz-d3-frame { position: relative; width: 100%; min-height: 240px; background: var(--viz-background, #fff); }
.analyst-viz-d3-frame svg { display: block; width: 100%; height: auto; min-height: 240px; overflow: visible; }
.analyst-viz-d3-frame .analyst-viz-axis text,
.analyst-viz-d3-frame .analyst-viz-legend text,
.analyst-viz-d3-frame .analyst-viz-axis-title { fill: var(--viz-muted, #667085); font-size: 10px; }
.analyst-viz-d3-frame .analyst-viz-axis path,
.analyst-viz-d3-frame .analyst-viz-axis line { stroke: var(--viz-grid, #e5e8ef); }
.analyst-viz-d3-frame .analyst-viz-legend text { font-size: 9px; }
.analyst-viz-d3-frame .analyst-viz-line,
.analyst-viz-d3-frame .analyst-viz-point,
.analyst-viz-d3-frame .analyst-viz-dot,
.analyst-viz-d3-frame .analyst-viz-bin,
.analyst-viz-d3-frame .analyst-viz-heat-cell,
.analyst-viz-d3-frame .analyst-viz-waterfall-bar { cursor: crosshair; }
.analyst-viz-tooltip { position: absolute; z-index: 4; max-width: 220px; padding: 8px 10px; border-radius: 6px; background: var(--viz-tooltip-bg, #1b2434); color: var(--viz-tooltip-fg, #fff); pointer-events: none; box-shadow: 0 7px 18px rgba(22, 30, 49, .22); font-size: 10px; }
.analyst-viz-tooltip strong, .analyst-viz-tooltip span { display: block; }
.analyst-viz-tooltip strong { margin-top: 3px; color: rgba(255,255,255,.66); font-size: 9px; font-weight: 650; }
.analyst-viz-tooltip strong:first-child { margin-top: 0; }
.analyst-viz-tooltip span { margin-top: 1px; }

.analyst-viz-table-wrap { overflow: auto; max-height: 360px; padding: 0 12px 12px; }
.analyst-viz-table-wrap .analyst-viz-title { padding-left: 0; padding-bottom: 8px; }
.analyst-viz-table-wrap table { min-width: 100%; }
.analyst-viz-table-wrap th { position: sticky; top: 0; }
.analyst-viz-result-section { overflow: visible; }
.analyst-viz-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.analyst-viz-result-heading h2 { margin-bottom: 3px; }
.analyst-viz-result-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.analyst-viz-result { min-height: 260px; }

@media (max-width: 760px) {
  .analyst-viz-d3-frame svg { min-width: 600px; }
  .analyst-viz-d3-frame { overflow-x: auto; }
}

/* Readable compact chart density ----------------------------------------- */
.analyst-viz-host { min-height: 220px; }
.analyst-viz-message { min-height: 180px; padding: 12px; font-size: 13px; }
.analyst-viz-title { padding: 7px 10px 0; font-size: 13px; }
.analyst-viz-billboard-host .bb-axis text,
.analyst-viz-billboard-host .bb-legend-item text { font-size: 12px; }
.analyst-viz-billboard-host .bb-tooltip { font-size: 12px; }
.analyst-viz-d3-frame { min-height: 220px; }
.analyst-viz-d3-frame svg { min-height: 220px; }
.analyst-viz-d3-frame .analyst-viz-axis text,
.analyst-viz-d3-frame .analyst-viz-legend text,
.analyst-viz-d3-frame .analyst-viz-axis-title { font-size: 12px; }
.analyst-viz-d3-frame .analyst-viz-legend text { font-size: 11px; }
.analyst-viz-tooltip { padding: 6px 8px; font-size: 12px; }
.analyst-viz-tooltip strong { font-size: 10px; }
.analyst-viz-result-heading { gap: 8px; margin-bottom: 5px; }
.analyst-viz-result-heading p { font-size: 12px; }
.analyst-viz-result { min-height: 220px; }
.analyst-viz-table-wrap { max-height: 330px; padding: 0 8px 8px; }

@media (max-width: 760px) {
  .analyst-viz-message { min-height: 160px; }
  .analyst-viz-result { min-height: 190px; }
}
