

.tb-stage.fx-stage { height: auto; }
.fx-stage .dash-note { top: -24px; }

.fx {
  position: relative; overflow: hidden; text-align: left; color: var(--ink); font-size: 13px;
  background: var(--white); border: 1px solid rgba(255, 255, 255, 0.7); border-bottom: 0; border-radius: 12px 12px 0 0;
  box-shadow: 0 16px 36px rgba(21, 37, 61, 0.14), 0 40px 60px rgba(21, 37, 61, 0.1);
  animation: tb-rise 1.2s cubic-bezier(0.2, 0.7, 0.1, 1) 0.25s both;
}

.fx-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.fx-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-name b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-wf { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--ivory-soft); color: var(--blue-deep); }
.fx-wf svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fx-active { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--sage-deep); background: rgba(111, 162, 135, 0.14); }
.fx-active i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage-deep); }
.fx-btns { display: flex; gap: 8px; }
.fx-btns span { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.fx-btns .solid { background: #1C3A66; border-color: #1C3A66; color: var(--white); }

.fx-scroll {
  position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  background: #FAFBFC radial-gradient(circle, rgba(21, 37, 61, 0.13) 1px, transparent 1.3px) 0 0 / 20px 20px;
}
.fx-fit { position: relative; margin: 0 auto; }
.fx-canvas { position: absolute; left: 0; top: 0; width: 1120px; height: 450px; transform-origin: 0 0; }

.fx-edges { position: absolute; inset: 0; overflow: visible; }
.fx-edges path { fill: none; stroke: #C5CCD6; stroke-width: 2; transition: stroke 0.3s; }
.fx-edges path.live { stroke: var(--blue); }
.fx-edges path.done { stroke: var(--sage-deep); }
.fx-edges path.alert.live, .fx-edges path.alert.done { stroke: #B4533C; }
.fx-dot { fill: var(--blue-deep); opacity: 0; }
.fx-elabel {
  position: absolute; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 99px; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; color: var(--sage-deep); background: var(--white); border: 1px solid rgba(46, 106, 79, 0.25);
  opacity: 0; transition: opacity 0.3s;
}
.fx-elabel.alert { color: #9E4430; border-color: rgba(180, 83, 60, 0.3); }
.fx-elabel.on { opacity: 1; }

.fx-node { position: absolute; width: 76px; }
.fx-box {
  position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 14px;
  background: var(--white); border: 1.5px solid #C9D0DA; color: var(--ink-soft); box-shadow: 0 2px 6px rgba(21, 37, 61, 0.06);
  transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.fx-box > svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kind-trigger .fx-box { border-radius: 38px 14px 14px 38px; }
.kind-person .fx-box { border-style: dashed; }

.fx-box::before, .fx-box::after {
  content: ''; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--white); border: 1.5px solid #C9D0DA;
}
.fx-box::before { left: -5.5px; }
.fx-box::after { right: -5.5px; }
.kind-trigger .fx-box::before { display: none; }
.fx-label { position: absolute; top: 84px; left: 50%; width: 150px; transform: translateX(-50%); text-align: center; line-height: 1.3; }
.fx-label b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.fx-label small { display: block; font-size: 11px; color: var(--ink-soft); }
.fx-note {
  display: inline-block; margin-top: 6px; padding: 3px 7px; border-radius: 6px; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; color: #9E4430; background: rgba(180, 83, 60, 0.08);
  opacity: 0; transition: opacity 0.3s;
}
.fx-node.is-flag .fx-note, .fx-node.is-wait .fx-note, .fx-node.is-done .fx-note { opacity: 1; }
.fx-badge {
  position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  color: var(--white); opacity: 0; transform: scale(0.6); transition: opacity 0.25s, transform 0.25s;
}
.fx-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.is-running .fx-box { border-color: var(--blue); color: var(--blue-deep); box-shadow: 0 0 0 4px rgba(111, 143, 191, 0.22); }
.is-running .fx-badge { opacity: 1; transform: none; background: var(--white); border: 2px solid rgba(111, 143, 191, 0.3); border-top-color: var(--blue-deep); animation: fx-spin 0.8s linear infinite; }
.is-done .fx-box { border-color: var(--sage-deep); color: var(--sage-deep); }
.is-done .fx-badge { opacity: 1; transform: none; background: var(--sage-deep); }
.is-flag .fx-box { border-color: #B4533C; color: #9E4430; box-shadow: 0 0 0 4px rgba(180, 83, 60, 0.12); }
.is-flag .fx-badge { opacity: 1; transform: none; background: #B4533C; }
.is-wait .fx-box { border-color: var(--blue-deep); color: var(--blue-deep); animation: fx-pulse 1.4s ease-in-out infinite; }
.is-wait .fx-badge { opacity: 1; transform: none; background: var(--blue-deep); }
.is-wait .fx-label small { color: var(--blue-deep); font-weight: 600; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 82, 136, 0.25); } 50% { box-shadow: 0 0 0 7px rgba(47, 82, 136, 0); } }

.fx-status { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-soft); }
.fx-sum b { color: var(--ink); }
.fx-state { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); }
.fx-state i { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(111, 143, 191, 0.3); border-top-color: var(--blue-deep); animation: fx-spin 0.8s linear infinite; }
.fx-state.ok i { border: 0; background: var(--sage-deep); color: var(--white); animation: none; }
.fx-state.ok i svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .fx-btns { display: none; }
  .fx-stage .dash-note { top: auto; }
  
  .fx.fx-scrolls .fx-status::before { content: 'Swipe to follow the workflow \2192'; order: 3; width: 100%; color: var(--blue-deep); font-weight: 600; }
}
@media (prefers-reduced-motion: reduce) {
  .fx, .is-running .fx-badge, .is-wait .fx-box, .fx-state i { animation: none; }
}

.fx-carousel { position: relative; outline: none; }
.fx-carousel .fx[hidden] { display: none; }

.fx-carousel .fx:not(.fx-in-next):not(.fx-in-prev) { animation: tb-rise 1.2s cubic-bezier(0.2, 0.7, 0.1, 1) 0.25s both; }
.fx-carousel .fx.fx-in-next { animation: fx-in-next 0.5s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.fx-carousel .fx.fx-in-prev { animation: fx-in-prev 0.5s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
@keyframes fx-in-next { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes fx-in-prev { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

.fx-arrow {
  position: absolute; top: 50%; z-index: 4; display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px;
  border-radius: 50%; border: 1px solid var(--line-strong); background: var(--white); color: var(--charcoal); cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(21, 37, 61, 0.28); transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
}
.fx-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-arrow:hover { background: var(--charcoal); color: var(--white); transform: scale(1.06); }
.fx-arrow:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 3px; }
.fx-arrow.prev { left: -78px; }
.fx-arrow.next { right: -78px; }
@media (max-width: 1300px) {
  .fx-arrow.prev { left: -22px; }
  .fx-arrow.next { right: -22px; }
}

.fx-dots { position: absolute; left: 0; top: -27px; display: flex; gap: 8px; }
.fx-pip { width: 9px; height: 9px; padding: 0; border-radius: 99px; border: 0; background: rgba(21, 37, 61, 0.22); cursor: pointer; transition: width 0.3s var(--ease), background 0.3s; }
.fx-pip[aria-current="true"] { width: 26px; background: var(--charcoal); }
.fx-pip:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 3px; }
.fx-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
  .fx-arrow { width: 42px; height: 42px; margin-top: -21px; }
  .fx-arrow.prev { left: -12px; }
  .fx-arrow.next { right: -12px; }
  .fx-dots { top: -24px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-carousel .fx, .fx-carousel .fx.fx-in-next, .fx-carousel .fx.fx-in-prev { animation: none; }
}
