pisha-server 0.0.0-stage → 0.0.11

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 (125) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -2
  3. package/accounts/accounts.js +754 -0
  4. package/accounts/index.js +1 -0
  5. package/accounts/passwords.js +41 -0
  6. package/accounts/totp.js +54 -0
  7. package/boards/boards.js +1079 -0
  8. package/boards/github.js +212 -0
  9. package/boards/index.js +1 -0
  10. package/boards/sync.js +980 -0
  11. package/companies.js +294 -0
  12. package/company-export.js +101 -0
  13. package/company.js +79 -0
  14. package/dashboard/dashboard.js +407 -0
  15. package/dashboard/index.js +1 -0
  16. package/data-upgrade.js +69 -0
  17. package/install/linux.sh +181 -0
  18. package/install/macos.sh +121 -0
  19. package/install/windows.bat +54 -0
  20. package/machines/index.js +3 -0
  21. package/machines/machines.js +910 -0
  22. package/messaging/inbox.js +252 -0
  23. package/messaging/index.js +3 -0
  24. package/messaging/messaging.js +551 -0
  25. package/messaging/plans.js +67 -0
  26. package/observation/index.js +1 -0
  27. package/observation/observation.js +224 -0
  28. package/organization/index.js +1 -0
  29. package/organization/organization.js +218 -0
  30. package/package.json +54 -4
  31. package/permissions/index.js +1 -0
  32. package/permissions/permissions.js +211 -0
  33. package/pisha-host.mjs +3297 -0
  34. package/pisha-host.mjs.sig +1 -0
  35. package/platform/acme.js +207 -0
  36. package/platform/basics.js +14 -0
  37. package/platform/config.js +154 -0
  38. package/platform/control.js +93 -0
  39. package/platform/credentials.js +151 -0
  40. package/platform/database.js +251 -0
  41. package/platform/errors.js +13 -0
  42. package/platform/files.js +50 -0
  43. package/platform/http.js +207 -0
  44. package/platform/index.js +58 -0
  45. package/platform/limits.js +122 -0
  46. package/platform/listen.js +183 -0
  47. package/platform/roles.js +6 -0
  48. package/platform/stream.js +19 -0
  49. package/platform/text.js +83 -0
  50. package/platform/ws.js +186 -0
  51. package/routes.js +405 -0
  52. package/server.js +65 -0
  53. package/sessions/index.js +1 -0
  54. package/sessions/sessions.js +533 -0
  55. package/ui/LICENSE-affectui.txt +26 -0
  56. package/ui/addmachine.js +151 -0
  57. package/ui/api.js +20 -0
  58. package/ui/app.js +143 -0
  59. package/ui/attention.js +78 -0
  60. package/ui/back.js +166 -0
  61. package/ui/boards.js +958 -0
  62. package/ui/chat.js +388 -0
  63. package/ui/content.js +157 -0
  64. package/ui/dialogs.js +135 -0
  65. package/ui/doing.js +112 -0
  66. package/ui/dom.js +6 -0
  67. package/ui/ds-base.css +146 -0
  68. package/ui/ds-components.css +229 -0
  69. package/ui/fonts/LICENSE-space-grotesk.txt +93 -0
  70. package/ui/fonts/space-grotesk-latin-700-normal.woff2 +0 -0
  71. package/ui/fonts/space-grotesk-latin-ext-700-normal.woff2 +0 -0
  72. package/ui/format.js +25 -0
  73. package/ui/i18n.js +2093 -0
  74. package/ui/icons/apple-touch-icon.png +0 -0
  75. package/ui/icons/icon-192.png +0 -0
  76. package/ui/icons/icon-512.png +0 -0
  77. package/ui/icons/maskable-512.png +0 -0
  78. package/ui/icons.js +40 -0
  79. package/ui/inbox.js +535 -0
  80. package/ui/index.html +103 -0
  81. package/ui/machines.js +261 -0
  82. package/ui/manifest.webmanifest +16 -0
  83. package/ui/mosaic.js +189 -0
  84. package/ui/nav.js +141 -0
  85. package/ui/newteam.js +223 -0
  86. package/ui/org.js +653 -0
  87. package/ui/overlays.css +126 -0
  88. package/ui/palette.js +179 -0
  89. package/ui/people.js +370 -0
  90. package/ui/permissions.js +202 -0
  91. package/ui/qr.js +158 -0
  92. package/ui/router.js +171 -0
  93. package/ui/routes.js +46 -0
  94. package/ui/screen-boards.css +241 -0
  95. package/ui/screen-inbox.css +201 -0
  96. package/ui/screen-machines.css +76 -0
  97. package/ui/screen-mosaic.css +26 -0
  98. package/ui/screen-newteam.css +90 -0
  99. package/ui/screen-org.css +113 -0
  100. package/ui/screen-session.css +99 -0
  101. package/ui/screen-signin.css +28 -0
  102. package/ui/screen-team.css +80 -0
  103. package/ui/screen-teams.css +41 -0
  104. package/ui/session.js +42 -0
  105. package/ui/shell.css +122 -0
  106. package/ui/signin.js +120 -0
  107. package/ui/squads.js +370 -0
  108. package/ui/state.js +59 -0
  109. package/ui/stream.js +268 -0
  110. package/ui/styles.css +343 -0
  111. package/ui/team.js +115 -0
  112. package/ui/teams.js +58 -0
  113. package/ui/terminal.js +261 -0
  114. package/ui/theme.js +32 -0
  115. package/ui/timeline.js +163 -0
  116. package/ui/topbar.js +205 -0
  117. package/ui/voice-parse.js +98 -0
  118. package/ui/voice.js +320 -0
  119. package/vendor/InterVariable.woff2 +0 -0
  120. package/vendor/LICENSE-inter +92 -0
  121. package/vendor/LICENSE-xterm +21 -0
  122. package/vendor/README.md +8 -0
  123. package/vendor/addon-fit.js +2 -0
  124. package/vendor/xterm.css +218 -0
  125. package/vendor/xterm.js +2 -0
