#tasks { min-width:0; }
.task-launch-form { max-width:1000px; }
.task-launch-form fieldset { min-width:0; border:0; margin:0; padding:0; }
.task-launch-form legend { font-size:19px; font-weight:600; margin-bottom:16px; }
.task-catalog { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)); gap:12px; }
.task-choice { display:flex; align-items:flex-start; gap:12px; padding:17px; border:1px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer; }
.task-choice:has(input:checked) { border-color:var(--brand-olive); background:var(--surface-hover); }
.task-choice:focus-within { outline:2px solid var(--focus); outline-offset:3px; }
.task-choice input { flex:0 0 auto; margin:5px 0 0; }
.task-choice strong,.task-choice small { display:block; }
.task-choice strong { color:var(--ink); line-height:1.5; }
.task-choice small { color:var(--muted); margin-top:6px; line-height:1.6; }
.task-requirements,#task-workflow-context { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:12px; padding:20px; margin:20px 0; line-height:1.7; }
.task-requirements h2 { font-size:21px; margin:0 0 10px; }
.task-field { display:grid; gap:9px; margin:20px 0; color:var(--ink); }
.task-field select,.task-field input { width:100%; max-width:700px; min-height:44px; padding:10px; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; }
.task-field small { color:var(--muted); line-height:1.6; }
#task-launch { min-height:46px; margin:16px 0; white-space:normal; }
#task-launch-status,#task-project-status { color:var(--muted); white-space:pre-wrap; line-height:1.6; }
#task-launch-status[data-state="error"],#task-project-status[data-state="error"] { color:var(--danger); }
#task-workflow-context p { margin:7px 0; }
.library-project-controls { padding:16px 20px; margin:16px 0; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.library-project-controls .task-field { margin:0 0 14px; }
#library-project-status { color:var(--muted); line-height:1.6; }
@media (max-width:650px) { .task-catalog { grid-template-columns:minmax(0,1fr); } .task-field select,.task-field input { font-size:16px; } .task-requirements,#task-workflow-context { padding:16px; } }

/* Server-owned task result history; file names remain readable on a phone. */
.task-history-entry { margin:22px 0; padding-top:20px; border-top:1px solid var(--line); }
.task-history { max-width:1000px; padding:20px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.task-history-heading,.task-history-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.task-history-heading { justify-content:space-between; }
.task-history-heading h2 { margin:0; }
.task-history > p,.task-history-meta { color:var(--muted); line-height:1.6; }
.task-history-list { display:grid; gap:16px; margin:18px 0; }
.task-history-item { min-width:0; border-top:1px solid var(--line); padding-top:16px; }
.task-history-item h3 { font-size:16px; margin:0; overflow-wrap:anywhere; line-height:1.5; }
.task-history-meta { margin:8px 0 12px; font-size:12px; }
.task-history-rename { margin-top:16px; }
.task-history-rename label { display:grid; gap:8px; }
.task-history-rename input { width:100%; min-width:0; }
.task-history-rename .task-history-actions { margin-top:12px; }
.task-history .button { min-height:44px; white-space:normal; }
.task-history [data-history-delete] { color:var(--danger); }
.task-history-row-status { color:var(--muted); overflow-wrap:anywhere; line-height:1.5; }
.task-history-row-status:empty { display:none; }
#task-history-status[data-state="error"],.task-history-row-status[data-state="error"] { color:var(--danger); }
@media(max-width:650px) { .task-history { padding:14px; } .task-history-actions > .button,.task-history-actions > .bf-action-wrap { flex:1 1 120px; } }