kanzo 0.3.0

Self-hosted kanban for humans and agents. One 4 MB binary, starts in 2 ms, zero setup.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kanzo</title>
<link rel="icon" href="/logo.png">
<style>
:root {
  --bg: #ffffff; --sidebar: #f9f9f9; --col: #f7f7f7; --card: #ffffff; --card-hover: #f4f4f4; --panel: #ffffff;
  --field: #f4f4f4; --hover: #ececec; --active: #e5e5e5; --menu: #ffffff;
  --text: #0d0d0d; --muted: #5d5d5d; --faint: #8f8f8f; --border: #e5e5e5; --card-border: #ebebeb;
  --accent: #0d0d0d; --accent-text: #ffffff; --danger: #dc2626; --danger-bg: rgba(220, 38, 38, .08);
  --link: #2563eb; --code: #f2f2f2; --shadow: 0 10px 30px rgba(0,0,0,.12);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --sidebar: #000000; --col: #0b0b0b; --card: #171717; --card-hover: #1e1e1e; --panel: #0b0b0b;
    --field: #171717; --hover: #1a1a1a; --active: #242424; --menu: #1c1c1c;
    --text: #ececec; --muted: #a1a1a1; --faint: #6e6e6e; --border: #1f1f1f; --card-border: transparent;
    --accent: #ffffff; --accent-text: #000000; --danger: #f87171; --danger-bg: rgba(248, 113, 113, .1);
    --link: #7ab7ff; --code: #1c1c1c; --shadow: 0 10px 30px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--active) transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
/* No focus rings: fields and buttons show focus with their background instead. */
:focus { outline: none; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.icon { display: inline-flex; flex: none; }
.icon svg { width: 18px; height: 18px; display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* Sidebar */
aside {
  background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; padding: 12px 8px;
}
.brand { font-weight: 600; font-size: 17px; padding: 4px 10px 16px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; margin: -4px 0; }
.brand .ghost { width: auto; margin: -6px 0 -6px auto; padding: 6px; color: var(--muted); }
.brand .ghost:hover, .brand .ghost:focus-visible { color: var(--text); }
.brand .ghost + .ghost { margin-left: 0; }
.syncing svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.nav { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ghost, .nav a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; color: inherit; text-align: left; text-decoration: none; white-space: nowrap;
}
.ghost:hover, .ghost:focus-visible, .nav a:hover, .nav a:focus-visible { background: var(--hover); }
.nav a.active { background: var(--active); }
.nav a .name { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav a .count { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav .label { color: var(--faint); padding: 18px 10px 6px; }
/* A project row: its "more" button takes the count's place on hover, like most sidebars. */
.nav .item { position: relative; }
.nav .more {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: none;
  width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 8px; background: none; color: var(--muted);
}
.nav .more:hover, .nav .item.menu-open .more { color: var(--text); }
.nav .item:hover .more, .nav .item:focus-within .more, .nav .item.menu-open .more { display: block; }
.nav .item:hover .count, .nav .item:focus-within .count, .nav .item.menu-open .count { visibility: hidden; }
.nav .item.menu-open a { background: var(--hover); }
.nav .item.renaming { display: flex; align-items: center; gap: 10px; padding: 3px 6px 3px 10px; }
.nav .item.renaming .field { padding: 5px 8px; border-radius: 8px; }
@media (hover: none) { .nav .more { display: block; } .nav .item .count { visibility: hidden; } }
.menu {
  position: fixed; z-index: 30; min-width: 190px; padding: 6px; background: var(--menu);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; text-align: left;
}
.menu button:hover, .menu button:focus-visible { background: var(--hover); }
.menu button.danger { color: var(--danger); }
.menu .label { color: var(--faint); font-size: 12px; padding: 4px 10px 0; }
.menu .swatches { display: flex; gap: 6px; padding: 8px 10px 10px; }
.menu .swatch {
  width: 20px; height: 20px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; transition: transform .1s;
}
.menu .swatch:hover, .menu .swatch:focus-visible { transform: scale(1.15); }
.menu .swatch .icon svg { width: 13px; height: 13px; stroke-width: 3; }
.menu .sep { height: 1px; background: var(--border); margin: 0 4px 6px; }
.menu .repos { display: flex; flex-direction: column; gap: 2px; padding: 6px 6px 10px; }
.menu .repo { display: flex; align-items: center; gap: 6px; padding: 2px 0 2px 4px; }
.menu .repo .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.menu .repo .unlink { width: auto; padding: 4px; color: var(--faint); }
.menu .repo .unlink:hover { color: var(--danger); background: var(--danger-bg); }
.menu .repo .unlink .icon svg { width: 14px; height: 14px; }
.menu .repos input { margin-top: 4px; padding: 6px 10px; border-radius: 10px; font-size: 13px; }
.menu button.danger:hover, .menu button.danger:focus-visible { background: var(--danger-bg); }
.update { margin-top: 8px; background: var(--hover); }
.update:hover, .update:focus-visible { background: var(--active); }
.update:disabled { opacity: .6; cursor: default; }
#settings { margin-top: 8px; color: var(--muted); }
#settings:hover, #settings:focus-visible, #settings.open { color: var(--text); }
.menu .value { margin-left: auto; padding-left: 12px; color: var(--faint); font-size: 12px; }

/* Controls */
input.field, textarea.field, select.field {
  background: var(--field); border: 0; border-radius: 12px; padding: 8px 12px; width: 100%;
}
.field::placeholder, .inline::placeholder { color: var(--faint); }
select.field {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 30px;
  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='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
select.field:hover { background-color: var(--hover); }
.btn {
  border: 0; background: var(--hover); border-radius: 99px; padding: 7px 16px; font-weight: 500;
}
.btn:hover, .btn:focus-visible { background: var(--active); }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover, .btn.primary:focus-visible { opacity: .85; }

/* Main board */
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
header {
  display: flex; align-items: center; gap: 12px; padding: 16px 24px 14px; flex-wrap: wrap; min-height: 64px;
}
header .info { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0; }
header h1 { font-size: 18px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
header .sub { color: var(--muted); }
header .repo-link {
  display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 3px 10px 3px 8px;
  border-radius: 99px; background: var(--hover); color: var(--muted); font-size: 12.5px; text-decoration: none;
}
header .repo-link:hover, header .repo-link:focus-visible { background: var(--active); color: var(--text); }
header .repo-link .icon svg { width: 14px; height: 14px; }
/* Sharing: a green dot with the number of guests, or the computer whose board this is. */
/* Share: an icon, green with the number of guests while shared, or with the host once joined. */
/* The header's icon buttons, as tall and round as New task beside them. */
#network, #human-only { width: auto; height: 35px; min-width: 35px; padding: 0 8px; justify-content: center; border-radius: 99px; }
#network { gap: 6px; color: var(--muted); font-size: 13px; }
#network:hover, #network:focus-visible, #network.open { color: var(--text); }
#network.on { padding: 0 12px 0 10px; background: color-mix(in srgb, #2f9e44 14%, transparent); color: #2f9e44; font-weight: 500; }
#network .count {
  min-width: 18px; padding: 0 5px; border-radius: 99px; background: color-mix(in srgb, currentColor 18%, transparent);
  font-size: 11.5px; line-height: 18px; text-align: center;
}
#new-task { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; }
#new-task .icon svg { width: 16px; height: 16px; }
/* Show only human tasks: a small icon, coloured while the filter is on. */
#human-only { color: var(--muted); }
#human-only:hover, #human-only:focus-visible { color: var(--text); }
#human-only[aria-pressed="true"] { background: color-mix(in srgb, var(--link) 14%, transparent); color: var(--link); }
#human-only[aria-pressed="true"]:hover, #human-only[aria-pressed="true"]:focus-visible {
  background: color-mix(in srgb, var(--link) 22%, transparent);
}
.columns {
  flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 12px; padding: 0 24px 24px; overflow-x: auto;
}
.column {
  background: var(--col); border-radius: 18px; display: flex; flex-direction: column; min-height: 0;
}
.column h2 {
  font-size: 13px; font-weight: 600; text-transform: capitalize; color: var(--muted);
  margin: 0; padding: 14px 16px 10px; display: flex; align-items: center; gap: 8px;
}
.column h2 .count { color: var(--faint); font-weight: 400; }
.status-icon { display: inline-flex; flex: none; }
.status-icon svg { width: 14px; height: 14px; display: block; }
.column h2 .collapse {
  margin: -6px -6px -6px auto; width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 8px;
  background: none; color: var(--faint);
}
.column h2 .collapse:hover, .column h2 .collapse:focus-visible { background: var(--hover); color: var(--text); }
/* A collapsed column: a thin strip, name written downwards, that expands on a click. */
.column.collapsed { cursor: pointer; }
.column.collapsed:hover { background: var(--hover); }
.column.collapsed h2 { writing-mode: vertical-rl; padding: 12px 0; align-items: center; gap: 10px; }
.column.collapsed h2 .collapse { margin: 0 0 4px; order: -1; }
.column.collapsed .cards { display: none; }
.cards { flex: 0 1 auto; overflow-y: auto; padding: 2px 8px 8px; display: flex; flex-direction: column; gap: 6px; min-height: 8px; }
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 10px 12px;
  cursor: grab; user-select: none; transition: background .1s;
}
.card:hover { background: var(--card-hover); }
.card.open { background: var(--active); }
.card.dragging { opacity: .4; }
.card .head { display: flex; align-items: flex-start; gap: 10px; }
.card .title { overflow-wrap: anywhere; flex: 1; min-width: 0; }
.card .num {
  display: inline-flex; align-items: center; gap: 5px; flex: none; margin-top: 2px;
  color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; cursor: copy;
}
.card .num:hover, #p-key:hover { color: var(--text); }
#p-key { cursor: copy; }
.card .num .dot { width: 6px; height: 6px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.card .human-mark { flex: none; margin-top: 1px; color: var(--muted); display: inline-flex; }
.card .human-mark .icon svg { width: 15px; height: 15px; }
/* An on/off switch, for the Human field. */
.human-field { display: flex; align-items: center; gap: 10px; }
.props .human-field .hint { color: var(--faint); font-size: 12px; }
.switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.switch span { flex: 1; border-radius: 99px; background: var(--active); transition: background .15s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
.switch input:checked + span { background: #3b82f6; }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 2px var(--hover); }
.card .desc {
  margin-top: 2px; color: var(--muted); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  background: var(--hover); border-radius: 99px; padding: 1px 9px 1px 8px;
}
.tag .dot { width: 6px; height: 6px; }
.drop-line { height: 2px; background: var(--text); border-radius: 2px; margin: -4px 4px; }
.empty {
  margin: auto; text-align: center; color: var(--muted); max-width: 380px; padding: 40px 20px;
}
.empty h1 { color: var(--text); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }

/* Task panel */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100vw); background: var(--panel);
  border-left: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .18s ease-out;
  z-index: 10;
}
.panel.shown { transform: none; }
.panel .top { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px 20px; }
.panel .top .key { color: var(--muted); }
.panel .top .spacer { flex: 1; }
.panel .top .ghost { width: auto; padding: 6px; color: var(--muted); }
.panel .top .ghost:hover { color: var(--text); }
.panel .top .ghost.danger:hover { color: var(--danger); background: var(--danger-bg); }
/* The project, shown as a tag; picking another one moves the task. */
.panel .project-pick select {
  appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 0; margin: 0;
  font-size: inherit; color: inherit; cursor: pointer; field-sizing: content;
}
.panel .project-pick:hover, .panel .project-pick:focus-within { background: var(--active); color: var(--text); }
.panel .body { overflow-y: auto; padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
/* The body scrolls instead; without this a long task squeezes the title and textareas to nothing. */
.panel .body > * { flex-shrink: 0; }
/* Title and description look like text and are edited in place. */
.panel .inline {
  border: 0; background: none; padding: 6px 10px; margin: -6px -10px; border-radius: 10px;
  width: calc(100% + 20px); resize: none; overflow: hidden; display: block;
}
.panel .inline:hover, .panel .inline:focus { background: var(--hover); }
.panel .desc-view { cursor: text; }
.panel .title-input { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.props { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; align-items: center; color: var(--muted); }
.props select { width: auto; padding: 4px 30px 4px 12px; border-radius: 99px; text-transform: capitalize; }
.props span { color: var(--text); }
.section h3 {
  font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.section h3 .count { color: var(--faint); font-weight: 400; }
.comment { padding: 10px 0; }
.comment:first-child { padding-top: 0; }
.comment .who { font-size: 12px; color: var(--faint); margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
/* Each comment's delete button shows on hover, like the sidebar's "more" button. */
.comment .remove {
  margin-left: auto; padding: 3px; border: 0; border-radius: 6px; background: none; color: var(--faint);
  visibility: hidden;
}
.comment:hover .remove, .comment .remove:focus-visible { visibility: visible; }
.comment .remove:hover { color: var(--danger); background: var(--danger-bg); }
.comment .remove .icon svg { width: 14px; height: 14px; }
@media (hover: none) { .comment .remove { visibility: visible; } }
.comment .who b { color: var(--text); font-weight: 600; }
/* Attached images: thumbnails that open the full image, with an × to remove. */
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
#p-images { margin-top: 10px; }
.composer .thumbs { padding: 12px 12px 0; }
.comment .thumbs { margin-top: 6px; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--field); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .remove-image {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 4px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; display: none;
}
.thumb:hover .remove-image, .thumb .remove-image:focus-visible { display: grid; place-items: center; }
.thumb .remove-image .icon svg { width: 14px; height: 14px; }
@media (hover: none) { .thumb .remove-image { display: grid; place-items: center; } }
.section.dropping { background: var(--hover); border-radius: 12px; }
.composer.dropping { background: var(--active); }

/* The comment box, with its send button inside like a chat composer. */
.composer { position: relative; margin-top: 6px; background: var(--field); border-radius: 20px; }
.composer textarea {
  display: block; width: 100%; min-height: 84px; max-height: 50vh; resize: none; border: 0; background: none;
  padding: 12px 52px 12px 16px;
}
.composer textarea::placeholder { color: var(--faint); }
.composer .send {
  position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-text);
}
.composer .send:disabled { opacity: .25; cursor: default; }
.composer .send .icon svg { width: 16px; height: 16px; stroke-width: 2.2; }

/* Rendered Markdown */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md pre, .md blockquote { margin: 0 0 .6em; }
.md h1, .md h2, .md h3, .md h4 { margin: .8em 0 .4em; font-size: 15px; }
.md h1 { font-size: 17px; }
.md ul, .md ol { padding-left: 1.3em; }
.md li.check { list-style: none; margin-left: -1.3em; }
.md code { background: var(--code); border-radius: 6px; padding: 1px 5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.md pre { background: var(--code); border-radius: 12px; padding: 10px 12px; overflow-x: auto; }
.md pre code { padding: 0; background: none; }
.md blockquote { border-left: 3px solid var(--active); padding-left: 10px; color: var(--muted); }
.md a { color: var(--link); }

/* The search window, as in ChatGPT. */
.search-dialog {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45);
  display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
}
.search-window {
  width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--menu); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.search-field .icon { color: var(--faint); }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; font-size: 16px; }
.search-field input::-webkit-search-cancel-button { display: none; }
.results { overflow-y: auto; padding: 6px; }
.dialog-window {
  width: min(520px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.dialog-window h2 { margin: 0; font-size: 17px; font-weight: 600; }
.dialog-window p { margin: 0; color: var(--muted); line-height: 1.45; }
.dialog-window .row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* The settings window, as in Claude's: categories on the left, their settings on the right. */
.settings-window {
  width: min(760px, 100%); height: min(460px, 76vh); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.settings-head { display: flex; align-items: center; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--border); }
.settings-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.settings-head .ghost { width: auto; margin-left: auto; padding: 6px; color: var(--muted); }
.settings-head .ghost:hover, .settings-head .ghost:focus-visible { color: var(--text); }
.settings-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 0; }
#settings-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--sidebar); border-right: 1px solid var(--border); }
#settings-nav .active { background: var(--active); }
.settings-pane { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; overflow-y: auto; }
.settings-pane h3 { margin: 0; font-size: 15px; font-weight: 600; }
.settings-pane p { margin: 0; color: var(--muted); line-height: 1.45; }
.settings-pane .error { color: var(--danger); white-space: pre-line; font-size: 13px; }
.settings-pane .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-pane .row a { color: var(--muted); font-size: 13px; }
.settings-pane .row a:hover { color: var(--text); }
.settings-pane .row .btn { margin-left: auto; }
.settings-pane .btn:disabled { opacity: .6; cursor: default; }
.setting { display: flex; align-items: center; gap: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.setting .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting .text span { color: var(--muted); font-size: 13px; }
label.setting { cursor: pointer; }
/* Joining a board: the address, under the row that offers it. */
/* A setting that can't change now, like sharing while this computer uses another board. */
.setting.disabled, .popover form.disabled { opacity: .5; cursor: default; }
/* The share popover, under its icon: share this board, or join another computer's. */
.popover {
  position: fixed; z-index: 30; width: 340px; max-width: calc(100vw - 16px); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; background: var(--menu);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.popover > .setting:first-child { border-top: 0; padding-top: 0; }
.popover form { display: flex; flex-direction: column; gap: 8px; }
.popover .row { display: flex; gap: 8px; }
.popover .row .field { flex: 1; min-width: 0; }
.popover .error { margin: 0; color: var(--danger); font-size: 13px; }
.popover .hint { margin: 0; color: var(--faint); font-size: 12px; }
/* The addresses other computers join, each copied with a click. */
#network-addresses { display: flex; flex-direction: column; gap: 6px; }
.popover .copy {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: var(--field); color: var(--text); text-align: left;
}
.popover .copy .mono { flex: 1; font-size: 13px; }
.popover .copy .icon { color: var(--muted); }
.popover .copy:hover .icon, .popover .copy:focus-visible .icon { color: var(--text); }
.popover .copy .icon svg { width: 16px; height: 16px; }
/* One solid red in both themes: dark mode's --danger is a light red for text. */
.btn.danger { background: #dc2626; color: #fff; }
.btn.danger:hover, .btn.danger:focus-visible { background: #dc2626; opacity: .85; }
/* The computers using a shared board. */
.guests { display: flex; flex-direction: column; gap: 8px; }
.guests .label { color: var(--muted); font-size: 13px; }
.guest { display: flex; align-items: center; gap: 8px; }
.guest .dot { width: 7px; height: 7px; background: #2f9e44; }
.guest .address { margin-left: auto; color: var(--muted); font-size: 13px; }
.results .label { color: var(--faint); font-size: 12px; padding: 8px 12px 4px; }
.results .note { color: var(--faint); padding: 14px 12px; }
.result {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; text-align: left;
}
.result.selected { background: var(--hover); }
.result .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .meta { flex: none; display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; }

.toast {
  white-space: pre-line; max-width: min(640px, calc(100vw - 32px));
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 9px 16px; border-radius: 99px; z-index: 20; box-shadow: var(--shadow); font-weight: 500;
}
.offline { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 4px 12px; border-radius: 99px; font-size: 12px; z-index: 20; }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  aside { border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; }
  .brand { padding-bottom: 6px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav a { width: auto; }
  .nav .label { display: none; }
  #new-project-toggle { display: none; }
  .columns { grid-auto-columns: minmax(78vw, 1fr); padding: 0 12px 12px; }
  .settings-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  #settings-nav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); }
  header { padding: 12px; }
}
</style>
</head>
<body>
<aside>
  <div class="brand">
    <img src="/logo.png" alt="">
    Kanzo
    <button class="ghost" id="search-open" title="Search (/ or ⌘K)" aria-label="Search tasks"><span class="icon" data-icon="search"></span></button>
  </div>
  <button class="ghost" id="new-project-toggle"><span class="icon" data-icon="newProject"></span>New project</button>
  <nav class="nav" id="nav"></nav>
  <button class="ghost update" id="update" hidden><span class="icon" data-icon="update"></span><span id="update-label"></span></button>
  <button class="ghost" id="settings" aria-haspopup="menu"><span class="icon" data-icon="settings"></span>Settings</button>
</aside>

<main>
  <header>
    <div class="info" id="header"></div>
    <button class="ghost" id="human-only" title="Show only human tasks (h)" aria-label="Show only human tasks" aria-pressed="false" hidden><span class="icon" data-icon="human"></span></button>
    <button class="ghost" id="network" aria-haspopup="dialog" aria-controls="network-menu"></button>
    <button class="btn primary" id="new-task" title="New task (n)" hidden><span class="icon" data-icon="plus"></span>New task</button>
  </header>
  <div class="columns" id="columns"></div>
</main>

<div class="panel" id="panel" aria-hidden="true">
  <div class="top">
    <span class="key mono" id="p-key"></span>
    <span id="p-project"></span>
    <span class="spacer"></span>
    <button class="ghost danger" id="p-delete" title="Delete task" aria-label="Delete task"><span class="icon" data-icon="trash"></span></button>
    <button class="ghost" id="p-close" title="Close (Esc)" aria-label="Close"><span class="icon" data-icon="close"></span></button>
  </div>
  <div class="body">
    <textarea class="inline title-input" id="p-title" rows="1" spellcheck="false" placeholder="Task title"></textarea>
    <div class="props">
      Status <span><select class="field" id="p-status"></select></span>
      Tags <span><input class="inline" id="p-tags" placeholder="Add tags, like bug, ui" autocomplete="off" spellcheck="false"></span>
      Human <span class="human-field"><label class="switch"><input type="checkbox" id="p-human" aria-label="Human task"><span></span></label><span class="hint">Agents skip it</span></span>
      Created <span id="p-created"></span>
      Updated <span id="p-updated"></span>
    </div>
    <div class="section">
      <h3>Description</h3>
      <textarea class="inline desc-input" id="p-desc" rows="1" placeholder="Add a description (Markdown)"></textarea>
      <div class="inline md desc-view" id="p-desc-view" tabindex="0" role="button" aria-label="Edit description" hidden></div>
      <div class="thumbs" id="p-images"></div>
    </div>
    <div class="section">
      <h3>Comments <span class="count" id="p-comment-count"></span></h3>
      <div id="p-comments"></div>
      <form class="composer" id="p-comment-form">
        <div class="thumbs" id="p-pending"></div>
        <textarea id="p-comment" rows="2" placeholder="Add a comment"></textarea>
        <button class="send" id="p-send" type="submit" title="Send (⌘↵)" aria-label="Send comment" disabled><span class="icon" data-icon="send"></span></button>
      </form>
    </div>
  </div>
</div>

<div class="search-dialog" id="settings-dialog" hidden>
  <div class="settings-window" role="dialog" aria-labelledby="settings-title">
    <div class="settings-head">
      <h2 id="settings-title">Settings</h2>
      <button class="ghost" id="settings-close" title="Close (Esc)" aria-label="Close"><span class="icon" data-icon="close"></span></button>
    </div>
    <div class="settings-body">
      <nav id="settings-nav">
        <button class="ghost" data-section="board"><span class="icon" data-icon="board"></span>Board</button>
        <button class="ghost" data-section="sync"><span class="icon" data-icon="sync"></span>Sync</button>
        <button class="ghost" data-section="about"><span class="icon" data-icon="info"></span>About</button>
      </nav>
      <section class="settings-pane" data-section="board">
        <h3>Board</h3>
        <label class="setting">
          <span class="text">Backlog column<span>A column before todo, for tasks agents leave alone</span></span>
          <span class="switch"><input type="checkbox" id="settings-backlog" aria-label="Backlog column"><span></span></span>
        </label>
      </section>
      <form class="settings-pane" data-section="sync" id="sync-form">
        <h3>Sync</h3>
        <p>Keep this board the same on all your machines through a private git repo you own. Use the same repo on each machine.</p>
        <input class="field" id="sync-url" placeholder="https://github.com/you/kanzo-data" autocomplete="off" spellcheck="false" aria-label="Repository URL">
        <p class="error" id="sync-error" hidden></p>
        <div class="row">
          <a id="sync-create" href="https://github.com/new?name=kanzo-data&amp;visibility=private" target="_blank" rel="noopener">Create a private repo on GitHub</a>
          <button class="btn primary" type="submit" id="sync-save">Save and sync</button>
        </div>
      </form>
      <section class="settings-pane" data-section="about">
        <h3>About</h3>
        <div class="setting">
          <span class="text">Version<span id="settings-version"></span></span>
          <button class="btn" id="settings-update">Check for updates</button>
        </div>
      </section>
    </div>
  </div>
</div>
<div class="popover" id="network-menu" role="dialog" aria-label="Share" hidden>
  <label class="setting" id="network-share-row">
    <span class="text">Share this board<span id="network-share-note"></span></span>
    <span class="switch"><input type="checkbox" id="network-share" aria-label="Share this board"><span></span></span>
  </label>
  <div id="network-addresses" hidden></div>
  <div class="guests" id="network-guests" hidden></div>
  <form id="network-join">
    <div class="setting">
      <span class="text" id="network-join-text"></span>
      <button class="btn danger" type="button" id="network-leave">Leave</button>
    </div>
    <div class="row" id="network-join-fields">
      <input class="field" id="join-host" placeholder="192.168.0.12" aria-label="Address of the sharing computer" required autocomplete="off" spellcheck="false">
      <button class="btn" type="submit" id="join-submit">Join</button>
    </div>
  </form>
  <p class="error" id="network-error" hidden></p>
  <p class="hint">There are no logins: share only on a network you trust.</p>
</div>
<div class="search-dialog" id="project-dialog" hidden>
  <form class="dialog-window" id="new-project" role="dialog" aria-labelledby="project-title">
    <h2 id="project-title">New project</h2>
    <p>The slug starts each task's key, like api#12.</p>
    <input class="field" name="slug" placeholder="Slug, like api" aria-label="Slug" required autocomplete="off" spellcheck="false" pattern="[a-zA-Z0-9][a-zA-Z0-9\-]{0,31}" title="Letters, digits and -, up to 32">
    <input class="field" name="name" placeholder="Name (optional)" aria-label="Name" autocomplete="off">
    <input class="field" name="repo" placeholder="GitHub owner/repo (optional)" aria-label="GitHub repo" autocomplete="off" spellcheck="false">
    <div class="row">
      <button class="btn" type="button" id="new-project-cancel">Cancel</button>
      <button class="btn primary" type="submit">Create</button>
    </div>
  </form>
</div>
<div class="search-dialog" id="search-dialog" hidden>
  <div class="search-window" role="dialog" aria-label="Search tasks">
    <label class="search-field"><span class="icon" data-icon="search"></span><input id="search" type="search" placeholder="Search tasks" autocomplete="off" spellcheck="false" aria-label="Search tasks"></label>
    <div class="results" id="search-results"></div>
  </div>
</div>

<div class="offline" id="offline" hidden>Board not reachable — is kanzo running?</div>

<script src="/app.js"></script>
</body>
</html>