/* Shared project tables fill their card; overflow belongs to the table only. */
.compact-project-table .project-video-cell{text-align:center;vertical-align:middle}.project-video-cell input[type=checkbox]{width:16px;height:16px;margin:0;vertical-align:middle;accent-color:var(--accent)}.project-video-cell input[type=checkbox]:disabled{opacity:.45;cursor:default}
.project-table-options{min-width:0;flex-wrap:wrap}.projects-toolbar{align-items:center;justify-content:flex-start}.projects-toolbar>.switch{margin-right:auto}.agency-project-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}.agency-project-filter>label{max-width:295px}.agency-project-filter select{max-width:100%;font-size:12px}.project-client-search{position:relative;min-width:190px;max-width:280px;flex:1}.project-client-search input{width:100%;font-size:12px;padding:8px 10px}.project-client-search [role=listbox]{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:25;background:var(--panel);border:1px solid var(--line);border-radius:9px;box-shadow:0 8px 25px #0002;padding:4px;max-height:270px;overflow:auto}.project-client-search [role=option]{display:block;width:100%;text-align:left;border:0;background:none;color:var(--text);font-size:12px;padding:9px;border-radius:5px;overflow-wrap:anywhere}.project-client-search [role=option]:hover,.project-client-search [aria-selected=true]{background:var(--soft);color:var(--accent)}.project-client-search [role=listbox] p{font-size:12px;padding:8px;color:var(--muted)}.compact-project .project-body{min-width:0}.compact-project .compact-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}.compact-project-table{max-width:none}.compact-project .task-name-open{white-space:normal;overflow-wrap:anywhere;text-align:left}.compact-project-table td,.compact-project-table th{box-sizing:border-box}.embedded-project-heading{margin:16px 0 10px}.embedded-project-heading h3{font-size:16px}.agency-embedded-projects{min-width:0}.compact-table-wrap:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
@media(max-width:700px){.agency-project-filter{width:100%;align-items:stretch}.agency-project-filter>label{width:100%;max-width:none}.agency-project-filter select{width:100%}.project-client-search{max-width:none;width:100%}.projects-toolbar>.project-table-options{width:100%;justify-content:space-between}}

/* The insertion line starts where the destination task's text will begin. */
.compact-project :is(.task-drop-before,.task-drop-after) td,.compact-project .task-drop-inside .task-title-cell{box-shadow:none}
.compact-project .task-drop-parent .task-title-cell{background:color-mix(in srgb,var(--project-accent) 14%,var(--panel))!important}
.task-drop-indicator{position:fixed;z-index:4500;height:3px;background:var(--accent);pointer-events:none;transform:translateY(-1px);box-shadow:0 0 0 1px var(--panel)}
.task-drop-indicator::before{content:"";position:absolute;left:-2px;top:-7px;width:3px;height:17px;border-radius:2px;background:var(--accent);box-shadow:0 0 0 1px var(--panel)}
.task-drop-hint{max-width:min(310px,calc(100vw - 16px));overflow-wrap:anywhere}

/* Project urgency is also written out; color alone never carries its meaning. */
.project-preview[class*="project-urgency-"]{border:1px solid var(--line);border-left:4px solid var(--priority-line);border-radius:8px;padding:12px;background:var(--panel);display:grid;gap:8px}
.project-urgency-green{--priority-line:light-dark(#327950,#86cba0);--priority-bg:light-dark(#e9f4ed,#203b2a);--priority-ink:light-dark(#235335,#b8e8c8)}
.project-urgency-lime{--priority-line:light-dark(#697d24,#c0d76d);--priority-bg:light-dark(#f0f4df,#343d20);--priority-ink:light-dark(#4c5e16,#dce9a1)}
.project-urgency-yellow{--priority-line:light-dark(#a38013,#edd078);--priority-bg:light-dark(#fff6d6,#403718);--priority-ink:light-dark(#735a0c,#f4df9e)}
.project-urgency-orange{--priority-line:light-dark(#b06323,#eca56d);--priority-bg:light-dark(#fff0e2,#482f1e);--priority-ink:light-dark(#8c4717,#ffd1ab)}
.project-urgency-red{--priority-line:light-dark(#ad3d3d,#e79494);--priority-bg:light-dark(#fceaea,#4a272b);--priority-ink:light-dark(#8c2929,#ffc5c5)}
.project-priority-heading{display:flex;align-items:start;justify-content:space-between;gap:10px;flex-wrap:wrap;min-width:0}.project-priority-heading>.quiet{font-size:14px;font-weight:600;text-align:left;overflow-wrap:anywhere}
.project-urgency-label{display:inline-flex;align-items:center;flex:0 0 auto;padding:3px 7px;border:1px solid var(--priority-line);border-radius:5px;background:var(--priority-bg);color:var(--priority-ink);font-size:11px;line-height:1.4}
.project-priority-date{font-size:12px;line-height:1.5;color:var(--muted)}.project-priority-date strong{color:var(--text);font-weight:600}
.project-next-action{display:grid;gap:4px;width:100%;min-width:0;text-align:left;padding:9px!important;margin:0!important;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--text)}
.project-next-action:hover{border-color:var(--field-line)}.project-next-action strong{font-size:13px;font-weight:600;overflow-wrap:anywhere}.project-next-meta{font-size:11px;line-height:1.5;color:var(--muted)}.project-next-meta .person-name-avatar{display:inline-flex}
.project-next-availability,.project-next-unlocks{font-size:11px;line-height:1.45;color:var(--muted)}.project-next-issue{font-size:11px;line-height:1.45;color:var(--warn-text)}
.pilot-priority-task{display:flex;align-items:start;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid var(--line)}.pilot-priority-task>div{display:grid;gap:4px;min-width:0}.pilot-priority-task>div>.btn{text-align:left;justify-content:flex-start;white-space:normal}.pilot-priority-task .pill{flex:0 0 auto}

/* Read first, edit on demand: repeated field frames do not compete with task names and states. */
.compact-project .compact-task-row .table-field:not(.field-status){border-color:transparent;background-color:transparent}
.compact-project .compact-task-row:hover .table-field:not(.field-status){border-color:var(--line)}
.compact-project .compact-task-row .table-field:not(.field-status):hover{border-color:var(--field-line);background-color:var(--panel)}
.compact-project .compact-task-row .table-field:not(.field-status):focus{border-color:var(--focus);background-color:var(--panel);outline:2px solid var(--focus);outline-offset:0}
.compact-project .compact-task-row:focus-within .task-row-actions .add-child-inline{opacity:1}
.compact-project .project-controls{row-gap:6px}
.project-create-editor{width:100%;max-width:780px;padding:18px;gap:14px}
.project-create-editor h3{font-size:17px}
.project-create-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.project-create-form>label{font-size:12px;gap:5px}
.project-create-form input,.project-create-form select{width:100%;min-height:36px;font-size:13px}
.project-create-wide{grid-column:1/-1}
.project-create-form>.row{justify-content:flex-start;gap:8px}
.project-create-form .small{font-size:11px;line-height:1.4}
@media(max-width:600px){
 .project-create-editor{padding:14px}
 .project-create-form{grid-template-columns:minmax(0,1fr);gap:12px}
 .projects-toolbar>.switch{width:100%;margin-right:0}
 .projects-toolbar>.switch .btn{flex:1 1 auto;padding:7px 8px;font-size:12px}
 .projects-toolbar>.project-table-options{width:100%;justify-content:flex-start;gap:8px}
 .project-table-options>label{flex:1 1 140px}
 .project-table-options select{width:100%}
 .project-table-options .project-widths-reset{order:3;flex:1 1 100%;text-align:left;padding:3px 0}
}
.project-table .project-add-task-row td{background:var(--panel);padding-top:3px;padding-bottom:3px;border-top:1px solid var(--line)}
.project-add-task-row .row-number{color:var(--accent);font-size:19px;text-align:center}
.project-add-task{display:flex;align-items:center;width:100%;min-height:36px;padding:7px 8px;border:0;border-radius:5px;background:transparent;color:var(--accent);font:inherit;font-size:13px;text-align:left}
.project-add-task:hover:not(:disabled){background:var(--soft)}
.project-add-task:disabled{color:var(--muted);opacity:.55}
@media(pointer:coarse){.project-add-task{min-height:44px}}
