/* Authoring > Workflows - destination atoms, namespace wf-*. Lifted verbatim from the approved canon
   docs/design-canon/threshold-workflow-builder-shell/handoff/workflows/workflows.css; loaded after
   threshold-dialog.css. Change the canon first, then lift again.
   Every rule is scoped under .wf-authoring or a wf- class. Every colour is a shipped --th-* or --cx-*
   token, so light and dark are declared together; literals are sizes, radii and weights only, lifted
   from the prototype (../../Workflow Authoring.dc.html), whose inline styles these classes replace.
   Everything else on the page is shipped: cc-* chrome, apdsw-* switcher, ThresholdGrid (th-grid-*),
   af-chip-* (FilterChip), th-field / th-input / th-textarea, th-banner, th-denied, th-fb, th-fb-load,
   the shared ThresholdDialog (th-scrim.is-dialog, th-modal.is-confirm) and the work panel (th-wq-panel).

   The page body (.wf-page) is a size container, so the 720 reflow follows the pane, not the viewport.
   Dialogs, the run panel and the walkthrough drawer render beside it, outside the container, so their
   fixed layers keep the layout root as their containing block (dialog canon C1). */

/* ---------------- page ---------------- */
.wf-authoring { color: var(--th-ink); font-family: var(--th-font-sans); font-size: var(--th-size-14); }
.wf-page { container-type: inline-size; container-name: wf; display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.wf-authoring .cc-btn { white-space: nowrap; }
/* The authoring accent: copper re-scopes the primary button, as threshold-chrome.css does for the
   form builder and the rules editor. Dialog confirms never carry .is-primary. */
.wf-authoring .cc-btn.is-primary { background: var(--cx-action); border-color: var(--cx-action); color: var(--cx-ink-on-action); }
.wf-authoring .cc-btn.is-primary:hover { background: var(--cx-action-hover); border-color: var(--cx-action-hover); }
.wf-authoring .cc-btn.is-primary:focus-visible { box-shadow: 0 0 0 3px var(--cx-action-soft-strong); border-color: var(--cx-action); }
.wf-authoring a { color: var(--th-advant-deep); text-decoration: none; }
.wf-authoring a:hover { color: var(--th-advant); text-decoration: underline; text-underline-offset: 2px; }
.wf-gutter { padding: 0 24px 30px; display: flex; flex-direction: column; gap: 18px; }
.wf-head-list { flex-wrap: wrap; }
.wf-head-list .sub strong { color: var(--th-ink); font-weight: 600; }
.wf-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wf-mono { font-family: var(--th-font-mono); }
.wf-nb { white-space: nowrap; }
.wf-sep { color: var(--th-ink-4); }
.wf-quiet { color: var(--th-ink-3); }

/* ---------------- list: sections and rows ---------------- */
.wf-section { background: var(--th-paper-sunk); border: 1px solid var(--th-line); border-radius: var(--th-radius-5); }
.wf-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 24px; padding: 13px 18px 11px; border-bottom: 1px solid var(--th-line); flex-wrap: wrap; }
.wf-section__head .cc-eyebrow { margin-bottom: 4px; }
.wf-section__title { font-family: var(--th-font-serif); font-size: var(--th-size-17); font-weight: 600; color: var(--th-ink); }
.wf-section__meta { font-size: var(--th-size-13); color: var(--th-ink-3); }
.wf-section__meta b { color: var(--th-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.wf-section__note { font-size: 12.5px; color: var(--th-ink-3); max-width: 52ch; text-align: right; line-height: 1.5; }
.wf-section__foot { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--th-line); padding: 10px 18px; font-size: 11.5px; color: var(--th-ink-3); }
.wf-section__foot svg { color: var(--th-ink-4); flex: none; }
.wf-rows { list-style: none; margin: 0; padding: 0; }
.wf-rows.is-builtin { background: repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in oklab, var(--th-paper-2) 55%, transparent) 9px 18px); }
.wf-row { border-bottom: 1px solid var(--th-line-soft); position: relative; }
.wf-row:last-child { border-bottom: 0; }
.wf-row__main { display: grid; grid-template-columns: 26px 158px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px 14px 4px; cursor: pointer; }
.wf-rows.is-builtin .wf-row__main { padding-top: 12px; padding-bottom: 12px; }
.wf-row__main:hover { background: var(--th-paper-2); }
.wf-row__main:focus-visible { outline: 2px solid var(--th-advant); outline-offset: -2px; }
/* Addition to the canon sheet: a row that opens nothing (no role=link) must not look clickable. */
.wf-row__main:not([role="link"]) { cursor: default; }
.wf-row__main:not([role="link"]):hover { background: transparent; }
.wf-row__handle { display: inline-flex; justify-content: center; color: var(--th-ink-4); }
.wf-rows.is-builtin .wf-row__handle { cursor: default; }
.wf-when { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wf-when__label { font-family: var(--th-font-mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--th-ink-4); }
.wf-when__value { font-size: 12px; font-weight: 600; color: var(--th-ink-2); }
.wf-row__body { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.wf-row__name { font-size: var(--th-size-14); font-weight: 600; color: var(--th-ink); display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wf-row__line { font-size: 11.5px; color: var(--th-ink-3); display: inline-flex; align-items: center; gap: 6px; }
.wf-row__line.is-error { color: var(--th-risk-ink); }
.wf-row__line svg { flex: none; }
.wf-row__right { display: flex; align-items: center; justify-content: flex-end; gap: 8px 12px; flex-wrap: wrap; }
.wf-badge { font-family: var(--th-font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--th-ink-3); background: var(--th-paper-2); border: 1px solid var(--th-line-2); border-radius: var(--th-radius-pill); padding: 2px 8px; white-space: nowrap; }
.wf-badge.is-yours { color: var(--cx-action-hover); background: var(--cx-action-soft); border-color: var(--cx-action-border); }
.wf-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.wf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--th-radius-pill); font-size: 11px; background: var(--th-paper-2); color: var(--th-ink-2); border: 1px solid var(--th-line); white-space: nowrap; }
.wf-chip.is-send { background: var(--cx-action-soft); color: var(--cx-action-hover); border-color: var(--cx-action-border); }
.wf-chip__arrow { color: var(--th-ink-4); font-size: 11px; }
.wf-timing { font-family: var(--th-font-serif); font-style: italic; font-size: 11.5px; color: var(--th-ink-4); }
.wf-switchword { display: inline-flex; align-items: center; gap: 7px; }
.wf-switchword__word { font-size: 11.5px; color: var(--th-ink-2); min-width: 22px; }
.wf-kebab.cc-icon-btn { width: 24px; height: 24px; }
.wf-menu-host { position: relative; display: inline-flex; }
.wf-archived-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.wf-row__restore { display: flex; align-items: center; gap: 10px; }

/* Row, step and workflow menus. In the app they render in the portal layer, positioned from the
   trigger's rect; a specimen anchors them to their trigger, right-aligned to the kebab. */
.wf-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; width: 262px; background: var(--th-paper-sunk); border: 1px solid var(--th-line-2); border-radius: var(--th-radius-5); box-shadow: var(--cx-shadow-popover); padding: 5px; text-align: left; }
.wf-menu.is-above { top: auto; bottom: calc(100% + 4px); }
.wf-menu.is-left { right: auto; left: 0; }
.wf-menu__item { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 7px 9px; border: 0; background: transparent; border-radius: var(--th-radius-3); font: inherit; font-size: 12.5px; color: var(--th-ink); text-align: left; cursor: pointer; }
.wf-menu__item:hover, .wf-menu__item:focus-visible { background: var(--th-paper-2); outline: none; }
.wf-menu__item svg { color: var(--th-ink-3); flex: none; margin-top: 2px; }
.wf-menu__item.is-risk { color: var(--th-risk); }
.wf-menu__item.is-risk svg { color: var(--th-risk); }
.wf-menu__sub { display: block; font-size: 11px; color: var(--th-ink-3); margin-top: 2px; line-height: 1.4; }
.wf-menu__sep { height: 1px; background: var(--th-line); margin: 4px 0; }
.wf-menu__note { display: grid; grid-template-columns: 14px 1fr; gap: 9px; align-items: start; padding: 7px 9px 4px; font-size: 11.5px; color: var(--th-ink-3); line-height: 1.45; }
.wf-menu__note svg { color: var(--th-ink-4); margin-top: 2px; }

