.member-view-modes{flex:none;gap:0;max-width:none}
.panel-header:has(.member-view-modes){height:auto;min-height:136px;gap:20px}
.panel-header:has(.member-view-modes) .toolbar{height:auto;flex-wrap:wrap}
.panel-header:has(.member-view-modes) .search{flex:1 1 150px}
.panel-header:has(.member-view-modes) .heading-line{flex-wrap:wrap}
.panel-header:has(.member-view-modes) .heading-actions{max-width:none;flex-wrap:wrap}
.member-resource-view{margin-top:-8px;container-type:inline-size}
.member-resource-header{--resource-category-button-width:min(188px,calc((100cqw - 26px)/5));display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 22px;padding:0 0 15px;border-bottom:1px solid var(--line)}
.member-resource-heading{flex:1 0 150px;min-width:0}
.member-resource-heading h2{margin:0;color:var(--text);font-size:15px;font-weight:620;line-height:1.35}
.member-resource-heading p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.55}
.member-resource-switcher,.role-knowledge-categories{display:grid;flex:none;gap:4px;width:max-content;max-width:100%;height:48px;margin:0 0 0 auto;padding:4px;border:1px solid #e1e6ed;border-radius:12px;background:#f4f6f9;overflow:visible}
.member-resource-switcher{grid-template-columns:repeat(2,var(--resource-category-button-width))}
.member-resource-switcher button,.role-knowledge-categories button{display:flex;align-items:center;justify-content:center;gap:8px;height:38px;min-width:0;padding:0 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:#687587;box-shadow:none;font-size:12px;white-space:nowrap}
.member-resource-switcher button:hover:not(:disabled),.role-knowledge-categories button:hover:not(:disabled){background:#fafbfe;filter:none}
.member-resource-switcher button.active,.role-knowledge-categories button.active{border-color:#c9d6ee;background:#fff;color:var(--blue);box-shadow:0 1px 3px #26385512;font-weight:600}
.member-resource-count{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:20px;padding:0 6px;border-radius:999px;background:#e9edf3;color:#738095;font-size:10px;font-weight:550;line-height:1}
.member-resource-switcher button.active .member-resource-count{background:#e8efff;color:var(--blue)}
.member-resource-view>.resource-rows>.resource-row:first-child{padding-top:14px}
.member-resource-scope{margin:12px 0 0}
.member-resource-view .resource-row-bottom:has(>button[data-member-resource]:only-child){justify-content:flex-end}
.project-role-row{position:relative}
.project-role-row .member-item{width:100%;padding-right:34px}
.role-more{position:absolute;right:6px;top:16px;z-index:2}
.role-more summary{cursor:pointer;list-style:none;color:var(--muted);padding:4px}
.role-more[open]{z-index:3}
.role-more[open] summary{background:#fff;border:1px solid var(--line);border-radius:7px}
.role-menu{display:none}
.role-more[open] .role-menu{display:block;position:absolute;right:0;top:30px;min-width:112px;padding:4px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 16px #0001}
.item-list>.project-role-row:nth-last-child(-n+2) .role-more[open] .role-menu{top:auto;bottom:30px}
.role-menu button{display:block;width:100%;white-space:nowrap;text-align:left}
.role-knowledge-categories{grid-template-columns:repeat(5,var(--resource-category-button-width))}
.role-knowledge-categories button{padding-inline:8px}
@container(max-width:1138px){.member-resource-header{align-items:stretch;flex-direction:column}.member-resource-heading{flex:none}.member-resource-switcher,.role-knowledge-categories{margin-left:auto}}
@container(max-width:360px){.member-resource-switcher button,.role-knowledge-categories button{padding-inline:4px;white-space:normal;overflow-wrap:anywhere;text-wrap:balance;line-height:1.25}}
.role-task-list{display:grid;gap:14px;padding:2px}
.role-task-card{display:block;width:100%;text-align:left;white-space:normal;height:auto;padding:20px;border:1px solid #dfe4eb;border-radius:12px;background:#fff;color:var(--text);cursor:pointer}
.role-task-card:hover{background:#f7f9fd;border-color:#cbd6e3}
.role-task-card h3{font-size:15px;margin:0;font-weight:600}
.role-task-card p{line-height:1.65;margin:10px 0 14px;color:var(--muted)}
.role-task-card .row,.role-task-detail>.row{gap:12px;flex-wrap:wrap}
.execution-kinds{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.execution-kinds span{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #dfe5ee;border-radius:999px;background:#f7f9fc;color:#53657c;font-size:11px}
.execution-context{margin:6px 0 0;color:var(--muted);font-size:12px}
.execution-source-plan{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 12px;margin:14px 0 2px;padding:11px 13px;border:1px solid #d7e1f0;border-radius:10px;background:#f6f9ff;color:#33445e}
.execution-source-plan span{grid-column:1/-1;color:#728097;font-size:10px;font-weight:650;letter-spacing:.08em}
.execution-source-plan strong{min-width:0;font-size:13px;font-weight:650;overflow-wrap:anywhere}
.execution-source-plan strong .text{padding:0;color:var(--blue);font-weight:650;text-align:left}
.execution-source-plan em{font-style:normal;color:#51647f;font-size:11px;white-space:nowrap}
.execution-source-plan small{grid-column:1/-1;color:var(--muted)}
.execution-source-plan.is-exploration{border-style:dashed;background:#fafbfc;color:#596779}
.execution-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 2px 16px}
.execution-list-toolbar .helper{margin:0;max-width:560px}
.execution-list-toolbar label{display:flex;align-items:center;gap:8px;flex:none;color:var(--muted);font-size:11px}
.execution-list-toolbar select{min-width:128px}
.role-task-chain{display:grid;gap:18px;margin:20px 0}
.role-task-step{padding:16px;border:1px solid var(--line);border-radius:10px;min-width:0}
.role-task-step>.row{gap:10px;flex-wrap:wrap;margin-bottom:12px}
.role-task-step .log-record{margin-bottom:0}
.execution-original{margin-top:24px}
.execution-original>.helper{margin:-3px 0 14px}
.execution-fact-card+.execution-fact-card{margin-top:12px}
.execution-fact-card .skill-step-heading>span{flex:none}
.execution-step-meta{margin:0 0 10px!important;color:var(--muted);font-size:12px}
.execution-fact-card .log-record{margin:0}
.execution-next-empty,.execution-next-plan{margin:28px 0 0;padding-top:22px;border-top:1px solid var(--line)}
.execution-next-empty{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:8px}
.execution-next-empty p,.execution-section-heading p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.8}
.execution-next-empty button{flex:none}
.execution-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.execution-next-plan>.row:first-of-type{margin-top:8px}
.execution-next-plan .skill-step-flow{margin-top:22px}
.role-task-result,.role-task-notes{margin:24px 0;padding-top:18px;border-top:1px solid var(--line)}
.role-task-detail pre,.role-task-notes pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.75}
.project-workspace-dialog input,.project-workspace-dialog textarea{width:100%}
.project-workspace-dialog label{display:block;margin-top:18px;margin-bottom:8px}
.project-workspace-dialog .wp-editor{min-height:260px}
@media(max-width:820px){.member-view-modes{flex-wrap:wrap}.project-workspace .role-task-card{padding:14px}.project-workspace .badge{white-space:normal}.execution-source-plan{grid-template-columns:1fr auto}.execution-list-toolbar,.execution-next-empty,.execution-section-heading{align-items:flex-start;flex-direction:column}}
.project-archive-menu{position:relative;display:inline-flex}
.project-archive-menu>summary{list-style:none;cursor:pointer;border:1px solid #dce1e8;border-radius:8px;padding:7px 11px;background:#fff;font-size:12px;white-space:nowrap;user-select:none;display:inline-flex;align-items:center;justify-content:center}
.project-archive-menu>summary::-webkit-details-marker{display:none}
.project-archive-menu>summary:hover{filter:brightness(.97)}
.project-archive-dropdown{display:none}
.project-archive-menu[open] .project-archive-dropdown{display:flex;flex-direction:column;position:absolute;right:0;top:calc(100% + 4px);z-index:30;min-width:112px;padding:4px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 16px #0001;gap:2px}
.project-archive-dropdown button{display:block;width:100%;white-space:nowrap;text-align:left;border:0;background:transparent;border-radius:6px;padding:6px 10px;font-size:12px;cursor:pointer}
.project-archive-dropdown button:hover{background:#f0f4ff;color:#2855ac}

/* Project Task Single-Column Workspace & Cards (UX-05 Refined) */
.project-task-workspace{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;padding:24px 28px 40px;background:#fff;box-sizing:border-box}
.project-task-list{display:flex;flex-direction:column;gap:12px;width:100%;max-width:100%;padding:0;margin:0}
.project-task-card{position:relative;display:flex;flex-direction:column;gap:8px;width:100%;box-sizing:border-box;padding:16px 20px;border:1px solid #dfe4eb;border-radius:12px;background:#fff;text-align:left;cursor:pointer;outline:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.project-task-card:hover{background:#f8fafd;border-color:#cbd8e8;box-shadow:0 2px 8px rgba(38,56,85,0.05)}
.project-task-card:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.project-task-card .task-card-main-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.project-task-card .task-card-title{margin:0;font-size:15px;font-weight:650;color:var(--text);line-height:1.4;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-task-card .task-card-summary{margin:2px 0 4px;font-size:13px;color:#556578;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
.project-task-card .task-card-meta-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted);flex-wrap:wrap}
.project-task-card .task-card-participants{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-task-card .task-card-time{flex-shrink:0;white-space:nowrap}

/* Empty states */
.project-task-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;border:1px dashed #d0d7e2;border-radius:12px;background:#fafbfd;text-align:center;margin:20px 0}
.project-task-empty h3{margin:0 0 8px;font-size:15px;font-weight:600;color:var(--text)}
.project-task-empty p{margin:0 0 16px;font-size:13px;color:var(--muted);line-height:1.6}

/* Page-header geometry is owned by the shared shell. */
.panel-header .visible-title{font-size:22px;font-weight:600;line-height:1.3;margin:0;color:var(--text,#1a202c);letter-spacing:-.4px}

/* Project Task Detail View (UX-06 Refined) */
.project-task-detail-view{background:#f8fafd}
.project-task-detail-view .project-task-detail{width:100%;max-width:none}
.project-task-back-btn{display:inline-flex;align-items:center;gap:var(--ui-control-gap);margin-bottom:var(--ui-content-gap);color:var(--blue);background:transparent;border:0}
.project-task-back-btn:hover{background:#edf2fc;text-decoration:none}
.task-meta-line{display:flex;align-items:center;flex-wrap:wrap;color:var(--muted)}
.task-outcome-rendered{font-size:14px;line-height:1.7;color:#2d3748}
.task-outcome-rendered h2,.task-rendered-h2{font-size:18px;font-weight:650;margin:16px 0 8px;color:#1a202c}
.task-outcome-rendered h3,.task-rendered-h3{font-size:16px;font-weight:600;margin:14px 0 6px;color:#2d3748}
.task-outcome-rendered h4,.task-rendered-h4{font-size:14px;font-weight:600;margin:12px 0 4px;color:#2d3748}
.task-outcome-p{margin:8px 0;font-size:14px;line-height:1.65}
.task-outcome-list{margin:8px 0;padding-left:22px}
.task-outcome-list li{margin:4px 0;font-size:14px;line-height:1.6}
.task-code-block{background:#f1f4f9;border:1px solid #dce4ef;border-radius:8px;padding:12px 14px;margin:12px 0;overflow-x:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;line-height:1.55}

/* Project team uses the standard page shell. */
.team-workspace{display:grid;grid-template-columns:260px minmax(0,1fr);flex:1;min-height:0;overflow:hidden}
.team-roster{overflow-y:auto;padding:16px 14px;border-right:1px solid var(--line);background:#f7f9fb;display:flex;flex-direction:column;gap:14px}
.team-roster-group{display:flex;flex-direction:column;gap:8px}
.team-roster-group .section-head{margin-bottom:2px}
.team-config-row{display:flex;align-items:center;gap:6px;width:100%;position:relative}
.team-config-row .directory-card{flex:1;min-width:0}
.team-candidate-row{display:flex;align-items:center;gap:6px;width:100%}
.team-add-btn{flex:none;height:32px;padding:0 10px;font-size:12px;border-radius:6px;border:1px solid #c9d6ee;background:#fff;color:var(--blue);cursor:pointer;white-space:nowrap}
.team-add-btn:hover{background:#edf3fe;border-color:var(--blue)}
.team-candidate-empty{padding:12px 6px;text-align:center;color:var(--muted);font-size:12px}

/* Team Role Right Pane */
.team-role-config-pane{display:flex;flex-direction:column;gap:18px;padding:24px;overflow-y:auto;flex:1;background:#fff}
.team-role-config-heading{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:16px;border-bottom:1px solid var(--line)}
.team-role-config-heading h3{margin:0 0 4px}
.team-role-section{padding:0 0 18px;border-bottom:1px solid var(--line)}
.team-role-section:last-of-type{border-bottom:none}
.team-role-section .section-head{margin-bottom:8px}
.team-role-section h4{margin:0}
.team-role-section .helper{margin:0;color:var(--muted)}
.team-field-display{padding:4px 0}
.team-field-text{line-height:1.8;margin:0;white-space:pre-wrap}
.team-field-edit-area textarea{width:100%;box-sizing:border-box;line-height:1.8;padding:10px 12px;border:1px solid #dce2e9;border-radius:8px;background:#fff;margin-top:6px}
.team-role-actions-bar{display:flex;flex-direction:column;gap:10px;padding-top:6px}
.team-edit-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.team-role-error{color:#e53e3e;font-size:13px;margin:0;padding:6px 0}

/* Responsive adjustments */
@media(max-width:1024px){
 .team-workspace{grid-template-columns:220px minmax(0,1fr)}
 .project-task-workspace{padding:20px 16px 36px}
}
@media(max-width:768px){
 .team-workspace{grid-template-columns:1fr;display:flex;flex-direction:column}
 .team-roster{max-height:240px;border-right:none;border-bottom:1px solid var(--line)}
}
.ui-workspace .content-shell .team-config-row .directory-card.member-item{padding-right:12px}
.team-config-row .team-add-btn{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:28px;height:28px;padding:0;border:0;background:transparent;color:var(--muted);font-size:22px;line-height:1;display:grid;place-items:center}
.ui-workspace .content-shell .team-candidate-row .directory-card.member-item{padding-right:46px}
.team-role-config-heading{flex-wrap:wrap;gap:10px}
.team-role-config-heading>div{flex:1;min-width:150px}
.team-field-text{overflow-wrap:anywhere}



.ui-workspace .content-shell .team-workspace{grid-template-columns:248px minmax(0,1fr);gap:0}
.ui-workspace .content-shell .team-workspace .member-detail{padding:0;overflow:hidden;display:flex;flex-direction:column}
.ui-workspace .content-shell .team-workspace .member-roster>.item-list{display:flex;flex-direction:column;gap:16px}
.ui-workspace .content-shell .team-workspace .team-roster-group>.item-list{gap:var(--ui-directory-card-gap)}
.team-workspace .team-roster-group .section-head{margin-bottom:8px}
.team-candidate-row .directory-card{cursor:default}
.team-config-row .team-add-btn:hover{background:#e9eff8;color:var(--blue)}
@media(max-width:760px){
 .ui-workspace .content-shell .team-workspace{display:flex;flex-direction:column}
 .team-workspace .member-roster{max-height:220px;border-right:0;border-bottom:1px solid var(--line);flex:none}
 .team-workspace .member-detail{min-height:240px}
}

/* Task activity shares the knowledge-library step card, with local facts per entry. */

.project-task-detail .task-detail-header-block h2{margin:0}
.project-task-detail .task-meta-line{gap:var(--ui-content-gap)}
.task-activity-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-control-gap);margin-bottom:var(--ui-content-gap)}
.task-activity-heading h3,.task-activity-card h3,.task-activity-card h4{margin:0}
.task-activity-list{list-style:none;margin:0;padding:0}
.task-activity-list>li{min-width:0}
.task-activity-card .skill-step-heading{align-items:flex-start;flex-wrap:wrap;gap:var(--ui-control-gap)}
.task-activity-card .skill-step-heading>div{flex:1;align-items:flex-start}
.task-activity-body{display:grid;gap:var(--ui-content-gap)}
.task-activity-body p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.task-activity-context{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--ui-directory-width)),1fr));gap:var(--ui-control-gap);margin:0}
.task-activity-field{display:grid;grid-template-columns:6em minmax(0,1fr);gap:var(--ui-control-gap);align-items:baseline}
.task-activity-field dt{color:var(--muted)}
.task-activity-field dd{margin:0;min-width:0;overflow-wrap:anywhere}
.task-activity-wide{grid-column:1/-1}
.task-activity-card-heading{display:grid;gap:var(--ui-space-1)}
.task-activity-card-heading p{margin:0}
.task-activity-plan>summary{padding-block:0}
.task-activity-result.is-failure{color:var(--danger,#a75454)}
.task-activity-actions{display:flex;flex-wrap:wrap;gap:var(--ui-control-gap)}
.task-activity-details{min-width:0;margin:0}
.task-activity-details>summary{cursor:pointer;color:var(--blue);min-height:var(--ui-control-height);padding-block:var(--ui-space-2);box-sizing:border-box;overflow-wrap:anywhere}
.task-activity-details>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:var(--ui-control-radius)}
.task-activity-expanded{display:grid;gap:var(--ui-content-gap);padding-top:var(--ui-control-gap);min-width:0;overflow-wrap:anywhere}
.task-activity-expanded .task-outcome-rendered{min-width:0}
.task-activity-references{list-style:none;margin:0;padding:0;display:grid;gap:var(--ui-control-gap)}
.task-activity-location{display:block;color:var(--muted)}
.task-activity-metadata{margin-top:var(--ui-section-gap);padding-top:var(--ui-content-gap);border-top:1px solid var(--line)}

.task-activity-report{border-bottom:1px solid var(--line)}
.task-activity-report .skill-step-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-control-gap)}
.task-activity-report .skill-step-heading>div{min-width:0;flex:1}
.task-activity-report h3{margin:0}
.task-activity-filters{display:flex;flex-wrap:wrap;align-items:center}
.task-activity-filters>label{display:flex;align-items:center;min-width:0}
.task-activity-filters .search{flex:1}
.task-outcome-entry{display:grid;min-width:0}
.task-outcome-entry p{overflow-wrap:anywhere}

.task-activity-update{position:sticky;top:0;z-index:2}
