.agent-directory {
  position: sticky;
  top: 18px;
  padding: 20px 16px;
}

.agent-directory header {
  margin-bottom: 14px;
}

.agent-directory h4 {
  font-size: 1.2rem;
}

.agent-directory header p {
  font-size: 0.72rem;
}

.agent-directory > div {
  display: grid;
  gap: 8px;
}

.directory-agent {
  align-items: flex-start;
  padding: 11px;
  background: white;
  border: 1px solid #dbe3e8;
}

.directory-agent > div {
  min-width: 0;
  flex: 1;
}

.directory-agent > div > div {
  justify-content: space-between;
}

.directory-agent b {
  color: var(--flow-blue);
  font-size: 0.78rem;
}

.directory-agent em {
  color: #8a6728;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.directory-agent em.on {
  color: #197255;
}

.directory-agent p,
.directory-agent small {
  display: block;
  margin: 4px 0;
  color: #6b7d89;
  font-size: 0.67rem;
  line-height: 1.35;
}

.directory-agent .agent-room-link {
  padding: 4px 0;
  color: var(--flow-blue);
  font-size: 0.67rem;
  font-weight: 800;
  background: transparent;
  border: 0;
}

@media (max-width: 1180px) {
  .workflow-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-canvas {
    border-right: 0;
  }

  .agent-directory {
    position: static;
    border-top: 1px solid var(--flow-line);
  }

  .agent-directory > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .workflow-title {
    align-items: stretch;
    flex-direction: column;
  }

  .sector-switcher {
    min-width: 0;
  }

  .workflow-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-index {
    min-width: 0;
    border-right: 0;
  }

  .flow-tabs {
    display: flex;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .flow-tabs button {
    flex: 0 0 220px;
  }
}

@media (max-width: 620px) {
  .workflow-map {
    margin: 18px 0;
    padding: 14px;
  }

  .workflow-title > div > span {
    display: none;
  }

  .workflow-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow-summary span:nth-child(2) {
    border-right: 0;
  }

  .workflow-summary span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--flow-line);
  }

  .flow-canvas header,
  .phase-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-canvas header {
    display: grid;
  }

  .flow-canvas header > span {
    white-space: normal;
  }

  .phase-list,
  .flow-canvas header {
    padding: 17px;
  }

  .coordinator-banner {
    margin: 14px 17px 0;
  }

  .agent-directory > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
