.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: clamp(42px, 6vw, 82px);
  align-items: center;
}

.chaos-order {
  display: flex;
  min-width: 0;
  min-height: 370px;
  justify-content: center;
  align-items: center;
}

.chaos-order__stage {
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: minmax(130px, 1fr) 76px minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
}

.chaos-order__chaos,
.chaos-order__result {
  position: relative;
  min-height: 280px;
}

.chaos-order__chaos small,
.chaos-order__result small {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.chaos-piece {
  position: absolute;
  display: block;
  border: 1px solid rgba(100, 116, 139, .45);
  border-radius: 7px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 6px 24px rgba(37, 99, 235, .06);
}

.chaos-piece::before,
.chaos-piece::after {
  position: absolute;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: #cbd5e1;
  content: "";
}

.chaos-piece::before {
  top: 13px;
  width: 45%;
}

.chaos-piece::after {
  top: 21px;
  width: 64%;
}

.chaos-piece--1 {
  top: 18px;
  left: 18px;
  width: 92px;
  height: 45px;
  transform: rotate(-7deg);
}

.chaos-piece--2 {
  top: 72px;
  right: 4px;
  width: 116px;
  height: 54px;
  transform: rotate(5deg);
}

.chaos-piece--3 {
  top: 125px;
  left: 0;
  width: 106px;
  height: 51px;
  transform: rotate(8deg);
}

.chaos-piece--4 {
  top: 166px;
  right: 9px;
  width: 94px;
  height: 46px;
  transform: rotate(-6deg);
}

.chaos-piece--5 {
  top: 88px;
  left: 20px;
  width: 70px;
  height: 35px;
  transform: rotate(-12deg);
}

.chaos-piece--6 {
  top: 205px;
  left: 21px;
  width: 118px;
  height: 42px;
  transform: rotate(4deg);
}

.chaos-order__engine {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.chaos-order__engine span {
  padding: 11px 12px;
  border-radius: 8px;
  background: #2563eb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .22);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chaos-order__engine i {
  position: relative;
  display: block;
  width: 48px;
  height: 1px;
  background: #2563eb;
}

.chaos-order__engine i::after {
  position: absolute;
  top: -4px;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 1px solid #2563eb;
  border-right: 1px solid #2563eb;
  content: "";
  transform: rotate(45deg);
}

.order-card {
  position: absolute;
  top: 17px;
  right: 0;
  left: 0;
  padding: 20px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 45px rgba(37, 99, 235, .1);
}

.order-card__id {
  display: block;
  width: 64%;
  height: 9px;
  margin-bottom: 24px;
  border-radius: 5px;
  background: #2563eb;
}

.order-card__row {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #e5eaf1;
}

.order-card__row i {
  width: 8px;
  height: 8px;
  border: 2px solid #60a5fa;
  border-radius: 50%;
}

.order-card__row b {
  display: block;
  width: 82%;
  height: 5px;
  border-radius: 4px;
  background: #cbd5e1;
}

.order-card__row:nth-child(3) b {
  width: 66%;
}

.order-card__row:nth-child(4) b {
  width: 91%;
}

.order-card__links {
  display: flex;
  gap: 7px;
  margin-top: 17px;
}

.order-card__links i {
  display: block;
  width: 28px;
  height: 7px;
  border-radius: 4px;
  background: #dbeafe;
}

@media (max-width: 960px) {
  .home-hero__grid {
    grid-template-columns: 1fr;
  }

  .chaos-order {
    min-height: 330px;
  }
}

@media (max-width: 560px) {
  .chaos-order {
    min-height: 280px;
  }

  .chaos-order__stage {
    grid-template-columns: minmax(95px, 1fr) 60px minmax(110px, 1fr);
    gap: 5px;
  }

  .chaos-order__chaos,
  .chaos-order__result {
    min-height: 245px;
  }

  .chaos-piece--2,
  .chaos-piece--6 {
    width: 92px;
  }

  .chaos-piece--3 {
    width: 86px;
  }

  .order-card {
    padding: 14px;
  }

  .chaos-order__engine span {
    padding: 9px 7px;
    font-size: 10px;
  }

  .chaos-order__engine i {
    width: 34px;
  }
}
