create-pmos 0.424.0 → 0.426.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/board-deliveries-test.js +153 -0
  7. package/workspace/board-programs-test.js +60 -36
  8. package/workspace/board-shot.js +4 -3
  9. package/workspace/briefing-premium-board-test.js +9 -6
  10. package/workspace/briefing-premium-insights-test.js +31 -15
  11. package/workspace/briefing-premium-products-test.js +46 -43
  12. package/workspace/calm-timeline-test.js +190 -0
  13. package/workspace/changelog.json +24 -0
  14. package/workspace/ev-everywhere-test.js +3 -1
  15. package/workspace/guide/briefing-premium.md +3 -2
  16. package/workspace/guide/claude-proposes.md +16 -1
  17. package/workspace/guide/home.md +2 -2
  18. package/workspace/guide/index.md +1 -0
  19. package/workspace/guide/notes.md +39 -1
  20. package/workspace/guide/present-in-a-meeting.md +57 -0
  21. package/workspace/guide/programs.md +4 -3
  22. package/workspace/lib/board-premium.js +3 -1
  23. package/workspace/lib/briefing-premium-products.js +18 -4
  24. package/workspace/lib/chat-file-locate.js +40 -2
  25. package/workspace/lib/engine/boards.js +8 -2
  26. package/workspace/lib/idle-close.js +60 -0
  27. package/workspace/lib/loose-proposals.js +302 -0
  28. package/workspace/lib/meeting-focus.js +64 -14
  29. package/workspace/lib/my-work-premium.js +1 -1
  30. package/workspace/lib/proposal-runs.js +77 -2
  31. package/workspace/lib/propose-cli.js +42 -1
  32. package/workspace/lib/route-modules.js +1 -0
  33. package/workspace/lib/routes-boards.js +16 -4
  34. package/workspace/lib/routes-brief-page.js +9 -1
  35. package/workspace/lib/routes-briefing-premium.js +19 -0
  36. package/workspace/lib/routes-loose.js +210 -0
  37. package/workspace/lib/routes-meeting-focus.js +28 -6
  38. package/workspace/lib/routes-pm-items.js +27 -17
  39. package/workspace/lib/settings-store.js +2 -1
  40. package/workspace/lib/task-cli.js +18 -11
  41. package/workspace/milestone-pins-test.js +170 -0
  42. package/workspace/package-lock.json +2 -2
  43. package/workspace/package.json +1 -1
  44. package/workspace/premium-board-actions-test.js +2 -1
  45. package/workspace/premium-briefing-depth-test.js +2 -2
  46. package/workspace/premium-chat-term-test.js +13 -2
  47. package/workspace/premium-core-doc-issue-test.js +1 -1
  48. package/workspace/premium-rec-now-test.js +153 -0
  49. package/workspace/premium-rec-tab-test.js +167 -0
  50. package/workspace/product-lane-test.js +30 -17
  51. package/workspace/public/pm/bd-acts.js +6 -3
  52. package/workspace/public/pm/bd-deliveries.js +218 -0
  53. package/workspace/public/pm/bd-pin-card.css +16 -0
  54. package/workspace/public/pm/bd-pin-card.js +80 -0
  55. package/workspace/public/pm/bd-pins.js +33 -0
  56. package/workspace/public/pm/bd-pop.js +2 -0
  57. package/workspace/public/pm/bd-prog.js +5 -4
  58. package/workspace/public/pm/bd-span.js +140 -102
  59. package/workspace/public/pm/cozy-aud.css +9 -0
  60. package/workspace/public/pm/cozy-aud.js +80 -0
  61. package/workspace/public/pm/cozy-board.css +73 -11
  62. package/workspace/public/pm/cozy-home.css +16 -1
  63. package/workspace/public/pm/cozy-live-pill.js +3 -0
  64. package/workspace/public/pm/cozy-pick.css +41 -0
  65. package/workspace/public/pm/cozy-pick.js +134 -0
  66. package/workspace/public/pm/cozy-rec-bridge.js +32 -0
  67. package/workspace/public/pm/cozy-rec-now.css +104 -0
  68. package/workspace/public/pm/cozy-rec-now.js +330 -0
  69. package/workspace/public/pm/cozy-rec-present.css +69 -0
  70. package/workspace/public/pm/cozy-rec-present.js +467 -0
  71. package/workspace/public/pm/cozy-rec-tab.css +90 -0
  72. package/workspace/public/pm/cozy-rec-tab.js +219 -0
  73. package/workspace/public/pm/cozy-settings.js +8 -2
  74. package/workspace/public/pm/cozy-today.css +4 -0
  75. package/workspace/public/pm/home-app.js +51 -22
  76. package/workspace/public/pm/home-data.js +5 -3
  77. package/workspace/public/pm/home-list.js +63 -15
  78. package/workspace/public/pm/home-more.js +2 -31
  79. package/workspace/public/pm/home-today.js +19 -9
  80. package/workspace/public/pm/ini-tasks.js +4 -1
  81. package/workspace/public/pm/live-model.js +1 -1
  82. package/workspace/public/pm/loose-props.css +54 -0
  83. package/workspace/public/pm/loose-props.js +262 -0
  84. package/workspace/public/pm/premium-board.js +65 -30
  85. package/workspace/public/pm/premium-insights.js +42 -24
  86. package/workspace/public/pm/premium-meeting.js +17 -4
  87. package/workspace/public/pm/premium-mtg-present.js +4 -3
  88. package/workspace/public/pm/premium-report-read.js +2 -0
  89. package/workspace/public/pm/premium-vw-mtg.js +15 -7
  90. package/workspace/public/pm/rec-state.js +13 -5
  91. package/workspace/public/pm/rec-tab-core.js +92 -0
  92. package/workspace/public/pm/term-view.js +81 -10
  93. package/workspace/public/pm/view-notes.js +9 -0
  94. package/workspace/public/premium-aud.html +22 -0
  95. package/workspace/public/premium-board.html +2 -0
  96. package/workspace/public/premium-insights.html +2 -1
  97. package/workspace/public/premium-rec.html +30 -0
  98. package/workspace/public/premium.html +1 -0
  99. package/workspace/rec-present-test.js +229 -0
  100. package/workspace/server.js +116 -7
  101. package/workspace/skills/loose-propose.skill +39 -0
  102. package/workspace/task-milestones-test.js +15 -6
  103. package/workspace/test-lists/board-deliveries.json +13 -0
  104. package/workspace/test-lists/calm-timeline.json +5 -0
  105. package/workspace/test-lists/loose-props.json +9 -0
  106. package/workspace/test-lists/milestone-pins.json +6 -0
  107. package/workspace/test-lists/rec-now.json +6 -0
  108. package/workspace/test-lists/rec-present.json +13 -0
  109. package/workspace/test-lists/recording-tab.json +13 -0
  110. package/workspace/timeline-holds-test.js +44 -42
