/* Workflow pipeline with its exceptions lane (includes/visuals/flowline.php) */
.fl { --fl-line: 44px; --fl-gap: 34px; --fl-exc-top: 36px; }
.fl-lane-t { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green-text); }
.fl-lane-t--exc { color: var(--ink-2); }

/* the main line: six stations on one thick line, labels above */
.fl-steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fl-steps::before { content: ""; position: absolute; left: calc(100% / 12); right: calc(100% / 12); bottom: calc(var(--fl-line) / 2 - 1.5px); height: 3px; border-radius: 2px; background: var(--forest); }
.fl-steps::after { content: ""; position: absolute; left: calc(100% / 12); width: calc(100% * 10 / 12); bottom: calc(var(--fl-line) / 2 - 8px); height: 16px;
  background: radial-gradient(circle at 8px 8px, var(--green) 4.5px, var(--forest) 5px 7.5px, transparent 8px) no-repeat; opacity: 0; pointer-events: none; }
.fl-step { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; padding: 0 8px calc(var(--fl-line) / 2 - 13px); min-width: 0; }
.fl-txt { display: block; margin-bottom: 12px; }
.fl-t { display: block; font-size: 15px; line-height: 1.25; color: var(--forest); }
.fl-d { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.fl-m { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; }
.fl-m--auto { background: var(--forest); color: var(--white); }
.fl-m--human { background: var(--white); color: var(--forest); border: 2.5px solid var(--forest); }
.fl-ico { width: 15px; height: 15px; }
/* direction chevrons between the stations */
.fl-step:not(:last-child)::after { content: ""; position: absolute; left: calc(100% - 5px); bottom: calc(var(--fl-line) / 2 - 5px); width: 9px; height: 9px; border-top: 2.5px solid var(--forest); border-right: 2.5px solid var(--forest); transform: rotate(45deg); }

/* exceptions lane: a dotted line, the cases hanging from the main line by a dashed drop */
.fl-exc { position: relative; margin-top: var(--fl-gap); }
.fl-exc::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; border-top: 2px dotted #7d8a80; }
.fl-lane-t--exc { position: relative; z-index: 1; display: inline-block; margin: 8px 0 0; padding-right: 12px; background: var(--white); }
.section--paper .fl-lane-t--exc { background: var(--paper); }
.fl-cases { list-style: none; margin: calc(var(--fl-exc-top) - 28px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.fl-case { position: relative; min-width: 0; padding: 14px 16px 15px; background: var(--paper); border-radius: var(--radius-sm); }
.section--paper .fl-case { background: var(--white); }
.fl-case--1 { grid-column: 2 / 4; --fl-x: 25%; }
.fl-case--2 { grid-column: 4 / 6; --fl-x: 50%; }
.fl-case::before { content: ""; position: absolute; left: calc(var(--fl-x) - 1px); bottom: 100%; height: calc(var(--fl-exc-top) + var(--fl-gap) + var(--fl-line) / 2); border-left: 2px dashed #7d8a80; }
.fl-case::after { content: ""; position: absolute; left: calc(var(--fl-x) - 6px); top: calc(-1 * var(--fl-exc-top) + 11px); width: 10px; height: 10px; transform: rotate(45deg); background: var(--white); border: 2px solid #7d8a80; }
.section--paper .fl-case::after { background: var(--paper); }
.fl-from { display: inline-block; margin-bottom: 8px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.section--paper .fl-from { background: var(--paper); }
.fl-case .fl-t { font-size: 15px; }
.fl-sub { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.fl-sub li { display: flex; align-items: flex-start; gap: 8px; }
.fl-sub .fl-m { width: 20px; height: 20px; margin-top: -1px; }
.fl-sub .fl-m--human { border-width: 2px; }
.fl-sub .fl-ico { width: 12px; height: 12px; }
.fl-legend .fl-m { width: 20px; height: 20px; }
.fl-legend .fl-m--human { border-width: 2px; }
.fl-legend .fl-ico { width: 12px; height: 12px; }

/* intro: the line draws, the stations appear from left to right, the exceptions last; then the packet loops */
.js .vz-figure .fl-steps::before { transform: scaleX(0); transform-origin: left; transition: transform 1.3s cubic-bezier(.2, .7, .2, 1) .1s; }
.js .vz-figure .fl-step { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
.js .vz-figure .fl-s1 { transition-delay: .1s; }
.js .vz-figure .fl-s2 { transition-delay: .3s; }
.js .vz-figure .fl-s3 { transition-delay: .5s; }
.js .vz-figure .fl-s4 { transition-delay: .7s; }
.js .vz-figure .fl-s5 { transition-delay: .9s; }
.js .vz-figure .fl-s6 { transition-delay: 1.1s; }
.js .vz-figure .fl-exc, .js .vz-figure .fl-legend { opacity: 0; transition: opacity .6s ease 1.5s; }
.js .vz-figure .fl-case { opacity: 0; transform: translateY(8px); transition: opacity .5s ease 1.7s, transform .5s cubic-bezier(.2, .7, .2, 1) 1.7s; }
.js .vz-figure .fl-case--2 { transition-delay: 1.9s; }
.js .vz-figure.is-visible .fl-steps::before { transform: none; }
.js .vz-figure.is-visible .fl-step, .js .vz-figure.is-visible .fl-case { opacity: 1; transform: none; }
.js .vz-figure.is-visible .fl-exc, .js .vz-figure.is-visible .fl-legend { opacity: 1; }
.js .vz-figure.is-visible .fl-steps::after { animation: fl-run 8s linear 2.3s infinite; }
.js .vz-figure.is-visible .fl-steps .fl-step--human .fl-m { animation: fl-wait 8s ease 2.3s infinite; }
@keyframes fl-run {
  0% { transform: translateX(0); opacity: 0; } 3% { opacity: 1; }
  66% { transform: translateX(calc(100% - 16px)); opacity: 1; } 74%, 100% { transform: translateX(calc(100% - 16px)); opacity: 0; }
}
@keyframes fl-wait {
  0%, 64% { box-shadow: 0 0 0 0 rgba(12, 43, 21, 0); }
  70% { box-shadow: 0 0 0 0 rgba(12, 43, 21, .35); }
  84% { box-shadow: 0 0 0 12px rgba(12, 43, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 43, 21, 0); }
}

/* phones: the line turns vertical, the cases stack under it */
@media (max-width: 699px) {
  .fl-steps { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .fl-steps::before { left: 18px; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
  .fl-steps::after { left: 11.5px; top: 14px; bottom: auto; width: 16px; height: calc(100% - 28px); }
  .fl-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; align-items: start; text-align: left; padding: 0; }
  .fl-step .fl-m { grid-column: 1; grid-row: 1; justify-self: center; margin-top: 1px; }
  .fl-txt { grid-column: 2; grid-row: 1; margin: 0; }
  .fl-step:not(:last-child)::after { left: 15px; top: calc(100% + 1px); bottom: auto; transform: rotate(135deg); }
  .fl-exc { margin-top: 28px; }
  .fl-cases { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .fl-case--1, .fl-case--2 { grid-column: 1; }
  .fl-case::before, .fl-case::after { display: none; }
  .js .vz-figure.is-visible .fl-steps::after { animation-name: fl-run-v; }
}
@keyframes fl-run-v {
  0% { transform: translateY(0); opacity: 0; } 3% { opacity: 1; }
  66% { transform: translateY(calc(100% - 16px)); opacity: 1; } 74%, 100% { transform: translateY(calc(100% - 16px)); opacity: 0; }
}
