/* Графики: SVG-столбцы и линии, легенда, подсказки, воронка, тепловая карта. */

/* ── Графики ── */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.chart .lbl { fill: var(--ink-2); font-size: 12px; }
.chart .val { fill: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .val.dim { fill: var(--ink-2); font-weight: 500; }
.chart .cat.now { fill: var(--ink); font-weight: 600; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart svg.enter { animation: fadeIn var(--t-enter) both; }
.chart svg.enter .bar-now, .chart svg.enter .bar-past, .chart svg.enter rect:not(.hit) { transform-box: fill-box; transform-origin: 50% 100%; animation: barGrow var(--t-grow) var(--ease-out) both; }
.chart svg.enter .val, .chart svg.enter .plan-tick { animation: fadeIn .3s .3s both; }
.chart .bar-past { fill: var(--brand-tint); }
.chart .bar-now { fill: var(--brand); }
.chart .plan-tick { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.line { width: 14px; height: 2px; border-radius: 1px; vertical-align: 3px; }
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; background: var(--panel); color: var(--ink); border-radius: 12px; padding: 10px 12px;
  font-size: 12px; max-width: 280px; box-shadow: 0 12px 40px rgba(0, 0, 0, .16), 0 0 0 1px var(--border);
  opacity: 0; visibility: hidden; transition: opacity var(--t-fast), visibility var(--t-fast);
}
.tooltip.show { opacity: 1; visibility: visible; }
.tooltip .tt-title { font-weight: 600; margin-bottom: 4px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tooltip .tt-row i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Воронка */
.funnel { display: flex; flex-direction: column; gap: 18px; }
.funnel-row .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.funnel-row .name { font-size: 14px; font-weight: 500; }
.funnel-row .conv { margin-left: 8px; font-size: 12px; color: var(--muted); font-weight: 400; }
.funnel-row .conv b { font-weight: 600; color: var(--ink-2); }
.funnel-row .conv b.delta-down { color: var(--critical-ink); }
.funnel-row .nums { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.funnel-row .nums span.muted { font-weight: 400; }
.funnel-row .meter { margin-top: 8px; }
.funnel-legend { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 16px; color: var(--muted); }
.funnel-legend i { width: 2px; height: 12px; margin-top: 2px; border-radius: 1px; background: var(--ink); flex: none; }

/* Тепловая карта */
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(14px, 1fr)); gap: 2px; font-size: 10px; color: var(--muted); }
.heat .c { aspect-ratio: 1.3; border-radius: 3px; background: var(--seq-1); transition: transform var(--t-fast); }
.heat .c:hover { position: relative; z-index: 1; transform: scale(1.18); box-shadow: 0 0 0 1.5px var(--panel); }
.heat .h { text-align: center; }
.heat .d { display: flex; align-items: center; }
.scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 10px; }
.scale span { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
