/* pa-charts.css · W6 chart kit (27 Nov 2026). The Support admin's chart styles (admin/2026-11-11-support-redesign/08-build/
   dashboard.css + dashboard-sleek.css: .lc, .heat/.hc, .skmv, .skrp, .skfl, .sksp, .dtable, .hscale) ported here so the admin build
   can draw them, with Support's variable names mapped onto the admin roles (kit.md §8 #4: --d-open → --ov-a7, --d-closed → --ov-g1 /
   neutral-400). The admin pieces (ticker rows, gauge, columns, budget ticker, dot matrix) come from css/kit/ unedited; this file only
   adds what chart-kit.md marks Adapt (F1 compare line, F2 unstacked columns, F3 funnel step line, F6 inline bar). Admin tokens only.
   Shared with the REPORT lane: report.html loads this file too. */

/* ── roles on every chart root (the kit scopes them to .ov-pg; charts carry that class so they render on a blank page) ── */
.pa-viz, .ov-pg { --pa-ink: var(--color-text-primary); --pa-cmp: var(--color-neutral-400); --pa-grid: var(--color-border-subtle); }

/* ── C1 rows: a wider value column for analytics numbers (6–7 digits + a step or delta line) ── */
.pa-rows .ovr { grid-template-columns: minmax(88px, 32%) minmax(0, 1fr) minmax(64px, auto); }
.pa-rows .ovr dt { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pa-rows .ovr dt small { margin-left: 4px; font-size: 11px; color: var(--color-text-tertiary); }
.pa-rows .ovr-v { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.pa-ovr-s { font-size: 11px; font-weight: var(--font-weight-regular); color: var(--color-text-tertiary); white-space: nowrap; }
.pa-rows a.ovr { color: inherit; text-decoration: none; }
.pa-rows .ovr:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.pa-lock { width: 12px; height: 12px; flex: none; color: var(--color-text-tertiary); stroke-width: 2; }
/* F3 funnel: step conversion under the count; the one biggest drop in red-700 text (never a red fill) */
.pa-step { color: var(--color-text-tertiary); }
.pa-step--drop { color: var(--color-red-700, var(--color-status-danger-fg)); font-weight: var(--font-weight-semibold); }
.pa-funnel .ovr { padding: 5px 0; }
/* F6 inline ramp in a table cell: the C1 ramp at 8px */
.pa-inl { display: inline-flex; width: 72px; vertical-align: middle; margin-right: 8px; }
/* 30 Nov: in a dashboard table every bar starts on one left edge, whatever the number's width (print keeps it inline) */
body:not(.rp-body) .pa-tbl td:has(.pa-inl) { position: relative; padding-left: calc(72px + var(--space-3) * 2); }
body:not(.rp-body) .pa-tbl td .pa-inl { position: absolute; left: var(--space-3); top: 50%; margin: -4px 0 0; }
.pa-inl .ovr-t { flex: 1; display: flex; height: 8px !important; }
.pa-inl .ovr-t i { display: block; height: 100%; }

/* ── C3 columns, unstacked (F2): one lilac-700 column per bucket at full strength, the compare period a neutral-300 outline behind ── */
.pa-c3 .ocv1-c .ocv1-s { opacity: 1; border-radius: 4px 4px 0 0; }
.pa-c3 .ocv1-c.is-now::before { content: none; }
.pa-c3 .ocv1-b { width: clamp(16px, 46%, 56px); }
.pa-c3-cmp { position: absolute; bottom: 0; left: 50%; width: clamp(22px, 62%, 72px); transform: translateX(-50%); box-sizing: border-box; border: 1.5px solid var(--color-neutral-300); border-bottom: 0; border-radius: 4px 4px 0 0; pointer-events: none; }
.pa-sw-cmp { width: 8px; height: 8px; flex: none; border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--color-neutral-300); }
.pa-c3 .ocv1-c:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; border-radius: 4px; }
.pa-c3 .ocv1-p { margin-left: 34px; }
.pa-c3 .ocv1-x, .pa-c3 .ocv1-k { margin-left: 34px; }
.pa-c3 .ocv1-v .pa-lock { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .pa-c3.is-play:not(.is-done) .ocv1-s { animation: pa-up 380ms cubic-bezier(0.23, 1, 0.32, 1) both; animation-delay: calc(var(--r, 0) * 40ms); }
}
@keyframes pa-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.ocv1-c { --r: 0; }

