@gotcos/glasses-server 6.98.1 → 6.99.16

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 (98) hide show
  1. package/CHANGELOG.md +227 -0
  2. package/package.json +2 -1
  3. package/server/index.ts +170 -11
  4. package/server/lib/api-auth.ts +31 -14
  5. package/server/lib/claude-bridge.ts +21 -2
  6. package/server/lib/codex-bridge.ts +21 -2
  7. package/server/lib/cos-thread.ts +582 -0
  8. package/server/lib/display-bus.ts +3 -0
  9. package/server/lib/drop-attachments.ts +55 -0
  10. package/server/lib/drop-destinations.ts +134 -0
  11. package/server/lib/drop-history-search.ts +97 -0
  12. package/server/lib/drop-p2-boot.ts +60 -0
  13. package/server/lib/drop-p2-runtime.ts +237 -0
  14. package/server/lib/drop-p2-settings.ts +174 -0
  15. package/server/lib/drop-resolution.ts +168 -0
  16. package/server/lib/drop-router.ts +325 -0
  17. package/server/lib/drop-service.ts +830 -0
  18. package/server/lib/drop-settings.ts +56 -0
  19. package/server/lib/drop-store.ts +450 -0
  20. package/server/lib/drop-when.ts +265 -0
  21. package/server/lib/glasses-pairing.ts +15 -0
  22. package/server/lib/learning-needs-you.ts +111 -0
  23. package/server/lib/live-cues-v2-settings.ts +2 -1
  24. package/server/lib/live-cues-v2.ts +6 -4
  25. package/server/lib/media-store.ts +80 -0
  26. package/server/lib/meeting-batch-transcribe.ts +15 -2
  27. package/server/lib/meeting-consolidation-run.ts +169 -0
  28. package/server/lib/meeting-store.ts +61 -0
  29. package/server/lib/meeting-title-steer.ts +200 -0
  30. package/server/lib/network-policy.ts +84 -6
  31. package/server/lib/permission-broker.ts +13 -0
  32. package/server/lib/phone-recording.ts +1 -1
  33. package/server/lib/ping-budget.ts +149 -0
  34. package/server/lib/ping-engine.ts +245 -0
  35. package/server/lib/ping-feed-sink.ts +33 -0
  36. package/server/lib/ping-sources.ts +192 -0
  37. package/server/lib/query-job-coordinator.ts +5 -2
  38. package/server/lib/query-job-runtime.ts +45 -4
  39. package/server/lib/query-job-types.ts +10 -1
  40. package/server/lib/reminder-scheduler.ts +153 -0
  41. package/server/lib/tailnet-self-name.ts +103 -0
  42. package/server/lib/tailscale-nudge.ts +40 -2
  43. package/server/lib/task-store.ts +32 -0
  44. package/server/lib/web-ask-admission.ts +56 -0
  45. package/server/lib/web-live-chunks.ts +273 -0
  46. package/server/lib/web-memories-bridge.ts +323 -0
  47. package/server/lib/web-session-auth.ts +492 -0
  48. package/server/lib/web-usage-bridge.ts +154 -0
  49. package/server/lib/work-search.ts +14 -1
  50. package/server/lib/your-move-count.ts +58 -0
  51. package/server/routes/cos-thread.ts +79 -0
  52. package/server/routes/display.ts +11 -1
  53. package/server/routes/drops.ts +262 -0
  54. package/server/routes/health.ts +16 -0
  55. package/server/routes/live-cues.ts +5 -4
  56. package/server/routes/meeting.ts +61 -5
  57. package/server/routes/permission-broker.ts +23 -3
  58. package/server/routes/transcribe-stream.ts +43 -4
  59. package/server/routes/web-control.ts +569 -0
  60. package/server/routes/welcome-context.ts +2 -1
  61. package/server/scripts/web-live-cls/cdp.mjs +57 -0
  62. package/server/scripts/web-live-cls/measure.mjs +80 -0
  63. package/server/scripts/web-live-cls/mock.mjs +97 -0
  64. package/server/scripts/web-live-cls/render.mjs +26 -0
  65. package/server/web-control/app.css +519 -0
  66. package/server/web-control/app.js +3643 -0
  67. package/server/web-control/control.css +325 -0
  68. package/server/web-control/fonts/DMSans.ttf +0 -0
  69. package/server/web-control/fonts/Fraunces.ttf +0 -0
  70. package/server/web-control/fonts/JetBrainsMono.ttf +0 -0
  71. package/server/web-control/index.html +275 -0
  72. package/server/web-control/mark.svg +1 -0
  73. package/server/web-control/memories/d3.min.js +2 -0
  74. package/server/web-control/memories/graph-explorer.css +200 -0
  75. package/server/web-control/memories/graph-explorer.js +748 -0
  76. package/server/web-control/memories/memories-app.js +1561 -0
  77. package/server/web-control/memories/memories-theme.css +73 -0
  78. package/server/web-control/memories/memories.html +72 -0
  79. package/server/web-control/memories/memory-stewardship.js +63 -0
  80. package/server/web-control/memories/memory-workspace.js +216 -0
  81. package/server/web-control/panes/cos-chat.css +174 -0
  82. package/server/web-control/panes/cos-chat.js +1118 -0
  83. package/server/web-control/panes/dictation.js +173 -0
  84. package/server/web-control/panes/meetings.css +314 -0
  85. package/server/web-control/panes/meetings.js +2568 -0
  86. package/server/web-control/panes/messages.js +718 -0
  87. package/server/web-control/panes/questions.css +32 -0
  88. package/server/web-control/panes/questions.js +275 -0
  89. package/server/web-control/panes/sessions.css +452 -0
  90. package/server/web-control/panes/settings.js +292 -0
  91. package/server/web-control/panes/speakers.css +269 -0
  92. package/server/web-control/panes/speakers.js +2755 -0
  93. package/server/web-control/panes/threads.js +200 -0
  94. package/server/web-control/panes/work.css +261 -0
  95. package/server/web-control/panes/work.js +1667 -0
  96. package/server/web-control/shell.js +294 -0
  97. package/server/web-control/theme.js +25 -0
  98. package/server/web-control/vendor/qrcode-encoder.js +10 -0
