#pipeline-section .ws-head{padding:12px 18px 4px;min-height:0}#pipeline-section .ws-hint{display:none}
/* Keep both board scrollbars inside the desktop workspace, regardless of lead count. */
@media(min-width:681px){
 #mx-panel .mx-panel-body:has(> #pipeline-section){display:flex;overflow:hidden}
 #mx-panel .mx-panel-body>#pipeline-section{display:flex!important;flex-direction:column;flex:1;min-height:0;min-width:0;box-sizing:border-box;overflow:hidden}
 #mx-panel #pipeline-section>.ws-head,#mx-panel #pl-smart-toolbar{flex:none}
 #mx-panel #pipeline-section #pl-board{flex:1;min-height:0;grid-template-rows:minmax(0,1fr);overflow:auto!important;box-sizing:border-box;scrollbar-width:auto;scrollbar-color:#aaa1b8 #f1eef5}
 #mx-panel #pipeline-section .pl-col{min-height:0!important}
 #mx-panel #pipeline-section .pl-cards{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;overflow-anchor:none;scrollbar-width:thin}
 #mx-panel #pipeline-section .pl-col-head,#mx-panel #pipeline-section .pl-add,#mx-panel #pipeline-section .pl-card{flex-shrink:0}
 #mx-panel #pipeline-section #pl-board::-webkit-scrollbar{width:12px;height:12px}
 #mx-panel #pipeline-section #pl-board::-webkit-scrollbar-track{background:#f1eef5;border-radius:8px}
 #mx-panel #pipeline-section #pl-board::-webkit-scrollbar-thumb{background:#aaa1b8;border:2px solid #f1eef5;border-radius:8px}
 #mx-panel #pipeline-section #pl-board::-webkit-scrollbar-thumb:hover{background:#81728f}
}
#pl-smart-toolbar{padding:8px 18px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pl-flow-tabs{display:flex;gap:7px;overflow:auto;max-width:100%;flex:1;scrollbar-width:thin;padding:3px 1px 7px}
.pl-flow-tab,.pl-flow-tools button,.pl-save-line button{border:1px solid #e6e3ed;background:#fff;border-radius:10px;padding:8px 12px;color:#514960;white-space:nowrap;cursor:pointer;font:inherit;font-size:13px}
.pl-flow-tab{border-bottom:3px solid var(--flow-color);display:flex;gap:9px;align-items:center}.pl-flow-tab.active{background:color-mix(in srgb,var(--flow-color) 10%,white);color:var(--flow-color);font-weight:700;border-color:var(--flow-color)}.pl-flow-tab span{font-size:11px;opacity:.75}
.pl-flow-tools{display:flex;gap:6px;flex-wrap:wrap}.pl-flow-tools button:hover{background:#f4f1fa}.pl-save-line{flex-basis:100%;min-height:20px;display:flex;gap:8px;align-items:center;font-size:12px;color:#6d6879}.pl-save-line button{padding:2px 8px}.pl-save-line .error,.pl-dialog-status,#pl-card-status{color:#a72b39;font-size:13px}.pl-save-line button[hidden]{display:none}
#pipeline-section #pl-board{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:minmax(260px,1fr);gap:14px;overflow-x:auto!important;align-items:stretch;padding:10px 18px 22px;max-width:100%;min-height:340px}
#pipeline-section .pl-col{min-width:0;min-height:360px!important;border:1px solid #e7e6ec;border-top:3px solid var(--pl-color);border-radius:14px;overflow:hidden;background:#f8f9fc}
#pipeline-section .pl-col-head{background:color-mix(in srgb,var(--pl-color) 12%,white)!important;padding:12px;display:flex;gap:8px;align-items:center;color:var(--pl-color);border-bottom:1px solid color-mix(in srgb,var(--pl-color) 18%,white)}
#pipeline-section .pl-col-title{flex:1;white-space:normal;font-size:14px}#pipeline-section .pl-count{font-size:12px;min-width:20px;text-align:center}.pl-col-edit{border:0;background:transparent;color:inherit;font-size:23px;line-height:22px;cursor:pointer;padding:0 4px}
#pipeline-section .pl-cards{padding:10px;display:flex;flex-direction:column;gap:9px}#pipeline-section .pl-card{width:100%;text-align:left;border:1px solid #e7e6ec;background:white;font-family:inherit;cursor:pointer;border-radius:11px;padding:12px;color:#292535;box-shadow:0 2px 4px #25104406}#pipeline-section .pl-card .nm{font-weight:600}#pipeline-section .pl-card .nt{white-space:pre-wrap;max-height:60px;overflow:hidden}#pipeline-section .pl-add{padding:12px;width:100%;border:0;background:transparent;color:#665a7e;cursor:pointer}#pipeline-section button:disabled{opacity:.5;cursor:wait}
.pl-smart-overlay{position:fixed;inset:0;background:#20163255;backdrop-filter:blur(3px);z-index:10050;display:flex;align-items:center;justify-content:center;padding:18px}.pl-smart-dialog{background:white;border-radius:20px;box-shadow:0 18px 70px #20163244;padding:24px;width:420px;max-width:100%;max-height:90dvh;overflow:auto;color:#292535}.pl-smart-dialog h3{margin:0 0 20px;font-size:20px}.pl-smart-dialog label{display:block;margin:14px 0 7px;font-size:13px;font-weight:600}.pl-smart-dialog input,.pl-smart-dialog select{display:block;box-sizing:border-box;width:100%;margin-top:8px;border:1px solid #ddd8e6;border-radius:9px;padding:11px;font:inherit;background:#fff}.pl-palette{display:flex;gap:12px;padding:4px}.pl-swatch{width:32px;height:32px;border:3px solid white;border-radius:50%;cursor:pointer}.pl-swatch[aria-pressed=true]{outline:2px solid #30233d;outline-offset:2px}.pl-dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}.pl-dialog-actions button{border:1px solid #e3ddec;border-radius:10px;background:#fff;padding:10px 15px;cursor:pointer;font:inherit}.pl-dialog-actions button[type=submit]{background:#7740d3;color:white;border-color:#7740d3}.pl-help{font-size:12px;line-height:1.5;color:#776e85}.pl-dialog-status:empty{display:none}
@media(max-width:680px){#pl-smart-toolbar{padding:8px 12px 0;gap:5px}.pl-flow-tabs{flex-basis:100%}.pl-flow-tools button{font-size:12px;padding:7px 9px}#pipeline-section #pl-board{grid-auto-columns:82vw;padding:8px 12px 20px;gap:10px;scroll-snap-type:x proximity}#pipeline-section .pl-col{scroll-snap-align:start;min-height:300px!important}.pl-smart-dialog{padding:20px}.pl-smart-dialog input,.pl-smart-dialog select{font-size:16px}}

/* Full flow editor: one draft and one save for all stages. */
.pl-smart-dialog.pl-structure-dialog{width:760px;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;max-height:90dvh}
.pl-structure-dialog>.pl-dialog-body{overflow-y:auto;min-height:0;padding:0 5px 5px;overscroll-behavior:contain}
.pl-structure-dialog>h3,.pl-structure-dialog>.pl-dialog-actions,.pl-structure-dialog>.pl-dialog-status{flex-shrink:0}
.pl-flow-details{display:grid;grid-template-columns:minmax(0,1fr) 200px;column-gap:22px;align-items:end}
.pl-flow-details>label:first-child{grid-column:1;grid-row:1}.pl-flow-details>label:has(select){grid-column:2;grid-row:1}
.pl-flow-details>label:nth-child(2){grid-column:1/-1;margin-bottom:0}.pl-flow-details>.pl-palette,.pl-flow-details>.pl-help{grid-column:1/-1}
.pl-flow-details>.pl-palette{margin-top:8px}.pl-structure{margin-top:20px;border-top:1px solid #eae6ef;padding-top:16px}.pl-structure h4{font-size:16px;margin:0 0 4px}.pl-structure>.pl-help{margin:4px 0 14px}
.pl-structure-list{display:flex;flex-direction:column;gap:10px}.pl-structure-row{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px 14px;padding:14px;border:1px solid #e6e2ec;background:#faf9fc;border-radius:12px;align-items:center}.pl-structure-row label{margin:0}.pl-structure-color>span{display:block;font-size:12px;color:#70677b;margin-bottom:7px}.pl-structure-color .pl-palette{gap:9px;padding:3px}.pl-structure-color .pl-swatch{width:29px;height:29px}.pl-structure-count{font-size:12px;color:#80758b;text-align:right}.pl-structure-dialog button:disabled{opacity:.5;cursor:wait}
@media(max-width:680px){.pl-smart-dialog.pl-structure-dialog{width:100%;padding:18px;max-height:92dvh}.pl-structure-dialog>h3{margin-bottom:10px}.pl-flow-details{grid-template-columns:minmax(0,1fr) 90px;column-gap:12px}.pl-flow-details>label:has(select){font-size:12px}.pl-structure-row{padding:11px;column-gap:10px;grid-template-columns:minmax(0,1fr) 70px}.pl-structure-color .pl-palette{gap:5px}.pl-structure-color .pl-swatch{width:26px;height:26px}.pl-structure-count{font-size:11px}.pl-structure-dialog>.pl-dialog-actions{margin-top:12px}.pl-structure-dialog>.pl-dialog-actions button{padding:9px 12px}}

/* Compact stages: direct name edit, one color control and mouse/touch grip. */
.pl-structure-list{gap:7px}.pl-structure-row.pl-compact-row{grid-template-columns:38px minmax(0,1fr) 38px 28px;gap:8px;padding:7px 10px 7px 5px;border-left:3px solid var(--stage-color);min-height:52px;box-sizing:border-box;border-radius:10px;background:#faf9fc}
.pl-compact-row .pl-stage-name{margin:0;padding:7px 8px;border:1px solid transparent;border-radius:6px;background:transparent;font:inherit;font-size:14px;min-width:0;width:100%;box-sizing:border-box;color:#292535}.pl-compact-row .pl-stage-name:hover{border-color:#e3ddec}.pl-compact-row .pl-stage-name:focus{outline:2px solid #9b71e1;background:white}
.pl-grip{border:0;background:transparent;color:#8a7c99;padding:0;min-height:36px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;justify-content:center;gap:2px}.pl-grip>span{font-size:24px}.pl-grip .pl-order{font-size:10px;color:#9b91a5}.pl-color-toggle{border:0;background:transparent;padding:7px;cursor:pointer;width:38px;height:38px;display:grid;place-items:center}.pl-color-toggle>span{width:22px;height:22px;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #ded7e8}.pl-compact-row .pl-structure-count{font-size:11px;text-align:center;background:#eeeaf3;border-radius:6px;padding:3px;color:#7d728a}
.pl-row-palette{grid-column:2/-1;display:flex;gap:10px;padding:5px 0}.pl-row-palette[hidden]{display:none}.pl-row-palette .pl-swatch{width:28px;height:28px}.pl-drag-source{opacity:.3}.pl-drag-active .pl-grip{cursor:grabbing}.pl-structure-row.pl-drag-ghost{position:fixed;z-index:10070;pointer-events:none;margin:0;box-shadow:0 12px 30px #33204730;background:white;opacity:.97;transform:rotate(-.6deg)}.pl-drag-ghost input{pointer-events:none}
.pl-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.pl-structure{margin-top:12px;padding-top:12px}.pl-structure>.pl-help{margin-bottom:10px}.pl-flow-details label{font-size:12px;margin-top:8px}.pl-flow-details .pl-help{margin:6px 0 0}.pl-flow-details>.pl-palette{margin-top:4px}.pl-flow-details .pl-swatch{width:27px;height:27px}
@media(max-width:680px){.pl-structure-row.pl-compact-row{grid-template-columns:32px minmax(0,1fr) 36px 24px;gap:4px;padding:5px 6px 5px 2px;min-height:52px}.pl-compact-row .pl-stage-name{font-size:16px;padding:6px 4px}.pl-grip{min-height:40px}.pl-color-toggle{width:36px;height:40px;padding:5px}.pl-row-palette{gap:9px}.pl-structure-dialog>.pl-dialog-body{padding-left:0;padding-right:0}.pl-smart-dialog.pl-structure-dialog{padding:16px}.pl-structure>h4{font-size:14px}.pl-structure>.pl-help{font-size:11px}}

/* Mobile: one flow row, settings on demand, narrower columns. */
.pl-flow-gear{display:none}
@media(max-width:680px){
 #pl-smart-toolbar{position:relative;display:flex;align-items:center;gap:8px;padding:8px 10px 2px}
 #pl-smart-toolbar .pl-flow-tabs{flex:1 1 0;min-width:0;padding:0;gap:6px}
 #pl-smart-toolbar .pl-flow-tab{font-size:12px;min-height:36px;padding:6px 9px;gap:6px;border-radius:9px}
 #pl-smart-toolbar .pl-flow-gear{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:1px solid #e6e3ed;border-radius:9px;background:#f6f2fc;color:#71538d;cursor:pointer}
 #pl-smart-toolbar .pl-flow-tools{display:none;position:absolute;z-index:20;right:10px;top:calc(100% + 2px);min-width:180px;padding:6px;background:#fff;border:1px solid #e6e3ed;border-radius:12px;box-shadow:0 8px 24px #30204424;flex-direction:column;gap:3px}
 #pl-smart-toolbar.pl-tools-open .pl-flow-tools{display:flex}
 #pl-smart-toolbar .pl-flow-tools button{text-align:left;border:0;padding:10px 12px;font-size:13px;min-height:38px}
 #pl-smart-toolbar .pl-save-line:not(.pl-status-important){position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;clip-path:inset(50%)}
 #pl-smart-toolbar .pl-save-line.pl-status-important{flex-basis:100%;margin-top:3px;min-width:0;overflow-wrap:anywhere}
 #pipeline-section #pl-board{grid-auto-columns:clamp(170px,54vw,270px);padding:8px 10px 16px;gap:8px;min-height:300px}
 #pipeline-section .pl-col-head{padding:8px;gap:5px;min-height:38px;box-sizing:border-box}
 #pipeline-section .pl-col-title{font-size:11px;letter-spacing:.03em;overflow-wrap:anywhere}
 #pipeline-section .pl-count{font-size:11px;min-width:14px}
 #pipeline-section .pl-col-edit{padding:3px;min-width:24px}
 #pipeline-section .pl-cards{padding:7px;gap:7px}
 #pipeline-section .pl-card{padding:9px;font-size:12px;overflow-wrap:anywhere}
 #pipeline-section .pl-card .nm{font-size:13px}#pipeline-section .pl-card .ph,#pipeline-section .pl-card .nt{font-size:11px}
 #pipeline-section .pl-add{font-size:12px;padding:10px 5px}
}

/* Completion belongs to the work, independently of its column. */
#pipeline-section .pl-card{position:relative;box-sizing:border-box}
#pipeline-section .pl-card-open{display:block;width:100%;padding:0;border:0;background:transparent;text-align:left;color:inherit;font:inherit;cursor:pointer}
#pipeline-section .pl-card-open .nm{padding-right:22px;min-height:0}
#pipeline-section .pl-card-check{position:absolute;right:7px;top:7px;display:grid;place-items:center;width:16px;height:16px;padding:0;border:1px solid #cbd5d1;border-radius:50%;background:#fff;color:#87978f;font-size:11px;line-height:1;cursor:pointer;transition:background .15s,transform .15s,color .15s}
#pipeline-section .pl-card-check:hover{background:#ecfdf5;color:#15803d;border-color:#16a34a}
#pipeline-section .pl-card-check:active{transform:scale(.9)}
#pipeline-section .pl-card-check[aria-pressed=true]{background:#16a34a;border-color:#16a34a;color:white}
#pipeline-section .pl-card-check:focus-visible,#pipeline-section .pl-card-open:focus-visible{outline:2px solid #7c3aed;outline-offset:3px}
#pipeline-section .pl-card-done{border-color:#b7dfc4}
/* Invisible hit area keeps the small icon easy to use without changing card height. */
#pipeline-section .pl-card-check::after{content:"";position:absolute;inset:-6px;border-radius:50%}
@media(pointer:coarse){#pipeline-section .pl-card-check::after{inset:-8px}}

#pipeline-section .pl-card-check:disabled{opacity:1}
