create-pmos 0.401.0 → 0.402.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 (51) hide show
  1. package/package.json +13 -18
  2. package/payload/KIT-VERSION +2 -2
  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/payload/state/log.md +1 -1
  7. package/workspace/board-programs-test.js +226 -0
  8. package/workspace/board-shot.js +54 -0
  9. package/workspace/briefing-premium-board-test.js +22 -15
  10. package/workspace/briefing-premium-calendar-test.js +6 -3
  11. package/workspace/briefing-premium-sources-test.js +15 -10
  12. package/workspace/briefing-premium-test.js +38 -16
  13. package/workspace/changelog.json +12 -0
  14. package/workspace/fixtures/board-premium-facts.js +20 -3
  15. package/workspace/fixtures/briefing-premium-facts.js +18 -2
  16. package/workspace/fixtures/program-ascent.js +101 -0
  17. package/workspace/guide/home.md +11 -7
  18. package/workspace/guide/index.md +1 -0
  19. package/workspace/guide/programs.md +37 -0
  20. package/workspace/lib/briefing-premium-products.js +4 -4
  21. package/workspace/lib/briefing-premium.js +2 -2
  22. package/workspace/lib/programs.js +129 -0
  23. package/workspace/lib/route-modules.js +1 -0
  24. package/workspace/lib/routes-briefing-premium.js +1 -1
  25. package/workspace/lib/routes-programs.js +122 -0
  26. package/workspace/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/premium-board-actions-test.js +1 -1
  29. package/workspace/premium-vw-cal-test.js +6 -3
  30. package/workspace/program-panel-test.js +143 -0
  31. package/workspace/public/pm/bd-acts.js +23 -14
  32. package/workspace/public/pm/bd-asks.js +89 -23
  33. package/workspace/public/pm/bd-prog-panel.js +451 -0
  34. package/workspace/public/pm/bd-prog.js +191 -0
  35. package/workspace/public/pm/bd-span.js +98 -15
  36. package/workspace/public/pm/bd-views.js +93 -29
  37. package/workspace/public/pm/cozy-board.css +226 -9
  38. package/workspace/public/pm/cozy-home.css +26 -0
  39. package/workspace/public/pm/cozy-panel.css +178 -0
  40. package/workspace/public/pm/cozy-today.css +189 -0
  41. package/workspace/public/pm/home-app.js +75 -19
  42. package/workspace/public/pm/home-chat.js +8 -4
  43. package/workspace/public/pm/home-data.js +1 -1
  44. package/workspace/public/pm/home-list.js +98 -17
  45. package/workspace/public/pm/home-today.js +137 -59
  46. package/workspace/public/pm/premium-board.js +225 -57
  47. package/workspace/public/pm/program-model.js +192 -0
  48. package/workspace/public/premium-board.html +4 -1
  49. package/workspace/test-lists/board-programs.json +9 -0
  50. package/workspace/test-lists/program-hierarchy.json +11 -0
  51. package/workspace/test-lists/program-panel.json +9 -0
