create-pmos 0.274.0 → 0.276.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.
@@ -0,0 +1,178 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* premium-phone-card-test.js — the phone moment card on the premium Briefing (initiative premium-phone-card;
4
+ * planning/prd/premium-phone-card-prd.md R1 to R5). A real server on a scratch repository (c3-scan-fixture.js). The real page runs at 390 wide
5
+ * with the clock set to each moment of the day; /api/brief-page, /api/phone-day and the week of the calendar are answered in the browser,
6
+ * because they need a clock and a day of meetings. Done and Reopen press the real routes on real items.
7
+ * M the eight moments · O Open the meeting · D Done and Undo · X a refused press · E a read that fails · W desktop width and the POST allow-list · L floors
8
+ * Set PHONE_CARD_SHOTS=<dir> to save screenshots of each moment at 390 wide, light and dark. */
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+ const { findBrowser } = require('./lib/find-browser');
12
+ require('./test-run').configure({ name: 'premium-phone-card' });
13
+ const Fx = require('./c3-scan-fixture.js');
14
+
15
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
16
+ const until = async (fn, ms = 15000, step = 100) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
17
+ const results = [];
18
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
19
+ let F = null, browser = null;
20
+ const finish = async (code) => {
21
+ if (browser) await browser.close().catch(() => {});
22
+ if (F) F.stop();
23
+ const bad = results.filter((x) => !x.cond).length;
24
+ console.log(`\n${results.length - bad}/${results.length} premium-phone-card assertions passed`);
25
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
26
+ };
27
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
28
+
29
+ const pad = (n) => String(n).padStart(2, '0');
30
+ const base = new Date(); base.setHours(0, 0, 0, 0);
31
+ const DATE = `${base.getFullYear()}-${pad(base.getMonth() + 1)}-${pad(base.getDate())}`;
32
+ const at = (h, m = 0, d = 0) => new Date(base.getFullYear(), base.getMonth(), base.getDate() + d, h, m, 0, 0);
33
+ const MT = (id, title, h1, m1, h2, m2, people = ['Dana Hartono', 'Priya Sen']) => ({ id, title, start: at(h1, m1).toISOString(), end: at(h2, m2).toISOString(), minutes: (h2 * 60 + m2) - (h1 * 60 + m1), people, initiative: 'Partner API onboarding', prepared: [{ kind: 'note', text: 'Last time you agreed to share the sandbox dates.' }], before: [], state: 'upcoming' });
34
+ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
35
+
36
+ (async () => {
37
+ const exe = findBrowser();
38
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
39
+ let chromium;
40
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
41
+ F = await Fx.start({ name: 'premium-phone-card' });
42
+ const ws = F.ws;
43
+ const i1 = (await F.post('/api/pm-items/add', { line: 'Send the partner onboarding list to Lina' })).body.item;
44
+ const i2 = (await F.post('/api/pm-items/add', { line: 'Confirm the rate-limit quota' })).body.item;
45
+ browser = await chromium.launch({ executablePath: exe, headless: true, args: ['--no-sandbox'] });
46
+
47
+ const shotDir = process.env.PHONE_CARD_SHOTS;
48
+ /* one page per scene: a clock, a day of meetings and a list of the PM's own items */
49
+ async function scene({ time, today = [], needs = [], width = 390, scheme = 'light', pageFail = false, dayFail = false, week = null, name }) {
50
+ const ctx = await browser.newContext({ viewport: { width, height: 844 }, colorScheme: scheme });
51
+ const p = await ctx.newPage(), posts = [], gets = [], errs = [];
52
+ p.on('pageerror', (e) => errs.push(String(e)));
53
+ p.on('request', (r) => { const u = new URL(r.url()); if (r.method() === 'POST') posts.push({ path: u.pathname, body: (() => { try { return JSON.parse(r.postData() || 'null'); } catch { return null; } })() }); else if (u.pathname.startsWith('/api/')) gets.push(u.pathname); });
54
+ await p.clock.install({ time });
55
+ await p.route('**/api/brief-page*', (r) => (pageFail ? json(r, { ok: false, error: 'the brief could not be read' }, 500) : json(r, { ok: true, date: DATE, today, needs, mentions: [] })));
56
+ await p.route('**/api/phone-day*', (r) => (dayFail ? json(r, { ok: false, error: 'the day could not be read' }, 500) : json(r, { ok: true, finished: [{ id: 'f1', title: 'Draft of the sandbox note', summary: 'Two paragraphs, ready for you to read.', status: 'review' }], recap: { meetings: 2, decided: 1, done: 3, finished: 1, moved: [{ kind: 'done', text: 'Sandbox dates agreed', sub: 'Partner API onboarding' }] }, tomorrow: { label: 'Tuesday', meetings: [{ id: 'm9', title: 'Quota review', start: at(10, 0, 1).toISOString(), people: ['Priya Sen'] }] } })));
57
+ await p.route('**/api/calendar-views*', (r) => {
58
+ const u = new URL(r.request().url());
59
+ if (u.searchParams.get('view') === 'week' && week) return json(r, week);
60
+ return json(r, { ok: true, view: u.searchParams.get('view') || 'quarter', cells: [], gantt: [], no_plan: 0, strategy: [], today: DATE });
61
+ });
62
+ await p.goto(`${F.BASE}/premium.html?ws=${encodeURIComponent(ws)}`);
63
+ p.__posts = posts; p.__gets = gets; p.__errs = errs; p.__ctx = ctx;
64
+ if (shotDir && name) p.__shot = async (suffix) => { await sleep(700); fs.mkdirSync(shotDir, { recursive: true }); await p.screenshot({ path: path.join(shotDir, `${name}-${suffix}.png`) }); };
65
+ return p;
66
+ }
67
+ const card = (p) => p.evaluate(() => { const c = document.querySelector('#phoneCard'); return c && !c.hidden && getComputedStyle(c).display !== 'none' ? { kind: c.dataset.moment || '', text: c.textContent.replace(/\s+/g, ' ').trim() } : null; });
68
+ const wait = async (p, re) => until(async () => { const c = await card(p); return c && re.test(c.text) ? c : null; });
69
+ const A = MT('mA', 'Partner sync', 10, 0, 11, 0);
70
+
71
+ /* M: the eight moments */
72
+ let p = await scene({ time: at(10, 20), today: [A, MT('mB', 'Quota review', 14, 0, 15, 0)], name: 'meeting' });
73
+ let c = await wait(p, /Under way/);
74
+ ok('M1 a meeting under way: says when it ends and names it', c && c.kind === 'meeting' && /Under way · ends in 40 min/.test(c.text) && /Partner sync/.test(c.text) && /Dana, Priya/.test(c.text), c && c.text);
75
+ if (p.__shot) await p.__shot('light');
76
+ await p.__ctx.close();
77
+
78
+ p = await scene({ time: at(9, 45), today: [A], name: 'before' });
79
+ c = await wait(p, /Starts/);
80
+ ok('M2 a meeting near: says when it starts and what is prepared', c && c.kind === 'before' && /Starts in 15 min · 10:00/.test(c.text) && /sandbox dates/.test(c.text), c && c.text);
81
+ if (p.__shot) await p.__shot('light');
82
+ await p.__ctx.close();
83
+
84
+ p = await scene({ time: at(11, 10), today: [A, MT('mB', 'Quota review', 14, 0, 15, 0)], name: 'after' });
85
+ c = await wait(p, /Just ended/);
86
+ ok('M3 a meeting just ended: names it and does not claim notes exist', c && c.kind === 'after' && /Partner sync/.test(c.text) && /if there are any/.test(c.text) && !/record/i.test(c.text), c && c.text);
87
+ await p.__ctx.close();
88
+
89
+ p = await scene({ time: at(11, 40), today: [A, MT('mB', 'Quota review', 14, 0, 15, 0)], needs: [{ key: 'k1', kind: 'overdue', id: i1.id, headline: i1.text || 'Send the partner onboarding list to Lina', days_late: 2 }], name: 'gap' });
90
+ c = await wait(p, /free|Free|until/);
91
+ ok('M4 a free stretch: names the next meeting and the item that fits', c && c.kind === 'gap' && /Quota review/.test(c.text) && /Lina/.test(c.text), c && c.text);
92
+ await p.__ctx.close();
93
+
94
+ p = await scene({ time: at(8, 0), today: [MT('mB', 'Quota review', 13, 0, 14, 0)], needs: [{ key: 'k1', kind: 'due-today', id: i1.id, headline: 'Send the partner onboarding list to Lina' }], name: 'morning' });
95
+ c = await wait(p, /this morning/);
96
+ ok('M5 the morning: counts what waits and names the first meeting', c && c.kind === 'morning' && /One thing this morning/.test(c.text) && /First up: Quota review at 13:00/.test(c.text), c && c.text);
97
+ await p.__ctx.close();
98
+
99
+ p = await scene({ time: at(14, 30), today: [MT('mB', 'Quota review', 16, 0, 17, 0)], name: 'work' });
100
+ c = await wait(p, /Finished for you/);
101
+ ok('M6 working hours: says what the agent finished, from phone-day, and that approving waits for the computer', c && c.kind === 'work' && /Draft of the sandbox note/.test(c.text) && /Waits for you/.test(c.text) && /waits for your computer/.test(c.text), c && c.text);
102
+ await p.__ctx.close();
103
+
104
+ p = await scene({ time: at(18, 0), today: [A], needs: [{ key: 'k1', kind: 'overdue', id: i1.id, headline: 'Send the partner onboarding list to Lina', days_late: 1 }], name: 'recap' });
105
+ c = await wait(p, /How today went/);
106
+ ok('M7 the evening: the recap counts come from phone-day', c && c.kind === 'recap' && /2\s*meetings/.test(c.text) && /3\s*done by you/.test(c.text) && /Sandbox dates agreed/.test(c.text) && /Still open · 1/.test(c.text), c && c.text);
107
+ await p.__ctx.close();
108
+
109
+ p = await scene({ time: at(21, 0), today: [A], name: 'night' });
110
+ c = await wait(p, /Tomorrow, Tuesday/);
111
+ ok('M8 the night: tomorrow at a glance, with its meetings', c && c.kind === 'night' && /Quota review/.test(c.text) && /10:00/.test(c.text), c && c.text);
112
+ await p.__ctx.close();
113
+
114
+ /* O: Open the meeting */
115
+ const hit = { ok: true, range: { start: DATE, end: DATE }, cells: [{ key: DATE, end: DATE, events: [{ id: 'ev1', title: A.title, at: A.start, end: A.end, attendees: A.people }] }], context: {} };
116
+ p = await scene({ time: at(10, 20), today: [A], week: hit });
117
+ await wait(p, /Under way/);
118
+ await p.click('#phoneCard [data-pha="phopen"]');
119
+ ok('O1 Open the meeting opens the meeting dialog when the calendar lists it', await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))));
120
+ await p.__ctx.close();
121
+ p = await scene({ time: at(10, 20), today: [A], week: { ok: true, range: { start: DATE, end: DATE }, cells: [], context: {} } });
122
+ await wait(p, /Under way/);
123
+ await p.click('#phoneCard [data-pha="phopen"]');
124
+ ok('O2 when the calendar does not list it, the page says so and opens nothing', await until(() => p.evaluate(() => /could not be opened/.test(document.body.innerText))) && !(await p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))));
125
+ await p.__ctx.close();
126
+
127
+ /* D: Done and Undo, on a real item */
128
+ const own = (it, k = 'k1') => ({ key: k, kind: 'overdue', id: it.id, headline: 'Confirm the rate-limit quota', days_late: 3 });
129
+ p = await scene({ time: at(8, 0), today: [], needs: [own(i2)] });
130
+ await wait(p, /Confirm the rate-limit quota/);
131
+ await p.click(`#phoneCard .phfit[data-id="${i2.id}"] [data-pha="phdone"]`);
132
+ ok('D1 Done posts one done for that item and the card says Done.', await until(() => p.evaluate(() => /Done\./.test(document.querySelector('#phoneCard').textContent))) && p.__posts.filter((x) => x.path === '/api/pm-items/done').length === 1 && p.__posts.find((x) => x.path === '/api/pm-items/done').body.id === i2.id, JSON.stringify(p.__posts));
133
+ const st1 = await F.get('/api/pm-items'); const row1 = JSON.stringify(st1.body).includes(i2.id);
134
+ ok('D2 the item is recorded as done by the real route', row1 && /done/i.test(JSON.stringify((st1.body.items || []).find((x) => x.id === i2.id) || {})), JSON.stringify(st1.body).slice(0, 300));
135
+ await p.click(`#phoneCard .phfit[data-id="${i2.id}"] [data-pha="phundo"]`);
136
+ ok('D3 Undo posts a reopen and the Done button is back', await until(() => p.evaluate((id) => !!document.querySelector(`#phoneCard .phfit[data-id="${id}"] [data-pha="phdone"]`), i2.id)) && p.__posts.some((x) => x.path === '/api/pm-items/reopen' && x.body.id === i2.id), JSON.stringify(p.__posts));
137
+ await p.__ctx.close();
138
+
139
+ /* X: a refused press */
140
+ p = await scene({ time: at(8, 0), today: [], needs: [{ key: 'kx', kind: 'overdue', id: 'zz-no-such-item', headline: 'An item the file does not hold', days_late: 1 }] });
141
+ await wait(p, /An item the file does not hold/);
142
+ await p.click('#phoneCard [data-pha="phdone"]');
143
+ ok('X1 a refused Done shows the reason and does not say Done', await until(() => p.evaluate(() => /That did not go through/.test(document.querySelector('#phoneCard').textContent))) && !/Done\./.test(await p.evaluate(() => document.querySelector('#phoneCard').textContent)));
144
+ await p.__ctx.close();
145
+
146
+ /* E: a read that fails is named in the card */
147
+ p = await scene({ time: at(10, 20), pageFail: true });
148
+ ok('E1 a failed brief read is named in the card', !!(await wait(p, /could not be read/)));
149
+ await p.__ctx.close();
150
+ p = await scene({ time: at(18, 0), today: [A], dayFail: true });
151
+ c = await wait(p, /Today could not be read/);
152
+ ok('E2 a failed phone-day read is named in the recap, and the open items still show', c && /Still open/.test(c.text), c && c.text);
153
+ await p.__ctx.close();
154
+
155
+ /* W: desktop width and the POST allow-list */
156
+ p = await scene({ time: at(18, 0), today: [A], width: 1280 });
157
+ await sleep(1500);
158
+ ok('W1 at 1280 wide the card is not shown', (await card(p)) === null);
159
+ ok('W2 at 1280 wide nothing asks for phone-day', !p.__gets.includes('/api/phone-day'), p.__gets.join());
160
+ ok('W3 nothing is written on load', p.__posts.length === 0, JSON.stringify(p.__posts));
161
+ await p.__ctx.close();
162
+
163
+ /* L: floors at 390, light and dark */
164
+ for (const scheme of ['light', 'dark']) {
165
+ p = await scene({ time: at(9, 45), today: [A], needs: [own(i2)], scheme, name: 'floors' });
166
+ await wait(p, /Starts/);
167
+ const f = await p.evaluate(() => {
168
+ const c = document.querySelector('#phoneCard'), bs = [...c.querySelectorAll('button')];
169
+ return { over: document.documentElement.scrollWidth > innerWidth + 1, small: bs.filter((b) => b.getBoundingClientRect().height < 43.5).length, buttons: bs.length, colour: getComputedStyle(c.querySelector('.phbig')).color, bg: getComputedStyle(c).backgroundColor, edge: getComputedStyle(c).boxShadow };
170
+ });
171
+ ok(`L1 ${scheme}: no sideways scroll at 390 and every button is 44 px tall`, !f.over && f.small === 0 && f.buttons >= 1, JSON.stringify(f));
172
+ ok(`L2 ${scheme}: the card has the ember edge and readable text`, /inset/.test(f.edge) && f.colour !== f.bg, JSON.stringify(f));
173
+ ok(`L3 ${scheme}: the page raised no error`, p.__errs.length === 0, p.__errs.join());
174
+ if (p.__shot) await p.__shot(scheme);
175
+ await p.__ctx.close();
176
+ }
177
+ return finish();
178
+ })().catch((e) => { console.error(e); finish(1); });
@@ -1599,3 +1599,53 @@ button.m3-stc{min-height:44px;margin:-7px 0}button.m3-stc:hover{background:var(-
1599
1599
  .m3-ln{display:grid;grid-template-columns:44px 56px minmax(0,1fr);gap:10px;text-align:left;padding:8px 10px;border-radius:14px;font-size:var(--t-body);color:var(--ink-2);line-height:1.45;min-height:44px}.m3-ln time{font:500 var(--t-small) var(--mono);color:var(--ink-3)}.m3-ln b{color:var(--ink)}.m3-ln:hover{background:var(--well)}.m3-ln.cur{background:var(--well);color:var(--ink)}
1600
1600
  .m3-shot{margin:8px 0;display:grid;gap:6px}.m3-shot img{max-width:100%;border-radius:14px;border:1px solid var(--hair)}.m3-shot figcaption{margin:0}
1601
1601
  @media (max-width:1000px){.m3-cap{grid-template-columns:1fr}.m3-kps button,.m3-kp0{grid-template-columns:70px minmax(0,1fr)}.m3-kps time,.m3-kp0 em{display:none}.m3-ln{grid-template-columns:40px 48px minmax(0,1fr)}}
1602
+
1603
+ /* ── Around you (initiative premium-briefing-depth): the card on the Briefing and the dialogs its rows open. Own block, prefix bd-. ───────────────────── */
1604
+ #aroundCard .bd-rows{margin-top:6px}
1605
+ #aroundCard .due.od{color:var(--ember-ink);background:color-mix(in oklab,var(--ember) 16%,transparent)}
1606
+ .bd-note{margin-top:14px}
1607
+ .bd-a{display:grid;gap:2px}
1608
+ .bd-a .cta{height:44px;padding:0 18px;margin:0}
1609
+ .bd-top{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:0 0 6px}.bd-top p{margin:0;font-size:var(--t-small);color:var(--ink-2)}
1610
+ .bd-list{display:grid}
1611
+ .bd-it{padding:16px 0;border-top:1px solid var(--hair)}
1612
+ .bd-list>.bd-it:first-child{border-top:0;padding-top:4px}
1613
+ .bd-h{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-bottom:8px}
1614
+ .bd-chip{display:inline-flex;align-items:center;min-height:26px;padding:0 11px;border-radius:14px;background:var(--well);font-size:var(--t-small);font-weight:650;color:var(--ink-2)}
1615
+ .bd-chip.hot{color:var(--bad)}.bd-chip.warn{color:var(--ember-ink)}.bd-chip.mono{font-family:var(--mono);font-weight:500}
1616
+ .bd-t{display:block;font-size:var(--t-body);font-weight:650;line-height:1.35;color:var(--ink)}
1617
+ .bd-q{margin:6px 0;padding-left:12px;border-left:2px solid var(--hair);color:var(--ink);overflow-wrap:anywhere}
1618
+ .bd-why{margin:4px 0;font-size:var(--t-small);line-height:1.5;color:var(--ink-3);overflow-wrap:anywhere}
1619
+ .bd-it.decided .bd-t,.bd-it.decided .bd-q{opacity:.62}
1620
+ .bd-acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
1621
+ .bd-done{display:flex;gap:8px;align-items:flex-start;margin:10px 0 0;font-size:var(--t-small);line-height:1.5;color:var(--ink-2)}.bd-done svg{width:16px;height:16px;flex:none;margin-top:2px;color:var(--ok)}
1622
+ .bd-l{display:block;margin-top:10px;font-size:var(--t-small);color:var(--ink-2)}
1623
+ .bd-a textarea{display:block;width:100%;min-height:80px;margin-top:6px;padding:10px 12px;border:0;border-radius:12px;background:var(--well);color:var(--ink);font:inherit;font-size:var(--t-body);box-shadow:inset 0 0 0 1.5px var(--hair);resize:vertical}
1624
+ .bd-bar{display:flex;height:6px;max-width:240px;margin-top:8px;border-radius:6px;overflow:hidden;background:var(--well)}.bd-bar i{display:block;height:100%}
1625
+ .bd-bar .bad,.bd-leg .bad{background:var(--bad)}.bd-bar .warn,.bd-leg .warn{background:var(--ember)}.bd-bar .ok,.bd-leg .ok{background:var(--ok)}.bd-bar .none,.bd-leg .none{background:color-mix(in oklab,var(--ink) 22%,transparent)}
1626
+ .bd-leg{display:flex;gap:14px;flex-wrap:wrap;margin:8px 0 4px;font-size:var(--t-small);color:var(--ink-2)}.bd-leg i{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%}
1627
+ .bd-more{margin:14px 0 0}.bd-more summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:var(--t-small);color:var(--ink-2)}
1628
+ .bd-steps{display:grid;gap:8px;margin:12px 0 0}.bd-steps div{display:flex;gap:10px;align-items:center;font-size:var(--t-small);color:var(--ink-2)}
1629
+ .bd-steps i{width:8px;height:8px;flex:none;border-radius:50%;background:var(--hair)}.bd-steps .work i{background:var(--ember)}.bd-steps .done i{background:var(--ok)}
1630
+ .bd-src{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid var(--hair)}
1631
+ .bd-src b{display:block;font-weight:650}.bd-src small{display:block;margin-top:2px;font-size:var(--t-small);color:var(--ink-3)}
1632
+ .bd-st{font-weight:650}.bd-st.stale,.bd-st.failed{color:var(--ember-ink)}.bd-st.never{color:var(--bad)}
1633
+ @media (max-width:700px){.bd-acts .cta{flex:1 1 auto;justify-content:center}.bd-src{grid-template-columns:minmax(0,1fr)}}
1634
+
1635
+ /* ── Briefing: the phone moment card (premium-phone-card) — shown at 640px and below only ── */
1636
+ #phoneCard{display:none}
1637
+ @media (max-width:640px){
1638
+ #phoneCard:not([hidden]){display:block}
1639
+ .phm{margin-top:24px;box-shadow:inset 3px 0 0 var(--ember),var(--card-shadow)}
1640
+ .phbig{display:block;margin:6px 0 4px;font-size:var(--t-lead,20px);font-weight:700;line-height:1.25;color:var(--ink);overflow-wrap:anywhere}
1641
+ .phtt{display:block;font-size:var(--t-body);font-weight:650;line-height:1.35;color:var(--ink);overflow-wrap:anywhere}
1642
+ .phl{margin:2px 0 8px;font-size:var(--t-small);color:var(--ink-2);overflow-wrap:anywhere}
1643
+ .phs{margin:4px 0;font-size:var(--t-small);line-height:1.5;color:var(--ink-3);overflow-wrap:anywhere}
1644
+ .phacts{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
1645
+ .phacts .cta{height:44px;min-width:44px;padding:0 18px;margin:0;flex:1 1 auto;justify-content:center}
1646
+ .phfit{margin-top:12px;padding-top:12px;border-top:1px solid var(--hair)}
1647
+ .phstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 4px}
1648
+ .phstats div{display:grid;gap:2px;padding:10px;border-radius:12px;background:var(--well)}
1649
+ .phstats b{font-size:var(--t-lead,20px);font-weight:700;color:var(--ink)}
1650
+ .phstats span{font-size:var(--t-small);color:var(--ink-3)}
1651
+ }