/* Numbered tasks and phase nodes share one quiet, data-driven visual language. */
body.preview-ui .task-node-card {
  padding: 20px;
  border: 1px solid var(--pv-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--pv-surface) 66%, var(--pv-surface-2));
  box-shadow: 0 2px 8px #17191c03;
  min-width: 0;
}
body.preview-ui .task-node-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
}
body.preview-ui button.task-node {
  --task-node-color: var(--pv-muted);
  --task-track-color: var(--pv-line);
  display: grid;
  grid-template-columns: 23px 21px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 11px;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 13px 29px 13px 2px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--pv-ink-2);
  font: 400 13px/21px var(--sans);
  text-align: left;
  cursor: pointer;
}
body.preview-ui button.task-node:hover { background: var(--pv-surface-2); }
body.preview-ui button.task-node:focus-visible {
  outline: 2px solid var(--pv-accent);
  outline-offset: 2px;
  z-index: 1;
}
body.preview-ui button.task-node:disabled { cursor: default; opacity: .65; }
body.preview-ui button.task-node > span { min-width: 0; margin: 0; flex: none; }
body.preview-ui .task-node > .task-node-number {
  color: var(--pv-muted);
  font: 400 10px/21px var(--mono);
  font-variant-numeric: tabular-nums;
}
body.preview-ui .task-node > .task-node-status {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1.5px solid var(--pv-muted);
  border-radius: 50%;
  color: var(--task-node-color);
  background: transparent;
}
body.preview-ui .task-node-status svg { width: 15px; height: 15px; }
body.preview-ui .task-node[data-task-state=complete] { --task-node-color: var(--pv-ok); --task-track-color: var(--pv-ok); }
body.preview-ui .task-node[data-task-state=active] { --task-node-color: var(--pv-accent-ink); --task-track-color: var(--pv-accent); }
body.preview-ui .task-node[data-task-state=attention],
body.preview-ui .task-node[data-task-state=blocked] { --task-node-color: var(--pv-warn); }
body.preview-ui .task-node .task-node-status[data-task-state=complete] { color: #fff; border-color: var(--pv-ok); background: var(--pv-ok); }
html[data-theme=dark] body.preview-ui .task-node .task-node-status[data-task-state=complete] { color: var(--pv-bg); }
body.preview-ui .task-node .task-node-status[data-task-state=active] { color: var(--pv-accent-ink); border-color: var(--pv-accent); background: var(--pv-accent-tint); }
body.preview-ui .task-node .task-node-status[data-task-state=attention],
body.preview-ui .task-node .task-node-status[data-task-state=blocked] { color: var(--pv-warn); border-color: var(--pv-warn); background: var(--pv-warn-tint); }
body.preview-ui .task-node .task-node-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pv-ink-2);
  font-size: 13px;
  font-weight: 400;
  line-height: 21px;
}
body.preview-ui .task-node:hover .task-node-title { color: var(--pv-ink); }
body.preview-ui .task-node .task-node-detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
  color: var(--pv-muted);
  font-size: 12px;
  line-height: 1.5;
}
body.preview-ui .task-node-detail > span:last-child { min-width: 0; overflow-wrap: anywhere; }
body.preview-ui .task-node .task-node-elbow {
  flex: 0 0 6px;
  width: 6px;
  height: 9px;
  border-left: 1px solid var(--pv-muted);
  border-bottom: 1px solid var(--pv-muted);
  margin-top: 1px;
  opacity: .65;
}
body.preview-ui .task-node .task-node-state-label {
  display: block;
  color: var(--task-node-color);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 2px;
}
body.preview-ui .task-node > .task-node-end { display: flex; align-items: center; gap: 8px; min-height: 21px; color: var(--pv-muted); }
body.preview-ui .task-node .task-node-count { font: 400 11px/21px var(--mono); font-variant-numeric: tabular-nums; }
body.preview-ui .task-node .task-node-chevron { display: grid; place-items: center; width: 13px; height: 21px; }
body.preview-ui .task-node-chevron svg { width: 12px; height: 12px; stroke-width: 1.6; }
body.preview-ui .task-node > .task-node-track {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 7px;
  width: 1px;
  border-left: 1px dashed var(--task-track-color);
  pointer-events: none;
}
body.preview-ui .task-node-track:after {
  content: '';
  position: absolute;
  top: 21px;
  left: -3px;
  width: 5px;
  height: 5px;
  box-sizing: border-box;
  border: 1px solid var(--pv-muted);
  border-radius: 50%;
  background: var(--pv-surface);
}
body.preview-ui .task-node[data-task-state=complete] > .task-node-track,
body.preview-ui .task-node[data-task-state=active] > .task-node-track { border-left-style: solid; }
body.preview-ui .task-node[data-task-state=complete] > .task-node-track:after,
body.preview-ui .task-node[data-task-state=active] > .task-node-track:after { border-color: var(--task-track-color); background: var(--task-track-color); }
body.preview-ui .task-node[data-task-state=active] > .task-node-track:after { width: 7px; height: 7px; left: -4px; top: 20px; }
body.preview-ui .task-node-list > .task-node:first-child > .task-node-track { top: 13px; }
body.preview-ui .task-node-list > .task-node:first-child > .task-node-track:after { top: 8px; }
body.preview-ui .task-node-list > .task-node:first-child[data-task-state=active] > .task-node-track:after { top: 7px; }
body.preview-ui .task-node-list > .task-node:last-child > .task-node-track { bottom: 13px; }
body.preview-ui .task-node .task-node-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body.preview-ui .task-node-list--compact { margin: 0 0 10px; }
body.preview-ui .task-node-list--compact button.task-node { grid-template-columns: 17px 19px minmax(0, 1fr) auto; column-gap: 7px; padding-left: 0; padding-right: 21px; min-height: 49px; }
body.preview-ui .task-node-list--compact .task-node-status { width: 19px; height: 19px; margin-top: 1px; }
body.preview-ui .task-node-list--compact .task-node-title { font-size: 12px; }
body.preview-ui .task-node-list--compact .task-node-detail { font-size: 11px; gap: 6px; }
body.preview-ui .task-node-list--compact .task-node-end { gap: 5px; }
body.preview-ui .task-node-list--compact .task-node-track { right: 3px; }
@media(max-width:480px) {
  body.preview-ui .task-node-card { padding: 16px 12px; border-radius: 14px; }
  body.preview-ui button.task-node { grid-template-columns: 18px 20px minmax(0, 1fr) auto; column-gap: 8px; padding-right: 24px; }
  body.preview-ui .task-node .task-node-title { font-size: 12px; }
  body.preview-ui .task-node .task-node-detail { font-size: 11px; }
}