package/ui/dialogs.js ADDED
@@ -0,0 +1,135 @@
1
+ import { inCompany } from './api.js'
2
+ import { T } from './i18n.js'
3
+ import { sessions, state, can } from './state.js'
4
+ import { esc } from './format.js'
5
+ import { currentRoute } from './router.js'
6
+ import { alertBox } from './mosaic.js'
7
+ import { terminalOf } from './machines.js'
8
+ import { reopenable, reopen, addWorkerTo } from './squads.js'
9
+ import { showLogin } from './app.js'
10
+
11
+ // actions: clear chat, archive / unarchive, delete
12
+
13
+ export function closeMenu() { state.menuEl?.remove(); state.menuEl = null }
14
+ document.addEventListener('click', e => { if (state.menuEl && !e.target.closest('.menu') && !e.target.closest('[data-menu], [data-hmenu], [data-orgmenu], [data-la]')) closeMenu() })
15
+ document.addEventListener('keydown', e => { if (e.key === 'Escape') { closeMenu(); [...document.querySelectorAll('.modal-bg')].at(-1)?.querySelector('[data-cancel]')?.click() } })
16
+
17
+ export function openMenu(anchor, name) {
18
+ closeMenu()
19
+ const s = sessions.get(name)
20
+ if (!s) return
21
+ const off = s.online
22
+ state.menuEl = document.createElement('div')
23
+ state.menuEl.className = 'menu'
24
+ const where = terminalOf(name)
25
+ state.menuEl.innerHTML = `
26
+ ${reopenable(s) && can('operator') ? `<button data-act="reopen">${T.reopen}</button>` : ''}
27
+ <button data-go="#/s/${encodeURIComponent(name)}">${T.openChat}</button>
28
+ ${where && can('operator') ? `<button data-go="#/t/${encodeURIComponent(where.host.id)}/${encodeURIComponent(name)}">${T.terminal}</button>` : ''}
29
+ ${s.role === 'coordinator' ? `<button data-go="#/q/${encodeURIComponent(name)}">${T.viewSquad}</button>${can('operator') ? `<button data-act="addworker">${esc(T.addWorkerTo(name))}</button>` : ''}` : ''}
30
+ ${s.approval_pending && can('manager') ? `<button data-act="approve">${T.approve}</button>` : ''}
31
+ ${can('operator') ? `<button data-act="clear">${T.clearChat}</button>
32
+ ${off ? `<button data-act="kick" class="danger">${T.kick}</button>` : ''}
33
+ <button data-act="archive" ${off ? 'disabled' : ''}>${T.archive}</button>
34
+ ${can('manager') ? `<button data-act="delete" class="danger" ${off ? 'disabled' : ''}>${T.deleteSession}</button>` : ''}
35
+ ${off ? `<div class="hint">${T.offlineHint}</div>` : ''}` : ''}`
36
+ document.body.appendChild(state.menuEl)
37
+ const r = anchor.getBoundingClientRect()
38
+ const w = state.menuEl.offsetWidth
39
+ state.menuEl.style.top = `${Math.min(r.bottom + 4, innerHeight - state.menuEl.offsetHeight - 8)}px`
40
+ state.menuEl.style.left = `${Math.max(8, Math.min(r.right - w, innerWidth - w - 8))}px`
41
+ state.menuEl.addEventListener('click', e => {
42
+ const b = e.target.closest('button')
43
+ if (!b || b.disabled) return
44
+ closeMenu()
45
+ if (b.dataset.go) location.hash = b.dataset.go
46
+ else if (b.dataset.act === 'reopen') reopen(name)
47
+ else runAction(b.dataset.act, name)
48
+ })
49
+ }
50
+
51
+ // (notice: something only to read, with one button to close it.)
52
+ export function confirmDialog({ title, text, confirm, danger = false, settles = false, option = null, optionChecked = true, notice = false, run }) {
53
+ const bg = document.createElement('div')
54
+ bg.className = 'modal-bg'
55
+ bg.innerHTML = `<div class="modal" role="dialog" aria-modal="true"><h3>${esc(title)}</h3><p>${text}</p>${option ? `<label class="check"><input type="checkbox" data-option${optionChecked ? ' checked' : ''}> <span>${esc(option)}</span></label>` : ''}<div class="err"></div>
56
+ <div class="actions">${notice ? '' : `<button class="btn" data-cancel>${T.cancel}</button>`}<button class="btn primary${danger ? ' danger' : settles ? ' ok' : ''}" data-ok>${esc(confirm)}</button></div></div>`
57
+ document.body.appendChild(bg)
58
+ const close = () => bg.remove()
59
+ bg.addEventListener('click', e => { if (e.target === bg) close() })
60
+ bg.querySelector('[data-cancel]')?.addEventListener('click', close)
61
+ const ok = bg.querySelector('[data-ok]')
62
+ ;(danger ? bg.querySelector('[data-cancel]') : ok).focus() // Enter never confirms something destructive
63
+ ok.addEventListener('click', async () => {
64
+ ok.disabled = true
65
+ try { await run(bg.querySelector('[data-option]')?.checked); close() } catch (err) {
66
+ bg.querySelector('.err').textContent = err.message
67
+ ok.disabled = false
68
+ }
69
+ })
70
+ }
71
+
72
+ export async function post(action, session) {
73
+ const r = await fetch(inCompany(`/api/${action}`), {
74
+ method: 'POST',
75
+ headers: { 'Content-Type': 'application/json' },
76
+ body: JSON.stringify({ session }),
77
+ })
78
+ if (r.status === 401) { showLogin(T.sessionEnded); throw new Error(T.unauthorized) }
79
+ const j = await r.json()
80
+ if (!j.ok) throw new Error(j.parameters?.reason === 'session_online' ? T.sessionOnline : j.description)
81
+ return j.result
82
+ }
83
+
84
+ export function runAction(action, name) {
85
+ if (action === 'addworker') return addWorkerTo(name)
86
+ const s = sessions.get(name)
87
+ const who = `<b>${esc(name)}</b>`
88
+ if (action === 'approve') {
89
+ return confirmDialog({ title: T.approveTitle(name), text: T.approveText(who), confirm: T.approve, settles: true, run: () => post('approve', name) })
90
+ }
91
+ if (action === 'kick') {
92
+ return confirmDialog({ title: T.kickTitle(name), text: T.kickText(who), confirm: T.kick, danger: true, run: () => post('kick', name) })
93
+ }
94
+ if (action === 'clear') {
95
+ return confirmDialog({
96
+ title: T.clearTitle(name),
97
+ text: T.clearText(who, s?.online),
98
+ confirm: T.clearChat,
99
+ danger: true,
100
+ run: () => post('clear', name),
101
+ })
102
+ }
103
+ if (action === 'archive') {
104
+ return confirmDialog({
105
+ title: T.archiveTitle(name),
106
+ text: T.archiveText(who),
107
+ confirm: T.archive,
108
+ run: () => post('archive', name),
109
+ })
110
+ }
111
+ if (action === 'unarchive') return post('unarchive', name).catch(err => alertBox(err.message))
112
+ if (action === 'delete') {
113
+ return confirmDialog({
114
+ title: T.deleteTitle(name),
115
+ text: T.deleteText(who, esc(name)),
116
+ confirm: T.delete,
117
+ danger: true,
118
+ run: async () => {
119
+ await post('delete', name)
120
+ if (currentRoute().name === name) location.hash = s?.archived_at ? '#/archived' : '#/teams'
121
+ },
122
+ })
123
+ }
124
+ }
125
+
126
+ // A dialog with arbitrary content; returns its root and a close function.
127
+ export function dialog(html, { wide = false } = {}) {
128
+ const bg = document.createElement('div')
129
+ bg.className = 'modal-bg'
130
+ bg.innerHTML = `<div class="modal ${wide ? 'wide' : ''}" role="dialog" aria-modal="true">${html}</div>`
131
+ document.body.appendChild(bg)
132
+ const close = () => { bg.remove(); bg.onclose?.() }
133
+ bg.addEventListener('click', e => { if (e.target === bg || e.target.closest('[data-cancel]')) close() })
134
+ return { el: bg, close }
135
+ }
package/ui/doing.js ADDED
@@ -0,0 +1,112 @@
1
+ import { T } from './i18n.js'
2
+
3
+ // What a session is doing now, said as a phrase ("Running the tests",
4
+ // "Reading observe.js") instead of the command or the tool's arguments: the
5
+ // whole command is in its conversation and in the tooltip. Read from what the
6
+ // session already reports; nothing is asked of the model.
7
+ // Order: a command recognised here (said the same way in every language),
8
+ // then the description Claude wrote for it, then the program's name alone.
9
+
10
+ // Commands that say what they do (a guess from the command line). The
11
+ // timeline uses the first three too.
12
+ export const TEST_RE = /\b(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?test(?::\S+)?\b|\bnpx\s+(?:vitest|jest|playwright\s+test|mocha)\b|\b(?:pytest|vitest|jest|phpunit|rspec)\b|\bgo\s+test\b|\bcargo\s+test\b|\bnode\s+--test\b|\bmake\s+(?:test|check)\b|\bdotnet\s+test\b|\bmvn\s+test\b|\bgradle\w*\s+test\b|\bartisan\s+test\b/
13
+ export const COMMIT_RE = /\bgit\s+(?:-C\s+\S+\s+)?commit\b/
14
+ export const PUSH_RE = /\bgit\s+(?:-C\s+\S+\s+)?push\b/
15
+ const GIT = sub => new RegExp(`\\bgit\\s+(?:-C\\s+\\S+\\s+)?(?:${sub})\\b`)
16
+
17
+ const quoted = re => cmd => { const m = re.exec(cmd); return m ? (m[2] ?? m[3] ?? '').slice(0, 60) : null }
18
+ const searchTerm = quoted(/\b(?:rg|grep|egrep|ag|ack|git\s+grep)\b(?:\s+-{1,2}[\w-]+(?:=\S+)?)*\s+(?:(["'])(.+?)\1|([^\s|;&<>"'-][^\s|;&<>]*))/)
19
+ const hostOf = url => { try { return new URL(url).host } catch { return '' } }
20
+ const urlIn = cmd => /\bhttps?:\/\/[^\s"'|;&<>)]+/.exec(cmd)?.[0] ?? ''
21
+
22
+ // [test, phrase]: the first that matches.
23
+ const COMMANDS = [
24
+ [cmd => TEST_RE.test(cmd), () => T.nowTests],
25
+ [cmd => COMMIT_RE.test(cmd), () => T.nowCommit],
26
+ [cmd => PUSH_RE.test(cmd), () => T.nowPush],
27
+ [cmd => GIT('pull|fetch').test(cmd), () => T.nowPull],
28
+ [cmd => GIT('checkout|switch').test(cmd), () => T.nowBranch],
29
+ [cmd => GIT('merge|rebase|cherry-pick').test(cmd), () => T.nowMerge],
30
+ [cmd => GIT('diff|show').test(cmd), () => T.nowDiff],
31
+ [cmd => GIT('log').test(cmd), () => T.nowGitLog],
32
+ [cmd => GIT('status').test(cmd), () => T.nowGitStatus],
33
+ [cmd => /\b(?:npm|pnpm|yarn|bun)\s+(?:install|i|ci|add)\b|\bpip3?\s+install\b|\bcomposer\s+(?:install|require|update)\b|\bbundle\s+install\b|\bcargo\s+fetch\b|\bgo\s+mod\s+(?:download|tidy)\b/.test(cmd), () => T.nowInstall],
34
+ [cmd => /\beslint\b|\bprettier\b|\b(?:npm|pnpm|yarn)\s+(?:run\s+)?lint\b|\bruff\b|\bflake8\b|\bphpcs\b|\bcargo\s+clippy\b/.test(cmd), () => T.nowLint],
35
+ [cmd => /\b(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?build\b|\btsc\b|\bcargo\s+build\b|\bgo\s+build\b|\bmake\b(?!\s+(?:test|check))|\bvite\s+build\b|\bwebpack\b/.test(cmd), () => T.nowBuild],
36
+ [cmd => /\bartisan\s+migrate\b|\bprisma\s+migrate\b|\b(?:alembic|knex|sequelize)\b.*\bmigrat|\brails\s+db:migrate\b/.test(cmd), () => T.nowMigrate],
37
+ [cmd => /\bdocker\s+(?:compose\s+|-compose\s+)?(?:up|start|run)\b|\bdocker-compose\s+up\b/.test(cmd), () => T.nowContainers],
38
+ [cmd => /\bdocker\s+build\b/.test(cmd), () => T.nowImage],
39
+ [cmd => searchTerm(cmd) != null, cmd => T.nowSearch(searchTerm(cmd), '')],
40
+ [cmd => /^(?:find|fd|tree|ls)\b/.test(cmd), () => T.nowListFiles],
41
+ [cmd => /^(?:curl|wget|http)\b/.test(cmd) && hostOf(urlIn(cmd)), cmd => T.nowFetch(hostOf(urlIn(cmd)))],
42
+ [cmd => /^ssh\s/.test(cmd), cmd => T.nowSsh(/^ssh\s+(?:-\S+\s+(?:\S+\s+)?)*([^\s-]\S*)/.exec(cmd)?.[1]?.replace(/^.*@/, '') ?? '')],
43
+ [cmd => /^sleep\s/.test(cmd), () => T.nowWait],
44
+ ]
45
+
46
+ // The command that matters in a line: past "cd x &&", variables set before it,
47
+ // "sudo", "timeout 60"… (Only the first line: summaries carry no more.)
48
+ function mainCommand(line) {
49
+ const parts = String(line).split(/\s*(?:&&|\|\||;)\s*/).map(p => p.trim()).filter(Boolean)
50
+ const strip = p => p.replace(/^(?:(?:[A-Z_][A-Z0-9_]*=\S*|sudo|env|time|nice|timeout\s+\S+|command)\s+)+/, '')
51
+ return parts.map(strip).find(p => !/^(?:cd|export|source|\.|set|pushd|popd|true)\b/.test(p)) ?? strip(parts[0] ?? '')
52
+ }
53
+ // (A loop or a condition says nothing of what runs inside it.)
54
+ const program = cmd => {
55
+ const word = (mainCommand(cmd).split(/\s+/)[0] ?? '').split('/').pop().slice(0, 40)
56
+ return /^(?:for|while|until|if|case|do|then|\{|\(|\[\[?|function)$/.test(word) ? '' : word
57
+ }
58
+
59
+ export function commandPhrase(line) {
60
+ const cmd = mainCommand(line)
61
+ for (const [test, say] of COMMANDS) if (test(cmd)) return say(cmd)
62
+ // (Tests, a commit or a push anywhere in the line: "npm test | tail".)
63
+ for (const [test, say] of COMMANDS.slice(0, 3)) if (test(String(line))) return say(String(line))
64
+ return null
65
+ }
66
+
67
+ const fileName = summary => String(summary ?? '').replace(/\s+\([^)]*\)$/, '').split('/').filter(Boolean).pop() ?? ''
68
+ const pishaTool = (tool, summary) => {
69
+ const to = /^chat_id: (.+)$/.exec(summary)?.[1] ?? ''
70
+ switch (tool) {
71
+ case 'reply': return to ? T.nowReply(to) : T.nowWriting
72
+ case 'ask_user': return T.nowAsk
73
+ case 'tell_user': return T.nowTell
74
+ case 'update_plan': return T.nowPlan
75
+ case 'ping': return T.nowPing
76
+ case 'edit_inbox': return T.nowEditInbox
77
+ case 'download_attachment': return T.nowDownload
78
+ default: return null
79
+ }
80
+ }
81
+
82
+ // tool: what the server says it runs ({ name, summary, what }).
83
+ export function nowPhrase(tool) {
84
+ const name = String(tool?.name ?? '')
85
+ const sum = String(tool?.summary ?? '')
86
+ switch (name) {
87
+ case 'Bash':
88
+ case 'PowerShell':
89
+ // (A command that touches secrets: not even its name is sent.)
90
+ if (/^command … \(/.test(sum)) return T.nowSecretCommand
91
+ return commandPhrase(sum) ?? (tool?.what || (program(sum) ? T.nowRun(program(sum)) : T.nowRunSome))
92
+ case 'Read': return T.nowRead(fileName(sum))
93
+ case 'Write': return T.nowWrite(fileName(sum))
94
+ case 'Edit':
95
+ case 'MultiEdit':
96
+ case 'NotebookEdit': return T.nowEdit(fileName(sum))
97
+ case 'Grep': {
98
+ const m = /^"(.*)"(?: in (.+?))?(?: \([^)]*\))?$/.exec(sum)
99
+ return m ? T.nowSearch(m[1].slice(0, 60), m[2] ? fileName(m[2]) : '') : T.nowSearch(sum.slice(0, 60), '')
100
+ }
101
+ case 'Glob': return T.nowFindFiles(sum.split(' in ')[0].slice(0, 60))
102
+ case 'WebFetch': return T.nowFetch(hostOf(sum) || sum.slice(0, 60))
103
+ case 'WebSearch': return T.nowWebSearch(sum.slice(0, 80))
104
+ case 'Task':
105
+ case 'Agent': return T.nowAgent(sum.replace(/^[^:]*:\s*/, '').slice(0, 100))
106
+ case 'TodoWrite': return T.nowTodos
107
+ case 'Skill': return T.nowSkill(sum.slice(0, 60))
108
+ }
109
+ const mcp = /^mcp__(.+?)__(.+)$/.exec(name)
110
+ if (mcp) return (mcp[1] === 'pisha' || mcp[1].endsWith('_pisha') ? pishaTool(mcp[2], sum) : null) ?? T.nowMcp(mcp[2].replace(/_/g, ' '), mcp[1].replace(/^plugin_[^_]+_/, ''))
111
+ return name ? T.nowTool(name) : T.tool
112
+ }
package/ui/dom.js ADDED
@@ -0,0 +1,6 @@
1
+ export const $ = id => document.getElementById(id)
2
+ export const store = {
3
+ get: k => { try { return localStorage.getItem(k) } catch { return null } },
4
+ set: (k, v) => { try { localStorage.setItem(k, v) } catch {} },
5
+ del: k => { try { localStorage.removeItem(k) } catch {} },
6
+ }
package/ui/ds-base.css ADDED
@@ -0,0 +1,146 @@
1
+ /* Pisha design system: tokens and base.
2
+ Every colour, size and duration the dashboard uses starts here. Light is the
3
+ default; dark is the system's choice unless light was picked here, or picked
4
+ here (data-theme on <html>, set before the page draws). */
5
+
6
+ /* Inter, served by this server (vendor/, SIL Open Font License): one variable
7
+ file for every weight. Until it loads, the system's own font. */
8
+ @font-face {
9
+ font-family: InterVariable;
10
+ font-style: normal;
11
+ font-weight: 100 900;
12
+ font-display: swap;
13
+ src: url("/vendor/InterVariable.woff2") format("woff2");
14
+ }
15
+
16
+ /* Space Grotesk Bold, for the name in the logo only (served by this server,
17
+ SIL Open Font License). Until it loads, the system's own font. */
18
+ @font-face {
19
+ font-family: "Space Grotesk";
20
+ font-style: normal;
21
+ font-weight: 700;
22
+ font-display: swap;
23
+ src: url("/fonts/space-grotesk-700.woff2") format("woff2");
24
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
25
+ }
26
+ @font-face {
27
+ font-family: "Space Grotesk";
28
+ font-style: normal;
29
+ font-weight: 700;
30
+ font-display: swap;
31
+ src: url("/fonts/space-grotesk-ext-700.woff2") format("woff2");
32
+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
33
+ }
34
+
35
+ :root {
36
+ /* type */
37
+ --sans: InterVariable, Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
38
+ --brand-font: "Space Grotesk", var(--sans);
39
+ --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
40
+ --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13.5px; --fs-lg: 15px; --fs-xl: 18px; --fs-2xl: 22px;
41
+ /* shape: soft corners, a pixel ring instead of borders (affectUI's look) */
42
+ --r-sm: 6px; --r: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
43
+ /* space: a 4 px grid */
44
+ --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
45
+ /* motion: quick and soft, and none for who asks for none */
46
+ --ease: cubic-bezier(.22, 1, .36, 1);
47
+ --t-fast: 140ms; --t: 200ms; --t-slow: 280ms;
48
+ /* layout */
49
+ --rail-w: 264px; --head-h: 52px;
50
+
51
+ /* light: neutral greys; the brand's albero only for what is the brand's */
52
+ --bg: #f5f5f5; --tray: #f0f0f0; --panel: #ffffff; --raised: #f4f4f5; --line: #ececec; --line-2: #d9d9d9;
53
+ --text: #171717; --ink-2: #404040; --muted: #6b6b6b; --faint: #a3a3a3;
54
+ --brand-ink: #14213d; /* the name in the logo: Tinta on light, white on dark */
55
+ --accent: #f2b90f; --on-accent: #14213d; /* albero, with tinta on it (never white: too little contrast) */
56
+ --on-fill: #ffffff; /* text on a filled state colour */
57
+ --ok: #1e8a4f; --warn: #b25e00; --err: #c4320a; --info: #2456d6;
58
+ --ok-soft: #e6f6ed; --warn-soft: #fff1e0; --err-soft: #fdecea; --info-soft: #eaf1ff;
59
+ --coord: #8a35d6; --worker: #0f7489;
60
+ /* the main action: a dark gradient with a light edge and a 1 px ring (light, in dark mode) */
61
+ --fill-top: #323137; --fill-bottom: #201e25; --fill-hover-top: #3c3b42; --fill-hover-bottom: #29272f;
62
+ --fill-edge-top: #4b4951; --fill-edge-bottom: #18171b; --fill-ring: #0d0d0d; --on-ink: #fafafa;
63
+ --focus: rgba(0, 96, 226, .7);
64
+ --term: #15171b; --term-text: #e9ebee;
65
+ --scrim: rgba(0, 0, 0, .18);
66
+ --shadow-card: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .04);
67
+ --shadow-card-hover: 0 0 0 1px var(--line-2), 0 2px 6px -1px rgba(0, 0, 0, .08);
68
+ --shadow-pop: 0 0 0 1px rgba(0, 0, 0, .06), 0 18px 40px -12px rgba(0, 0, 0, .18), 0 4px 12px -4px rgba(0, 0, 0, .06);
69
+ --shadow-dialog: 0 0 0 1px rgba(0, 0, 0, .04), 0 24px 56px -12px rgba(0, 0, 0, .28), 0 6px 16px -6px rgba(0, 0, 0, .08);
70
+ color-scheme: light;
71
+
72
+ /* names the screens not yet redrawn still use */
73
+ --panel-2: var(--raised); --idle: var(--muted);
74
+ --coord-soft: color-mix(in srgb, var(--coord) 10%, var(--panel));
75
+ --worker-soft: color-mix(in srgb, var(--worker) 10%, var(--panel));
76
+ --bubble: var(--raised); --bubble-in: var(--info-soft);
77
+ }
78
+
79
+ @media (prefers-color-scheme: dark) {
80
+ :root:not([data-theme="light"]) {
81
+ --bg: #111113; --tray: #111113; --panel: #19191b; --raised: #26262a; --line: #2a2a2e; --line-2: #3a3a40;
82
+ --text: #ededed; --ink-2: #c8c8cc; --muted: #a1a1a6; --faint: #6b6b72; --brand-ink: #ffffff;
83
+ --accent: #f2b90f; --on-accent: #14213d; --on-fill: #121213;
84
+ --ok: #5fc88a; --warn: #ffb35c; --err: #ff8a7a; --info: #8ab4ff;
85
+ --ok-soft: #123020; --warn-soft: #3a2610; --err-soft: #3b1c14; --info-soft: #16243f;
86
+ --coord: #c9a2f5; --worker: #6bbccb;
87
+ --fill-top: #f4f4f5; --fill-bottom: #e4e4e7; --fill-hover-top: #ffffff; --fill-hover-bottom: #ececef;
88
+ --fill-edge-top: #ffffff; --fill-edge-bottom: #d4d4d8; --fill-ring: rgba(0, 0, 0, .6); --on-ink: #121213;
89
+ --focus: rgba(77, 141, 255, .8);
90
+ --term: #0a0b0d; --term-text: #e9ebee;
91
+ --scrim: rgba(0, 0, 0, .5);
92
+ --shadow-card: 0 0 0 1px var(--line);
93
+ --shadow-card-hover: 0 0 0 1px var(--line-2), 0 2px 6px rgba(0, 0, 0, .4);
94
+ --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 40px -12px rgba(0, 0, 0, .6);
95
+ --shadow-dialog: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 56px -12px rgba(0, 0, 0, .7);
96
+ color-scheme: dark;
97
+ }
98
+ }
99
+ :root[data-theme="dark"] {
100
+ --bg: #111113; --tray: #111113; --panel: #19191b; --raised: #26262a; --line: #2a2a2e; --line-2: #3a3a40;
101
+ --text: #ededed; --ink-2: #c8c8cc; --muted: #a1a1a6; --faint: #6b6b72; --brand-ink: #ffffff;
102
+ --accent: #f2b90f; --on-accent: #14213d; --on-fill: #121213;
103
+ --ok: #5fc88a; --warn: #ffb35c; --err: #ff8a7a; --info: #8ab4ff;
104
+ --ok-soft: #123020; --warn-soft: #3a2610; --err-soft: #3b1c14; --info-soft: #16243f;
105
+ --coord: #c9a2f5; --worker: #6bbccb;
106
+ --fill-top: #f4f4f5; --fill-bottom: #e4e4e7; --fill-hover-top: #ffffff; --fill-hover-bottom: #ececef;
107
+ --fill-edge-top: #ffffff; --fill-edge-bottom: #d4d4d8; --fill-ring: rgba(0, 0, 0, .6); --on-ink: #121213;
108
+ --focus: rgba(77, 141, 255, .8);
109
+ --term: #0a0b0d; --term-text: #e9ebee;
110
+ --scrim: rgba(0, 0, 0, .5);
111
+ --shadow-card: 0 0 0 1px var(--line);
112
+ --shadow-card-hover: 0 0 0 1px var(--line-2), 0 2px 6px rgba(0, 0, 0, .4);
113
+ --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 40px -12px rgba(0, 0, 0, .6);
114
+ --shadow-dialog: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 56px -12px rgba(0, 0, 0, .7);
115
+ color-scheme: dark;
116
+ }
117
+
118
+ *, *::before, *::after { box-sizing: border-box; }
119
+ html, body {
120
+ margin: 0; height: 100%; background: var(--bg); color: var(--text);
121
+ font: 400 var(--fs-md)/1.5 var(--sans);
122
+ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
123
+ text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01";
124
+ }
125
+ button, input, select, textarea { font: inherit; color: inherit; }
126
+ button { cursor: pointer; }
127
+ a { color: var(--info); text-underline-offset: 2px; }
128
+ ::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
129
+ [hidden] { display: none !important; }
130
+
131
+ /* One focus ring everywhere, only for the keyboard. */
132
+ :focus { outline: none; }
133
+ :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
134
+
135
+ /* Quiet scrollbars that still show where you are. */
136
+ * { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
137
+ ::-webkit-scrollbar { width: 10px; height: 10px; }
138
+ ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--r-pill); border: 3px solid transparent; background-clip: padding-box; }
139
+ ::-webkit-scrollbar-track { background: transparent; }
140
+
141
+ /* Hidden from sight, not from screen readers. */
142
+ .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
143
+
144
+ @media (prefers-reduced-motion: reduce) {
145
+ *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
146
+ }
@@ -0,0 +1,229 @@
1
+ /* Pisha design system: components shared by every screen.
2
+ Loaded after the screens' own styles, so these win where both define one.
3
+ The look follows affectUI's free components (MIT, https://www.affectui.com,
4
+ see LICENSE-affectui.txt): neutral surfaces with a 1 px ring, soft corners,
5
+ a dark gradient for the main action and soft tints for the rest. */
6
+
7
+ /* --- optical centring ------------------------------------------------------- */
8
+ /* One-line controls centre their text on its capitals, not on the font's box
9
+ (Inter's ascender is taller than its descender: a word sat a pixel high). */
10
+ .btn, .seg button, .seg a, .badge, .tag, kbd, .kbd, .menu button, .rail-item, .rail-settings, .rail-search, .icon-btn { text-box: trim-both cap alphabetic; }
11
+
12
+ /* --- icons ----------------------------------------------------------------- */
13
+ /* Strokes in the colour of their text (icons.js); each place may size them. */
14
+ .ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
15
+
16
+ /* --- buttons --------------------------------------------------------------- */
17
+ /* The main action of a place is dark and filled (.primary); the others are
18
+ white with a ring; what settles something is green, what stops, removes or
19
+ dismisses is red, both as a soft tint; .quiet is text only, and cancelling
20
+ is quiet too. (The brand's albero is for the brand, never for an action.) */
21
+ .btn {
22
+ --tone: var(--text);
23
+ position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
24
+ height: 32px; padding: 0 12px; border: 0; border-radius: var(--r);
25
+ background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06);
26
+ font: 500 var(--fs-md)/1 var(--sans); letter-spacing: -.01em;
27
+ white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
28
+ transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) var(--ease), opacity var(--t-fast) ease;
29
+ }
30
+ .btn:hover { background: var(--raised); }
31
+ .btn:active { transform: scale(.97); }
32
+ .btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; }
33
+ /* (Tinted: a ring in their own colour, so they measure what the ringed ones do.) */
34
+ .btn.ok, .btn.danger { --soft: var(--ok-soft); background: var(--soft); color: var(--tone); box-shadow: 0 0 0 1px var(--soft); }
35
+ .btn.ok { --tone: var(--ok); --soft: var(--ok-soft); }
36
+ .btn.danger { --tone: var(--err); --soft: var(--err-soft); }
37
+ .btn.ok:hover { --soft: color-mix(in srgb, var(--ok-soft) 86%, var(--ok)); }
38
+ .btn.danger:hover { --soft: color-mix(in srgb, var(--err-soft) 86%, var(--err)); }
39
+ .btn.primary {
40
+ background: linear-gradient(var(--fill-top), var(--fill-bottom)) padding-box, linear-gradient(var(--fill-edge-top), var(--fill-edge-bottom)) border-box;
41
+ border: 1px solid transparent; color: var(--on-ink);
42
+ box-shadow: 0 0 0 1px var(--fill-ring), 0 2px 4px rgba(0, 0, 0, .1);
43
+ }
44
+ .btn.primary:hover { background: linear-gradient(var(--fill-hover-top), var(--fill-hover-bottom)) padding-box, linear-gradient(var(--fill-edge-top), var(--fill-edge-bottom)) border-box; }
45
+ /* (Filled and red: removing for good, said once more.) */
46
+ .btn.primary.danger { background: var(--err); color: var(--on-fill); box-shadow: 0 0 0 1px color-mix(in srgb, var(--err) 80%, #000), 0 2px 4px rgba(0, 0, 0, .1); }
47
+ .btn.primary.danger:hover { background: color-mix(in srgb, var(--err) 90%, #000); }
48
+ .btn.quiet, .btn.plain, .btn[data-cancel] { background: transparent; color: var(--muted); box-shadow: none; }
49
+ .btn.quiet:hover, .btn.plain:hover, .btn[data-cancel]:hover { background: var(--raised); color: var(--text); }
50
+ .btn.quiet.ok, .btn.quiet.danger { color: var(--tone); }
51
+ .btn svg, .icon-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
52
+
53
+ /* A square button with only an icon (it carries an aria-label). */
54
+ .icon-btn {
55
+ display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0;
56
+ border: 0; border-radius: var(--r); background: transparent; color: var(--muted);
57
+ transition: background-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) var(--ease);
58
+ }
59
+ .icon-btn:hover { background: var(--raised); color: var(--text); }
60
+ .icon-btn:active { transform: scale(.94); }
61
+
62
+ kbd, .kbd {
63
+ display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
64
+ border: 0; border-radius: var(--r-sm); background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 1px 0 var(--line-2);
65
+ font: 500 var(--fs-xs)/1 var(--sans); color: var(--muted); white-space: nowrap;
66
+ }
67
+
68
+ /* --- state ----------------------------------------------------------------- */
69
+ /* What a session is doing. The shape says it as well as the colour:
70
+ a circle is fine, a diamond needs you, a square went wrong, a ring is away. */
71
+ .dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
72
+ .dot.ok { background: var(--ok); }
73
+ .dot.info { background: var(--info); }
74
+ .dot.warn { background: var(--warn); border-radius: 1.5px; transform: rotate(45deg) scale(.88); }
75
+ .dot.err { background: var(--err); border-radius: 1.5px; }
76
+ .dot.off, .dot.idle { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
77
+ .dot.pulse { animation: ds-pulse 1.6s var(--ease) infinite; }
78
+ @keyframes ds-pulse { 50% { opacity: .35; } }
79
+
80
+ /* Who someone is goes before the name: a crown leads, a wrench builds. */
81
+ .role { display: inline-block; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
82
+ .role.coord { color: var(--coord); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E"); }
83
+ .role.worker { color: var(--worker); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
84
+ .role.solo { color: var(--muted); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E"); }
85
+
86
+ /* A count: the brand's albero for news, warn for something waiting on you. */
87
+ .badge {
88
+ display: inline-flex; align-items: center; justify-content: center; flex: none;
89
+ min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
90
+ background: var(--accent); color: var(--on-accent); font: 600 var(--fs-xs)/1 var(--sans); font-variant-numeric: tabular-nums;
91
+ }
92
+ .badge.perm, .badge.attn { background: var(--warn-soft); color: var(--warn); }
93
+ .badge.soft { background: var(--tray); color: var(--muted); }
94
+
95
+ /* A label: soft, in a tint (.ok, .warn, .err, .info), or neutral. */
96
+ .tag {
97
+ display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
98
+ border: 0; border-radius: var(--r-sm); background: var(--tray); font: 500 var(--fs-xs)/1 var(--sans); color: var(--muted); white-space: nowrap;
99
+ }
100
+ .tag.ok { background: var(--ok-soft); color: var(--ok); }
101
+ .tag.warn { background: var(--warn-soft); color: var(--warn); }
102
+ .tag.err { background: var(--err-soft); color: var(--err); }
103
+ .tag.info { background: var(--info-soft); color: var(--info); }
104
+
105
+ /* --- controls -------------------------------------------------------------- */
106
+ /* Options that exclude each other: a grey tray, the chosen one a white pill. */
107
+ .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: calc(var(--r) + 1px); background: var(--tray); border: 0; overflow: visible; }
108
+ .seg button, .seg a {
109
+ display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px;
110
+ border: 0; border-radius: calc(var(--r) - 2px); background: none; color: var(--muted); font: 500 var(--fs-md)/1 var(--sans);
111
+ text-decoration: none; white-space: nowrap; transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease;
112
+ }
113
+ .seg button:hover, .seg a:hover { color: var(--text); }
114
+ .seg button.on, .seg a.on, .seg [aria-current="page"], .seg [aria-pressed="true"] {
115
+ background: var(--panel); color: var(--text);
116
+ box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .08), 0 2px 8px -2px rgba(0, 0, 0, .06);
117
+ }
118
+
119
+ .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
120
+ .field > span { font-size: var(--fs-md); font-weight: 500; color: var(--text); }
121
+ .field .hint { font-size: var(--fs-sm); color: var(--muted); }
122
+ /* A field: white, a 1 px ring that darkens on hover and when it has the focus. */
123
+ .input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, table.people select {
124
+ width: 100%; min-height: 36px; padding: 8px 12px; border: 0; border-radius: var(--r);
125
+ background: var(--panel); color: var(--text); font: 400 var(--fs-md)/1.4 var(--sans);
126
+ box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .04);
127
+ transition: box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
128
+ }
129
+ .input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--faint); opacity: 1; }
130
+ .input:hover, .field input:not([type=checkbox]):not([type=radio]):hover, .field select:hover, .field textarea:hover, table.people select:hover { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .04); }
131
+ table.people select { width: auto; min-height: 30px; padding: 4px 10px; }
132
+ /* One height for every one-line field, typed or chosen. */
133
+ .input:not(textarea), .field input:not([type=checkbox]):not([type=radio]), .field select { height: 36px; padding-top: 0; padding-bottom: 0; }
134
+ .field select, table.people select, select.input {
135
+ appearance: none; padding-right: 32px; cursor: pointer;
136
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
137
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
138
+ }
139
+ .field textarea { resize: vertical; }
140
+ .input:focus-visible, .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, table.people select:focus-visible {
141
+ outline: none; box-shadow: 0 0 0 1px var(--line-2), 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent);
142
+ }
143
+ .input:disabled, .field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--raised); color: var(--muted); cursor: not-allowed; }
144
+
145
+ /* A box to tick: drawn, not the system's; dark when ticked, like the main action. */
146
+ .check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-md); margin-bottom: var(--s3); cursor: pointer; }
147
+ input[type=checkbox] {
148
+ appearance: none; flex: none; width: 16px; height: 16px; margin: 2px 0 0; border-radius: 5px; cursor: pointer;
149
+ background: var(--panel); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .06);
150
+ display: inline-grid; place-items: center; transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
151
+ }
152
+ input[type=checkbox]:hover { box-shadow: 0 0 0 1px var(--muted), 0 1px 2px rgba(0, 0, 0, .06); }
153
+ input[type=checkbox]:checked { background: linear-gradient(var(--fill-top), var(--fill-bottom)); box-shadow: 0 0 0 1px var(--fill-ring); }
154
+ input[type=checkbox]:checked::after {
155
+ content: ""; width: 10px; height: 10px; background: var(--on-ink);
156
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
157
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
158
+ }
159
+ input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
160
+ input[type=checkbox]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
161
+ .check input { margin-top: 2px; }
162
+ input[type=radio] { accent-color: var(--text); }
163
+
164
+ /* --- surfaces -------------------------------------------------------------- */
165
+ .card { background: var(--panel); border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; }
166
+
167
+ /* A menu: a white sheet with a soft shadow; its rows light up grey. */
168
+ .menu {
169
+ position: fixed; z-index: 60; min-width: 200px; padding: 5px;
170
+ background: var(--panel); border: 0; border-radius: calc(var(--r) + 4px); box-shadow: var(--shadow-pop);
171
+ animation: ds-pop var(--t) var(--ease);
172
+ }
173
+ .menu button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: calc(var(--r-sm) + 3px); background: none; text-align: left; font-size: var(--fs-md); color: var(--ink-2); transition: background-color 80ms ease, color 80ms ease; }
174
+ .menu button svg { color: var(--faint); }
175
+ .menu button:hover, .menu button:focus-visible { background: var(--raised); color: var(--text); outline: none; }
176
+ .menu button:hover svg, .menu button:focus-visible svg { color: var(--text); }
177
+ .menu button.danger, .menu button.danger svg { color: var(--err); }
178
+ .menu button.danger:hover { background: var(--err-soft); }
179
+ .menu button:disabled { color: var(--faint); background: none; cursor: default; }
180
+ .menu .hint { padding: 4px 10px 6px; font-size: var(--fs-sm); color: var(--muted); }
181
+
182
+ /* A dialog: a white card with its buttons on a grey band below. */
183
+ .modal-bg { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--s4); background: var(--scrim); animation: ds-fade var(--t) var(--ease); }
184
+ .modal {
185
+ --pad: var(--s5);
186
+ width: min(460px, 100%); padding: var(--pad); background: var(--panel); border: 0;
187
+ border-radius: var(--r-xl); box-shadow: var(--shadow-dialog); animation: ds-rise var(--t-slow) var(--ease);
188
+ }
189
+ .modal.wide { width: min(720px, 100%); }
190
+ .modal h3 { margin: 0 0 var(--s4); font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; color: var(--text); }
191
+ .modal h3 + p { margin-top: calc(var(--s2) * -1); }
192
+ .modal p { margin: 0 0 var(--s4); color: var(--muted); }
193
+ .modal p.hint { margin: 0 0 var(--s3); font-size: var(--fs-sm); }
194
+ .err-hint { margin-top: 2px; color: var(--err); font-size: var(--fs-sm); }
195
+ .modal .err { color: var(--err); font-size: var(--fs-sm); min-height: 1.2em; }
196
+ .modal .actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }
197
+ /* (The last one, closing the dialog: on the grey band, as wide as it.) */
198
+ .modal > .actions:last-child, .modal > form:last-child > .actions:last-child {
199
+ margin: var(--s4) calc(var(--pad) * -1) calc(var(--pad) * -1); padding: 12px var(--pad);
200
+ background: var(--tray); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-xl) var(--r-xl);
201
+ }
202
+
203
+ .cmd { background: var(--raised); border: 0; box-shadow: 0 0 0 1px var(--line); border-radius: var(--r); padding: 10px 12px; font: 12px/1.55 var(--mono); }
204
+
205
+ @keyframes ds-fade { from { opacity: 0; } }
206
+ @keyframes ds-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
207
+ @keyframes ds-rise { from { opacity: 0; transform: translateY(8px) scale(.98); filter: blur(2px); } }
208
+
209
+ /* --- empty states ---------------------------------------------------------- */
210
+ .empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: 64px var(--s5); text-align: center; color: var(--muted); }
211
+ .empty b { color: var(--text); font-size: var(--fs-lg); font-weight: 600; }
212
+
213
+ /* A quiet button at either end of a row lines its text up with the text around it. */
214
+ .tq-h > .btn.quiet:last-child, .nt-card-h > .btn.quiet:last-child { margin-right: -12px; }
215
+ .tq-act.quiet { margin-left: -1px; }
216
+
217
+ /* An empty place: its mark, what it is, what to do, and the action. */
218
+ .empty .empty-ic { width: 44px; height: 44px; padding: 11px; border-radius: var(--r-md); stroke-width: 1.6; color: var(--muted); background: var(--panel); box-shadow: var(--shadow-card); margin-bottom: 8px; }
219
+ .empty > span { max-width: 380px; }
220
+ .empty > .btn { margin-top: var(--s2); }
221
+
222
+ /* Which agent runs a session: our own small mark (not the labs' logos), its name on hover. */
223
+ .agent { display: inline-grid; place-items: center; flex: none; width: 14px; height: 14px; border-radius: 4px; font: 700 8.5px/1 var(--sans); letter-spacing: 0; color: #fff; text-box: trim-both cap alphabetic; vertical-align: middle; }
224
+ .agent.claude { background: #b8664a; }
225
+ .agent.codex { background: #14805f; }
226
+ .agent.grok { background: #4a5260; }
227
+ :root[data-theme="dark"] .agent.claude { background: #c7785b; }
228
+ :root[data-theme="dark"] .agent.grok { background: #6b7482; }
229
+ @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .agent.claude { background: #c7785b; } :root:not([data-theme="light"]) .agent.grok { background: #6b7482; } }