.wf-heading,.wf-actions,.wf-breadcrumb,.wf-map-head,.wf-counts,.wf-inventory>div { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.wf-heading { justify-content:space-between; padding:16px 0; }
.wf-heading h3 { font-size:23px; margin:4px 0; }
.wf-kicker,.wf-map-head>span,.wf-inventory span { color:#626779; font-size:13px; }
.wf-progress { padding:12px 0; margin:0; list-style:none; display:flex; gap:20px; flex-wrap:wrap; border-block:1px solid #dfe2e8; }
.wf-progress li { display:flex; gap:7px; align-items:center; font-size:13px; color:#666b79; }
.wf-progress .done { color:#29764b; }.wf-progress .active { font-weight:700; color:#1c1e40; }
.wf-impulse { padding:14px 0; border-bottom:1px solid #dfe2e8; }
.wf-impulse p,.wf-impulse dd { white-space:pre-wrap; overflow-wrap:anywhere; }.wf-impulse dd { margin:0 0 12px; }
.wf-draft,.wf-assessment { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:20px 0; }
.wf-wide { grid-column:1 / -1; }.wf-draft label,.wf-assessment label { min-width:0; }
.wf-inventory { padding:16px 0; border-block:1px solid #dfe2e8; }.wf-inventory details { margin-top:12px; }.wf-counts { margin-top:12px; }
.wf-counts span,.wf-link { display:inline-flex; align-items:center; gap:7px; }.wf-link { padding:8px; }
.wf-breadcrumb { gap:4px; padding:16px 0 8px; }.wf-breadcrumb button { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.wf-map-head { justify-content:space-between; }.wf-legend { display:flex; flex-wrap:wrap; gap:18px; font-size:12px; margin:14px 0; }
.wf-stroke { display:flex; align-items:center; gap:8px; }.wf-stroke::before { content:""; width:26px; border-top:1.5px solid #1c1e40; }.wf-stroke.idea::before { border-top-style:dashed; }.wf-stroke.artifact::before { border-top-width:4px; }
.wf-phase::before { content:""; display:inline-block; width:8px; height:8px; background:#c18b24; border-radius:50%; margin-right:6px; }
#workflowView[data-phase="Anstoss"] .wf-phase::before { background:#777e8f; }
.wf-viewport { overflow:auto; max-height:590px; background:#fff; border-block:1px solid #dfe2e8; }.wf-canvas { max-width:none; margin:auto; }.wf-canvas>svg { display:block; width:100%; font-family:inherit; letter-spacing:0; }
.wf-canvas .wf-system-boundary { fill:#fafbfd; stroke:#aab0bd; stroke-width:1; }.wf-canvas .c-grid { stroke:#edf0f5; fill:none; }.wf-canvas .c-mask { fill:#fafbfd; stroke:none; }
.wf-canvas [data-node-id]>rect:not(.c-mask) { stroke:#1c1e40; stroke-width:1.5; fill:#fff; rx:4; }.wf-canvas [data-material="idea"]>rect:not(.c-mask) { stroke-dasharray:7 5; }.wf-canvas [data-material="artifact"]>rect:not(.c-mask) { stroke-width:4.5; stroke-linejoin:round; }
.wf-canvas [data-material="artifact"]>rect:not(.c-mask) { stroke:none; }.wf-material-outline { fill:none; stroke:#1c1e40; stroke-width:4.5; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.wf-canvas [role="button"] { cursor:pointer; }.wf-canvas [role="button"]:hover>rect:not(.c-mask),.wf-canvas [role="button"]:focus>rect:not(.c-mask) { fill:#f0f2f8; }.wf-canvas text { fill:#1c1e40; }.wf-canvas text[data-node-label] { font-size:16px; font-weight:650; }.wf-canvas text[data-detail] { font-size:12px; }.wf-phase-dot { fill:#c18b24; }.wf-canvas [data-phase="Anstoss"] .wf-phase-dot { fill:#777e8f; }
.wf-canvas path[data-edge-id] { stroke:#777e8f; fill:none; stroke-dasharray:6 5; }.wf-canvas .semantic-sigil { stroke:#1c1e40; fill:none; }.wf-canvas .sigil-fill { fill:#1c1e40; }
.wf-add { display:flex; align-items:flex-end; gap:10px; padding:16px 0; }.wf-add label { flex:1; max-width:400px; }.wf-add button { width:44px; height:44px; flex:none; }
.wf-inspector { border-top:1px solid #dfe2e8; }.wf-inspector:empty { display:none; }.wf-inspector h4 { display:flex; gap:10px; align-items:center; font-size:20px; margin:20px 0 8px; }.wf-open { color:#965018; display:block; margin:8px 0; }.wf-access { color:#626779; display:flex; align-items:center; gap:7px; }
.wf-proof { display:flex; align-items:center; gap:8px; overflow-wrap:anywhere; padding:5px 0; }.wf-proof input { width:18px; height:18px; flex:none; }.wf-context { border-top:1px solid #dfe2e8; padding:18px 0; }.wf-context summary { margin-bottom:12px; }
#workflowView summary { cursor:pointer; }#workflowView .lucide { width:18px; height:18px; flex:none; }#workflowView button { display:inline-flex; justify-content:center; align-items:center; gap:7px; }
@media(max-width:700px) { .wf-draft,.wf-assessment { grid-template-columns:minmax(0,1fr); }.wf-heading h3 { font-size:20px; }.wf-actions { gap:8px; }.wf-actions button { min-height:42px; white-space:normal; }.wf-progress { gap:12px; }.wf-viewport { max-height:430px; } }
.wf-foundation,.wf-edit-tools { padding:12px 0; border-bottom:1px solid #dfe2e8; }
.wf-foundation>summary,.wf-edit-tools>summary { font-size:13px; color:#626779; }
.wf-workspace { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:24px; border-top:1px solid #dfe2e8; padding:16px 0 24px; }
.wf-workspace.has-direct { grid-template-columns:minmax(0,1fr) minmax(290px,340px); }
.wf-workspace .wf-viewport { border:0; max-height:640px; }
.wf-workspace .wf-canvas { width:100%; }
.wf-workspace .wf-brain { min-width:0; border-left:1px solid #dfe2e8; padding-left:22px; }
.br-heading,.br-job,.br-task-top { display:flex; align-items:center; gap:10px; }
.br-heading { justify-content:space-between; margin-bottom:12px; }
.br-heading h3 { font-size:18px; margin:0 0 4px; }.br-heading span,.br-empty,.br-task-top span { font-size:13px; color:#626779; }
#workflowView .br-icon { width:40px; height:40px; min-height:40px; padding:8px; flex:none; }
#workflowView .br-result-row { display:grid; grid-template-columns:20px minmax(0,1fr) 16px; gap:10px; width:100%; min-height:66px; padding:12px 0; border:0; border-bottom:1px solid #e4e7ed; border-radius:0; background:transparent; color:#1c1e40; text-align:left; font-weight:400; }
#workflowView .br-result-row:hover,#workflowView .br-result-row:focus-visible { background:#f0f2f8; }
.br-result-row strong { display:block; font-size:14px; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.br-result-row small { display:block; font-size:12px; color:#626779; margin-top:4px; line-height:1.4; }
.br-result-row[data-tone="proposal"]>svg:first-child { color:#ad315c; }.br-result-row[data-tone="answered"]>svg:first-child { color:#28744f; }
.br-review-start { margin-top:16px; width:100%; }
.br-evidence,.br-history,.br-reason,.br-alternative { border-top:1px solid #e4e7ed; padding-top:14px; margin-top:18px; }
.br-evidence summary,.br-history summary,.br-reason summary,.br-alternative summary,.br-proof summary { font-size:12px; color:#626779; }
.br-evidence p,.br-reason p,.br-review-row p { font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.br-evidence a,.br-reason a { font-size:12px; }.br-evidence div { margin-top:10px; }.br-stale { color:#965018; font-size:13px; }.br-job { flex-wrap:wrap; font-size:13px; padding:10px 0; }
.br-active-task h4 { font-size:18px; line-height:1.4; margin:12px 0 6px; overflow-wrap:anywhere; }
.br-active-task>small { color:#626779; font-size:12px; }.br-question { font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.br-answer { display:grid; gap:14px; padding-top:16px; }.br-answer label { font-size:13px; min-width:0; }.br-answer .br-alternative { margin:0; border:0; padding:0; }.br-answer .br-alternative label { margin-top:10px; }
.br-saved { border-left:3px solid #28744f; padding-left:12px; margin:16px 0; }.br-saved strong { font-size:13px; color:#28744f; }.br-saved p { font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }.br-saved span { display:flex; gap:6px; font-size:12px; overflow-wrap:anywhere; margin:6px 0; }
.br-message:empty { display:none; }.br-node-badge { pointer-events:none; color:#ad315c; }.br-node-badge[data-tone="open"] { color:#965018; }.br-node-badge[data-tone="answered"] { color:#28744f; }
.wf-canvas .br-node-badge text { fill:currentColor; font-size:12px; font-weight:600; }
.wf-canvas .br-selected-node>rect:not(.c-mask) { fill:#eef0f7; stroke-width:2.5; }
.br-review-dialog { width:min(620px,calc(100% - 24px)); max-height:85vh; padding:24px; border:1px solid #cbd0dc; border-radius:6px; color:#1c1e40; }
.br-review-dialog::backdrop { background:#15182c66; }.br-review-dialog>header { display:flex; justify-content:space-between; align-items:center; gap:12px; }.br-review-dialog h3 { font-size:20px; margin:0; }
.br-review-row { border-bottom:1px solid #e4e7ed; padding:14px 0; }.br-review-row label { display:flex; gap:10px; align-items:center; font-size:14px; line-height:1.4; }.br-review-row label span { min-width:0; overflow-wrap:anywhere; }.br-review-row input { width:18px; height:18px; flex:none; }
.br-review-row details { margin:8px 0 0 28px; }.br-review-row summary,.br-review>details summary { font-size:12px; color:#626779; }.br-review>details { margin-top:14px; }.br-review footer { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:20px; }.br-selection-count { font-size:12px; }
@media(max-width:1000px) { .wf-workspace { grid-template-columns:minmax(0,1fr); }.wf-workspace .wf-brain { border-left:0; border-top:1px solid #dfe2e8; padding:18px 0 0; }.wf-workspace .wf-viewport { max-height:none; } }
@media(max-width:700px) { .wf-workspace { gap:16px; }.br-review-dialog { padding:16px; }.br-review footer>button { width:100%; }.br-active-task button { white-space:normal; }.wf-heading { gap:8px; }.wf-heading h3 { font-size:20px; } }
.wf-analysis { border-top:1px solid #dfe2e8; padding:14px 0; }.wf-analysis>summary { color:#626779; font-size:13px; }.wf-analysis .wf-brain { max-width:680px; padding-top:18px; }
.wf-direct { min-width:0; padding-left:22px; border-left:1px solid #dfe2e8; }.wf-direct:empty { display:none; }
.wf-direct h3 { display:flex; align-items:center; gap:8px; font-size:18px; margin:0 0 18px; }
.cn-connect { display:grid; gap:16px; }.cn-connect label { font-size:13px; min-width:0; }.cn-connect input { min-width:0; width:100%; }
.cn-connect small,.cn-scope { display:flex; align-items:center; gap:6px; font-size:12px; color:#626779; line-height:1.5; }.cn-scope { margin-top:14px; }
.wf-direct details { border-top:1px solid #dfe2e8; padding-top:14px; margin-top:16px; }.wf-direct summary { font-size:12px; color:#626779; }.wf-direct details form { margin:16px 0; }
.cn-status { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:14px; }.cn-status time { font-size:12px; color:#626779; }
.cn-status[data-tone="ready"],.cn-node-badge[data-tone="ready"] { color:#28744f; }.cn-status[data-tone="missing"],.cn-node-badge[data-tone="missing"] { color:#965018; }
.cn-node-badge { pointer-events:none; color:#1c1e40; }.wf-canvas .cn-node-badge text { fill:currentColor; font-size:12px; font-weight:600; }
.wf-node-count { pointer-events:none; }
.wf-canvas .wf-node-count rect { fill:#f1f3f7; stroke:#1c1e40; stroke-width:1; }
.wf-canvas .wf-node-count text { fill:#1c1e40; font-size:13px; font-weight:700; text-anchor:middle; }
.cn-message:empty { display:none; }.cn-document { display:flex; align-items:center; gap:8px; overflow-wrap:anywhere; font-size:13px; padding:12px 0; border-bottom:1px solid #dfe2e8; }
.cn-books { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr)); gap:20px 16px; list-style:none; padding:0; margin:0; }
.cn-books li { min-width:0; }
.cn-book { display:flex; flex-direction:column; align-items:center; gap:8px; color:#1c1e40; text-decoration:none; min-width:0; }
.cn-book:hover .cn-book-title { text-decoration:underline; }
.cn-book:focus-visible { outline:3px solid #0284c7; outline-offset:4px; }
.cn-book-cover { position:relative; display:grid; place-items:center; width:100%; max-width:144px; height:192px; background:#f1f3f7; }
.cn-book-fallback { display:grid; place-items:center; color:#626779; }
#workflowView .cn-book-fallback .lucide { width:44px; height:44px; }
.cn-book-cover-img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; visibility:hidden; }
.cn-book-cover[data-loaded="true"] .cn-book-cover-img { visibility:visible; }
.cn-book-cover[data-loaded="true"] .cn-book-fallback { visibility:hidden; }
.cn-book-title { width:100%; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.cn-books-empty { color:#626779; font-size:14px; }
.wf-direct h3 { min-width:0; overflow-wrap:anywhere; }
@media(max-width:1000px) { .wf-workspace.has-direct { grid-template-columns:minmax(0,1fr); }.wf-direct { order:-1; padding:0 0 18px; border-left:0; border-bottom:1px solid #dfe2e8; } }
/* SE-15: the existing workflow viewport owns the spatial view. */
.wf-view-toggle { display:inline-flex; gap:0; }
#workflowView .wf-view-toggle button { min-height:36px; padding:5px 10px; border:1px solid #cbd0dc; border-radius:0; background:transparent; color:#1c1e40; }
#workflowView .wf-view-toggle button:first-child { border-radius:5px 0 0 5px; }
#workflowView .wf-view-toggle button:last-child { border-radius:0 5px 5px 0; }
#workflowView .wf-view-toggle button[aria-pressed="true"] { background:#1c1e40; color:white; }
#workflowView[data-map-mode="3d"] .wf-workspace { border:0; padding-top:0; gap:16px; }
#workflowView[data-map-mode="3d"] .wf-viewport { padding:0; overflow:hidden; max-height:none; width:100%; min-width:0; }
.wf-spatial { position:relative; height:clamp(500px,68vh,780px); width:100%; background:#f8fafc; }
#workflowView .wf-plane-back { position:absolute; z-index:1; transform:translate(-50%,-50%); width:44px; height:44px; min-width:44px; min-height:44px; padding:8px; border:2px solid #1c1e40; border-radius:8px; color:#1c1e40; background:#f8fafc; box-shadow:0 2px 6px #1c1e4026; touch-action:none; user-select:none; }
#workflowView .wf-plane-back[hidden] { display:none; }
#workflowView .wf-plane-back:hover { background:#edf0f5; }
#workflowView .wf-plane-back:focus-visible { outline:3px solid #0284c7; outline-offset:3px; }
#workflowView .wf-plane-back .lucide { width:24px; height:24px; }
.wf-spatial canvas { touch-action:none; }
.wf-spatial canvas:focus-visible { outline:2px solid #0284c7 !important; outline-offset:-3px; }
.wf-spatial-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:6px 0 12px; }
.wf-spatial-tools label { display:flex; align-items:center; gap:8px; font-size:12px; min-width:0; flex:1; max-width:420px; }
.wf-spatial-select { min-width:0; width:100%; min-height:44px; color:#1c1e40; background:#fff; border:1px solid #cbd0dc; border-radius:4px; }
#workflowView .wf-spatial-tools button { width:44px; min-height:44px; flex:none; }
.wf-spatial-caption { font-size:12px; color:#626779; margin:0; grid-column:1; }
#workflowView[data-map-mode="3d"] .wf-direct { grid-column:2; grid-row:1 / span 2; }
@media(max-width:1000px) { #workflowView[data-map-mode="3d"] .wf-direct { grid-column:1; grid-row:auto; } }
@media(max-width:700px) {
  .wf-spatial { height:550px; }
  .wf-spatial-tools { gap:4px; }
  .wf-spatial-tools label { font-size:0; }
  .wf-spatial-select { font-size:13px; }
  .wf-map-toolbar,.wf-map-head { flex-wrap:wrap; }
  .wf-breadcrumb { flex-wrap:wrap; }
}
.wf-map-stage { min-width:0; }
.wf-return { flex:none; margin:0 0 8px; }
#workflowView [data-workflow-back] { display:inline-flex; align-items:center; gap:8px; min-height:44px; max-width:100%; text-align:left; }
#workflowView [data-workflow-back] svg { flex:none; }
#workflowView [data-workflow-back] span { min-width:0; overflow-wrap:anywhere; }
#workflowView .wf-map-head [data-spatial-maximize] { width:44px; min-height:44px; padding:8px; }
#workflowView.wf-maximized .wf-map-stage { position:fixed; inset:0; z-index:90; background:#f8fafc; padding:12px 20px; display:flex; flex-direction:column; overflow:auto; }
#workflowView.wf-maximized .wf-map-toolbar { flex:none; }
#workflowView.wf-maximized .wf-spatial-tools { flex:none; margin:4px 0 8px; }
#workflowView.wf-maximized .wf-workspace { flex:1; min-height:0; margin:0; padding:0; grid-template-rows:minmax(0,1fr) auto; }
#workflowView.wf-maximized .wf-viewport { height:100%; max-height:none; }
#workflowView.wf-maximized .wf-spatial { height:100%; min-height:300px; }
#workflowView.wf-maximized .wf-direct { max-height:100%; overflow:auto; padding-top:8px; }
@media(max-width:1000px) {
  #workflowView.wf-maximized .wf-workspace.has-direct { overflow:auto; display:flex; flex-direction:column; }
  #workflowView.wf-maximized .has-direct .wf-viewport { min-height:60vh; flex:none; }
  #workflowView.wf-maximized .wf-direct { flex:none; width:100%; }
}
@media(max-width:700px) {
  #workflowView.wf-maximized .wf-map-stage { padding:8px; }
  #workflowView.wf-maximized .wf-breadcrumb { padding:4px 0; }
}
#workflowView[data-map-mode="hyperraum"] .wf-viewport { max-height:none;overflow:visible;background:transparent;min-width:0; }
#workflowView[data-map-mode="hyperraum"] .wf-orchard-host { width:100%;min-width:0; }
#workflowView[data-map-mode="hyperraum"] .wf-map-head>span,#workflowView[data-map-mode="hyperraum"]:not([data-work-phase="grobkonzept"]) .wf-map-key { display:none; }
#workflowView[data-map-mode="hyperraum"] .wf-workspace { padding-top:8px; }

#workflowView .wf-orientation { position:relative; display:grid; gap:4px; margin-bottom:8px; min-width:0; }
#workflowView .wf-orientation .wf-heading { margin:0; padding:0; }
#workflowView .wf-orientation .wf-map-toolbar { flex-wrap:wrap; margin:0; }
#workflowView .wf-orientation .wf-return { margin:0; }
#workflowView .wf-orientation .wf-breadcrumb { flex:1 1 160px; min-width:0; margin:0; padding:0; }
#workflowView .wf-orientation .wf-breadcrumb button { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
#workflowView .wf-orientation .wf-map-head { min-width:0; margin:0; gap:8px; }
#workflowView .wf-orientation .wf-view-toggle { flex-wrap:wrap; }
#workflowView .wf-orientation .wf-map-key { position:static; }
#workflowView .wf-orientation .wf-legend { max-width:100%; box-sizing:border-box; }
#workflowView .wf-boundary-label,#workflowView .wf-blocked-label { margin:0; overflow-wrap:anywhere; }
#workflowView .wf-boundary-label { color:#42485f; }
#workflowView .wf-blocked-label { color:#854014; }
#workflowView.wf-maximized .wf-orientation { flex:none; }
#workflowView[data-work-phase="grobkonzept"][data-map-mode="2d"] .wf-canvas g[data-node-kind="backend"] > text[data-detail="context"] { display:none; }
#workflowView[data-work-phase="grobkonzept"][data-map-mode="2d"] .wf-canvas .wf-system-boundary { stroke:var(--accent); }
