.lab-workflow {
  --workflow-mint: #aee5c7;
  --workflow-muted: #c6dbcd;
  --workflow-line: #527363;
  --workflow-ease: cubic-bezier(.23, 1, .32, 1);
  display: grid;
  align-self: center;
  min-width: 0;
  padding: clamp(18px, 2.8vw, 36px);
  border: 1px solid #294b3a;
  border-radius: 14px;
  background: radial-gradient(ellipse at 24% 0%, #265444, #16362a 62%, #112c22);
  color: #f1faf3;
}

.lab-workflow p,
.lab-workflow h3,
.lab-workflow dd {
  margin: 0;
}

.lab-workflow-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--workflow-line);
  color: var(--workflow-muted);
  font-size: 13px;
}

.lab-workflow-header > span:first-child {
  color: var(--workflow-mint);
  font-weight: 750;
}

.lab-workflow-scenes {
  display: grid;
  gap: 24px;
  padding-block: 19px;
}

.lab-workflow.is-enhanced .lab-workflow-scenes {
  gap: 0;
}

.lab-workflow.is-enhanced .lab-workflow-scene {
  grid-area: 1 / 1;
  transition: opacity .24s var(--workflow-ease) .09s, transform .4s var(--workflow-ease);
}

.lab-workflow-scene {
  min-width: 0;
  min-height: 280px;
}

.lab-workflow-scene[inert] {
  opacity: 0;
  transform: translateY(9px);
  transition-duration: .14s, .26s;
  transition-delay: 0s;
}

.lab-workflow-scene-heading > p {
  color: var(--workflow-muted);
  font-size: 14px;
  line-height: 1.5;
}

.lab-workflow-scene-heading .lab-workflow-stage-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--workflow-mint);
  font-size: 13px;
  font-weight: 750;
}

.lab-workflow-scene-heading h3 {
  margin-block: 6px 5px;
  color: inherit;
  font-size: clamp(23px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -.045em;
}

.lab-workflow-feeds {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.lab-workflow-feed {
  min-width: 0;
}

.lab-workflow-feed > p {
  margin-bottom: 3px;
  color: var(--workflow-muted);
  font-size: 13px;
}

.lab-workflow-rail {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 9px, black calc(100% - 17px), transparent);
}

.lab-workflow-track {
  display: flex;
  width: max-content;
}

.lab-workflow-documents {
  display: flex;
  gap: 6px;
  padding-inline: 3px;
}

.lab-workflow-documents > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--workflow-line);
  border-radius: 6px;
  background: #244b39;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.lab-workflow-documents img {
  flex: none;
  object-fit: contain;
}

.lab-workflow-documents .brand-wordmark {
  width: 21px;
  height: 18px;
  border-radius: 3px;
  background: #e6f0e9;
  color: #19352a;
  font-size: 11px;
}

.lab-workflow-sheets {
  width: 18px;
  height: 18px;
  background: #69c789;
  mask: url("assets/brands/googlesheets.svg") center / contain no-repeat;
}

.lab-workflow-meter {
  height: 8px;
  overflow: hidden;
  margin-top: 17px;
  border-radius: 3px;
  background: #456755;
}

.lab-workflow-meter > span {
  display: block;
  width: 77.4%;
  height: 100%;
  background: var(--workflow-mint);
  transform-origin: left;
}

.lab-workflow-budget {
  margin: 13px 0 0;
}

.lab-workflow-budget > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-block: 7px;
  border-bottom: 1px solid var(--workflow-line);
  font-size: 14px;
}

.lab-workflow-budget dt {
  color: var(--workflow-muted);
}

