/* count-flow: <!-- EMBED:count-flow --> (partials/count-flow.html). Uses flow.css for
   the frame, switch and status timeline. Every step is a visible event:
   Without (0-45 %): racks locked, picker paused, the counter checks every location
   (a green check per bay), then three differences appear at once.
   With (48-95 %): the picker takes a carton, the location gets a counting-work ring,
   the counter checks only that one (green check, closed automatically); a second pick
   leads to a count with a difference (clay badge, waits for review). Base = end frame. */
.ct-bays rect { fill: url(#ct-stock); stroke: #E2DCD3; stroke-width: 1; }
.ct-lock { fill: #847C6E; fill-opacity: .35; opacity: 0; }
.ct-carton { fill: #E89B43; stroke: #91521E; stroke-width: 1.5; opacity: 0; }
.ct-ring { fill: none; stroke: #0E6376; stroke-width: 3; stroke-dasharray: 6 4; opacity: 0; }
.ct-tk, .ct-bulk, .ct-pause { opacity: 0; }
.ct-picker { fill: #0C4A5A; stroke: #FFFFFF; stroke-width: 2.5; transform: translate(300px, 108px); }
.ct-counter { fill: #2A8C60; stroke: #FFFFFF; stroke-width: 2.5; transform: translate(40px, 142px); }
.ct-k--picker { width: 12px; height: 12px; border-radius: 50%; background: #0C4A5A; }
.ct-k--counter { width: 12px; height: 12px; border-radius: 50%; background: #2A8C60; }
.ct-k--work { background: transparent; border: 2.5px dashed #0E6376; }
.ct-k--ok { width: 13px; height: 13px; border-radius: 50%; background: #FFFFFF; border: 2.5px solid #2A8C60; }
.ct-k--review { width: 13px; height: 13px; border-radius: 50%; background: #B14E2E; }

@media (prefers-reduced-motion: no-preference) {
  .ct-lock, .ct-carton, .ct-ring, .ct-tk, .ct-bulk, .ct-ok1, .ct-rev2, .ct-pause, .ct-picker, .ct-counter { animation: 10s ease-in-out infinite; }
  .ct-lock { animation-name: ct-lock; } .ct-pause { animation-name: ct-pause; } .ct-bulk { animation-name: ct-bulk; }
  .ct-picker { animation-name: ct-picker; } .ct-counter { animation-name: ct-counter; }
  .ct-c1 { animation-name: ct-c1; } .ct-c2 { animation-name: ct-c2; } .ct-r1 { animation-name: ct-r1; } .ct-r2 { animation-name: ct-r2; }
  .ct-ok1 { animation-name: ct-ok1; } .ct-rev2 { animation-name: ct-rev2; }
  .ct-tk-t0 { animation-name: ct-tk-t0; } .ct-tk-t1 { animation-name: ct-tk-t1; } .ct-tk-t2 { animation-name: ct-tk-t2; } .ct-tk-t3 { animation-name: ct-tk-t3; } .ct-tk-t4 { animation-name: ct-tk-t4; } .ct-tk-t5 { animation-name: ct-tk-t5; } .ct-tk-b0 { animation-name: ct-tk-b0; } .ct-tk-b1 { animation-name: ct-tk-b1; } .ct-tk-b2 { animation-name: ct-tk-b2; } .ct-tk-b3 { animation-name: ct-tk-b3; } .ct-tk-b4 { animation-name: ct-tk-b4; } .ct-tk-b5 { animation-name: ct-tk-b5; }
}
/* Without: full count */
@keyframes ct-lock { 0%, 1% { opacity: 0 } 3%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-pause { 0%, 1% { opacity: 0 } 3%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-t0 { 0%, 6.1% { opacity: 0 } 6.7%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-t1 { 0%, 8.5% { opacity: 0 } 9.1%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-t2 { 0%, 10.8% { opacity: 0 } 11.4%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-t3 { 0%, 13.2% { opacity: 0 } 13.8%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-t4 { 0%, 15.5% { opacity: 0 } 16.1%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-t5 { 0%, 17.9% { opacity: 0 } 18.5%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-b0 { 0%, 30.4% { opacity: 0 } 31.0%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-b1 { 0%, 28.7% { opacity: 0 } 29.3%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-b2 { 0%, 26.9% { opacity: 0 } 27.5%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-b3 { 0%, 25.1% { opacity: 0 } 25.7%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-b4 { 0%, 23.3% { opacity: 0 } 23.9%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-tk-b5 { 0%, 21.6% { opacity: 0 } 22.2%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
@keyframes ct-bulk { 0%, 33.5% { opacity: 0 } 34.5%, 44% { opacity: 1 } 46%, 100% { opacity: 0 } }
/* Picker: parked during the full count; picks and keeps moving during cycle counting */
@keyframes ct-picker { 0%, 48% { transform: translate(40px, 108px) } 52%, 54% { transform: translate(202px, 108px) } 62%, 66% { transform: translate(370px, 108px) } 80% { transform: translate(40px, 108px) } 92%, 95% { transform: translate(300px, 108px) } 100% { transform: translate(40px, 108px) } }
/* Counter: every location (without); only the two triggered ones (with) */
@keyframes ct-counter { 0%, 4% { transform: translate(40px, 142px) } 20% { transform: translate(420px, 142px) } 32%, 56% { transform: translate(40px, 142px) } 61%, 64% { transform: translate(202px, 142px) } 72%, 78% { transform: translate(370px, 142px) } 90%, 100% { transform: translate(40px, 142px) } }
/* Picks: the carton moves from the shelf to the picker, then the location gets counting work */
@keyframes ct-c1 { 0%, 47% { transform: none; opacity: 0 } 48%, 52% { transform: none; opacity: 1 } 54% { transform: translate(0, 49px); opacity: 1 } 55%, 100% { transform: translate(0, 49px); opacity: 0 } }
@keyframes ct-c2 { 0%, 47% { transform: none; opacity: 0 } 48%, 64% { transform: none; opacity: 1 } 66% { transform: translate(0, -83px); opacity: 1 } 67%, 100% { transform: translate(0, -83px); opacity: 0 } }
@keyframes ct-r1 { 0%, 54.5% { opacity: 0 } 55.5%, 63.5% { opacity: 1 } 64.5%, 100% { opacity: 0 } }
@keyframes ct-r2 { 0%, 66.5% { opacity: 0 } 67.5%, 77.5% { opacity: 1 } 78.5%, 100% { opacity: 0 } }
@keyframes ct-ok1 { 0%, 64% { opacity: 0 } 65%, 95% { opacity: 1 } 97%, 100% { opacity: 0 } }
@keyframes ct-rev2 { 0%, 78% { opacity: 0 } 79%, 95% { opacity: 1 } 97%, 100% { opacity: 0 } }
