/* flow-kit.css — designed flows v2 (process-flow · hub · timeline · diagram flow skin). Tokens only, no hex, no
   gradient fill, no glow: depth = the piece's --lift (a solid zero-blur offset + ring), one accent with a meaning
   (cobalt = data / active), signal = decoration only. Strokes are scaled for video (no hairline: >= 0.36cqw).
   © Dudoxx UG / Acceleate Consulting - Walid Boudabbous <walid@acceleate.com>
   Portions adapted from HeyGen HyperFrames (Apache-2.0), registry/blocks/flowchart; modified by Dudoxx. */

/* the stage of one flow: .fk (the rig, fills the free box) > .fk-cam (follow camera) > svg.fk-svg + .fk-layer */
.fk { position: relative; flex: 1 1 auto; align-self: stretch; min-width: 0; min-height: 0; overflow: clip; overflow-clip-margin: 1.2cqw;
  --fk-stroke: 0.46cqw; --fk-r: 1.1cqw; --fk-tint: var(--tint-cobalt, color-mix(in oklch, var(--accent) 14%, var(--card)));
  --fk-link: var(--brand-color-link, var(--accent)); }
/* dark grounds: the interactive ink is the pastel dark link (D-017: deep cobalt on a dark card fails contrast) */
.look-studio .fk, .on-dark .fk, .on-dark-ground .fk { --fk-link: var(--brand-color-dark-link, var(--ink)); --fk-tint: color-mix(in oklch, var(--accent) 22%, var(--card)); }
.fk-cam { position: absolute; inset: 0; transform-origin: 0 0; } /* no will-change: icon glyphs inside (icon-kit seek purity) */
.fk-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fk-layer { position: absolute; inset: 0; }

/* edges: a muted track that draws, an accent fill that runs behind the packet, an arrowhead that rides the tip and lands */
.fk-edge { opacity: 0; }
/* dash lengths are written by FLOWKIT.arrow in px (no pathLength); the start state = nothing drawn */
.fk-track, .fk-fill, .fk-svg .fk-flow { fill: none; stroke-width: var(--fk-stroke); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0 99999; }
.fk-track { stroke: color-mix(in oklch, var(--ink) 26%, transparent); }
.fk-fill { stroke: var(--accent); }
/* scoped to the svg: process-flow names its container div "fk-flow" too (opacity 0 hid the whole visual) */
.fk-svg .fk-flow { stroke: var(--brand-color-primary-foreground); stroke-width: calc(var(--fk-stroke) * 0.42); opacity: 0; }
.fk-edge.is-dashed .fk-track { stroke-dasharray: 0.9cqw 0.7cqw; opacity: 0; }
.fk-head { fill: color-mix(in oklch, var(--ink) 40%, var(--card)); stroke: none; }
.fk-head.is-hot { fill: var(--accent); }
.fk-elabel { position: absolute; z-index: 5; translate: -50% -50%; white-space: nowrap; padding: 0.3cqw 0.8cqw; border-radius: 99em;
  font-family: var(--face-mono); font-size: var(--fs-eyebrow); color: var(--muted); background: var(--card); box-shadow: var(--lift); opacity: 0; }

/* node card: tile (icon or number) · title · sub · status chip · completing ring */
.fk-node { position: absolute; z-index: 2; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto;
  align-items: center; column-gap: 1.1cqw; row-gap: 0.8cqw; padding: 1.2cqw 1.3cqw; border-radius: var(--fk-r);
  background: var(--card); color: var(--ink); box-shadow: var(--lift), 0 0 0 calc(var(--glow, 0) * 0.3cqw) var(--accent); }
.fk-node.is-col { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; justify-items: center; text-align: center; row-gap: 0.7cqw; padding: 1.4cqw 1cqw 1.2cqw; }
.fk-tile { display: grid; place-items: center; width: 3.6cqw; height: 3.6cqw; border-radius: 0.8cqw; background: var(--fk-tint); color: var(--fk-link);
  font-family: var(--face-mono); font-weight: 600; font-size: var(--fs-lead); font-variant-numeric: tabular-nums; }
.fk-tile svg { width: 2cqw; height: 2cqw; }
.fk-tile .ik { --ik-size: 2.3cqw; }
.fk-node.is-primary .fk-tile { color: var(--brand-color-primary-foreground); }
.fk-badge { position: absolute; left: -0.9cqw; top: -0.9cqw; display: grid; place-items: center; width: 2.2cqw; height: 2.2cqw; border-radius: 50%;
  font-style: normal; font-family: var(--face-mono); font-size: var(--fs-eyebrow); font-weight: 600; background: var(--accent); color: var(--brand-color-primary-foreground); }
.fk-txt { display: grid; gap: 0.25cqw; min-width: 0; }
.fk-title { font-family: var(--face-head); font-size: var(--fs-lead); font-weight: 700; line-height: 1.12; overflow-wrap: break-word; }
.fk-title.is-long { font-size: var(--fs-body); }
.fk-sub { font-size: var(--fs-label); line-height: 1.25; color: var(--muted); overflow-wrap: break-word; }
.fk-chip { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 0.5cqw; padding: 0.3cqw 0.8cqw 0.3cqw 0.4cqw; border-radius: 99em;
  font-family: var(--face-mono); font-size: var(--fs-eyebrow); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--recess); color: var(--muted); transform-origin: 50% 50%; }
