.workflow-tree {
  position: relative;
  display: grid;
  gap: 0;
  padding: 8px 0 24px;
}

.workflow-root {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(420px, 100%);
  min-height: 92px;
  place-content: center;
  gap: 2px;
  margin: 0 auto;
  padding: 16px 24px;
  border: 2px solid #d49a22;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  background: #082f49;
  box-shadow: 0 14px 30px rgba(8, 47, 73, .18);
}

.workflow-root span {
  color: #fbbf24;
  font-size: 14px;
  font-weight: 950;
}

.workflow-root strong {
  font-size: 24px;
  line-height: 1.35;
}

.workflow-trunk {
  position: relative;
  display: grid;
  gap: 30px;
  padding-top: 34px;
}

.workflow-trunk::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 28px;
  left: 50%;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #d49a22 0, #0f766e 20%, #2563eb 70%, #082f49 100%);
  transform: translateX(-50%);
}

.workflow-stage {
  position: relative;
  display: grid;
  gap: 23px;
}

.workflow-stage-title {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(360px, calc(100% - 24px));
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 0 auto;
  padding: 9px 18px;
  border: 1px solid #b8d2df;
  border-radius: 8px;
  color: #082f49;
  background: #fff;
  box-shadow: 0 9px 22px rgba(8, 47, 73, .1);
}

.workflow-stage-title span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #0f766e;
  font-size: 11px;
  font-weight: 950;
}

.workflow-stage-title strong {
  font-size: 17px;
}

.workflow-stage-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--node-count), minmax(0, 1fr));
  gap: 13px;
  padding-top: 22px;
}

.workflow-stage-nodes::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: calc(50% / var(--node-count));
  left: calc(50% / var(--node-count));
  height: 3px;
  border-radius: 99px;
  background: #89aebe;
}

.workflow-tree .workflow-node {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 102px;
  align-content: center;
  gap: 7px;
  padding: 15px 14px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, #d7e2ec);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  color: #0f2947;
  text-decoration: none;
  background: linear-gradient(145deg,#fff 0%,color-mix(in srgb,var(--accent) 10%,#fff) 100%);
  box-shadow: 0 10px 24px rgba(15, 52, 75, .08);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.workflow-tree .workflow-node::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 3px;
  height: 26px;
  background: #89aebe;
  transform: translateX(-50%);
}

.workflow-tree .workflow-node:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 52, 75, .14);
}

.workflow-node-number {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: grid;
  width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--accent);
  font-size: 9px;
  font-weight: 950;
}

.workflow-tree .workflow-node b {
  padding-inline-end: 26px;
  font-size: 15px;
  line-height: 1.45;
}

.workflow-tree .workflow-node small {
  color: #526171;
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 1250px) {
  .workflow-stage-nodes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-stage-nodes::before { display: none; }

  .workflow-tree .workflow-node::before { display: none; }
}

@media (max-width: 700px) {
  .workflow-stage-nodes { grid-template-columns: 1fr; }
  .workflow-root strong { font-size: 20px; }
}