@@ -15,7 +15,7 @@
15
15
  * fileUnder(text, inis) the initiative a typed task names (its title or id in the text), or null: the task then goes on the PM's own list
16
16
  * D is home-data.js's D plus { work (GET /api/my-work-premium model), items (GET /api/boards/items), others ([{ ws, name, model }], the boards of
17
17
  * the other products), phoneDay (GET /api/phone-day), review (GET /api/home-review) }. A part that did not answer is left out, never guessed. */
18
- import { needsOf, boardRows, productCard, productName, sessionRow, nameOf, iniOfSession, todayOf, listed, OPEN, hm } from './home-data.js';
18
+ import { needsOf, boardRows, productCard, productName, sessionRow, nameOf, iniOfSession, keyOfSession, todayOf, listed, OPEN, hm } from './home-data.js';
19
19
  import { programState, groupRows } from './program-model.js';
20
20
  import { homeSub } from './ms-suggest.js';
21
21
  import { STEPS, stageKey } from './premium-initiative-head.js';
@@ -54,13 +54,20 @@ export function goalsOf(model) {
54
54
  /* A row the brief tags "Across products" names no product: it is not a group of its own, it sits with the rows that name none. */
55
55
  const ACROSS = 'Across products';
56
56
  const prodOf = (x) => (x && x.product && x.product !== ACROSS ? x.product : '');
57
- /** The products the list shows, the board's own product first. Each: { key, ws, name, initials, primary, model, goals, on }. */
57
+ /** The products the list shows, the board's own product first: only the ticked ones (the one product pick, batch 12 item 5: a registered
58
+ * product that is not ticked is not on Home). Each: { key, ws, name, initials, primary, model, goals, tone }. tone: the tile's tint, by the
59
+ * product's place with the board's own first, then the registered order (pm/cozy-pick.js tonesOf), so the chip and the group agree. */
60
+ /** The pick's unticked test: true for a registered product that is not ticked; a product the pick does not list is never hidden. */
61
+ const unticked = (D) => { const P = (D.pick && D.pick.products) || (D.brief && D.brief.products && D.brief.products.available) || []; return (ws) => !!ws && P.some((a) => a.ws === ws && !a.on); };
58
62
  export function productsOf(D) {
59
63
  const out = [];
60
- const add = (p) => { const k = p.ws || 'n:' + String(p.name).toLowerCase(); if (out.some((x) => x.key === k || x.name.toLowerCase() === String(p.name).toLowerCase())) return; out.push({ ...p, key: k, initials: codeOf(p) }); };
61
64
  const b = D.board && D.board.board;
62
65
  const av = (D.brief && D.brief.products && D.brief.products.available) || [];
63
66
  const avOf = (ws) => (ws && av.find((a) => a.ws === ws)) || {}, named = (ws) => avOf(ws).name || '';
67
+ // D.pick is the pick (GET /api/briefing-premium/products; with none saved, the board's own product stays ticked)
68
+ const off = unticked(D);
69
+ const order = [(b && b.ws) || ''].concat(av.map((a) => a.ws).filter((w) => w !== (b && b.ws)));
70
+ const add = (p) => { const k = p.ws || 'n:' + String(p.name).toLowerCase(); if (off(p.ws) || out.some((x) => x.key === k || x.name.toLowerCase() === String(p.name).toLowerCase())) return; const at = p.ws ? order.indexOf(p.ws) : -1; out.push({ ...p, key: k, initials: codeOf(p), tone: (at >= 0 ? at : order.length + out.length) % TONES }); };
64
71
  if (D.board) add({ ws: (b && b.ws) || '', name: (b && b.product) || named(b && b.ws) || productName(D), code: avOf(b && b.ws).initials, primary: true, model: D.board, goals: goalsOf(D.board) });
65
72
  for (const o of D.others || []) if (o && o.model) add({ ws: o.ws, name: o.name || productName({ board: o.model }), code: avOf(o.ws).initials, primary: false, model: o.model, goals: goalsOf(o.model) });
66
73
  for (const a of av) if (a.on) add({ ws: a.ws, name: a.name, code: a.initials, primary: false, model: null, goals: null });
@@ -93,6 +100,9 @@ export function tasksOf(D, ini, now = Date.now()) {
93
100
  }).map((r) => ({ ...r, rank: urgency(r.task, now) }))
94
101
  .sort((a, b) => (b.mine - a.mine) || (a.rank[0] - b.rank[0]) || (a.rank[1] - b.rank[1]));
95
102
  }
103
+ /** One of the PM's own items of today (GET /api/my-work-premium, the Today tab). The check box says it is the PM's own: no "your own note" on
104
+ * every row (testing fixes). */
105
+ const itemRow = (r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: [r.overdue ? 'late' : '', String(r.sub || '').replace(/^Yours\b\s*(·\s*)?/, '')].filter(Boolean).join(' · '), check: true, mine: true, late: !!r.overdue, item: r });
96
106
  function meetRow(m, ini) {
97
107
  return { id: 'm:' + (m.id || m.title), kind: 'meeting', ini: ini || null, name: m.title, hint: (m.state === 'now' ? 'Now' : hm(m.start)) + (ini ? ' meeting' : ' · not linked'), state: m.state === 'now' ? 'working' : 'quiet', icon: 'clock', meeting: m };
98
108
  }
