.product-back-projects{display:none}
body.product-editor-mode #panel-projects.product-project-open>.page-title,
body.product-editor-mode #panel-projects.product-project-open>#createProjectForm,
body.product-editor-mode #panel-projects.product-project-open>.card:has(#projectList){display:none!important}
body.product-editor-mode #panel-projects.product-project-open #projectWorkspace{display:block!important}
body.product-editor-mode #panel-projects.product-project-open .product-back-projects{display:inline-flex;min-height:42px;padding:9px 14px;font-weight:800}
body.product-editor-mode #projectWorkspace>.card-head{align-items:flex-start;gap:14px}
body.product-editor-mode #projectWorkspace>.card-head>.action-wrap{justify-content:flex-end;gap:8px;max-width:780px}
body.product-editor-mode #projectWorkspace #projectMetrics{display:none}
body.product-editor-mode #projectWorkspace .project-filters{display:none}
body.product-editor-mode #projectWorkspace .project-filters.product-empty-project{display:none!important}

.project-handoff-banner,.project-handoff-summary,.product-project-readiness{display:grid;gap:8px;border-radius:14px}
.project-handoff-banner{margin:12px 0;padding:14px 16px;border:1px solid #b7c7f5;background:#f1f5ff;color:#203a83}
.project-handoff-banner strong{font-size:16px}.project-handoff-banner span{line-height:1.55}
.project-handoff-summary{margin:10px 0 14px;padding:12px 14px;border:1px solid var(--line);background:#fafbfe}
.product-project-readiness{margin:12px 0 16px;padding:15px;border:1px solid #d7ddea;background:#fff}
.product-project-readiness-head{display:flex;justify-content:space-between;align-items:center;gap:14px}
.product-project-readiness-head>div{display:grid;gap:3px}.product-project-readiness-head small{color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.product-project-readiness-chips{display:flex;flex-wrap:wrap;gap:8px}
.product-project-readiness-chips span{display:flex;align-items:baseline;gap:6px;padding:7px 10px;border:1px solid #dce2ee;border-radius:999px;background:#f8faff;font-size:12px}
.product-project-readiness-chips strong{font-size:15px;color:#243d85}
.product-project-readiness-warnings{display:flex;flex-wrap:wrap;gap:7px}
.product-project-readiness-warnings span{padding:7px 10px;border-radius:9px;background:#fff5e6;color:#7b4b00;font-weight:700;font-size:12px}
.product-project-ready-note{margin:0;color:var(--muted);font-size:12px}

body.product-editor-mode .project-article{grid-template-columns:72px minmax(360px,1fr) minmax(150px,auto) auto!important;gap:14px!important;align-items:center;padding:14px!important}
body.product-editor-mode .project-article .article-main{grid-column:2;min-width:0}
body.product-editor-mode .project-article .article-title{font-size:15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
body.product-editor-mode .project-article .article-meta{max-height:3em;overflow:hidden;line-height:1.45}
body.product-editor-mode .project-article .article-status{grid-column:3;display:flex;flex-wrap:wrap;gap:6px;max-width:260px}
body.product-editor-mode .project-article .article-actions{grid-column:4;display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
body.product-editor-mode .project-article .project-bundle-pick{display:none!important}

body.product-editor-mode .project-order-controls{display:grid!important;grid-column:1;justify-items:center;gap:3px;cursor:grab;user-select:none;touch-action:none}
body.product-editor-mode .project-order-controls:active{cursor:grabbing}
.product-drag-grip{display:grid;place-items:center;width:36px;height:24px;border-radius:7px;background:#f1f3f7;color:#657086}
.product-drag-grip svg,.project-order-controls button svg{width:18px;height:18px;fill:currentColor}
body.product-editor-mode .project-order-controls button{display:grid;place-items:center;width:36px;min-width:36px;min-height:30px;padding:4px}
body.product-editor-mode .project-order-controls .article-index{font-size:15px;line-height:1.1}
body.product-editor-mode .project-article.dragging{opacity:.55;outline:2px dashed #3157d5}
body.product-editor-mode .project-article.drag-over{box-shadow:inset 0 3px 0 #3157d5}

body.product-editor-mode .product-open-article{min-height:44px!important;padding:9px 16px!important;font-weight:850!important;white-space:nowrap}
.product-article-more{display:none;position:relative}
body.product-editor-mode .product-article-more{display:block}
body.product-editor-mode .product-article-more>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 16px;border:1px solid #bfc8d8;border-radius:9px;background:#fff;color:#27364f;font-weight:850;cursor:pointer;list-style:none}
body.product-editor-mode .product-article-more>summary::-webkit-details-marker{display:none}
body.product-editor-mode .product-article-more[open]>summary{border-color:#3157d5;background:#eef3ff;color:#2349bd}
.product-article-actions{position:absolute;right:0;top:calc(100% + 7px);z-index:80;min-width:285px;padding:8px;background:var(--card,#fff);border:1px solid var(--border,#d8dde6);border-radius:12px;box-shadow:0 14px 36px #18223a2e}
.product-article-actions button{display:block;width:100%;min-height:42px;text-align:left;margin:2px 0;padding:9px 11px}

.product-article-details{margin-top:8px;border:1px solid #dce2ec;border-radius:9px;background:#fafbfc}
.product-article-details>summary{padding:8px 10px;color:#304a91;font-weight:800;cursor:pointer;list-style-position:inside}
.product-article-details[open]>summary{border-bottom:1px solid #dce2ec;background:#f1f5ff}
.product-article-details-body{display:grid;gap:10px;padding:11px}
.product-article-details .project-entity-counts,.product-article-details .project-role-select,.product-article-details .project-excluded-toggle{display:block!important}

.project-remark-dialog{width:min(760px,calc(100vw - 24px));border:0;border-radius:16px;padding:0;box-shadow:0 22px 70px #1018284d}
.project-remark-dialog::backdrop{background:#0f172a80}
.product-dialog-shell{display:grid;max-height:min(86vh,780px)}
.product-dialog-shell>header,.product-dialog-shell>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid var(--line)}
.product-dialog-shell>footer{border-top:1px solid var(--line);border-bottom:0;justify-content:flex-end;flex-wrap:wrap}
.product-dialog-shell header>div{display:grid;gap:2px}.product-dialog-shell header span{font-size:11px;color:var(--muted);font-weight:800;text-transform:uppercase}.product-dialog-shell h2{margin:0}
.product-dialog-body{display:grid;gap:13px;padding:18px;overflow:auto}.project-remark-article{margin:0;padding:10px 12px;border-radius:9px;background:#f3f6ff;font-weight:800}
.document-project-badge{display:inline-flex;margin:2px;padding:4px 7px;border-radius:999px;background:#edf2ff;color:#2b4eaf;font-size:11px;font-weight:800}

@media(max-width:1120px){
  body.product-editor-mode .project-article{grid-template-columns:64px minmax(250px,1fr) auto!important}
  body.product-editor-mode .project-article .article-status{grid-column:3}
  body.product-editor-mode .project-article .article-actions{grid-column:2/-1;justify-content:flex-end}
}
@media(max-width:760px){
  .product-project-readiness-head{align-items:stretch;flex-direction:column}.product-project-readiness-head button{width:100%}
  body.product-editor-mode .project-article{grid-template-columns:58px minmax(0,1fr)!important}
  body.product-editor-mode .project-article .article-main{grid-column:2}
  body.product-editor-mode .project-article .article-status{grid-column:2;max-width:none}
  body.product-editor-mode .project-article .article-actions{grid-column:1/-1;justify-content:stretch}
  body.product-editor-mode .product-open-article,body.product-editor-mode .product-article-more{flex:1}
  body.product-editor-mode .product-article-more>summary{width:100%}
  .product-article-actions{position:fixed;inset:auto 10px 10px;min-width:0;max-height:70vh;overflow:auto}
  .product-article-actions button{min-height:46px}
  .product-dialog-shell>footer>*{width:100%}
}
