.svh {
    --svh-series: var(--svd-accent);
    font-variant-numeric: tabular-nums;
}
.svh .svh-head, .svh .svh-title, .svh .svh-legend, .svh .svh-foot, .svh .svh-key,
.svh .svh-foot > span, .svh .svh-metrics dt {
    display: flex; align-items: center;
}
.svh .svh-head { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.svh .svh-title { gap: 10px; min-width: 0; }
.svh .svh-title-icon {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px;
    color: var(--svh-series); background: color-mix(in srgb, var(--svh-series) 9%, var(--svd-inset));
    border: 1px solid color-mix(in srgb, var(--svh-series) 25%, var(--svd-edge)); border-radius: 9px;
}
.svh .svh-title-icon svg, .svh .svh-metrics svg, .svh .svh-foot svg, .svh .svh-empty svg {
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.svh .svh-title-icon svg { width: 19px; height: 19px; }
.svd .svh.svd-card h2 { font-size: clamp(18px, 2.1vw, 23px); line-height: 1.2; }
.svh .svh-periods a { padding: 7px 12px; white-space: nowrap; }
.svh .svh-metrics {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
    margin: 19px 0 16px; border-block: 1px solid var(--svd-edge); padding: 12px 0;
}
.svh .svh-metrics > div { min-width: 0; padding-inline: clamp(10px, 2.4vw, 26px); }
.svh .svh-metrics > div:first-child { padding-left: 0; }
.svh .svh-metrics > div + div { border-left: 1px solid var(--svd-edge); }
.svh .svh-metrics dt { gap: 6px; font-size: 12px; line-height: 1.4; font-weight: 600; color: var(--svd-muted); }
.svh .svh-metrics dt svg { width: 14px; height: 14px; flex: none; }
.svh .svh-metrics dd { margin: 4px 0 0; color: var(--svd-ink); font-size: clamp(19px, 2.3vw, 25px); font-weight: 750; line-height: 1.1; }
.svh .svh-figure {
    margin: 0; padding: clamp(10px, 2.2vw, 19px); border: 1px solid var(--svd-edge);
    background: var(--svd-inset); border-radius: 12px;
}
.svh .svh-legend { justify-content: space-between; gap: 5px 12px; flex-wrap: wrap; padding-bottom: 16px; }
.svh .svh-legend, .svh .svh-foot { color: var(--svd-muted); font-size: 12px; line-height: 1.4; }
.svh .svh-key { gap: 6px; color: var(--svd-ink); font-weight: 700; }
.svh .svh-key::before { content: ""; width: 15px; height: 3px; background: var(--svh-series); border-radius: 2px; }
.svh .svh-axes { display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: clamp(150px, 18vw, 205px) auto; gap: 7px 8px; }
.svh .svh-y, .svh .svh-x { color: var(--svd-muted); font-size: 11px; line-height: 1; }
.svh .svh-y { position: relative; min-width: 2ch; }
.svh .svh-y span { position: absolute; right: 0; transform: translateY(-50%); }
.svh .svh-y span:nth-child(1) { top: 1.66667%; }
.svh .svh-y span:nth-child(2) { top: 25.83333%; }
.svh .svh-y span:nth-child(3) { top: 50%; }
.svh .svh-y span:nth-child(4) { top: 74.16667%; }
.svh .svh-y span:nth-child(5) { top: 98.33333%; }
.svh .svh-x { display: grid; grid-column: 2; grid-template-columns: .5fr 1fr 1fr 1fr .5fr; }
.svh .svh-x span { text-align: center; }
.svh .svh-x span:first-child { text-align: left; }
.svh .svh-x span:last-child { text-align: right; }
.svh .svh-plot { position: relative; min-width: 0; }
.svh .svh-svg { display: block; overflow: visible; }
.svh .svh-grid { stroke: var(--svd-edge); stroke-width: 1; stroke-dasharray: 3 5; }
.svh .svh-fill-top { stop-color: var(--svh-series); stop-opacity: .28; }
.svh .svh-fill-bottom { stop-color: var(--svh-series); stop-opacity: .035; }
.svh .svh-line { stroke: var(--svh-series); stroke-width: 2.3; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.svh .svh-point { fill: var(--svh-series); }
.svh .svh-mark { pointer-events: none; }
.svh .svh-mark line { stroke: var(--svh-series); stroke-opacity: .85; stroke-dasharray: 4 3; }
.svh .svh-mark circle { fill: var(--svh-series); stroke: var(--svd-inset); stroke-width: 2; }
.svh [hidden] { display: none !important; }
.svh .svh-cursor { position: absolute; inset: 0; border-radius: 3px; cursor: crosshair; touch-action: pan-y; }
.svh .svh-cursor:focus-visible { outline: 2px solid var(--svh-series); outline-offset: 4px; }
.svh .svh-tooltip {
    position: absolute; z-index: 2; left: 0; top: 0; pointer-events: none; white-space: nowrap;
    border: 1px solid var(--svd-edge); border-radius: 8px; background: var(--svd-bg); color: var(--svd-muted);
    padding: 7px 10px; font-size: 11px; line-height: 1.4; box-shadow: 0 3px 12px #0002;
}
.svh .svh-tooltip strong { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 2px; color: var(--svd-ink); font-size: 12px; }
.svh .svh-tooltip b { color: var(--svh-series); font-size: 15px; line-height: 1; }
.svh .svh-foot { justify-content: space-between; gap: 5px 12px; flex-wrap: wrap; margin-top: 10px; }
.svh .svh-foot > span { gap: 5px; }
.svh .svh-foot svg { width: 14px; height: 14px; }
.svh .svh-foot b { color: var(--svd-ink); }
.svh .svh-empty { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 24px 15px; margin-top: 16px; background: var(--svd-inset); color: var(--svd-muted); border-radius: 10px; }
.svh .svh-empty svg { width: 20px; height: 20px; flex: none; }
.svh .svh-empty p { margin: 0; font-size: 14px; }
@container svd (max-width: 480px) {
    .svh .svh-periods a { padding: 7px 9px; font-size: 12px; }
    .svh .svh-metrics dt { font-size: 11px; gap: 4px; }
    .svh .svh-metrics > div { padding-inline: 8px; }
    .svh .svh-legend { font-size: 11px; }
    .svh .svh-x, .svh .svh-y { font-size: 10px; }
}
@container svd (max-width: 330px) {
    .svh .svh-metrics dt svg { display: none; }
    .svh .svh-x span:nth-child(even) { visibility: hidden; }
}
