/* Local task UI preview. These selectors do not alter sign-in or live data. */
.workspace-screen .ws-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.workspace-screen .step { grid-template-columns: 20px auto minmax(0, 1fr) 58px; }
.step-extra-actions { display: inline-flex; align-items: flex-start; gap: 3px; }
.task-checklist li > span:nth-child(2) { flex: 1; min-width: 0; }
.task-checklist small { display: block; margin-top: 5px; }
.task-readonly-check { flex: none; color: #aaa; }
#task-detail-content { display: grid; gap: 26px; }
.task-count { color: #888; margin-left: 8px; font: 400 13px 'Minerva Söhne', Arial, sans-serif; }
.task-detail-section > .task-local-notice { margin-bottom: 16px; }
.task-example-tag { display: inline-flex; font: 400 9px/1.5 'Minerva Söhne', Arial, sans-serif; color: #999; border: 1px solid #444; padding: 3px 6px; letter-spacing: .02em; white-space: nowrap; }
.task-examples { margin-top: 26px; }
.task-examples h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.task-signature-panel > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-signature-example { display: flex; align-items: center; gap: 10px; padding: 14px 0 18px; }
.task-signature-example > div { flex: 1; min-width: 0; }
.task-signature-example strong { display: block; font-size: 12px; font-weight: 400; }
.task-signature-example small { display: block; color: #999; margin-top: 4px; font-size: 10px; }
.task-signature-state { font-size: 10px; border: 1px solid #555; padding: 3px 8px; color: #ccc; }
.task-local-status { color: #b0cdd6; font-size: 12px; margin: 0; }
.task-file-media img, .task-file-media video { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.task-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; color: #bbb; }
.task-icon svg { display: block; width: 24px; height: 24px; }
.timeline-label-title { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.timeline-label-title .task-icon { margin-top: 1px; }
.timeline-label-title .timeline-task-name { min-width: 0; }
.task-card-title-wrap { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.task-card-title-wrap .task-icon { margin-top: 3px; }
.workspace-screen .task-card-title-wrap textarea.ws-name { flex: 1; width: 0; min-width: 0; }
.task-heading-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 18px; color: #ddd; }
.task-heading-icon svg { display: block; width: 40px; height: 40px; }
.task-view-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  margin: 6px 0 0;
  border: 1px solid #444;
  background: #111;
}
.task-view-tabs button,
.timeline-controls button,
.task-files-button,
.step-files-button,
.task-detail-dialog button {
  border-radius: 0;
  font: 400 13px/1.4 var(--font-ui, 'Minerva Söhne', Arial, sans-serif);
  cursor: pointer;
}
.task-view-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #aaa);
}
.task-view-tabs button[aria-selected="true"] {
  border-color: #494949;
  background: #262626;
  color: #f3f2f2;
}
.task-view-tabs button:hover { color: #fff; background: #202020; }
.task-view-tabs svg,
.task-files-button svg,
.step-files-button svg,
.timeline-controls svg { width: 16px; height: 16px; flex: none; }
.task-preview-banner {
  margin: 18px 0 0;
  color: var(--muted, #aaa);
  font-size: 12px;
  line-height: 1.6;
}
.task-preview-banner strong { color: var(--text, #f3f2f2); font-weight: 400; }
.timeline-panel { margin-top: 30px; }
.timeline-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.timeline-heading h2 {
  margin: 0 0 9px;
  font: 800 clamp(23px, 2.5vw, 32px)/1.25 var(--font-display, 'Minerva Söhne Breit', Arial, sans-serif);
  letter-spacing: -.035em;
  text-transform: none;
}
.timeline-heading p { margin: 0; color: var(--muted, #aaa); font-size: 13px; line-height: 1.6; }
.timeline-controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.timeline-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 10px 13px;
  border: 1px solid #494949;
  background: #161616;
  color: #eee;
}
.timeline-controls button:hover { border-color: #888; background: #242424; }
.timeline-controls button:disabled { opacity: .45; cursor: default; }
.timeline-controls span { font-size: 12px; color: var(--muted, #aaa); }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 20px; font-size: 11px; color: var(--muted, #aaa); }
.timeline-legend > * { display: inline-flex; align-items: center; gap: 8px; }
.timeline-legend .status-dot,
.task-detail-status .status-dot { display: inline-block; width: 7px; height: 7px; background: #54d58a; flex: none; }
.timeline-legend .status-dot.health-at-risk,
.task-detail-status .status-dot.health-at-risk { background: #ff9f43; animation: task-risk-pulse 2s ease-in-out infinite; }
.timeline-legend .status-dot.health-blocked,
.task-detail-status .status-dot.health-blocked { background: #ff896f; }
.timeline-legend .status-dot.health-done,
.task-detail-status .status-dot.health-done { background: #9aabbe; }
.timeline-scroll { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line, #2b2b2b); scrollbar-color: #555 #101010; scrollbar-width: thin; }
.timeline-grid { min-width: 960px; --timeline-label-width: 235px; }
.timeline-scale { display: grid; grid-template-columns: var(--timeline-label-width) repeat(4, minmax(0, 1fr)); background: var(--panel, #101010); border-bottom: 1px solid #373737; }
.timeline-scale-label { position: sticky; z-index: 3; left: 0; background: var(--panel, #101010); padding: 16px 20px; border-right: 1px solid #373737; color: #aaa; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.timeline-week { display: grid; align-content: center; gap: 4px; min-height: 62px; padding: 12px 18px; border-right: 1px solid var(--line, #2b2b2b); color: #eee; font-size: 12px; }
.timeline-week:last-child { border-right: 0; }
.timeline-week small { color: #888; font-size: 10px; }
.timeline-section { padding: 15px 20px 11px; border-bottom: 1px solid var(--line, #2b2b2b); background: var(--panel, #101010); color: #aaa; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.timeline-section > * { position: sticky; left: 20px; width: max-content; }
.timeline-row { display: grid; grid-template-columns: var(--timeline-label-width) minmax(0, 1fr); min-height: calc(94px * var(--space-unit, 1)); border-bottom: 1px solid var(--line, #2b2b2b); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-label {
  position: sticky;
  z-index: 2;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  min-width: 0;
  text-align: left;
  border: 0;
  border-right: 1px solid #373737;
  border-radius: 0;
  background: var(--panel, #101010);
  color: var(--text, #f3f2f2);
  cursor: pointer;
}
.timeline-label:hover { background: #1c1c1c; }
.timeline-task-name { font: 400 13px/1.4 var(--font-ui, 'Minerva Söhne', Arial, sans-serif); overflow-wrap: anywhere; }
.timeline-task-meta { color: #999; font: 400 11px/1.4 var(--font-ui, 'Minerva Söhne', Arial, sans-serif); }
.timeline-track {
  display: grid;
  grid-template-columns: repeat(28, minmax(0, 1fr));
  grid-template-rows: 1fr;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  background-color: var(--bg, #000);
  background-image: linear-gradient(to right, transparent calc(100% - 1px), #222 calc(100% - 1px));
  background-size: 25% 100%;
}
.timeline-block {
  --task-tint: #14271c;
  --task-stripe: #54d58a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  position: relative;
  grid-column: var(--start, 1) / span var(--span, 7);
  grid-row: 1;
  min-height: 64px;
  min-width: 0;
  margin-inline: 6px;
  padding: 11px 12px 11px 14px;
  border: 1px solid color-mix(in srgb, var(--task-stripe) 35%, #111);
  border-left: 3px solid var(--task-stripe);
  border-radius: 0;
  background: var(--task-tint);
  color: #f3f2f2;
  font: 400 12px/1.4 var(--font-ui, 'Minerva Söhne', Arial, sans-serif);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.timeline-block.health-at-risk { --task-tint: #2b1e11; --task-stripe: #ff9f43; padding-right: 25px; }
.timeline-block.health-at-risk::after { content: ''; position: absolute; right: 10px; top: 12px; width: 7px; height: 7px; background: #ff9f43; animation: task-risk-pulse 2s ease-in-out infinite; }
.timeline-block.health-blocked { --task-tint: #2c1b17; --task-stripe: #ff896f; }
.timeline-block.health-done { --task-tint: #1b2229; --task-stripe: #9aabbe; }
.timeline-block:hover { border-color: var(--task-stripe); background: color-mix(in srgb, var(--task-tint) 86%, white); }
.timeline-block-title { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.timeline-block-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; color: var(--task-stripe); font-size: 10px; }
.timeline-file-count { display: inline-flex; align-items: center; gap: 4px; color: #bbb; font-size: 10px; }
.timeline-file-count svg { width: 12px; height: 12px; }
.timeline-panel-footer { margin: 16px 0 0; color: #999; font-size: 11px; line-height: 1.6; }
.task-files-button,
.step-files-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: #c4c4c4; border: 1px solid #444; }
.task-files-button { min-height: 36px; padding: 8px 12px; }
.step-files-button { width: 30px; height: 30px; padding: 6px; flex: none; }
.task-files-button:hover,
.step-files-button:hover { color: #fff; border-color: #888; background: #242424; }
.task-detail-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1280px, calc(100vw - 64px));
  height: min(1060px, calc(100dvh - 64px));
  max-width: 100vw;
  max-height: 100dvh;
  padding: 0;
  border: 1px solid #383838;
  border-radius: 0;
  background: var(--appearance-panel, #101010);
  color: #f3f2f2;
  font: 400 14px/1.55 'Minerva Söhne', Arial, sans-serif;
  color-scheme: dark;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.task-detail-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.task-detail-dialog * { box-sizing: border-box; }
.task-detail-dialog :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.task-detail-body { min-height: 100%; display: flex; flex-direction: column; padding: 40px 48px 0; gap: 22px; }
.task-detail-title-row { display: flex; gap: 20px; align-items: center; }
.task-detail-title-row .task-heading-icon { margin: 0; flex: none; }
.task-detail-title-row button.task-icon-edit { width:48px; height:48px; padding:6px; border:1px solid #555; background:transparent; color:#ddd; }
.task-detail-title-row button.task-icon-edit:hover { border-color:#bbb; background:#222; }
.task-detail-title-row button.task-icon-edit:focus-visible { outline:2px solid #b0cdd6; outline-offset:4px; }
.task-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.task-test-notice { display: grid; gap: 6px; margin: 0 0 20px; padding: 12px 16px; border: 1px solid #ba8a53; background: var(--appearance-panel, #111); color: var(--appearance-text, #f3f2f2); overflow-wrap: anywhere; }
.task-test-notice strong { font-size: 12px; line-height: 1.4; font-weight: 600; letter-spacing: .08em; }
.task-test-notice span { font-size: 13px; line-height: 1.5; }
.task-detail-heading .eyebrow,
.task-detail-heading p { margin: 0 0 12px; color: #999; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.task-detail-heading h2 { margin: 0; font: 800 clamp(28px, 3vw, 40px)/1.25 'Minerva Söhne Breit', Arial, sans-serif; letter-spacing: -.035em; text-transform: none; overflow-wrap: anywhere; }
.task-detail-heading > button { width: 36px; height: 36px; flex: none; border: 1px solid #444; background: transparent; color: #eee; font-size: 23px; }
.task-detail-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; color: #bbb; }
.task-detail-status > span { display: inline-flex; align-items: center; gap: 7px; }
.task-detail-status .health-on-track { color: #74e7a4; }
.task-detail-status .health-at-risk { color: #ffb66c; }
.task-detail-status .health-blocked { color: #ff896f; }
.task-detail-copy { margin: 0; color: #b5b5b5; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.task-detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid #333; padding-bottom: 12px; }
.task-detail-tabs button { padding: 10px 14px; min-height: 40px; border: 1px solid transparent; background: transparent; color: #aaa; }
.task-detail-tabs button[aria-selected="true"] { background: #272727; color: #fff; border-color: #4b4b4b; }
.task-detail-tabs button:hover { background: #222; color: #fff; }
.task-detail-section { min-width: 0; }
.task-detail-section h3 { margin: 0 0 16px; font: 800 17px/1.4 'Minerva Söhne Breit', Arial, sans-serif; letter-spacing: -.02em; text-transform: none; }
.task-checklist { list-style: none; padding: 0; margin: 0; }
.task-checklist li { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid #2b2b2b; color: #ccc; font-size: 13px; line-height: 1.5; }
.task-checklist li:first-child { padding-top: 0; }
.task-checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.task-checklist input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #ddd; }
.task-checklist small { color: #999; font-size: 11px; }
.task-file-list { display: grid; gap: 10px; }
.task-file-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px; border: 1px solid #383838; background: #161616; }
.task-file-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 42px; border: 1px solid #4b4b4b; color: #bbb; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.task-file-icon svg { width: 19px; height: 19px; }
.task-file-info { flex: 1; min-width: 0; }
.task-file-info h4,
.task-file-info strong,
.task-file-info > a { display: block; margin: 0; color: #eee; font: 400 12px/1.5 'Minerva Söhne', Arial, sans-serif; overflow-wrap: anywhere; }
.task-file-info p,
.task-file-info small { display: block; margin: 4px 0 0; color: #999; font-size: 10px; line-height: 1.5; }
.task-file-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.task-file-actions button,
.task-file-actions a { display: inline-flex; align-items: center; justify-content: center; padding: 7px 9px; min-height: 32px; background: #202020; border: 1px solid #444; color: #ccc; font-size: 11px; text-decoration: none; border-radius: 0; }
.task-file-actions button:hover,
.task-file-actions a:hover { background: #2b2b2b; border-color: #888; color: #fff; }
.task-upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 146px; margin-top: 16px; padding: 24px 18px; border: 1px dashed #555; text-align: center; background: #141414; }
.task-upload-zone > svg { width: 24px; height: 24px; margin-bottom: 3px; color: #aaa; }
.task-upload-zone button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 18px; border: 1px solid #666; background: #292929; color: #fff; }
.task-upload-zone button:hover { background: #3b3b3b; border-color: #999; }
.task-upload-zone p,
.task-upload-zone small { max-width: 310px; margin: 0; color: #999; font-size: 11px; line-height: 1.6; }
.task-upload-zone.is-dragging { border-color: #eee; background: #262626; }
.task-signature-panel { padding: 20px; margin-top: 20px; border: 1px solid #383838; background: #1a1a1a; }
.task-signature-panel > header,
.task-signature-panel .task-signature-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.task-signature-panel h3,
.task-signature-panel h4 { margin: 0; font: 400 14px/1.4 'Minerva Söhne', Arial, sans-serif; }
.task-signature-panel .badge,
.task-signature-panel .task-signature-badge { padding: 4px 6px; border: 1px solid #555; color: #aaa; font-size: 9px; line-height: 1.4; letter-spacing: .04em; white-space: nowrap; }
.task-signature-panel p { margin: 10px 0 14px; color: #999; font-size: 12px; line-height: 1.65; }
.task-signature-panel button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 12px; background: #252525; border: 1px solid #4b4b4b; color: #bbb; font-size: 12px; }
.task-signature-panel button:disabled { color: #888; border-color: #383838; cursor: default; }
.task-local-notice { margin: 0; color: #999; font-size: 11px; line-height: 1.6; }
.task-local-notice[role="status"] { color: #b0cdd6; min-height: 1.6em; }
.task-local-notice.is-error { color: #ff9d89; }
.task-empty-files { padding: 8px 0; color: #aaa; font-size: 12px; line-height: 1.6; }
.task-file-media { display: block; width: 100%; max-height: 280px; margin: 14px 0 0; object-fit: contain; background: #000; border: 1px solid #333; }
.task-dialog-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid #333; }
.task-dialog-actions button { min-height: 44px; padding: 12px 18px; border: 1px solid #555; background: #252525; color: #eee; }
.task-dialog-actions button.primary { flex: 1; background: var(--appearance-accent, #dd2b0f); border-color: var(--appearance-accent, #dd2b0f); color: var(--appearance-on-accent, #fff); }
.task-editor { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 42px; padding: 0; margin: 0; min-width: 0; border: 0; }
.task-editor-legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.task-editor-main, .task-editor-sidebar { display: grid; gap: 24px; min-width: 0; }
.task-editor-sidebar { padding-left: 30px; border-left: 1px solid #333; }
.task-editor-sidebar h3 { margin: 6px 0 -8px; font: 800 16px/1.4 'Minerva Söhne Breit', Arial, sans-serif; }
.task-editor-field { display: flex; flex-direction: column; gap: 9px; min-width: 0; font: 400 12px/1.5 'Minerva Söhne', Arial, sans-serif; color: #bcbcbc; }
.task-detail-dialog .task-editor-field input, .task-detail-dialog .task-editor-field textarea, .task-detail-dialog .task-editor-field select { width: 100%; max-width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 12px 14px; border: 1px solid #484848; border-radius: 0; background: #161616; color: #f3f2f2; font: 400 14px/1.55 'Minerva Söhne', Arial, sans-serif; text-transform: none; letter-spacing: normal; }
.task-detail-dialog .task-editor-field textarea { resize: vertical; }
.task-detail-dialog .task-editor-field input:hover, .task-detail-dialog .task-editor-field textarea:hover, .task-detail-dialog .task-editor-field select:hover { border-color: #737373; }
.task-editor-sample { display: grid; gap: 12px; margin-top: 10px; border-top: 1px solid #333; padding-top: 22px; }
.task-editor-sample .task-example-tag { justify-self: start; }
.task-editor-sample p { margin: 0; font-size: 12px; color: #aaa; line-height: 1.65; }
.task-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 12px 0 18px; }
.task-section-heading h3 { margin: 0; }
.task-section-heading button { border: 1px solid #494949; padding: 8px 11px; background: transparent; color: #ddd; }
.task-editable-steps { display: grid; gap: 20px; }
.task-editable-step { display: grid; grid-template-columns: 22px minmax(0, 1fr) 32px; gap: 12px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid #303030; }
.task-editable-step:last-child { border-bottom: 0; padding-bottom: 0; }
.task-step-complete { padding-top: 35px; }
.task-step-complete input { width: 18px; height: 18px; margin: 0; accent-color: #54d58a; }
.task-step-fields { display: grid; gap: 12px; }
.task-step-owner { max-width: 220px; }
.task-step-actions { display: grid; gap: 8px; padding-top: 29px; }
.task-step-actions button { width: 32px; height: 32px; padding: 5px; border: 1px solid #494949; background: transparent; color: #bbb; }
.task-step-actions button:hover, .task-section-heading button:hover { color: #fff; border-color: #888; }
.task-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; position: sticky; z-index: 4; bottom: 0; margin-top: auto; padding: 20px 0 24px; border-top: 1px solid #393939; background: var(--appearance-panel, #101010); }
.task-editor-footer .task-dialog-actions { margin: 0; padding: 0; border: 0; flex-shrink: 0; }
.task-editor-footer .task-dialog-actions .primary { min-width: 150px; }
.task-detail-dialog button:disabled { opacity: .45; cursor: default; }
.task-discard-prompt { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 18px; border: 1px solid #9d642e; background: #2b1e11; color: #ffb66c; }
.task-discard-prompt > span { flex: 1; }
.task-discard-prompt button { padding: 8px 12px; border: 1px solid #9d642e; background: transparent; color: #eee; }
@media (prefers-reduced-motion: reduce) {
  .timeline-legend .status-dot.health-at-risk,
  .task-detail-status .status-dot.health-at-risk,
  .timeline-block.health-at-risk::after { animation: none; }
}
@media (max-width: 760px) {
  .task-detail-dialog { width: 100vw; height: 100dvh; margin: 0; border: 0; }
  .task-editor { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .task-editor-sidebar { grid-row: 1; padding: 0 0 24px; border-left: 0; border-bottom: 1px solid #333; }
  .task-editor-sample { display: none; }
  .task-editor-footer { flex-wrap: wrap; gap: 12px; padding-bottom: 20px; }
  .task-editor-footer .task-dialog-actions { width: 100%; }
  .task-editor-footer .task-dialog-actions button { flex: 1; }
  .task-detail-title-row { gap: 13px; }
  .task-detail-title-row .task-heading-icon, .task-detail-title-row .task-heading-icon svg { width: 30px; height: 30px; }
  .task-view-tabs { display: flex; width: 100%; }
  .task-view-tabs button { flex: 1; justify-content: center; padding-inline: 12px; }
  .timeline-panel { margin-top: 25px; }
  .timeline-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 20px; }
  .timeline-heading h2 { font-size: 24px; }
  .timeline-controls { justify-content: flex-start; gap: 6px; }
  .timeline-controls button { min-height: 38px; padding: 8px 11px; font-size: 12px; }
  .timeline-legend { gap: 10px 18px; font-size: 10px; }
  .timeline-grid { --timeline-label-width: 175px; }
  .timeline-scale-label { padding: 16px; }
  .timeline-row { min-height: 88px; }
  .timeline-label { padding: 15px 16px; }
  .timeline-task-name { font-size: 12px; }
  .timeline-task-meta { font-size: 10px; }
  .timeline-section { padding-left: 16px; }
  .timeline-section > * { left: 16px; }
  .timeline-panel-footer { font-size: 10px; }
  .task-detail-body { padding: 24px 24px 0; gap: 20px; }
  .task-detail-heading h2 { font-size: 24px; }
  .task-detail-heading > button { width: 34px; height: 34px; }
  .task-file-card { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .task-file-actions { width: 100%; padding-left: 46px; }
  .task-file-actions button,
  .task-file-actions a { min-height: 36px; }
  .task-signature-panel { padding: 16px; }
  .task-dialog-actions button { padding-inline: 14px; }
}
@media (max-width: 380px) {
  .task-detail-body { padding: 20px; }
  .timeline-grid { --timeline-label-width: 155px; }
  .timeline-label { padding-inline: 12px; }
  .task-signature-panel > header,
  .task-signature-panel .task-signature-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Workspace file library: local sample attachments, using the shared Minerva theme. */
.workspace-files { margin-top: 30px; min-width: 0; color: var(--text, #f3f2f2); }
.workspace-files * { box-sizing: border-box; }
.workspace-files button, .workspace-files input, .workspace-files select { font: 400 13px/1.45 var(--font-ui, 'Minerva Söhne', Arial, sans-serif); border-radius: 0; }
.workspace-files button { cursor: pointer; }
.workspace-files button:disabled { opacity: .45; cursor: default; }
.workspace-files :focus-visible { outline: 2px solid var(--text, #f3f2f2); outline-offset: 3px; }
.files-library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.files-library-heading > div:first-child { min-width: 0; }
.files-library-heading h2 { margin: 0 0 10px; font: 800 clamp(25px, 2.5vw, 34px)/1.2 var(--font-display, 'Minerva Söhne Breit', Arial, sans-serif); letter-spacing: -.035em; }
.files-library-heading p { max-width: 560px; margin: 0; color: var(--muted, #aaa); font-size: 13px; line-height: 1.65; }
.files-add-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; min-width: 0; flex-shrink: 0; }
.files-add-controls label { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--muted, #aaa); font-size: 11px; }
.files-add-controls select { width: min(270px, 28vw); min-width: 160px; min-height: 44px; padding: 10px 34px 10px 12px; border: 1px solid #494949; background: var(--panel, #101010); color: var(--text, #f3f2f2); text-overflow: ellipsis; }
.files-add-controls > button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 11px 17px; border: 1px solid var(--appearance-accent, #dd2b0f); background: var(--appearance-accent, #dd2b0f); color: var(--appearance-on-accent, #fff); white-space: nowrap; }
.files-add-controls > button svg { width: 17px; height: 17px; flex: none; }
.files-add-controls > button:hover:not(:disabled) { filter: brightness(1.12); }
.files-library-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 26px; border: 1px solid #333; background: var(--panel, #101010); }
.files-library-stats > * { min-width: 0; padding: 20px 24px; border-right: 1px solid #333; }
.files-library-stats > :last-child { border-right: 0; }
.files-library-stats strong { display: block; margin-bottom: 5px; color: var(--text, #f3f2f2); font: 800 30px/1.2 var(--font-display, 'Minerva Söhne Breit', Arial, sans-serif); letter-spacing: -.04em; }
.files-library-stats span, .files-library-stats small, .files-library-stats p { display: block; margin: 0; color: var(--muted, #aaa); font: 400 12px/1.5 var(--font-ui, 'Minerva Söhne', Arial, sans-serif); }
.files-library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.files-library-toolbar > input, .files-library-toolbar > label > input { width: min(100%, 340px); min-width: 160px; min-height: 44px; padding: 11px 14px; border: 1px solid #494949; background: var(--panel, #101010); color: var(--text, #f3f2f2); }
.files-library-toolbar > input::placeholder, .files-library-toolbar > label > input::placeholder { color: #888; }
.files-type-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.files-type-filters button { min-height: 40px; padding: 9px 13px; border: 1px solid transparent; background: transparent; color: var(--muted, #aaa); white-space: nowrap; }
.files-type-filters button[aria-pressed="true"] { border-color: #494949; background: #262626; color: #f3f2f2; }
.files-type-filters button:hover { background: #202020; color: #fff; }
.files-library-list { border: 1px solid #333; background: var(--panel, #101010); }
.files-library-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(120px, .6fr) 92px auto; gap: 18px; align-items: center; min-height: 98px; padding: 20px 24px; border-bottom: 1px solid #303030; }
.files-library-row:last-child { border-bottom: 0; }
.files-library-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 48px; border: 1px solid #494949; color: #c8c8c8; background: #181818; }
.files-library-icon svg { display: block; width: 23px; height: 23px; }
.files-library-info { min-width: 0; }
.files-library-info strong { display: block; color: var(--text, #f3f2f2); font: 400 14px/1.5 var(--font-ui, 'Minerva Söhne', Arial, sans-serif); overflow-wrap: anywhere; }
.files-library-info small { display: block; margin-top: 5px; color: #999; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.files-library-task { min-width: 0; }
.files-library-task { max-width: 100%; padding: 0; border: 0; background: transparent; color: #b0cdd6; font-size: 12px; line-height: 1.5; text-align: left; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #47565b; overflow-wrap: anywhere; }
.files-library-task:hover { color: #fff; text-decoration-color: #bbb; }
.files-library-meta { color: #999; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.files-library-actions { display: flex; align-items: center; gap: 6px; }
.files-library-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 8px 11px; border: 1px solid #494949; background: transparent; color: #ccc; font-size: 11px; }
.files-library-actions button svg { width: 15px; height: 15px; }
.files-library-actions button:hover { border-color: #999; background: #242424; color: #fff; }
.files-library-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 270px; padding: 42px 24px; border: 1px dashed #444; text-align: center; background: var(--panel, #101010); }
.files-library-list > .files-library-empty { border: 0; }
.files-library-empty > svg { width: 38px; height: 38px; margin-bottom: 6px; color: #999; }
.files-library-empty h3 { margin: 0; font: 800 20px/1.4 var(--font-display, 'Minerva Söhne Breit', Arial, sans-serif); letter-spacing: -.025em; }
.files-library-empty p { max-width: 460px; margin: 0; color: #999; font-size: 13px; line-height: 1.65; }
.files-library-signing { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 24px; border: 1px solid #333; background: var(--panel, #101010); }
.files-library-signing h3 { margin: 0 0 8px; font: 800 17px/1.4 var(--font-display, 'Minerva Söhne Breit', Arial, sans-serif); letter-spacing: -.025em; }
.files-library-signing p { max-width: 620px; margin: 0; color: #999; font-size: 12px; line-height: 1.65; }
.files-library-signing button { flex-shrink: 0; min-height: 42px; padding: 10px 16px; border: 1px solid #494949; background: #252525; color: #bbb; }
.shared-file-feedback { display: grid; gap: 10px; margin: 14px 0; color: #b0cdd6; font: 400 12px/1.6 var(--font-ui, 'Minerva Söhne', Arial, sans-serif); }
.shared-file-feedback:empty { display: none; }
.shared-file-feedback p { margin: 0; overflow-wrap: anywhere; }
.shared-file-feedback .shared-file-error, .files-library-info .file-state-error { color: #ff9d89; }
.shared-file-remove-confirm { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 230px; }
.shared-file-remove-confirm small { width: 100%; color: #ffb66c; font-size: 11px; line-height: 1.5; }
.shared-file-remove-confirm [data-preview-action="shared-confirm-remove"] { border-color: #96613c; color: #ffbd88; }
.files-library-info .file-state-uploading, .files-library-info .file-state-deleting { color: #ffb66c; }
.shared-file-transfer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 16px; padding: 15px 18px; border: 1px solid #46545a; background: #11191c; }
.shared-file-transfer > span { min-width: 0; overflow-wrap: anywhere; }
.shared-file-transfer progress { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 5px; border: 0; accent-color: #b0cdd6; }
.shared-file-transfer progress::-webkit-progress-bar { background: #30383c; }
.shared-file-transfer progress::-webkit-progress-value { background: #b0cdd6; }
.shared-file-transfer progress::-moz-progress-bar { background: #b0cdd6; }
.shared-file-transfer small { grid-column: 2; grid-row: 1; color: #aaa; font-size: 11px; }
.task-readonly-details { margin-bottom: 24px; }
.task-schedule-editor { min-width:0; margin:0; padding:0; border:0; display:grid; gap:28px; }
.task-date-fields { display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-top:22px; }
.task-editor-field small { color:#999; font-size:10px; font-weight:400; }
.task-date-fields input[type="date"],.task-milestone-row input[type="date"] { min-height:44px; color-scheme:dark; }
.task-milestones { display:grid; gap:16px; }
.task-milestone-row { display:grid; grid-template-columns:84px minmax(0,1fr) 165px 32px; align-items:end; gap:14px; padding:20px 0; border-top:1px solid #333; }
.task-milestone-done { display:flex; flex-direction:column; align-items:center; justify-content:center; align-self:stretch; gap:9px; font-size:10px; color:#aaa; }
.task-milestone-done input { width:18px; height:18px; accent-color:var(--appearance-accent,#dd2b0f); }
.task-detail-dialog .task-remove-milestone { min-height:44px; padding:0; border:0; font-size:24px; background:transparent; color:#aaa; }
.task-schedule-summary { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:22px 0; }
.task-schedule-summary dt { color:#999; font-size:11px; }
.task-schedule-summary dd { margin:8px 0 0; font-size:14px; }
.task-milestone-readonly { margin:0; padding:0; list-style:none; }
.task-milestone-readonly li { display:flex; gap:12px; padding:16px 0; border-top:1px solid #333; overflow-wrap:anywhere; }
.task-milestone-readonly small { display:block; margin-top:6px; color:#999; font-size:11px; }
.timeline-legend .status-dot.health-not-set,.task-detail-status .status-dot.health-not-set { background:#929292; }
.timeline-block.health-not-set { --task-tint:#202020; --task-stripe:#929292; }
@media (max-width:650px) {
  .task-date-fields { grid-template-columns:1fr; }
  .task-milestone-row { grid-template-columns:34px minmax(0,1fr) 28px; align-items:center; gap:14px 10px; }
  .task-milestone-done { grid-column:1; grid-row:1 / 3; }
  .task-milestone-done span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
  .task-milestone-row > .task-editor-field { grid-column:2; }
  .task-remove-milestone { grid-column:3; grid-row:1 / 3; }
  .task-detail-tabs { flex-wrap:wrap; }
}
.task-readonly-details .task-checklist { margin-top: 4px; }
.task-readonly-details .task-checklist .step-files-button { min-width: 32px; min-height: 32px; }
.files-library-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 200px; }
button.files-library-task { padding: 0; border: 0; background: transparent; color: #b0cdd6; font-size: 12px; line-height: 1.5; text-align: left; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #47565b; overflow-wrap: anywhere; }
button.files-library-task:hover { color: #fff; text-decoration-color: #bbb; }
@media (max-width: 1000px) {
  .files-library-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .files-add-controls { width: 100%; justify-content: flex-start; }
  .files-add-controls select { width: 290px; max-width: 100%; }
  .files-library-toolbar { align-items: flex-start; flex-direction: column; }
  .files-library-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 7px 16px; }
  .files-library-icon { grid-column: 1; grid-row: 1 / 4; align-self: start; }
  .files-library-info { grid-column: 2; grid-row: 1; }
  .files-library-task { grid-column: 2; grid-row: 2; }
  .files-library-meta { grid-column: 2; grid-row: 3; }
  .files-library-actions { grid-column: 3; grid-row: 1 / 4; }
}
@media (max-width: 600px) {
  .workspace-files { margin-top: 25px; }
  .files-add-controls { flex-wrap: wrap; }
  .files-add-controls label { flex: 1 1 180px; }
  .files-add-controls select { width: 100%; }
  .files-add-controls > button { min-height: 44px; }
  .files-library-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .files-library-stats > * { padding: 17px 18px; }
  .files-library-stats > :nth-child(2) { border-right: 0; }
  .files-library-stats > :nth-child(-n+2) { border-bottom: 1px solid #333; }
  .files-library-stats strong { font-size: 26px; }
  .files-library-toolbar { gap: 12px; }
  .files-library-toolbar > input, .files-library-toolbar > label { width: 100%; }
  .files-type-filters { gap: 3px; }
  .files-type-filters button { min-height: 40px; padding-inline: 10px; font-size: 12px; }
  .files-library-row { grid-template-columns: 34px minmax(0, 1fr); gap: 7px 12px; padding: 18px 16px; }
  .files-library-icon { width: 34px; height: 40px; }
  .files-library-icon svg { width: 20px; height: 20px; }
  .files-library-actions { grid-column: 2; grid-row: 4; margin-top: 7px; }
  .files-library-actions { justify-content: flex-start; max-width: none; }
  .shared-file-remove-confirm { justify-content: flex-start; }
  .files-library-actions button { min-height: 40px; }
  .files-library-empty { padding: 32px 20px; min-height: 240px; }
  .files-library-signing { align-items: flex-start; flex-direction: column; gap: 18px; padding: 20px; }
}

/* Group headings remain usable while the wide timeline scrolls. */
.timeline-group-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; max-width: min(650px, calc(100vw - 96px)); }
.timeline-group-heading > span { min-width: 0; overflow-wrap: anywhere; }
.group-rename-button { flex: 0 0 auto; min-height: 36px; border: 1px solid var(--line, #444); padding: 7px 11px; background: transparent; color: var(--muted, #aaa); font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; cursor: pointer; }
.group-rename-button:hover { color: var(--text, #fff); border-color: var(--muted, #aaa); }
.group-rename-button:focus-visible { outline: 2px solid var(--text, #fff); outline-offset: 3px; }
.section-head > .group-rename-button { margin-left: auto; }
.group-editor { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; padding: 28px; border: 1px solid var(--line, #444); background: var(--panel, #111); color: var(--text, #fff); }
.group-editor::backdrop { background: #000b; }
.group-editor h2 { margin: 0 0 16px; }
.group-editor p { color: var(--muted, #aaa); line-height: 1.6; overflow-wrap: anywhere; }
.group-editor label { display: grid; gap: 10px; margin-top: 24px; }
.group-editor input { box-sizing: border-box; width: 100%; min-width: 0; }
.group-editor .group-editor-error { color: var(--danger, #ffa180); min-height: 1.6em; }
.group-editor footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Inline timeline dates keep the selected workstream explicit. */
.timeline-date-editor { margin: 0 0 24px; padding: 22px; border: 1px solid var(--line, #444); background: var(--panel, #111); color: var(--text, #fff); }
.timeline-date-intro h3 { margin: 0 0 8px; font-size: 19px; }
.timeline-date-intro p { margin: 0 0 20px; color: var(--muted, #aaa); line-height: 1.5; }
.timeline-date-fields { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(150px, 1fr)); gap: 16px; }
.timeline-date-fields label { display: grid; gap: 8px; font-size: 13px; min-width: 0; }
.timeline-date-fields .input { box-sizing: border-box; width: 100%; min-width: 0; }
.timeline-date-error { color: var(--danger, #ffa180); min-height: 1.5em; margin: 12px 0; }
.timeline-date-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.timeline-date-actions > span { margin-right: auto; color: var(--muted, #aaa); font-size: 12px; }
.timeline-row-dates { grid-column: 2; justify-self: start; border: 1px solid var(--line, #444); background: transparent; color: var(--muted, #aaa); font: inherit; font-size: 11px; min-height: 34px; padding: 7px 10px; cursor: pointer; }
.timeline-row-dates:hover { color: var(--text, #fff); border-color: var(--muted, #aaa); }
.timeline-row-dates:focus-visible { outline: 2px solid var(--text, #fff); outline-offset: 3px; }
@media (max-width: 700px) { .timeline-date-editor { padding: 16px; } .timeline-date-fields { grid-template-columns: 1fr 1fr; } .timeline-date-choice { grid-column: 1 / -1; } .timeline-date-actions > span { flex-basis: 100%; } }
@media (max-width: 380px) { .timeline-date-fields { grid-template-columns: 1fr; } }
.timeline-stage-dates-button { width: 100%; margin-top: 4px; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line, #555); background: transparent; color: var(--text, #ddd); font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.timeline-stage-dates-button:hover { border-color: var(--muted, #aaa); }
.timeline-stage-dates-button:focus-visible { outline: 2px solid var(--text, #fff); outline-offset: 3px; }
.timeline-stage-editor { display: grid; gap: 10px; width: 100%; min-width: 0; margin: 4px 0 0; font-size: 11px; }
.timeline-stage-editor > p { margin: 0; line-height: 1.5; }
.timeline-stage-editor label { display: grid; gap: 6px; min-width: 0; }
.timeline-stage-editor .input { box-sizing: border-box; min-width: 0; width: 100%; padding: 8px; font-size: 12px; }
.timeline-stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-stage-actions .btn { min-width: 0; min-height: 36px; padding: 8px; font-size: 11px; }

/* One workstream editor owns stage details and dates; cards are summaries. */
.task-flow-stages { display: grid; gap: 18px; }
.task-flow-stage { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 18px; padding: 20px; border: 1px solid #393939; }
.task-flow-stage-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.task-flow-stage-heading h4 { margin: 0; font-size: 14px; }
.task-current-stage { display: flex; align-items: center; gap: 8px; color: #bcbcbc; font-size: 12px; }
.task-current-stage input { width: 17px; height: 17px; margin: 0; accent-color: #fff; }
.task-flow-stage .task-date-fields { grid-column: 1 / -1; margin: 0; }
.task-flow-readonly { display: grid; gap: 16px; padding-left: 20px; }
.task-flow-readonly li > span { display: block; margin-top: 5px; color: #aaa; font-size: 12px; }
.task-delete-area { padding-top: 20px; border-top: 1px solid #393939; }
.task-detail-dialog .task-delete-button { color: #ff896f; border: 1px solid #844738; background: transparent; padding: 10px 12px; }
.task-delete-button:disabled { opacity: .5; cursor: not-allowed; }
.task-delete-prompt { border-color: #844738; }
@media (max-width: 600px) {
  .task-flow-stage { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
}