/* Empty definition (TRN-27) */
.wf-empty { padding: 44px 28px 34px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.wf-empty__glyph { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--cx-action-soft); color: var(--cx-action-hover); border: 1px solid var(--cx-action-border); margin-bottom: 16px; }
.wf-empty__title { font-family: var(--th-font-serif); font-size: 21px; font-weight: 500; color: var(--th-ink); letter-spacing: -0.01em; }
.wf-empty__title em { color: var(--cx-action-hover); }
.wf-empty__body { font-size: 13px; color: var(--th-ink-2); line-height: 1.65; max-width: 64ch; margin: 10px 0 20px; }
.wf-empty__body strong { color: var(--th-ink); font-weight: 600; }
.wf-empty__acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Skeleton widths (no inline widths in a lifted fragment). */
.wf-skel-row { display: grid; grid-template-columns: 26px 158px minmax(0, 1fr) 220px; gap: 14px; align-items: center; padding: 18px 16px 18px 4px; border-bottom: 1px solid var(--th-line-soft); }
.wf-skel-row:last-child { border-bottom: 0; }
.wf-skel-row .th-grid-skel.is-w30 { width: 30%; }
.wf-skel-row .th-grid-skel.is-w45 { width: 45%; }
.wf-skel-row .th-grid-skel.is-w60 { width: 60%; }
.wf-skel-row .th-grid-skel.is-w75 { width: 75%; }
.wf-skel-row .th-grid-skel.is-w90 { width: 90%; }
.wf-skel-note { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-3); }

