.line-chart {
  --line-primary: #465ab1;
  --line-secondary: #697d41;
  --line-sale: #a7512e;
  --line-lease: #286c9f;
  --line-volume: #2c7866;
  min-width: 0;
  margin: 0;
}
.line-chart-tone-primary { --line-color: var(--line-primary); }
.line-chart-tone-secondary { --line-color: var(--line-secondary); }
.line-chart-tone-sale { --line-color: var(--line-sale); }
.line-chart-tone-lease { --line-color: var(--line-lease); }
.line-chart-tone-volume { --line-color: var(--line-volume); }
.line-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.line-chart-legend > span,
.line-chart-value > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.line-chart-legend > span::before,
.line-chart-value > span::before {
  width: 11px;
  height: 3px;
  border-radius: 4px;
  background: var(--line-color);
  content: '';
}
.line-chart-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 6px;
}
.line-chart-body--scaled { grid-template-columns: auto minmax(0, 1fr); }
.line-chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.line-chart-plot {
  position: relative;
  height: clamp(120px, 18vw, 205px);
  border-block: 1px solid #dce1ef;
  background-image: linear-gradient(#dce1ef, #dce1ef);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 1px;
}
.line-chart-svg,
.line-chart-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.line-chart-svg { overflow: visible; pointer-events: none; }
.line-chart-svg path {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-chart-track,
.line-chart-axis { display: flex; }
.line-chart-axis {
  height: 22px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.line-chart-axis > span {
  display: flex;
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  padding: 4px 0 0;
  white-space: nowrap;
}
.line-chart-axis > span:first-child { justify-content: flex-start; }
.line-chart-axis > span:last-child:not(:first-child) { justify-content: flex-end; }
.line-chart-axis > span:only-child { justify-content: center; }
.line-chart-point {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 3px;
  background: transparent;
}
.line-chart-point:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; z-index: 1; }
.line-chart-point[data-open]::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px dashed #5363a4;
  content: '';
}
.line-chart-dot {
  position: absolute;
  z-index: 1;
  top: var(--line-dot-y);
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: var(--line-color);
  box-shadow: 0 0 0 1px var(--line-color);
  transform: translate(-50%, -50%);
}
.line-chart-point[data-open] .line-chart-dot { width: 9px; height: 9px; }
.line-chart-tooltip {
  position: absolute;
  z-index: 5;
  left: clamp(0px, calc(var(--line-tip-x) - min(7rem, 50%)), max(0px, calc(100% - 14rem)));
  bottom: calc(100% + 5px);
  display: grid;
  gap: 3px;
  width: min(14rem, 100%);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 12px #26314f24;
  pointer-events: none;
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.line-chart-tooltip[hidden] { display: none; }
.line-chart-tooltip > strong { margin-bottom: 2px; }
.line-chart-tooltip > small { color: var(--muted); font-size: inherit; overflow-wrap: anywhere; }
.line-chart-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.line-chart--compact .line-chart-plot { height: 68px; }
.line-chart--compact .line-chart-legend { gap: 3px 9px; padding-bottom: 5px; font-size: 10px; }
.line-chart--compact .line-chart-svg path { stroke-width: 1.7; }
.line-chart--compact .line-chart-dot { width: 4px; height: 4px; }
.line-chart--compact .line-chart-point[data-open] .line-chart-dot { width: 7px; height: 7px; }
@media (max-width: 640px) {
  .line-chart-axis > span:nth-child(even):not(:last-child) { visibility: hidden; }
}
.line-chart-svg .line-chart-gap { stroke-dasharray: 4 4; opacity: .62; }
.line-chart-point--partial .line-chart-dot { background: var(--paper); }