/* ── C4 budget ticker in a card ── */
.pa-tk .v2-tk-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; padding: 0; list-style: none; }
.pa-tk .v2-tk-leg li { display: inline-flex; align-items: center; gap: 6px; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.pa-tk .v2-tk-leg b { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }

/* ── C5 dot matrix: any number of days ── */
.pa-dm .p2-dm { margin-top: 4px; }
.pa-dm .p2-dm__b { cursor: default; }
.pa-dm .p2-dm__n { font-size: var(--font-size-14); }

/* ── C6 line with comparison (Support .lc, F1 recolour) ── */
.lc { position: relative; border-radius: var(--radius-xs); outline-offset: 4px; }
.lc svg { display: block; width: 100%; height: auto; overflow: visible; }
.lc .grid { stroke: var(--pa-grid, var(--color-border-subtle)); stroke-width: 1; }
.lc .base { stroke: var(--color-border-default); stroke-width: 1; }
.lc .tick { stroke: none; fill: var(--color-text-tertiary); font-size: 11px; font-family: var(--font-family-body); font-variant-numeric: tabular-nums; }
.lc .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc .ln--a7 { stroke: var(--color-lilac-700); }
.lc .ln--a4 { stroke: var(--color-lilac-400); }
.lc .ln--cmp { stroke: var(--color-neutral-400); stroke-width: 1.5; stroke-dasharray: 4 4; }
.lc .area--a7 { fill: var(--color-lilac-700); opacity: .1; }
.lc .pt { stroke: var(--color-bg-canvas); stroke-width: 2; }
.lc .pt--a7 { fill: var(--color-lilac-700); } .lc .pt--a4 { fill: var(--color-lilac-400); } .lc .pt--cmp { fill: var(--color-neutral-400); }
.lc .pt--part { fill: var(--color-bg-canvas); stroke: var(--color-lilac-700); }
.lc .xh__l { stroke: var(--color-border-default); stroke-width: 1; }
.lc .pa-gap { stroke: var(--color-border-default); stroke-width: 1; stroke-dasharray: 1 3; }
.lc:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 4px; }
.lc .nb--up { fill: var(--color-lilac-700); } .lc .nb--down { fill: var(--color-neutral-400); }
.lc .nbx { fill: var(--color-text-primary); opacity: .05; pointer-events: none; }
.lc .nb, .lc .nbx, .lc .area, .lc text { stroke: none; }   /* the admin's global svg stroke rule must not outline chart fills */
@media (prefers-reduced-motion: no-preference) {
  .pa-lc.is-play:not(.is-done) .pa-lc-g { animation: bp-in 600ms cubic-bezier(0.23, 1, 0.32, 1) both; }
}
.pa-sw-line { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: var(--color-lilac-700); }
.pa-sw-dash { display: inline-block; width: 14px; height: 0; border-top: 1.5px dashed var(--color-neutral-400); }

/* ── C7 heat matrix (Support .heat/.hc; empty half a step off white; locked cells show the lock) ── */
.pa-heat .heat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pa-heat .heat__r { display: grid; grid-template-columns: minmax(84px, 1.3fr) repeat(var(--pa-hc), minmax(32px, 1fr)); gap: 2px; align-items: center; }
.pa-heat .heat__r--h { margin-bottom: 4px; font-size: 11px; color: var(--color-text-tertiary); }
.pa-heat .heat__r--h > span { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-heat .heat__who { min-width: 0; font-size: var(--tiny); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-secondary); }
.hc { height: 32px; display: grid; place-items: center; border-radius: var(--radius-xs); font-size: var(--font-size-12); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.hc--0 { background: color-mix(in srgb, var(--color-bg-surface) 55%, var(--color-bg-canvas)); }
.hc--1 { background: var(--color-lilac-100); color: var(--color-neutral-900); }
.hc--2 { background: var(--color-lilac-300); color: var(--color-neutral-900); }
.hc--3 { background: var(--color-lilac-500); color: var(--color-neutral-0); }
.hc--4 { background: var(--color-lilac-700); color: var(--color-neutral-0); }
.pa-hc-diag { background: var(--color-bg-canvas); box-shadow: inset 0 0 0 1px var(--color-border-default); color: var(--color-text-primary); }
.pa-hc-lock .pa-lock { width: 12px; height: 12px; }
.hc:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .hc[tabindex]:hover { box-shadow: inset 0 0 0 2px var(--color-text-primary); } }
.pa-hscale { display: flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--color-text-tertiary); }
.pa-hscale i { width: 14px; height: 10px; border-radius: 2px; }
.pa-hscale span:first-child { margin-right: 2px; } .pa-hscale span:last-child { margin-left: 2px; }
/* weekday × hour */
.pa-hr { display: grid; gap: 2px; }
.pa-hr__r { display: grid; grid-template-columns: 32px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.pa-hr__r i { display: block; height: 16px; border-radius: 2px; }
.pa-hr__r i:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 1px; }
.pa-hr__d { font-size: 11px; color: var(--color-text-tertiary); }
.pa-hr__x span { font-size: 10px; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }

