.curve-groups .section-title { margin: 0 0 0.5rem; color: var(--muted); font: 500 0.8125rem/1.3 var(--sans); }
.curves { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.curve-groups > * + .section-title { margin-top: 1.5rem; }
.curve-sub { margin: 1rem 0 0.5rem; color: var(--faint); font: 400 0.75rem/1.3 var(--display); }
.curve-groups > .section-title + .curve-sub { margin-top: 0; }
.curve-table + .curves { margin-top: 1rem; }
.curve-table th[title] { cursor: help; }

.chart { min-width: 0; margin: 0; padding: 0.75rem 1rem; background: var(--bg); border: 1px solid var(--hairline); }
.chart:hover { border-color: var(--hairline-strong); }
.chart .card-title { white-space: normal; overflow-wrap: anywhere; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.125rem 0.75rem; margin-top: 0.25rem; color: var(--muted); font-size: 0.75rem; }
.chart-legend i { display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.3rem; border-radius: 2px; }
.chart-legend .s0 { background: var(--accent-2); }
.chart-legend .s1 { background: var(--accent); }

.chart-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.375rem 0.5rem; margin-top: 1rem; }
.chart-y {
  display: flex; flex-direction: column-reverse; justify-content: space-between; height: 8rem;
  color: var(--muted); font-size: 0.6875rem; text-align: right;
}
.chart-y span { line-height: 0; white-space: nowrap; }
.chart-plot { position: relative; height: 8rem; cursor: crosshair; touch-action: pan-y; }
.chart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-gridline { fill: none; stroke: var(--hairline); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-dots { fill: none; stroke-width: 6; stroke-linecap: round; }
path.s0 { stroke: var(--accent-2); }
path.s1 { stroke: var(--accent); }
.chart-x { display: flex; justify-content: space-between; grid-column: 2; color: var(--muted); font-size: 0.6875rem; }
.chart-x.is-single { justify-content: center; }

.chart-cross { position: absolute; top: 0; bottom: 0; display: none; width: 1px; background: var(--muted); pointer-events: none; }
.chart-tip {
  position: absolute; top: -0.375rem; z-index: 2; display: none; padding: 0.25rem 0.5rem; transform: translate(-50%, -100%);
  background: var(--panel-2-solid); border: 1px solid var(--hairline-strong); border-radius: 4px;
  color: var(--text); font-size: 0.75rem; white-space: nowrap; pointer-events: none;
}
.chart-tip.is-start { transform: translate(-0.5rem, -100%); }
.chart-tip.is-end { transform: translate(calc(-100% + 0.5rem), -100%); }
.chart-plot.is-hover .chart-cross, .chart-plot.is-hover .chart-tip { display: block; }