@@ -0,0 +1,178 @@
1
+ /* cozy-panel.css — the program panel on the Board (initiative program-hierarchy, P5, P9; canvas PgProgram, PgMilestones), drawn by
2
+ * pm/bd-prog-panel.js. It sits in the Board's side panel (.bd-peek in cozy-board.css: its place, its 60 % width and the phone sheet) and
3
+ * builds on pm/cozy.css's tokens only. Every class here starts with pp-, or is a part of the side panel (pk-) scoped under .pp-peek. */
4
+
5
+ /* the program's purple (PgProgram --prog / --progbg), light and dark */
6
+ body.bd-page { --pp-prog: var(--cz-c-6b4fa3); --pp-progbg: var(--cz-c-f1ecf8); --pp-diam: rgba(107,79,163,.32); --pp-amber: var(--cz-c-d4a13a); }
7
+ html[data-theme="dark"] body.bd-page { --pp-prog: var(--cz-c-b07cc6); --pp-progbg: rgba(176,124,198,.16); --pp-diam: rgba(176,124,198,.4); }
8
+ @media (prefers-color-scheme: dark) { html:not([data-theme="light"]) body.bd-page { --pp-prog: var(--cz-c-b07cc6); --pp-progbg: rgba(176,124,198,.16); --pp-diam: rgba(176,124,198,.4); } }
9
+ /* the products' tiles: blue, warm, grey; dark mode takes their tints */
10
+ body.bd-page { --pp-t0: var(--cz-c-e8f1fb); --pp-t0i: var(--cz-blueink); --pp-t1: var(--cz-c-f4eee6); --pp-t1i: var(--cz-c-7a5a2e); }
11
+ html[data-theme="dark"] body.bd-page { --pp-t0: rgba(106,170,240,.16); --pp-t1: rgba(232,160,122,.16); --pp-t1i: var(--cz-c-e8a07a); }
12
+ @media (prefers-color-scheme: dark) { html:not([data-theme="light"]) body.bd-page { --pp-t0: rgba(106,170,240,.16); --pp-t1: rgba(232,160,122,.16); --pp-t1i: var(--cz-c-e8a07a); } }
13
+
14
+ /* the head: the program icon, "title · goal", the owner and the span, and four icon buttons */
15
+ .pp-peek .pp-h { padding: 20px 16px 12px 20px; gap: 12px; }
16
+ .pp-peek .pp-h > .pk-tools { position: static; } /* the head is one row, as PgProgram draws it */
17
+ .pp-peek .pp-h h2 { margin: 0; font-size: 19px; }
18
+ .pp-pi { width: 40px; height: 40px; border-radius: 12px; background: var(--pp-progbg); color: var(--pp-prog); display: inline-flex; align-items: center; justify-content: center; flex: none; }
19
+ .pp-pi svg { width: 20px; height: 20px; }
20
+ .pp-ch { margin: 2px 0 0; font-size: 12.5px; color: var(--cz-ink3); }
21
+ .pp-peek .pk-tools a.bd-ib { color: var(--cz-ink2); }
22
+ .pp-b { gap: 14px; padding-top: 0; }
23
+ .pp-sec { display: flex; flex-direction: column; }
24
+ .pp-sec .lbl { font-size: 12px; font-weight: 800; color: var(--cz-ink3); margin: 0 0 6px; }
25
+
26
+ /* the menus: ⋯ (add, move in, archive) and the period picker */
27
+ .pp-menu { position: absolute; z-index: 3; top: 52px; right: 16px; min-width: 240px; max-height: 60vh; overflow: auto; 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; }
28
+ .pp-menu button { all: unset; box-sizing: border-box; cursor: pointer; min-height: 36px; padding: 8px 12px; border-radius: 12px; font-size: 13px; color: var(--cz-ink); display: flex; justify-content: space-between; gap: 12px; }
29
+ .pp-menu button span { color: var(--cz-ink3); font-weight: 600; }
30
+ .pp-menu button[aria-checked="true"] { background: var(--cz-well); font-weight: 700; }
31
+ .pp-menu button:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; }
32
+ @media (hover: hover) { .pp-menu button:hover { background: var(--cz-well); } }
33
+ .pp-menu .pp-mx { color: var(--cz-red); border-top: 1px solid var(--cz-hair); border-radius: 0 0 12px 12px; margin-top: 4px; }
34
+ .pp-mh { margin: 6px 12px 2px; font-size: 11.5px; font-weight: 800; color: var(--cz-ink3); }
35
+ .pp-pmenu { top: 34px; left: 0; right: auto; min-width: 160px; }
36
+
37
+ /* the goals: the KRs of one year half; earlier halves fold into one ghost chip */
38
+ .pp-goal { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
39
+ .pp-per { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 6px 0 2px; font-size: 12px; font-weight: 800; color: var(--cz-ink2); }
40
+ button.pp-per { cursor: pointer; }
41
+ .pp-per svg { width: 12px; height: 12px; }
42
+ .pp-kr { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--cz-well); font-size: 12px; color: var(--cz-ink2); white-space: nowrap; }
43
+ .pp-kr b { font-weight: 800; color: var(--cz-ink); }
44
+ button.pp-kr { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; }
45
+ .pp-kr.ghost { background: transparent; border: 1px dashed var(--cz-hair); border-color: rgba(42,46,53,.18); color: var(--cz-ink3); font-weight: 700; }
46
+ .pp-gd { width: 7px; height: 7px; border-radius: 50%; background: var(--cz-dot-ok); flex: none; } /* PgProgram .gdot: met or on course */
47
+ .pp-gd.off { background: var(--cz-dot-late); } /* behind */
48
+ .pp-t2 { width: 18px; height: 18px; border-radius: 6px; font-size: 8.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
49
+ .pp-t2.t0 { background: var(--pp-t0); color: var(--pp-t0i); }
50
+ .pp-t2.t1 { background: var(--pp-t1); color: var(--pp-t1i); }
51
+ .pp-t2.t2 { background: var(--cz-well2); color: var(--cz-ink2); }
52
+
53
+ /* the milestone track: the done cluster, 3 milestones, the "N more" cluster (PgProgram) */
54
+ .pp-mt { position: relative; display: grid; grid-template-columns: 56px repeat(var(--pp-n), minmax(0, 1fr)) 56px; padding-top: 2px; }
55
+ .pp-mt::before { content: ""; position: absolute; left: 28px; right: 28px; top: 10px; height: 2px; background: var(--bd-rail); }
56
+ .pp-mt::after { content: ""; position: absolute; left: 28px; top: 10px; height: 2px; background: var(--pp-prog); width: calc(28px + (var(--pp-f) * (100% - 112px)) / var(--pp-n)); }
57
+ .pp-mt[data-nofill]::after { display: none; }
58
+ .pp-m { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--cz-ink3); min-width: 0; padding: 0 4px; }
59
+ .pp-m b { color: var(--cz-ink); font-weight: 800; font-size: 12.5px; }
60
+ .pp-m.late .pp-md { color: var(--cz-risk); font-weight: 700; }
61
+ .pp-md { display: inline-flex; align-items: center; gap: 6px; }
62
+ .pp-dm { all: unset; box-sizing: border-box; width: 12px; height: 12px; transform: rotate(45deg); border-radius: 3px; background: var(--cz-card); border: 2px solid var(--pp-diam); display: inline-block; margin-top: 4px; flex: none; }
63
+ .pp-dm.d { background: var(--pp-prog); border-color: var(--pp-prog); }
64
+ .pp-dm.n { border-color: var(--pp-prog); box-shadow: 0 0 0 4px var(--pp-progbg); }
65
+ button.pp-dm { cursor: pointer; }
66
+ button.pp-dm:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 3px; }
67
+ .pp-rd { display: inline-flex; gap: 3px; }
68
+ .pp-rd i { display: block; width: 5px; height: 5px; border-radius: 1px; transform: rotate(45deg); background: var(--bd-dot); }
69
+ .pp-rd i.on { background: var(--pp-prog); }
70
+ .pp-cap { all: unset; cursor: pointer; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--cz-ink3); }
71
+ .pp-cap .st3 { display: inline-flex; gap: 2px; margin-top: 5px; background: var(--cz-card); padding: 0 3px; }
72
+ .pp-cap .st3 i { display: block; width: 7px; height: 7px; transform: rotate(45deg); border-radius: 2px; background: var(--pp-diam); }
73
+ .pp-cap.dn .st3 i { background: var(--pp-prog); }
74
+ .pp-cap.on { color: var(--pp-prog); }
75
+ .pp-cap:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 8px; }
76
+
77
+ /* waits on you: a check box is a task (amber when late), a dot is a session or a next action that waits on you */
78
+ .pp-needs { border-radius: 16px; background: var(--cz-bluebg); padding: 4px; display: flex; flex-direction: column; }
79
+ .pp-nr { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px; border-radius: 12px; color: var(--cz-ink); text-decoration: none; box-sizing: border-box; }
80
+ .pp-nr + .pp-nr { border-top: 1px solid rgba(47,95,179,.1); }
81
+ @media (hover: hover) { .pp-nr:hover { background: rgba(255,255,255,.6); } }
82
+ .pp-nr:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; }
83
+ .pp-nr .mk2 { width: 20px; display: inline-flex; justify-content: center; flex: none; }
84
+ .pp-nr .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
85
+ .pp-nr .t b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
86
+ .pp-nr .t span { font-size: 12px; color: var(--cz-ink3); }
87
+ .pp-nr .go { color: var(--cz-blueink); display: inline-flex; }
88
+ .pp-nr .go svg { width: 14px; height: 14px; }
89
+ .pp-ck { all: unset; box-sizing: border-box; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--cz-c-8c929b); background: var(--cz-card); flex: none; display: inline-block; }
90
+ .pp-needs .pp-ck { border-color: var(--cz-c-b6c6dc); }
91
+ .pp-ck.late { border-color: var(--pp-amber); background: var(--cz-riskbg); }
92
+ .pp-ck.on { background: var(--cz-done); border-color: var(--cz-done); }
93
+ button.pp-ck { cursor: pointer; }
94
+ button.pp-ck:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
95
+ .pp-dt { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--cz-blue); color: var(--cz-blue); flex: none; display: inline-block; }
96
+ /* motion = importance: the info ripple on what waits on you */
97
+ .pp-needs .pp-dt::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; background: currentColor; animation: pp-info 6s ease-out infinite; }
98
+ @keyframes pp-info { 0% { transform: scale(1); opacity: .25; } 35% { transform: scale(1.9); opacity: 0; } 100% { transform: scale(1.9); opacity: 0; } }
99
+ @media (prefers-reduced-motion: reduce) { .pp-needs .pp-dt::after { animation: none; } }
100
+
101
+ /* the sort card after Turn into a program */
102
+ .pp-sort { background: var(--cz-riskbg); border-radius: 16px; padding: 10px 12px 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--cz-risk); }
103
+ .pp-sort .t { flex: 1; min-width: 0; }
104
+ .pp-sort .t div { font-size: 12px; margin-top: 1px; opacity: .9; }
105
+ .pp-cta { width: 40px; height: 40px; border-radius: 50%; background: var(--cz-card); color: var(--cz-risk); border: 1px solid rgba(107,71,0,.2); display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; }
106
+ .pp-cta:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
107
+
108
+ /* the tabs and the tree (PgProgram), the milestones (PgMilestones) */
109
+ .pp-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 8px; }
110
+ .pp-tab { all: unset; cursor: pointer; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--cz-ink3); display: inline-flex; align-items: center; gap: 6px; }
111
+ .pp-tab[aria-selected="true"] { background: var(--cz-well); color: var(--cz-ink); }
112
+ .pp-tab .n { font-weight: 600; color: var(--cz-ink3); }
113
+ .pp-tab:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
114
+ .pp-tree, .pp-ml { border: 1px solid var(--cz-hair); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
115
+ .pp-nd { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--cz-hair); font-size: 13px; min-height: 38px; box-sizing: border-box; }
116
+ .pp-nd:first-child { border-top: 0; }
117
+ .pp-nd.ini { background: var(--bd-row); font-weight: 800; }
118
+ .pp-nd.ini.pg .x { color: var(--pp-prog); }
119
+ .pp-nd .tw { all: unset; cursor: pointer; width: 16px; color: var(--cz-ink3); flex: none; display: inline-flex; }
120
+ .pp-nd .tw svg { width: 14px; height: 14px; }
121
+ .pp-nd .tw:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 4px; }
122
+ .pp-nd .x { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
123
+ .pp-nd .r { font-size: 11.5px; color: var(--cz-ink3); white-space: nowrap; font-weight: 600; }
124
+ .pp-nd .r.late { color: var(--cz-risk); }
125
+ .pp-nd .k { font-size: 11.5px; font-weight: 700; color: var(--cz-ink3); flex: none; }
126
+ .pp-nd.l2 { padding-left: 36px; }
127
+ .pp-nd.q .x { color: var(--cz-ink3); font-weight: 600; }
128
+ .pp-nd.dn .x { color: var(--cz-ink3); text-decoration: line-through; }
129
+ /* an initiative's or an epic's task: a row that opens in Home; "N more tasks" opens the Tasks tab */
130
+ a.pp-nd.pp-tk { color: inherit; text-decoration: none; }
131
+ a.pp-nd.pp-tk:hover .x, .pp-nd.pp-more:hover { color: var(--cz-blueink); }
132
+ a.pp-nd.pp-tk:focus-visible, .pp-nd.pp-more:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; border-radius: 6px; }
133
+ .pp-nd.pp-more { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; width: 100%; min-height: 34px; padding: 6px 12px 6px 36px; border-top: 1px solid var(--cz-hair); font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); }
134
+ .pp-nd.prd2 { min-height: 32px; padding: 8px 12px 4px; font-size: 12px; font-weight: 800; color: var(--cz-ink3); background: var(--cz-card); }
135
+ .pp-nd.prd2 .pp-t2 { width: 20px; height: 20px; border-radius: 7px; font-size: 9px; }
136
+ .pp-open { all: unset; cursor: pointer; color: inherit; text-decoration: none; }
137
+ .pp-open:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 4px; }
138
+ @media (hover: hover) { .pp-open:hover { text-decoration: underline; text-underline-offset: 3px; } }
139
+ .pp-stg { font-size: 11px; font-weight: 700; color: var(--cz-ink2); background: var(--cz-card); border: 1px solid var(--cz-hair); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
140
+ .pp-av { width: 24px; height: 24px; border-radius: 50%; background: var(--cz-well); color: var(--cz-ink2); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
141
+ .pp-av.y { background: var(--cz-blue); color: var(--cz-onsolid); }
142
+ .pp-ibs { width: 28px; height: 28px; }
143
+ .pp-ibs svg { width: 15px; height: 15px; }
144
+ .pp-add input { flex: 1; min-width: 0; height: 28px; border: 0; background: transparent; font: 13px var(--cz-sans); color: var(--cz-ink); outline: 0; }
145
+ .pp-add .bd-ib.solid { width: 28px; height: 28px; }
146
+ .pp-doc { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--cz-hair); font-size: 13px; min-height: 38px; }
147
+ .pp-doc svg { width: 15px; height: 15px; color: var(--cz-ink2); flex: none; }
148
+ .pp-doc:first-child { border-top: 0; }
149
+ .pp-doc:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; }
150
+ @media (hover: hover) { .pp-doc:hover { background: var(--bd-row); } }
151
+ .pp-mg { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 9px 14px 5px; font-size: 12px; font-weight: 800; color: var(--cz-ink3); background: var(--bd-row); border-top: 1px solid var(--cz-hair); }
152
+ .pp-mg:first-child { border-top: 0; }
153
+ .pp-mg svg { width: 12px; height: 12px; }
154
+ .pp-mg:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; }
155
+ .pp-mr { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 4px 10px; padding: 8px 14px; border-top: 1px solid var(--cz-hair); font-size: 13px; }
156
+ .pp-mr .pp-dm { margin: 0; width: 10px; height: 10px; }
157
+ .pp-mr b { font-weight: 800; }
158
+ .pp-mr .w { grid-column: 2 / 4; font-size: 12px; color: var(--cz-ink3); margin-top: -2px; }
159
+ .pp-mr .d { font-size: 12px; font-weight: 700; color: var(--cz-ink2); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
160
+ .pp-mr.done b { color: var(--cz-ink3); font-weight: 700; }
161
+ .pp-mr.late .d { color: var(--cz-risk); }
162
+ .pp-cdl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
163
+ .pp-cdl dt { color: var(--cz-ink3); font-weight: 700; }
164
+ .pp-cdl dd { margin: 0; }
165
+
166
+ /* a phone: the side panel is the Board's bottom sheet; the head keeps its four buttons, the track keeps its clusters */
167
+ @media (max-width: 720px) {
168
+ .pp-peek .pp-h { padding-top: 22px; }
169
+ .pp-peek .pp-h { gap: 10px; padding-right: 10px; }
170
+ .pp-peek .pp-h h2 { font-size: 17px; }
171
+ .pp-peek .pp-h .pk-tools .bd-ib { width: 32px; height: 32px; }
172
+ .pp-pi { width: 34px; height: 34px; border-radius: 10px; }
173
+ .pp-mt { grid-template-columns: 44px repeat(var(--pp-n), minmax(0, 1fr)) 44px; }
174
+ .pp-mt::before { left: 22px; right: 22px; }
175
+ .pp-mt::after { left: 22px; width: calc(22px + (var(--pp-f) * (100% - 88px)) / var(--pp-n)); }
176
+ .pp-m b { font-size: 11.5px; }
177
+ .pp-nr, .pp-nd, .pp-doc, .pp-tab { min-height: 44px; }
178
+ }
@@ -97,6 +97,14 @@ button.hm-ghd { cursor: pointer; }
97
97
  .hm-ghd .n, .hm-gn { margin-left: auto; font-weight: 700; color: var(--cz-ink3); font-size: 12px; }
98
98
  .hm-ghr2 { display: flex; align-items: center; }
99
99
  .hm-ghr2 .hm-ghd { flex: 1; min-width: 0; }
100
+ /* a program's group (canvas PgHomePhone): its tile, name and products; the next milestone at the end, red when it is late */
101
+ .hm-prg .hm-gtile { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--cz-bluebg); color: var(--cz-blueink); flex: none; }
102
+ .hm-prg .hm-gname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
103
+ .hm-ptags { display: inline-flex; gap: 4px; min-width: 0; overflow: hidden; }
104
+ .hm-ptag { font-size: 11px; font-weight: 700; color: var(--cz-ink3); background: var(--cz-well); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
105
+ .hm-prg .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
106
+ .hm-gb { min-width: 18px; height: 18px; border-radius: 999px; background: var(--cz-blue); color: var(--cz-card); font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; box-sizing: border-box; flex: none; }
107
+ .hm-prg.late .n { color: var(--cz-red); }
100
108
  .hm-gn { border: 0; background: none; padding: 10px 10px 4px 4px; cursor: pointer; font-family: var(--cz-sans); white-space: nowrap; }
101
109
  body.cz-home .hm-r.lr { min-height: 0; margin: 0; border-radius: 16px; gap: 0; }
102
110
  body.cz-home .hm-r.lr .hm-rm { min-height: 48px; padding: 8px 10px; gap: 10px; border-radius: 16px; }
@@ -216,3 +224,184 @@ body.cz-home .hm-r.lr .hm-tile { width: 32px; height: 32px; }
216
224
  }
