/* Team screens, shared by the full app's team tabs and the team door. Classes start with tm-. */
.tm{flex:1;overflow:auto;padding:16px 18px 100px;max-width:760px;width:100%;margin:0 auto}
.tm-loading{color:var(--muted,#646b75);font-size:13px}
.tm-h{display:flex;flex-direction:column;gap:2px;margin:4px 0 14px}
.tm-h h2{margin:0;font-size:18px}
.tm-h span{color:var(--muted,#646b75);font-size:13px}
.tm-empty{background:#fff;border:1px dashed var(--line-2,#cdd1d7);border-radius:12px;padding:22px 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.tm-empty b{font-size:15px}
.tm-empty p{margin:0;color:var(--muted,#646b75);font-size:13.5px;max-width:420px;line-height:1.45}
.tm-btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 16px;border-radius:8px;border:1px solid var(--line-2,#cdd1d7);background:#fff;color:var(--ink,#1d2129);font:inherit;font-size:14px;font-weight:600;cursor:pointer;text-decoration:none}
.tm-btn.pri{background:var(--base,#1466c8);border-color:var(--base,#1466c8);color:#fff}
.tm-people{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:12px;overflow:hidden}
.tm-person{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid var(--line,#e2e4e8);min-height:56px}
.tm-person:first-child{border-top:0}
.tm-person.off{opacity:.55}
.tm-dot{width:14px;height:14px;border-radius:50%;flex:none}
.tm-col{width:30px;height:30px;padding:0;border:0;background:none;cursor:pointer;flex:none}
.tm-pm{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tm-pm em{font-style:normal;font-size:12px;color:var(--muted,#646b75);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-name{font:inherit;font-size:15px;font-weight:600;border:1px solid transparent;border-radius:6px;padding:3px 6px;margin-left:-7px;background:transparent;color:inherit;width:100%;max-width:280px}
.tm-name:hover{border-color:var(--line,#e2e4e8)}
.tm-name:focus{border-color:var(--accent,#2d7ff9);outline:0;background:#fff}
.tm-sw{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted,#646b75);flex:none}
.tm-note{font-size:12.5px;color:var(--muted,#646b75);margin:12px 2px}
.tm-sw2{display:inline-flex;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;overflow:hidden;margin-bottom:14px;background:#fff}
.tm-sw2 button{border:0;background:none;font:inherit;font-size:13px;padding:6px 14px;cursor:pointer;color:var(--ink,#1d2129)}
.tm-sw2 button.on{background:var(--accent-soft,#e7f0ff);color:#0e52a6;font-weight:600}
.tm-back{border:0;background:none;color:var(--base-2,#0e52a6);font:inherit;font-size:15px;font-weight:600;padding:6px 0 10px;cursor:pointer}
.tm-exp{margin-top:18px;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:12px;padding:12px 14px;font-size:13.5px}
.tm-exp p{margin:4px 0 0;color:var(--muted,#646b75);line-height:1.45}
.tm-exp.bad{border:2px solid #a3263d;background:#fdecef;padding:14px 16px}
.tm-exp.bad b{color:#a3263d;font-size:16px}
.tm-exp.bad p{color:#6d1424;font-size:15px}
.tm-alert{margin:0 0 12px;padding:12px 14px;border:2px solid #a3263d;border-radius:12px;background:#fdecef;color:#6d1424;font-size:15px;line-height:1.4}
.tm-alert b{color:#a3263d}

/* Threads (Stage 3, team-threads.js). Classes start with th-. Calm and plain on purpose. */
.th-root{flex:1;min-height:0;display:flex;background:#fff;color:var(--ink,#1d2129);font-size:14px;line-height:1.45}
.th-root button{font:inherit;color:inherit}
.th-left{width:230px;flex:none;border-right:1px solid var(--line,#e2e4e8);overflow:auto;padding:10px 8px 14px;background:#fafbfc;display:flex;flex-direction:column;gap:1px}
.th-left h4,.th-pane h4{margin:14px 8px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#646b75);font-weight:600}
.th-mid{width:380px;flex:none;border-right:1px solid var(--line,#e2e4e8);display:flex;flex-direction:column;min-height:0}
.th-right{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
.th-ch{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;text-align:left;padding:6px 8px;border-radius:6px;cursor:pointer;min-height:32px}
.th-ch:hover{background:var(--hover,#f2f4f7)}
.th-ch.on{background:var(--accent-soft,#e7f0ff);color:#0e52a6;font-weight:600}
.th-hash{width:16px;flex:none;display:inline-grid;place-items:center;color:var(--muted,#646b75);font-size:13px}
.th-ch.on .th-hash{color:inherit}
.th-cn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-n{background:var(--base,#1466c8);color:#fff;border-radius:999px;font-size:11px;min-width:20px;height:20px;padding:0 6px;display:inline-grid;place-items:center;font-weight:700}
.th-add{color:var(--muted,#646b75)}
.th-hint{margin:2px 8px 6px;font-size:12px;color:var(--muted,#646b75)}
.th-nc{display:flex;flex-direction:column;gap:6px;padding:6px 8px;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:8px;margin:4px 0}
.th-nc span{display:flex;gap:6px}
.th-nc input,.th-nc select,.th-search input,.th-ren input,.th-cf select,.th-cf input,.th-cf textarea,.th-reply textarea,.th-edit textarea{font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:7px 9px;background:#fff;color:inherit;min-width:0}
.th-root input:focus,.th-root textarea:focus,.th-root select:focus{outline:0;border-color:var(--accent,#2d7ff9);box-shadow:0 0 0 3px rgba(45,127,249,.15)}
.th-arch summary{cursor:pointer;color:var(--muted,#646b75);font-size:12.5px;padding:8px}
.th-foot{margin-top:auto;padding-top:12px;border-top:1px solid var(--line,#e2e4e8)}
.th-search{padding:2px 0 6px}
.th-search input{width:100%}
.th-mh{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line,#e2e4e8);min-height:52px;flex-wrap:wrap}
.th-mh h3{margin:0;font-size:16px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-mh .th-ren{flex-basis:100%}
.th-list{flex:1;min-height:0;overflow:auto}
.th-row{display:flex;flex-direction:column;gap:2px;width:100%;border:0;border-bottom:1px solid var(--line,#e2e4e8);background:#fff;text-align:left;padding:10px 14px;cursor:pointer}
.th-row:hover{background:#fafbfc}
.th-row.on{background:var(--accent-soft,#e7f0ff)}
.th-rt{display:flex;gap:10px;align-items:baseline}
.th-rt b{flex:1;min-width:0;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-row.unread .th-rt b{font-weight:700}
.th-row.unread .th-rt b::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--base,#1466c8);margin-right:6px;vertical-align:middle}
.th-rt time{font-size:12px;color:var(--muted,#646b75);flex:none}
.th-rl{color:#3d434c;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-rm{color:var(--muted,#646b75);font-size:12px}
.th-empty,.th-blank{padding:28px 20px;text-align:center;color:var(--muted,#646b75);display:flex;flex-direction:column;align-items:center;gap:8px}
.th-empty b,.th-blank b{color:var(--ink,#1d2129);font-size:15px}
.th-empty p,.th-blank p{margin:0;max-width:360px}
.th-blank{margin:auto}
.th-wait{color:var(--muted,#646b75);padding:16px}
.th-off{margin:8px;padding:7px 10px;border-radius:7px;background:#fff7e0;color:#6b4e00;font-size:12.5px}
.th-th{display:flex;align-items:flex-start;gap:10px;padding:12px 18px;border-bottom:1px solid var(--line,#e2e4e8);flex-wrap:wrap}
.th-tt{flex:1;min-width:220px}
.th-tt h2{margin:0;font-size:18px;line-height:1.3}
.th-tt p{margin:3px 0 0;color:var(--muted,#646b75);font-size:13px}
.th-lnk{border:0;background:none;padding:0;color:var(--base-2,#0e52a6) !important;cursor:pointer;font-weight:600}
.th-ta{display:flex;gap:6px;align-items:center}
.th-done{gap:6px}
.th-ib{border:1px solid var(--line-2,#cdd1d7);background:#fff;border-radius:8px;min-width:36px;height:36px;display:inline-grid;place-items:center;cursor:pointer;padding:0 8px;font-size:13px;font-weight:600}
.th-ib.pri{background:var(--base,#1466c8);border-color:var(--base,#1466c8);color:#fff !important}
.th-ib.warn,.th-own .warn{color:#b3261e !important;border-color:#e8b4a8}
.th-ren{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.th-ren input{flex:1;min-width:160px;font-size:15px}
.th-msgs{flex:1;min-height:0;overflow:auto;padding:6px 18px 12px}
.th-c{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid #f0f1f3}
.th-c:last-child{border-bottom:0}
.th-av{width:30px;height:30px;border-radius:50%;flex:none;color:#fff;font-style:normal;font-weight:700;font-size:13px;display:inline-grid;place-items:center}
.th-cb{flex:1;min-width:0}
.th-ch2{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.th-ch2 time,.th-ch2 em{font-size:12px;color:var(--muted,#646b75);font-style:normal}
.th-own{margin-left:auto;display:flex;gap:2px}
.th-own button{border:0;background:none;color:var(--muted,#646b75);font-size:12px;padding:2px 6px;cursor:pointer;border-radius:5px}
.th-own button:hover{background:var(--hover,#f2f4f7);color:var(--ink,#1d2129)}
.th-tx{margin-top:3px;white-space:normal;overflow-wrap:anywhere}
.th-tx a{color:var(--base-2,#0e52a6)}
.th-at{color:var(--base-2,#0e52a6);font-weight:600}
.th-sys{color:var(--muted,#646b75);font-size:12.5px;margin:8px 0 8px 40px}
.th-imgs{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.th-img{display:block;width:120px;height:120px;border-radius:8px;overflow:hidden;background:#eef0f3;border:1px solid var(--line,#e2e4e8)}
.th-img img{width:100%;height:100%;object-fit:cover;display:block}
.th-file{display:inline-flex;align-items:center;gap:6px;margin:6px 6px 0 0;padding:6px 10px;border:1px solid var(--line,#e2e4e8);border-radius:8px;color:inherit;text-decoration:none;max-width:100%}
.th-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-file em{font-style:normal;color:var(--muted,#646b75);font-size:12px;flex:none}
.th-edit{display:flex;flex-direction:column;gap:6px}
.th-edit span{display:flex;gap:6px}
.th-reply{flex:none;border-top:1px solid var(--line,#e2e4e8);padding:10px 18px 12px;display:flex;flex-direction:column;gap:8px;background:#fafbfc}
.th-reply textarea,.th-cf textarea{resize:none;width:100%;line-height:1.45}
.th-rb{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.th-tool{display:inline-flex;align-items:center;gap:5px;border:1px solid transparent;background:none;border-radius:7px;padding:6px 8px;cursor:pointer;color:var(--muted,#646b75) !important;font-size:13px;min-height:36px;max-width:100%}
.th-tool span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-tool:hover{background:var(--hover,#f2f4f7)}
.th-send{margin-left:auto}
.th-sp{flex:1}
.th-warn{margin:0;padding:7px 10px;border-radius:7px;background:#fff6f3;color:#8a2d16;font-size:13px}
.th-pend{display:flex;flex-wrap:wrap;gap:6px}
.th-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line,#e2e4e8);background:#fff;border-radius:8px;padding:4px 4px 4px 8px;font-size:12.5px;max-width:100%}
.th-chip img{width:28px;height:28px;object-fit:cover;border-radius:4px}
.th-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}
.th-chip em{font-style:normal;color:var(--muted,#646b75)}
.th-chip.err{border-color:#e8b4a8}
.th-chip.err em{color:#b3261e}
.th-chip button{border:0;background:none;cursor:pointer;width:24px;height:24px;border-radius:5px;font-size:16px;line-height:1;color:var(--muted,#646b75)}
.th-pick{display:flex;flex-wrap:wrap;gap:4px 14px;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:8px;padding:8px 10px}
.th-pick label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:32px}
.th-pick label.in{color:var(--muted,#646b75)}
.th-pick em{font-style:normal;font-size:12px}
.th-pick .th-av{width:22px;height:22px;font-size:11px}
.th-compose{flex:1;min-height:0;display:flex;flex-direction:column}
.th-compose > h2{margin:0;padding:14px 18px 4px;font-size:18px}
.th-cf{flex:1;min-height:0;overflow:auto;padding:10px 18px 18px;display:flex;flex-direction:column;gap:10px;max-width:760px}
.th-fl{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.th-fl > span{width:64px;color:var(--muted,#646b75);font-size:13px}
.th-fl select{flex:1;max-width:340px}
.th-title{font-size:16px !important;font-weight:600}
.th-seg{display:inline-flex;gap:14px;flex-wrap:wrap}
.th-seg label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:32px}
.th-lb{position:fixed;inset:0;z-index:1000;background:rgba(15,18,24,.92);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 12px)}
.th-lb img{max-width:100%;max-height:calc(100% - 64px);object-fit:contain;border-radius:4px}
.th-lbb{display:flex;gap:8px}
/* phone: one column, 44 px controls, 16 px text in boxes (stops iPhone zooming in) */
.th-narrow{flex-direction:column}
.th-one{flex:1;min-height:0;display:flex;flex-direction:column}
.th-pane{flex:1;min-height:0;overflow:auto;padding:8px 10px 24px}
.th-narrow .th-list.th-pane{padding:0 0 24px}
.th-bar{flex:none;display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--line,#e2e4e8);min-height:52px;background:#fff}
.th-bar b{flex:1;min-width:0;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-back{border:0;background:none;font-size:24px !important;line-height:1;min-width:44px;min-height:44px;color:var(--base-2,#0e52a6) !important;cursor:pointer;padding:0 6px;text-align:left;font-weight:600}
.th-narrow .th-ib{min-width:44px;height:44px}
.th-narrow .th-ch{min-height:46px;padding:8px 10px;font-size:15px}
.th-narrow .th-gt{color:var(--muted,#646b75);font-size:18px}
.th-narrow .th-row{padding:12px 14px;min-height:64px}
.th-narrow .th-search{padding:0 0 6px}
.th-narrow > .th-one > .th-search{padding:8px 10px 6px}
.th-narrow input,.th-narrow textarea,.th-narrow select{font-size:16px}
.th-narrow .tm-btn{min-height:44px}
.th-narrow .th-tool{min-height:44px}
.th-narrow .th-th{padding:4px 10px 10px 4px;gap:4px 8px}
.th-narrow .th-th .th-back{flex:none}
.th-narrow .th-tt{min-width:0;flex:1 1 200px;padding-top:9px}
.th-narrow .th-tt h2{font-size:17px}
.th-narrow .th-ta{flex-basis:100%;padding-left:48px}
.th-narrow .th-done{flex:1;white-space:nowrap;padding:0 12px}
.th-narrow .th-msgs{padding:4px 12px 10px}
.th-narrow .th-reply{padding:8px 10px calc(8px + env(safe-area-inset-bottom, 0px))}
.th-narrow .th-reply .th-tool span{max-width:150px}
.th-narrow .th-reply .th-dtool{padding:6px 4px}
.th-narrow .th-reply .th-dtool span{display:none}
.th-narrow .th-cf{padding:12px 12px 24px}
.th-narrow .th-fl > span{width:auto}
.th-narrow .th-img{width:96px;height:96px}
.th-narrow .th-own button{min-height:32px;padding:4px 8px}
/* unread counts in the full app's tab strip and phone bar */
.tcount{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:6px;border-radius:999px;background:#fff;color:var(--base-2,#0e52a6);font-size:11px;font-weight:700;vertical-align:1px}
.bn{position:relative}
.bn-n{position:absolute;top:4px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#d93025;color:#fff;font-size:10.5px;font-weight:700;display:grid;place-items:center;line-height:1}
.tb button{position:relative}
/* Team tasks (Stage 4): a title, a person, a date and a tick */
.th-n.alt{background:#fff;color:var(--base-2,#0e52a6);border:1px solid #b9cdf0}
.th-sec{margin:14px 14px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#646b75);font-weight:600}
.th-tasks{margin-top:6px;border:1px solid var(--line,#e2e4e8);border-radius:8px;overflow:hidden;background:#fff}
.th-task{display:flex;align-items:center;gap:6px;padding:4px 6px 4px 10px;border-top:1px solid var(--line,#e2e4e8);min-height:44px;background:#fff}
.th-tasks .th-task:first-child{border-top:0}
.th-list > .th-task,.th-pane > .th-task{border-top:0;border-bottom:1px solid var(--line,#e2e4e8);padding:6px 8px 6px 14px}
.th-tk{display:inline-grid;place-items:center;width:28px;height:36px;flex:none;cursor:pointer}
.th-tk input{width:18px;height:18px;margin:0;cursor:pointer;accent-color:var(--base,#1466c8)}
.th-tkb{flex:1;min-width:0;border:0;background:none;text-align:left;padding:4px 2px;cursor:pointer;display:flex;flex-direction:column;gap:1px}
.th-tkt{overflow-wrap:anywhere}
.th-tkm{display:flex;flex-wrap:wrap;gap:0 10px;font-size:12px;color:var(--muted,#646b75)}
.th-task.done .th-tkt{text-decoration:line-through;color:var(--muted,#646b75)}
.th-task.today:not(.done){background:#fff8e6}
.th-task.late:not(.done){background:#fff1ee}
.th-task.late:not(.done) .th-tkm span:nth-child(2),.th-task.late:not(.done) .th-tkm span:first-child:last-child{color:#b3261e;font-weight:600}
.th-task.today:not(.done) .th-tkm span{color:#8a5a00}
.th-tke{border-color:transparent !important;background:none !important;color:var(--muted,#646b75) !important;opacity:.7;min-width:32px !important;height:32px !important}
.th-task:hover .th-tke{opacity:1}
.th-tkf{flex-direction:column;align-items:stretch;gap:8px;padding:10px 12px !important;background:#fafbfc}
.th-tkf p{margin:0;font-size:13px;color:var(--muted,#646b75)}
.th-tkf input,.th-tkf select,.th-nt input,.th-nt select{font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:7px 9px;background:#fff;color:inherit;min-width:0}
.th-tkr{display:flex;gap:6px;flex-wrap:wrap}
.th-tkr select{flex:1;min-width:120px}
.th-hint2{margin:0;font-size:12.5px;color:var(--muted,#646b75)}
.th-strip{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;padding:8px 18px;border-bottom:1px solid var(--line,#e2e4e8);background:#f7f9fc;font-size:13px}
.th-strip .th-tasks{flex-basis:100%;margin:2px 0 4px}
.th-sy em{font-style:normal;font-size:12px;color:var(--muted,#646b75)}
.th-sy em.today{color:#8a5a00;font-weight:600}
.th-sy em.late{color:#b3261e;font-weight:600}
.th-ntasks{display:flex;flex-direction:column;gap:6px}
/* Decisions (Stage 3 Part B): a line marked in a reply, numbered D12 */
.th-decs{margin-top:6px;display:flex;flex-direction:column;gap:4px}
.th-dec{display:flex;align-items:baseline;gap:8px;padding:6px 10px;border-left:3px solid #7a4fc4;background:#f6f2fc;border-radius:0 7px 7px 0;font-size:14px}
.th-dn{flex:none;font-size:11.5px;font-weight:700;color:#5b3596;letter-spacing:.02em}
.th-dt{flex:1;min-width:0;overflow-wrap:anywhere}
.th-dt em{font-style:normal;font-size:12px;color:var(--muted,#646b75)}
.th-dec .th-own{margin-left:auto}
.th-decf{flex-wrap:wrap;align-items:center}
.th-decf input,.th-nd input{flex:1 1 200px;font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:7px 9px;background:#fff;color:inherit;min-width:0}
.th-ndecs{display:flex;flex-direction:column;gap:6px;margin-bottom:6px}
.th-nd{border-left:3px solid #7a4fc4}
/* Meeting record (Stage 3 Part B slice 2) */
.th-meet{display:flex;flex-direction:column;gap:6px;margin-bottom:6px;padding:8px 10px;border:1px solid #d9cdf0;border-radius:8px;background:#faf8fe}
.th-mh{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#5b3596}
.th-mh b{flex:1}
.th-mh input{font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:5px 8px;background:#fff;color:var(--ink,#1d2127)}
.th-meet textarea{font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:7px 9px;background:#fff;resize:none}
.th-mtg{display:flex;align-items:center;gap:4px 10px;flex-wrap:wrap;margin:2px 0 4px;font-size:12.5px;color:#5b3596}
.th-mtg span{color:var(--muted,#646b75)}
.th-mdecs{margin:6px 0 0;padding:6px 8px}
.th-more{display:flex;gap:6px;padding:2px 0}
.th-more .th-dtool span{display:inline !important}
.th-nt{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:8px;padding:6px 6px 6px 10px}
.th-nt input[data-f2=title]{flex:1 1 200px}
.th-ntb{width:14px;height:14px;border:1.5px solid #9aa1ab;border-radius:3px;flex:none}
.th-x{border:0;background:none;width:32px;height:32px;border-radius:6px;font-size:18px;color:var(--muted,#646b75);cursor:pointer}
.th-seg2{display:flex;gap:4px;padding:8px 14px;border-bottom:1px solid var(--line,#e2e4e8);overflow-x:auto;scrollbar-width:none;flex:none}
.th-seg2 button{border:1px solid var(--line,#e2e4e8);background:#fff;border-radius:999px;padding:5px 11px;font-size:13px;cursor:pointer;white-space:nowrap}
.th-seg2 button.on{background:var(--accent-soft,#e7f0ff);border-color:#b9cdf0;color:#0e52a6;font-weight:600}
.th-seg2 b{font-size:11px}
.th-newtask{border-bottom:1px solid var(--line,#e2e4e8)}
.th-narrow .th-task{min-height:52px}
.th-narrow .th-tk{width:36px;height:44px}
.th-narrow .th-tk input{width:20px;height:20px}
.th-narrow .th-tke{min-width:40px !important;height:40px !important}
.th-narrow .th-seg2{padding:8px 10px}
.th-narrow .th-seg2 button{padding:8px 12px}
.th-narrow .th-strip{padding:8px 12px}
.th-narrow .th-nt input[data-f2=due]{flex:1 1 130px}
/* Hand to the team dialog, and team rows in the full app's calendar panel */
.th-dlg{position:fixed;inset:0;z-index:1000;background:rgba(15,18,24,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.th-dlgc{background:#fff;border-radius:12px;width:100%;max-width:440px;padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:0 10px 40px rgba(0,0,0,.2);font-size:14px}
.th-dlgc h3{margin:0;font-size:17px}
.th-dlgc input,.th-dlgc select,.th-dlgc textarea{font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:7px 9px;background:#fff;min-width:0}
.th-dlgi{font-size:15px !important;font-weight:600}
.th-dlgk{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.th-dlgc .th-warn[hidden]{display:none}
@media (max-width:760px){.th-dlg{align-items:flex-end;padding:0}.th-dlgc{border-radius:14px 14px 0 0;max-width:none;padding:16px 14px calc(16px + env(safe-area-inset-bottom))}.th-dlgc input,.th-dlgc select,.th-dlgc textarea{font-size:16px}.th-dlgc .tm-btn{min-height:44px}}
.tpi.team .tp-av{width:18px;height:18px;border-radius:50%;color:#fff;font-size:10px;font-weight:700;display:inline-grid;place-items:center;flex:none;font-style:normal}
.tpi.team .tp-from{display:block;font-size:11px;color:var(--muted,#646b75);font-style:normal}
.tpi.team .tp-when.today{color:#8a5a00;font-weight:600}
.etk.gone span,.btk.gone span,.sbt.gone span{text-decoration:line-through;opacity:.6;font-style:italic}
.tm-push{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px}
.tm-push p{margin:0}
/* Stage 10: which of our companies each person sees, and Alex's list of our companies (People screen) */
.tm-ents{display:flex;gap:8px;flex:none}
.tm-ents .tm-sw{gap:3px;font-size:12px}
.tm-cos{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:12px;overflow:hidden}
.tm-co{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;padding:10px 14px;border-top:1px solid var(--line,#e2e4e8)}
.tm-co:first-child{border-top:0}
.tm-co.off{opacity:.6}
.tm-co .tm-sw{min-height:32px}
.tm-coadd{background:#fafbfc}
.tm-ef{display:flex;flex-direction:column;gap:3px;font-size:11.5px;color:var(--muted,#646b75);max-width:100%}
.tm-ef input{font:inherit;font-size:14px;color:var(--ink,#1d2129);border:1px solid var(--line-2,#cdd1d7);border-radius:6px;padding:5px 7px;min-width:0;width:100%;background:#fff}
@media (max-width:760px){.tm-person{flex-wrap:wrap}.tm-ents{order:5;width:100%;padding-left:42px}}
/* Stage 0 slice 6: features being built, and the change log (Alex only, on People) */
.tm-feat-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid #eef0f3}
.tm-feat-row span{flex:1;min-width:0}
.tm-log summary{cursor:pointer}
.tm-logw{overflow-x:auto;max-height:420px;overflow-y:auto}
.tm-logt{border-collapse:collapse;font-size:12px;width:100%}
.tm-logt th,.tm-logt td{text-align:left;padding:4px 8px;border-bottom:1px solid #eef0f3;vertical-align:top}
.tm-logt td:last-child{word-break:break-word}
/* Stage 9: the "Connect an assistant" page (/api/ai/connect) */
body.aic{margin:0;background:#f4f5f7;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1d2129}
.aic-box{max-width:460px;margin:40px auto;text-align:left;align-items:stretch}
.aic-acts{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
.tm-addr{font-family:ui-monospace,Menlo,monospace;font-size:12.5px;color:var(--ink,#1d2129);user-select:all;word-break:break-all}
.tm-aiw{font-style:normal;font-weight:400;color:var(--muted,#646b75);font-size:13px}
body.aic *{box-sizing:border-box}
.tm-airow{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid var(--line,#e2e4e8);min-height:56px}
.tm-airow:first-child{border-top:0}
.aic-warn{color:#8a5a00!important;background:#fff7e6;border-radius:8px;padding:8px 10px}
/* Stage 9 slice 4: the "via AI" mark, and "What my assistant did" on People */
.tm-via,.th-ch2 em.tm-via{display:inline-block;font-style:normal;font-weight:600;font-size:11px;line-height:16px;padding:0 6px;margin-left:6px;border-radius:8px;background:#eaf1fb;color:#1250b0;white-space:nowrap;vertical-align:1px}
.tm-aidid summary{cursor:pointer}
.tm-aidid .tm-people{margin-top:8px}
/* Stage 24: private threads */
.th-privline{display:inline-flex;align-items:center;gap:4px}
.th-privline svg,.th-privnote svg,.th-priv .th-hash svg{vertical-align:-2px}
.th-privnote{display:flex;align-items:flex-start;gap:6px;margin:6px 12px}
.th-padd{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.th-padd span{display:flex;gap:8px;flex-wrap:wrap}
.th-privtag{cursor:default;opacity:.75}
