/* <nv-cus-flow> — Custom Solutions: “your tools → Novility automations → results”.
   Markup and behaviour: cus-flow.js (header). Colours are token names only; the tools show their makers' own logos.
   Size: height follows the element's width only (container query on the element): < 640 px the flow runs top to bottom
   (tools 3 × 2, the hub, results 2 × 3), ≥ 640 px left to right (three columns), ≥ 820 px each tool also says what it is.
   The lines and the travelling dots are drawn by the script under the cards; without it two arrows show the direction. */
nv-cus-flow { display: block; min-width: 0; container-type: inline-size; color: var(--nv-ink); font-family: var(--nv-font, system-ui, sans-serif); line-height: 1.3; }
nv-cus-flow *, nv-cus-flow *::before, nv-cus-flow *::after { box-sizing: border-box; }
nv-cus-flow p, nv-cus-flow ul { margin: 0; }

nv-cus-flow .nvc-flow { --nvc-dir: column; position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 34px; padding: 14px 12px 16px; border-radius: var(--nv-r-sm, 14px); background: var(--nv-box); box-shadow: 0 28px 70px -34px color-mix(in srgb, var(--nv-cus) 50%, transparent); }
nv-cus-flow .nvc-flow::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--nv-line-2); pointer-events: none; }
nv-cus-flow .nvc-grp { position: relative; z-index: 1; min-width: 0; }
nv-cus-flow .nvc-h { margin-bottom: 8px; color: var(--nv-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
/* the list is opaque (the colour of the ground) so the wires show only in the open space between a group and the hub */
nv-cus-flow .nvc-nodes { position: relative; list-style: none; padding: 0; display: grid; gap: 8px; background: var(--nv-box); }
nv-cus-flow .nvc-in .nvc-nodes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
nv-cus-flow .nvc-out .nvc-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* a card: the tools show their logo, the results their icon */
nv-cus-flow .nvc-n { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px 8px 8px; border-radius: 10px; background: var(--nv-tile); box-shadow: inset 0 0 0 1px var(--nv-line); }
nv-cus-flow .nvc-in .nvc-n { flex-direction: column; justify-content: center; gap: 6px; padding: 9px 5px 8px; text-align: center; }
nv-cus-flow .nvc-tx { display: grid; gap: 2px; min-width: 0; }
nv-cus-flow .nvc-tx b { font-size: 12px; font-weight: 650; line-height: 1.22; letter-spacing: -0.005em; }
nv-cus-flow .nvc-tx small { display: none; color: var(--nv-muted); font-size: 11.5px; line-height: 1.25; }
nv-cus-flow .nvc-lg { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 26px; min-width: 40px; padding: 0 7px; border-radius: 7px; background: var(--nv-box); box-shadow: inset 0 0 0 1px var(--nv-line); }
nv-cus-flow .nvc-mono { color: var(--nv-ink); font-family: var(--nv-mono, ui-monospace, monospace); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
nv-cus-flow .nvc-gg img { display: block; width: 17px; height: 17px; }
/* the two word-mark logos are drawn in the ink of the theme through their own file as a mask */
nv-cus-flow .nvc-mask { display: block; background: var(--nv-ink); }
nv-cus-flow .nvc-motive { width: 50px; height: 12px; -webkit-mask: url("/assets/logos/int-motive.svg?v=89d91f8a") center / contain no-repeat; mask: url("/assets/logos/int-motive.svg?v=89d91f8a") center / contain no-repeat; }
nv-cus-flow .nvc-alvys { width: 40px; height: 14px; -webkit-mask: url("/assets/logos/int-alvys.svg?v=fbc1da0e") center / contain no-repeat; mask: url("/assets/logos/int-alvys.svg?v=fbc1da0e") center / contain no-repeat; }
nv-cus-flow .nvc-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--nv-cus); background: color-mix(in srgb, var(--nv-cus) 15%, transparent); }
nv-cus-flow .nvc-ic svg { display: block; width: 16px; height: 16px; }

/* the hub: the Novility mark and the name */
nv-cus-flow .nvc-hub { position: relative; z-index: 1; justify-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border-radius: 14px; background: var(--nv-tile-2); box-shadow: inset 0 0 0 1.5px var(--nv-cus), 0 0 36px -8px color-mix(in srgb, var(--nv-cus) 55%, transparent); }
nv-cus-flow .nvc-hub b { font-size: 14px; font-weight: 720; letter-spacing: -0.015em; white-space: nowrap; }
nv-cus-flow .nvc-mark { display: block; width: 30px; height: 30px; }
/* without the script: two arrows say which way it flows */
nv-cus-flow .nvc-hub::before, nv-cus-flow .nvc-hub::after { content: ""; position: absolute; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border: solid var(--nv-line-2); border-width: 0 2px 2px 0; transform: rotate(45deg); }
nv-cus-flow .nvc-hub::before { top: -22px; }
nv-cus-flow .nvc-hub::after { bottom: -20px; }
nv-cus-flow.has-wires .nvc-hub::before, nv-cus-flow.has-wires .nvc-hub::after { display: none; }

/* drawn by the script: the wires under the cards, the dots on them, a soft light on a card when a dot leaves or lands */
nv-cus-flow .nvc-wires { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
nv-cus-flow .nvc-wires path { fill: none; stroke: var(--nv-line-2); stroke-width: 1.25; }
nv-cus-flow .nvc-dot { opacity: 0; }
nv-cus-flow .nvc-dot circle { fill: var(--nv-cus); }
nv-cus-flow .nvc-dot .h { opacity: 0.3; }
nv-cus-flow .nvc-glow { position: absolute; inset: 0; border-radius: inherit; opacity: 0; pointer-events: none; box-shadow: inset 0 0 0 1.5px var(--nv-cus), 0 0 22px -6px var(--nv-cus); }

@container (min-width: 640px) {
  nv-cus-flow .nvc-flow { --nvc-dir: row; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 52px; align-items: start; padding: 16px 18px 18px; }
  nv-cus-flow .nvc-n { min-height: 44px; }
  nv-cus-flow .nvc-in .nvc-nodes, nv-cus-flow .nvc-out .nvc-nodes { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  nv-cus-flow .nvc-in .nvc-n { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 7px 10px 7px 7px; text-align: left; }
  nv-cus-flow .nvc-lg { width: 64px; }
  nv-cus-flow .nvc-hub { align-self: center; flex-direction: column; gap: 8px; padding: 14px 14px 12px; text-align: center; }
  nv-cus-flow .nvc-hub b { max-width: 6.5em; white-space: normal; line-height: 1.15; }
  nv-cus-flow .nvc-hub::before, nv-cus-flow .nvc-hub::after { top: 50%; bottom: auto; margin: -4.5px 0 0; transform: rotate(-45deg); }
  nv-cus-flow .nvc-hub::before { left: -31px; }
  nv-cus-flow .nvc-hub::after { left: auto; right: -29px; }
}
@container (min-width: 820px) {
  nv-cus-flow .nvc-tx small { display: block; }
  nv-cus-flow .nvc-tx b { font-size: 12.5px; }
}