/* ── C8 diverging movers (Support .skmv) ── */
.skmv { margin: 0; padding: 0; list-style: none; }
.pa-mv { display: grid; grid-template-columns: minmax(96px, 1fr) minmax(80px, 1.4fr) 64px 92px; align-items: center; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-2); margin: 0 calc(var(--space-2) * -1); border-radius: var(--radius-xs); color: var(--color-text-primary); text-decoration: none; }
.skmv__n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skmv__b { position: relative; height: 12px; }
.skmv__z { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--color-border-default); }
.skmv__bar { position: absolute; top: 0; bottom: 0; }
.skmv__bar.up { left: calc(50% + 1px); background: var(--color-lilac-700); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.skmv__bar.down { right: calc(50% + 1px); background: var(--color-neutral-400); border-radius: var(--radius-xs) 0 0 var(--radius-xs); }
.skmv__v { text-align: right; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.skmv__d { display: flex; justify-content: flex-end; font-size: var(--tiny); }
@media (hover: hover) and (pointer: fine) { a.pa-mv:hover .skmv__n { text-decoration: underline; text-underline-offset: 3px; } }

/* ── C9 sparkline ── */
.sksp { display: block; width: 100%; height: 24px; margin-top: var(--space-3); overflow: visible; }
.sksp__l { fill: none; stroke: var(--color-lilac-700); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.sksp__p { stroke-dasharray: 3 3; }

/* ── C10 stacked share bars (Support flow; .seg renamed .pa-seg2 so it never meets the admin .seg control) ── */
.skfl { display: flex; flex-direction: column; gap: var(--space-5); }
.skfl__k { margin: 0 0 var(--space-2); font-size: var(--tiny); color: var(--color-text-secondary); }
.skfl__k b { margin-right: 2px; font-size: var(--font-size-20); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); letter-spacing: -.01em; }
.pa-seg2 { display: flex; gap: 2px; height: 28px; margin-bottom: var(--space-2); border-radius: var(--radius-xs); overflow: hidden; }
.pa-seg2__p { display: grid; place-items: center; min-width: 3px; font-size: 11px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.pa-seg2__p:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: -2px; }
.pa-t--a7 { background: var(--color-lilac-700); color: var(--color-neutral-0); }
.pa-t--a3 { background: var(--color-lilac-300); color: var(--color-neutral-900); }
.pa-t--pb { background: var(--color-blue-300); color: var(--color-neutral-900); }
.pa-t--g2 { background: var(--color-neutral-200); color: var(--color-neutral-900); }
.pa-t--g1 { background: var(--color-neutral-400); color: var(--color-neutral-0); }
.pa-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pa-red { color: var(--color-red-700, var(--color-status-danger-fg)) !important; }

/* ── C11 bucket rows (Support .skrp) ── */
.skrp ol { margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.skrp li { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr); align-items: center; gap: var(--space-3); min-height: 32px; font-size: var(--tiny); border-radius: var(--radius-xs); }
.skrp li:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.skrp__n { color: var(--color-text-secondary); }
.skrp__t { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.skrp__bar { height: 12px; min-width: 2px; flex: none; background: var(--color-lilac-700); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.skrp__g--over ~ ol .skrp__bar { background: var(--color-neutral-400); }
.skrp__t b { font-weight: var(--font-weight-semibold); font-size: var(--row); }
.skrp__p { color: var(--color-text-tertiary); }
.skrp__g { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 var(--space-1); padding-bottom: var(--space-1); border-bottom: 1px solid var(--color-border-subtle); font-size: var(--tiny); }

/* ── Legend + "Show the numbers" (Support .dtable) ── */
.pa-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.pa-leg li { display: inline-flex; align-items: center; gap: 6px; }
.pa-leg li > i[class^="sw--"] { width: 8px; height: 8px; border-radius: 2px; background: var(--bi, var(--color-lilac-700)); }
.pa-leg b { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.dtable { margin-top: var(--space-3); font-size: var(--tiny); color: var(--color-text-secondary); }
.dtable summary { cursor: pointer; width: max-content; padding: 2px 0; border-radius: var(--radius-xs); }
@media (hover: hover) and (pointer: fine) { .dtable summary:hover { color: var(--color-text-primary); } }
.dtable summary:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.dtable__s { overflow-x: auto; }
.dtable table { margin-top: var(--space-2); border-collapse: collapse; width: 100%; }
.dtable th, .dtable td { padding: 6px 8px; border-bottom: 1px solid var(--color-border-subtle); text-align: left; font-weight: var(--font-weight-regular); white-space: nowrap; }
.dtable thead th { color: var(--color-text-tertiary); font-weight: var(--font-weight-medium); }
.dtable td.num { text-align: right; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.dtable tbody th { color: var(--color-text-primary); }
.pa-td-lock .pa-lock { vertical-align: -1px; }

/* ── Table: sortable headers, 56px rows (44px at 8+ number columns), scrolls inside its pane, sticky first column ── */
.pa-tw { min-width: 0; }
.pa-ts { overflow-x: auto; border-radius: var(--radius-xs); }
.pa-ts:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.pa-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pa-tbl th, .pa-tbl td { height: 56px; padding: 0 var(--space-3); border-bottom: 1px solid var(--color-border-subtle); text-align: left; white-space: nowrap; font-size: var(--row); }
.pa-tw--dense .pa-tbl th, .pa-tw--dense .pa-tbl td { height: 44px; }
.pa-tbl thead th { height: 40px; font-size: var(--tiny); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); position: sticky; top: 0; background: var(--color-bg-canvas); z-index: 1; }
.pa-tbl .r { text-align: right; }
.pa-tbl tbody th { font-weight: var(--font-weight-medium); }
.pa-tbl .pa-td-1 { position: sticky; left: 0; z-index: 1; background: var(--color-bg-canvas); }
/* 30 Nov: the first header stays with its column when the table scrolls sideways; the first column starts on the toolbar's 16px edge */
.pa-tbl thead th { z-index: 2; }
.pa-tbl thead th:first-child { left: 0; z-index: 3; }
.pa-tbl :is(thead th:first-child, .pa-td-1) { padding-left: var(--space-4); }
.pa-tbl tbody th a { color: var(--color-text-primary); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .pa-tbl tbody tr:hover > * { background: var(--color-bg-surface); } .pa-tbl tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.pa-sort { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px; margin: 0 -4px; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; color: inherit; cursor: pointer; }
/* the kit's .tbl th button zeroes the padding, which pulled every header 4px off its column */
.pa-tbl .pa-sort { padding: 0 4px; }
.pa-sort svg { width: 10px; height: 10px; stroke-width: 1.5; opacity: .6; }
[aria-sort="ascending"] .pa-sort, [aria-sort="descending"] .pa-sort { color: var(--color-text-primary); }
[aria-sort="ascending"] .pa-sort svg, [aria-sort="descending"] .pa-sort svg { opacity: 1; }
.pa-sort:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 0; }
.pa-pg button { font-variant-numeric: tabular-nums; }

/* ── Tooltip card: never wider than a phone ── */
.pa-ovt { max-width: min(280px, calc(100vw - 16px)); }

/* ── Print (report.html): ink only, nothing moves ── */
.pa-print .is-play, .pa-print .is-play * { animation: none !important; }
.pa-dtable--print table { margin-top: 0; }
@media print { .pa-viz *, .ov-pg * { animation: none !important; transition: none !important; } }
@media (prefers-reduced-motion: reduce) { .is-play, .is-play * { animation: none !important; } }
/* 6b (axe): rows use spans; these carry the kit's .ovr dt / dd look */
.pa-rows .ovr-l { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: var(--font-size-13); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-rows .ovr-l small { margin-left: 4px; font-size: 11px; color: var(--color-text-tertiary); }
.pa-rows .pa-li { display: block; min-width: 0; }
.pa-rows .pa-li > .ovr { width: 100%; }

/* ── Fix pass 1 (27 Nov) ── */
/* polish B3: the ellipsis sits on the label's own span (text-overflow does nothing on a flex box); the full label is in the tooltip */
.pa-rows .ovr-l > .ovr-lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-rows .ovr-l > .pa-lock { flex: none; }
@container page (max-width: 560px) { .pa-rows .ovr { grid-template-columns: minmax(104px, 40%) minmax(0, 1fr) minmax(64px, auto); } }
/* polish N2: the line draws in at the house 380ms */
@media (prefers-reduced-motion: no-preference) { .pa-lc.is-play:not(.is-done) .pa-lc-g { animation-duration: 380ms; } }
/* polish N4: retention tracks all end at one point */
.pa-ret .ovr { grid-template-columns: minmax(88px, 32%) minmax(0, 1fr) 104px; }
/* polish N5: every funnel row has the same height */
.pa-funnel .ovr { min-height: 40px; }
/* polish N9: a day's crest dot is the dark one, never the whole column */
.pa-dm__crest rect { fill: var(--color-lilac-700); }
/* UX W09: at phone width a row label wraps to two lines, so "Sample mall, Lagos" and "Sample mall, Port Harcourt" stay apart */
@container page (max-width: 560px) { .pa-rows .ovr-l > .ovr-lt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; } .pa-rows .ovr { align-items: center; } }
/* a table pane is the containing block, so screen-reader text in a cell never widens the page */
.pa-ts { position: relative; }