@@ -0,0 +1,519 @@
1
+ /* COS Control Web. Mobile first (iPhone, 375pt), then the native Activity rail from 900px.
2
+ Every colour below is a TodayInk token from cos-control-macos Sources/ActivityWindow.swift,
3
+ so the browser and the Mac app read as one product. */
4
+
5
+ @font-face { font-family: 'DM Sans'; src: url('/control/fonts/DMSans.ttf') format('truetype'); font-weight: 400 700; font-style: normal; font-display: swap; }
6
+ @font-face { font-family: 'Fraunces'; src: url('/control/fonts/Fraunces.ttf') format('truetype'); font-weight: 400 700; font-style: normal; font-display: swap; }
7
+ @font-face { font-family: 'JetBrains Mono'; src: url('/control/fonts/JetBrainsMono.ttf') format('truetype'); font-weight: 400 600; font-style: normal; font-display: swap; }
8
+
9
+ :root {
10
+ --page: #f5f0e6;
11
+ --rail: #efe8db;
12
+ --rail-border: #e0d5c0;
13
+ --rail-active: #ffffff;
14
+ --ink: #1f1712;
15
+ --sub: #66635e;
16
+ --grey: #5c5a55;
17
+ --hot: #8a4b1c;
18
+ --panel: #ffffff;
19
+ --panel-border: #e3d9c6;
20
+ --row-border: #efe7d8;
21
+ --qopen: #fbf7ef;
22
+ --accent: #89662d;
23
+ --on-accent: #ffffff;
24
+ --btn-border: #a08a66;
25
+ --btn-bg: #ffffff;
26
+ --run-bg: #2b211a;
27
+ --run-border: #2b211a;
28
+ --run-title: #f2ebe0;
29
+ --run-sub: #bbae9a;
30
+ --run-open: #e2c58f;
31
+ --run-count: #c9a86e;
32
+ --run-line: rgba(201, 168, 110, 0.20);
33
+ --ok: #1f6b3d;
34
+ --rec: #c8452f;
35
+ --rec-border: #e59a8c;
36
+ --kbd-border: #d8ccb6;
37
+ --pulse: #7fd19b;
38
+ --shadow: 0 1px 2px rgba(43, 33, 26, 0.05), 0 6px 18px rgba(43, 33, 26, 0.05);
39
+
40
+ --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
41
+ --body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
42
+ --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
43
+
44
+ --gutter: 16px;
45
+ --radius-lg: 18px;
46
+ --radius: 12px;
47
+ --radius-sm: 9px;
48
+ --topbar-h: 48px;
49
+ --safe-top: env(safe-area-inset-top, 0px);
50
+ --safe-bottom: env(safe-area-inset-bottom, 0px);
51
+ --safe-left: env(safe-area-inset-left, 0px);
52
+ --safe-right: env(safe-area-inset-right, 0px);
53
+
54
+ color-scheme: light;
55
+ }
56
+
57
+ :root[data-theme='dark'] {
58
+ --page: #17120e;
59
+ --rail: #1c1611;
60
+ --rail-border: #2e251d;
61
+ --rail-active: #2a2119;
62
+ --ink: #efe7dc;
63
+ --sub: #b3a796;
64
+ --grey: #a39887;
65
+ --hot: #e8a46c;
66
+ --panel: #221b15;
67
+ --panel-border: #3a2f25;
68
+ --row-border: #2e251d;
69
+ --qopen: #2a2119;
70
+ --accent: #d9b06a;
71
+ --on-accent: #17120e;
72
+ --btn-border: #7a6650;
73
+ --btn-bg: #221b15;
74
+ --run-bg: #2f241b;
75
+ --run-border: #7a6650;
76
+ --run-title: #f2ebe0;
77
+ --run-sub: #c4b6a1;
78
+ --run-open: #e6c78f;
79
+ --run-count: #e6c78f;
80
+ --run-line: rgba(230, 199, 143, 0.18);
81
+ --ok: #6ccf8f;
82
+ --rec: #e8705c;
83
+ --rec-border: #8a3a2c;
84
+ --kbd-border: #4a3d30;
85
+ --shadow: none;
86
+ color-scheme: dark;
87
+ }
88
+
89
+ *, *::before, *::after { box-sizing: border-box; }
90
+ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--page); }
91
+ body {
92
+ margin: 0;
93
+ min-height: 100dvh;
94
+ background: var(--page);
95
+ color: var(--ink);
96
+ font: 400 16px/1.45 var(--body);
97
+ -webkit-font-smoothing: antialiased;
98
+ -webkit-tap-highlight-color: transparent;
99
+ }
100
+ button, input, select, textarea { font: inherit; color: inherit; }
101
+ button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
102
+ a { color: var(--accent); }
103
+ .hidden { display: none !important; }
104
+ .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
105
+ :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
106
+ svg.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
107
+
108
+ /* ── Sign in ─────────────────────────────────────────────── */
109
+ .auth-gate { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-top) + 24px) var(--gutter) calc(var(--safe-bottom) + 24px); }
110
+ .auth-card { width: 100%; max-width: 420px; }
111
+ .auth-card .mark { width: 44px; height: 44px; margin-bottom: 22px; }
112
+ .auth-card h1 { font: 500 40px/1.05 var(--display); margin: 0 0 10px; letter-spacing: -0.01em; }
113
+ .auth-card p { color: var(--sub); margin: 0 0 24px; }
114
+ .auth-card label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
115
+ .auth-card .btn { margin-top: 12px; }
116
+ .auth-foot { font-size: 14px; color: var(--sub); margin-top: 18px; }
117
+
118
+ /* ── Controls ────────────────────────────────────────────── */
119
+ .field {
120
+ width: 100%;
121
+ min-height: 48px;
122
+ padding: 12px 14px;
123
+ border-radius: var(--radius);
124
+ border: 1px solid var(--panel-border);
125
+ background: var(--panel);
126
+ font-size: 16px; /* 16px keeps iOS Safari from zooming on focus */
127
+ }
128
+ .field::placeholder { color: var(--grey); }
129
+ .field:focus { outline: none; border-color: var(--accent); }
130
+ textarea.field { resize: none; line-height: 1.4; }
131
+ select.field {
132
+ appearance: none; -webkit-appearance: none; padding-right: 36px;
133
+ background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%);
134
+ background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
135
+ }
136
+
137
+ .btn {
138
+ display: inline-flex; align-items: center; justify-content: center; gap: 8px;
139
+ min-height: 44px; padding: 0 18px;
140
+ border-radius: var(--radius);
141
+ border: 1px solid var(--btn-border);
142
+ background: var(--btn-bg);
143
+ font-weight: 600; font-size: 15px;
144
+ white-space: nowrap;
145
+ transition: transform 120ms ease;
146
+ }
147
+ .btn:active { transform: scale(0.98); }
148
+ .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
149
+ .btn.block { width: 100%; }
150
+ .btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
151
+ .btn:disabled { opacity: 0.55; cursor: default; transform: none; }
152
+ .link-btn { color: var(--accent); font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
153
+ .kbd { font: 500 12px/1 var(--mono); padding: 4px 6px; border: 1px solid var(--kbd-border); border-radius: 6px; color: var(--sub); }
154
+
155
+ /* ── Shell ───────────────────────────────────────────────── */
156
+ .topbar {
157
+ position: sticky; top: 0; z-index: 20;
158
+ height: calc(var(--topbar-h) + var(--safe-top));
159
+ padding: var(--safe-top) calc(var(--gutter) + var(--safe-right)) 0 calc(var(--gutter) + var(--safe-left));
160
+ display: flex; align-items: center; justify-content: space-between; gap: 12px;
161
+ background: color-mix(in srgb, var(--page) 88%, transparent);
162
+ -webkit-backdrop-filter: saturate(1.4) blur(14px);
163
+ backdrop-filter: saturate(1.4) blur(14px);
164
+ border-bottom: 1px solid transparent;
165
+ transition: border-color 160ms ease, transform 220ms ease;
166
+ }
167
+ .topbar.scrolled { border-bottom-color: var(--rail-border); }
168
+ .topbar.tucked { transform: translateY(calc(-100% - 2px)); }
169
+ .section-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 18px/1.1 var(--body); min-width: 0; }
170
+ .section-btn .caret { width: 7px; height: 7px; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: rotate(45deg) translateY(-2px); flex: none; }
171
+ .section-btn .dot { margin-left: 2px; }
172
+ .icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); }
173
+ .icon-btn .icon { width: 22px; height: 22px; }
174
+ .topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
175
+ .topbar-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 8px; color: var(--accent); font-weight: 600; margin-left: -4px; }
176
+ .topbar-back .icon { width: 20px; height: 20px; stroke-width: 2; }
177
+ .topbar-title { font: 600 17px/1.2 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
178
+ .mark { width: 28px; height: 28px; color: var(--ink); flex: none; }
179
+ .host-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 14px; color: var(--sub); max-width: 55vw; }
180
+ .host-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
181
+ .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey); flex: none; }
182
+ .dot.ok { background: var(--ok); }
183
+ .dot.live { background: var(--rec); }
184
+
185
+ .workspace {
186
+ padding: 4px calc(var(--gutter) + var(--safe-right)) calc(var(--safe-bottom) + 96px) calc(var(--gutter) + var(--safe-left));
187
+ }
188
+ .pane { max-width: 880px; }
189
+ .pane-head { margin: 8px 0 18px; }
190
+ .pane-title { font: 500 40px/1.02 var(--display); letter-spacing: -0.015em; margin: 0; }
191
+ .pane-sub { color: var(--sub); margin: 6px 0 0; font-size: 15px; }
192
+
193
+ /* No bottom bar, on purpose. On the iPhone Duo, Safari owns the bottom edge on both screens
194
+ (a floating address pill on the closed screen), and iOS 26 WebKit stops drawing the page under
195
+ its bar while any fixed element sits within ~60px of it. Navigation lives in the top bar
196
+ (closed screen) or the left rail (open screen and up). */
197
+ .badge-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--hot); }
198
+
199
+ .rail { display: none; }
200
+
201
+ /* ── Today ───────────────────────────────────────────────── */
202
+ .today-date { color: var(--sub); font-size: 15px; margin: 6px 0 0; }
203
+ .ask-bar {
204
+ display: flex; align-items: center; gap: 10px; width: 100%;
205
+ min-height: 52px; padding: 0 14px; margin-top: 16px;
206
+ border-radius: 14px; border: 1px solid var(--btn-border); background: var(--btn-bg);
207
+ color: var(--sub); font-size: 16px; text-align: left;
208
+ }
209
+ .ask-bar .icon { color: var(--ink); width: 20px; height: 20px; }
210
+ .ask-bar .ask-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
211
+ .ask-bar .kbd { display: none; }
212
+
213
+ .rec-banner {
214
+ display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
215
+ margin-top: 14px; padding: 10px 10px 10px 16px;
216
+ border-radius: 14px; border: 1.5px solid var(--rec-border); background: var(--panel);
217
+ }
218
+ .rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rec); flex: none; animation: rec 1.6s ease-in-out infinite; }
219
+ .rec-copy { flex: 1; min-width: 0; }
220
+ .rec-copy strong { display: block; font-size: 16px; }
221
+ .rec-copy span { display: block; color: var(--sub); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
222
+ @keyframes rec { 50% { opacity: 0.35; } }
223
+
224
+ .story { font: 400 24px/1.28 var(--display); letter-spacing: -0.005em; margin: 26px 2px; text-wrap: pretty; }
225
+ .story-skel { display: grid; gap: 12px; margin: 30px 0; }
226
+ .story-skel .skeleton { height: 22px; }
227
+
228
+ .run-panel { background: var(--run-bg); border: 1px solid var(--run-border); border-radius: var(--radius-lg); padding: 14px 16px 2px; color: var(--run-title); }
229
+ .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
230
+ .panel-title { font: 600 19px/1.2 var(--body); margin: 0; }
231
+ .panel-title .count { margin-left: 7px; color: var(--accent); }
232
+ .run-panel .panel-title .count { color: var(--run-count); }
233
+ .run-panel .link-btn { color: var(--run-open); }
234
+ .run-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 13px 0; border-top: 1px solid var(--run-line); width: 100%; text-align: left; }
235
+ .run-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
236
+ .run-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
237
+ .run-meta { color: var(--run-sub); font-size: 14px; }
238
+ .run-more { display: block; width: 100%; text-align: left; color: var(--run-open); font-size: 15px; font-weight: 500; padding: 13px 0 14px; border-top: 1px solid var(--run-line); }
239
+ .run-empty { color: var(--run-sub); font-size: 15px; padding: 4px 0 16px; }
240
+ .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--pulse); flex: none; animation: pulse 2s ease-out infinite; }
241
+ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(127, 209, 155, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(127, 209, 155, 0); } }
242
+
243
+ .badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
244
+ .badge.claude { background: #f3dcc4; color: #4a2a12; }
245
+ .badge.codex { background: #d3e8da; color: #163a24; }
246
+ .badge.cursor { background: #d9def0; color: #1d2a52; }
247
+ .badge.glasses { background: #f2d2cc; color: #4a1a14; }
248
+ .badge.work { background: #e8dfcf; color: #3d3428; }
249
+
250
+ .card { margin-top: 16px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
251
+ .card > .panel-head { padding: 8px 16px 6px; }
252
+ .need-row { display: block; width: 100%; text-align: left; padding: 14px 16px 16px; border-top: 1px solid var(--row-border); background: var(--qopen); }
253
+ .need-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
254
+ .need-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
255
+ .need-age { color: var(--sub); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
256
+ .need-foot { color: var(--sub); font-size: 14px; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
257
+ .need-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
258
+ .card-empty { padding: 4px 16px 18px; color: var(--sub); }
259
+
260
+ .next-up { display: flex; align-items: center; gap: 14px; padding: 6px 16px 16px; }
261
+ .next-up .when { font: 500 24px/1 var(--display); white-space: nowrap; }
262
+ .next-up .what { font-weight: 600; }
263
+ .next-up .sub { color: var(--sub); font-size: 14px; }
264
+
265
+ /* ── Lists (sessions, meetings, messages) ────────────────── */
266
+ .list { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
267
+ .group-title { font: 600 15px/1.2 var(--body); color: var(--sub); margin: 22px 4px 8px; display: flex; justify-content: space-between; gap: 12px; }
268
+ .group-title:first-child { margin-top: 6px; }
269
+ .row {
270
+ display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start;
271
+ width: 100%; min-height: 56px; padding: 13px 16px; text-align: left;
272
+ border-top: 1px solid var(--row-border);
273
+ }
274
+ .row:first-child { border-top: 0; }
275
+ .row:active { background: var(--qopen); }
276
+ .row[aria-selected='true'] { background: var(--qopen); box-shadow: inset 3px 0 0 var(--accent); }
277
+ .row-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
278
+ .row-side { color: var(--sub); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
279
+ .row-sub { grid-column: 1 / -1; color: var(--sub); font-size: 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
280
+ .row-sub .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
281
+ .row-body { grid-column: 1 / -1; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
282
+ .empty { color: var(--sub); padding: 20px 16px; font-size: 15px; }
283
+ .empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
284
+ .skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--row-border) 20%, var(--qopen) 50%, var(--row-border) 80%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
285
+ .skel-row { padding: 16px; border-top: 1px solid var(--row-border); display: grid; gap: 9px; }
286
+ .skel-row:first-child { border-top: 0; }
287
+ @keyframes shimmer { to { background-position: -200% 0; } }
288
+
289
+ .searchline { display: flex; gap: 8px; }
290
+ .searchline .field { flex: 1; min-width: 0; }
291
+ .mode-switch { display: flex; gap: 20px; margin: 8px 4px 0; font-size: 14px; }
292
+ .mode-switch button { min-height: 40px; color: var(--sub); font-weight: 600; border-bottom: 2px solid transparent; }
293
+ .mode-switch button[aria-pressed='true'] { color: var(--ink); border-bottom-color: var(--accent); }
294
+
295
+ /* Reader: a pushed screen on the phone, the right column on desktop. */
296
+ .split .reader { display: none; }
297
+ .split.reading .split-list { display: none; }
298
+ .split.reading .reader { display: block; }
299
+ .split.reading ~ .pane-head, .pane.reading .pane-head { display: none; }
300
+ .reader-head h2 { font: 500 28px/1.12 var(--display); margin: 6px 0 8px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
301
+ .reader-head .row-sub { padding: 0; flex-wrap: wrap; }
302
+ .reader-placeholder { color: var(--sub); padding: 28px 4px; }
303
+ .turns { display: grid; gap: 10px; margin-top: 16px; }
304
+ .turn { max-width: 92%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
305
+ .turn.user { justify-self: end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
306
+ .turn.assistant { justify-self: start; background: var(--panel); border: 1px solid var(--panel-border); border-bottom-left-radius: 6px; }
307
+ .turn .who { display: block; font-size: 12px; font-weight: 600; opacity: 0.75; margin-bottom: 3px; }
308
+ .turn.clamped { max-height: 16.5em; overflow: hidden; position: relative; }
309
+ .turn-more { justify-self: start; font-size: 14px; }
310
+ .doc { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); padding: 16px; margin-top: 14px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
311
+
312
+ .composer {
313
+ position: relative; z-index: 10;
314
+ margin-top: 16px; padding: 6px 6px 6px 10px; display: flex; gap: 6px; align-items: flex-end;
315
+ background: var(--panel); border: 1px solid var(--btn-border); border-radius: 16px; box-shadow: var(--shadow);
316
+ }
317
+ .composer textarea { flex: 1; min-width: 0; border: 0; min-height: 44px; max-height: 140px; padding: 11px 4px; background: transparent; font-size: 16px; resize: none; }
318
+ .composer textarea:focus { outline: none; }
319
+ .composer-actions { display: flex; gap: 6px; }
320
+ .status-line { color: var(--sub); font-size: 14px; margin: 8px 4px 0; min-height: 20px; }
321
+ .status-line.error { color: var(--hot); }
322
+
323
+ /* Work */
324
+ .stage { margin-top: 20px; }
325
+ .stage-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; }
326
+ .stage-head h2 { font: 600 17px/1.2 var(--body); margin: 0; }
327
+ .stage-head .count { color: var(--sub); font-size: 14px; }
328
+ .row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
329
+ .row-actions .link-btn { min-height: 36px; font-size: 14px; }
330
+ .capture { margin-top: 10px; }
331
+ .capture-row { display: flex; gap: 8px; }
332
+ .capture-row .field { flex: 1; min-width: 0; }
333
+ .capture-row .domain-pick { flex: 0 0 auto; width: 104px; padding-left: 12px; color: var(--sub); }
334
+ .turn code, .doc code { font: 13px/1.4 var(--mono); background: color-mix(in srgb, var(--row-border) 70%, transparent); padding: 1px 5px; border-radius: 5px; }
335
+ .turn.user code { background: rgba(255, 255, 255, 0.18); }
336
+ .turn .quote { display: inline-block; border-left: 3px solid var(--panel-border); padding-left: 10px; color: var(--sub); }
337
+ .intake-note { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--qopen); border: 1px solid var(--panel-border); font-size: 15px; }
338
+
339
+ /* Usage */
340
+ .meter { height: 6px; border-radius: 4px; background: var(--row-border); overflow: hidden; margin-top: 8px; grid-column: 1 / -1; }
341
+ .meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
342
+ .stat-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 16px; }
343
+ .big-number { font: 500 44px/1 var(--display); letter-spacing: -0.02em; }
344
+ .stat-line .sub { color: var(--sub); }
345
+
346
+ /* Settings and More */
347
+ .setting { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 13px 16px; border-top: 1px solid var(--row-border); min-height: 56px; width: 100%; text-align: left; }
348
+ .setting:first-child { border-top: 0; }
349
+ .setting .name { font-weight: 600; }
350
+ .setting .desc { grid-column: 1; color: var(--sub); font-size: 14px; }
351
+ .setting .value { color: var(--sub); font-size: 15px; grid-row: 1 / span 2; grid-column: 2; }
352
+ .nav-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 16px; border-top: 1px solid var(--row-border); font-weight: 600; text-align: left; }
353
+ .nav-row:first-child { border-top: 0; }
354
+ .nav-row .icon { color: var(--accent); }
355
+ .nav-row .grow { flex: 1; min-width: 0; }
356
+ .nav-row .note { color: var(--sub); font-weight: 400; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
357
+ .chev { width: 8px; height: 8px; border-right: 2px solid var(--grey); border-bottom: 2px solid var(--grey); transform: rotate(-45deg); flex: none; opacity: 0.7; }
358
+ .check { color: var(--accent); font-weight: 700; }
359
+ .switch { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--row-border); border: 1px solid var(--panel-border); flex: none; transition: background-color 160ms ease; grid-row: 1 / span 2; grid-column: 2; }
360
+ .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 160ms ease; }
361
+ .switch[aria-checked='true'] { background: var(--ok); border-color: var(--ok); }
362
+ .switch[aria-checked='true']::after { transform: translateX(20px); }
363
+
364
+ /* Speakers */
365
+ .speaker-row audio { width: 100%; height: 40px; margin-top: 8px; grid-column: 1 / -1; }
366
+ .speaker-row .capture-row { grid-column: 1 / -1; margin-top: 8px; }
367
+
368
+ /* Memories: the native Memories page, hosted as-is. */
369
+ .pane.flush { max-width: none; margin: -4px calc(-1 * (var(--gutter) + var(--safe-right))) 0 calc(-1 * (var(--gutter) + var(--safe-left))); }
370
+ .memories-frame { display: block; width: 100%; height: calc(100dvh - var(--topbar-h) - var(--safe-top)); border: 0; background: var(--page); }
371
+
372
+ /* Ask sheet (⌘K on desktop) */
373
+ .sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(23, 18, 14, 0.45); display: flex; align-items: flex-start; justify-content: center; animation: fade 160ms ease; }
374
+ .sheet {
375
+ width: 100%; max-height: calc(100dvh - 90px); overflow: auto; overscroll-behavior: contain;
376
+ background: var(--page); border-radius: 0 0 20px 20px;
377
+ padding: calc(var(--safe-top) + 10px) var(--gutter) 14px;
378
+ animation: drop 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
379
+ }
380
+ .sheet-grip { display: none; }
381
+ .menu-host { display: flex; align-items: center; gap: 8px; color: var(--sub); font-size: 14px; margin: 6px 4px 12px; }
382
+ .sheet-head { display: flex; gap: 10px; align-items: center; }
383
+ .sheet-head .field { flex: 1; }
384
+ @keyframes fade { from { opacity: 0; } }
385
+ @keyframes drop { from { transform: translateY(-24px); opacity: 0.5; } }
386
+
387
+ .toast { position: fixed; left: 50%; top: calc(var(--safe-top) + 58px); transform: translateX(-50%); z-index: 60; background: var(--run-bg); color: var(--run-title); padding: 11px 16px; border-radius: 12px; font-size: 15px; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
388
+
389
+ /* ── Closed Duo and other phones (under 600px): the top bar names the section, so only
390
+ Today keeps its large title. */
391
+ @media (max-width: 599px) {
392
+ .pane .pane-head .pane-title { display: none; }
393
+ #pane-today .pane-head { margin-top: 0; }
394
+ #pane-today .today-date { margin-top: 2px; }
395
+ .row { padding: 11px 14px; min-height: 52px; }
396
+ .badge { height: 22px; padding: 0 8px; font-size: 12.5px; border-radius: 6px; }
397
+ .pane:not(#pane-today) .pane-head { margin: 4px 0 12px; }
398
+ .pane:not(#pane-today) .pane-head .pane-sub { margin-top: 0; }
399
+ }
400
+
401
+ /* ── Short screens: the closed Duo is ~678px tall with ~76px under Safari's pill, the open
402
+ Duo ~626px. Height is the scarce axis, so the type steps down here, not by width. */
403
+ @media (max-height: 720px) {
404
+ .pane-title { font-size: 34px; }
405
+ .today-date { font-size: 14px; margin-top: 4px; }
406
+ .ask-bar { min-height: 46px; margin-top: 12px; }
407
+ .story { font-size: 21px; line-height: 1.3; margin: 18px 2px; }
408
+ .run-panel { padding-top: 8px; }
409
+ .run-row { padding: 10px 0; }
410
+ .card > .panel-head { padding: 4px 16px 2px; }
411
+ .need-row { padding: 12px 16px 13px; }
412
+ .need-actions { margin-top: 9px; }
413
+ .rec-banner { margin-top: 10px; padding: 8px 8px 8px 14px; }
414
+ }
415
+
416
+ /* ── Open Duo (~890x626), tablets, desktop: a labelled left rail costs width, which is the
417
+ axis there is plenty of. */
418
+ @media (min-width: 600px) {
419
+ :root { --gutter: 24px; }
420
+ .topbar { display: none; }
421
+ .app-shell { display: grid; grid-template-columns: 74px minmax(0, 1fr); min-height: 100dvh; }
422
+ .rail {
423
+ display: flex; flex-direction: column; align-items: center; gap: 2px;
424
+ position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: calc(var(--safe-top) + 14px) 0 14px;
425
+ background: var(--rail); border-right: 1px solid var(--rail-border);
426
+ }
427
+ .rail .mark { width: 30px; height: 30px; margin-bottom: 10px; flex: none; }
428
+ .rail-btn { position: relative; width: 62px; min-height: 50px; padding: 6px 0 5px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--grey); flex: none; }
429
+ .rail-btn .icon { width: 21px; height: 21px; }
430
+ .rail-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1; }
431
+ .rail-btn:hover { color: var(--ink); }
432
+ .rail-btn[aria-current='page'] { background: var(--rail-active); color: var(--ink); box-shadow: 0 1px 2px rgba(43, 33, 26, 0.08); }
433
+ .rail-btn .badge-dot { top: 6px; right: 14px; }
434
+ .rail-sep { width: 30px; height: 1px; background: var(--rail-border); margin: 4px 0; flex: none; }
435
+ .rail-spacer { flex: 1; min-height: 8px; }
436
+ .rail .dot { margin-top: 8px; flex: none; }
437
+ .workspace { padding: calc(var(--safe-top) + 22px) calc(var(--gutter) + var(--safe-right)) calc(var(--safe-bottom) + 40px) var(--gutter); }
438
+ .pane-head.with-ask { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
439
+ .pane-head.with-ask .ask-bar { max-width: 400px; margin-top: 0; }
440
+ .ask-bar .kbd { display: inline-block; }
441
+ .pane-title { font-size: 44px; }
442
+ .story { font-size: 26px; }
443
+ .run-row { grid-template-columns: 118px minmax(0, 1fr); gap: 2px 14px; align-items: start; }
444
+ .run-who { grid-row: 1 / span 2; padding-top: 1px; }
445
+ .run-title, .run-meta { grid-column: 2; }
446
+ .composer { position: sticky; bottom: calc(var(--safe-bottom) + 12px); }
447
+ .toast { top: auto; bottom: 24px; }
448
+ .pane.flush { margin: calc(-1 * (var(--safe-top) + 22px)) calc(-1 * (var(--gutter) + var(--safe-right))) calc(-1 * (var(--safe-bottom) + 40px)) calc(-1 * var(--gutter)); }
449
+ .memories-frame { height: 100dvh; }
450
+ .sheet-backdrop { padding-top: 8vh; }
451
+ .sheet { max-width: 620px; border-radius: 18px; padding: 16px 18px 18px; max-height: 80dvh; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
452
+ }
453
+
454
+ /* Open Duo short screen: keep the rail's nine sections inside ~626px. */
455
+ @media (min-width: 600px) and (max-height: 720px) {
456
+ .pane:not(#pane-today) .pane-head .pane-title { display: none; }
457
+ .pane:not(#pane-today) .pane-head { margin: 0 0 12px; }
458
+ .reader-head h2 { font-size: 24px; }
459
+ .rail { gap: 0; padding-top: calc(var(--safe-top) + 10px); }
460
+ .rail .mark { width: 26px; height: 26px; margin-bottom: 6px; }
461
+ .rail-btn { min-height: 46px; padding: 5px 0 4px; }
462
+ .rail-sep { margin: 2px 0; }
463
+ .workspace { padding-top: calc(var(--safe-top) + 16px); }
464
+ .pane-title { font-size: 36px; }
465
+ .story { font-size: 22px; margin: 16px 2px 18px; }
466
+ }
467
+
468
+ /* Wide enough for two columns: Today splits into story and running beside what needs you,
469
+ and lists sit beside their reader. */
470
+ @media (min-width: 760px) {
471
+ .today-cols { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 18px; align-items: start; }
472
+ .today-cols .story { margin-top: 4px; }
473
+ .today-cols .today-side > .card:first-child { margin-top: 0; }
474
+ .today-cols .run-row { grid-template-columns: 1fr; }
475
+ .today-cols .run-who { grid-row: auto; }
476
+ .today-cols .run-title, .today-cols .run-meta { grid-column: auto; }
477
+ .pane { max-width: 1100px; }
478
+ .pane.wide { max-width: 1240px; }
479
+ .split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
480
+ .split .split-list, .split.reading .split-list { display: block; position: sticky; top: calc(var(--safe-top) + 12px); max-height: calc(100dvh - var(--safe-top) - 24px); overflow: auto; border-radius: var(--radius-lg); }
481
+ .split .reader, .split.reading .reader { display: block; }
482
+ .pane.reading .pane-head { display: block; }
483
+ .pane.reading .pane-head.with-ask { display: flex; }
484
+ }
485
+
486
+ /* ── Desktop ─────────────────────────────────────────────── */
487
+ @media (min-width: 1100px) and (min-height: 721px) {
488
+ :root { --gutter: 40px; }
489
+ .workspace { padding-top: 36px; }
490
+ .pane-title { font-size: 64px; }
491
+ .story { font-size: 31px; margin: 0 0 24px; }
492
+ .today-cols .story { margin-top: 6px; }
493
+ .pane-head.with-ask .ask-bar { max-width: 440px; }
494
+ }
495
+
496
+ @media (prefers-reduced-motion: reduce) {
497
+ *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
498
+ }
499
+ #section-menu .nav-row[aria-current='page'] { background: var(--qopen); box-shadow: inset 3px 0 0 var(--accent); }
500
+
501
+ /* Sign-in code (typed on the phone, shown on the Mac) */
502
+ .code-field { font: 600 22px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }
503
+ .code-field::placeholder { letter-spacing: 0.08em; color: color-mix(in srgb, var(--grey) 55%, transparent); }
504
+ .device-code { padding: 16px; border-top: 1px solid var(--row-border); background: var(--qopen); }
505
+ .device-code .code { display: block; font: 600 34px/1.1 var(--mono); letter-spacing: 0.08em; margin: 2px 0 8px; }
506
+ .device-code p { margin: 0; color: var(--sub); font-size: 14px; }
507
+ .device-code p + p { margin-top: 6px; }
508
+ .device-code .url { color: var(--ink); overflow-wrap: anywhere; }
509
+ #auth-switch { margin-top: 6px; }
510
+
511
+ /* Live work inside a session reader */
512
+ .live-box { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--run-bg); color: var(--run-title); }
513
+ .live-head { display: flex; align-items: center; gap: 10px; min-height: 28px; }
514
+ .live-head strong { font-weight: 600; }
515
+ .live-step { color: var(--run-sub); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
516
+ .live-head .link-btn { color: var(--run-open); margin-left: auto; min-height: 36px; }
517
+ .live-prose { margin-top: 8px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14em; overflow: auto; color: var(--run-title); }
518
+ #session-status .link-btn { min-height: 0; padding: 0; }
519
+ .turn.user.pending { opacity: 0.72; }