/* ---------------- workflow page: header, lede, state strip, tabs ---------------- */
.wf-builder { flex: 1 1 auto; display: flex; flex-direction: column; background: var(--cx-canvas); min-width: 0; }
.wf-head { background: var(--th-paper); border-bottom: 1px solid var(--th-line); padding: 14px 24px 0; }
.wf-head__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.wf-head__id { min-width: 0; }
.wf-back { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 0; margin-bottom: 6px; font: inherit; font-size: 11.5px; color: var(--th-ink-3); cursor: pointer; }
.wf-back:hover { color: var(--th-ink); }
.wf-head__title { display: flex; align-items: center; gap: 8px 11px; flex-wrap: wrap; }
.wf-h1 { margin: 0; font-family: var(--th-font-serif); font-weight: 500; font-size: var(--th-size-24); letter-spacing: -0.012em; color: var(--th-ink); }
.wf-dirty { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--cx-action-hover); }
.wf-dirty::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cx-action); }
.wf-head__meta { display: flex; align-items: center; gap: 4px 10px; margin-top: 5px; font-size: 11.5px; color: var(--th-ink-3); flex-wrap: wrap; }
.wf-head__actions { display: flex; align-items: center; gap: 8px; padding-top: 22px; flex-wrap: wrap; }
.wf-head__pub { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-head__note { font-size: 11.5px; color: var(--th-ink-3); }
.wf-lede { padding: 10px 24px; background: var(--th-paper-2); border-bottom: 1px solid var(--th-line); font-size: 12.5px; color: var(--th-ink-2); line-height: 1.55; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
.wf-lede svg { color: var(--th-ink-3); margin-top: 2px; }
.wf-lede.is-copper svg { color: var(--cx-action-hover); }
.wf-lede strong { color: var(--th-ink); font-weight: 600; }

.wf-state { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 9px 24px; background: var(--th-paper); border-bottom: 1px solid var(--th-line); font-size: 12.5px; color: var(--th-ink-2); }
.wf-state__switch { display: inline-flex; align-items: center; gap: 8px; }
.wf-state__label { font-weight: 600; color: var(--th-ink); }
.wf-state__word { min-width: 22px; color: var(--th-ink-2); }
.wf-state__sep { width: 1px; height: 18px; background: var(--th-line-2); flex: none; }
.wf-state__facts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wf-state__facts b { color: var(--th-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.wf-state__facts svg { color: var(--th-ink-3); flex: none; }
.wf-state__member { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-state__spacer { flex: 1 1 auto; }
.wf-state__acts { display: inline-flex; align-items: center; gap: 8px; }
.wf-state__note { display: inline-flex; align-items: center; gap: 8px; color: var(--th-warn-ink); }
.wf-state__note svg { flex: none; }
.wf-state.is-resuming .wf-state__facts { flex: 1 1 360px; }
.wf-progress { appearance: none; width: 140px; height: 6px; border: 0; border-radius: var(--th-radius-pill); background: var(--th-line); overflow: hidden; }
.wf-progress::-webkit-progress-bar { background: var(--th-line); border-radius: var(--th-radius-pill); }
.wf-progress::-webkit-progress-value { background: var(--th-advant); border-radius: var(--th-radius-pill); }
.wf-progress::-moz-progress-bar { background: var(--th-advant); border-radius: var(--th-radius-pill); }
.wf-rate { font-size: 11.5px; color: var(--th-ink-3); }

.wf-tabs { display: flex; align-items: stretch; gap: 2px; margin-top: 12px; }
.wf-tab { padding: 8px 15px; border: 1px solid transparent; border-bottom-color: var(--th-line); border-radius: var(--th-radius-3) var(--th-radius-3) 0 0; background: transparent; color: var(--th-ink-3); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; position: relative; top: 1px; }
.wf-tab[aria-selected="true"] { border-color: var(--th-line); border-bottom-color: var(--th-paper); background: var(--th-paper); color: var(--th-ink); font-weight: 600; }
.wf-tab[aria-disabled="true"] { color: var(--th-ink-4); cursor: not-allowed; }
.wf-tab:focus-visible { outline: 2px solid var(--th-advant); outline-offset: -2px; }

/* ---------------- builder canvas ---------------- */
.wf-canvas { padding: 26px 24px 40px; }
.wf-col { max-width: 812px; margin: 0 auto; }
.wf-banner { margin: 14px 24px 0; }

/* Trigger card */
.wf-trigger { border: 1px solid var(--th-line-2); border-radius: var(--th-radius-8); background: var(--cx-surface); box-shadow: var(--cx-shadow-raised); overflow: hidden; }
.wf-trigger__main { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border-left: 3px solid var(--cx-action); }
.wf-glyph { width: 34px; height: 34px; border-radius: var(--th-radius-5); display: grid; place-items: center; background: var(--cx-action-soft); border: 1px solid var(--cx-action-border); color: var(--cx-action-hover); }
.wf-trigger .cc-eyebrow { margin-bottom: 3px; }
.wf-trigger__name { font-size: var(--th-size-15); font-weight: 600; color: var(--th-ink); }
.wf-trigger__help { font-size: 12px; color: var(--th-ink-3); margin-top: 3px; line-height: 1.5; }
.wf-days { display: inline-flex; align-items: center; gap: 9px; margin-top: 11px; padding: 8px 11px; background: var(--th-paper-2); border: 1px solid var(--th-line); border-radius: var(--th-radius-5); }
.wf-days__unit { font-size: 12.5px; color: var(--th-ink-2); }
.wf-num { width: 64px; padding: 7px 9px; text-align: right; font-family: var(--th-font-mono); font-variant-numeric: tabular-nums; font-size: var(--th-size-13); color: var(--th-ink); background: var(--th-paper); border: 1px solid var(--th-line-2); border-radius: var(--th-radius-3); box-sizing: border-box; }
.wf-num:focus-visible { outline: 2px solid var(--cx-action); outline-offset: 1px; }
.wf-fixed { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-family: var(--th-font-serif); font-style: italic; font-size: 11.5px; color: var(--th-ink-3); }
.wf-fixed svg { color: var(--th-ink-4); flex: none; }
.wf-trigger__lock { align-self: center; color: var(--th-ink-4); }
.wf-start { border: 2px dashed var(--cx-action-border); border-radius: var(--th-radius-8); background: var(--th-paper); padding: 20px 20px 22px; }
.wf-start__head { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.wf-start__title { font-family: var(--th-font-serif); font-size: 16px; font-weight: 600; color: var(--th-ink); }
.wf-start__body { font-size: 12.5px; color: var(--th-ink-2); line-height: 1.55; margin: 8px 0 14px; max-width: 70ch; }
.wf-after-start { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; padding-left: 19px; font-family: var(--th-font-serif); font-style: italic; font-size: 12.5px; color: var(--th-ink-4); }
.wf-after-start::before { content: ""; width: 2px; height: 26px; background: var(--th-line-2); border-radius: 1px; }

/* Palette and trigger tiles */
.wf-palette { width: 100%; box-sizing: border-box; border: 1px solid var(--th-line-2); border-radius: var(--th-radius-8); background: var(--th-paper-sunk); box-shadow: var(--cx-shadow-popover); padding: 14px 16px 16px; margin: 2px 0 6px; text-align: left; }
.wf-palette__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.wf-palette__close { border: 0; background: transparent; color: var(--th-ink-3); cursor: pointer; padding: 0; }
.wf-palette__foot { font-family: var(--th-font-serif); font-style: italic; font-size: 11.5px; color: var(--th-ink-4); border-top: 1px solid var(--th-line); padding-top: 10px; }
.wf-pgroup { margin-bottom: 14px; }
.wf-pgroup__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wf-pgroup__label { font-family: var(--th-font-serif); font-style: italic; font-size: var(--th-size-13); font-weight: 500; color: var(--cx-action-hover); }
.wf-pgroup__head::after { content: ""; flex: 1; height: 1px; background: var(--th-line); }
.wf-pgroup__reason { display: flex; align-items: center; gap: 7px; margin: -2px 0 8px; font-size: 11.5px; color: var(--th-ink-3); }
.wf-pgroup__reason svg { color: var(--th-ink-4); flex: none; }
.wf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wf-tile { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; text-align: left; padding: 10px 12px; border-radius: var(--th-radius-5); cursor: pointer; background: var(--th-paper); border: 1px solid var(--th-line-2); font: inherit; color: inherit; }
.wf-tile:hover { border-color: var(--cx-action-border); }
.wf-tile:focus-visible { outline: 2px solid var(--cx-action); outline-offset: 1px; }
.wf-tile__icon { width: 26px; height: 26px; border-radius: var(--th-radius-5); display: grid; place-items: center; background: var(--th-paper-2); border: 1px solid var(--th-line); color: var(--th-ink-2); }
.wf-tile__name { display: block; font-size: 12.5px; font-weight: 600; color: var(--th-ink); }
.wf-tile__help { display: block; font-size: 11.5px; color: var(--th-ink-3); line-height: 1.45; margin-top: 2px; }
.wf-tile.is-unavailable { background: transparent; border-style: dashed; cursor: not-allowed; }
.wf-tile.is-unavailable .wf-tile__icon { background: transparent; border-style: dashed; color: var(--th-ink-4); }
.wf-tile.is-unavailable .wf-tile__name { color: var(--th-ink-3); font-weight: 500; }
.wf-tile.is-unavailable .wf-tile__help { color: var(--th-ink-3); }
.wf-tile__reason { display: block; font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; margin-top: 3px; font-family: var(--th-font-serif); font-style: italic; }
.wf-tile.is-radio { grid-template-columns: 16px 1fr; padding: 11px 13px; }
.wf-tile__radio { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--th-line-2); margin-top: 1px; box-sizing: border-box; }

/* Add-step gaps, the trailing add and the end markers */
.wf-gap { display: flex; flex-direction: column; align-items: center; position: relative; }
.wf-gap__rule { width: 2px; height: 14px; background: var(--th-line-2); }
.wf-gap__btn { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--cx-action-border); background: var(--th-paper); color: var(--cx-action-hover); cursor: pointer; padding: 0; opacity: 0; transition: opacity 90ms ease; }
.wf-gap:hover .wf-gap__btn, .wf-gap:focus-within .wf-gap__btn, .wf-gap.is-open .wf-gap__btn { opacity: 1; }
.wf-addstep { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: var(--th-radius-pill); border: 1px dashed var(--cx-action-border); background: var(--th-paper); color: var(--cx-action-hover); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.wf-addstep.is-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--th-radius-3); }
.wf-addstep:focus-visible { outline: 2px solid var(--cx-action); outline-offset: 1px; }
.wf-ends { display: flex; flex-direction: column; align-items: center; margin-top: 2px; }
.wf-ends .wf-gap__rule { height: 16px; }
.wf-marker { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: var(--th-radius-pill); background: var(--th-paper-2); border: 1px solid var(--th-line); font-size: 11.5px; color: var(--th-ink-3); white-space: nowrap; }
.wf-marker svg { color: var(--th-ink-4); flex: none; }
.wf-marker.is-end { color: var(--th-ok-ink); background: var(--th-ok-soft); border-color: color-mix(in oklab, var(--th-ok) 30%, transparent); }
.wf-marker.is-end svg { color: var(--th-ok-ink); }

/* Step card */
.wf-step { border: 1px solid var(--th-line-2); border-radius: var(--th-radius-8); background: var(--cx-surface); box-shadow: var(--cx-shadow-raised); }
.wf-step.is-open { border-color: var(--cx-action-border); box-shadow: var(--cx-shadow-elevated); }
.wf-step__row { display: grid; grid-template-columns: 20px minmax(30px, max-content) 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; cursor: pointer; border-radius: var(--th-radius-8); }
.wf-step__row:hover { background: var(--th-paper-2); }
.wf-step__row:focus-visible { outline: 2px solid var(--cx-action); outline-offset: -2px; }
.wf-step__handle { display: inline-flex; justify-content: center; color: var(--th-ink-4); cursor: grab; }
.wf-step__handle.is-locked { cursor: default; }
.wf-step__ord { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-4); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.wf-step__icon { width: 30px; height: 30px; border-radius: var(--th-radius-5); display: grid; place-items: center; background: var(--th-paper-2); border: 1px solid var(--th-line); color: var(--th-ink-2); }
.wf-step__icon.is-send { background: var(--cx-action-soft); border-color: var(--cx-action-border); color: var(--cx-action-hover); }
.wf-step__text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wf-step__top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.wf-step__eyebrow { font-family: var(--th-font-mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--th-ink-4); }
.wf-step__title { font-size: var(--th-size-14); font-weight: 600; color: var(--th-ink); }
.wf-step__summary { font-size: 12px; color: var(--th-ink-2); line-height: 1.5; }
.wf-step__note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--th-ink-3); font-family: var(--th-font-serif); font-style: italic; }
.wf-step__note svg { color: var(--th-ink-4); flex: none; }
.wf-step__end { display: inline-flex; align-items: center; gap: 9px; justify-self: end; }
.wf-chev { color: var(--th-ink-4); display: inline-flex; transition: transform 140ms ease; }
.wf-step.is-open > .wf-step__row .wf-chev { transform: rotate(180deg); }
.wf-diag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--th-radius-pill); white-space: nowrap; }
.wf-diag.is-error { color: var(--th-risk-ink); background: var(--th-risk-soft); border: 1px solid color-mix(in oklab, var(--th-risk) 28%, transparent); }
.wf-diag.is-warn { color: var(--th-warn-ink); background: color-mix(in oklab, var(--th-warn-soft) 60%, var(--th-paper-sunk)); border: 1px solid color-mix(in oklab, var(--th-warn) 26%, transparent); }

