/* Styles for assets/flow-view.js — the agent workflow diagram.
   Tokens come from falaq-2026.css (loaded directly on the home page, via the
   @import in company-pages.css everywhere else). No local :root here. */

.flow-canvas { max-width: 640px; margin: var(--x4) auto 0; }

.fx { display: grid; margin: 0; padding: 0; gap: 0; list-style: none; }

.fx-node {
  position: relative;
  padding: 12px var(--x3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--s-1);
}

/* Connector between consecutive rows. */
.fx > li + li { margin-top: var(--x4); }
.fx > li + li::before {
  position: absolute;
  top: calc(var(--x4) * -1);
  inset-inline-start: 50%;
  width: 1px;
  height: var(--x4);
  background: linear-gradient(var(--line-hi), var(--acc));
  content: "";
}

.fx-label {
  display: block;
  color: var(--acc-lo);
  font-family: var(--f-data);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
html[dir="rtl"] .fx-label { letter-spacing: 0; text-transform: none; font-family: var(--f-body); font-weight: 700; }

.fx-text { display: block; margin-top: var(--x1); color: var(--ink-2); font-size: .875rem; line-height: 1.6; }

.fx-trigger { border-color: var(--line-hi); background: var(--s-2); }
.fx-decision { border-color: var(--line-accent); background: var(--acc-dim); }
.fx-log { border-style: dashed; background: transparent; }

/* The fork is where the guardrail becomes visible, so both outcomes sit at the
   same weight — the blocked branch is not styled as an error. */
.fx-fork { position: relative; }
.fx-branches { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--x2); list-style: none; }
.fx-branch { padding: 12px var(--x3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s-1); }
.fx-tag { display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); font-family: var(--f-data); font-size: .6875rem; font-weight: 600; }
.fx-yes { border-color: rgba(74, 222, 128, .3); }
.fx-yes .fx-tag { background: rgba(74, 222, 128, .12); color: var(--ok); }
.fx-no { border-color: rgba(251, 191, 36, .3); }
.fx-no .fx-tag { background: rgba(251, 191, 36, .12); color: var(--hold); }

.fx-in > .fx > li { animation: fxIn .34s ease both; }
.fx-in > .fx > li:nth-child(2) { animation-delay: .05s; }
.fx-in > .fx > li:nth-child(3) { animation-delay: .1s; }
.fx-in > .fx > li:nth-child(4) { animation-delay: .15s; }
.fx-in > .fx > li:nth-child(5) { animation-delay: .2s; }
.fx-in > .fx > li:nth-child(6) { animation-delay: .25s; }
@keyframes fxIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .fx-in > .fx > li { animation: none; }
}

@media (max-width: 640px) {
  .fx-branches { grid-template-columns: minmax(0, 1fr); }
}
