/* Dependencies view (#306, js/deps.js): the board's lanes as horizontal bands, cards placed by
   deps_layout.js (absolute, px), connectors in one SVG under the cards. The scroller pans both ways. */
.deps-view {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
}
.deps-view.highlighting .deps-edge:not(.hl) { opacity: 0.25; }

.deps-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  flex: none;
  min-height: 26px;
  font-size: 12px;
  color: var(--muted);
}
.deps-hide-done { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.deps-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.deps-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.deps-legend-item::before { content: ""; width: 22px; border-top: 2px solid var(--muted); }

.deps-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: grab;
}
.deps-scroll.panning { cursor: grabbing; user-select: none; }
.deps-canvas { position: relative; min-width: 100%; }

/* one band per lane, coloured like the board's lanes (#279, board.css) */
.deps-lane, .deps-card { --lane-color: var(--muted); }
.deps-lane.lane-in_progress, .deps-card.lane-in_progress { --lane-color: var(--accent); }
.deps-lane.lane-in_review, .deps-card.lane-in_review { --lane-color: #c084fc; }
.deps-lane.lane-blocked, .deps-card.lane-blocked,
.deps-lane.lane-human_action, .deps-card.lane-human_action { --lane-color: var(--warn); }
.deps-lane.lane-done, .deps-card.lane-done { --lane-color: var(--ok); }
.deps-lane {
  position: absolute;
  box-sizing: border-box;
  left: 0;
  right: 0;
  border-top: 2px solid var(--lane-color);
  background: color-mix(in srgb, var(--lane-color) 5%, transparent);
}
.deps-lane:nth-child(even) { background: color-mix(in srgb, var(--lane-color) 8%, transparent); }
/* the label stays at the left edge while the lanes scroll sideways */
.deps-lane-head {
  position: sticky;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lane-color);
  white-space: nowrap;
}
.deps-lane-count {
  font-weight: 600;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--lane-color) 55%, var(--border));
  background: color-mix(in srgb, var(--lane-color) 12%, var(--panel-2));
}

.deps-edges { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.deps-edge { fill: none; stroke: var(--muted-2); stroke-width: 1.6; transition: opacity 0.12s, stroke 0.12s; }
.deps-edge-plain { stroke-dasharray: 5 4; stroke-width: 1.2; }
.deps-edge-broken { stroke: var(--danger); stroke-dasharray: 2 3; }
.deps-edge.hl { stroke: var(--accent); stroke-width: 2.6; opacity: 1; }
.deps-arrow-head { fill: var(--muted-2); }

.deps-card {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 8px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--lane-color) 45%, var(--border));
  border-radius: var(--radius);
  cursor: pointer;
}
.deps-card.kind-story { border-left: 3px solid var(--kind-story); }
.deps-card.kind-task { border-left: 3px solid var(--kind-task); }
/* being worked on (one of its own agents is spawning/working, any lane, #585): a solid border in the lane colour,
   a soft outer glow in it that fades slowly up and down (#627, base.css alive-fade), and the 'alive' ECG icon
   upper right (#618, js/activity_pulse.js) - the card itself does not beat. The icon sits in the top row's band
   (the row keeps clear of it), above the title; a highlight or a cycle mark below takes the border's and the
   glow's place */
.deps-card.is-active {
  border-color: var(--lane-color);
  animation: alive-fade 1.6s ease-in-out infinite;
  box-shadow: 0 0 calc(4px + 8px * var(--alive)) calc(1px * var(--alive))
    color-mix(in srgb, var(--lane-color) calc(25% + 30% * var(--alive)), transparent);
}
.deps-card.is-active .deps-card-top { padding-right: 36px; }
.deps-card .ecg-icon { position: absolute; top: 2px; right: 5px; }
.deps-card:hover, .deps-card.related { border-color: var(--muted-2); }
.deps-card.hl, .deps-card:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); outline: none; }
.deps-card.cyclic { box-shadow: inset 0 0 0 1px var(--danger); }
.deps-card-top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); min-width: 0; }
.deps-card-top .chip { padding: 0 6px; line-height: 15px; }
.deps-cycle { color: var(--danger); border-color: var(--danger); }
.deps-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.deps-card-waits { font-size: 10.5px; line-height: 13px; color: var(--warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the story filter (the board's select) and the zoom controls sit in the toolbar; the canvas scales inside a
   sizer that takes the scaled size, so the scroller scrolls over what is seen */
.deps-zoom { display: inline-flex; gap: 4px; }
.deps-zoom-btn.active { border-color: var(--accent); color: var(--accent); }
.deps-sizer { position: relative; min-width: 100%; overflow: hidden; }
.deps-sizer > .deps-canvas { transform-origin: 0 0; }