/* Inline diagnostic under a closed card, and at the top of an open editor */
.wf-lint { display: grid; grid-template-columns: 14px 62px minmax(0, 1fr) auto; gap: 9px; align-items: start; margin: 0 14px 13px 60px; padding: 10px 12px; border-left: 3px solid; border-radius: var(--th-radius-2) var(--th-radius-5) var(--th-radius-5) var(--th-radius-2); font-size: 12px; }
.wf-lint.is-error { border-left-color: var(--th-risk); background: var(--th-risk-soft); color: var(--th-risk-ink); }
.wf-lint.is-warn { border-left-color: var(--th-warn); background: color-mix(in oklab, var(--th-warn-soft) 60%, var(--th-paper-sunk)); color: var(--th-warn-ink); }
.wf-lint svg { margin-top: 2px; flex: none; }
.wf-lint__word { font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; }
.wf-lint__msg { color: var(--th-ink); line-height: 1.5; }
.wf-lint__link { white-space: nowrap; font-size: 11.5px; }
.wf-lint.is-editor { grid-template-columns: 14px 62px minmax(0, 1fr) auto; margin: 0 0 16px; }

/* Step editors */
.wf-editor { border-top: 1px solid var(--th-line); background: var(--th-paper-sunk); padding: 18px 20px 16px 60px; border-radius: 0 0 var(--th-radius-8) var(--th-radius-8); }
.wf-ed { display: flex; flex-direction: column; gap: 16px; }
.wf-ed-field { display: flex; flex-direction: column; gap: 7px; }
.wf-ed-field.is-rule { border-top: 1px solid var(--th-line); padding-top: 15px; }
.wf-ed-aside { color: var(--th-ink-4); text-transform: none; letter-spacing: 0; font-family: var(--th-font-serif); font-style: italic; font-size: 11px; margin-left: 7px; }
.wf-ed-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wf-ed-sublabel { font-size: 11.5px; color: var(--th-ink-3); }
.wf-ed-sublabel .is-required { color: var(--th-risk-ink); }
.wf-picker { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: var(--th-radius-3); background: var(--th-paper); border: 1px solid var(--th-line-2); color: var(--th-ink); font: inherit; font-size: var(--th-size-13); cursor: pointer; min-width: 300px; max-width: 100%; text-align: left; box-sizing: border-box; }
.wf-picker:focus-visible { outline: 2px solid var(--cx-action); outline-offset: 1px; }
.wf-picker__icon { width: 22px; height: 22px; border-radius: var(--th-radius-3); display: grid; place-items: center; background: var(--th-paper-2); border: 1px solid var(--th-line); color: var(--th-ink-2); flex: none; }
.wf-picker__icon.is-send { background: var(--cx-action-soft); border-color: transparent; color: var(--cx-action-hover); }
.wf-picker__name { flex: 1; font-weight: 600; min-width: 0; }
.wf-picker > svg:last-child { color: var(--th-ink-4); flex: none; }
.wf-picker.is-invalid { border-color: var(--th-risk); }
.wf-fact { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--th-ink-2); background: var(--th-paper-2); border: 1px solid var(--th-line); border-radius: var(--th-radius-3); padding: 7px 11px; }
.wf-fact svg { color: var(--th-ink-3); flex: none; }
.wf-help { font-size: 11.5px; color: var(--th-ink-3); line-height: 1.5; }
.wf-info { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; padding: 11px 13px; background: var(--th-paper-2); border: 1px solid var(--th-line); border-radius: var(--th-radius-5); font-size: 12px; color: var(--th-ink-2); line-height: 1.55; }
.wf-info svg { color: var(--th-ink-3); margin-top: 1px; }
.wf-checks { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--th-ink-2); margin: 0; padding: 0; list-style: none; }
.wf-checks li { display: flex; align-items: center; gap: 8px; }
.wf-checks svg { color: var(--th-ok); flex: none; }
.wf-options { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wf-option { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 12px; border: 1px solid var(--th-line-2); border-radius: var(--th-radius-5); background: var(--th-paper); cursor: pointer; font-size: 12.5px; color: var(--th-ink); }
.wf-option__dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--th-line-2); margin-top: 1px; box-sizing: border-box; }
.wf-option[aria-checked="true"], .wf-option.is-checked { border-color: var(--cx-action-border); background: var(--cx-action-soft); }
.wf-option[aria-checked="true"] .wf-option__dot, .wf-option.is-checked .wf-option__dot { border: 4px solid var(--cx-action); }
.wf-option__name { font-weight: 600; }
.wf-option__help { display: block; font-size: 11.5px; color: var(--th-ink-3); margin-top: 2px; line-height: 1.45; }
.wf-option[aria-disabled="true"], .wf-option.is-disabled { background: transparent; border-style: dashed; cursor: not-allowed; color: var(--th-ink-3); }
.wf-option[aria-disabled="true"] .wf-option__dot, .wf-option.is-disabled .wf-option__dot { border-style: dashed; }
/* An option backed by a native radio (Choose which version runs): the radio is visually hidden inside the row, which draws its focus. */
.wf-option:has(> input[type="radio"]) { position: relative; }
.wf-option:has(> input[type="radio"]:focus-visible) { outline: 2px solid var(--cx-action); outline-offset: 1px; }
.wf-option__reason { display: block; font-size: 11.5px; color: var(--th-ink-2); margin-top: 3px; font-family: var(--th-font-serif); font-style: italic; }
.wf-seg { display: inline-flex; border: 1px solid var(--th-line-2); border-radius: var(--th-radius-3); overflow: hidden; align-self: flex-start; }
.wf-seg__opt { font: inherit; font-size: 12.5px; padding: 6px 12px; border: 0; background: var(--th-paper); color: var(--th-ink-2); cursor: pointer; }
.wf-seg__opt + .wf-seg__opt { border-left: 1px solid var(--th-line-2); }
.wf-seg__opt[aria-checked="true"] { background: var(--cx-action-soft); color: var(--cx-action-hover); font-weight: 600; }
.wf-defined { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
.wf-defined .is-wide { grid-column: 1 / -1; }
.wf-defined .th-input, .wf-defined .th-textarea, .wf-ed .th-input.is-full, .wf-ed .th-textarea { width: 100%; box-sizing: border-box; }
.wf-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; padding: 5px 7px; border: 1px solid var(--th-line-2); background: var(--th-paper); border-radius: var(--th-radius-5); max-width: 460px; box-sizing: border-box; }
.wf-people.is-invalid { border-color: var(--th-risk); }
.wf-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 8px; background: var(--cx-action-soft); color: var(--cx-action-hover); border-radius: var(--th-radius-3); font-size: 12px; }
.wf-person.is-error { background: var(--th-risk-soft); color: var(--th-risk-ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--th-risk) 40%, transparent); }
.wf-person__why { font-size: 11px; font-style: italic; font-family: var(--th-font-serif); }
.wf-person__x { border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; display: inline-flex; }
.wf-people__add { font-size: 12px; color: var(--th-ink-4); padding: 3px 4px; }
.wf-rulechip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: var(--th-radius-pill); background: var(--th-advant-soft); border: 1px solid color-mix(in oklab, var(--th-advant) 30%, transparent); color: var(--th-advant-deep); font-size: 12.5px; font-weight: 500; }
.wf-rulechip__kind { font-family: var(--th-font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in oklab, var(--th-advant-deep) 75%, var(--th-ink-3)); }
.wf-reads { font-size: 11.5px; color: var(--th-ink-3); }
.wf-reads b { color: var(--th-ink-2); font-weight: 600; }
.wf-ed-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; margin-top: 16px; border-top: 1px solid var(--th-line); font-size: 12px; color: var(--th-ink-3); flex-wrap: wrap; }
.wf-remove { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--th-radius-3); border: 1px solid var(--th-line); background: transparent; color: var(--th-ink-3); font: inherit; font-size: 12px; cursor: pointer; }
.wf-audit { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--th-font-serif); font-style: italic; }
.wf-audit svg { color: var(--th-ink-4); }
.wf-sentence { font-size: var(--th-size-13); color: var(--th-ink); line-height: 1.55; margin: 0; }

