/* p2-overview.css · ported 26 Nov from v1 v2-overview.css: Overview cards (.ovc), ticker-ramp bar rows (.ovr .bp), tooltip card (.ovt), gauge (.ovgg). */
/* 23 Nov · Overview cards (v2-overview.js). The blend of the three chart variations.
   Cards match the tile strip above: white, 1px border-default, radius-sm. One header row per card (icon + title + note | toggle + link).
   Colour roles: lilac = what counts, neutral = the rest, amber = review hold only. Values in ink, never in a series colour. */

/* ── colour roles (fills for dots, segments and swatches) ── */
.ov-pg, .ovt {
  --ov-a7: var(--color-lilac-700); --ov-a5: var(--color-lilac-500); --ov-a4: var(--color-lilac-400); --ov-a3: var(--color-lilac-300);
  --ov-g0: var(--color-neutral-100); --ov-g1: var(--color-neutral-300);
  --ov-hold: var(--color-amber-500); --ov-track: var(--color-neutral-50);
}
.sw--ret, .sw--a7 { background: var(--ov-a7); }
.sw--a5 { background: var(--ov-a5); }
.sw--a4 { background: var(--ov-a4); }
.sw--sel, .sw--a3 { background: var(--ov-a3); }
.sw--hold { background: var(--ov-hold); }
.sw--g0 { background: var(--ov-g0); }
.sw--g1 { background: var(--ov-g1); }
.sw--empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-neutral-300); }

/* ── grid + card chrome ── */
.ovg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.ovc { min-width: 0; padding: var(--space-4) var(--space-5) var(--space-5); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-canvas); }
.ovc--wide { grid-column: 1 / -1; }
.ovc-h { display: flex; align-items: flex-start; gap: var(--space-2) var(--space-3); min-width: 0; margin: 0 0 var(--space-4); }
.ovc-i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -1px; border-radius: 6px; background: var(--color-neutral-50); color: var(--color-text-secondary); }
.ovc-i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ovc-t { flex: 1; min-width: 0; }
.ovc-t h2 { margin: 0; font-family: var(--font-family-display); font-size: var(--font-size-16); font-weight: var(--font-weight-semibold); line-height: 1.3; color: var(--color-text-primary); letter-spacing: 0; }
.ovc-t p { margin: 0; font-size: var(--font-size-12); line-height: 1.4; color: var(--color-text-tertiary); }
.ovc-r { flex: none; display: flex; align-items: center; gap: var(--space-4); min-height: 24px; }
.ovc-r .v2-more { margin: 0; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.ovc-r .v2-more svg { width: 12px; height: 12px; }
@media (hover: hover) and (pointer: fine) { .ovc-r .v2-more:hover { color: var(--color-text-primary); } }

.ovc-k { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px var(--space-2); margin: 0 0 var(--space-4); }
.ovc-k b { font-family: var(--font-family-display); font-size: var(--font-size-24); line-height: 1.1; font-weight: var(--font-weight-semibold); letter-spacing: -0.02em; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.ovc-k span { font-size: var(--font-size-13); color: var(--color-text-secondary); }
.ovc-leg { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-3) 0 0; padding: 0; list-style: none; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.ovc-leg li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ovc-leg i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ovc-leg b { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }

/* ── Count / % toggle ── */
.ovc-tog { display: inline-flex; padding: 2px; border-radius: 6px; background: var(--color-neutral-50); }
.ovc-tog button { height: 22px; min-width: 32px; padding: 0 8px; border: 0; border-radius: 4px; background: none; font: inherit; font-size: 11px; font-weight: var(--font-weight-semibold); color: var(--color-text-tertiary); cursor: pointer; transition: transform 120ms ease-out; }
.ovc-tog button[aria-pressed="true"] { background: var(--color-bg-canvas); color: var(--color-text-primary); box-shadow: 0 0 0 1px var(--color-border-default); }
.ovc-tog button:active { transform: scale(0.97); }
.ovc-tog button:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 1px; }
.ovr-v .p, .ovc[data-m="p"] .ovr-v .c { display: none; }
.ovc[data-m="p"] .ovr-v .p { display: inline; }

/* focus: one visible ring for every mark */
.ov-pg .ovc [tabindex="0"]:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 3px; border-radius: 3px; }

