/* web/workflows_page.css — [WFX1 workflows-page-v1] · [WFX5 house-layout-v1]
   Workflows on the house layout shared with Agents and Projects (Oct 12
   2026): vertical column (--list) | list with fold groups (--bg) | detail
   (--bg), cards and boxes on --surface; line icons (.wfx-ico); pills by
   meaning - lime done/connected, amber needs you, red failed, accent
   running/vertical/template. Scoped under .wfx; TOKENS ONLY (acceptance
   4.5); every selector defined once; no page-local keyframes (the shimmer
   is brandkit's bk-shimmer). The old .wfp-* markup stays dormant. */

.wfx { display: flex; flex-direction: column; height: 100%; min-height: 0;
  background: var(--bg); color: var(--tb-text); font-size: 14px; }
.wfx * { box-sizing: border-box; }
.wfx button { font: inherit; cursor: pointer; }
.wfx h1, .wfx h2, .wfx h3, .wfx h4 { padding-bottom: 0; border-bottom: 0; }   /* renderer.css bare-h2 rule */
.wfx .wfx-ico { width: 20px; height: 20px; flex: none; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wfx .wfx-ico .fill { fill: currentColor; stroke: none; }

/* ---------- buttons ---------- */
.wfx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-btn); border: 1px solid transparent;
  background: transparent; color: var(--tb-text); font-size: 13.5px; font-weight: 600;
  white-space: nowrap; transition: background-color 120ms ease-out, border-color 120ms ease-out; }
.wfx-btn .wfx-ico { width: 19px; height: 19px; }
.wfx-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.wfx-btn.primary { background: var(--tb-accent); color: var(--white); }
.wfx-btn.primary:hover { background: var(--primary-hover); }
.wfx-btn.secondary { border-color: var(--tb-border-strong); }
.wfx-btn.secondary:hover { border-color: var(--border-hover); background: var(--surface-2); }
.wfx-btn.danger { background: var(--tb-danger-fill); color: var(--white); }
.wfx-btn:disabled { opacity: .45; cursor: not-allowed; }
.wfx-ibtn { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center;
  justify-content: center; border-radius: var(--radius-btn); border: 1px solid var(--tb-border-strong);
  background: transparent; color: var(--tb-text-secondary); }
.wfx-ibtn.sm { width: 30px; height: 30px; }
.wfx-ibtn:hover { color: var(--tb-text); border-color: var(--border-hover); background: var(--surface-2); }
.wfx-ibtn:disabled { opacity: .45; }
.wfx-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0;
  background: none; color: var(--tb-accent-text); font-size: 13px; font-weight: 600; }
.wfx-link .wfx-ico { width: 18px; height: 18px; }
.wfx-link:hover { color: var(--tb-accent-hover); }

/* ---------- pills + labels ---------- */
.wfx-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 999px; border: 1px solid transparent; font-size: 12px; font-weight: 600;
  white-space: nowrap; flex: none; background: none; }
.wfx-pill .wfx-ico { width: 16px; height: 16px; }
.wfx-pill.dot i { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.wfx-pill.ok { color: var(--tb-success-text); background: var(--tb-success-soft); }
.wfx-pill.warn { color: var(--tb-warning-text); background: var(--tb-warning-soft); }
.wfx-pill.bad { color: var(--tb-danger); background: var(--tb-danger-soft); }
.wfx-pill.run, .wfx-pill.accent { color: var(--tb-accent-text); background: var(--tb-accent-soft); }
.wfx-pill.neutral, .wfx-pill.outline { color: var(--tb-text-secondary); border-color: var(--tb-border-strong); }
.wfx-pill.ghost { color: var(--tb-text-muted); border: 1px dashed var(--tb-border-strong); }
button.wfx-pill:not(:disabled) { cursor: pointer; }
button.wfx-pill.ghost:hover { color: var(--tb-accent-text); border-color: var(--tb-accent-border); }
.wfx-seclabel { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tb-text-muted); }
.wfx-muted { margin: 4px 0; color: var(--tb-text-muted); font-size: 13px; line-height: 1.5; }
.wfx-alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px;
  border: 1px solid var(--tb-danger-tint-bd); background: var(--tb-danger-soft);
  border-radius: var(--radius-card); color: var(--tb-text); font-size: 13px; }
