.wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.svg {
  display: block;
  overflow: visible;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  height: 120px;
}

.gridLine {
  stroke: var(--border-subtle);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.axisLabel {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-faint);
}

.thresholdLine {
  stroke: var(--error);
  stroke-width: 1.5;
  stroke-dasharray: 5 3;
}

.thresholdLabel {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--error);
}

.line {
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crosshair {
  stroke: var(--text-faint);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.tooltip {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px 10px;
  font-size: 12px;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

.tooltipRow {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.tooltipRow:last-child {
  margin-bottom: 0;
}

.tooltipDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tooltipLabel {
  color: var(--text-muted);
}

.tooltipValue {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-left: 48px;
}

.legendItem {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legendDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legendLabel {
  font-size: 12px;
}

.yLabel {
  font-size: 12px;
  color: var(--text-muted);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-align: center;
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xLabel {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 48px;
}