217
225
  .hm-top .hm-back { display: none; }
218
226
  /* the Focus chip beside the filters (testing fixes: it came over from the My work page) */
227
+
228
+ /* ── Home A + C with programs (initiative program-hierarchy, H1 to H4; canvas HvAC, HvAOpen, HvACDesk, PgHomePhone, PgHomeDesk) ──
229
+ * One header line, the "N are yours" line, a group per program and per product (a tile, the name, the goal dots, a chevron) over a white
230
+ * card of one-line rows, the stage track on the right, sessions and tasks indented under their initiative, "Not in an initiative" as a
231
+ * line. Sizes are the desktop frame's (HvACDesk); the phone block below takes the phone frame's (HvAC). The frames' colours are drawn with
232
+ * the nearest cozy token: the tile tints mix their ink into the card, so they hold in the dark theme too. */
233
+ body.cz-home .hm-list { flex-basis: 360px; width: 360px; padding: 12px 12px 76px; position: relative; }
234
+ body.cz-home .hm-lsc { margin: 0 -12px; padding: 0 12px 4px; }
235
+ .hv-bar { display: flex; align-items: center; gap: 2px; height: 44px; padding: 0; }
236
+ .hv-hi { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 0 0 6px; border: 0; background: none; color: var(--cz-ink); cursor: pointer; text-align: left; font-family: var(--cz-sans); border-radius: 14px; }
237
+ .hv-hi b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
238
+ .hv-hi svg { color: var(--cz-ink3); flex: none; width: 16px; height: 16px; }
239
+ .hv-hi[aria-expanded="true"] svg { transform: rotate(180deg); }
240
+ .hv-pk { height: 32px; padding: 0 10px 0 12px; border-radius: 999px; border: 0; background: var(--cz-card); font-family: var(--cz-sans); font-size: 13px; font-weight: 700; color: var(--cz-ink2); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; flex: none; max-width: 140px; }
241
+ .hv-pk svg { width: 13px; height: 13px; flex: none; }
242
+ .ut-ib.hv-ib { width: 40px; height: 40px; }
243
+ .ut-ib.hv-ib svg { width: 18px; height: 18px; }
244
+ .hv-sub { margin: 0 6px 12px; font-size: 13px; color: var(--cz-ink3); }
245
+ .hv-body > .hm-pg + .hm-pg { margin-top: 12px; }
246
+ .hv-body > .hm-pg.loose { margin-top: 0; }
247
+
248
+ /* the group's header: a tile, the name, the goal dots or the next milestone, a chevron (HvAC .pg) */
249
+ .hv-gh { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px 0 6px; margin: 0 0 4px; border: 0; background: none; color: var(--cz-ink); cursor: pointer; text-align: left; font-family: var(--cz-sans); box-sizing: border-box; border-radius: 14px; }
250
+ .hv-gh > b, .hv-pt > b { font-size: 15px; font-weight: 800; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
251
+ .hv-cv { color: var(--cz-ink3); display: inline-flex; flex: none; margin-left: auto; }
252
+ .hv-gd + .hv-cv { margin-left: 6px; }
253
+ .hv-tl { position: relative; width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex: none; background: var(--cz-bluebg); color: var(--cz-blueink); }
254
+ .hv-tl.t1, .hv-st2.t1 { background: color-mix(in srgb, var(--cz-c-7a5a2e) 13%, var(--cz-card)); color: var(--cz-c-7a5a2e); }
255
+ .hv-tl.t2, .hv-st2.t2 { background: var(--cz-well2); color: var(--cz-ink3); }
256
+ /* the dark theme: the brown ink sinks into a dark card, so its letters lift toward the ink (the tint stays) */
257
+ .cz.dark .hv-tl.t1, html.dark .cz .hv-tl.t1, :root[data-theme="dark"] .cz .hv-tl.t1, .cz.dark .hv-st2.t1, html.dark .cz .hv-st2.t1, :root[data-theme="dark"] .cz .hv-st2.t1 { color: color-mix(in srgb, var(--cz-c-7a5a2e) 40%, var(--cz-ink)); }
258
+ .hv-tl.tp { background: color-mix(in srgb, var(--cz-c-6b4fa3) 11%, var(--cz-card)); color: var(--cz-c-6b4fa3); }
259
+ .hv-tl svg { width: 16px; height: 16px; }
260
+ .hv-nd { position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--cz-blue); box-shadow: 0 0 0 2px var(--cz-well); color: var(--cz-blue); }
261
+ .hv-nd.am { background: var(--cz-dot-late); color: var(--cz-dot-late); }
262
+ .hv-gd { display: inline-flex; gap: 3px; margin-left: auto; flex: none; }
263
+ .hv-gd i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--cz-dot-ok); }
264
+ .hv-gd i.off { background: var(--cz-dot-late); }
265
+ /* a program's header: the title opens the program panel, the rest folds the group (PgHomePhone .msd, .dm, .rd) */
266
+ .hv-gh.hv-prg { cursor: default; padding: 0; gap: 0; }
267
+ .hv-pt { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--cz-ink); cursor: pointer; font-family: var(--cz-sans); border-radius: 14px; }
268
+ .hv-pf { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 44px; padding: 0 10px 0 6px; border: 0; background: none; cursor: pointer; font-family: var(--cz-sans); border-radius: 14px; }
269
+ .hv-pf .hv-cv { margin-left: 0; }
270
+ .hv-msd { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--cz-ink2); white-space: nowrap; }
271
+ .hv-msd.late { color: var(--cz-late); }
272
+ .hv-dm { display: block; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--cz-c-6b4fa3); }
273
+ .hv-msd.late .hv-dm { background: var(--cz-dot-late); }
274
+ .hv-rd { display: inline-flex; gap: 3px; align-items: center; }
275
+ .hv-rd i { display: block; width: 5px; height: 5px; border-radius: 1px; transform: rotate(45deg); background: color-mix(in srgb, var(--cz-ink3) 28%, var(--cz-card)); }
276
+ .hv-rd i.on { background: var(--cz-c-6b4fa3); }
277
+ .hv-psub { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 8px 14px 2px 10px; font-size: 12.5px; font-weight: 800; color: var(--cz-ink3); }
278
+ .hv-st2 { width: 20px; height: 20px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; flex: none; background: var(--cz-bluebg); color: var(--cz-blueink); }
279
+
280
+ /* the card and its one-line rows (HvAC .card, .row, .kid) */
281
+ .hv-card { background: var(--cz-card); border-radius: 18px; padding: 3px 0; }
282
+ body.cz-home .hv-r { position: relative; display: flex; align-items: center; gap: 0; min-height: 0; margin: 0; border-radius: 14px; background: none; box-shadow: none; }
283
+ body.cz-home .hv-r .hm-rm { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 14px; }
284
+ body.cz-home .hv-r .hm-ck + .hm-rm { padding-left: 8px; }
285
+ body.cz-home .hv-r .hm-rt b { font-size: 14.5px; font-weight: 600; }
286
+ body.cz-home .hv-r.ini .hm-rm { padding-right: 4px; }
287
+ .hv-r + .hv-r::before, .hm-nest::before, .hv-r + .hv-fold::before, .hm-nest + .hv-r::before, .hm-nest + .hv-fold::before { content: ""; position: absolute; left: 36px; right: 12px; top: 0; height: 1px; background: var(--cz-hair); }
288
+ .hm-nest { position: relative; margin: 0; padding: 0; border: 0; }
289
+ .hm-nest > .hv-r:first-child::before { display: none; }
290
+ .hv-r.kid, .hv-fold.kid { background: color-mix(in srgb, var(--cz-well) 45%, var(--cz-card)); border-radius: 0; }
291
+ body.cz-home .hv-r.kid .hm-rm { min-height: 40px; padding: 2px 12px 2px 30px; }
292
+ body.cz-home .hv-r.kid .hm-ck { margin-left: 30px; }
293
+ body.cz-home .hv-r.kid .hm-ck + .hm-rm { padding-left: 8px; }
294
+ body.cz-home .hv-r.kid .hm-rt b { font-size: 14px; }
295
+ .hm-nest .hv-r.kid::before, .hm-nest .hv-fold.kid::before { content: ""; position: absolute; left: 60px; right: 12px; top: 0; height: 1px; background: var(--cz-hair); }
296
+ .hm-nest > .hv-r.kid:first-child::before { display: none; }
297
+ body.cz-home .hv-r.sel, body.cz-home .hv-r.sel.kid { background: var(--cz-bluebg); box-shadow: none; }
298
+ .hv-r.sel::before, .hv-r.sel + .hv-r::before { display: none; }
299
+ @media (hover: hover) { body.cz-home .hv-r:hover { background: var(--cz-well2); } body.cz-home .hv-r.sel:hover { background: var(--cz-bluebg); } .hv-gh:hover, .hv-pt:hover, .hv-pf:hover, .hv-hi:hover, .hv-lh:hover, .hv-fold:hover, .hv-xc:hover { background: var(--cz-well2); } }
300
+ .hv-mk { width: 24px; height: 24px; flex: none; display: inline-flex; justify-content: center; align-items: center; color: var(--cz-ink3); border: 0; background: none; padding: 0; }
301
+ button.hv-mk { cursor: pointer; border-radius: 8px; }
302
+ body.cz-home .hv-r .hm-ck { width: 24px; height: 32px; margin: 0 0 0 6px; }
303
+ .hv-d { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--cz-blue); color: var(--cz-blue); flex: none; }
304
+ .hv-d.sm { width: 7px; height: 7px; }
305
+ .hv-d.am { background: var(--cz-dot-late); color: var(--cz-dot-late); }
306
+ .hv-d.run { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cz-c-a9aeb6); }
307
+ .hv-ck { display: block; width: 17px; height: 17px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)); box-sizing: border-box; color: var(--cz-dot-late); flex: none; }
308
+ .hv-ck.late { box-shadow: inset 0 0 0 1.5px var(--cz-dot-late); background: color-mix(in srgb, var(--cz-dot-late) 10%, var(--cz-card)); }
309
+ .hv-ck.wait { box-shadow: inset 0 0 0 1.5px var(--cz-c-c5c9d0); opacity: .55; }
310
+ .hv-ck.on { background: var(--cz-ink3); box-shadow: none; color: var(--cz-card); display: inline-flex; align-items: center; justify-content: center; }
311
+ .hv-ck.on svg { width: 11px; height: 11px; stroke-width: 3; }
312
+ .hv-st { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--cz-ink3); white-space: nowrap; flex: none; }
313
+ .hv-st svg { width: 12px; height: 12px; }
314
+ .hv-c { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cz-bluebg); color: var(--cz-blueink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; }
315
+ .hv-mt { display: inline-flex; align-items: center; gap: 3px; flex: none; margin-left: 4px; }
316
+ .hv-mt i { display: block; width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--cz-ink3) 28%, var(--cz-card)); }
317
+ .hv-mt i.on { background: color-mix(in srgb, var(--cz-blue) 45%, var(--cz-card)); }
318
+ .hv-mt i.now { width: 7px; height: 7px; background: var(--cz-blue); }
319
+ .hv-mt i.ms { border-radius: 1px; transform: rotate(45deg); }
320
+ .hv-xc { width: 26px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); border: 0; background: none; padding: 0; margin-right: 6px; border-radius: 10px; cursor: pointer; }
321
+ span.hv-xc { width: 18px; cursor: default; }
322
+ body.cz-home .hv-r .hm-x { margin-right: 6px; }
323
+ .hv-fold { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px 0 6px; border: 0; background: none; font-family: var(--cz-sans); font-size: 13.5px; font-weight: 600; color: var(--cz-ink2); cursor: pointer; text-align: left; box-sizing: border-box; border-radius: 14px; }
324
+ .hv-fold svg { margin-left: auto; color: var(--cz-ink3); flex: none; }
325
+ .hv-fold.kid { padding-left: 30px; }
326
+ /* "Not in an initiative" (HvAC .lh) */
327
+ .hv-lh { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 18px; padding: 12px 10px 0 12px; border: 0; background: none; font-family: var(--cz-sans); font-size: 13.5px; font-weight: 700; color: var(--cz-ink3); text-align: left; box-sizing: border-box; cursor: pointer; border-radius: 0 0 14px 14px; }
328
+ div.hv-lh { cursor: default; margin-top: 0; padding-top: 0; }
329
+ .hv-lh::before { content: ""; position: absolute; left: 12px; right: 10px; top: 0; height: 1px; background: var(--cz-hair); }
330
+ div.hv-lh::before { display: none; }
331
+ .hv-lh .n { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
332
+ .hv-lt { display: block; width: 7px; height: 7px; border-radius: 2px; background: var(--cz-dot-late); color: var(--cz-dot-late); }
333
+ .hv-g.loose .hv-card { margin-top: 4px; }
334
+
335
+ /* Your day (HvAOpen): a sheet over the list, from "Good morning" */
336
+ .hm-lday:empty { display: none; }
337
+ .hv-scrim { position: absolute; inset: 0; z-index: 30; border: 0; padding: 0; margin: 0; background: color-mix(in srgb, var(--cz-ink) 22%, transparent); cursor: pointer; border-radius: inherit; }
338
+ .hv-sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 92px; z-index: 31; background: var(--cz-c-faf9f7); border-radius: 24px 24px 0 0; padding: 10px 16px 0; box-shadow: var(--cz-sheet); display: flex; flex-direction: column; min-height: 0; color: var(--cz-ink); }
339
+ :root[data-theme="dark"] .hv-sheet { background: var(--cz-well); }
340
+ .hv-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--cz-c-d9dce1); margin: 0 auto 8px; flex: none; }
341
+ .hv-sbar { display: flex; align-items: center; height: 44px; flex: none; }
342
+ .hv-sheet:focus { outline: none; }
343
+ .hv-sbar b { flex: 1; font-size: 18px; font-weight: 800; padding-left: 6px; }
344
+ .hv-sc { flex: 1; min-height: 0; overflow: auto; padding-bottom: 24px; scrollbar-width: thin; }
345
+ .hv-sh { display: flex; align-items: baseline; gap: 8px; padding: 18px 8px 8px; font-size: 13px; font-weight: 700; color: var(--cz-ink3); }
346
+ .hv-sh:first-child { padding-top: 8px; }
347
+ .hv-sh .r { margin-left: auto; font-weight: 600; }
348
+ .hv-day { display: flex; flex-direction: column; width: 100%; padding: 2px 8px 6px; border: 0; background: none; font-family: var(--cz-sans); text-align: left; cursor: pointer; color: var(--cz-ink3); border-radius: 14px; box-sizing: border-box; }
349
+ .hv-day .sub { font-size: 13px; }
350
+ .hv-day .hm-load { margin-top: 8px; }
351
+ .hv-clear { margin: 0 8px; font-size: 13.5px; color: var(--cz-ink2); }
352
+ body.cz-home .hv-r.two .hm-rm { min-height: 58px; padding: 8px 14px 8px 8px; align-items: center; }
353
+ body.cz-home .hv-r.two .hm-rt b { font-size: 15px; }
354
+ .hv-r.two .hm-rt em { font-style: normal; display: block; font-size: 13px; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
355
+ .hv-r.two .hm-rt em svg { width: 13px; height: 13px; vertical-align: -2px; }
356
+ .hv-r.two .hv-mk { align-self: center; }
357
+
358
+ /* motion = importance (cozy.css levels, Board v62): an info ripple on what waits on you, a warn ripple on what is late; nothing for running */
359
+ .hv-d:not(.run), .hv-ck.late, .hv-lt, .hv-nd { position: relative; }
360
+ .hv-d:not(.run)::after, .hv-ck.late::after, .hv-lt::after, .hv-nd::after { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; background: currentColor; pointer-events: none; }
361
+ .hv-d:not(.run):not(.am)::after, .hv-nd:not(.am)::after { animation: hv-info 6s ease-out infinite; }
362
+ .hv-ck.late::after, .hv-lt::after, .hv-d.am::after, .hv-nd.am::after { animation: hv-warn 3.2s ease-out infinite; }
363
+ @keyframes hv-info { 0% { transform: scale(1); opacity: .25; } 35% { transform: scale(1.9); opacity: 0; } 100% { transform: scale(1.9); opacity: 0; } }
364
+ @keyframes hv-warn { 0% { transform: scale(1); opacity: .35; } 60% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(2.2); opacity: 0; } }
365
+ @media (prefers-reduced-motion: reduce) { .hv-d::after, .hv-ck::after, .hv-lt::after, .hv-nd::after { animation: none !important; } }
366
+
367
+ /* a phone (HvAC, PgHomePhone): the frame's larger sizes, and Your day is a sheet over the page */
368
+ @media (max-width: 760px) {
369
+ body.cz-home.hm-plist .hm-list { padding: 16px 0 96px; }
370
+ .hv-bar { height: 48px; gap: 4px; }
371
+ .hv-hi { height: 48px; }
372
+ .hv-hi b { font-size: 22px; }
373
+ .hv-hi svg { width: 18px; height: 18px; }
374
+ .hv-pk { height: 34px; }
375
+ .ut-ib.hv-ib { width: 44px; height: 44px; }
376
+ .ut-ib.hv-ib svg { width: 20px; height: 20px; }
377
+ .hv-sub { font-size: 13.5px; margin: 0 6px; }
378
+ .hv-body { margin-top: 24px; }
379
+ .hv-body > .hm-pg + .hm-pg { margin-top: 14px; }
380
+ .hv-gh { min-height: 48px; margin-bottom: 6px; }
381
+ .hv-gh > b, .hv-pt > b { font-size: 16px; }
382
+ .hv-tl { width: 30px; height: 30px; border-radius: 10px; font-size: 11.5px; }
383
+ .hv-nd { box-shadow: 0 0 0 2px var(--cz-c-faf9f7); }
384
+ .hv-pt, .hv-pf { min-height: 48px; }
385
+ .hv-card { border-radius: 20px; padding: 4px 0; box-shadow: 0 8px 24px -20px var(--cz-c-9da3ac); }
386
+ body.cz-home .hv-r .hm-rm { min-height: 48px; padding: 8px 14px 8px 8px; }
387
+ body.cz-home .hv-r.ini .hm-rm { padding-right: 4px; }
388
+ body.cz-home .hv-r .hm-rt b { font-size: 15px; }
389
+ body.cz-home .hv-r.kid .hm-rm { min-height: 44px; padding: 4px 14px 4px 32px; }
390
+ body.cz-home .hv-r.kid .hm-ck { margin-left: 32px; min-width: 24px; }
391
+ body.cz-home .hv-r .hm-ck { min-width: 24px; min-height: 44px; margin-left: 8px; }
392
+ body.cz-home .hv-r.kid .hm-rt b { font-size: 14px; }
393
+ .hv-r + .hv-r::before, .hm-nest::before, .hv-r + .hv-fold::before, .hm-nest + .hv-r::before, .hm-nest + .hv-fold::before { left: 38px; right: 14px; }
394
+ .hm-nest .hv-r.kid::before, .hm-nest .hv-fold.kid::before { left: 62px; right: 14px; }
395
+ .hv-ck { width: 18px; height: 18px; }
396
+ .hv-st { font-size: 13px; }
397
+ .hv-c { height: 22px; min-width: 24px; padding: 0 7px; font-size: 12.5px; }
398
+ .hv-xc { min-width: 32px; min-height: 44px; }
399
+ span.hv-xc { min-width: 18px; }
400
+ .hv-fold { min-height: 48px; padding: 0 14px 0 8px; font-size: 14px; }
401
+ .hv-fold.kid { padding-left: 32px; min-height: 44px; }
402
+ .hv-scrim, .hv-sheet { position: fixed; }
403
+ .hv-sheet { top: 96px; border-radius: 26px 26px 0 0; z-index: 91; }
404
+ .hv-scrim { z-index: 90; border-radius: 0; }
405
+ .hv-card .hv-r.two .hm-rm { min-height: 58px; }
406
+ }
407
+ body.cz-home .hm-hd.hv-bar { padding: 0; }
@@ -75,10 +75,14 @@ const S = {
75
75
  doneOpen: false, sheet: false, rec: {}, pin: new Set(JSON.parse(store.get('pmos.home.pin') || '[]')),
76
76
  cardFold: store.get('pmos.home.cardfold') === '1', // the card's checklist folded to one line (AgInitSpec), kept in this browser
77
77
  // the one list (premium-uncovered-features): the filter, the picked product, which groups and initiatives are open, kept in this browser
78
- filter: 'today', product: store.get('pmos.home.product') || null, kidsOff: new Set(), rest: new Set(), tasks: new Set(), cap: false,
78
+ filter: 'today', product: store.get('pmos.home.product') || null, kidsOff: new Set(), rest: new Set(), tasks: new Set(), cap: false, day: false,
79
79
  pg: (() => { try { return JSON.parse(store.get('pmos.home.pg') || '{}') || {}; } catch { return {}; } })(),
80
80
  eodHidden: store.get('pmos.home.eod') === L.dayOf(), phoneChat: false,
81
81
  };
