/* Ring & donut */
.ring,
.donut {
  position: relative;
  flex-shrink: 0;
}
.ring-value {
  transition: stroke-dasharray 0.8s var(--ease);
}
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ring-label strong {
  font-size: 1.15em;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.donut .ring-label strong {
  font-size: 26px;
}
.ring-label span {
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.donut-arc {
  transition: opacity 0.15s;
}
.donut svg:hover .donut-arc:not(:hover) {
  opacity: 0.45;
}
.donut-block {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Legend */
.legend {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.donut-block .legend {
  flex-direction: column;
  margin: 0;
  min-width: 140px;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend span {
  flex: 1;
}
.legend b {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Stacked bar */
.stackbar {
  display: flex;
  gap: 3px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.stackbar span {
  height: 100%;
  border-radius: 3px;
  transition: filter 0.15s;
}
.stackbar span:hover {
  filter: brightness(1.25);
}

/* Columns (bar chart) */
.columns-plot {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(var(--border) 1px, transparent 1px);
  background-size: 100% 25%;
}
.column {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 4px;
  transition: background 0.15s;
}
.column:hover {
  background: rgba(148, 163, 184, 0.06);
}
.column-stack {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  border-radius: 4px 4px 2px 2px;
  overflow: hidden;
  transition: height 0.6s var(--ease);
}
.column-stack span {
  min-height: 3px;
}
.columns-axis {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.columns-axis span {
  flex: 1;
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  text-align: center;
  overflow: visible;
}

/* Area */
.area svg {
  overflow: visible;
}
.grid-line {
  stroke: var(--border);
  stroke-width: 1;
}

/* Sparkline */
.sparkline {
  display: block;
}

/* Heatmap */
.heatmap {
  --cell: 15px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--cell));
  grid-auto-columns: var(--cell);
  gap: 4px;
  overflow-x: auto;
  padding: 2px;
}
.heatmap i {
  border-radius: 4px;
  background: var(--surface-3);
}
.heatmap i.pad {
  background: transparent;
}
.heatmap i:not(.pad):hover {
  outline: 1px solid var(--text-2);
}
.heatmap-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: var(--fs-xs);
}

/* Bar list */
.barlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.barlist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  margin-bottom: 6px;
}
.barlist-label {
  flex: 1;
  color: var(--text-2);
}
.barlist-head b {
  font-variant-numeric: tabular-nums;
}
.barlist-track {
  height: 6px;
  border-radius: 6px;
  background: var(--surface-3);
  overflow: hidden;
}
.barlist-track span {
  display: block;
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s var(--ease);
}