.wfx-alert span { flex: 1; }

/* ---------- home: three columns ---------- */
.wfx.wfx-home { flex-direction: row; overflow: hidden; }
.wfx-side { width: 240px; min-width: 240px; background: var(--list);
  border-right: 1px solid var(--tb-border); padding: 16px 14px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: var(--tb-border-strong) transparent; }
.wfx-side .wfx-new { width: 100%; height: 36px; padding: 0 14px; font-size: 13px; font-weight: 600; border-radius: var(--radius-btn, 8px); }
.wfx-side .wfx-seclabel { margin: 6px 0 -6px 4px; }
.wfx-fns { display: flex; flex-direction: column; gap: 2px; }
.wfx-fn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: var(--radius-btn);
  background: transparent; color: var(--tb-text-secondary); text-align: left;
  font-size: 13.5px; font-weight: 500; }
.wfx-fn:hover { background: var(--surface-2); color: var(--tb-text); }
.wfx-fn .ic { width: 28px; height: 28px; flex: none; display: flex; align-items: center;
  justify-content: center; border-radius: 8px; background: var(--surface-2); color: var(--tb-text-secondary); }
.wfx-fn .ic .wfx-ico { width: 17px; height: 17px; }
.wfx-fn .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfx-fn .n { color: var(--tb-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wfx-fn[aria-pressed="true"] { background: var(--selected-fill); color: var(--tb-text);
  border-color: color-mix(in srgb, var(--tb-accent-border) 40%, transparent); }
.wfx-fn[aria-pressed="true"] .ic { color: var(--tb-accent-text); }
.wfx-fn.appr .ic { background: var(--tb-warning-soft); color: var(--tb-warning-text); }
.wfx-fn.appr .n { color: var(--tb-warning-text); font-weight: 700; }

.wfx-list { width: 380px; min-width: 300px; border-right: 1px solid var(--tb-border);
  padding: 16px; overflow-y: auto; background: var(--bg);
  scrollbar-width: thin; scrollbar-color: var(--tb-border-strong) transparent; }
.wfx-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.wfx-tools .wfx-search { flex: 1; min-width: 0; margin-bottom: 0; }
.wfx-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  margin-bottom: 0; background: var(--tb-surface); border: 1px solid var(--tb-border-strong);
  border-radius: var(--radius-input, 8px); color: var(--tb-text-muted); }
.wfx-search:focus-within { border-color: var(--tb-accent-border); }
.wfx-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none;
  background: transparent; color: var(--tb-text); font: inherit; font-size: 13px; }
.wfx-search input::placeholder { color: var(--tb-placeholder); }
.wfx-group { margin-bottom: 14px; }
.wfx-group > .h { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px;
  margin: 0 0 8px; padding: 0 6px; border: 0; border-radius: var(--radius-btn);
  background: transparent; color: var(--tb-text-secondary); text-align: left; }
.wfx-group > .h:hover { background: var(--surface-2); color: var(--tb-text); }
.wfx-group > .h .chev { width: 18px; height: 18px; color: var(--tb-text-muted);
  transition: transform 150ms ease-out; }
