/* preset css: kpi-trio — cards v2 (2026-11-05). Tile body / veil / bar / edge: card-fx.css. This file lays out the
   tile (delta chip · display value · label · mini visual) and tones the visual for a BEFORE tile. Tokens only.
   © Dudoxx UG / Acceleate Consulting - Walid Boudabbous <walid@acceleate.com> */
.kpi-row { perspective: 140cqw; }
.kpi-tile.cfx-card { align-content: start; grid-template-rows: auto 1fr auto auto; gap: 0.9cqw; padding: 1.2cqw 1.2cqw 2.4cqw; }
.kpi-tile.cfx-card > :not(.cfx-band):not(.cfx-edge):not(.cfx-bar):not(.cfx-veil) { margin-inline: 1.2cqw; }
.kpi-tile.cfx-card:not(:has(.cfx-band)) { grid-template-rows: 1fr auto auto; padding-top: 2.4cqw; }
.kpi-tile.cfx-card .kpi-value { align-self: end; }
.kpi-band { justify-content: space-between; padding: 0.9cqw 1cqw; }
.kpi-band .ik.ik--tile { --ik-size: 3.8cqw; }
.kpi-band .kpi-delta { margin-left: auto; font-size: var(--fs-label); }
/* the ring sits in the tile's bottom-right corner beside the label, clear of the display value */
.kpi-viz--ring { position: absolute; right: 2cqw; bottom: 2.4cqw; width: 5.2cqw; aspect-ratio: 1; margin: 0; }
.kpi-tile.has-viz--ring .kpi-label { display: grid; padding-right: 6.4cqw; min-height: 5.2cqw; align-content: center; }
/* the BEFORE tile: muted figure, muted visual (it is the past, not the action) */
.kpi-tile--before .cfx-fill, .kpi-tile--before .cfx-dot, .kpi-tile--before .cfx-ring-arc { background: var(--muted); stroke: var(--muted); }
.kpi-tile--before .cfx-spark-line { stroke: var(--muted); }
.kpi-tile--before .cfx-dot::after { box-shadow: 0 0 0 0.14cqw var(--muted); }
.kpi-tile--before .cfx-bar { background: var(--muted); }
@media (max-width: 600px) and (orientation: portrait) {
  /* phone: three stacked tiles share a short stage — the band folds away, the delta chip pins to the tile's top-right */
  .stage .kpi-band { display: contents; }
  .stage .kpi-band > .ik, .stage .kpi-band > .cfx-ico--static { display: none; }
  .stage .kpi-band .kpi-delta { position: absolute; right: 3cqw; top: 2.6cqw; z-index: 2; }
  .stage .kpi-tile.cfx-card, .stage .kpi-tile.cfx-card:not(:has(.cfx-band)) { grid-template-rows: auto auto auto; }
  .stage .kpi-row { gap: 1.6cqw; }
  .stage .kpi-tile.cfx-card { gap: 0.6cqw; padding-top: 2.4cqw; padding-bottom: 2.8cqw; }
  .stage .kpi-viz { margin-top: 0.2cqw; }
  .stage .kpi-viz--ring { width: 12cqw; right: 4cqw; bottom: 4cqw; }
  .stage .kpi-tile.has-viz--ring .kpi-label { padding-right: 15cqw; min-height: 12cqw; }
}