/* Branch paths (lanes): full step cards indented under each path, a 2px lane rule on the left. */
.wf-lanes { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 16px; }
.wf-lane { margin-left: 28px; }
.wf-lane__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0 8px; }
.wf-lane__path { font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--th-radius-3); background: var(--th-paper-2); border: 1px solid var(--th-line-2); color: var(--th-ink-2); }
.wf-lane__codes { font-size: 12px; color: var(--th-ink-2); }
.wf-lane__count { font-family: var(--th-font-mono); font-size: 10.5px; color: var(--th-ink-4); }
.wf-lane__body { border-left: 2px solid var(--th-line-2); padding-left: 14px; display: flex; flex-direction: column; }
.wf-lane__body > .wf-step + .wf-gap, .wf-lane__body > .wf-gap + .wf-step { margin-top: 0; }
.wf-lane__end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.wf-lane__empty { font-size: 12px; color: var(--th-ink-3); padding: 4px 0 2px; font-family: var(--th-font-serif); font-style: italic; }
.wf-lane .wf-step__row { padding: 11px 12px; }

/* Save bar and its diagnostics list */
.wf-savedock { position: sticky; bottom: 0; z-index: 20; }
.wf-savebar { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; padding: 11px 24px; border-top: 1px solid var(--th-line); background: var(--th-paper); }
.wf-savebar__left { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; font-size: 12.5px; }
.wf-savebar__count.is-error { font-weight: 600; color: var(--th-risk-ink); }
.wf-savebar__count.is-warn { font-weight: 600; color: var(--th-warn-ink); }
.wf-savebar__clean { color: var(--th-ink-2); display: inline-flex; align-items: center; gap: 7px; }
.wf-savebar__clean svg { color: var(--th-ok); }
.wf-savebar__toggle { margin-left: 4px; padding: 2px 9px; border: 1px solid var(--th-line); background: var(--th-paper-sunk); color: var(--th-ink); border-radius: var(--th-radius-5); font: inherit; font-size: 11px; cursor: pointer; }
.wf-savebar__right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.wf-savebar__hint { font-size: 11.5px; color: var(--th-ink-3); }
.wf-lintlist { border-top: 1px solid var(--th-line); background: var(--th-paper-2); padding: 12px 24px 14px; }
.wf-lintlist .cc-eyebrow { margin-bottom: 8px; }
.wf-lintlist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wf-lintrow { display: grid; grid-template-columns: 14px 74px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 9px 11px; border: 1px solid transparent; background: var(--th-paper-sunk); border-radius: var(--th-radius-5); text-align: left; cursor: pointer; font: inherit; color: var(--th-ink); }
.wf-lintrow:hover, .wf-lintrow:focus-visible { border-color: var(--th-line-2); outline: none; }
.wf-lintrow svg { margin-top: 2px; flex: none; }
.wf-lintrow.is-error svg, .wf-lintrow.is-error .wf-lint__word { color: var(--th-risk-ink); }
.wf-lintrow.is-warn svg, .wf-lintrow.is-warn .wf-lint__word { color: var(--th-warn-ink); }
.wf-lintrow__msg { font-size: 12px; line-height: 1.45; }
.wf-lintrow__go { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 11px; color: var(--cx-action-hover); }
.wf-lintrow__where { font-family: var(--th-font-mono); font-size: 10.5px; color: var(--th-ink-3); }