.wfx-group.shut > .h .chev { transform: rotate(-90deg); }
.wfx-group > .h .t { flex: 1; font-size: 13px; font-weight: 600; }
.wfx-group > .h .n { color: var(--tb-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wfx-group.shut > .rows { display: none; }
.wfx-lcard { display: block; width: 100%; margin-bottom: 10px; padding: 14px 16px; text-align: left;
  background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--radius-card);
  color: var(--tb-text); transition: border-color 120ms ease-out; }
.wfx-lcard:hover { border-color: var(--tb-border-strong); }
.wfx-lcard.sel { border-color: var(--tb-accent-border);
  background: color-mix(in srgb, var(--tb-accent) 7%, var(--tb-surface)); }
.wfx-lcard .t { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.wfx-lcard .s { margin-bottom: 10px; color: var(--tb-text-muted); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wfx-lcard .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wfx-lcard .pills:empty { display: none; }
.wfx-lcard .m { margin-top: 10px; color: var(--tb-text-muted); font-size: 12px; }
.wfx-listempty { padding: 8px 4px; color: var(--tb-text-muted); font-size: 13px; }
.wfx-listempty p { margin: 0 0 6px; }
.wfx-hiddenbar { margin: 8px 4px; color: var(--tb-text-muted); font-size: 12.5px; }
.wfx-skel { height: 96px; margin-bottom: 10px; border-radius: var(--radius-card);
  border: 1px solid var(--tb-border);
  background: linear-gradient(90deg, var(--tb-surface) 0%, var(--tb-surface-2) 45%, var(--tb-surface) 90%);
  background-size: 200% 100%; animation: bk-shimmer 1.8s linear infinite; }
.wfx-skel.box { height: 170px; margin: 0; }

.wfx-main { flex: 1; min-width: 0; overflow-y: auto; padding: 28px 32px 48px; background: var(--bg);
  scrollbar-width: thin; scrollbar-color: var(--tb-border-strong) transparent; }
.wfx-side::-webkit-scrollbar, .wfx-list::-webkit-scrollbar, .wfx-main::-webkit-scrollbar,
.wfx-pbody::-webkit-scrollbar { width: 6px; }
.wfx-side::-webkit-scrollbar-thumb, .wfx-list::-webkit-scrollbar-thumb,
.wfx-main::-webkit-scrollbar-thumb, .wfx-pbody::-webkit-scrollbar-thumb {
  background: var(--tb-border-strong); border-radius: 999px; }
.wfx-side::-webkit-scrollbar-track, .wfx-list::-webkit-scrollbar-track,
.wfx-main::-webkit-scrollbar-track, .wfx-pbody::-webkit-scrollbar-track { background: transparent; }
.wfx-pick { max-width: 520px; margin: 64px auto; text-align: center; }
.wfx-pick .glyph { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tb-accent-soft); color: var(--tb-accent-text); }
.wfx-pick .glyph .wfx-ico { width: 26px; height: 26px; }
.wfx-pick h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.wfx-pick p { margin: 0; color: var(--tb-text-secondary); font-size: 15px; line-height: 1.55; }

/* detail */
.wfx-dhead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.wfx-dhead h1 { margin: 0; min-width: 0; font-size: 26px; font-weight: 700; line-height: 1.2;
  letter-spacing: -.01em; overflow-wrap: anywhere; }
.wfx-dhead .sp, .wfx-wfhead .sp { flex: 1; }
.wfx .acts { display: flex; align-items: center; gap: 8px; flex: none; }
.wfx-menuwrap { position: relative; }
.wfx-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 200px;
  padding: 6px; background: var(--tb-bg-panel); border: 1px solid var(--tb-border-strong);
  border-radius: 14px; box-shadow: var(--shadow-pop); }
.wfx-menu button { display: flex; width: 100%; padding: 9px 10px; border: 0;
  border-radius: var(--radius-btn); background: none; color: var(--tb-text); text-align: left;
  font-size: 13.5px; }
.wfx-menu button:hover { background: var(--surface-2); }
.wfx-menu button.danger { color: var(--tb-danger); }
.wfx-menu .sep { height: 1px; margin: 6px 4px; background: var(--tb-border); }
.wfx-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
  color: var(--tb-text-muted); font-size: 13px; }
.wfx-lead { max-width: 820px; margin: 0 0 18px; color: var(--tb-text-secondary);
  font-size: 15px; line-height: 1.6; }