/* ── labelled bar rows. Hover / focus = a very faint row wash + the tooltip; colours never fade (Mikky: "why is the colour going"). ── */
.ov-pg { --ov-hover: color-mix(in oklab, var(--color-neutral-50) 55%, var(--color-bg-canvas)); }   /* fainter than the bar track, so the track still reads */
.ovrs { display: grid; gap: 4px; margin: 0; }
.ovr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 52px; align-items: center; gap: var(--space-3); padding: 3px 0; border-radius: 4px; }
.ovr dt { font-size: var(--font-size-13); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovr dd { margin: 0; }
.ovr-t { display: flex; gap: 2px; height: 10px; border-radius: 2px; background: var(--ov-track); }
.ovr-t i { display: block; min-width: 2px; height: 100%; border-radius: 2px; }
.ovr-v { font-size: var(--font-size-13); font-weight: var(--font-weight-semibold); text-align: right; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .ovr:hover { background: var(--ov-hover); box-shadow: 0 0 0 4px var(--ov-hover); } }
.ovr:focus-visible { background: var(--ov-hover); box-shadow: 0 0 0 4px var(--ov-hover); }

/* ── tooltip card: white, coloured dots ── */
.ovt { position: fixed; z-index: 95; display: grid; gap: 4px; min-width: 132px; max-width: 260px; padding: 8px 10px; border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-canvas); box-shadow: 0 6px 20px rgba(26, 25, 28, 0.10); font-size: var(--font-size-12); color: var(--color-text-secondary); pointer-events: none; }
.ovt > b { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }
.ovt-r { display: flex; align-items: center; gap: 6px; }
.ovt-r i { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.ovt-r .ovt-n { background: none; }
.ovt-r span { flex: 1; white-space: nowrap; }
.ovt-r em { font-style: normal; font-weight: var(--font-weight-semibold); color: var(--color-text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── narrow ── */
@container page (max-width: 900px) { .ovg { grid-template-columns: minmax(0, 1fr); } }
@container page (max-width: 760px) {
  .ovc { padding: var(--space-4); }
  .ovc-h { flex-wrap: wrap; }
  .ovc-t { flex-basis: calc(100% - 36px); }
  .ovc-r { width: 100%; justify-content: space-between; padding-left: 36px; }
  .ovc-r:has(> :only-child) { justify-content: flex-start; }
  .ovr { grid-template-columns: 80px minmax(0, 1fr) 44px; gap: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) { .ovc-tog button { transition: none; } }

/* ── 23 Nov · colour pass: tinted icon chips (no grey), toggle = house .seg ── */
.dt-ic--brand { background: var(--color-lilac-50); color: var(--color-lilac-700); }
.ovc-i { background: var(--color-lilac-50); color: var(--color-lilac-700); }
.ovc-i--renew, .ovc-i--pay { background: var(--color-status-success-bg); color: var(--color-status-success-fg); }
.ovc-tog { padding: 0; gap: 0; background: none; border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); overflow: hidden; }
.ovc-tog button { height: 26px; min-width: 0; padding: 0 10px; border-radius: 0; font-size: var(--font-size-12, 12px); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); }
.ovc-tog button + button { border-left: 1px solid var(--color-border-default); }
.ovc-tog button[aria-pressed="true"] { background: var(--color-bg-surface); color: var(--color-text-primary); font-weight: var(--font-weight-semibold); box-shadow: none; }

/* ── 23 Nov · payouts gauge: 24 rounded segments on a half circle + three stat boxes ──
   Fill = KPI base (lilac-700→600), rank bonus (lilac-400→300), unspent (neutral-100). Round-join stroke in the same
   colour rounds every corner. Hover/focus a group or a box: the others step back to 40%. Fill plays once, ~400ms. */
.ovpay { display: grid; gap: var(--space-4); }
.ovgg { position: relative; width: 100%; max-width: 330px; margin: 0 auto; }
.ovgg svg { display: block; width: 100%; height: auto; overflow: visible; }
.ovgg path { fill: var(--f); stroke: var(--f); stroke-width: 3; stroke-linejoin: round; }
.ovgg-g { outline: none; cursor: default; }
.ov-pg .ovc .ovgg-g:focus-visible { outline: none; }
.ovgg-g:focus-visible path { stroke: var(--color-border-focus); }
.ovgg-c { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; margin: 0; pointer-events: none; text-align: center; }
.ovgg-c b { font-family: var(--font-family-display); font-size: var(--font-size-32); line-height: 1; font-weight: var(--font-weight-semibold); letter-spacing: -0.02em; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.ovgg-c span { font-size: var(--font-size-12); color: var(--color-text-tertiary); white-space: nowrap; }
.ovgg.is-play path { animation: ovgg-in 140ms cubic-bezier(0.23, 1, 0.32, 1) calc(var(--i) * 11ms) backwards; }
.ovgg.is-play [data-k="unspent"] path { animation: none; }
@keyframes ovgg-in { from { fill: var(--ov-g0); stroke: var(--ov-g0); } }

.ovpb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.ovpb-b { display: grid; align-content: start; gap: 4px; min-width: 0; padding: var(--space-3); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-canvas); }
.ovpb-l { display: flex; align-items: center; gap: 6px; font-size: var(--font-size-12); color: var(--color-text-secondary); white-space: nowrap; }
.ovpb-l i { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.ovpb-v { font-size: 18px; line-height: 1.2; font-weight: var(--font-weight-semibold); color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.ovpb-c { justify-self: start; max-width: 100%; padding: 1px 6px; border-radius: 4px; background: var(--color-lilac-50); font-size: 11px; line-height: 16px; color: var(--color-lilac-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovpb-c--q { background: var(--color-neutral-50); color: var(--color-text-secondary); }

.ovpay:has([data-k="base"]:hover, [data-k="base"]:focus-visible) .ovpb-b[data-k="base"],
.ovpay:has([data-k="bonus"]:hover, [data-k="bonus"]:focus-visible) .ovpb-b[data-k="bonus"],
.ovpay:has([data-k="unspent"]:hover, [data-k="unspent"]:focus-visible) .ovpb-b[data-k="unspent"] { background: var(--ov-hover); }   /* the matching box answers a gauge hover */

@container page (max-width: 760px) {
  .ovpb { grid-template-columns: minmax(0, 1fr); }
  .ovpb-b { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--space-3); padding: var(--space-2) var(--space-3); }
  .ovpb-v { grid-row: span 2; grid-column: 2; text-align: right; }
  .ovpb-l { grid-row: 1; }
  .ovpb-c { grid-row: 2; grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .ovgg.is-play path { animation: none; } }

/* ── 23 Nov · cohort chart (Mikky picked V1, "cohort over time"): certified seats per cycle as stacked columns on a 0–50 scale.
   Key figure above, counts live in the legend, the openings breakdown in the December column's tooltip. ── */
.ovc--coh [tabindex="0"] { outline-offset: 2px; }
.ocv1-ch { margin: 0; min-width: 0; }
.ocv1-p { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 168px; margin: 22px 0 0 28px; }
.ocv1-g { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--se-line); pointer-events: none; }
.ocv1-g--0 { border-top-color: var(--color-neutral-200); }
.ocv1-g em { position: absolute; right: calc(100% + 8px); top: 0; transform: translateY(-50%); font-style: normal; font-size: 11px; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.ocv1-c { position: relative; z-index: 1; height: 100%; cursor: default; }
.ocv1-c.is-now::before { content: ""; position: absolute; inset: -22px 6% 0; border-radius: 6px 6px 0 0; background: color-mix(in oklab, var(--color-lilac-50) 70%, transparent); z-index: -1; }
.ocv1-b { position: absolute; bottom: 0; left: 50%; width: clamp(28px, 42%, 64px); height: 100%; transform: translateX(-50%); display: flex; flex-direction: column-reverse; }
.ocv1-s { display: block; flex: none; box-sizing: border-box; }
.ocv1-s + .ocv1-s { border-bottom: 2px solid transparent; background-clip: padding-box; }
.ocv1-s:last-child { border-radius: 4px 4px 0 0; }
.ocv1-c:not(.is-now) .ocv1-s { opacity: 0.55; }
.ocv1-v { position: absolute; left: 0; right: 0; text-align: center; font-size: var(--font-size-12); font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.ocv1-c.is-now .ocv1-v { color: var(--color-text-primary); }
.ocv1-x { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0 0 28px; text-align: center; }
.ocv1-x b { display: block; font-size: var(--font-size-12); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); }
.ocv1-x small { display: block; font-size: 11px; color: var(--color-text-tertiary); }
.ocv1-x .is-now b { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }
.ocv1-k { display: flex; flex-wrap: wrap; gap: 4px var(--space-4); margin: var(--space-4) 0 0 28px; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.ocv1-k span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ocv1-k i { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.ocv1-k b { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .ocv1-c:not(.is-now):hover::before { content: ""; position: absolute; inset: -22px 6% 0; border-radius: 6px 6px 0 0; background: var(--ov-hover); z-index: -1; } }
.ocv1-c:not(.is-now):focus-visible::before { content: ""; position: absolute; inset: -22px 6% 0; border-radius: 6px 6px 0 0; background: var(--ov-hover); z-index: -1; }

/* ── 23 Nov · funnel colours: lilac ramp like the cohort chart, lighter greys ── */
.ov-pg { --ov-g1: var(--color-neutral-200); --ov-f: var(--color-lilac-200); }
.sw--f { background: var(--ov-f); }

/* ── 23 Nov · bar pattern: the "ticker ramp" (Renewal, Pipeline, Referrals bars + their legends) ──
   Mikky: bars "too basic — add other colours, and a line pattern no one has seen before".
   Every bar is drawn in 1px vertical hairlines on a pale wash of its hue. A second set of hairlines, offset half a pitch,
   fades in toward the value end, so the pitch tightens 4px → 2px like a ticker filling up, then a solid 2px cap marks the value.
   The empty track keeps the 4px hairlines in faint grey, so the scale is still read where there is no bar.
   Colour roles: outcome that counts = lilac-700 (brand), path / funnel step = sage green (second accent; blue is reserved for threshold lines), lost = soft neutral,
   review hold = amber. Values and labels stay in ink. Lines are whole CSS px on a 4px tile: crisp at 1x and 2x. */
:root { --ov-path: color-mix(in oklab, var(--color-green-400) 72%, var(--color-neutral-600)); }   /* sage: DS green dulled with neutral, a calm second accent. Blue stays reserved for threshold lines. */
.sw--ret, .sw--a7 { --bi: var(--color-lilac-700); --bw: var(--color-lilac-100); }
.sw--a5 { --bi: var(--color-lilac-500); --bw: var(--color-lilac-50); }
.sw--a3 { --bi: var(--color-lilac-400); --bw: var(--color-lilac-50); }
.sw--f  { --bi: var(--ov-path); --bw: color-mix(in oklab, var(--ov-path) 16%, var(--color-neutral-0)); }
.sw--g1 { --bi: var(--color-neutral-400); --bw: var(--color-neutral-50); }
.sw--hold { --bi: var(--color-amber-500); --bw: var(--color-amber-50); }
.ovt .sw--f, .ovt .sw--g1, .ovt .sw--a3 { background: var(--bi); }   /* tooltip dots = the bar's line colour */

.bp .ovr-t { height: 12px; gap: 3px; border-radius: 1px;
  background: linear-gradient(90deg, var(--color-neutral-200) 1px, transparent 1px) 0 50% / 4px 4px repeat-x; }   /* empty track = short ruler ticks, so fill and space never read alike */
.bp .ovr-t i, .ovc-leg i { position: relative; border-radius: 1px;
  background:
    linear-gradient(var(--bi), var(--bi)) right / 2px 100% no-repeat,
    linear-gradient(90deg, var(--bi) 1px, transparent 1px) 0 0 / 4px 100% repeat-x,
    var(--bw); }
.bp .ovr-t i::after, .ovc-leg i::after { content: ""; position: absolute; inset: 0 2px 0 0;
  background: linear-gradient(90deg, var(--bi) 1px, transparent 1px) 2px 0 / 4px 100% repeat-x;
  -webkit-mask: linear-gradient(90deg, transparent 20%, #000 90%); mask: linear-gradient(90deg, transparent 20%, #000 90%); }
.bp .ovr-t i { min-width: 3px; }
.ovc-leg i { width: 16px; height: 8px; }

/* draw-in once per page load: each bar wipes open from the baseline, rows 40ms apart */
@media (prefers-reduced-motion: no-preference) {
  .bp.is-play .ovr-t i { animation: bp-in 380ms cubic-bezier(0.23, 1, 0.32, 1) both; animation-delay: calc(var(--r, 0) * 40ms); }
  .bp.is-play .ovr-t i + i { animation-delay: calc(var(--r, 0) * 40ms + 90ms); }
}
@keyframes bp-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* 23 Nov · same roles on the payouts gauge + cohort chart: KPI base / retained = lilac (outcome), rank bonus / from the incubator =
   the sage accent, unspent / empty = neutral, hold = amber. The gauge stays solid: hairlines across 24 curved wedges read as noise. */
.sw--pb, .sw--sel { --bi: var(--ov-path); --bw: color-mix(in oklab, var(--ov-path) 16%, var(--color-neutral-0)); background: var(--bi); }

/* 23 Nov · payout stat boxes = ONE joined strip (Mikky: "don't separate them"): one soft outer line, hairline dividers, no gaps,
   radius on the outer corners only. Chips: small, tinted in each box's own role colour (lilac / sage / grey), text AA on its tint. */
.ovpb { gap: 0; border: 1px solid var(--se-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-canvas); }
.ovpb-b { border: 0; border-radius: 0; background: none; }
.ovpb-b + .ovpb-b { border-left: 1px solid var(--se-line); }
.ovpb-c { padding: 0 5px; font-size: 11px; line-height: 16px; }
.ovpb-b[data-k="bonus"] .ovpb-c { background: var(--color-green-50); color: var(--color-green-700); }   /* 5.2:1 */
@container page (max-width: 760px) { .ovpb-b + .ovpb-b { border-left: 0; border-top: 1px solid var(--se-line); } }

/* 23 Nov · card header link = 28px quiet icon button (↗), aligned with the Count / % toggle; tooltip via [data-ot] */
.ovc-r .ovc-go { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; margin: -2px -6px -2px 0; border-radius: 6px; color: var(--color-text-tertiary); text-decoration: none; transition: background-color 120ms ease, color 120ms ease, transform var(--motion-duration-press) var(--motion-easing-out); }
.ovc-r .ovc-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .ovc-r .ovc-go:hover { background: var(--color-neutral-50); color: var(--color-text-primary); text-decoration: none; } }
.ovc-r .ovc-go:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 1px; color: var(--color-text-primary); }
.ovc-r .ovc-go:active { transform: scale(0.97); }
@container page (max-width: 760px) {   /* phones: the arrow stays in the title row, top right; the toggle sits under the title */
  .ovc-h { position: relative; }
  .ovc-t { padding-right: 32px; }
  .ovc-r .ovc-go { position: absolute; top: -3px; right: -6px; margin: 0; }
  .ovc-r { justify-content: flex-start; }
  .ovc-r:has(> .ovc-go:only-child) { width: 0; min-height: 0; padding: 0; }
}

/* 23 Nov · Count / % toggle, compact (Mikky: "same here"): "#" | "%", 24px tall, ~24px segments, 12px, house .seg look */
.ovc-tog { height: 24px; box-sizing: border-box; }
.ovc-tog button { height: 22px; min-width: 24px; padding: 0 6px; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }
.ovc-r { gap: var(--space-2); }

/* ── 23 Nov · Mikky: second accent = blue (replaces sage). Blue is no longer reserved for threshold lines on the Overview. ── */
:root { --ov-path: var(--color-blue-300); }
.ovpb-b[data-k="bonus"] .ovpb-c { background: var(--color-blue-50); color: var(--color-blue-600); }

/* ── 23 Nov · payout strip fits the card: full-bleed to the card's sides and bottom, no inner box ── */
.ovpay .ovpb { margin: var(--space-4) calc(-1 * var(--space-5)) calc(-1 * var(--space-5)); border: 0; border-top: 1px solid var(--se-line); border-radius: 0; }
.ovpay .ovpb-b { padding: var(--space-3) var(--space-5); }
