/* ==========================================================================
   CHARTS · SVG-based trend charts, chartbox, legend, refbar
   ========================================================================== */

/* ===== SVG chart base ===== */
.chart text { font: 10px var(--font-mono); fill: var(--color-muted) }
.chart .grid-l  { stroke: var(--chart-grid) }
.chart .base-l  { stroke: var(--chart-base); stroke-width: 1.4; stroke-dasharray: 5 4; stroke-opacity: .7 }
.chart .area    { fill: var(--chart-area) }
.chart .line-p  { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round }
.chart .end-dot { fill: var(--chart-line); stroke: var(--color-white); stroke-width: 2 }
.chart .q-bad   { fill: var(--color-white); stroke: var(--chart-dot-bad); stroke-width: 1.3 }

/* ===== Chart container ===== */
.chartbox {
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-white) 55%, transparent);
  padding: 10px;
}

/* ===== Legend ===== */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--color-muted) }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: baseline }

/* ===== Code block ===== */
.code {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5;
  background: color-mix(in srgb, var(--color-deep) 6%, transparent);
  padding: 12px 14px; border-radius: 14px;
  overflow: auto; max-height: 280px; white-space: pre;
}