.wfx-status { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px;
  border: 1px solid var(--tb-border); border-radius: var(--radius-card); background: var(--tb-surface); }
.wfx-status .ic { flex: none; display: flex; color: var(--tb-text-muted); }
.wfx-status .ic .wfx-ico { width: 22px; height: 22px; }
.wfx-status .b { flex: 1; min-width: 0; }
.wfx-status .lvl { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.wfx-status .m { color: var(--tb-text-secondary); font-size: 13px; line-height: 1.5; }
.wfx-status.ok { border-color: color-mix(in srgb, var(--tb-success) 40%, transparent);
  background: var(--tb-success-soft); }
.wfx-status.ok .ic, .wfx-status.ok .lvl { color: var(--tb-success-text); }
.wfx-status.warn { border-color: var(--tb-warning-tint-bd); background: var(--tb-warning-soft); }
.wfx-status.warn .ic, .wfx-status.warn .lvl { color: var(--tb-warning-text); }
.wfx-status.bad { border-color: var(--tb-danger-tint-bd); background: var(--tb-danger-soft); }
.wfx-status.bad .ic, .wfx-status.bad .lvl { color: var(--tb-danger); }
.wfx-status.run { border-color: var(--tb-accent-border); background: var(--tb-accent-soft); }
.wfx-status.run .ic, .wfx-status.run .lvl { color: var(--tb-accent-text); }
.wfx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wfx-box { min-width: 0; padding: 16px 18px; background: var(--tb-surface);
  border: 1px solid var(--tb-border); border-radius: var(--radius-card); }
.wfx-boxhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wfx-mstep { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.wfx-mstep .n { width: 22px; height: 22px; flex: none; display: flex; align-items: center;
  justify-content: center; border-radius: 999px; background: var(--surface-2);
  color: var(--tb-text-secondary); font-size: 12px; font-weight: 700; }
.wfx-mstep .b { flex: 1; min-width: 0; }
.wfx-mstep .t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13.5px; font-weight: 600; }
.wfx-mstep .s { color: var(--tb-text-muted); font-size: 12.5px; }
.wfx-mrun { display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--tb-border); font-size: 13px; }
.wfx-boxhead + .wfx-mrun { border-top: 0; }
.wfx-mrun .w { flex: 1; color: var(--tb-text-secondary); }
.wfx-mrun .c { color: var(--tb-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wfx-src { display: flex; align-items: center; gap: 12px; padding: 8px 0;
  border-top: 1px solid var(--tb-border); }
.wfx-boxhead + .wfx-src { border-top: 0; }
.wfx-src .lg { width: 30px; height: 30px; flex: none; display: flex; align-items: center;
  justify-content: center; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--tb-border); color: var(--tb-text-secondary); font-size: 12px; font-weight: 700; }
.wfx-src .t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.wfx-inp { display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--tb-border); font-size: 13.5px; }
.wfx-boxhead + .wfx-inp { border-top: 0; }
.wfx-inp .t { flex: 1; }
.wfx-inp .r { color: var(--tb-text-muted); font-size: 12px; }

/* approvals queue (detail column) */
.wfx-appr { margin-bottom: 22px; }
.wfx-appr .hd { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.wfx-appr .hd h3 { margin: 0; font-size: 16px; font-weight: 700; }
.wfx-appr .hd .sp { flex: 1; }
.wfx-apcard { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; padding: 14px 16px;
  background: var(--tb-surface); border: 1px solid var(--tb-warning-tint-bd); border-radius: var(--radius-card);
  animation: wfx-glow 2s ease-in-out infinite; }
@keyframes wfx-glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 6px var(--tb-warning-soft); } }
@media (prefers-reduced-motion: reduce) { .wfx-apcard { animation: none; } }
.wfx-apcard .ic { flex: none; display: flex; color: var(--tb-warning-text); margin-top: 2px; }
.wfx-apcard .bd { flex: 1; min-width: 0; }
.wfx-apcard .nm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; }
.wfx-apcard .sum { margin-top: 4px; color: var(--tb-text-secondary); font-size: 13px; line-height: 1.5; }
.wfx-apcard .who { margin-top: 4px; color: var(--tb-text-muted); font-size: 12px; }
.wfx-apcard .acts { flex-direction: column; align-items: stretch; }

