.node .br {
  display: none;
  margin: -2px 0 8px;
  font-size: 12px;
  color: var(--navy);
}
.pick {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pick button {
  font: 500 14.5px var(--sans);
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.pick button:hover {
  border-color: var(--navy);
  color: var(--ink);
}
.pick button[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.stage-sc {
  display: grid;
  margin-top: 20px;
  padding: 28px;
}
.scen {
  grid-area: 1 / 1;
  align-self: center;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s,
    visibility 0s 0.4s;
}
.scen.on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s 0.15s;
}
.sc-top {
  grid-area: 1 / 1 / 2 / 3;
  align-self: start;
  display: grid;
  gap: 10px;
  padding-right: 8px;
}
.sc-h {
  color: var(--body);
  font-size: 15px;
  line-height: 1.55;
}
.item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--body);
  min-height: 24px;
}
.item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy);
  flex: none;
}
.item b {
  font-weight: 600;
  color: var(--ink);
}
.graph {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto;
  column-gap: 44px;
  row-gap: 18px;
  align-items: center;
}
.graph > .node {
  grid-area: var(--area);
}
.graph > .node,
.graph > svg.edges,
.item {
  transition: opacity 0.3s;
}
.graph.out > .node,
.graph.out > svg.edges,
.graph.out .item {
  opacity: 0.25;
}
.graph svg.edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.edges path {
  fill: none;
  stroke-width: 1.5;
}
.edges path.base {
  stroke: var(--wire);
  stroke-dasharray: 4 4;
}
.edges path.lit {
  stroke: var(--navy);
  stroke-width: 2;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  opacity: 0;
}
.edges path.lit.go {
  opacity: 1;
  transition: stroke-dashoffset 0.55s linear;
  stroke-dashoffset: 0;
}
.edges .lbl text {
  font: 500 11px var(--sans);
  fill: var(--muted);
  text-anchor: middle;
  dominant-baseline: middle;
}
.edges .lbl rect {
  fill: var(--bg);
}
.edges .lbl.on text {
  fill: var(--navy);
}
.node {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  opacity: 0.6;
  transition:
    border-color 0.3s,
    box-shadow 0.3s,
    opacity 0.3s;
}
.node.active {
  opacity: 1;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.12);
}
.node.done {
  opacity: 1;
}
.graph > .node.skip {
  opacity: 0.4;
}
.node > b {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}
.det {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.det > div {
  min-height: 0;
  overflow: hidden;
  padding-top: 8px;
  transition: padding-top 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.node .when {
  font: 11px var(--mono);
  color: var(--muted);
  margin: -4px 0 8px;
}
.node .by {
  font-size: 12.5px;
  color: var(--body);
  margin-bottom: 8px;
}
.kv {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 8px;
  font: 11px/1.9 var(--mono);
  color: var(--body);
  border-top: 1px dashed #e5e8ec;
}
.kv span:last-child {
  margin-left: auto;
  text-align: right;
  overflow-wrap: anywhere;
}
.kv.flag span:last-child {
  color: var(--review);
}
.kv.good span:last-child {
  color: var(--ok);
}
.rv-in {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.rv-in.on {
  opacity: 1;
  transform: none;
}
.file {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12px var(--mono);
  color: var(--ink);
  padding: 6px 8px;
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.file::before {
  content: "";
  width: 12px;
  height: 15px;
  border: 1.5px solid var(--muted);
  border-radius: 2px;
  flex: none;
}
.msg {
  font-size: 12.5px;
  line-height: 1.45;
  padding: 8px 10px;
  background: var(--tint);
  border-radius: 8px 8px 8px 2px;
  color: var(--ink);
}
.msg + .msg {
  margin-top: 6px;
  background: var(--bg);
  border-radius: 8px 8px 2px 8px;
}
.ok-line {
  font: 12px var(--mono);
  color: var(--ok);
}
.sum {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
}
.review {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.review span {
  font: 500 12.5px var(--sans);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.15s;
}
.review span.pressed {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  transform: scale(0.96);
}
.review span.pressed.no {
  background: #fff;
  color: var(--review);
  border-color: var(--review);
}
.wf-foot {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--body);
}
.wf-foot b {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .graph {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }
  .graph .node,
  .graph .sc-top {
    grid-area: auto;
  }
  .sc-top {
    padding: 0 0 12px;
    max-width: 44em;
  }
  .graph .node {
    padding: 10px 12px 10px 38px;
  }
  .graph .node::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--wire);
    background: var(--surface);
    transition:
      background 0.3s,
      border-color 0.3s,
      box-shadow 0.3s;
  }
  .graph .node.active::before {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.15);
  }
  .graph .node.done::before {
    background: var(--navy);
    border-color: var(--navy);
  }
  .graph .node.skip::before {
    border-style: dashed;
  }
  .graph .det {
    grid-template-rows: 0fr;
  }
  .graph .node.open .det {
    grid-template-rows: 1fr;
  }
  .graph .node:not(.open) .det > div {
    padding-top: 0;
  }
  .graph svg.edges {
    display: none;
  }
  .node .br {
    display: block;
  }
}
@media (min-width: 700px) and (max-width: 1100px) {
  .graph {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    column-gap: 32px;
    align-items: start;
    align-content: start;
  }
  .graph .node {
    grid-column: 2;
  }
  .graph .sc-top {
    grid-area: 1 / 1 / span 8 / 2;
    padding: 0;
  }
}
@media (max-width: 560px) {
  .stage-sc {
    padding: 18px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scen,
  .edges path.lit.go,
  .rv-in,
  .det,
  .graph > .node,
  .item {
    transition: none;
  }
}
