/* Shared, including the classic appearance, so disclosure labels never disagree. */
body[data-style] .home-trajectory-preview > summary .trajectory-when-open,
body[data-style] .home-trajectory-preview[open] > summary .trajectory-when-closed { display: none; }
body[data-style] .home-trajectory-preview[open] > summary .trajectory-when-open { display: inline; }
.flow-task-detail { min-width: 0; }
.flow-task-detail > header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 20px; }
.flow-task-detail > header h3 { flex: 1 1 65%; margin: 0; font-size: 21px; line-height: 1.5; overflow-wrap: anywhere; }
.flow-task-detail > header > p { flex-basis: 100%; margin: 0; font-size: 13px; }
.flow-task-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; margin: 0 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb,var(--bg) 60%,var(--panel)); }
.flow-task-facts > div { min-width: 0; }
.flow-task-facts dt { color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 5px; }
.flow-task-facts dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.6; overflow-wrap: anywhere; }
.flow-task-evidence,.flow-task-next { min-width: 0; padding: 0 0 18px; }
.flow-task-detail :is(.flow-task-evidence,.flow-task-next) h4 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.flow-task-detail :is(.flow-task-evidence,.flow-task-next) p { margin: 0; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.flow-task-evidence time { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.flow-task-next { border-left: 2px solid var(--accent-2); padding: 14px 16px; border-radius: 0 12px 12px 0; background: color-mix(in srgb,var(--accent-2) 6%,var(--panel)); }
.flow-task-secondary { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.flow-task-secondary .btn { font-size: 13px; }
.flow-task-more,.flow-task-note { border-top: 1px solid var(--line); margin-top: 12px; }
.flow-task-more > summary,.flow-task-note > summary { cursor: pointer; min-height: 44px; padding: 12px 0; color: var(--muted); font-size: 13px; }
.flow-task-more > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 8px; }
.flow-task-more .btn { text-align: left; font-size: 13px; }
.flow-task-more [data-action="delete-task"] { color: var(--bad); }
.flow-task-note p { white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.flow-note-capture { margin-top: 20px; border-top: 1px solid var(--line); }
.flow-note-capture > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; cursor: pointer; font-size: 14px; list-style: none; }
.flow-note-capture > summary:after { content: '+'; color: var(--muted); font-size: 18px; }
.flow-note-capture[open] > summary:after { content: '−'; }
.flow-note-capture > summary span { flex: 1; color: var(--muted); text-align: right; font-size: 12px; }
.flow-note-capture .slim-capture { margin-top: 4px!important; }
.flow-continuation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.flow-continuation > div:first-child { flex: 1 1 240px; min-width: 0; }
.flow-continuation b { display: block; font-size: 16px; font-weight: 600; margin: 6px 0 8px; overflow-wrap: anywhere; }
.flow-continuation small,.flow-continuation p span { color: var(--muted); font-size: 12px; }
.flow-continuation p { margin: 5px 0; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.flow-continuation .flow-continuation-next { color: var(--text); }
.flow-continuation-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-continuation .btn { font-size: 13px; }
@media(max-width:520px) {
  .flow-task-detail > header h3 { font-size: 19px; }
  .flow-task-facts { padding: 14px; gap: 14px; }
  .flow-task-secondary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .flow-task-secondary .btn { min-width: 0; white-space: normal; padding: 8px 10px; }
  .flow-task-secondary > :last-child { grid-column: 1/-1; }
  .flow-note-capture > summary span { max-width: 52%; }
  .flow-continuation { gap: 12px; }
  .flow-continuation-actions { width: 100%; }
  .flow-continuation-actions .btn { flex: 1; }
}

.home-now > .flow-continuation { margin-top: 0; padding-top: 0; border-top: 0; }
.home-now > .flow-continuation > div:first-child { flex-basis: 100%; }
.home-now > .flow-continuation .flow-continuation-actions { width: 100%; }
.home-now > .flow-continuation .flow-continuation-actions > :last-child { margin-left: auto; }
@media(max-width:520px) { .home-now > .flow-continuation .flow-continuation-actions > :last-child { flex-basis: 100%; margin-left: 0; border-color: transparent; color: var(--muted); background: transparent; } }

.modal:has(.flow-task-detail) .modal-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.modal:has(.flow-task-detail) .modal-actions .btn { width: 100%; min-width: 0; white-space: normal; }

.agenda-evidence { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.agenda-evidence.is-running { color: var(--accent-2); }
.agenda-evidence.is-running:before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.agenda-section-note,.agenda-empty { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.agenda-carryover { margin-top: 16px; border-top: 1px solid var(--line); }
.agenda-carryover > summary { min-height: 48px; display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.agenda-carryover > summary > span { flex: 1; font-size: 14px; }
.agenda-carryover > summary b { margin-left: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.agenda-carryover > summary small { font-size: 12px; color: var(--muted); }
.agenda-carryover > summary:after { content: '+'; font-size: 18px; color: var(--muted); }
.agenda-carryover[open] > summary:after { content: '−'; }
.agenda-pending-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); min-width: 0; }
.agenda-pending-title { border: 0; padding: 0; background: none; color: var(--text); cursor: pointer; text-align: left; flex: 1; min-width: 0; font: inherit; }
.agenda-pending-title b { display: block; font-size: 14px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
.agenda-pending-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.agenda-pending-row > div { display: flex; gap: 6px; flex-shrink: 0; }
.agenda-pending-row .btn { min-height: 36px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.agenda-backlog-more > summary { padding: 12px 0; font-size: 12px; color: var(--muted); cursor: pointer; }
.agenda-activity-row { display: flex; align-items: center; gap: 16px; padding: 15px; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb,var(--panel) 90%,var(--accent-2)); }
.agenda-activity-row > div:first-child { flex: 1; min-width: 0; }
.agenda-activity-row b { font-size: 15px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.agenda-activity-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agenda-activity-actions .btn { font-size: 12px; min-height: 38px; padding: 7px 12px; }
@media(max-width:520px) {
  .agenda-carryover > summary { gap: 8px; }
  .agenda-carryover > summary small { font-size: 11px; }
  .agenda-pending-row { flex-wrap: wrap; gap: 8px; }
  .agenda-pending-title { flex-basis: 100%; }
  .agenda-pending-row > div { margin-left: auto; }
  .agenda-activity-row { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .agenda-activity-row > div:first-child { flex-basis: 100%; }
  .agenda-activity-actions { width: 100%; }
  .agenda-activity-actions .btn { flex: 1; }
}