/* ---------- full-page screens (wf / choice / builder) ---------- */
.wfx.wfx-page { overflow: hidden; }
.wfx-wfhead { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 20px;
  background: var(--list); border-bottom: 1px solid var(--tb-border); flex: none; }
.wfx-wfhead h2 { margin: 0; min-width: 0; font-size: 17px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfx-wfhead .pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
/* [prjx3-x-corner-v1] / [NAV1] RETIRED with #viewclose — see Removed-for-redesign.md 1.2
.wfx-head { padding-right: 72px; } */
.wfx-pbody { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 32px 48px;
  scrollbar-width: thin; scrollbar-color: var(--tb-border-strong) transparent; }
.wfx-tabs { display: flex; gap: 22px; margin-bottom: 20px; border-bottom: 1px solid var(--tb-border); }
.wfx-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 2px 12px;
  border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--tb-text-secondary); font-weight: 600; }
.wfx-tabs button:hover { color: var(--tb-text); }
.wfx-tabs button.on { color: var(--tb-text); border-bottom-color: var(--tb-accent-border); }
.wfx-tabs .chip { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--surface-2); color: var(--tb-text-secondary); font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; }

/* steps tab: a numbered timeline */
.wfx-steps { max-width: 860px; }
.wfx-branchnote { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px;
  border: 1px solid var(--tb-accent-border); background: var(--tb-accent-soft);
  border-radius: var(--radius-card); font-size: 13px; }
.wfx-branchnote .ic { display: flex; color: var(--tb-accent-text); }
.wfx-branchnote > span:nth-child(2) { flex: 1; }
.wfx-step { position: relative; display: flex; gap: 14px; padding: 0 0 14px; }
.wfx-step::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0;
  width: 2px; background: var(--tb-border); }
.wfx-step:last-child::before { display: none; }
.wfx-step .ic { width: 32px; height: 32px; flex: none; display: flex; align-items: center;
  justify-content: center; border-radius: 999px; background: var(--tb-surface);
  border: 1px solid var(--tb-border-strong); color: var(--tb-text-secondary);
  font-size: 13px; font-weight: 700; position: relative; }
.wfx-step .bd { flex: 1; min-width: 0; padding: 12px 16px; background: var(--tb-surface);
  border: 1px solid var(--tb-border); border-radius: var(--radius-card); }
.wfx-step .nm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wfx-step .nm .tt { font-size: 14.5px; font-weight: 600; }
.wfx-step .sum { margin-top: 4px; color: var(--tb-text-secondary); font-size: 13px; line-height: 1.5; }
.wfx-step .who { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px;
  color: var(--tb-text-muted); font-size: 12.5px; }
.wfx-step .conn { display: inline-flex; align-items: center; gap: 6px; }
.wfx .cdot { width: 7px; height: 7px; border-radius: 999px; background: var(--tb-text-muted); }
.wfx .cdot.green { background: var(--tb-success); }
.wfx .cdot.amber, .wfx .cdot.yellow { background: var(--tb-warning); }
.wfx .cdot.red { background: var(--tb-danger); }

/* canvas tab */
.wfx-canvas-wrap { position: relative; height: calc(100% - 70px); min-height: 420px;
  overflow: auto; border: 1px solid var(--tb-border); border-radius: var(--radius-card);
  background-color: var(--tb-surface);
  background-image: radial-gradient(var(--tb-border) 1px, transparent 1px);
  background-size: 20px 20px; }
.wfx-canvas-inner { position: relative; min-width: 100%; min-height: 100%;
  transform-origin: 0 0; transition: transform 120ms ease-out; }