.lab-workflow-budget dd {
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.lab-workflow-approval {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 15px;
  padding: 9px 12px;
  border-radius: 7px;
  background: #e6f0e9;
  color: #19352a;
}

.lab-workflow-approval strong,
.lab-workflow-approval small {
  display: block;
}

.lab-workflow-approval small {
  color: #48675a;
  font-size: 13px;
}

.lab-workflow-status {
  display: grid;
  justify-items: start;
}

.lab-workflow-status > span {
  grid-area: 1 / 1;
  padding: 4px 9px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.lab-workflow-pending {
  background: #f7eac8;
  color: #503c18;
  opacity: 0;
}

.lab-workflow-confirmed {
  background: #c6ead3;
  color: #164631;
}

.lab-workflow-log {
  display: grid;
  gap: 5px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.lab-workflow-log li {
  padding: 6px 9px;
  border-inline-start: 2px solid #8cc7a6;
  border-radius: 4px;
  background: #244b39;
  font-size: 13px;
}

.lab-workflow-amount {
  color: #ffbca2;
  font-size: 24px;
  font-weight: 800;
}

.lab-workflow-chart {
  position: relative;
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.lab-workflow-chart::before {
  content: "";
  position: absolute;
  inset: 56px 0 auto;
  height: 1px;
  background: #688575;
}

.lab-workflow-chart > div {
  position: relative;
  display: grid;
  flex: 1;
  justify-items: center;
  align-items: end;
  height: 102px;
}

.lab-workflow-chart span {
  position: absolute;
  bottom: 46px;
  width: min(65%, 44px);
  height: var(--bar);
  border-radius: 3px 3px 0 0;
  background: #80ba99;
  transform-origin: bottom;
}

.lab-workflow-chart .lab-workflow-negative span {
  top: 56px;
  bottom: auto;
  border-radius: 0 0 3px 3px;
  background: #ffbca2;
  transform-origin: top;
}

.lab-workflow-chart small {
  color: var(--workflow-muted);
  font-size: 13px;
}

.lab-workflow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding-top: 10px;
  border-top: 1px solid var(--workflow-line);
}

.lab-workflow-controls [hidden],
.lab-workflow-controls[hidden] {
  display: none;
}

.lab-workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lab-workflow-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid var(--workflow-line);
  border-radius: 7px;
  background: transparent;
  color: #f1faf3;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

.lab-workflow-controls button:hover {
  background: #295442;
}

.lab-workflow-controls button[aria-pressed="true"] {
  border-color: var(--workflow-mint);
  background: var(--workflow-mint);
  color: #17352a;
}

.lab-workflow-controls .lab-workflow-playback {
  min-width: 70px;
}

.lab-workflow-controls button:focus-visible {
  outline: 2px solid var(--workflow-mint);
  outline-offset: 2px;
}

.lab-workflow-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-track {
    animation: lab-workflow-scroll 23s linear infinite;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-feed:nth-child(2) .lab-workflow-track {
    animation-duration: 26s;
    animation-direction: reverse;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-feed:nth-child(3) .lab-workflow-track {
    animation-duration: 28s;
    animation-delay: -4s;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-meter > span {
    animation: lab-workflow-fill .85s var(--workflow-ease) .15s both;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-pending {
    animation: lab-workflow-out .22s var(--workflow-ease) .62s both;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-confirmed {
    animation: lab-workflow-in .32s var(--workflow-ease) .67s both;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-log li:last-child {
    animation: lab-workflow-in .32s var(--workflow-ease) .87s both;
  }

  .lab-workflow.is-visible .lab-workflow-scene:not([inert]) .lab-workflow-chart span {
    animation: lab-workflow-rise .8s var(--workflow-ease) var(--delay) both;
  }

  .lab-workflow.is-visible.is-frozen .lab-workflow-scene:not([inert]) * {
    animation-play-state: paused;
  }
}

@keyframes lab-workflow-scroll {
  to { transform: translateX(-33.3333%); }
}

@keyframes lab-workflow-fill {
  from { transform: scaleX(.035); }
}

@keyframes lab-workflow-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-3px); }
}

@keyframes lab-workflow-in {
  from { opacity: 0; transform: translateY(3px); }
}

@keyframes lab-workflow-rise {
  from { transform: scaleY(.04); }
}

@media (prefers-reduced-motion: reduce) {
  .lab-workflow.is-enhanced .lab-workflow-scene {
    transition: none;
  }
}
