/* Version B, "Timeline". Lane labels are a fixed-width column with a two-line
   status that is clipped, so the plot never changes size while text changes. */
.tl-board { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 14px; }
.tl-labels { display: flex; flex-direction: column; padding-top: 0; }
.tl-label, .tl-row { height: 58px; flex: none; }
.tl-label { display: flex; flex-direction: column; justify-content: center; padding-right: 4px; border-bottom: 1px solid var(--color-divider); }
.tl-label b { font: 600 17px/1.1 var(--font-heading); color: var(--color-neutral-100); }
.lane-status { font-size: 13.5px; line-height: 1.25; height: 2.5em; color: var(--color-neutral-500); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .25s; }
.lane-status.run, .lane-status.wait { color: var(--color-accent); font-weight: 600; }
.lane-status.ok { color: var(--color-neutral-300); }
.lane-status.bad { color: var(--warn); font-weight: 600; }
.tl-label.pop b { animation: pop .5s ease; }
.tl-label.lane-own, .tl-row.lane-own { height: 64px; border-bottom: 0; }
.tl-label.lane-own b { color: var(--color-neutral-500); }

.tl-plot { position: relative; padding-bottom: 42px; overflow-x: clip; overflow-clip-margin: 8px; }
.tl-row { position: relative; border-bottom: 1px solid var(--color-divider); }
.tl-row .track { position: absolute; left: 0; right: 0; top: 50%; height: 18px; transform: translateY(-50%); }
.tl-row.lane-apps .track { height: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.tl-row.lane-apps .sub { position: relative; height: 6px; }
.tl-row.lane-apps .track > .bar { top: -6px; bottom: -6px; opacity: .22; }

.bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--color-accent-800); border: 1.5px solid var(--color-accent-700);
  transition: background .3s, border-color .3s; }
.sub .bar { border-radius: 2px; border-width: 0; }
.bar.active, .bar.run { background: var(--color-accent-800); border-color: var(--color-accent); }
.bar.active::after, .bar.run::after { content: ""; position: absolute; right: -1px; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--color-accent); animation: blink .8s ease-in-out infinite; }
.bar.closed::after { content: none; }
.bar.wait { background: repeating-linear-gradient(135deg, var(--color-accent-900) 0 6px, var(--color-accent-800) 6px 12px); border-color: var(--color-accent); border-style: dashed; }
.bar.done { background: var(--color-neutral-600); border-color: var(--color-neutral-600); }
.bar.blocked { background: repeating-linear-gradient(135deg, var(--warn-tint) 0 5px, transparent 5px 10px); border-color: var(--warn); }
.sub .bar.blocked { background: var(--warn); }
.bar.warn { background: var(--warn); border-color: var(--warn); }
.bar.skipped { background: transparent; border-style: dotted; }
.bar.halt { outline: 2px solid var(--warn); outline-offset: 2px; }
.bar.hl { box-shadow: 0 0 0 3px var(--color-accent-700); }

.mark { position: absolute; left: 0; top: -6px; bottom: -6px; width: 0; }
.mark.hand { border-left: 2px solid var(--color-accent); }
.mark.hand.warn { border-color: var(--warn); }
.mark.retry { top: auto; bottom: -9px; }
.mark.retry::before { content: ""; position: absolute; left: -4px; width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--warn); background: var(--color-bg); }
.mark.gap { position: absolute; top: 0; bottom: 42px; width: 10px; margin-left: -5px; z-index: 1;
  background: linear-gradient(90deg, transparent 3px, var(--color-bg) 3px 7px, transparent 7px); }
.mark.gap::before, .mark.gap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--color-neutral-700); }
.mark.gap::before { left: 2px; } .mark.gap::after { left: 7px; }

.link { position: absolute; left: 0; width: 0; margin-left: -1px; z-index: 2; }
.link::before { content: ""; position: absolute; left: 0; width: 2px; top: calc(var(--from, 0) * 100%); height: calc(var(--grow, 1) * 100%); background: var(--color-accent); }
.link.bad::before { background: var(--warn); }
.link.info::before { background: var(--info); }
.link.warn::before { background: var(--warn); }
.link.rest::before { opacity: .55; }
.link .dot { position: absolute; left: 1px; top: 0; transform: translate(-50%, -6px); min-width: 12px; height: 12px; border-radius: 6px;
  background: var(--color-accent); font-size: 0; }
.link.bad .dot { background: var(--warn); } .link.info .dot { background: var(--info); }
.tl-flag { position: absolute; bottom: -27px; left: -1px; padding: 3px 8px; border-radius: 0 6px 6px 0; white-space: nowrap;
  font: 600 12.5px/1.2 var(--font-body); color: var(--color-bg); background: var(--warn); animation: flag-in .3s ease both; }
.tl-flag.info { background: var(--info); }
.link.flip .tl-flag { left: auto; right: -1px; border-radius: 6px 0 0 6px; }
.link.flip .tl-flag::before { left: auto; right: 0; }
.tl-flag::before { content: ""; position: absolute; left: 0; top: -6px; width: 2px; height: 6px; background: inherit; }

.tl-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 38px; border-top: 1px solid var(--color-neutral-700); }
.tl-tick.low { top: 20px; }
.tl-tick > span { display: inline-block; }
.tl-tick { position: absolute; left: 0; top: 3px; width: 0; line-height: 1.2; text-indent: 0; font-size: 12.5px; font-weight: 600; color: var(--color-neutral-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
.playhead { position: absolute; top: -6px; bottom: 38px; left: 0; width: 0; border-left: 2px solid var(--color-neutral-300); z-index: 3; pointer-events: none; }
.playhead::before { content: ""; position: absolute; top: -4px; left: -6px; border: 5px solid transparent; border-top: 7px solid var(--color-neutral-300); }
.finished .playhead { border-color: var(--color-accent); }
.finished .playhead::before { border-top-color: var(--color-accent); }

@media (max-width: 700px) {
  .tl-board { grid-template-columns: 104px minmax(0, 1fr); column-gap: 8px; }
  .tl-label, .tl-row { height: 66px; }
  .tl-label b { font-size: 15px; }
  .lane-status { font-size: 12px; height: 3.75em; -webkit-line-clamp: 3; }
  .tl-row.lane-apps .track { height: 44px; }
  .tl-flag { font-size: 11px; padding: 2px 5px; }
}
@keyframes pop { 40% { color: var(--color-accent); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes halt { 20% { transform: translateX(-3px); } 45% { transform: translateX(3px); } 70% { transform: translateX(-2px); } 100% { transform: none; } }
@keyframes flag-in { from { opacity: 0; transform: translateY(-4px); } }