.wfx-canvas-inner svg { position: absolute; inset: 0; width: 4000px; height: 3000px;
  overflow: visible; pointer-events: none; }
.wfx-canvas-inner svg path { fill: none; stroke: var(--tb-border-strong); stroke-width: 2; }
.wfx-node { position: absolute; width: 220px; min-height: 76px; padding: 12px 14px;
  background: var(--tb-bg-panel); border: 1px solid var(--tb-border-strong);
  border-radius: var(--radius-card); box-shadow: var(--shadow-pop); }
.wfx-node.gate { border-color: var(--tb-warning-tint-bd); }
.wfx-node .nm { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.wfx-node .nm .n { width: 20px; height: 20px; flex: none; display: flex; align-items: center;
  justify-content: center; border-radius: 999px; background: var(--surface-2);
  color: var(--tb-text-secondary); font-size: 12px; }
.wfx-node .by { margin-top: 6px; color: var(--tb-text-muted); font-size: 12px; }
.wfx-muted.pad { padding: 24px; }
.wfx-zoom { position: sticky; left: calc(100% - 140px); bottom: 14px; display: inline-flex; gap: 4px;
  padding: 4px; background: var(--tb-bg-panel); border: 1px solid var(--tb-border-strong);
  border-radius: var(--radius-btn); box-shadow: var(--shadow-pop); }
.wfx-zoom button { width: 32px; height: 32px; display: inline-flex; align-items: center;
  justify-content: center; border: 0; border-radius: 8px; background: none; color: var(--tb-text-secondary); }
.wfx-zoom button:hover { background: var(--surface-2); color: var(--tb-text); }

/* run form (fields come from the shared .frm-* component) */
.wfx-runform { max-width: 640px; padding: 24px; background: var(--tb-surface);
  border: 1px solid var(--tb-border); border-radius: var(--radius-card); }
.wfx-runform h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.wfx-runform .sub { margin: 0 0 20px; color: var(--tb-text-secondary); font-size: 14px; line-height: 1.5; }
.wfx-runform .acts { justify-content: flex-end; margin-top: 8px; }

/* runs tab */
.wfx-runs { max-width: 1000px; }
.wfx-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
  background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--radius-card); }
.wfx-table th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--tb-text-muted);
  border-bottom: 1px solid var(--tb-border); }
.wfx-table td { padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid var(--tb-border);
  vertical-align: middle; }
.wfx-table tbody tr:last-child td { border-bottom: 0; }
.wfx-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.wfx-table td.acts { justify-content: flex-end; gap: 6px; display: table-cell; text-align: right;
  white-space: nowrap; }
.wfx-table td.acts > * { margin-left: 6px; vertical-align: middle; }
.wfx-runfail-row td { background: var(--bg); }
.wfx-runfail { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.wfx-runfail .srow { display: flex; align-items: center; gap: 10px; }
.wfx-runfail .srow .t { font-weight: 600; }
.wfx-runfail .srow .e { color: var(--tb-text-secondary); }
.wfx-runfail .q { margin: 0; color: var(--tb-accent-text); }
.wfx-runfail .log { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--tb-border);
  border-radius: var(--radius-input); background: var(--tb-surface); }
.wfx-runfail .log .l { color: var(--tb-text-secondary); font-size: 12.5px; padding: 2px 0; }
.wfx-batch { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px;
  border: 1px dashed var(--tb-border-strong); border-radius: var(--radius-card); }
.wfx-batch .ic { width: 34px; height: 34px; flex: none; display: flex; align-items: center;
  justify-content: center; border-radius: 9px; background: var(--surface-2); color: var(--tb-text-secondary); }
.wfx-batch .b { flex: 1; min-width: 0; }
.wfx-batch .t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.wfx-batch .s { margin-top: 2px; color: var(--tb-text-muted); font-size: 12.5px; line-height: 1.5; }

