/* The new surface mounts the original editors; styles are scoped to this page. */
#projectWorkspacePage[data-pd-mounted] { flex-direction: column; height: 100vh; overflow: hidden; min-height: 0; }
body.project-workspace-mode #projectWorkspacePage[data-pd-mounted] { display: flex; }
#projectWorkspacePage[data-pd-mounted] > .project-details-header { flex: 0 0 auto; background: var(--surface); padding: 18px 22px; }
#projectWorkspacePage .pd-default-tab-control { display: inline-flex; align-items: center; gap: 7px; margin-left: 10px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 650; }
#projectWorkspacePage .pd-default-tab-control span { display: inline; margin: 0; color: inherit; font: inherit; white-space: nowrap; }
#projectWorkspacePage .pd-default-tab-control select { min-width: 170px; max-width: min(250px, 42vw); border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; padding: 7px 28px 7px 9px; }
#projectWorkspacePage .pd-workspace { display: flex; flex-direction: column; min-height: 0; flex: 1; color: var(--text); background: var(--surface); font-family: Arial, sans-serif; font-size: 13px; letter-spacing: 0; }
#projectWorkspacePage .pd-workspace [hidden], #projectWorkspacePage #pdLegacy { display: none !important; }
.pd-workspace * { box-sizing: border-box; }
.pd-workspace h2 { font-size: 18px; line-height: 1.35; margin: 0; }
.pd-workspace h3 { font-size: 13px; line-height: 1.4; margin: 0; }
.pd-workspace button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.35; }
.pd-workspace button:hover { background: var(--surface-2); }
.pd-workspace button.primary-button { background: var(--blue); border-color: var(--blue); color: white; }
.pd-workspace button:disabled { cursor: default; opacity: .5; }
.pd-workspace button:focus-visible, .pd-workspace input:focus-visible, .pd-workspace select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pd-workspace [data-pd-icon] { display: inline-flex; flex: 0 0 auto; }
.pd-workspace [data-pd-icon] svg { width: 16px; height: 16px; stroke-width: 1.7; transform: scale(1.5); transform-origin: center; }
.pd-workspace :is(input,select,textarea) { max-width: 100%; min-width: 0; font: inherit; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); padding: 8px 9px; }
.pd-workspace input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.pd-workspace textarea { resize: vertical; }
.pd-tabs { display: flex; gap: 8px; padding: 0 22px; overflow-x: auto; flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.pd-tabs button { white-space: nowrap; border: 0; border-bottom: 3px solid transparent; border-radius: 0; height: 45px; padding: 8px 16px; }
.pd-tabs button[aria-current=page] { border-bottom-color: var(--blue); color: var(--blue); background: var(--surface-2); font-weight: 650; }
.pd-status { padding: 0 22px; color: var(--green); font-size: 12px; flex: 0 0 auto; }
.pd-status:empty { display: none; }
.pd-status:not(:empty) { padding-top: 7px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.pd-status.is-error { color: var(--red); }
.pd-deadlines { padding: 15px 22px 18px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.pd-band-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pd-deadline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pd-deadline-actions button { color: var(--blue); }
.pd-deadline-actions [data-pd-action="reload-calendar-dates"] { width: 32px; height: 32px; padding: 0; }
.pd-deadline-actions [data-pd-icon] svg { transform: none; }
.pd-deadline-status { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.pd-deadline-status.is-error { color: var(--red); }
.pd-deadline-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.pd-deadline-list > button { border: 0; border-left: 3px solid var(--red); border-radius: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 4px 12px; gap: 5px; min-width: 0; }
.pd-deadline-list strong { font-size: 15px; color: var(--red); }
.pd-deadline-list span { line-height: 1.4; overflow-wrap: anywhere; font-weight: 600; }
.pd-deadline-list small { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); }
.pd-deadline-list small b { color: var(--red); font-size: 2em; font-weight: 500; line-height: 1.2; }
.pd-recent-changes { flex: 0 0 auto; border-bottom: 1px solid var(--line); background: var(--surface); }
.pd-recent-changes > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 45px; padding: 8px 22px; cursor: pointer; list-style-position: inside; }
.pd-recent-changes > summary > span { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.pd-recent-changes > summary strong { font-size: 14px; }
.pd-recent-changes > summary small { color: var(--muted); font-size: 11px; font-weight: 500; text-align: right; }
.pd-recent-changes > summary [data-pd-icon] svg { transform: none; }
.pd-recent-content { border-top: 1px solid var(--line); }
.pd-recent-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 9px 22px; background: var(--bg); }
.pd-recent-toolbar label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.pd-recent-toolbar select { min-width: 135px; padding-top: 6px; padding-bottom: 6px; }
.pd-recent-toolbar button:last-child { width: 32px; padding: 5px; }
.pd-recent-filters { max-width: 620px; margin-left: auto; padding: 6px 22px 10px; }
.pd-recent-filter-head, .pd-recent-filter-row { display: grid; grid-template-columns: minmax(140px,1fr) 80px 80px; align-items: center; gap: 10px; }
.pd-recent-filter-head { padding: 3px 6px 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.pd-recent-filter-head span:not(:first-child) { text-align: center; }
.pd-recent-filter-row { min-height: 33px; padding: 4px 6px; border-top: 1px solid var(--line); font-size: 12px; }
.pd-recent-filter-row > span { font-weight: 600; }
.pd-recent-filter-row label { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 11px; }
.pd-recent-list { max-height: 384px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.pd-recent-row { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; min-height: 64px; padding: 8px 22px; border-bottom: 1px solid var(--line); }
.pd-recent-row:last-child { border-bottom: 0; }
.pd-recent-row.is-priority { box-shadow: inset 3px 0 #d97706; }
.pd-recent-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-top: 2px; color: var(--blue); }
.pd-recent-icon [data-pd-icon] svg { width: 17px; height: 17px; transform: none; }
.pd-recent-row > div { min-width: 0; }
.pd-recent-row header { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pd-recent-row header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pd-priority-mark { display: inline-flex; color: #b45309; }
.pd-priority-mark [data-pd-icon] svg { width: 14px; height: 14px; transform: none; fill: #fef3c7; }
.pd-change-type { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.pd-recent-row p { margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 11px; }
.pd-recent-row footer { display: flex; gap: 8px; color: var(--muted); font-size: 10px; }
.pd-recent-row footer time { white-space: nowrap; }
.pd-recent-list > .pd-empty { padding-left: 22px; padding-right: 22px; }
.pd-work, .pd-calendar-view { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,360px); flex: 1; min-height: 0; overflow: hidden; }
.pd-work { grid-template-columns: minmax(0,1fr) minmax(340px,420px); }
.pd-main { padding: 20px 22px; overflow: auto; min-width: 0; }
.pd-work-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.pd-counts { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.pd-counts b { color: var(--text); }
.pd-workspace .pd-overdue { color: var(--red); }
.pd-roster { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 18px; }
.pd-roster button { max-width: 100%; background: var(--bg); }
.pd-roster button span { overflow-wrap: anywhere; }
.pd-roster button.active { border-color: var(--blue); color: var(--blue); background: var(--surface-2); }
.pd-roster b { font-size: 12px; min-width: 20px; border-radius: 4px; padding: 1px 4px; background: var(--surface-2); }
.pd-toolbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.pd-search { display: flex; align-items: center; flex: 1; min-width: 150px; border: 1px solid var(--line); border-radius: 4px; padding-left: 9px; }
.pd-search input { border: 0; width: 100%; }
.pd-filters { display: flex; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.pd-filters label { display: grid; gap: 5px; min-width: 150px; }
.pd-table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.pd-workspace .pd-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; table-layout: auto; min-width: 650px; }
.pd-workspace .pd-table-wrap th { background: var(--bg); font-size: 11px; font-weight: 600; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); }
.pd-workspace .pd-table-wrap td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 12px; max-width: 320px; overflow-wrap: anywhere; }
.pd-workspace .pd-table-wrap tr:last-child td { border-bottom: 0; }
.pd-task-table td:first-child { width: 34px; }
.pd-task-table td:nth-child(2) { width: 42%; min-width: 180px; }
.pd-task-table td:nth-child(4) { white-space: nowrap; }
.pd-task-table td:nth-child(2) button { border: 0; padding: 0; min-height: 20px; font-weight: 650; text-align: left; justify-content: flex-start; background: transparent; font-size: 13px; }
.pd-task-table tr.is-selected { background: var(--surface-2); box-shadow: inset 3px 0 var(--blue); }
.pd-task-table tr:hover { background: var(--bg); }
.pd-tree-tools { display: flex; gap: 6px; margin: 0 0 12px; }
.pd-workspace .pd-hierarchy-table { min-width: 850px; }
.pd-workspace .pd-hierarchy-table td:first-child { width: 40%; min-width: 280px; max-width: 480px; }
.pd-workspace .pd-hierarchy-table td:nth-child(2) { width: auto; min-width: 90px; }
.pd-workspace .pd-hierarchy-table td:nth-child(4) { white-space: normal; }
.pd-workspace .pd-hierarchy-table td:last-child { min-width: 140px; }
.pd-task-indent { display: flex; align-items: flex-start; gap: 9px; position: relative; padding-left: calc(var(--task-depth) * 26px); }
.pd-task-indent > div { flex: 1; min-width: 0; }
.pd-task-indent input { flex: 0 0 16px; margin-top: 3px !important; }
.pd-workspace .pd-task-indent .pd-task-title { border: 0; background: transparent; padding: 0; min-height: 20px; font-size: 13px; text-align: left; justify-content: flex-start; overflow-wrap: anywhere; }
.pd-task-latest-update { display: grid !important; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 4px 10px; max-width: 100%; }
.pd-task-latest-update span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 450; }
.pd-task-latest-update time { white-space: nowrap; color: var(--muted); font-size: 10px; }
.pd-task-next-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-parent-row .pd-task-title { font-weight: 700; }
.pd-parent-row { background: var(--bg); }
.pd-tree-branch { position: absolute; top: -12px; bottom: 50%; left: calc(var(--task-depth) * 26px - 15px); width: 17px; border: solid var(--line); border-width: 0 0 1px 1px; }
.pd-workspace .pd-task-indent .pd-tree-toggle, .pd-tree-toggle-space { width: 18px; min-width: 18px; min-height: 20px; height: 20px; border: 0; padding: 0; background: transparent; }
.pd-workspace .pd-progress-open { border: 0; background: transparent; padding: 4px 0; min-height: 24px; color: var(--blue); }
.pd-done-row .pd-task-title { color: var(--green); }
.pd-canceled-row .pd-task-title { color: #475569; }
.pd-hierarchy-table progress { width: 112px; height: 7px; accent-color: var(--blue); }
.pd-task-overview { padding-top: 0; background: var(--surface); }
.pd-task-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 13px 0; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pd-task-meta strong { display: block; padding-top: 4px; color: var(--text); overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; font-weight: 500; }
.pd-workspace .pd-parent-link { text-align: left; color: var(--muted); border: 0; background: transparent; padding: 0 0 10px; overflow-wrap: anywhere; }
.pd-task-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin-top: 0; }
.pd-workspace .pd-task-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 9px 5px; }
.pd-workspace .pd-task-tabs [aria-selected=true] { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }
.pd-progress-form { padding: 18px 0; display: grid; gap: 14px; border-bottom: 1px solid var(--line); }
.pd-progress-form label { display: grid; gap: 7px; font-size: 12px; }
.pd-progress-form :is(textarea,input[type=text]) { width: 100%; }
.pd-progress-form .pd-progress-check { display: flex; align-items: center; gap: 8px; }
.pd-progress-form > button { justify-self: end; }
.pd-task-updates { grid-column: 1 / -1; margin: 0; }
.pd-entry-section { padding: 0 !important; border-bottom: 1px solid var(--line) !important; background: var(--surface) !important; }
.pd-entry-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin: 0; padding: 8px 0; }
.pd-entry-section-head > div { min-width: 0; }
.pd-entry-section-head h3 { font-size: 13px; }
.pd-entry-section-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.pd-entry-heading-copy { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pd-entry-heading-copy > [data-pd-icon] { color: var(--muted); }
.pd-entry-heading-copy > [data-pd-icon] svg { width: 17px; height: 17px; transform: none; }
.pd-workspace .pd-entry-section-head > button { width: 32px; height: 32px; min-height: 32px; flex: 0 0 32px; padding: 4px; }
.pd-entry-editor, .pd-progress-form.pd-entry-editor { display: grid; gap: 12px; margin: 0 0 13px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.pd-entry-editor label { display: grid; gap: 7px; font-size: 12px; }
.pd-entry-editor :is(textarea,input[type=text]) { width: 100%; }
.pd-entry-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pd-entry-editor-actions [data-pd-entry-status] { color: var(--amber); font-size: 11px; font-weight: 700; }
.pd-workspace .pd-entry-save { width: 34px; height: 34px; min-height: 34px; flex: 0 0 34px; padding: 4px; }
.pd-entry-saved-list { display: grid; gap: 8px; max-height: 260px; padding: 0 0 13px; overflow: auto; }
.pd-entry-saved-list article { min-width: 0; margin: 0; padding: 5px 8px 7px 12px; border-left: 2px solid var(--line); background: transparent; }
.pd-entry-saved-list article p { margin: 3px 0; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-entry-saved-list article small { color: var(--muted); font-size: 11px; }
.pd-entry-saved-list .empty-small { margin: 0; color: var(--muted); font-size: 12px; }
.pd-entry-promote { float: right; margin: -2px -2px 0 10px; }
.pd-task-updates .project-task-comment-list article { display: block; min-width: 0; position: relative; margin: 0; padding: 5px 8px 7px 17px; border: solid var(--line); border-width: 0 0 0 2px; border-radius: 0; background: transparent; }
.pd-task-updates .project-task-comment-list article::before { content: ''; position: absolute; left: -5px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.pd-task-updates article header { display: flex; gap: 4px 10px; flex-wrap: wrap; }
.pd-task-updates article :is(small,time) { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.pd-task-updates article p { font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-table-wrap small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; line-height: 1.4; }
.pd-status-chip { display: inline-block; background: var(--surface-2); border-radius: 4px; padding: 3px 6px; font-size: 11px; white-space: normal; }
.pd-status-chip.is-done { color: var(--green); }
.pd-status-chip.is-canceled { background: #e2e8f0; color: #334155; }
.pd-canceled-count { color: #475569; }
.pd-completed, .pd-canceled { margin-top: 16px; }
.pd-completed > summary, .pd-canceled > summary, .pd-advanced > summary { padding: 9px 0; cursor: pointer; color: var(--muted); font-size: 12px; }
.pd-canceled { border-top: 1px solid var(--line); }
.pd-canceled > summary { color: #475569; font-weight: 600; }
.pd-task-checkbox-space { flex: 0 0 16px; width: 16px; }
.pd-canceled-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; padding: 8px 0; }
.pd-canceled-actions label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 12px; font-weight: 600; }
.pd-canceled-actions > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.pd-workspace .pd-canceled-actions button { min-height: 30px; }
.pd-workspace .pd-canceled-actions .pd-danger { border-color: #fecaca; color: var(--red); }
.pd-workspace .pd-canceled-actions .pd-danger:hover:not(:disabled) { background: #fef2f2; }
.pd-advanced { margin-top: 24px; border-top: 1px solid var(--line); }
.pd-empty { padding: 14px 0; color: var(--muted); margin: 0; }
.pd-details { min-width: 0; overflow: auto; border-left: 1px solid var(--line); background: var(--surface); }
.pd-detail-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 3; }
.pd-detail-heading h2 { font-size: 16px; }
.pd-detail-heading > div { display: flex; align-items: center; gap: 5px; }
.pd-detail-heading button { width: 34px; height: 34px; min-height: 34px; padding: 5px; }
.pd-detail-heading button [data-pd-icon] svg { width: 18px; height: 18px; transform: none; }
.pd-detail-heading .pd-task-delete-action { border-color: #fecaca; color: var(--red); }
.pd-detail-heading .pd-task-save-action { color: #fff; }
.pd-task-save-state { margin-right: 5px; color: var(--green); font-size: 11px; font-weight: 650; white-space: nowrap; }
.pd-task-save-state.is-unsaved { color: var(--amber); }
.pd-detail-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; padding: 80px 20px; color: var(--muted); }
.pd-detail-empty [data-pd-icon] svg { width: 32px; height: 32px; transform: none; }
.pd-new-host { padding: 16px; }
.pd-new-host form, .pd-new-host label { display: grid; gap: 8px; }
.pd-new-host form { gap: 16px; }
body.project-workspace-mode.project-task-drawer-open { overflow: hidden; }
.pd-workspace #projectTaskDrawerHost { position: static; inset: auto; display: block; z-index: auto; }
.pd-workspace .project-task-drawer-backdrop { display: none; }
.pd-workspace .project-task-drawer { position: static; width: 100%; max-width: none; height: auto; max-height: none; box-shadow: none; border: 0; border-radius: 0; background: var(--bg); }
.pd-workspace .project-task-drawer-scroll { overflow: visible; padding: 0 16px 18px; max-height: none; }
.pd-workspace .project-task-drawer-header { display: none; }
.pd-workspace .project-task-drawer-header span { color: var(--muted); }
.pd-workspace .project-task-drawer-header strong { white-space: normal; font-size: 14px; }
.pd-workspace .project-task-drawer-unsaved { color: var(--amber) !important; }
.pd-workspace .project-task-drawer-header h2 { font-size: 14px; overflow-wrap: anywhere; }
.pd-workspace .project-task-drawer-section { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0; background: transparent; box-shadow: none; }
.pd-workspace .project-task-details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.pd-workspace .project-task-details-grid .wide { grid-column: 1 / -1; }
.pd-workspace .project-task-field { display: grid; gap: 5px; font-size: 12px; }
.pd-workspace .project-task-field input, .pd-workspace .project-task-field select { width: 100%; }
.pd-workspace .project-task-cancellation-prompt { grid-column: 1 / -1; }
.pd-workspace .project-task-progress, .pd-workspace .project-task-lineage { font-size: 11px; }
.pd-task-optional-strip { padding: 11px 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pd-task-optional-strip > strong { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 500; }
.pd-task-optional-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.pd-workspace .pd-optional-button { color: var(--blue); }
.pd-workspace .pd-optional-button[aria-pressed=true] { border-color: var(--blue); background: var(--surface-2); }
.pd-optional-button [data-pd-icon] svg { width: 16px; height: 16px; transform: none; }
.pd-core-optional-section .pd-optional-field { display: grid; gap: 6px; width: 100%; }
.pd-core-optional-section .pd-optional-field :is(textarea,select) { width: 100%; }
.pd-task-progress-section .project-task-progress { padding: 0 0 13px; }
.pd-workspace .pd-saved-follow-up { min-height: 26px; border: 0; padding: 0; color: var(--blue); background: transparent; text-align: left; justify-content: flex-start; }
.pd-workspace .project-task-related-grid { display: block; }
.pd-workspace .project-task-relation-add, .pd-workspace .project-task-link-form, .pd-workspace .project-task-follow-up-form { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-workspace .project-task-relation-add input, .pd-workspace .project-task-relation-add select { width: 100%; }
.pd-workspace .project-task-relation-chips { overflow-wrap: anywhere; }
.pd-chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.pd-chip-list > span { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; background: var(--surface); font-size: 12px; }
.pd-chip-list button { border: 0; padding: 2px; min-height: 24px; }
.pd-collaborator-section .pd-entry-section-head > button { width: auto; min-width: 64px; padding: 4px 9px; gap: 5px; }
.pd-collaborator-section .pd-entry-section-head > button span { color: inherit; display: inline; font-size: 12px; margin: 0; }
.pd-collaborator-section .pd-entry-section-head > button.is-open { color: var(--blue); border-color: var(--blue); }
.pd-collaborator-controls { min-width: 0; }
.pd-collaborator-picker { display: grid; gap: 9px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.pd-collaborator-picker[hidden] { display: none; }
.pd-collaborator-picker p { margin: 0; color: var(--muted); font-size: 12px; }
.pd-collaborator-picker label { display: grid; gap: 6px; color: var(--text); font-size: 12px; }
.pd-collaborator-picker :is(input,select) { width: 100%; min-width: 0; }
.pd-collaborator-add-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
.pd-workspace .pd-collaborator-add-row button { min-width: 54px; }
.pd-collaborator-picker > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.pd-team-view { flex: 1; overflow: auto; padding: 24px; }
.pd-team-view h2 { margin-bottom: 20px; }
.pd-calendar-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-calendar-heading h2 { flex: 1; }
.pd-calendar-heading select { max-width: 240px; }
.pd-calendar-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; font-size: 11px; color: var(--muted); }
.pd-calendar-legend span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--blue); }
.pd-calendar-legend .pd-legal-dot::before { background: var(--red); }
.pd-calendar-legend .pd-done-dot::before { background: var(--green); }
.pd-court-dates { padding: 4px 16px 16px; }
.pd-court-date-list details + details { border-top: 1px solid var(--line); }
.pd-court-date-list summary { cursor: pointer; padding: 12px 0; color: var(--text); font-weight: 650; }
.pd-court-date-list button[data-pd-calendar-date] {
  display: grid;
  justify-items: start;
  gap: 3px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 10px;
  text-align: left;
  overflow-wrap: anywhere;
}
.pd-court-date-list button time { color: var(--blue); font-size: 11px; font-weight: 650; }
.pd-court-date-list button small { color: var(--muted); font-size: 11px; }
.pd-workspace .fc { --fc-border-color: var(--line); --fc-today-bg-color: var(--surface-2); --fc-button-bg-color: var(--surface); --fc-button-text-color: var(--text); --fc-button-border-color: var(--line); --fc-button-hover-bg-color: var(--surface-2); --fc-button-hover-border-color: var(--line); --fc-button-active-bg-color: var(--blue); --fc-button-active-border-color: var(--blue); font-size: 12px; }
.pd-workspace .fc .fc-toolbar { flex-wrap: wrap; gap: 10px; }
.pd-workspace .fc .fc-toolbar-title { font-size: 18px; }
.pd-workspace .fc .fc-button { font-size: 11px; min-height: 30px; }
.pd-workspace .fc .fc-button-active { color: white; }
.pd-workspace .fc .fc-daygrid-day-number { color: var(--text); }
.pd-workspace .fc .fc-daygrid-event { white-space: normal; cursor: pointer; overflow-wrap: anywhere; }
.pd-workspace .fc .pd-calendar-legal { background: var(--red); border-color: var(--red); }
.pd-workspace .fc .pd-calendar-task { background: var(--blue); border-color: var(--blue); }
.pd-workspace .fc .pd-calendar-done { background: var(--green); border-color: var(--green); }
.pd-workspace .fc .fc-list-event-title { color: var(--text); }
.pd-calendar-unscheduled { margin-top: 18px; }
.pd-calendar-unscheduled summary { cursor: pointer; color: var(--muted); }
.pd-calendar-unscheduled button { display: flex; margin: 8px 0; }
.pd-date-host { padding: 16px; }
.pd-date-host .legal-dates-panel { border: 0; padding: 0; background: transparent; }
.pd-date-host .legal-dates-compact-row, .pd-date-host .legal-date-today, .pd-date-host .legal-date-group > strong, .pd-date-host .legal-date-group > .empty-small { display: none; }
.pd-workspace .pd-date-host .legal-dates-expanded-body { display: block !important; padding: 0; margin: 0; border: 0; }
.pd-workspace .pd-date-host .legal-date-create-row, .pd-workspace .pd-date-host .legal-date-row { display: flex; flex-direction: column; align-items: stretch; gap: 12px; border: 0; padding: 0; background: transparent; }
.pd-date-host label { display: grid; gap: 5px; }
.pd-goals-view { display: flex; min-width: 0; min-height: 0; flex: 1; overflow: hidden; }
.pd-goals-view > .pd-goal-story { flex: 1; }
.pd-goal-browser { overflow: auto; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--bg); }
.pd-goal-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 12px; }
.pd-goal-heading h2 { font-size: 15px; }
.pd-goal-browser > input { width: 100%; }
.pd-goal-list h3 { color: var(--muted); padding: 16px 5px 8px; font-size: 11px; text-transform: uppercase; }
.pd-goal-list button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 12px 9px; margin-bottom: 5px; background: transparent; border-color: transparent; }
.pd-goal-list button.active { border-color: var(--blue); background: var(--surface); }
.pd-goal-list strong { font-size: 13px; overflow-wrap: anywhere; }
.pd-goal-list small { color: var(--muted); font-size: 11px; }
.pd-goal-working { padding: 22px; min-width: 0; overflow: auto; }
.pd-goal-working > header h2 { margin: 7px 0 18px; font-size: 22px; overflow-wrap: anywhere; }
.pd-goal-working > header small { color: var(--green); }
.pd-goal-section { padding: 18px 0; border-top: 1px solid var(--line); }
.pd-goal-section p { line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-goal-actions { display: flex; gap: 7px; }
.pd-record-link { display: flex !important; width: 100%; justify-content: flex-start !important; margin: 6px 0; text-align: left; overflow-wrap: anywhere; }
.pd-evidence-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.pd-evidence-totals button { flex-direction: column; align-items: flex-start; padding: 10px; }
.pd-evidence-totals small { color: var(--muted); }
.pd-goal-host > details { border: 0; border-radius: 0; }
.pd-goal-host #argumentsGoalsPanel > summary, .pd-goal-host .arguments-panel-body > :not(#argumentList), .pd-goal-host .argument-workflow-section-head, .pd-goal-host .argument-quick-summary { display: none; }
.pd-goal-host .arguments-panel-body, .pd-goal-host .argument-expanded-body { padding: 14px; }
.pd-goal-host .argument-card { border: 0; border-radius: 0; margin: 0; background: transparent; }
#projectWorkspacePage .pd-goal-host :is(.argument-card,.argument-workflow-section,.argument-workflow-rows) { border: 0; box-shadow: none; border-radius: 0; background: transparent; padding: 0; margin: 0; }
.pd-goal-host .argument-card-head, .pd-goal-host .argument-field-grid, .pd-goal-host .argument-fields { display: flex; flex-direction: column; align-items: stretch; }
.pd-goal-host .argument-card-head input { width: 100%; }
.pd-goal-host .argument-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.pd-goal-host .argument-actions button { font-size: 11px; }
.pd-goal-host .argument-tabs { display: flex; flex-wrap: wrap; margin: 14px 0; }
.pd-goal-host .argument-summary { flex-wrap: wrap; }
.pd-goal-host textarea { width: 100%; }
.pd-goal-host :is(.argument-overview-grid,.argument-proof-grid,.argument-draft-grid,.supporting-point-fields,.argument-related-grid) { grid-template-columns: minmax(0,1fr); }
.pd-setup-view { flex: 1; min-height: 0; overflow: auto; padding: 0 22px 24px; }
.pd-setup-view > .project-setup-panel { border: 0; margin: 0; }
.pd-setup-view > .project-setup-panel > summary { display: none; }
.pd-setup-view .manager-dropdown { border-radius: 0; border-width: 0 0 1px; box-shadow: none; }
@media (max-width: 1550px) {
  .pd-goals-view { overflow: hidden; }
}
@media (max-width: 1250px) {
  .pd-work, .pd-calendar-view { grid-template-columns: minmax(0,1fr) 310px; }
  .pd-work { grid-template-columns: minmax(0,1fr) 360px; }
}
@media (max-width: 1000px) {
  body.project-workspace-mode.project-task-drawer-open { overflow: auto; }
  #projectWorkspacePage[data-pd-mounted] { height: auto; min-height: 100vh; overflow: visible; }
  .pd-workspace { overflow: visible; }
  .pd-work, .pd-calendar-view { display: flex; flex-direction: column; overflow: visible; }
  .pd-details { border-top: 1px solid var(--line); border-left: 0; max-height: none; overflow: visible; }
  .pd-detail-empty { padding: 25px; }
  .pd-main { padding: 16px; overflow: visible; }
  .pd-goals-view { display: flex; flex-direction: column; overflow: visible; }
  .pd-tabs { padding: 0 10px; gap: 0; }
  .pd-tabs button { padding: 7px 10px; }
  .pd-deadlines { padding: 14px 16px; }
  .pd-recent-changes > summary, .pd-recent-toolbar, .pd-recent-row { padding-left: 16px; padding-right: 16px; }
  .pd-recent-filters { padding-left: 16px; padding-right: 16px; }
  .pd-deadline-list { gap: 10px; }
  .pd-counts { gap: 8px; }
}
@media (max-width: 580px) {
  #projectWorkspacePage[data-pd-mounted] > .project-details-header { flex-wrap: wrap; }
  #projectWorkspacePage .pd-default-tab-control { flex: 1 1 100%; margin-left: 0; }
  #projectWorkspacePage .pd-default-tab-control select { flex: 1; max-width: none; }
  .pd-deadline-list { grid-template-columns: 1fr; }
  .pd-roster { max-height: 160px; overflow: auto; }
  .pd-band-title { flex-wrap: wrap; }
  .pd-recent-changes > summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pd-recent-changes > summary small { padding-left: 25px; text-align: left; }
  .pd-recent-toolbar { justify-content: flex-start; flex-wrap: wrap; }
  .pd-recent-filter-head, .pd-recent-filter-row { grid-template-columns: minmax(100px,1fr) 62px 62px; }
  .pd-workspace .fc .fc-toolbar-title { font-size: 16px; }
  .pd-calendar-heading select { max-width: 100%; width: 100%; }
  .pd-goal-working { padding: 16px; }
  .pd-evidence-totals { grid-template-columns: 1fr; }
  .pd-collaborator-add-row { grid-template-columns: 1fr; }
}
