/* Task position and status share one state, so the labels follow the motion. */
.project-lanes { padding-bottom: 16px; }
.lane { height: 124px; --packet-width: min(174px, 55%); --lane-progress: .333333; }
.lane[data-stage="0"] { --lane-progress: 0; }
.lane[data-stage="1"] { --lane-progress: .333333; }
.lane[data-stage="2"] { --lane-progress: .666667; }
.lane[data-stage="3"] { --lane-progress: 1; }
.lane-held { --lane: #edcc8a; }
.project-name { padding-right: 14px; }
.project-name .runner-assignment { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: #c4ceb9; font-size: 11px; }
.runner-assignment svg { width: 13px; height: 13px; }
.lane-track { display: block; height: 100%; }
.lane-track::before { top: 50%; left: calc(var(--packet-width) / 2); right: calc(var(--packet-width) / 2); }
.lane-track .track-dot { position: absolute; top: calc(50% - 3px); margin-left: -3px; left: calc(var(--packet-width) / 2); }
.lane-track .track-dot:nth-child(2) { left: calc(var(--packet-width) / 2 + (100% - var(--packet-width)) / 3); }
.lane-track .track-dot:nth-child(3) { left: calc(var(--packet-width) / 2 + (100% - var(--packet-width)) * 2 / 3); }
.lane-track .track-dot:nth-child(4) { left: calc(100% - var(--packet-width) / 2); }
.lane .task-packet { left: calc((100% - var(--packet-width)) * var(--lane-progress)); top: 50%; transform: translateY(-50%); width: var(--packet-width); min-width: 0; display: block; padding: 10px 12px; animation: none; transition: left 1s cubic-bezier(.4,0,.2,1), background .3s; }
.packet-title { display: flex; align-items: center; gap: 7px; }
.packet-title strong { font-size: 13px; font-weight: 500; }
.packet-title svg { width: 15px; height: 15px; }
.packet-status { display: block; margin-top: 6px; font-size: 11px; color: #c4d9ad; }
.lane-blue .packet-status { color: #c6e1ef; }
.lane-held .task-packet { background: #443b28; border-style: dashed; }
.lane-held .packet-status { color: #edcc8a; }
.runner-released { position: absolute; bottom: 7px; left: 0; width: 100%; text-align: right; color: #aebda0; font-size: 10px; }
.lane[data-stage="3"] .task-packet { background: #3c4931; }
.parallel-caption { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #46513a; padding-top: 16px; color: #d1ddc4; font-size: 13px; }
.parallel-caption .live-dot { background: var(--lime); }
.diagram-motion-toggle { display: none; flex-shrink: 0; align-items: center; gap: 9px; border: 1px solid #657356; border-radius: 5px; padding: 8px 10px; background: transparent; color: #c4d0b8; font-size: 11px; }
.motion-ready .diagram-motion-toggle { display: inline-flex; }
.outcome-art { margin: 24px 0 0; padding: 19px; background: #e0e8d4; border: 1px solid #d2dcc2; border-radius: 9px; }
.outcome-inputs { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: center; gap: 8px; }
.outcome-input { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 7px; background: #f5f8ed; border: 1px solid #c8d4b5; border-radius: 7px; color: #465934; }
.outcome-input > svg { width: 25px; height: 25px; }
.outcome-input > span { font-size: 12px; line-height: 1.4; }
.input-plus { color: #6d8155; font-size: 20px; text-align: center; }
.outcome-route { display: flex; flex-direction: column; align-items: center; }
.outcome-route > span:not(.outcome-autop) { width: 1px; height: 13px; background: #92aa70; }
.outcome-autop { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; background: #34452a; color: #dcf3bd; padding: 5px 10px; font: 10px var(--mono); letter-spacing: 1px; }
.outcome-autop svg { width: 21px; height: 21px; stroke: none; }
.completed-tasks { display: grid; gap: 7px; }
.completed-task { display: flex; align-items: center; gap: 9px; background: #f5f8ee; border: 1px solid #ccd9ba; padding: 9px 11px; border-radius: 5px; color: #374a28; font-size: 12px; }
.completed-check { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #dbeac6; color: #527733; }
.completed-check svg { width: 14px; height: 14px; }
.completion-state { margin-left: auto; color: #67804d; font-size: 11px; }
.motion-ready .completed-check { animation: completed-task-pulse 7s ease-in-out infinite; }
.completed-task:nth-child(2) .completed-check { animation-delay: 1.3s; }
.completed-task:nth-child(3) .completed-check { animation-delay: 2.6s; }
.outcome-art figcaption { text-align: center; margin-top: 13px; color: #5b7143; font-size: 12px; }
.outcome-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; font-size: 10px; color: #6e7c5e; }
.outcome-foot .diagram-motion-toggle { color: #536b3d; border-color: #bac9a6; font-size: 10px; padding: 6px 8px; }
@keyframes completed-task-pulse { 0%,40%,100% { transform: scale(1); background: #dbeac6; } 18% { transform: scale(1.14); background: #c5e897; } }
@media(max-width:1100px) {
 .project-name .runner-assignment { font-size: 10px; }
 .outcome-art { padding: 15px; }
 .outcome-input { gap: 7px; }
 .outcome-input > span { font-size: 11px; }
}
@media(max-width:800px) {
 .project-name .runner-assignment { font-size: 9px; }
 .lane { --packet-width: min(156px, 59%); }
 .lane .task-packet { padding: 9px; }
 .packet-title { gap: 5px; }
 .packet-title strong { font-size: 12px; }
 .packet-status { font-size: 10px; }
 .parallel-caption { font-size: 11px; }
 .outcome-inputs { gap: 5px; grid-template-columns: 1fr 16px 1fr; }
 .outcome-input { flex-direction: column; gap: 5px; text-align: center; }
 .outcome-input > span { font-size: 11px; }
 .outcome-foot { align-items: start; }
}
@media(max-width:600px) {
 .lane { height: 185px; --packet-width: min(166px, 68%); padding-top: 17px; }
 .project-name { padding-right: 0; }
 .project-name strong { font-size: 14px; }
 .project-name .runner-assignment { font-size: 11px; margin-top: 7px; }
 .lane-track { height: 105px; }
 .runner-released { bottom: 0; font-size: 10px; }
 .packet-title strong { font-size: 12px; }
 .packet-status { font-size: 11px; }
 .parallel-caption { align-items: start; flex-direction: column; gap: 11px; font-size: 12px; line-height: 1.5; }
 .outcome-art { margin-top: 23px; padding: 16px; }
 .outcome-input { flex-direction: row; text-align: left; gap: 8px; padding: 11px 5px; }
 .outcome-input > svg { width: 22px; height: 22px; }
 .outcome-input > span { font-size: 11px; }
 .outcome-foot { align-items: center; }
 .diagram-motion-toggle { min-height: 40px; }
 .outcome-foot .diagram-motion-toggle { min-height: 36px; }
}
@media(prefers-reduced-motion:reduce) {
 .lane .task-packet { transition: none; }
 .motion-ready .completed-check { animation: none; }
}
.lane.lane-reset .task-packet { transition: none; }
@media(max-width:380px) {
 .outcome-input { flex-direction: column; text-align: center; }
 .outcome-foot { flex-wrap: wrap; }
}
/* Stagger the first entrance; later loops leave, relocate hidden, and enter. */
.lane.ticket-enter .task-packet { animation: ticket-enter 650ms cubic-bezier(.22,1,.36,1) both; animation-delay: 0ms; }
.lane-held.ticket-enter .task-packet { animation-delay: 120ms; }
.lane-blue.ticket-enter:not(.lane-reset) .task-packet { animation-delay: 240ms; }
.lane.ticket-exit .task-packet { animation: ticket-exit 350ms ease-in both; animation-delay: 0ms; }
@keyframes ticket-enter {
 from { opacity: 0; transform: translateY(calc(-50% + 12px)) scale(.96); }
 to { opacity: 1; transform: translateY(-50%) scale(1); }
}
@keyframes ticket-exit {
 from { opacity: 1; transform: translateY(-50%) scale(1); }
 to { opacity: 0; transform: translateY(calc(-50% - 8px)) scale(.98); }
}
@media(prefers-reduced-motion:reduce) {
 .lane.ticket-enter .task-packet, .lane.ticket-exit .task-packet { animation: none; opacity: 1; }
}