/* settings tab */
.wfx-settings { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.wfx-setcard { padding: 18px 20px; background: var(--tb-surface);
  border: 1px solid var(--tb-border); border-radius: var(--radius-card); }
.wfx-setcard h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.wfx-setcard .sub { margin: 0 0 12px; color: var(--tb-text-muted); font-size: 13px; }
.wfx-setcard .drow { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--tb-border);
  font-size: 13.5px; }
.wfx-setcard .drow .l { width: 120px; flex: none; color: var(--tb-text-muted); }
.wfx-setcard .danger-zone { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* empty states + error pane */
.wfx-empty { max-width: 460px; margin: 40px auto; text-align: center; }
.wfx-empty .tile { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tb-accent-soft); color: var(--tb-accent-text); }
.wfx-empty .tile .wfx-ico { width: 26px; height: 26px; }
.wfx-empty h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.wfx-empty p { margin: 0 0 16px; color: var(--tb-text-secondary); font-size: 14px; line-height: 1.55; }
.wfx-errorpane { max-width: 520px; margin: 40px auto; padding: 22px; text-align: center;
  background: var(--tb-surface); border: 1px solid var(--tb-danger-tint-bd); border-radius: var(--radius-card); }
.wfx-errorpane h3 { margin: 0 0 6px; font-size: 17px; }
.wfx-errorpane p { margin: 0 0 14px; color: var(--tb-text-secondary); }

/* choice screen */
.wfx-choice { max-width: 960px; margin: 0; }
.wfx-choice h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.wfx-choice > .sub { margin: 0 0 22px; color: var(--tb-text-secondary); font-size: 15px; }
.wfx-choice .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.wfx-choice .cc { display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px; text-align: left; background: var(--tb-surface); border: 1px solid var(--tb-border);
  border-radius: var(--radius-card); color: var(--tb-text); transition: border-color 120ms ease-out; }
.wfx-choice .cc:hover { border-color: var(--tb-accent-border); }
.wfx-choice .cc .tile { width: 36px; height: 36px; margin-bottom: 6px; display: flex; align-items: center;
  justify-content: center; border-radius: 10px; background: var(--tb-accent-soft); color: var(--tb-accent-text); }
.wfx-choice .cc h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15.5px; font-weight: 700; }
.wfx-choice .cc p { margin: 0; color: var(--tb-text-secondary); font-size: 13.5px; line-height: 1.5; }
.wfx-choice .cc .eg { margin-top: 4px; color: var(--tb-text-muted); font-size: 12.5px; }
.wfx-choice .tplh { margin: 28px 0 10px; }
.wfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wfx-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; cursor: pointer;
  background: var(--tb-surface); border: 1px solid var(--tb-border); border-radius: var(--radius-card);
  transition: border-color 120ms ease-out; }
