.ledger-chart-trend,
.ledger-chart-categories {
  position: relative;
  min-width: 0;
}

.ledger-chart-trend-svg {
  display: block;
  width: 100%;
  height: 194px;
  overflow: visible;
  font-family: inherit;
}

.ledger-chart-axis {
  fill: #677487;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ledger-chart-grid {
  fill: none;
  stroke: #e5e6ee;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.ledger-chart-line {
  fill: none;
  stroke: #584aca;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ledger-chart-point {
  cursor: crosshair;
  outline: none;
}

.ledger-chart-marker {
  fill: white;
  stroke: #584aca;
  stroke-width: 2;
  pointer-events: none;
}

.ledger-chart-point.is-daily:not(.is-active) .ledger-chart-marker {
  opacity: 0;
}

.ledger-chart-point.is-active .ledger-chart-marker,
.ledger-chart-point:focus-visible .ledger-chart-marker {
  fill: #584aca;
  r: 5px;
  stroke: white;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 1.2px #584aca);
}

.ledger-chart-tooltip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 7px 11px;
  border-radius: 7px;
  background: #23304a;
  color: white;
  box-shadow: 0 3px 10px #1b214521;
  pointer-events: none;
  white-space: nowrap;
  transform: translateX(-50%);
}

.ledger-chart-tooltip[hidden] {
  display: none;
}

.ledger-chart-tooltip span {
  color: #dfe1f1;
  font-size: .75rem;
}

.ledger-chart-tooltip strong {
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.ledger-chart-categories {
  container-type: inline-size;
}

.ledger-chart-breakdown {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(103px, .97fr) minmax(130px, 1.05fr);
  gap: clamp(12px, 4cqw, 32px);
  min-height: 194px;
}

.ledger-chart-ring {
  position: relative;
  width: min(100%, 166px);
  margin-inline: auto;
}

.ledger-chart-ring svg {
  width: 100%;
  height: auto;
  display: block;
}

.ledger-chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.ledger-chart-center strong {
  font-size: clamp(25px, 10cqw, 35px);
  color: #1d2942;
  font-weight: 650;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.ledger-chart-center span {
  font-size: .75rem;
  color: #6b7587;
}

.ledger-chart-legend {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: 188px;
  overflow: auto;
  scrollbar-width: thin;
  padding: 3px 1px;
  margin: 0;
  list-style: none;
}

.ledger-chart-legend-item {
  display: grid;
  align-items: center;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  column-gap: 8px;
  min-width: 0;
  color: #47536a;
  font-size: .875rem;
  line-height: 1.45;
}

.ledger-chart-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ledger-chart-name {
  overflow-wrap: anywhere;
}

.ledger-chart-percent {
  color: #293650;
  font-size: .875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ledger-chart-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  min-height: 194px;
  color: #737e90;
  font-size: .875rem;
}

.ledger-chart-empty svg {
  color: #c4bdde;
}

@container (max-width: 250px) {
  .ledger-chart-breakdown {
    gap: 5px;
    grid-template-columns: minmax(70px, .7fr) minmax(110px, 1fr);
  }

  .ledger-chart-legend-item {
    column-gap: 5px;
  }
}