/* ---------------- Versions tab ---------------- */
.wf-tabbody { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wf-versions .th-grid td { vertical-align: top; }
.wf-ver__label { font-family: var(--th-font-mono); font-size: var(--th-size-13); font-weight: 600; color: var(--th-ink); white-space: nowrap; }
.wf-ver__runs { font-size: 12.5px; color: var(--th-ink-2); }
.wf-ver__runs.is-hidden { color: var(--th-ink-4); font-style: italic; }
.wf-ver__who { font-size: 12.5px; color: var(--th-ink-2); }
.wf-ver__use { display: block; font-size: 11.5px; color: var(--th-ok-ink); margin-top: 2px; }
.th-grid tr.wf-ver.is-selected td { background: var(--th-advant-soft); }
.wf-compare { border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper-sunk); }
.wf-compare__head { padding: 11px 16px; border-bottom: 1px solid var(--th-line); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wf-compare__title { font-family: var(--th-font-serif); font-size: var(--th-size-15); font-weight: 600; color: var(--th-ink); }
.wf-compare__body { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.wf-diff { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wf-diff li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--th-line-soft); font-size: 12.5px; }
.wf-diff li:last-child { border-bottom: 0; }
.wf-diff svg { color: var(--th-ink-3); }
.wf-diff__v { font-weight: 600; font-size: 12px; color: var(--th-ink-2); white-space: nowrap; }
.wf-diff__v.is-changed { color: var(--cx-action-hover); }
.wf-diff__v.is-added { color: var(--th-ok-ink); }

/* ---------------- Runs tab ---------------- */
.wf-countline { font-family: var(--th-font-mono); font-size: 12px; color: var(--th-ink-2); display: flex; gap: 4px 0; flex-wrap: wrap; }
.wf-countline > span:not(:last-child)::after { content: "·"; padding: 0 8px; color: var(--th-ink-4); }
.wf-countline b { color: var(--th-ink); font-weight: 600; }
.wf-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--th-ink-2); }
.wf-live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--th-ok); }
.wf-runs .th-grid td { vertical-align: top; }
.wf-run-row { cursor: pointer; }
.wf-run-row:hover td { background: var(--th-paper-2); }
.wf-run-row.is-open td { background: var(--th-advant-soft); }
.wf-run-row.is-open td:first-child { box-shadow: inset 2px 0 0 var(--th-advant); }
.wf-run-row:focus-visible { outline: 2px solid var(--th-advant); outline-offset: -2px; }
.wf-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.wf-cell__sec { font-size: 11.5px; color: var(--th-ink-3); }
.wf-cell__mono { font-family: var(--th-font-mono); font-size: 11.5px; color: var(--th-ink-2); }
.wf-cell .th-grid-link { overflow-wrap: anywhere; }
.wf-runid { font-family: var(--th-font-mono); font-size: 12px; color: var(--th-ink); }
.wf-status { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wf-status .cc-pill, .wf-run__ident .cc-pill, .wf-row__right .cc-pill { white-space: nowrap; }
.wf-status__sub { font-size: 11.5px; color: var(--th-ink-3); }
.wf-fold { display: none; font-size: 11.5px; color: var(--th-ink-3); line-height: 1.45; }
.wf-runs-head { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; justify-content: space-between; }
@container wf (max-width: 900px) {
  .wf-runs .wf-c-where, .wf-runs .wf-c-wait, .wf-runs .wf-c-ended { display: none; }
  .wf-runs .wf-fold { display: block; }
}

/* ---------------- run panel (on the shipped th-wq-panel) ---------------- */
.wf-run .th-wq-panel__head .cc-pill { margin-top: 6px; }
.wf-run__ident { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.wf-run__of { font-size: 12px; color: var(--th-ink-2); }
.wf-run__sec { margin: 16px 18px 0; }
.wf-run__sec-title { font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--th-ink-3); margin-bottom: 8px; }
.wf-attn { border: 1px solid color-mix(in oklab, var(--th-risk) 35%, transparent); border-left: 3px solid var(--th-risk); border-radius: var(--th-radius-5); background: var(--th-risk-soft); padding: 11px 13px; display: flex; flex-direction: column; gap: 8px; }
.wf-attn.is-quiet { border-color: var(--th-line); border-left-color: var(--th-ink-3); background: var(--th-paper-2); }
.wf-attn.is-health { border-color: color-mix(in oklab, var(--th-warn) 35%, transparent); border-left-color: var(--th-warn); background: color-mix(in oklab, var(--th-warn-soft) 60%, var(--th-paper-sunk)); }
.wf-attn__label { font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--th-risk-ink); display: inline-flex; align-items: center; gap: 6px; }
.wf-attn.is-quiet .wf-attn__label { color: var(--th-ink-2); }
.wf-attn.is-health .wf-attn__label { color: var(--th-warn-ink); }
.wf-attn__what { font-size: 12.5px; color: var(--th-ink); line-height: 1.5; font-weight: 600; }
.wf-attn__evidence { font-size: 12px; color: var(--th-ink-2); line-height: 1.5; }
.wf-attn__acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-attn__not { font-size: 11.5px; color: var(--th-ink-2); line-height: 1.5; font-family: var(--th-font-serif); font-style: italic; }
.wf-runsteps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper); }
.wf-runstep { display: grid; grid-template-columns: minmax(28px, max-content) minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 12px; border-bottom: 1px solid var(--th-line-soft); align-items: baseline; font-size: 12.5px; }
.wf-runstep:last-child { border-bottom: 0; }
.wf-runstep__ord { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-3); white-space: nowrap; }
.wf-runstep__what { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wf-runstep__kind { font-family: var(--th-font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--th-ink-4); }
.wf-runstep__title { color: var(--th-ink); font-weight: 600; overflow-wrap: anywhere; }
.wf-runstep__out { font-size: 12px; color: var(--th-ink-2); line-height: 1.45; display: flex; flex-direction: column; gap: 1px; }
.wf-runstep__out.is-ok { color: var(--th-ok-ink); }
.wf-runstep__out.is-risk { color: var(--th-risk-ink); }
.wf-runstep__out.is-warn { color: var(--th-warn-ink); }
.wf-runstep__out .wf-later { color: var(--th-ink-2); }
.wf-runstep__when { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-3); white-space: nowrap; }
.wf-runstep.is-current { background: var(--th-advant-soft); }
.wf-runstep.is-quiet .wf-runstep__title, .wf-runstep.is-quiet .wf-runstep__out { color: var(--th-ink-3); font-weight: 400; }
.wf-runstep.is-lane { padding-left: 30px; }
.wf-runstep.is-lane .wf-runstep__ord { color: var(--th-ink-4); }
.wf-run__ending { font-size: 12.5px; color: var(--th-ink-2); padding: 10px 12px; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper-2); }
.wf-run__links { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 12.5px; }
.wf-run .th-wq-panel__actions { margin-bottom: 20px; }

