.workflow-demo {
  --wf-accent: #c2c1bf;
  --wf-panel: #201f1d;
  --wf-complete: 1;
  --wf-travel: 100%;
  isolation: isolate;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 540px);
  max-width: 540px;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid #403f3d;
  border-radius: 12px;
  color: #f3f2f0;
  background: var(--wf-panel);
  box-shadow: 0 20px 52px -28px #201f1d6b, 0 2px 7px #201f1d18;
  font-family: var(--sans, "Helvetica Neue", Arial, sans-serif);
  text-align: left;
  line-height: 1.3;
  container-type: inline-size;
}
.workflow-demo *, .workflow-demo *::after, .workflow-demo *::before { box-sizing: border-box; }
.workflow-demo .wf-top {
  display: flex; align-items: center; gap: 12px; min-height: 57px;
  border-bottom: 1px solid #484745;
  padding: 6px 20px 6px 24px;
  background: #2a2927;
}
.wf-heading { color: #f4f3f1; font-size: 15px; font-weight: 580; letter-spacing: -.018em; }
.wf-sample, .wf-read-label, .wf-count {
  font: 10px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
}
.wf-sample { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: #d0cfcd; white-space: nowrap; }
.wf-sample::before { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--wf-accent); }
.workflow-demo .wf-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  margin: 0 -5px 0 0; padding: 0; cursor: pointer; border-radius: 6px;
  background: transparent; border: 1px solid #605f5d; color: #f4f3f1;
}
.workflow-demo .wf-toggle:hover { background: #3e3d3b; }
.workflow-demo .wf-toggle:focus-visible { outline: 2px solid var(--wf-accent); outline-offset: 2px; }
.workflow-demo .wf-toggle[hidden] { display: none; }
.wf-control-icon { width: 0; height: 0; margin-left: 2px; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.workflow-demo[data-playing="true"] .wf-control-icon { width: 8px; height: 10px; border: 0; border-inline: 2px solid currentColor; margin-left: 0; }
.wf-diagram {
  --wf-icon: clamp(55px, 14.4cqw, 75px);
  position: relative;
  display: grid; align-content: center;
  height: clamp(145px, 32cqw, 171px);
  background-color: #1f1e1c;
  background-image: radial-gradient(circle, #504f4d 0.65px, transparent 0.9px);
  background-size: 15px 15px;
  overflow: hidden;
}
.wf-nodes { position: relative; display: flex; align-items: start; justify-content: space-between; margin-inline: 8%; }
.wf-node { position: relative; width: var(--wf-icon); display: grid; justify-items: center; gap: 10px; color: #b3b2b0; }
.wf-icon-frame {
  width: var(--wf-icon); height: calc(var(--wf-icon) * .82);
  display: grid; place-items: center;
  border: 1px solid #535250; border-radius: 9px;
  background: #2d2c2a;
  transition: border-color .36s, background-color .36s, box-shadow .36s;
}
.wf-node.is-current .wf-icon-frame { background: #3e3d3b; border-color: #c2c1bf; box-shadow: 0 0 20px #b5b4b229, inset 0 0 13px #c2c1bf0d; }
.wf-node.is-current { color: #e5e4e2; }
.wf-node.is-done { color: #dbdad8; }
.wf-node.is-done .wf-icon-frame { border-color: #747371; }
.wf-node-name { font-size: 12px; font-weight: 510; letter-spacing: .007em; }
.wf-track {
  position: absolute; z-index: 0; inset-inline: calc(8% + var(--wf-icon) / 2);
  top: calc(50% - 13px); height: 1px; background: #5f5e5c;
}
.wf-track-ink { position: absolute; inset: 0 auto 0 0; width: var(--wf-travel); background: #b5b4b2; }
.wf-packet {
  position: absolute; top: -2px; left: var(--wf-travel); transform: translateX(-50%);
  width: 14px; height: 4px; background: #efeeec; border-radius: 10px;
  box-shadow: 0 0 7px 2px #c9c8c68c, -7px 0 12px #9b9a98;
}
.workflow-demo[data-finished="true"] .wf-packet { visibility: hidden; }
.wf-window, .wf-checklist, .wf-sheet { position: relative; }
.wf-window { width: 30px; height: 23px; border: 1.3px solid currentColor; border-radius: 3px; }
.wf-window::after { content:""; position: absolute; top: 6px; width: 100%; left: 0; border-top: 1px solid currentColor; opacity: .7; }
.wf-window i { display: block; position: absolute; top: 2px; left: 3px; width: 2px; height: 2px; background: currentColor; border-radius: 50%; }
.wf-window i:nth-child(2) { left: 7px; } .wf-window i:nth-child(3) { left: 11px; }
.wf-window span { position: absolute; top: 13px; left: 4px; width: 14px; border-top: 1px solid currentColor; }
.wf-checklist { display: grid; width: 26px; gap: 5px; }
.wf-checklist i { display: block; position: relative; margin-left: 8px; height: 2px; background: currentColor; opacity: .85; }
.wf-checklist i::before { content: ""; position: absolute; left: -8px; top: -2px; width: 5px; height: 4px; border: solid currentColor; border-width: 0 0 1px 1px; transform: rotate(-45deg); }
.wf-sheet { width: 21px; height: 26px; border: 1.3px solid currentColor; border-radius: 2px; padding: 6px 4px; }
.wf-sheet::after { content: ""; position: absolute; left: 3px; top: 2px; width: 100%; height: 100%; border: solid currentColor; border-width: 0 1px 1px 0; opacity: .4; border-radius: 1px; }
.wf-sheet i { display: block; width: 100%; margin-bottom: 3px; border-top: 1px solid currentColor; }
.wf-sheet i:last-child { width: 55%; }
.wf-output { padding: 17px 24px 19px; border-top: 1px solid #3f3e3c; background: #252422; }
.wf-operation { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wf-read-label { text-transform: uppercase; color: #bebdbb; }
.wf-count { color: #cccbc9; letter-spacing: 0; }
.workflow-demo .wf-action { color: #f4f3f1; margin: 9px 0 3px; font-size: clamp(20px, 4.8cqw, 25px); line-height: 1.07; letter-spacing: -.035em; font-weight: 480; }
.workflow-demo .wf-detail { margin: 0; line-height: 1.35; color: #cac9c7; font-size: clamp(11px, 2.65cqw, 13px); font-weight: 410; }
.wf-progress { height: 2px; margin-top: 14px; background: #504f4d; overflow: hidden; }
.wf-progress i { display: block; width: 100%; height: 100%; background: var(--wf-accent); transform: scaleX(var(--wf-complete)); transform-origin: left; }
@container (max-width: 370px) {
  .workflow-demo .wf-top { gap: 9px; padding-inline: 15px; min-height: 51px; }
  .wf-heading { font-size: 13.5px; }
  .wf-output { padding: 15px 16px 17px; }
  .wf-node-name { font-size: 11px; }
  .wf-sample { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .workflow-demo .wf-icon-frame { transition: none; }
  .workflow-demo .wf-packet { visibility: hidden; }
}
@media (prefers-reduced-motion: no-preference) {
  .workflow-demo[data-playing="true"] .wf-node[data-wf-node="1"].is-current .wf-checklist i { animation: wf-reading 1.25s ease-in-out infinite; }
  .workflow-demo[data-playing="true"] .wf-node[data-wf-node="1"].is-current .wf-checklist i:nth-child(2) { animation-delay: .18s; }
  .workflow-demo[data-playing="true"] .wf-node[data-wf-node="1"].is-current .wf-checklist i:nth-child(3) { animation-delay: .36s; }
  @keyframes wf-reading { 0%, 88%, 100% { opacity: .5; } 40% { opacity: 1; } }
}