@@ -106,20 +116,22 @@ export const ownSteps = (r) => (r && r.wf && r.wf.id && r.wf.id !== 'product-fea
106
116
  export const rowAt = (r) => (ownSteps(r) ? r.wfStage.n - 1 : stageAt(r && r.stage));
107
117
  /** A row under an initiative that is the PM's move now (Your move, and the initiative's count badge): a next step, a session
108
118
  * that waits on the PM, or a task of the PM's own that is late. */
109
- const isMove = (k) => k.step || (k.kind === 'session' && (k.state === 'needs' || k.state === 'blocked')) || (k.kind === 'task' && k.mine && k.late);
119
+ const isMove = (k) => k.step || (k.kind === 'session' && (k.state === 'needs' || k.state === 'blocked')) || ((k.kind === 'task' || k.kind === 'item') && k.mine && k.late);
110
120
  function iniRowOf(D, r, needs, now) {
111
121
  // a mention is not a row here: Mentions is its own row at the top of Home (home-mentions.js, XvANew), so it shows once
112
122
  const steps = needs.filter((x) => x.ini === r.id && !x.needSession).map((x) => ({ ...x, step: true, hint: 'Next step' + (bareHint(x) ? ' · ' + bareHint(x) : '') }));
113
123
  const ses = (D.sessions || []).filter((s) => listed(s) && iniOfSession(s) === r.id).map((s) => sessionRow(s, D.desk && D.desk.roles));
114
124
  const tasks = tasksOf(D, r.id, now);
115
125
  const meet = todayOf(D).filter((m) => meetIni(m) === r.id && m.state !== 'past').map((m) => meetRow(m, r.id));
126
+ // the PM's own items linked to it (the clean-up, batch 13 item 3): a late one keeps its late check box here
127
+ const items = (((D.work && D.work.queue && D.work.queue.tabs) || []).find((t) => t.key === 'today') || { groups: [] }).groups.flatMap((g) => g.rows || []).filter((x) => x.ini === r.id).map(itemRow);
116
128
  const turn = steps.length > 0 || ses.some((s) => s.state === 'needs' || s.state === 'blocked');
117
129
  const mine = tasks.filter((t) => t.mine).length;
118
130
  const run = ses.filter((s) => s.state === 'working').length;
119
131
  const right = turn ? 'your turn' + (mine ? ' · ' + plural(mine, 'task', 'tasks') : '') : mine ? plural(mine, 'task', 'tasks') : run ? run + ' running' : 'Nothing today';
120
132
  // next steps, sessions and today's meetings sit under the initiative; its tasks do not (Wawan, 2026-10-25: Home lists no tasks, the
121
133
  // initiative's page in the Viewer holds them). The row keeps them for Your move, where the PM's own late ones still lead
122
- const kids = [...steps, ...ses.sort((a, b) => (RANK[b.state] || 0) - (RANK[a.state] || 0)), ...meet];
134
+ const kids = [...steps, ...ses.sort((a, b) => (RANK[b.state] || 0) - (RANK[a.state] || 0)), ...items, ...meet];
123
135
  const hint = [(r.wf && r.wf.name) || 'Product feature', r.stage].filter(Boolean).join(' · '); // D99: Kind becomes Workflow
124
136
  return { id: 'i:' + r.id, kind: 'ini', ini: r.id, name: r.title, hint, right, turn, busy: kids.length > 0, state: turn ? 'needs' : run ? 'working' : 'quiet', kids, tasks, board: r, updated: r.updated || '',
125
137
  stage: r.stage || '', at: rowAt(r), steps: ownSteps(r), yours: kids.filter(isMove).length, late: kids.some((k) => k.kind === 'task' && k.mine && k.late) };
@@ -136,6 +148,7 @@ const isMe = (D, who) => { const me = String((D.today && D.today.me) || '').toLo
136
148
  export function programGroups(D, groups, products, o, now) {
137
149
  const rowsOf = (ws) => { const p = products.find((x) => x.ws === ws); return p ? { name: p.name, rows: (p.model && p.model.initiatives && p.model.initiatives.list && p.model.initiatives.list.rows) || (p.primary ? boardRows(D) : []) } : null; };
138
150
  const pgs = groups.filter((g) => g.kind === 'product');
151
+ const off = unticked(D);
139
152
  const items = pgs.flatMap((g) => g.inis.concat(g.rest).map((r) => ({ id: r.ini, ws: g.product.ws, product: g.name, r, g })));
140
153
  const grouped = groupRows(items, D.programs, { productOf: (x) => x.product, wsOf: (x) => x.ws });
141
154
  const out = [];
@@ -150,16 +163,16 @@ export function programGroups(D, groups, products, o, now) {
150
163
  g.late = g.inis.concat(g.rest).some((i) => i.late);
151
164
  g.closedLine = closedOf(g.count, g.turnN);
152
165
  }
153
- const tasks = (pr.tasks || []).filter((t) => !t.done && (!o.product || !t.ws || products.some((p) => p.key === o.product && p.ws === t.ws))).map((t) => {
166
+ const tasks = (pr.tasks || []).filter((t) => !t.done && !off(t.ws)).map((t) => {
154
167
  const d = t.due ? dayDiff(t.due, now) : null;
155
168
  return { id: 'pt:' + pr.id + ':' + t.key, kind: 'ptask', program: pr.id, key: t.key, ws: t.ws, name: t.title, check: true, state: 'quiet', mine: isMe(D, t.owner), late: d != null && d < 0, due: t.due || '',
156
169
  hint: [t.owner, d == null ? '' : d < 0 ? plural(-d, 'day', 'days') + ' late' : d === 0 ? 'due today' : 'due ' + shortDay(t.due)].filter(Boolean).join(' · ') };
157
170
  });
158
- const subs = ((G && G.products) || []).map((sp) => { const at = products.findIndex((p) => p.name === sp.name); return { name: sp.name, initials: at >= 0 ? products[at].initials : initialsOf(sp.name), tone: Math.max(0, at) % TONES, inis: sp.rows.map((x) => x.r) }; });
171
+ const subs = ((G && G.products) || []).map((sp) => { const at = products.findIndex((p) => p.name === sp.name); return { name: sp.name, initials: at >= 0 ? products[at].initials : initialsOf(sp.name), tone: at >= 0 ? products[at].tone : 0, inis: sp.rows.map((x) => x.r) }; });
159
172
  const inis = subs.flatMap((x) => x.inis);
160
173
  // a program with no open initiative here (just made, or its initiatives all cancelled or archived) still shows, under all products or its
161
- // home product, so the PM finds it and can move initiatives in
162
- const fresh = !o.product || products.some((p) => p.key === o.product && (!pr.home || p.ws === pr.home));
174
+ // home product, so the PM finds it and can move initiatives in; an unticked home product takes it off Home (batch 12 item 5)
175
+ const fresh = !off(pr.home);
163
176
  if (!inis.length && !tasks.length && !fresh) continue;
164
177
  const st = programState(pr, rowsOf, now);
165
178
  const turnN = inis.filter((x) => x.turn).length;
@@ -175,7 +188,7 @@ export function programGroups(D, groups, products, o, now) {
175
188
 
176
189
  /* ── the list ── */
177
190
  const sameName = (a, b) => String(a || '').toLowerCase() === String(b || '').toLowerCase();
178
- /** o: { filter ('today' | 'kept' | 'done'), product (a product key, or null for all), now } */
191
+ /** o: { filter ('today' | 'kept' | 'done'), now }. The products are the ticked ones (productsOf). */
179
192
  export function homeList(D, o = {}) {
180
193
  const now = o.now || D.now || Date.now();
181
194
  const needs = needsOf(D);
@@ -192,7 +205,6 @@ export function homeList(D, o = {}) {
192
205
  ];
193
206
  const groups = [];
194
207
  for (const p of products) {
195
- if (o.product && o.product !== p.key) continue;
196
208
  const rows = (p.model && p.model.initiatives && p.model.initiatives.list && p.model.initiatives.list.rows) || (p.primary ? boardRows(D) : []);
197
209
  const open = rows.filter(OPEN);
198
210
  const ids = new Set(open.map((r) => r.id));
@@ -209,7 +221,7 @@ export function homeList(D, o = {}) {
209
221
  const flat = mineNeeds.filter((x) => !x.ini || !ids.has(x.ini)).filter((x) => !x.needSession).map((x) => ({ ...x, flat: true, hint: bareHint(x) }));
210
222
  const turnN = inis.filter((x) => x.turn).length + flat.length;
211
223
  const shown = inis.filter((x) => x.turn || x.busy);
212
- groups.push({ key: 'p:' + p.key, kind: 'product', product: p, name: p.name, initials: p.initials, tone: products.indexOf(p) % TONES, primary: !!p.primary, goals: p.goals, flat, inis: shown, rest: inis.filter((x) => !shown.includes(x)),
224
+ groups.push({ key: 'p:' + p.key, kind: 'product', product: p, name: p.name, initials: p.initials, tone: p.tone, primary: !!p.primary, goals: p.goals, flat, inis: shown, rest: inis.filter((x) => !shown.includes(x)),
213
225
  count: inis.length, turnN, yours: inis.reduce((n, x) => n + x.yours, 0) + flat.length, late: inis.some((x) => x.late), closedLine: [inis.length ? plural(inis.length, 'initiative', 'initiatives') : '', turnN ? turnN + ' your turn' : ''].filter(Boolean).join(' · ') || 'Nothing open' });
214
226
  }
215
227
  // programs first (program-hierarchy P3): each program takes its initiatives out of their product groups, so an initiative shows once
@@ -218,12 +230,13 @@ export function homeList(D, o = {}) {
218
230
  const looseNeeds = needs.filter((x) => !used.has(x.id) && !(x.ini && groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === x.ini))));
219
231
  const loose = [];
220
232
  for (const x of looseNeeds) loose.push({ ...x, flat: true });
221
- for (const r of tabRows('today')) loose.push({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: [r.overdue ? 'late' : '', String(r.sub || '').replace(/^Yours\b\s*(·\s*)?/, '')].filter(Boolean).join(' · '), check: true, mine: true, late: !!r.overdue, item: r }); // the check box says it is the PM's own: no "your own note" on every row (testing fixes)
233
+ // an item the PM linked to an initiative (the clean-up, batch 13 item 3) sits under that initiative, not here
234
+ for (const r of tabRows('today')) if (!r.ini || !groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === r.ini))) loose.push(itemRow(r));
222
235
  for (const m of todayOf(D).filter((x) => !meetIni(x) && x.state !== 'past')) loose.push(meetRow(m, null));
223
236
  for (const s of (D.sessions || []).filter((s) => listed(s) && !iniOfSession(s) && s.shown !== 'needs' && s.shown !== 'blocked')) loose.push({ ...sessionRow(s, D.desk && D.desk.roles), loose: true });
224
237
  // the folded line's signals (HvAC .lh): a blue dot when a row waits on the PM, an amber square when one of the PM's own is late
225
238
  const lsig = { needs: loose.filter((r) => r.state === 'needs' || r.state === 'blocked').length, sessions: loose.filter((r) => r.kind === 'session' || r.needSession).length, tasks: loose.filter((r) => r.check).length, late: loose.filter((r) => r.check && r.late).length };
226
- if (!o.product || o.product === 'loose') groups.push({ key: 'loose', kind: 'loose', name: 'Not in an initiative', rows: loose, n: loose.length, sig: lsig });
239
+ groups.push({ key: 'loose', kind: 'loose', name: 'Not in an initiative', rows: loose, n: loose.length, sig: lsig });
227
240
  const stale = staleInis(D, now);
228
241
  const untouched = { n: stale.length + ((W && W.review && W.review.n) || 0), inis: stale.length, items: (W && W.review && W.review.n) || 0, day: new Date(now).getDay() === REVIEW_DAY ? 'today' : 'Fri' };
229
242
  // a filter other than Today shows one plain list from the PM's own list (the items carry no initiative)
@@ -242,6 +255,41 @@ export function homeList(D, o = {}) {
242
255
  counts: { products: products.length, initiatives: nIni } };
243
256
  }
244
257
 
258
+ /* ── the clean-up of "Not in an initiative" (batch 13 item 3; lib/loose-proposals.js, pm/loose-props.js) ── */
259
+ const tsOf = (v) => { const n = typeof v === 'number' ? v : Date.parse(v || ''); return Number.isFinite(n) && n > 0 ? n : 0; };
260
+ const normTitle = (t) => String(t || '').toLowerCase().replace(/\s+/g, ' ').trim();
261
+ /** What the server keeps of the loose group, so Claude's run and the ✦ read what Home shows: { rows, inis }.
262
+ * rows: [{ id, kind, title, at, waits?, late?, sids?, key?, words?, item?, event?, daily? }] (a next step from the brief is left out: it has
263
+ * no record to link). inis: the open initiatives of every product on Home, with what a new one there needs ({ id, title, ws, board, anchor }). */
264
+ export function looseSnapshot(M, D) {
265
+ const g = (M && M.groups || []).find((x) => x.kind === 'loose');
266
+ const S = (D && D.sessions) || [];
267
+ const rows = [], seen = new Set();
268
+ for (const r of (g && g.rows) || []) {
269
+ let x = null;
270
+ if (r.kind === 'session' && r.sid) {
271
+ const key = r.key || null, mine = S.filter((s) => (key ? keyOfSession(s) === key : s.id === r.sid));
272
+ const at = Math.max(0, ...mine.map((s) => Math.max(tsOf(s.touched_at), tsOf(s.exited_at), s.shown !== 'exited' && s.state !== 'exited' ? tsOf(s.lastOutputAt) : 0, tsOf(s.created))));
273
+ const me = S.find((s) => s.id === r.sid) || {};
274
+ x = { id: key ? 'c:' + key : 's:' + r.sid, kind: 'session', title: r.name, at: at ? new Date(at).toISOString() : '', sids: (mine.length ? mine : [me]).map((s) => s.id).filter(Boolean), ...(key ? { key } : {}),
275
+ ...(r.state === 'needs' || r.state === 'blocked' ? { waits: true } : {}), ...(me.lastWords ? { words: String(me.lastWords).slice(0, 240) } : {}) };
276
+ } else if (r.kind === 'item' && r.item && r.item.id) {
277
+ x = { id: 'w:' + r.item.id, kind: 'item', title: r.name, at: r.item.at || '', item: r.item.id, ...(r.late ? { late: true } : {}) };
278
+ } else if (r.kind === 'meeting' && r.meeting) {
279
+ const m = r.meeting;
280
+ x = { id: 'm:' + (m.series ? 's:' + m.series : 't:' + normTitle(m.title)), kind: 'meeting', title: r.name, at: m.start || '', event: { title: m.title, ...(m.series ? { series: m.series } : {}) }, ...(m.series ? { daily: 'Repeats' } : {}) };
281
+ }
282
+ if (x && !seen.has(x.id)) { seen.add(x.id); rows.push(x); }
283
+ }
284
+ const inis = [], have = new Set();
285
+ for (const p of (M && M.products) || []) {
286
+ const b = (p.model && p.model.board) || (p.primary && D && D.board && D.board.board) || {};
287
+ const list = (p.model && p.model.initiatives && p.model.initiatives.list && p.model.initiatives.list.rows) || (p.primary ? boardRows(D) : []);
288
+ for (const r of list.filter(OPEN)) if (r && r.id && !have.has(r.id)) { have.add(r.id); inis.push({ id: r.id, title: r.title || r.id, ws: p.ws || b.ws || '', board: b.id || '', anchor: r.anchor || '' }); }
289
+ }
290
+ return { rows, inis };
291
+ }
292
+
245
293
  /* ── Your move (HvAOpen) ── */
246
294
  /** Every row that is the PM's move, in one list for the Your day sheet: the PM's own late tasks and items first, then each next step and
247
295
  * waiting session in the list's order. A row keeps its list id, so a press opens what the list row opens. Each row:
@@ -254,7 +302,7 @@ function moveOf(groups, needs) {
254
302
  for (const t of g.tasks || []) if (t.mine && t.late) put(late, t, g.name);
255
303
  if (g.msRow) put(rest, g.msRow, g.msRow.hint);
256
304
  for (const r of g.flat || []) put(rest, r, '');
257
- for (const i of (g.inis || []).concat(g.rest || [])) for (const k of i.kids.concat(i.tasks || [])) if (isMove(k)) put(k.kind === 'task' ? late : rest, k, i.name);
305
+ for (const i of (g.inis || []).concat(g.rest || [])) for (const k of i.kids.concat(i.tasks || [])) if (isMove(k)) put(k.kind === 'task' || k.kind === 'item' ? late : rest, k, i.name);
258
306
  }
259
307
  for (const r of needs) if (!seen.has(r.id) && !r.needSession) put(rest, r, r.kind === 'session' ? '' : bareHint(r));
260
308
  return late.concat(rest);
@@ -8,7 +8,6 @@
8
8
  * keys and swipe on the rows (GET /api/my-work-premium; the /api/pm-items, /api/pm-jobs and /api/my-work presses)
9
9
  * openAround(key?) home-around.js: Around you is gone (premium-uncovered-features, HmAround); its views stay, opened from New for you
10
10
  * openEndOfDay() GET /api/phone-day: what finished today, the recap and tomorrow's meetings
11
- * openProducts() which products Home reads (GET /api/briefing-premium products, POST /api/settings ws.briefing.include)
12
11
  * openSearch(go) the designed Search (pm/cozy-search.js, E1): the repository and every worktree
13
12
  * openInbox(go) New for you (pm/cozy-news.js, E2), which replaces the agents' results
14
13
  * openRecorder() a note recorded now with no calendar event (the Viewer's newNote, else POST /api/notes/new)
@@ -32,7 +31,7 @@ function card(o, draw) {
32
31
  }
33
32
 
34
33
  export const moreItems = [
35
- ['eod', 'End of the day', 'cal'], ['cal', 'Calendar', 'cal'], ['rec', 'Record a note', 'mic'], ['products', 'Products', 'chart'],
34
+ ['eod', 'End of the day', 'cal'], ['cal', 'Calendar', 'cal'], ['rec', 'Record a note', 'mic'],
36
35
  ];
37
36
 
38
37
  /** The ⋯ list itself in the Viewer, for a page with no menu of its own: items are [label, open]. */
@@ -86,35 +85,7 @@ export function openEndOfDay() {
86
85
  return body;
87
86
  }
88
87
 
89
- /* ── Products ── */
90
- export function openProducts() {
91
- const M = { P: null, head: '', msg: '' };
92
- const one = new URLSearchParams(location.search).get('ws'); // Home narrowed to one workspace (?ws=): a way back to the picked products
93
- const draw = (b) => {
94
- const P = M.P, on = P ? P.available.filter((x) => x.on).length : 0;
95
- b.innerHTML = WAIT + (M.head ? `<p class="hx-n" id="hxSnap">${esc(M.head)}</p>` : '')
96
- + (one ? '<p class="hx-n">Home shows one workspace now. <a id="pickAll" href="/premium.html">All picked products</a></p>' : '')
97
- + (!P ? '<p class="hx-n">Reading the products.</p>' : !P.available.length ? '<p class="hx-n">No product workspace is registered.</p>'
98
- : sec('Home reads', `<p class="hx-n" id="hxCount">Products ${on} of ${P.available.length}</p>` + P.available.map((x) => row(x.name, x.home ? 'home' : '', `<button type="button" class="hx-sw" role="switch" aria-checked="${!!x.on}" aria-label="${esc(x.name)}${x.home ? ' (home)' : ''}" data-ws="${esc(x.ws)}">${x.on ? 'On' : 'Off'}</button>`)).join('') + btn('Back to the default', 'data-reset="1"')))
99
- + `<p class="hx-n" role="status">${esc(M.msg)}</p>`;
100
- };
101
- const body = card({ id: 'products', kind: 'Products', title: 'Which products Home reads', icon: 'chart' }, draw);
102
- const read = async () => {
103
- const r = await pmGet('/api/briefing-premium');
104
- M.P = r && r.ok && r.model ? r.model.products || { available: [] } : { available: [] };
105
- M.head = r && r.ok && r.model && r.model.header ? r.model.header.text : ''; // what is read and what is not, from the records
106
- if (body.isConnected) draw(body);
107
- };
108
- body.onclick = async (e) => {
109
- const t = e.target.closest('button'); if (!t || !M.P) return;
110
- const on = M.P.available.filter((x) => x.on).map((x) => x.ws);
111
- const r = await pmPost('/api/settings', t.dataset.reset ? { key: 'ws.briefing.include', reset: true } : { key: 'ws.briefing.include', value: on.includes(t.dataset.ws) ? on.filter((x) => x !== t.dataset.ws) : on.concat(t.dataset.ws) });
112
- M.msg = r && r.ok ? 'Saved. Home reads the products you picked.' : (r && r.error) || 'Not saved.';
113
- read(); window.dispatchEvent(new CustomEvent('hm:reload'));
114
- };
115
- read();
116
- return body;
117
- }
88
+ /* ── Products ── gone (batch 12 item 5): the product chip on Home, Board and Insights is the one picker (pm/cozy-pick.js) */
118
89
 
119
90
  /* ── Search ── the designed palette (pm/cozy-search.js); go is the page's own opener for an initiative ({ ini }), a session ({ ses }) or a file ({ doc }) */
120
91
  export function openSearch(go) { return import('./cozy-search.js').then((M) => M.openSearch({ go })); }
@@ -12,6 +12,7 @@
12
12
 
13
13
  import { STEPS } from './premium-initiative-head.js';
14
14
  import { whenOf } from './home-list.js';
15
+ import { chipHtml } from './cozy-pick.js'; // the one product picker Home, Board and Insights share (batch 12 item 5)
15
16
  import { ringHtml } from './home-line.js';
16
17
  import { gripHtml, sugHtml } from './prog-order.js'; // a program's order: the grip and ✦ (canvas RoADrag, RoAPhone)
17
18
 
@@ -56,14 +57,14 @@ const MS = '<span class="hv-ms" role="img" aria-label="Milestone" title="Milesto
56
57
  /** A row of the list: a next step, a task, a note, a mention, a session or a meeting. o: { sel, kid } */
57
58
  export function rowHtml(r, o) {
58
59
  const sel = o.sel === r.id;
59
- const cls = ['hm-r', 'hv-r', o.kid ? 'kid' : '', o.sub ? 'two' : '', sel ? 'sel' : '', 'st-' + (r.state || 'quiet'), r.kind === 'task' ? 'task' : '', r.kind === 'item' ? 'item' : '', r.done ? 'done' : ''].filter(Boolean).join(' ');
60
+ const cls = ['hm-r', 'hv-r', o.kid ? 'kid' : '', o.sub ? 'two' : '', o.safe ? 'safe' : '', sel ? 'sel' : '', 'st-' + (r.state || 'quiet'), r.kind === 'task' ? 'task' : '', r.kind === 'item' ? 'item' : '', r.done ? 'done' : ''].filter(Boolean).join(' ');
60
61
  const lead = isCheck(r) ? checkHtml(r) : '';
61
62
  // ending a session and putting a next step off stay on the row, shown on the row that is open (the frame draws neither)
62
63
  const end = !sel ? '' : r.kind === 'session' && r.sid ? `<button type="button" class="ut-ib hm-x" data-hm-end="${esc(r.id)}" aria-label="End ${esc(r.name)}" title="End this session">${svg(P.x, 14)}</button>`
63
64
  : r.kind === 'need' && r.row && r.row.kind !== 'source' ? `<button type="button" class="ut-ib hm-x" data-hm-end="${esc(r.id)}" aria-label="Put off ${esc(r.name)} until tomorrow" title="Put off until tomorrow">${svg(P.x, 14)}</button>` : '';
64
65
  const link = r.link && r.kind === 'loose-rec' ? '<span class="hv-st">Link it</span>' : '';
65
66
  return `<div class="${cls}" data-id="${esc(r.id)}">${lead}<button type="button" class="hm-rm" data-hm-sel="${esc(r.id)}"${sel ? ' aria-current="true"' : ''}${r.hint ? ` title="${esc(r.hint)}"` : ''}>${lead ? '' : markHtml(r)}`
66
- + `<span class="hm-rt${r.ms ? ' ms' : ''}"><b>${esc(r.name)}</b>${r.ms ? MS : ''}${o.sub ? `<em>${esc(o.sub)}</em>` : ''}</span>${o.sub ? '' : clock(r.when || whenOf(r))}${link}</button>${end}</div>`;
67
+ + `<span class="hm-rt${r.ms ? ' ms' : ''}"><b>${esc(r.name)}</b>${r.ms ? MS : ''}${o.sub ? `<em>${o.safe ? '<i class="hm-sv" aria-hidden="true">✦</i>' : ''}${esc(o.sub)}</em>` : ''}</span>${o.sub ? '' : clock(r.when || whenOf(r))}${link}</button>${end}${o.act || ''}</div>`;
67
68
  }
68
69
  /** The chat's header line on a desktop (HvACDesk .ch): the open row's mark, its title and the chip of where it sits (the initiative's stage
69
70
  * track and name, or the program's tile and name). h: { row, title, scope, at, stage, prog }. A chip that repeats the title is left out, and
@@ -85,14 +86,20 @@ export function chatHeadHtml(h) {
85
86
  * when one is blocked, a ring when one runs, a clock for a meeting today, else a grey dot. A press lists them right under the pill (a sheet on
86
87
  * a phone), each with its mark and one quiet line; a press on one opens it as the nested row did; + starts a new session in the initiative. */
87
88
  const RANKED = ['needs', 'blocked', 'working', 'meeting', 'quiet'];
88
- const kidState = (k) => (k.kind === 'meeting' && k.state !== 'working' ? 'meeting' : k.step ? 'needs' : RANKED.includes(k.state) ? k.state : 'quiet');
89
+ const kidState = (k) => (k.kind === 'meeting' && k.state !== 'working' ? 'meeting' : k.step || (k.kind === 'item' && k.late) ? 'needs' : RANKED.includes(k.state) ? k.state : 'quiet');
89
90
  const KID_WORD = { needs: 'Asks you', blocked: 'Blocked, asks you', working: 'Running', quiet: 'Open' };
90
91
  /** The quiet line under one row of the list: what it is and where it stands, in words (the mark says it again by shape). */
91
92
  export function kidSub(k) {
92
93
  if (k.kind === 'meeting') return k.hint || 'Meeting';
93
94
  if (k.step) return k.hint || 'Next step';
95
+ if (k.kind === 'session' && k.close) return k.close.say; // idle: why it is safe to close, or what holds it (batch 13 item 7)
94
96
  return [KID_WORD[kidState(k)] || 'Open', k.kind === 'session' && k.hint ? k.hint : ''].filter(Boolean).join(' · ');
95
97
  }
98
+ /** What Claude proposes on one row of the list (canvas XcsA1Pill): a session idle and safe to close gets the ✦ in its line and one ✓. One ✦ a row. */
99
+ export function kidActHtml(k) {
100
+ if (!(k && k.kind === 'session' && k.close && k.close.safe && k.sid)) return '';
101
+ return `<button type="button" class="ut-ib hv-ib hm-cls" data-hm-close="${esc(k.sid)}" aria-label="Close this session; Claude says it is idle and safe" title="Close this session; Claude says it is idle and safe">${svg(P.check, 16)}</button>`;
102
+ }
96
103
  /** The pill's model: the most urgent state, the count and its accessible words. Nothing in the initiative: null (zero is silence). */
97
104
  export function pillOf(r) {
98
105
  const kids = (r && r.kids) || [];
@@ -115,7 +122,7 @@ function pillHtml(r, o) {
115
122
  /** The list behind the pill: the rows that used to nest, waiting first, then + for a new session here. */
116
123
  function sesListHtml(r, o) {
117
124
  const kids = r.kids.slice().sort((a, b) => RANKED.indexOf(kidState(a)) - RANKED.indexOf(kidState(b)));
118
- return kids.map((k) => rowHtml(k, { ...o, kid: false, sub: kidSub(k) })).join('')
125
+ return kids.map((k) => rowHtml(k, { ...o, kid: false, sub: kidSub(k), act: kidActHtml(k), safe: !!(k.close && k.close.safe) })).join('')
119
126
  + `<div class="hv-spf"><button type="button" class="ut-ib hv-ib" data-hm-sesnew="${esc(r.ini || '')}" aria-label="New session in ${esc(r.name)}" title="New session here">${svg(P.plus, 18)}</button></div>`;
120
127
  }
121
128
  /** On a phone the list is a sheet over Home (as Your day was): the initiative's name and stage track on top. M is homeList(). */
@@ -189,10 +196,14 @@ function looseHtml(g, o) {
189
196
  const open = o.pOpen(g), S2 = g.sig || {};
190
197
  const say = [S2.sessions ? plural(S2.sessions, 'session', 'sessions') + (S2.needs ? ', ' + S2.needs + ' waits on you' : '') : S2.needs ? S2.needs + ' waits on you' : '', S2.tasks ? plural(S2.tasks, 'task', 'tasks') + (S2.late ? ', ' + S2.late + ' late' : '') : ''].filter(Boolean).join('; ') || String(g.n);
191
198
  const sig = open ? '' : (S2.needs ? '<span class="hv-d sm" aria-hidden="true"></span>' : '') + (S2.late ? '<span class="hv-lt" aria-hidden="true"></span>' : '') + g.n;
192
- return `<section class="hm-pg hv-g loose" aria-label="${esc(g.name)}"><button type="button" class="hv-lh" data-hm-pg="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(g.name)}: ${esc(say)}. ${open ? 'Close' : 'Open'}">${esc(g.name)}<span class="n">${sig}${svg(open ? P.chevD : P.chevR, 15)}</span></button>`
199
+ // the blue ✦ and the number of rows Claude proposes to place (batch 13 item 3, XlcA1Desk): only when it has some (zero is silence)
200
+ const c = g.chip && g.chip.n ? g.chip : null;
201
+ const chip = c ? `<button type="button" class="lp-chip" data-lp-open aria-haspopup="dialog" aria-label="${esc(c.label)}" title="Claude proposes a clean-up">${svg(SPARK, 13)}<b>${c.n}</b></button>` : '';
202
+ return `<section class="hm-pg hv-g loose" aria-label="${esc(g.name)}"><div class="hv-lhw${chip ? ' has-chip' : ''}"><button type="button" class="hv-lh" data-hm-pg="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(g.name)}: ${esc(say)}. ${open ? 'Close' : 'Open'}">${esc(g.name)}<span class="n"><span class="nl">${sig}</span>${svg(open ? P.chevD : P.chevR, 15)}</span></button>${chip}</div>`
193
203
  + (open ? `<div class="hv-card">${g.rows.map((r) => rowHtml(r, o)).join('')}</div>` : '') + '</section>';
194
204
  }
195
205
  const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many);
206
+ const SPARK = 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z';
196
207
 
197
208
  /* ── the Today card ── */
198
209
  /** The other meetings on now or close (T.also): one quiet line each under the card's buttons, with icon-only Open and Record. Each press
@@ -241,13 +252,12 @@ export function todayHtml(T, o) {
241
252
  const MONTH = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
242
253
  const WEEKDAY = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
243
254
  const MOMENT = new Set(['rec', 'soon', 'live', 'eod', 'review']);
244
- /** M is homeList(); T todayCard(); o: { sel, ses (the initiative row whose pill is open), pOpen, restOpen, pin, avHtml, ready, err, product (the picked key), review, phone, day (Your day is open) } */
255
+ /** M is homeList(); T todayCard(); o: { sel, ses (the initiative row whose pill is open), pOpen, restOpen, pin, avHtml, ready, err, pick (GET /api/briefing-premium/products), tones, review, phone, day (Your day is open) } */
245
256
  export function listHtml(M, T, o) {
246
- const many = M.products.length > 1;
247
- const picked = o.product ? M.products.find((p) => p.key === o.product) : null;
248
257
  const flt = M.filter !== 'today' ? M.filters.find((f) => f.key === M.filter) : null;
249
258
  const head = `<div class="hm-hd hv-bar"><button type="button" class="hv-hi" data-hm-day aria-expanded="${!!o.day}" aria-label="${esc(M.word || 'Today')}. Open your day"><b>${esc(M.word || 'Today')}</b>${svg(P.chevD, 18)}</button>`
250
- + (many ? `<button type="button" class="hv-pk" data-hm-pick aria-haspopup="menu" aria-expanded="false" aria-label="Switch product">${esc(picked ? picked.name : 'All')}${svg(P.chevD, 14)}</button>` : '')
259
+ // the product chip, always (it is also the way to add one): the ticked products' tiles, or All (canvas XhpA2States)
260
+ + (o.pick ? chipHtml(o.pick, { id: 'hmPick', attrs: 'data-hm-pick', label: 'Products on Home', tones: o.tones }) : '')
251
261
  + (o.phone ? '' : `<button type="button" class="ut-ib hv-ib${flt ? ' on' : ''}" data-hm-flt aria-haspopup="menu" aria-label="Show: Today, Kept or Done${flt ? '. Now ' + esc(flt.label) : ''}" title="Show: Today, Kept or Done">${svg(P.filter, 18)}</button>`)
252
262
  + `<button type="button" class="ut-ib hv-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 20)}</button></div>`
253
263
  + (M.yours ? `<p class="hv-sub">${M.yours} ${M.yours === 1 ? 'is' : 'are'} yours</p>` : '');
@@ -212,7 +212,10 @@ export function timelineHtml(v, o, isOpen) {
212
212
  for (const t of tk) h += row(`${tkMark(t)}${tkTitle(t)}`, '', ' k');
213
213
  for (const k of jr) h += row(`${jmark(k)}${ttitle(k)}`, jbar(k), ' k');
214
214
  for (const x of rs) h += row(`${box(x, o)}${title(x, o)}`, barOf(x), ' k');
215
- if (dn_.length) {
215
+ // a stage with nothing open lists its done tasks straight away, as the List does: no "Done" fold inside the stage's own fold
216
+ // (PM, 2026-10-27: "Grouping 'Done' items is confusing")
217
+ if (dn_.length && !rs.length && !jr.length && !tk.length) for (const x of dn_) h += row(`${box(x, o)}${title(x, o)}`, barOf(x), ' k x' + (x.wont ? ' wo' : ''));
218
+ else if (dn_.length) {
216
219
  const dk = (sec.key || 'none') + ':done', dop = isOpen(dk, false);
217
220
  h += row(`<button type="button" class="ivt-df" data-iv-fold="${esc(dk)}" aria-expanded="${dop}">Done<span class="n">${dn_.length}</span><span class="iv-cv" aria-hidden="true">${SVG(dop ? P.down : P.right, 14, 2)}</span></button>`, dop ? '' : dn_.map(barOf).join(''), ' k');
218
221
  if (dop) for (const x of dn_) h += row(`${box(x, o)}${title(x, o)}`, barOf(x), ' k x' + (x.wont ? ' wo' : ''));
@@ -64,7 +64,7 @@ export function liveItems(sessions, o = {}) {
64
64
  const out = [];
65
65
  const rec = o.rec;
66
66
  if (rec && rec.on && !rec.here) {
67
- out.push({ id: 'rec:' + rec.id, kind: 'rec', mark: 'rec', name: rec.title || 'Meeting', sub: 'Meeting', time: clock(elapsed(rec, now)), at: now, href: rec.href || '/premium.html', paused: !!rec.paused, open: false });
67
+ out.push({ id: 'rec:' + rec.id, kind: 'rec', mark: 'rec', name: rec.title || 'Meeting', sub: rec.silent ? 'Not hearing the meeting' : 'Meeting', time: clock(elapsed(rec, now)), at: now, href: rec.href || '/premium.html', paused: !!rec.paused, open: false });
68
68
  }
69
69
  const rows = [];
70
70
  for (const s of Array.isArray(sessions) ? sessions : []) {
@@ -0,0 +1,54 @@
1
+ /* pm/loose-props.css — Claude's clean-up of Home's "Not in an initiative" (batch 13 item 3; canvas XlcA1Desk, XlcA3Sheet, XlcA4Pick).
2
+ * Every class here starts with lp-. The ✦ on the group's header, then the Viewer's body. Colours are the cozy tokens, so dark mode follows. */
3
+ .hv-lhw { position: relative; }
4
+ .hv-lhw.has-chip .hv-lh .nl { margin-right: 64px; }
5
+ .hv-lhw.has-chip .hv-lh .nl:empty { margin-right: 58px; }
6
+ .lp-chip { position: absolute; right: 34px; top: calc(50% + 6px); transform: translateY(-50%); display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; border: 1.5px solid var(--cz-blue); background: var(--cz-card); color: var(--cz-blueink); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
7
+ .lp-chip:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
8
+ @media (hover: hover) { .lp-chip:hover { background: var(--cz-bluebg); } }
9
+ @media (max-width: 760px) { .lp-chip { height: 32px; } .lp-chip::after { content: ''; position: absolute; inset: -6px; } }
10
+
11
+ .lp { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 24px; }
12
+ .lp-intro { margin: 2px 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--cz-ink2); max-width: 600px; }
13
+ .lp-sec h4 { margin: 8px 0 2px; font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); }
14
+ .lp-p { padding: 4px 0; }
15
+ .lp-ph { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; }
16
+ .lp-ph .w, .lp-r .w, .lp-hr .w { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
17
+ .lp-ph b { font-size: 14px; font-weight: 800; color: var(--cz-ink); }
18
+ .lp-ph small, .lp-r small, .lp-hr small { font-size: 12.5px; color: var(--cz-ink2); line-height: 1.4; display: inline-flex; align-items: center; gap: 4px; }
19
+ .lp-ic { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-blueink); flex: none; margin-top: 1px; }
20
+ .lp-ib { all: unset; box-sizing: border-box; cursor: pointer; width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink2); flex: none; }
21
+ .lp-ib.ok { color: var(--cz-blueink); }
22
+ .lp-ib:focus-visible, .lp-tile:focus-visible, .lp-more:focus-visible, .lp-pick button:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
23
+ .lp-ib:disabled { opacity: .45; cursor: default; }
24
+ @media (hover: hover) { .lp-ib:hover { background: var(--cz-well); color: var(--cz-ink); } }
25
+ .lp-rows { display: flex; flex-direction: column; margin: 2px 0 6px 12px; padding-left: 22px; border-left: 2px solid var(--cz-hair); }
26
+ .lp-r { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 0; }
27
+ .lp-r b { font-size: 13.5px; font-weight: 600; color: var(--cz-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
28
+ .lp-r.out b { text-decoration: line-through; color: var(--cz-ink3); }
29
+ .lp-mk { width: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); margin-left: -4px; }
30
+ .lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-blue); display: inline-block; }
31
+ .lp-late { width: 9px; height: 9px; border-radius: 2px; background: var(--cz-risk); display: inline-block; }
32
+ .lp-tile { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px 0 8px; border-radius: 999px; background: var(--cz-well); color: var(--cz-blueink); flex: none; }
33
+ .lp-tile b { font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
34
+ .lp-tile.on { box-shadow: 0 0 0 1.5px var(--cz-blue); background: var(--cz-card); }
35
+ .lp-tile.moved { background: var(--cz-bluebg); }
36
+ .lp-more { all: unset; box-sizing: border-box; cursor: pointer; min-height: 36px; padding: 6px 0; font-size: 12.5px; font-weight: 700; color: var(--cz-blueink); }
37
+ .lp-pick { align-self: flex-end; margin: 0 0 6px; width: min(330px, 100%); background: var(--cz-card); border-radius: 18px; box-shadow: 0 24px 60px -24px rgba(42,46,53,.45), 0 0 0 1px var(--cz-hair); padding: 6px; display: flex; flex-direction: column; }
38
+ .lp-pick p { margin: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--cz-ink3); }
39
+ .lp-pick button { all: unset; box-sizing: border-box; cursor: pointer; min-height: 44px; padding: 6px 10px; border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--cz-ink); }
40
+ .lp-pick button .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
41
+ .lp-pick button[aria-checked="true"] { background: var(--cz-well); }
42
+ .lp-pick button[aria-checked="true"] svg { color: var(--cz-blueink); }
43
+ .lp-pick button.nw { color: var(--cz-ink2); font-weight: 600; }
44
+ @media (hover: hover) { .lp-pick button:hover { background: var(--cz-well); } }
45
+ .lp-tl { width: 26px; height: 26px; border-radius: 8px; background: var(--cz-bluebg); color: var(--cz-blueink); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; flex: none; }
46
+ .lp-pick .nw .lp-tl { background: none; color: var(--cz-ink3); }
47
+ .lp-hist { margin-top: 8px; border-top: 1px solid var(--cz-hair); padding-top: 6px; }
48
+ .lp-hist summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); list-style: none; }
49
+ .lp-hist summary::-webkit-details-marker { display: none; }
50
+ .lp-hist summary:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; border-radius: 8px; }
51
+ .lp-hr { display: flex; align-items: center; gap: 8px; min-height: 44px; }
52
+ .lp-hr b { font-size: 13px; font-weight: 700; color: var(--cz-ink); }
53
+ .lp-hr.undone b { color: var(--cz-ink3); }
54
+ @media (max-width: 760px) { .lp { padding: 0 12px 24px; } .lp-ib { width: 40px; height: 40px; } .lp-rows { margin-left: 4px; padding-left: 12px; } }