/* ---------------- walkthrough drawer ---------------- */
.wf-drawer-scrim { position: fixed; inset: 0; background: var(--cx-overlay-scrim); z-index: 210; }
/* Divergence from the canon sheet: the drawer's cap is the layout (100%), not 100vw, which counts a classic
   scrollbar and would hang past the layout (ViewportWidthStylesheetTests; canon README round 2, resolution 1). */
.wf-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 472px; max-width: 100%; background: var(--th-paper); border-left: 1px solid var(--th-line-2); box-shadow: var(--cx-shadow-popover); display: flex; flex-direction: column; z-index: 211; color: var(--th-ink); }
.wf-drawer__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--th-line); }
.wf-drawer__head .cc-eyebrow { margin-bottom: 6px; }
.wf-drawer__title { margin: 0; font-family: var(--th-font-serif); font-size: var(--th-size-17); font-weight: 600; color: var(--th-ink); }
.wf-drawer__sub { font-size: 11.5px; color: var(--th-ink-3); margin-top: 4px; line-height: 1.45; }
.wf-drawer__close { border: 0; background: transparent; color: var(--th-ink-3); cursor: pointer; padding: 4px; border-radius: var(--th-radius-3); }
.wf-drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.wf-drawer__foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px 16px; border-top: 1px solid var(--th-line); background: var(--th-paper-sunk); }
.wf-form { display: flex; flex-direction: column; gap: 12px; }
.wf-form .th-input, .wf-form select.th-input { width: 100%; box-sizing: border-box; }
.wf-form__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.wf-walk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper-sunk); }
.wf-walk__row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--th-line-soft); align-items: start; font-size: 12.5px; }
.wf-walk__row:last-child { border-bottom: 0; }
.wf-walk__icon { width: 24px; height: 24px; border-radius: var(--th-radius-3); display: grid; place-items: center; background: var(--th-paper-2); border: 1px solid var(--th-line); color: var(--th-ink-2); }
.wf-walk__text { min-width: 0; color: var(--th-ink); line-height: 1.45; }
.wf-walk__when { display: block; font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-3); margin-top: 2px; }
.wf-walk__row.is-lane { padding-left: 34px; }
.wf-walk__row.is-lane.is-lane-2 { padding-left: 58px; }
.wf-walk__row.is-error { background: var(--th-risk-soft); }
.wf-walk__row.is-error .wf-walk__text { color: var(--th-risk-ink); }
.wf-walk__row.is-off .wf-walk__text, .wf-walk__row.is-off .wf-walk__when { color: var(--th-ink-4); }
.wf-assume { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; padding: 11px 13px; border-left: 3px solid var(--th-ink-4); border-radius: var(--th-radius-2) var(--th-radius-5) var(--th-radius-5) var(--th-radius-2); background: var(--th-paper-sunk); font-size: 12px; color: var(--th-ink); line-height: 1.55; }
.wf-assume svg { color: var(--th-ink-3); margin-top: 1px; }
.wf-note { font-size: 11.5px; color: var(--th-ink-3); line-height: 1.5; font-family: var(--th-font-serif); font-style: italic; }