82
+ // every fold of the list is kept in this browser (HvAC: "every group can be hidden or shown, and the choice is remembered"): the groups in
83
+ // pmos.home.pg, an initiative's rows and its "N more" in pmos.home.kids
84
+ (() => { try { const k = JSON.parse(store.get('pmos.home.kids') || '{}') || {}; for (const [n, v] of [['on', S.kids], ['off', S.kidsOff], ['rest', S.rest], ['tasks', S.tasks]]) for (const x of k[n] || []) v.add(x); } catch { /* none kept */ } })();
85
+ const keepKids = () => store.set('pmos.home.kids', JSON.stringify({ on: [...S.kids], off: [...S.kidsOff], rest: [...S.rest], tasks: [...S.tasks] }));
82
86
  const toast = (t) => { const el = $('#toast'); el.textContent = t; el.classList.add('on'); clearTimeout(toast.t); toast.t = setTimeout(() => el.classList.remove('on'), 4200); };
83
87
 
84
88
  /* ── reading ── */
@@ -91,9 +95,10 @@ async function getRetry(path, tries = 20) {
91
95
  return { ok: false, error: 'still reading' };
92
96
  }
93
97
  async function load() {
94
- const [brief, board, ses, desk, today, sch, work, day, rev] = await Promise.all([
98
+ const [brief, board, ses, desk, today, sch, work, day, rev, progs] = await Promise.all([
95
99
  getRetry('/api/briefing-premium' + wsQ()), getRetry('/api/board-premium' + wsQ() + boardQ(WS ? '&' : '?')), pmGet('/api/sessions'), pmGet('/api/home-desk' + wsQ()),
96
100
  pmGet('/api/brief-page' + wsQ()), pmGet('/api/schedules' + wsQ()), pmGet('/api/my-work-premium' + wsQ()), pmGet('/api/phone-day'), pmGet('/api/home-review' + wsQ()),
101
+ pmGet('/api/programs'),
97
102
  ]);
98
103
  const D = S.D;
99
104
  D.brief = brief && brief.ok && brief.model ? brief.model : null;
@@ -105,6 +110,7 @@ async function load() {
105
110
  D.work = work && work.ok && work.model ? work.model : null; // the PM's own list (GET /api/my-work-premium): the filters and "Not in an initiative"
106
111
  D.phoneDay = day && day.ok ? day : null; // what finished today, the recap and tomorrow (the end-of-day card, the Done filter)
107
112
  D.review = rev && rev.ok ? rev : null; // this week's review (GET /api/home-review)
113
+ D.programs = progs && progs.ok ? progs.programs : []; // programs above initiatives, across products (GET /api/programs)
108
114
  D.now = Date.now();
109
115
  D.err = [brief, board].filter((x) => !x || !x.ok).map((x) => (x && x.error) || 'the server did not answer');
110
116
  const rows = H.boardRows(D);
@@ -202,16 +208,26 @@ function homeListHtml() {
202
208
  S.M = M;
203
209
  const R = L.reviewModel(S.D, NOW());
204
210
  // the first initiative where it is your turn shows what is under it, until the PM closes it
205
- const firstTurn = M.groups.filter((g) => g.kind === 'product').flatMap((g) => g.inis).find((x) => x.turn);
211
+ const firstTurn = M.groups.filter((g) => g.kind === 'product' || g.kind === 'program').flatMap((g) => g.inis).find((x) => x.turn);
206
212
  const open = (id) => S.kids.has(id) || (!!firstTurn && firstTurn.id === id && !S.kidsOff.has(id));
207
- const pOpen = (g) => (g.key in S.pg ? !!S.pg[g.key] : g.primary || M.products.length === 1 || (!!S.product && S.product === g.product.key));
208
- const nPick = M.products.length > 1 ? M.counts.products + ' products · ' + M.counts.initiatives + ' initiatives' : '';
209
- const pins = H.needsOf(S.D).filter((r) => S.pin.has(r.key)).length;
213
+ // a group is open until the PM folds it; another product starts folded; "Not in an initiative" starts folded on a phone (HvAC, HvACDesk)
214
+ const pOpen = (g) => (g.key in S.pg ? !!S.pg[g.key] : g.kind === 'loose' ? !isPhone() : g.kind === 'program' || g.primary || M.products.length === 1 || (!!S.product && !!g.product && S.product === g.product.key));
210
215
  return TD.listHtml(M, todayModel(), {
211
216
  sel: S.sel, isOpen: open, pOpen, restOpen: (k) => S.rest.has(k), cap: S.cap, tasksOpen: (k) => S.tasks.has(k), pin: S.pin, avHtml, ready: S.ready, err: S.D.err.length ? S.D.err[0] : '',
212
- product: S.product, review: R, mic: canDictate(), sub: pins ? pins + ' pinned' : nPick || 'Each one sits under its initiative', phone: isPhone(),
217
+ product: S.product, review: R, mic: canDictate(), phone: isPhone(), day: S.day,
213
218
  });
214
219
  }
220
+ /** Your day (HvAOpen): the sheet "Good morning" opens over the list. */
221
+ function dayHtml() { return S.day && !S.ini && S.M ? TD.dayHtml(S.M, todayModel(), L.reviewModel(S.D, NOW()), { sel: S.sel, now: NOW(), phone: isPhone() }) : ''; }
222
+ function day(on) {
223
+ S.day = !!on; drawList();
224
+ const f = $(on ? '#hmList .hv-sheet' : '#hmList [data-hm-day]'); if (f) f.focus();
225
+ }
226
+ /* the list's filter (HvACDesk): Today, Kept or Done, behind the icon in the list's top bar */
227
+ function filterMenu(b) {
228
+ const M = S.M || L.homeList(S.D, { now: NOW() });
229
+ menu(b, [{ key: 'today', label: 'Today' }].concat(M.filters).map((f) => ({ label: f.label, k: f.n ? String(f.n) : '', checked: S.filter === f.key, go: () => { S.filter = f.key; drawList(); const x = $('#hmList [data-hm-flt]'); if (x) x.focus(); } })), 'Show');
230
+ }
215
231
 
216
232
  /* ── the initiative card ── */
217
233
  function iniRowOf(id) { return H.boardRows(S.D).find((r) => r.id === id) || null; }
@@ -307,8 +323,8 @@ function elseHtml() {
307
323
  function drawList() {
308
324
  const el = $('#hmList');
309
325
  // the list column: the groups scroll; the Elsewhere card is the column's foot (AgInitSpec, AgInitPhone)
310
- let sc = el.querySelector(':scope > .hm-lsc'), ft = el.querySelector(':scope > .hm-lft');
311
- if (!sc || !ft) { el.innerHTML = '<div class="hm-lsc"></div><div class="hm-lft"></div>'; sc = el.firstElementChild; ft = el.lastElementChild; }
326
+ let sc = el.querySelector(':scope > .hm-lsc'), ft = el.querySelector(':scope > .hm-lft'), dy = el.querySelector(':scope > .hm-lday');
327
+ if (!sc || !ft || !dy) { el.innerHTML = '<div class="hm-lsc"></div><div class="hm-lft"></div><div class="hm-lday"></div>'; [sc, ft, dy] = el.children; }
312
328
  const html = S.ini ? iniListHtml() : homeListHtml();
313
329
  if (sc.__h !== html) {
314
330
  const st = sc.scrollTop, cap = sc.querySelector('#hmCap'), capV = cap ? cap.value : '', capF = !!cap && document.activeElement === cap;
@@ -318,6 +334,9 @@ function drawList() {
318
334
  }
319
335
  const fh = elseHtml();
320
336
  if (ft.__h !== fh) { ft.__h = fh; ft.innerHTML = fh; }
337
+ const dh = dayHtml();
338
+ if (dy.__h !== dh) { dy.__h = dh; dy.innerHTML = dh; dy.querySelectorAll('.hm-load i[data-f]').forEach((i) => i.style.setProperty('--bd-f', i.dataset.f)); }
339
+ document.body.classList.toggle('hm-dayon', !!dh);
321
340
  iniList(sc);
322
341
  // the first-run card after an import tops the list. The phone moment card is not in the list: it is the detail of the greeting
323
342
  // at the top, and opens in the Viewer when the greeting is pressed (testing fixes: in the list it took a screen of room)
@@ -335,7 +354,7 @@ function allRows() {
335
354
  const M = S.M || L.homeList(S.D, { now: NOW() });
336
355
  const add = (r) => { if (!r) return; out.push(r); (r.kids || []).forEach(add); };
337
356
  H.needsOf(S.D).forEach(add);
338
- for (const g of M.groups) { (g.flat || []).forEach(add); (g.inis || []).forEach(add); (g.rest || []).forEach(add); (g.rows || []).forEach(add); }
357
+ for (const g of M.groups) { (g.flat || []).forEach(add); (g.inis || []).forEach(add); (g.rest || []).forEach(add); (g.rows || []).forEach(add); (g.tasks || []).forEach(add); }
339
358
  if (M.list) M.list.rows.forEach(add);
340
359
  if (S.filter !== 'today') { const T = L.homeList(S.D, { now: NOW() }); T.groups.forEach((g) => { (g.rows || []).forEach(add); (g.inis || []).concat(g.rest || []).forEach(add); }); }
341
360
  if (S.lay) S.lay.groups.forEach((g) => g.rows.forEach(add));
@@ -373,7 +392,22 @@ const chat = mountChat($('#hmChat'), {
373
392
  wait: MORE.WAIT, // the Notes viewer only: the Home canvas does not draw it
374
393
  desk: () => !isPhone(),
375
394
  reopenViewer: () => reopenViewer(),
395
+ head: (t) => (isPhone() ? '' : TD.chatHeadHtml(chatHead(t))), // the phone names it in its top bar (#hmTop)
376
396
  });
397
+ /* The chat's header line on a desktop (HvACDesk): the open row's mark and title, and where it sits: its initiative with the stage track, or
398
+ * its program. Home's own chat names nothing. */
399
+ function chatHead(t) {
400
+ if (!t || t.key === 'chat:main' || !t.title || t.title === 'Reading') return null;
401
+ const r = S.sel ? rowById(S.sel) : null;
402
+ if (t.prog) return { row: r, title: t.title, scope: t.prog.title, prog: true };
403
+ const title = r && r.kind !== 'ini' ? r.name : t.title;
404
+ // the weekly update and the product's own chat sit in the product: its name, no stage track
405
+ if (t.ini === 'product' || (r && r.ini === 'product')) return { row: r, title, scope: H.productName(S.D) };
406
+ const ini = t.ini || (r && r.ini) || null;
407
+ const ir = ini ? rowById('i:' + ini) : null, b = ini ? iniRowOf(ini) : null;
408
+ const stage = (ir && ir.stage) || (b && b.stage) || '';
409
+ return { row: r || ir, title, scope: ini ? iniTitle(ini) : '', at: L.stageAt(stage), stage };
410
+ }
377
411
  function scopeItems() {
378
412
  return [{ label: 'All work', sub: 'Home', go: () => select(null) }, { label: H.productName(S.D) + ' · product', go: () => goIni('product') }]
379
413
  .concat(H.boardRows(S.D).map((r) => ({ label: r.title, sub: [r.lane, r.stage].filter(Boolean).join(' · '), go: () => goIni(r.id) })));
@@ -483,6 +517,15 @@ function updateTarget() {
483
517
  context: 'The weekly update draft for ' + H.productName(S.D) + ':\n' + H.updateText(U, H.productName(S.D)) + '\nRecipients: ' + (U.to.join(', ') || 'none yet') + '. You can change the draft; the PM sends it from their own mail.',
484
518
  placeholder: 'Tell Communicator what to change', also: null };
485
519
  }
520
+ /** A program's conversation (?ask=program:<id>, a program task's row): Claude with the program as its scope. task names the open row. */
521
+ function programTarget(id, task) {
522
+ const pr = (S.D.programs || []).find((p) => p && p.id === id) || { id, title: (P.get('label') || '').slice(0, 80) || id };
523
+ const inis = (pr.members || []).map((m) => m && m.initiative).filter(Boolean);
524
+ return { key: 'chat:program:' + id, ws: WS || undefined, title: task ? task.name : pr.title, sub: task ? pr.title : 'Program', prog: { id, title: pr.title },
525
+ scope: { text: pr.title, icon: TD.P.layers }, rich: false, role: CLAUDE, placeholder: 'Message Claude about ' + pr.title,
526
+ empty: 'Ask about ' + pr.title + '. Claude reads the program and its initiatives in a real Claude Code session.',
527
+ context: 'Program ' + pr.title + ' (' + id + ')' + (inis.length ? ', with the initiatives ' + inis.join(', ') : '') + '.' + (task ? ' The PM opened its task "' + task.name + '"' + (task.hint ? ' (' + task.hint + ')' : '') + '.' : ''), also: null };
528
+ }
486
529
  function homeTarget() {
487
530
  return { key: 'chat:main', ws: WS || undefined, title: 'Home', scope: { text: 'All work', icon: I.home }, rich: false, placeholder: 'Message Claude', role: CLAUDE,
488
531
  empty: 'Ask anything about your work. Claude reads your repositories and works in a real Claude Code session.', also: alsoOf(null) };
@@ -505,6 +548,7 @@ function select(id, o = {}) {
505
548
  if (r.kind === 'update') { openTarget(updateTarget()); if (!o.keepViewer) openUpdateViewer(); }
506
549
  else if (r.kind === 'need' && r.row) { openTarget(needTarget(r)); if (!o.keepViewer) openNeedViewer(r); }
507
550
  else if (r.kind === 'session' || r.needSession) { const s = S.D.sessions.find((x) => x.id === r.sid); if (s) { openTarget(sessionTarget(s)); if (isMetricsSession(s) && !o.keepViewer && !isPhone()) openMetricsViewer(); } }
551
+ else if (r.kind === 'ptask') { S.phoneChat = isPhone(); openTarget(programTarget(r.program, r)); }
508
552
  else if (r.kind === 'task') { openBoardTask(r.task); }
509
553
  else if (r.kind === 'item') { import('./home-work.js').then((M) => M.openWorkItem(r.key)); }
510
554
  else if (r.kind === 'mention') { openMention(r); }
@@ -533,7 +577,8 @@ function syncUrl() {
533
577
  ['ini', 'open', 'item', 'session', 'ask', 'say', 'q', 'about', 'label', 'meeting', 'id', 'view'].forEach((k) => { if (!(k === 'open' && /^(report|chart|dashboard):/.test(q.get('open') || ''))) q.delete(k); });
534
578
  if (S.ini) q.set('ini', S.ini);
535
579
  const r = S.sel ? rowById(S.sel) : null;
536
- if (r && r.key && r.kind !== 'session') q.set('open', r.key); else if (r && r.sid) q.set('session', r.sid);
580
+ if (r && r.kind === 'ptask') q.set('item', r.id); // a program task: pt:<program>:<key>, the link the program panel makes
581
+ else if (r && r.key && r.kind !== 'session') q.set('open', r.key); else if (r && r.sid) q.set('session', r.sid);
537
582
  const s = q.toString();
538
583
  history.replaceState(null, '', location.pathname + (s ? '?' + s : ''));
539
584
  }
@@ -617,6 +662,7 @@ async function checkRow(id) {
617
662
  let res = null;
618
663
  if (r.kind === 'task' && r.task) res = await pmPost('/api/boards/tasks/state', { ws: r.task.ws || boardWs(), board: r.task.board || boardId(), task: r.task.uid, state: 'Done' });
619
664
  else if (r.kind === 'item' && r.item) res = await pmPost('/api/pm-items/done', { id: r.item.id });
665
+ else if (r.kind === 'ptask') res = await pmPost('/api/programs/task-done', { ws: r.ws, program: r.program, key: r.key, done: true });
620
666
  else return;
621
667
  if (!res || !res.ok) { toast((res && res.error) || 'Not marked done.'); return; }
622
668
  toast('Done.');
@@ -1071,21 +1117,25 @@ $('#hmDesk').onclick = (e) => { if (S.sheet && e.target === $('#hmDesk')) sheet(
1071
1117
  $('#hmList').onclick = (e) => { // delegated: every press on the list is a <button>
1072
1118
  const b = e.target.closest('button'); if (!b) return;
1073
1119
  const d = b.dataset;
1074
- if (d.hmSel) { select(d.hmSel); return; }
1120
+ if (d.hmSel) { if (S.day) S.day = false; select(d.hmSel); return; }
1121
+ if ('hmDay' in d) { day(!S.day); return; }
1122
+ if ('hmDayx' in d) { day(false); return; }
1123
+ if ('hmFlt' in d) { filterMenu(b); return; }
1124
+ if (d.hmProg) { location.href = '/premium-board.html?program=' + encodeURIComponent(d.hmProg) + wsQ('&'); return; } // the program panel (the Board opens it)
1075
1125
  if (d.hmKids) { // the chevron of an initiative: what sits under it shows or hides
1076
1126
  if (b.getAttribute('aria-expanded') === 'true') { S.kids.delete(d.hmKids); S.kidsOff.add(d.hmKids); } else { S.kids.add(d.hmKids); S.kidsOff.delete(d.hmKids); }
1077
- drawList(); const f = $(`#hmList [data-hm-kids="${CSS.escape(d.hmKids)}"]`); if (f) f.focus(); return;
1127
+ keepKids(); drawList(); const f = $(`#hmList [data-hm-kids="${CSS.escape(d.hmKids)}"]`); if (f) f.focus(); return;
1078
1128
  }
1079
1129
  if (d.hmPg) { const open = b.getAttribute('aria-expanded') === 'true'; S.pg[d.hmPg] = !open; store.set('pmos.home.pg', JSON.stringify(S.pg)); drawList(); const f = $(`#hmList [data-hm-pg="${CSS.escape(d.hmPg)}"]`); if (f) f.focus(); return; }
1080
1130
  if ('hmProd' in d) { goIni('product'); return; }
1081
- if (d.hmTasks) { if (S.tasks.has(d.hmTasks)) S.tasks.delete(d.hmTasks); else S.tasks.add(d.hmTasks); drawList(); return; }
1082
- if (d.hmRest) { if (S.rest.has(d.hmRest)) S.rest.delete(d.hmRest); else S.rest.add(d.hmRest); drawList(); return; }
1131
+ if (d.hmTasks) { if (S.tasks.has(d.hmTasks)) S.tasks.delete(d.hmTasks); else S.tasks.add(d.hmTasks); keepKids(); drawList(); return; }
1132
+ if (d.hmRest) { if (S.rest.has(d.hmRest)) S.rest.delete(d.hmRest); else S.rest.add(d.hmRest); keepKids(); drawList(); return; }
1083
1133
  if (d.hmFilter) { S.filter = S.filter === d.hmFilter ? 'today' : d.hmFilter; drawList(); const f = $(`#hmList [data-hm-filter="${d.hmFilter}"]`); if (f) f.focus(); return; }
1084
1134
  if (d.hmCheck) { checkRow(d.hmCheck); return; }
1085
- if ('hmReview' in d) { openReviewVw(); return; }
1135
+ if ('hmReview' in d) { if (S.day) day(false); openReviewVw(); return; }
1086
1136
  if ('hmPick' in d) { pickProduct(b); return; }
1087
1137
  if ('hmCapmic' in d) { const i = $('#hmCap'); if (i) capMic(i, b); return; }
1088
- if (d.hmTc) { todayPress(d.hmTc, b); return; }
1138
+ if (d.hmTc) { if (S.day && d.hmTc === 'cal') day(false); todayPress(d.hmTc, b); return; }
1089
1139
  if (d.hmEnd) { endRow(d.hmEnd); return; }
1090
1140
  if (d.hmGroup) { if (S.shut.has(d.hmGroup)) S.shut.delete(d.hmGroup); else S.shut.add(d.hmGroup); store.set('pmos.home.shut', JSON.stringify([...S.shut])); drawList(); return; }
1091
1141
  if ('hmAllneeds' in d) { S.allNeeds = !S.allNeeds; drawList(); return; }
@@ -1104,7 +1154,7 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
1104
1154
  if ('hmElse' in d) { const f = S.lay && S.lay.elsewhere && S.lay.elsewhere.first; goHome(); if (f) select(f.id); return; }
1105
1155
  if ('hmPerson' in d) addPerson();
1106
1156
  };
1107
- $('#hmList').addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'hmCap' && S.cap) { e.stopPropagation(); S.cap = false; drawList(); } });
1157
+ $('#hmList').addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'hmCap' && S.cap) { e.stopPropagation(); S.cap = false; drawList(); } else if (e.key === 'Escape' && S.day) { e.stopPropagation(); day(false); } });
1108
1158
  $('#hmList').addEventListener('submit', async (e) => { // the capture box: Enter adds the task
1109
1159
  if (e.target.id !== 'hmCapF') return;
1110
1160
  e.preventDefault();
@@ -1190,8 +1240,14 @@ load().then(() => {
1190
1240
  const asked = !ask ? '' : /^board:/.test(ask) ? ask : /^(insights|verdict)$/.test(ask) ? 'ins:' + ask : 'init:' + ask;
1191
1241
  const about = KEY.test(P.get('about') || '') ? P.get('about') : KEY.test(asked) ? asked : null;
1192
1242
  if (isPhone() && ((open && !blockOpen) || sid || about)) { S.phoneChat = true; drawList(); } // the conversation the address names, not the list
1193
- if (open && !blockOpen) { const r = allRows().find((x) => x.key === open); if (r) select(r.id); else if (KEY.test(open)) openTarget({ ...homeTarget(), key: open, title: open }); }
1243
+ if (open && !blockOpen) {
1244
+ // ?item=pt:<program>:<key> (the program panel's link to a program task) names the row by its id; its program group opens to show it
1245
+ const r = allRows().find((x) => x.key === open || (/^pt:/.test(open) && x.id === open));
1246
+ if (r && r.kind === 'ptask') { S.pg['g:' + r.program] = true; drawList(); }
1247
+ if (r) select(r.id); else if (KEY.test(open)) openTarget({ ...homeTarget(), key: open, title: open });
1248
+ }
1194
1249
  else if (sid) { const s = S.D.sessions.find((x) => x.id === sid); if (s) { S.sel = 's:' + s.id; openTarget(sessionTarget(s)); drawList(); } else { openTarget(homeTarget()); toast('That session is not on this machine.'); } }
1250
+ else if (/^program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(ask)) openTarget(programTarget(ask.slice(8))); // Ask in Home from the program panel
1195
1251
  else if (about && /^init:/.test(about) && iniRowOf(about.slice(5))) goIni(about.slice(5));
1196
1252
  else if (about) openTarget({ ...homeTarget(), key: about, title: (P.get('label') || '').slice(0, 80) || about });
1197
1253
  else if (S.ini && P.get('view') === 'metrics') goIni(S.ini).then(() => openMetrics()); // ?view=metrics: the metrics review, as its Open in a new tab names it