<style>
:root {
    --tk-ink: #23262b;
    --tk-accent: #b8790f;
    --tk-accent-dark: #96620c;
    --tk-bg: #f6f4f0;
    --tk-card: #ffffff;
    --tk-border: #e7e1d6;
    --tk-muted: #78716a;
    --tk-good: #1f8a55;
    --tk-danger: #c0392b;
}
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Trebuchet MS', sans-serif; background: var(--tk-bg); color: var(--tk-ink); margin: 0; }
.tk-topbar {
    background: linear-gradient(120deg, #3a2f1c, #6b4e1e); color: #fff; padding: 14px 16px;
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.tk-topbar .brand { font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.tk-topbar .brand .dot { color: #f0c46a; }
.tk-topbar a.back { color: #f0e4c8; text-decoration: none; font-size: 13px; }
.tk-topbar a.back:first-of-type { margin-left: auto; }
.tk-container { max-width: 860px; margin: 0 auto; padding: 14px; }
@media (min-width: 768px) { .tk-container { padding: 20px 24px; } }

.tk-btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 9px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tk-btn-primary { background: var(--tk-accent); color: #fff; }
.tk-btn-primary:hover { background: var(--tk-accent-dark); }
.tk-btn-outline { background: #fff; color: var(--tk-accent); border: 1px solid var(--tk-accent); }
.tk-help { font-size: 12px; color: var(--tk-muted); line-height: 1.4; }

.tk-card { background: var(--tk-card); border: 1px solid var(--tk-border); border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.05); margin-bottom: 14px; padding: 16px; }
.tk-task-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.tk-task-title.tk-card-toggle { cursor: pointer; user-select: none; }
.tk-card-caret { display: inline-block; width: 14px; color: var(--tk-muted); font-weight: 400; }
.tk-task-id { color: var(--tk-muted); font-weight: 400; font-size: 12px; margin-inline-end: 2px; }
.tk-task-meta { font-size: 11.5px; color: var(--tk-muted); margin-bottom: 10px; }
.tk-task-meta .tk-unread { background: var(--tk-danger); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 10.5px; margin-inline-start: 6px; }
/* Cards load collapsed (title/meta/one-line preview only) - click the
   title to open the full thread. Keeps a busy task list scannable instead
   of every comment thread being fully expanded at once (2026-09-16). */
.tk-card-preview { font-size: 12.5px; color: var(--tk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.tk-card-body { display: none; margin-top: 10px; }
.tk-card-expanded .tk-card-body { display: block; }
.tk-card-expanded .tk-card-preview { display: none; }
.tk-comment { display: flex; gap: 9px; margin-bottom: 12px; align-items: flex-start; }
.tk-comment:last-child { margin-bottom: 0; }
.tk-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.tk-avatar-oliver { background: linear-gradient(135deg, var(--tk-accent), #6b4e1e); font-size: 14px; }
.tk-avatar-human { background: #8a97a8; }
.tk-comment-col { flex: 1; min-width: 0; }
.tk-comment-head { font-size: 11.5px; font-weight: 600; color: var(--tk-ink); margin-bottom: 3px; }
.tk-comment-head .tk-comment-date { font-weight: 400; color: var(--tk-muted); margin-inline-start: 6px; }
.tk-bubble { font-size: 13px; white-space: pre-wrap; background: #f4f1ea; border-radius: 4px 14px 14px 14px; padding: 9px 12px; line-height: 1.45; display: inline-block; max-width: 100%; }
.tk-comment.is-oliver .tk-bubble { background: linear-gradient(135deg, #fdf6e3, #f7ecd0); border: 1px solid #ecdcaa; }
.tk-comment-attachments { margin-top: 6px; }
.tk-comment-attachments a { display: inline-block; font-size: 12px; margin-inline-end: 10px; color: var(--tk-accent); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tk-chip { border: 1px solid var(--tk-accent); background: #fdf6e3; color: var(--tk-accent-dark); font-size: 12px; font-weight: 600; border-radius: 20px; padding: 5px 12px; cursor: pointer; }
.tk-chip:hover { background: var(--tk-accent); color: #fff; }
.tk-reply-box { margin-top: 8px; }
.tk-reply-box textarea { width: 100%; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; padding: 8px; resize: vertical; min-height: 60px; }
.tk-reply-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.tk-reply-actions input[type=file] { font-size: 12px; }
.tk-paste-preview { display: none; margin-top: 6px; }
.tk-paste-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--tk-accent-pale, #eef3ff); border: 1px solid var(--tk-accent); color: var(--tk-accent-dark, var(--tk-accent)); font-size: 12px; border-radius: 14px; padding: 3px 6px 3px 10px; }
.tk-paste-chip img { width: 22px; height: 22px; object-fit: cover; border-radius: 5px; }
.tk-paste-remove { color: inherit; text-decoration: none; font-weight: 700; padding: 0 4px; }
.tk-assignee-pill { display: inline-block; background: #f0ece0; border-radius: 12px; padding: 2px 10px; font-size: 11.5px; margin: 2px 3px 2px 0; }

.tk-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; align-items: center; justify-content: center; }
.tk-modal-backdrop.tk-open { display: flex; }
.tk-modal { background: #fff; border-radius: 12px; padding: 20px; max-width: 480px; width: 92vw; max-height: 88vh; overflow-y: auto; }
.tk-modal h4 { margin-top: 0; }
.tk-modal input[type=text], .tk-modal textarea { width: 100%; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; padding: 8px; margin-bottom: 10px; }
.tk-modal textarea { min-height: 70px; resize: vertical; }
.tk-user-filter { width: 100%; font-size: 12.5px; border: 1px solid #ddd; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
.tk-user-list { border: 1px solid #eee; border-radius: 6px; max-height: 160px; overflow-y: auto; padding: 6px; margin-bottom: 10px; }
.tk-user-list label { display: block; font-size: 12.5px; padding: 2px 0; }
.tk-empty { text-align: center; color: var(--tk-muted); font-size: 13px; padding: 30px; }
.tk-mention-dropdown { position: absolute; z-index: 200; background: #fff; border: 1px solid var(--tk-border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 180px; overflow-y: auto; min-width: 180px; }
.tk-mention-item { padding: 7px 12px; font-size: 13px; cursor: pointer; }
.tk-mention-item:hover, .tk-mention-item.is-active { background: #fdf6e3; }
.tk-mention-item.is-oliver { font-weight: 700; color: var(--tk-accent-dark); border-bottom: 1px solid var(--tk-border); }
.loader-wrap { text-align: center; padding: 40px; color: #888; font-size: 14px; }
</style>