/* ---------------- dialog bodies (inside the shipped ThresholdDialog) ---------------- */
.wf-dlg-block { display: flex; flex-direction: column; gap: 6px; }
.wf-dlg-block__title { font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--th-ink-3); }
.th-modal__impact .v.wf-v-ok { color: var(--th-ok-ink); }
.th-modal__impact .v.wf-v-risk { color: var(--th-risk-ink); }
.th-modal__impact .v.wf-v-warn { color: var(--th-warn-ink); }
.wf-dlg-wide.th-modal { width: 720px; }
.wf-dlg-narrow.th-modal { width: 440px; }
.wf-fields { display: flex; flex-direction: column; gap: 12px; }
.wf-fields .th-input, .wf-fields .th-textarea, .wf-fields select.th-input { width: 100%; box-sizing: border-box; }
.wf-dlg-step { font-family: var(--th-font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--th-ink-3); }
.wf-map { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wf-map th { text-align: left; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--th-ink-2); padding: 6px 10px; border-bottom: 1px solid var(--th-line); background: var(--th-paper-2); }
.wf-map td { padding: 8px 10px; border-bottom: 1px solid var(--th-line-soft); vertical-align: top; }
.wf-map tr:last-child td { border-bottom: 0; }
.wf-map__kind { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-3); white-space: nowrap; }
.wf-map__res { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.wf-map__res.is-mapped { color: var(--th-ok-ink); }
.wf-map__res.is-kept { color: var(--th-ink-2); }
.wf-map__res.is-choice { color: var(--th-warn-ink); }
.wf-map__choose { margin-top: 4px; }
.wf-map-wrap { border: 1px solid var(--th-line); border-radius: var(--th-radius-5); overflow-x: auto; }
.wf-checkopts { display: flex; flex-direction: column; gap: 8px; }
.wf-checkopt { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 9px; align-items: start; font-size: 12.5px; color: var(--th-ink); }
.wf-checkopt input { margin: 2px 0 0; }
.wf-checkopt__help { display: block; font-size: 11.5px; color: var(--th-ink-3); margin-top: 2px; }
.wf-checkopt.is-held { color: var(--th-ink-3); }
.wf-choices { display: flex; flex-direction: column; gap: 6px; }
/* Several dialog outcomes in one state: each specimen contains its own fixed scrim (frame scaffolding
   sizes the box to the dialog). */
.wf-dlg-specimen { position: relative; contain: layout; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); overflow: hidden; }

/* ---------------- specimens (multi-variant states) ---------------- */
.wf-specs { display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 40px; }
.wf-spec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wf-spec__label { font-family: var(--th-font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--th-ink-3); }
.wf-spec .th-wq-panel { position: static; width: 440px; max-width: 100%; box-shadow: none; border: 1px solid var(--th-line-2); }
.wf-spec__pair { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.wf-spec__frame { border: 1px solid var(--th-line); border-radius: var(--th-radius-5); overflow: hidden; background: var(--th-paper); }

.wf-spec__pair > .wf-attn { flex: 1 1 320px; }
.wf-words { margin: 0; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper-sunk); }
.wf-words__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--th-line-soft); }
.wf-words__row:last-child { border-bottom: 0; }
.wf-words dt { font-family: var(--th-font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--th-ink-3); padding-top: 3px; }
.wf-words dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wf-word { font-size: 12px; color: var(--th-ink); background: var(--th-paper); border: 1px solid var(--th-line); border-radius: var(--th-radius-3); padding: 2px 8px; }

/* The Handoff states (WH01, WH02) draw on the shipped Settings › Handoffs sheet (th-ho-*, th-item*); nothing of theirs lives here. */

/* ---------------- 720: the pane reflows; nothing reorders ---------------- */
@container wf (max-width: 900px) {
  .wf-row__main { grid-template-columns: 22px 112px minmax(0, 1fr) auto; gap: 10px; padding-right: 12px; }
  .wf-row__right { max-width: 220px; }
  .wf-section__note { text-align: left; }
  .wf-tiles { grid-template-columns: 1fr; }
  .wf-editor { padding-left: 20px; }
  .wf-lint { margin-left: 14px; }
  .wf-lane { margin-left: 12px; }
  .wf-defined { grid-template-columns: minmax(0, 1fr); }
  .wf-picker { min-width: 0; width: 100%; }
}
@media (max-width: 720px) {
  .wf-dlg-wide.th-modal, .wf-dlg-narrow.th-modal { width: 100%; }
  .wf-drawer { left: 0; width: auto; }
}
/* WT06 only: a family that ended at submission reads as a muted word in the Test inspector's step list, not as work done. */
.ot-step-state.is-ended { color: var(--th-ink-3); }
@media (prefers-reduced-motion: reduce) {
  .wf-chev, .wf-gap__btn { transition: none; }
}
/* Additions to the canon sheet for the builder's interaction (WA-07), which the static states do not draw: a step being
   dragged and the slot it would drop into, the pickers' option lists, the person field's add button, Move up's
   glyph and the trigger chooser's Cancel. */
.wf-step.is-dragging { opacity: 0.55; }
.wf-gap.is-drop .wf-gap__rule { background: var(--cx-action); }
.wf-gap.is-drop .wf-gap__btn { opacity: 1; }
.wf-lane__end.is-drop { box-shadow: inset 0 2px 0 var(--cx-action); }
.wf-picker-host { position: relative; display: inline-flex; }
.wf-menu.is-list { width: 300px; max-height: 280px; overflow-y: auto; }
.wf-menu__item[aria-selected="true"] { font-weight: 600; }
.wf-menu__item:disabled { cursor: default; color: var(--th-ink-3); }
.wf-menu__item:disabled:hover { background: transparent; }
button.wf-people__add { border: 0; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
button.wf-people__add:hover { color: var(--th-ink-2); }
button.wf-people__add:focus-visible { outline: 2px solid var(--cx-action); outline-offset: 1px; }
.wf-flip { transform: rotate(180deg); }
.wf-start__cancel { margin-left: auto; }
.wf-lane__head:focus-visible { outline: 2px solid var(--cx-action); outline-offset: 2px; }
.wf-num[aria-invalid="true"] { border-color: var(--th-risk); }
