/* ============================================================
   Workflow Automation demo (Demos page, tile 07): "One thing happens. Everything follows."
   Built from the reference screenshot: a white app with a floating black rail on the left, a column of round tool
   buttons, a dotted canvas of soft pastel step cards joined by coloured lines with a round badge on each, one black
   card for the trigger, and a pale sage side panel of white rows. The steps are a fixed size on a fixed-size board that
   is scaled to fit the canvas, so text can never overlap, whatever the window size.
   Every text colour is at least 4.5:1 on the surface it sits on. See scripts/workflow-demo.js.
   ============================================================ */
.wf {
  --wf-bg: #ffffff; --wf-card: #ffffff; --wf-panel: #e8ece7; --wf-panel2: #f4f6f3;
  --wf-line: rgba(16, 19, 18, 0.1); --wf-line2: rgba(16, 19, 18, 0.18);
  --wf-ink: #101312; --wf-soft: #3d4440; --wf-mute: #5b645e;
  --wf-rail: #0e100f; --wf-ok: #25b27a; --wf-oktxt: #0b6b47; --wf-warn: #e09a1f; --wf-warntxt: #8a5200; --wf-bad: #d6384f;
  --wf-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --wf-mono: var(--font-mono, 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace);
  container: wf / size;
  position: absolute; inset: 0; display: flex; overflow: hidden; outline: 0;
  font-family: var(--font-body, 'Switzer', 'Segoe UI', sans-serif); font-size: 13.5px; line-height: 1.4; letter-spacing: -0.003em;
  color: var(--wf-ink); -webkit-font-smoothing: antialiased; background: var(--wf-bg);
}
.wf [hidden] { display: none !important; }
:where(.wf) button { font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; border: 0; background: none; text-align: left; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wf :focus-visible { outline: 2px solid #101312; outline-offset: 2px; }
.wf-i { width: 16px; height: 16px; flex: none; display: block; }

/* ---------- the floating black rail and the round tool buttons ---------- */
.wf-rail { flex: none; width: 58px; margin: 12px 0 12px 12px; padding: 16px 0 14px; background: var(--wf-rail); border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; }
.wf-logo { width: 34px; height: 30px; margin-bottom: 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.wf-logo .wf-i { width: 26px; height: 26px; fill: currentColor; stroke-width: 1.2; }
.wf-rail-views { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 5px 8px; border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 26px; }
.wf-rail-cap { font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #aab0ab; margin: 2px 0 2px; }
.wf-rail-views .wf-rb { width: 42px; height: 50px; border-radius: 20px; flex-direction: column; gap: 3px; } .wf-rail-views .wf-rb i { font-style: normal; font-size: 10px; font-weight: 600; line-height: 1; }
.wf-rb { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #b9bfba; transition: background-color 200ms ease, color 200ms ease, transform 160ms ease; }
.wf-rb .wf-i { width: 18px; height: 18px; }
button.wf-rb:hover { color: #fff; background: rgba(255, 255, 255, 0.1); } button.wf-rb:active { transform: scale(0.94); }
.wf-rb.is-on { background: #fff; color: var(--wf-rail); }
.wf-rb.is-quiet { color: #8d948f; }
.wf-rail-gap { flex: 1; }
.wf-av2 { width: 36px; height: 36px; border-radius: 50%; background: #e8ece7; color: var(--wf-rail); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-top: 4px; }
.wf-tools { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0; }
.wf-tools-l { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wf-mute); margin-bottom: 2px; }
.wf-tb { position: relative; width: 42px; height: 42px; border-radius: 50%; background: #f0f2ee; display: inline-flex; align-items: center; justify-content: center; color: #1c211e; transition: background-color 240ms ease, color 240ms ease, transform 160ms ease, box-shadow 240ms ease; }
.wf-tb .wf-i { width: 18px; height: 18px; }
.wf-tb:hover { background: #e4e8e1; } .wf-tb:active { transform: scale(0.94); }
.wf-tb::after { content: ""; position: absolute; right: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; background: #e5383b; border: 2px solid #fff; transform: scale(0); transition: transform 280ms var(--wf-ease); }
.wf-tb.is-live { background: color-mix(in srgb, var(--tc) 22%, #fff); color: color-mix(in srgb, var(--tc) 78%, #000); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc) 38%, transparent); }
.wf-tb.is-live::after { transform: scale(1); }
.wf-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- pick a scenario: four big cards ---------- */
.wf-choose { flex: none; padding: 16px 18px 12px; }
.wf-choose-l { margin: 0 0 10px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wf-choose-l b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.wf-choose-l span { font-size: 12.5px; color: var(--wf-mute); }
.wf-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wf-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 68px; border-radius: 20px; border: 1.5px solid var(--wf-line); background: var(--wf-card); min-width: 0; transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease, transform 160ms ease, box-shadow 240ms ease; }
.wf-pick-i { width: 42px; height: 42px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #e6e1fa; color: #4a3fb0; transition: background-color 200ms ease, color 200ms ease; }
.wf-pick-i .wf-i { width: 20px; height: 20px; }
.wf-pick:nth-child(2) .wf-pick-i { background: #dff0e0; color: #1c6b36; } .wf-pick:nth-child(3) .wf-pick-i { background: #fbe1e6; color: #a3274a; }
.wf-pick-t { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; min-width: 0; }
.wf-pick-t b { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.wf-pick-t i { font-style: normal; font-size: 12px; color: var(--wf-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 200ms ease; }
.wf-pick:hover { border-color: var(--wf-ink); box-shadow: 0 10px 22px -16px rgba(16, 19, 18, 0.55); }
.wf-pick:active { transform: scale(0.98); }
.wf-pick.is-on { background: var(--wf-rail); border-color: var(--wf-rail); color: #fff; box-shadow: 0 14px 28px -16px rgba(16, 19, 18, 0.85); }
.wf-pick.is-on .wf-pick-i { background: #fff; color: var(--wf-rail); } .wf-pick.is-on .wf-pick-t i { color: #cfd5d0; }

/* ---------- where you are ---------- */
.wf-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 0 18px 10px; }
.wf-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; font-size: 13px; color: var(--wf-mute); white-space: nowrap; }
.wf-crumb i { font-style: normal; opacity: 0.6; } .wf-crumb b { color: var(--wf-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.wf-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: #eceee9; color: var(--wf-soft); transition: background-color 260ms ease, color 260ms ease; }
.wf-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wf-status[data-s="run"] { background: #e6e1fa; color: #3d32a0; } .wf-status[data-s="run"]::before { animation: wf-blink 900ms ease-in-out infinite; }
.wf-status[data-s="done"] { background: #d9f2e6; color: var(--wf-oktxt); }
@keyframes wf-blink { 50% { opacity: 0.3; } }
.wf-tabs { display: none; gap: 2px; padding: 3px; border-radius: 12px; background: #eceee9; }
.wf-view { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 9px; font-size: 13px; color: var(--wf-soft); transition: background-color 200ms ease, color 200ms ease; }
.wf-tabs .wf-view.is-on { background: #fff; color: var(--wf-ink); box-shadow: 0 1px 2px rgba(16, 19, 18, 0.12); }

/* ---------- the body ---------- */
.wf-body { flex: 1; min-height: 0; position: relative; }
.wf-v { position: absolute; inset: 0; }
.wf-v-canvas { display: grid; grid-template-columns: minmax(0, 1fr) 308px; gap: 0 12px; padding: 0 12px 12px 0; }
.wf-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.wf-people { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 0 10px 18px; flex-wrap: wrap; }
.wf-people-l { font-size: 12.5px; color: var(--wf-mute); margin-right: 4px; }
.wf-person { display: inline-flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1.5px solid var(--wf-line); background: var(--wf-card); transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease, transform 160ms ease; }
.wf-av { width: 28px; height: 28px; border-radius: 50%; background: #eceee9; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px; color: var(--wf-soft); transition: background-color 200ms ease, color 200ms ease; }
.wf-pt { display: flex; flex-direction: column; line-height: 1.15; } .wf-pt b { font-weight: 600; font-size: 13px; } .wf-pt i { font-style: normal; font-size: 11.5px; color: var(--wf-mute); }
.wf-person:hover { border-color: var(--wf-ink); } .wf-person:active { transform: scale(0.98); }
.wf-person.is-on { background: var(--wf-rail); border-color: var(--wf-rail); color: #fff; } .wf-person.is-on .wf-av { background: #fff; color: var(--wf-rail); } .wf-person.is-on .wf-pt i { color: #cfd5d0; }
.wf-hint { margin: 0 0 0 auto; padding: 5px 13px; border-radius: 999px; background: var(--wf-rail); color: #fff; font-size: 12px; animation: wf-pop 420ms var(--wf-ease) both; }

/* ---------- the canvas: a fixed board, scaled to fit ---------- */
.wf-stage { position: relative; flex: 1; min-height: 0; margin: 0 0 0 18px; border-radius: 24px; border: 1.5px solid var(--wf-line); background-color: #fff; background-image: radial-gradient(rgba(16, 19, 18, 0.18) 1px, transparent 1.3px); background-size: 22px 22px; overflow: hidden; }
.wf-fit { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wf-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wf-edge { --ec: #7b6cf6; }
.wf-e-base { fill: none; stroke: rgba(16, 19, 18, 0.22); stroke-width: 1.6; }
.wf-e-glow { fill: none; stroke: var(--ec); stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--ec) 55%, transparent)); }
.wf-edge.is-done .wf-e-glow { filter: none; stroke-width: 2; }
.wf-e-dot { fill: var(--ec); stroke: #fff; stroke-width: 2; }
.wf-eb { position: absolute; z-index: 3; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #fff; border: 1.5px solid color-mix(in srgb, var(--ec) 55%, #fff); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(16, 19, 18, 0.14); pointer-events: none; transition: background-color 320ms ease, border-color 320ms ease; }
.wf-eb::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ec); opacity: 0.55; transition: opacity 200ms ease; }
.wf-eb .wf-i { position: absolute; width: 12px; height: 12px; stroke-width: 2.8; color: var(--ec); opacity: 0; transform: scale(0.4); transition: opacity 240ms ease, transform 360ms var(--wf-ease); }
.wf-eb.is-on { border-color: var(--ec); background: color-mix(in srgb, var(--ec) 12%, #fff); } .wf-eb.is-on::before { opacity: 0; } .wf-eb.is-on .wf-i { opacity: 1; transform: none; }
.wf-grid { position: absolute; inset: 0; }
.wf-node { position: absolute; width: 128px; height: 118px; }
.wf-nb { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px 9px; border-radius: 26px; background: color-mix(in srgb, var(--tc) 14%, #fff); border: 1.5px solid transparent; text-align: center; transition: border-color 280ms ease, background-color 280ms ease, transform 220ms var(--wf-ease), box-shadow 280ms ease; }
.wf-ni { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--tc) 82%, #000); }
.wf-ni .wf-i { width: 30px; height: 30px; stroke-width: 1.5; }
.wf-nt { display: flex; flex-direction: column; min-width: 0; width: 100%; line-height: 1.25; gap: 2px; align-items: center; }
.wf-nt b { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-nt i { font-style: normal; font-size: 11.5px; color: var(--wf-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wf-ns { position: absolute; right: 9px; top: 9px; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid rgba(16, 19, 18, 0.2); background: #fff; transition: background-color 240ms ease, border-color 240ms ease, color 240ms ease; }
.wf-ns .wf-i { width: 11px; height: 11px; stroke-width: 2.8; }
.wf-nb:hover { transform: translateY(-2px); border-color: var(--tc); box-shadow: 0 16px 26px -18px color-mix(in srgb, var(--tc) 75%, transparent); }
.wf-nb:focus-visible { outline: 2px solid var(--tc); outline-offset: 4px; }
.wf-node.is-trigger .wf-nb { background: var(--wf-rail); }
.wf-node.is-trigger .wf-ni { color: #fff; } .wf-node.is-trigger .wf-nt b { color: #fff; } .wf-node.is-trigger .wf-nt i { color: #c9cfca; }
.wf-port { position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #fff; border: 1.5px solid rgba(16, 19, 18, 0.35); z-index: 2; transition: background-color 240ms ease, border-color 240ms ease; }
.wf-in { left: -4px; } .wf-out { right: -4px; }
.wf-node.is-trigger .wf-in { display: none; }
.wf-node[data-s="idle"] .wf-nb { background: color-mix(in srgb, var(--tc) 9%, #fff); }
.wf-node.is-trigger[data-s="idle"] .wf-nb { background: var(--wf-rail); }
.wf-node::before { content: ""; position: absolute; inset: -5px; border-radius: 30px; border: 2px solid var(--tc); opacity: 0; pointer-events: none; z-index: 0; }
.wf-node[data-s="active"]::before { opacity: 1; animation: wf-ring 1100ms ease-in-out infinite; }
@keyframes wf-ring { 0%, 100% { transform: scale(1); opacity: 0.35; } 50% { transform: scale(1.04); opacity: 1; } }
.wf-node[data-s="active"] .wf-nb { background: color-mix(in srgb, var(--tc) 22%, #fff); }
.wf-node.is-trigger[data-s="active"] .wf-nb { background: var(--wf-rail); }
.wf-node[data-s="done"] .wf-ns { background: var(--wf-ok); border-color: var(--wf-ok); color: #fff; }
.wf-node[data-s="done"] .wf-port { background: var(--tc); border-color: var(--tc); }
.wf-node[data-s="retry"]::before { opacity: 1; border-color: var(--wf-warn); animation: wf-ring 1100ms ease-in-out infinite; }
.wf-node[data-s="retry"] .wf-nb { background: #fff4de; } .wf-node[data-s="retry"] .wf-ns { border-color: var(--wf-warn); color: var(--wf-warntxt); }
.wf-node[data-s="wait"] .wf-ns { border-color: #5b645e; color: #3d4440; }
.wf-node.is-sel .wf-nb { border-color: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 30%, #fff); }
.wf-node.is-trigger .wf-nb:hover, .wf-node.is-trigger.is-sel .wf-nb { border-color: #fff; box-shadow: 0 0 0 1.5px var(--wf-rail), 0 14px 24px -16px rgba(16, 19, 18, 0.7); }
.wf-node.is-trigger .wf-nb:focus-visible { outline-color: var(--wf-rail); }
.wf-spin { width: 9px; height: 9px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--tc) 80%, #000); border-top-color: transparent; animation: wf-rot 700ms linear infinite; }
@keyframes wf-rot { to { transform: rotate(360deg); } }
.wf-ms { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font-family: var(--wf-mono); font-size: 11px; color: var(--wf-mute); opacity: 0; transition: opacity 300ms ease; }
.wf-node[data-s="done"] .wf-ms { opacity: 1; }
.wf-bub { position: absolute; left: 50%; top: -6px; z-index: 6; padding: 5px 12px; border-radius: 999px; background: var(--wf-rail); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(16, 19, 18, 0.55); pointer-events: none; opacity: 0; transform: translate(-50%, -70%) scale(0.88); transition: opacity 200ms ease, transform 320ms var(--wf-ease); }
.wf-bub.is-on { opacity: 1; transform: translate(-50%, -100%) scale(1); }

/* ---------- run once, speed, and the numbers ---------- */
.wf-foot { flex: none; display: flex; align-items: center; gap: 14px 18px; padding: 12px 0 0 18px; flex-wrap: wrap; }
.wf-run { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 4px; border-radius: 999px; font-weight: 600; font-size: 14px; flex: none; transition: transform 160ms ease, opacity 200ms ease; }
.wf-run .wf-rc { width: 38px; height: 38px; border-radius: 50%; background: var(--wf-rail); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: transform 200ms var(--wf-ease); } .wf-run .wf-i { width: 15px; height: 15px; fill: currentColor; }
.wf-run:hover:not(:disabled) .wf-rc { transform: scale(1.08); } .wf-run:active:not(:disabled) { transform: scale(0.97); } .wf-run:disabled { opacity: 0.55; cursor: default; }
.wf-speed { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 3px; padding: 4px 4px 4px 14px; border-radius: 999px; background: #f0f2ee; flex: none; }
.wf-speed span { font-size: 12px; color: var(--wf-mute); margin-right: 6px; }
.wf-speed button { height: 32px; padding: 0 14px; cursor: pointer; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--wf-soft); text-align: center; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.wf-speed button:hover { color: var(--wf-ink); } .wf-speed button.is-on { background: var(--wf-rail); color: #fff; }
.wf-metrics { flex: 1; display: flex; align-items: baseline; justify-content: flex-end; gap: 6px 22px; flex-wrap: wrap; min-width: 0; padding-right: 4px; }
.wf-m { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.wf-m b { font-family: var(--wf-mono); font-size: 19px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wf-m span { font-size: 12px; color: var(--wf-mute); }
.wf-m.is-soft b { color: var(--wf-mute); text-decoration: line-through; text-decoration-color: rgba(16, 19, 18, 0.35); }
.wf-metrics.is-in .wf-m { animation: wf-pop 420ms var(--wf-ease) both; } .wf-metrics.is-in .wf-m:nth-child(2) { animation-delay: 70ms; } .wf-metrics.is-in .wf-m:nth-child(3) { animation-delay: 140ms; } .wf-metrics.is-in .wf-m:nth-child(4) { animation-delay: 210ms; }
@keyframes wf-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wf-note { flex-basis: 100%; margin: 0; text-align: right; font-size: 11.5px; color: var(--wf-mute); }

/* ---------- the pale side panel with white rows ---------- */
.wf-side { min-height: 0; display: flex; flex-direction: column; border-radius: 28px; background: var(--wf-panel); overflow: hidden; }
.wf-activity { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wf-side-h { flex: none; display: flex; flex-direction: column; gap: 1px; padding: 20px 22px 10px; } .wf-side-h b { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; } .wf-side-h span { font-size: 12.5px; color: var(--wf-mute); }
.wf-log { flex: 1; min-height: 0; margin: 0; padding: 2px 12px 14px; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; gap: 8px; }
.wf-log::-webkit-scrollbar { display: none; }
.wf-sec { padding: 8px 10px 0; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--wf-mute); }
.wf-li { animation: wf-li 360ms var(--wf-ease) both; }
@keyframes wf-li { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wf-li button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: #fff; transition: transform 200ms var(--wf-ease), box-shadow 200ms ease; }
.wf-li button:hover { transform: translateY(-1px); box-shadow: 0 10px 18px -14px rgba(16, 19, 18, 0.6); }
.wf-lt { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tc) 20%, #fff); color: color-mix(in srgb, var(--tc) 80%, #000); }
.wf-lt .wf-i { width: 19px; height: 19px; }
.wf-lx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; } .wf-lx b { font-weight: 600; font-size: 14px; } .wf-lx span { font-size: 12.5px; color: var(--wf-soft); }
.wf-li em { font-style: normal; font-family: var(--wf-mono); font-size: 11px; color: var(--wf-mute); align-self: flex-start; margin-top: 3px; flex: none; }
.wf-li-warn .wf-lt { background: #fff0d2; color: var(--wf-warntxt); }
.wf-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 38px 18px; color: var(--wf-mute); }
.wf-empty .wf-i { width: 28px; height: 28px; } .wf-empty b { color: var(--wf-ink); font-weight: 500; } .wf-empty span { font-size: 12.5px; }
.wf-detail { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px 16px 16px; animation: wf-pane 300ms var(--wf-ease) both; }
@keyframes wf-pane { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.wf-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 32px; padding: 0 14px 0 9px; border-radius: 999px; background: #fff; font-size: 12.5px; color: var(--wf-soft); transition: transform 160ms ease; }
.wf-back .wf-i { width: 14px; height: 14px; } .wf-back:hover { color: var(--wf-ink); } .wf-back:active { transform: scale(0.96); }
.wf-d-h { display: flex; align-items: center; gap: 12px; margin: 14px 0 14px; }
.wf-d-h .wf-ni { width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 20%, #fff); }
.wf-d-h .wf-ni .wf-i { width: 24px; height: 24px; }
.wf-d-h > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; } .wf-d-h b { font-weight: 600; font-size: 16px; letter-spacing: -0.015em; } .wf-d-h i { font-style: normal; font-size: 12.5px; color: var(--wf-mute); }
.wf-d-h em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--wf-soft); flex: none; }
.wf-d-h em[data-s="done"] { background: #d3f0e2; color: var(--wf-oktxt); } .wf-d-h em[data-s="retry"] { background: #ffecc8; color: var(--wf-warntxt); }
.wf-d-tabs { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(16, 19, 18, 0.07); margin-bottom: 12px; }
.wf-d-tabs button { flex: 1; height: 32px; padding: 0 6px; border-radius: 999px; font-size: 12px; color: var(--wf-soft); text-align: center; white-space: nowrap; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.wf-d-tabs button:hover { color: var(--wf-ink); } .wf-d-tabs button.is-on { background: #fff; color: var(--wf-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 19, 18, 0.15); }
.wf-d-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; animation: wf-pane 260ms var(--wf-ease) both; }
.wf-d-b::-webkit-scrollbar { display: none; }
.wf-d-p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; }
.wf-d-ok { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 16px; background: #d3f0e2; color: var(--wf-oktxt); font-size: 12.5px; font-weight: 500; } .wf-d-ok .wf-i { width: 15px; height: 15px; stroke-width: 2.4; }
.wf-d-note { margin: 10px 0 0; font-size: 12px; color: var(--wf-mute); }
.wf-kv { margin: 0; display: flex; flex-direction: column; background: #fff; border-radius: 18px; padding: 4px 14px; } .wf-kv div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--wf-line); } .wf-kv div:last-child { border-bottom: 0; }
.wf-kv dt { font-size: 12px; color: var(--wf-mute); } .wf-kv dd { margin: 0; font-family: var(--wf-mono); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.wf-time { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .wf-time div { padding: 14px; border-radius: 18px; background: #d3f0e2; display: flex; flex-direction: column; gap: 2px; }
.wf-time div.is-hand { background: #fff; } .wf-time b { font-family: var(--wf-mono); font-size: 20px; font-weight: 500; } .wf-time span { font-size: 12px; color: var(--wf-soft); }

/* ---------- a small picture of what the step did ---------- */
.wf-pk { margin: 0 0 12px; padding: 12px; border-radius: 20px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--tc) 35%, transparent); display: flex; flex-direction: column; gap: 9px; }
.wf-pk-h { display: flex; align-items: center; gap: 10px; } .wf-pk-h > span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .wf-pk-h b { font-size: 13px; font-weight: 600; } .wf-pk-h i { font-style: normal; font-size: 11.5px; color: var(--wf-mute); }
.wf-pk-av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; background: color-mix(in srgb, var(--tc) 24%, #fff); color: color-mix(in srgb, var(--tc) 80%, #000); }
.wf-pk-b { align-self: flex-start; max-width: 92%; padding: 9px 12px; border-radius: 16px 16px 16px 5px; background: #eceee9; font-size: 12.5px; line-height: 1.4; }
.wf-pk-b.is-out { align-self: flex-end; border-radius: 16px 16px 5px 16px; background: color-mix(in srgb, var(--tc) 18%, #fff); }
.wf-pk-card { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--tc) 12%, #fff); } .wf-pk-card b { font-size: 12.5px; font-weight: 600; } .wf-pk-card span { font-size: 12px; color: var(--wf-soft); }
.wf-pk-tags { display: flex; gap: 6px; flex-wrap: wrap; } .wf-pk-tags span { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 16%, #fff); font-size: 11.5px; font-weight: 500; color: color-mix(in srgb, var(--tc) 75%, #000); }
.wf-pk-r { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--wf-line); font-size: 12px; } .wf-pk-r span { color: var(--wf-mute); flex: none; } .wf-pk-r b { font-weight: 500; text-align: right; }
.wf-pk-inv { display: flex; flex-direction: column; } .wf-pk-inv > div:first-child { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; } .wf-pk-inv > div:first-child b { font-family: var(--wf-mono); font-size: 13px; } .wf-pk-inv > div:first-child span { font-size: 11.5px; color: var(--wf-mute); }
.wf-pk-cal { display: flex; align-items: center; gap: 14px; } .wf-pk-date { width: 58px; flex: none; text-align: center; border-radius: 14px; background: color-mix(in srgb, var(--tc) 14%, #fff); padding: 6px 0; display: flex; flex-direction: column; line-height: 1.1; } .wf-pk-date i { font-style: normal; font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--tc) 80%, #000); } .wf-pk-date b { font-size: 22px; font-weight: 600; } .wf-pk-date span { font-size: 11px; color: var(--wf-mute); }
.wf-pk-ct { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; } .wf-pk-ct b { font-size: 15px; font-weight: 600; } .wf-pk-ct span { font-size: 12px; color: var(--wf-soft); }

/* ---------- dashboard ---------- */
.wf-v-dash { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; } .wf-v-dash::-webkit-scrollbar { display: none; }
.wf-dash { padding: 0 12px 20px 18px; display: flex; flex-direction: column; gap: 14px; animation: wf-pane 320ms var(--wf-ease) both; }
.wf-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wf-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 24px; background: var(--wf-panel2); }
.wf-card span { font-size: 12.5px; color: var(--wf-mute); } .wf-card b { font-family: var(--wf-mono); font-size: 28px; font-weight: 500; letter-spacing: -0.04em; } .wf-card i { font-style: normal; font-size: 12px; color: var(--wf-soft); }
.wf-panel { border-radius: 26px; background: #fff; border: 1.5px solid var(--wf-line); padding: 16px 10px 8px; } .wf-panel h4 { margin: 0 0 8px 12px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.wf-tr { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 84px minmax(0, 1fr) 96px 128px; gap: 12px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--wf-line); font-size: 13px; }
.wf-th { border-top: 0; font-size: 11.5px; color: var(--wf-mute); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 12px; background: var(--wf-panel2); border-radius: 12px; }
.wf-wn { font-weight: 600; } .wf-tg { color: var(--wf-soft); font-size: 12.5px; } .wf-num, .wf-lr { font-family: var(--wf-mono); font-size: 12.5px; } .wf-lr { color: var(--wf-mute); }
.wf-bar2 { display: flex; align-items: center; gap: 8px; } .wf-bar2 i { flex: 1; height: 6px; border-radius: 3px; background: #e8ece7; position: relative; overflow: hidden; } .wf-bar2 i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--wf-ok); border-radius: 3px; transform-origin: left; animation: wf-grow 900ms var(--wf-ease) both; }
@keyframes wf-grow { from { transform: scaleX(0); } to { transform: none; } }
.wf-bar2 b { font-family: var(--wf-mono); font-size: 12px; font-weight: 500; width: 44px; text-align: right; }
.wf-live { font-style: normal; font-size: 12px; font-weight: 500; padding: 3px 11px; border-radius: 999px; background: #d3f0e2; color: var(--wf-oktxt); justify-self: start; }
.wf-open { height: 30px; padding: 0 13px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--wf-rail); color: #fff; justify-self: start; white-space: nowrap; transition: transform 160ms ease, opacity 160ms ease; } .wf-open:hover { opacity: 0.85; } .wf-open:active { transform: scale(0.96); }
.wf-runs { margin: 0; padding: 0 8px; list-style: none; } .wf-runs li { display: flex; align-items: center; gap: 11px; padding: 10px 6px; border-top: 1px solid var(--wf-line); font-size: 13px; }
.wf-runs li i { width: 8px; height: 8px; border-radius: 50%; background: var(--wf-ok); flex: none; } .wf-runs li.is-retry i { background: var(--wf-warn); }
.wf-runs li span { flex: 1; color: var(--wf-soft); min-width: 0; } .wf-runs li b { color: var(--wf-ink); font-weight: 600; } .wf-runs li em { font-style: normal; font-size: 12px; color: var(--wf-mute); flex: none; }

/* ---------- the window ---------- */
.df-window:has(.wf) { width: min(1280px, 100%); aspect-ratio: 16 / 11; }
.dv-space[data-frame="window"]:has(.wf) { margin-bottom: clamp(200px, 20vw, 320px); }
@media (max-width: 640px) { .df-window:has(.wf) { aspect-ratio: auto; height: min(980px, 97svh); } }

/* ---------- smaller windows: the steps flow down a list, the side panel moves under ---------- */
@container wf (max-width: 1179px) {
  .wf-rail, .wf-tools { display: none; }
  .wf-tabs { display: inline-flex; }
  .wf-choose { padding: 14px 16px 8px; } .wf-choose-l span { display: none; }
  .wf-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .wf-pick { padding: 9px 12px; min-height: 0; gap: 10px; border-radius: 18px; } .wf-pick-i { width: 34px; height: 34px; border-radius: 12px; } .wf-pick-t i { -webkit-line-clamp: 1; }
  .wf-bar { padding: 0 16px 8px; gap: 8px; } .wf-crumb { display: none; } .wf-tabs { margin-right: auto; }
  .wf-v-canvas { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(150px, 34%); padding: 0 16px 12px; gap: 10px; }
  .wf-people { padding: 0 0 8px; } .wf-pt i { display: none; } .wf-person { padding-right: 12px; } .wf-people-l { display: none; } .wf-hint { display: none; }
  .wf-stage { margin: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .wf-fit { position: static; width: auto !important; height: auto !important; transform: none !important; }
  .wf-edges, .wf-eb { display: none; }
  .wf-grid { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px; }
  .wf-node { position: relative; left: auto !important; top: auto !important; width: auto; height: auto; }
  .wf-nb { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 12px 14px; height: auto; } .wf-nt { align-items: flex-start; flex: 1; width: auto; } .wf-ni { width: 34px; } .wf-ns { top: 50%; margin-top: -9px; right: 12px; }
  .wf-ms { left: auto; right: 40px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .wf-port { display: none; }
  .wf-bub { top: 0; }
  .wf-foot { padding: 8px 0 0; gap: 8px 14px; } .wf-run { height: 40px; } .wf-run .wf-rc { width: 34px; height: 34px; }
  .wf-metrics { justify-content: flex-start; gap: 4px 14px; } .wf-m b { font-size: 16px; } .wf-note, .wf-m.is-soft { display: none; }
  .wf-dash { padding: 0 16px 18px; }
  .wf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wf-tr { grid-template-columns: minmax(0, 1fr) 70px 100px; } .wf-tr > :nth-child(2), .wf-tr > :nth-child(5), .wf-tr > :nth-child(6) { display: none; }
  .wf-side { border-radius: 22px; }
}
@container wf (max-width: 560px) {
  .wf-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wf-pick { flex-direction: column; align-items: flex-start; gap: 6px; } .wf-pick-i { width: 28px; height: 28px; } .wf-pick-t i { display: none; } .wf-pick-t b { font-size: 13.5px; }
  .wf-speed span { display: none; } .wf-speed { padding-left: 4px; }
  .wf-metrics { flex-basis: 100%; }
  .wf-grid { grid-template-columns: 1fr; }
  .wf-tr { grid-template-columns: minmax(0, 1fr) 64px; } .wf-tr > :nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wf *, .wf *::before, .wf *::after { animation: none !important; transition: none !important; } }