.fk-node.is-col .fk-chip { justify-self: center; }
.fk-chip.is-bare { padding: 0.3cqw; }
.fk-chip-mark { display: grid; place-items: center; width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: color-mix(in oklch, var(--ink) 14%, transparent); color: transparent; }
.fk-chip-mark svg { width: 1cqw; height: 1cqw; }
.fk-chip.is-on { background: var(--accent); color: var(--brand-color-primary-foreground); }
.fk-chip.is-on .fk-chip-mark { background: var(--brand-color-primary-foreground); color: var(--accent); }
.fk-ring { position: absolute; inset: -0.7cqw; width: calc(100% + 1.4cqw); height: calc(100% + 1.4cqw); overflow: visible; pointer-events: none; }
.fk-ring rect { fill: none; stroke: var(--accent); stroke-width: 0.3cqw; rx: 1.7cqw; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }
.fk-node.is-active .fk-ring rect { opacity: 1; }
/* the one primary node: the brand action fill, the focal of the flow */
.fk-node.is-primary { background: var(--accent); color: var(--brand-color-primary-foreground); }
.fk-node.is-primary .fk-sub { color: color-mix(in oklch, var(--brand-color-primary-foreground) 82%, var(--accent)); }
.fk-node.is-primary .fk-tile { background: color-mix(in srgb, var(--brand-color-primary-foreground) 18%, transparent); color: var(--brand-color-primary-foreground); }
.fk-node.is-primary .fk-chip { background: color-mix(in srgb, var(--brand-color-primary-foreground) 16%, transparent); color: var(--brand-color-primary-foreground); }
.fk-node.is-primary .fk-chip.is-on { background: var(--brand-color-primary-foreground); color: var(--accent); }
.fk-node.is-primary .fk-chip.is-on .fk-chip-mark { background: var(--accent); color: var(--brand-color-primary-foreground); }
.fk-node.is-primary .fk-title { font-size: var(--fs-title); }

/* packet capsule: a labelled chip that rides the edge */
.fk-pkt { position: absolute; z-index: 4; left: 0; top: 0; display: inline-flex; align-items: center; gap: 0.5cqw; padding: 0.35cqw 0.95cqw 0.35cqw 0.45cqw; border-radius: 99em;
  white-space: nowrap; font-family: var(--face-mono); font-size: var(--fs-eyebrow); font-weight: 600; opacity: 0; pointer-events: none;
  background: var(--accent); color: var(--brand-color-primary-foreground); box-shadow: 0 0 0 0.25cqw var(--card); }
.fk-pkt-dot { width: 0.9cqw; height: 0.9cqw; border-radius: 50%; background: var(--brand-color-primary-foreground); }
.fk-pkt.is-bare, .fk-pkt.is-tight { padding: 0.45cqw; box-shadow: none; }
.fk-pkt.is-tight .fk-pkt-t { display: none; } /* an edge shorter than its label: the capsule rides bare, the card's chip carries the value */
.fk-pkt.is-bare .fk-pkt-dot, .fk-pkt.is-tight .fk-pkt-dot { width: 1.5cqw; height: 0.55cqw; border-radius: 99em; background: var(--accent); } /* a solid capsule, not a ring */
.fk-pkt.is-bare, .fk-pkt.is-tight { padding: 0.25cqw; box-shadow: 0 0 0 0.2cqw var(--card); }
.fk-pkt.is-signal { background: var(--card); color: var(--ink); box-shadow: var(--lift); }
.fk-pkt.is-signal .fk-pkt-dot { background: var(--signal); }

/* phone portrait: type floors come from piece.css; the flow takes the space under the head */
@media (max-width: 600px) and (orientation: portrait) {
  .stage .scene .fk { flex: 1 1 auto; width: 100%; min-height: 0; --fk-stroke: max(0.6cqw, 2.5px); --fk-r: 2cqw; }
  .stage .fk-tile { width: max(3.6cqw, 26px); height: max(3.6cqw, 26px); border-radius: 1.4cqw; font-size: var(--fs-label); }
  .stage .fk-tile svg { width: max(2cqw, 15px); height: max(2cqw, 15px); }
  .stage .fk-node { padding: 1.8cqw 2.2cqw; column-gap: 2cqw; row-gap: 1.2cqw; }
  .stage .fk-node .fk-sub { display: none; }
  .stage .fk-chip-mark { width: max(1.5cqw, 12px); height: max(1.5cqw, 12px); }
  .stage .fk-chip-mark svg { width: max(1cqw, 8px); height: max(1cqw, 8px); }
  .stage .fk-badge { width: max(2.2cqw, 16px); height: max(2.2cqw, 16px); left: -1.4cqw; top: -1.4cqw; }
  .stage .fk-pkt-dot { width: max(0.9cqw, 6px); height: max(0.9cqw, 6px); }
}
@media (prefers-reduced-motion: reduce) { .fk-cam { transform: none !important; } }