.wfx-card:hover { border-color: var(--tb-border-strong); }
.wfx-card .t { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; font-weight: 600; }
.wfx-card .t .nm { flex: 0 1 auto; min-width: 0; }
.wfx-card .d { flex: 1; color: var(--tb-text-secondary); font-size: 13px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wfx-card .foot { display: flex; align-items: center; gap: 8px; }
.wfx-card .foot .m { color: var(--tb-text-muted); font-size: 12px; }
.wfx-card .foot .sp { flex: 1; }

/* builder: chat | divider | step preview */
.wfx-builder { flex: 1; min-height: 0; display: flex; }
.wfx-b-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.wfx-b-log { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 32px;
  display: flex; flex-direction: column; gap: 12px; }
.wfx-b-log .m { max-width: 720px; padding: 11px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.55; }
.wfx-b-log .m.assistant { align-self: flex-start; background: var(--tb-surface); border: 1px solid var(--tb-border); }
.wfx-b-log .m.user { align-self: flex-end; background: var(--tb-accent-soft); color: var(--tb-text); }
.wfx-b-log .m.thinking { align-self: flex-start; color: var(--tb-text-muted); font-style: italic; }
/* [BK12 warn-v1] error/conflict line: warn icon + text, no ⚠ glyph */
.wfx-b-log .m.wfx-warn { align-self: flex-start; display: inline-flex; align-items: flex-start;
  gap: 8px; background: var(--tb-warning-soft); border: 1px solid var(--tb-warning); }
.wfx-b-log .m.wfx-warn .wfx-ico { color: var(--tb-warning); margin-top: 1px; }
/* [BK12 spinner-v1] busy row: shared .bk-spin + label */
.wfx-think { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  color: var(--tb-text-muted); font-style: italic; font-size: 14px; }
.wfx-loadrow { display: inline-flex; align-items: center; gap: 8px; }
.wfx-b-in { display: flex; align-items: flex-end; gap: 10px; margin: 0 32px 24px; padding: 10px 10px 10px 14px;
  background: var(--tb-surface); border: 1px solid var(--tb-border-strong); border-radius: var(--radius-pop); }
.wfx-b-in:focus-within { border-color: var(--tb-accent-border); }
.wfx-b-in textarea { flex: 1; min-height: 44px; max-height: 200px; padding: 4px 0; resize: none;
  border: 0; outline: none; background: transparent; color: var(--tb-text); font: inherit; line-height: 1.5; }
.wfx-send { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center;
  justify-content: center; border: 0; border-radius: var(--radius-btn);
  background: var(--tb-accent); color: var(--white); }
.wfx-send:hover { background: var(--primary-hover); }
/* [split-drag-v1] divider between the chat and the step preview */
.wfx-split { width: 6px; min-width: 6px; margin-left: -6px; padding: 0; border: none;
  background: transparent; cursor: col-resize; align-self: stretch; position: relative; z-index: 2; }
.wfx-split:hover { background: var(--tb-accent-soft); }
.wfx-b-side { flex: 0 0 360px; max-width: 42%; min-width: 260px; overflow-y: auto; padding: 20px;
  background: var(--list); border-left: 1px solid var(--tb-border); }
.wfx-b-side > .wfx-seclabel { margin-bottom: 12px; }

/* dialogs + transient strips (body-level: carry their own type) */
.wfx-scrim { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  justify-content: center; background: color-mix(in srgb, var(--tb-bg) 70%, transparent);
  font-family: var(--font); font-size: 14px; color: var(--tb-text); }
.wfx-dlg { width: 420px; max-width: 92vw; padding: 22px; background: var(--tb-bg-panel);
  border: 1px solid var(--tb-border-strong); border-radius: 18px; box-shadow: var(--shadow-pop); }
.wfx-dlg h3 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.wfx-dlg ul { margin: 0 0 16px; padding-left: 18px; color: var(--tb-text-secondary);
  font-size: 14px; line-height: 1.6; }
.wfx-dlg .acts { display: flex; justify-content: flex-end; gap: 10px; }
.wfx-dlg .wfx-btn { font-family: inherit; cursor: pointer; }
.wfx-affected { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 70;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 80vw; padding: 10px 14px;
  background: var(--tb-bg-panel); border: 1px solid var(--tb-border-strong); border-radius: 12px;
  box-shadow: var(--shadow-pop); font-family: var(--font); font-size: 13px; color: var(--tb-text); }

@media (max-width: 1100px) {
  .wfx-grid2, .wfx-choice .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .wfx.wfx-home { flex-direction: column; overflow-y: auto; }
  .wfx-side, .wfx-list { width: 100% !important; min-width: 0; border-right: 0;
    border-bottom: 1px solid var(--tb-border); overflow: visible; }
  .wfx-main, .wfx-pbody { padding: 20px 16px; overflow: visible; }
  .wfx-split, .wfx-b-side { display: none; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .wfx.wfx-home { flex-direction: row; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .wfx-skel { animation: none; }
  .wfx-btn, .wfx-lcard, .wfx-card, .wfx-choice .cc, .wfx-group > .h .chev,
  .wfx-canvas-inner { transition: none; }
}
