.flow-trigger {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 15px;
  padding: 13px 22px;
  color: #5a6872;
  font-size: 0.78rem;
  line-height: 1.45;
  background: #fff8e9;
  border-top: 1px solid #eadfc7;
  border-bottom: 1px solid #eadfc7;
}

.flow-trigger b {
  color: #8a651f;
}

.coordinator-banner {
  margin: 18px 22px 0;
}

.phase-list {
  padding: 18px 22px 24px;
}

.phase-group {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 18px;
}

.phase-group + .phase-group {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dce4e8;
}

.phase-label {
  color: var(--flow-blue);
}

.phase-label b,
.phase-label span {
  display: block;
}

.phase-label span {
  margin-top: 4px;
  color: #788995;
  font-size: 0.68rem;
}

.step-chain {
  display: grid;
  gap: 10px;
}

.flow-step {
  position: relative;
  display: grid;
  min-height: 0;
  padding: 14px 15px 14px 18px;
  background: white;
  border: 1px solid #dbe3e8;
  border-left: 4px solid #7b95a8;
}

.flow-step.mode-agent {
  border-left-color: #208565;
}

.flow-step.mode-hybrid {
  border-left-color: #b3842f;
}

.flow-step:not(:last-child)::after {
  position: absolute;
  bottom: -11px;
  left: 28px;
  height: 10px;
  content: '';
  border-left: 1px solid #a9b9c2;
}

.step-top {
  justify-content: flex-start;
}

.step-top > span {
  color: var(--flow-gold);
  font-family: var(--font-display, Georgia, serif);
  font-weight: 800;
}

.step-top > b {
  color: #6f818e;
  font-size: 0.63rem;
  letter-spacing: 0.05em;
}

.flow-step h5 {
  margin: 8px 0 10px;
  color: #173f62;
  font-size: 0.92rem;
  line-height: 1.35;
}

.flow-step dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
}

.flow-step dl div {
  min-width: 135px;
}

.flow-step dt {
  color: #7b8b96;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.flow-step dd {
  margin: 2px 0 0;
  color: #334e61;
  font-size: 0.72rem;
}

.step-agent {
  justify-self: end;
  margin-top: 10px;
  padding: 6px 9px;
  background: #f0f5f3;
  border: 1px solid #d4e4de;
}

.step-agent > span,
.agent-initials {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  background: #1f735d;
  border-radius: 50%;
}

.step-agent b,
.step-agent small {
  display: block;
}

.step-agent b {
  color: #195944;
  font-size: 0.72rem;
}

.step-agent small {
  color: #60796e;
  font-size: 0.62rem;
}

.step-agent.planned {
  background: #f5f1e8;
  border-color: #e3d6bb;
}

.step-agent.planned > span {
  background: #9a7733;
}

.flow-legend {
  flex-wrap: wrap;
  padding: 14px 22px;
  color: #667985;
  font-size: 0.66rem;
  background: white;
  border-top: 1px solid var(--flow-line);
}

.flow-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  background: #7b95a8;
}

.flow-legend i.agent {
  background: #208565;
}

.flow-legend i.hybrid,
.flow-legend i.gate {
  background: #b3842f;
}
