/* ==========================================================================
   Nexus data flow (interactives-2, Oct 11, 2026). Loads after nexus.css on /nexus/ only.
   Night register. Tokens only. One set of native buttons sits over two decorative
   SVG drawings (wide >= 760px container, tall below). Button centres use the SVG
   viewBox units (--x, --y), so paths meet the buttons at every width.
   Motion: JS (nexus-flow.js) runs transform and opacity animations only, pauses
   off-screen and does nothing under prefers-reduced-motion.
   ========================================================================== */
.nxf{container-type:inline-size}
.nxf-stage{position:relative;aspect-ratio:1200 / 520;--vw:1200;--vh:520}
.nxf-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;font-family:var(--font-sans);font-weight:500}
.nxf-svg--tall{display:none}

/* Drawing */
.nxf-path, .nxf-hi{fill:none;stroke:var(--nexus);transition:opacity var(--dur-ui) ease-out}
.nxf-path{stroke-dasharray:4 10;stroke-width:1.6;opacity:.6}
.nxf-path--out{stroke-width:2;opacity:.8}
.nxf-hi{stroke-width:2.4;opacity:0}
.nxf-hi.is-on{opacity:1}
.nxf.has-active .nxf-path{opacity:.22}
.nxf-core-halo{fill:color-mix(in srgb, var(--nexus) 10%, transparent);stroke:color-mix(in srgb, var(--nexus) 22%, transparent);opacity:.35}
.nxf-core{fill:var(--navy-mid);stroke:color-mix(in srgb, var(--nexus) 55%, transparent);stroke-width:1.5}
.nxf-core-ring{fill:none;stroke:color-mix(in srgb, var(--nexus) 35%, transparent);stroke-dasharray:2 6}
.nxf.has-active .nxf-core-halo{opacity:1}
.nxf-mark{fill:var(--off-white)}
.nxf-mark .nx-mark__acc{fill:var(--nexus)}
.nxf-mark .nx-mark__beam{opacity:.55}
.nxf-core__t{fill:var(--nexus);font-size:17px}
.nxf-core__t--sm{font-size:17px}
.nxf-dot{fill:var(--nexus);opacity:0}

/* Nodes: native buttons positioned in viewBox units */
.nxf-nodes{list-style:none;margin:0;padding:0;position:absolute;inset:0;pointer-events:none}
.nxf-nodes li{position:absolute;left:calc(var(--x) / var(--vw) * 100%);top:calc(var(--y) / var(--vh) * 100%);transform:translateY(-50%)}
.nxf-nodes--src li{width:calc(210 / var(--vw) * 100%)}
.nxf-nodes--out li{width:calc(230 / var(--vw) * 100%)}
.nxf-nodes--src li:nth-child(1){--x:20;--y:60}
.nxf-nodes--src li:nth-child(2){--x:20;--y:140}
.nxf-nodes--src li:nth-child(3){--x:20;--y:220}
.nxf-nodes--src li:nth-child(4){--x:20;--y:300}
.nxf-nodes--src li:nth-child(5){--x:20;--y:380}
.nxf-nodes--src li:nth-child(6){--x:20;--y:460}
.nxf-nodes--out li:nth-child(1){--x:950;--y:76}
.nxf-nodes--out li:nth-child(2){--x:950;--y:168}
.nxf-nodes--out li:nth-child(3){--x:950;--y:260}
.nxf-nodes--out li:nth-child(4){--x:950;--y:352}
.nxf-nodes--out li:nth-child(5){--x:950;--y:444}
.nxf-node{pointer-events:auto;position:relative;display:flex;align-items:center;width:100%;min-height:44px;padding:6px 12px 6px 16px;
  border:1px solid var(--night-line-strong);border-radius:8px;background:var(--night-raise);color:var(--night-text-soft);
  font:500 clamp(.8125rem, 1.3cqi, 1rem)/1.2 var(--font-sans);text-align:left;
  transition:border-color var(--dur-ui) ease-out, color var(--dur-ui) ease-out, opacity var(--dur-ui) ease-out}
.nxf-node--out{border-radius:10px;border-color:color-mix(in srgb, var(--nexus) 45%, transparent);color:var(--off-white);font-size:clamp(.875rem, 1.4cqi, 1.0625rem)}
.nxf-node[data-node="actions"]{background:var(--nexus);border-color:var(--nexus);color:var(--nexus-ink)}
.nxf-node__glow{position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;opacity:0;
  box-shadow:0 0 0 1px var(--nexus), 0 0 22px color-mix(in srgb, var(--nexus) 38%, transparent)}
.nxf-node__t{position:relative}
.nxf.is-ready .nxf-node{cursor:pointer}
.nxf-node:hover, .nxf-node.is-active{border-color:var(--nexus);color:var(--off-white)}
.nxf-node[data-node="actions"]:hover, .nxf-node[data-node="actions"].is-active{color:var(--nexus-ink)}
.nxf-node.is-active .nxf-node__glow{opacity:1}
.nxf.has-active .nxf-node:not(.is-active){opacity:.6}
.nxf-node:focus-visible{outline:2px solid var(--nexus);outline-offset:3px}

/* One-line description (visual; screen readers get aria-describedby on each button) */
.nxf-desc{min-height:3em;margin-top:14px;font-size:1rem;line-height:1.5;color:var(--text-soft);visibility:hidden}
.nxf.is-ready .nxf-desc{visibility:visible}
.nxf-desc__name{color:var(--nexus);font-weight:500}

/* Tall layout */
@container (max-width: 759.98px){
  .nxf-stage{aspect-ratio:360 / 790;--vw:360;--vh:790;max-width:440px;margin-inline:auto}
  .nxf-svg--wide{display:none}
  .nxf-svg--tall{display:block}
  .nxf-nodes--src li{width:calc(160 / var(--vw) * 100%)}
  .nxf-nodes--out li{width:calc(300 / var(--vw) * 100%)}
  .nxf-nodes--src li:nth-child(1){--x:12;--y:40}
  .nxf-nodes--src li:nth-child(2){--x:188;--y:40}
  .nxf-nodes--src li:nth-child(3){--x:12;--y:116}
  .nxf-nodes--src li:nth-child(4){--x:188;--y:116}
  .nxf-nodes--src li:nth-child(5){--x:12;--y:192}
  .nxf-nodes--src li:nth-child(6){--x:188;--y:192}
  .nxf-nodes--out li:nth-child(1){--x:48;--y:470}
  .nxf-nodes--out li:nth-child(2){--x:48;--y:540}
  .nxf-nodes--out li:nth-child(3){--x:48;--y:610}
  .nxf-nodes--out li:nth-child(4){--x:48;--y:680}
  .nxf-nodes--out li:nth-child(5){--x:48;--y:750}
  .nxf-node{padding:6px 8px 6px 10px;font-size:.8125rem}
  .nxf-node--out{padding-left:14px;font-size:.9375rem}
  .nxf-desc{min-height:4.5em;font-size:.9375rem;max-width:440px;margin-inline:auto}
}

@media (prefers-reduced-motion: reduce){
  .nxf-path, .nxf-hi, .nxf-node, .nxf-node__glow{transition:none}
  .nxf-dots{display:none}
}
@media (forced-colors: active){
  .nxf-node{border-color:ButtonText}
  .nxf-node.is-active{outline:2px solid Highlight}
}
