/* Current Fincs talk interactions, using the shared navigation and color tokens. */
.tk-main{--talk-bubble:#f1f2f5;--talk-self:#eaf3fc;--talk-self-text:#244b70}
.account-dark .tk-main,.account-dark .tk-thread{--talk-bubble:#252529;--talk-self:#23384c;--talk-self-text:#deedfc}
.tk-thread{--talk-bubble:#f1f2f5;--talk-self:#eaf3fc;--talk-self-text:#244b70}
body .tk-channel-list .tk-views{display:flex;gap:4px;padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:12px}
body .tk-channel-list .tk-views button{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;width:auto;padding:8px 0;margin:0;font-size:18px;line-height:20px}
body .tk-channel-list .tk-views .icon{width:16px;height:16px}
.tk-channel-group{margin-bottom:18px}.tk-channel-group>summary{padding:8px;font-size:11px;color:var(--muted);cursor:pointer}

.tk-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding:6px;border-radius:6px;font-size:20px;color:var(--muted);cursor:pointer}
.tk-icon-button>.icon{width:17px;height:17px}.tk-icon-button:hover{background:var(--nav-hover);color:var(--ink)}
.tk-search{display:flex;gap:8px;margin-bottom:16px}.tk-search input{width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;padding:8px 12px;font-size:12px;background:var(--paper);color:var(--ink)}
.tk-search button{font-size:12px;padding:8px 12px;white-space:nowrap}
.tk-result{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px;color:var(--muted);margin-bottom:12px}
.tk-announcements{background:var(--wash);border:1px solid var(--line);border-radius:7px;margin:0 0 12px;font-size:12px}
.tk-announcements summary{display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;color:var(--muted)}
.tk-announcements summary:after{content:'⌄';margin-left:auto}.tk-announcements[open] summary:after{content:'⌃'}.tk-announcements .icon{width:15px;height:15px}
.tk-announcements small{background:var(--nav-selected);border-radius:4px;padding:0 5px}
.tk-announcements>div{border-top:1px solid var(--line);padding:4px 12px}.tk-announcements>div button{display:block;width:100%;font-size:12px;line-height:1.8;text-align:left;padding:8px 0}
.tk-timeline{max-height:530px;overflow:auto;padding:0 8px 14px 0;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.tk-date{display:flex;justify-content:center;align-items:center;gap:12px;margin:20px 0;color:var(--muted);font-size:10px}
.tk-date:before,.tk-date:after{content:'';height:1px;background:var(--line);flex:1}
.tk-message{display:flex;align-items:flex-start;gap:10px;margin:18px 0;scroll-margin:20px}
.tk-message>.avatar{flex:0 0 30px;width:30px;height:30px;font-size:10px;margin-top:22px}
.tk-message-content{min-width:0;max-width:85%}.tk-message.is-self{flex-direction:row-reverse}.tk-message.is-self .tk-message-meta{justify-content:flex-end}
.tk-message-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:6px;font-size:10px;color:var(--muted)}
.tk-message-meta strong{font-size:11px;color:var(--ink)}.tk-message-meta .icon{width:12px;height:12px}
.tk-role{font-size:9px;border:1px solid var(--line);padding:0 4px;border-radius:3px}
.tk-bubble{background:var(--talk-bubble);border-radius:0 10px 10px 10px;padding:12px 14px;font-size:13px;line-height:1.85;overflow-wrap:anywhere}
.is-self .tk-bubble{background:var(--talk-self);color:var(--talk-self-text);border-radius:10px 0 10px 10px}
.tk-bubble p{white-space:pre-wrap;margin:0}.tk-bubble mark{color:var(--blue-dark);background:var(--pale);border-radius:3px;padding:1px 3px}
.tk-bubble blockquote{font-size:11px;border-left:2px solid var(--blue);padding:6px 10px;margin:0 0 10px;background:var(--wash);color:var(--muted)}
.tk-attachment{display:flex;align-items:center;gap:10px;padding:10px;margin-top:10px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink)}
.tk-attachment .icon{width:22px;height:22px;flex-shrink:0}.tk-attachment small{display:block;font-size:9px;color:var(--muted)}
.tk-link-preview{display:block;width:100%;margin-top:12px;padding:10px 12px;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:6px;text-align:left}
.tk-link-preview span{display:block;font-size:10px;color:var(--muted)}.tk-link-preview strong{font-size:12px;font-weight:500}
.tk-message-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding-top:5px;min-height:32px}.is-self .tk-message-actions{justify-content:flex-end}
.tk-thread-link{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted);padding:5px}.tk-thread-link>.icon{width:14px;height:14px}
.tk-reaction{font-size:11px;border:1px solid var(--line);padding:3px 7px;border-radius:12px}.tk-reaction[aria-pressed=true]{border-color:var(--blue);background:var(--pale);color:var(--blue-dark)}
.tk-popover{position:relative}.tk-popover summary{display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:28px;height:28px;font-size:19px;border-radius:5px;color:var(--muted)}
.tk-popover summary::-webkit-details-marker{display:none}.tk-popover summary:hover,.tk-popover[open] summary{background:var(--nav-hover)}
.tk-popover>div{position:absolute;z-index:25;right:0;bottom:calc(100% + 5px);padding:6px;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 20px #0002;min-width:160px;color:var(--ink)}
.tk-message-menu>div button{display:block;width:100%;font-size:12px;padding:8px 10px;text-align:left;border-radius:4px;white-space:nowrap}
.tk-message-menu>div button:hover{background:var(--nav-hover)}.tk-reaction-picker>div{display:flex;min-width:152px}.tk-reaction-picker button{font-size:20px;padding:7px}
.tk-compose{border:1px solid var(--line);border-radius:8px;background:var(--paper);margin-top:10px;padding:8px}
.tk-compose textarea{display:block;box-sizing:border-box;width:100%;min-height:66px;max-height:200px;padding:8px;border:0;background:transparent;color:var(--ink);resize:vertical;font-size:13px;line-height:1.7}
.tk-compose textarea:focus{outline:none}.tk-compose:focus-within{border-color:var(--blue)}
.tk-compose-tools{display:flex;align-items:center;gap:3px;flex-wrap:wrap}.tk-send{width:32px;height:32px;background:var(--blue);color:#fff;border-radius:7px;margin-left:auto;font-size:20px}
.account-dark .tk-send{background:#276cad}.tk-enter-hint{font-size:10px;color:var(--muted);margin-left:auto}.tk-enter-hint+.tk-send{margin-left:6px}
.tk-attach{position:relative;overflow:hidden}.tk-attach input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
.tk-reply-target{display:flex;align-items:center;gap:8px;background:var(--wash);border-left:2px solid var(--blue);padding:6px 10px;font-size:11px;color:var(--muted)}
.tk-reply-target span{flex:1;min-width:0}.tk-files>span{display:flex;align-items:center;gap:6px;font-size:11px;overflow-wrap:anywhere}.tk-files .icon{width:15px;height:15px}
.tk-also{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}.tk-also input{margin:0}
.tk-mock-note{font-size:10px;color:var(--muted);line-height:1.8;margin:10px 0 0}.tk-empty,.tk-posting-note{padding:24px 12px;text-align:center;color:var(--muted);font-size:12px}
.tk-thread h2{font-size:19px}.tk-thread>.muted{font-size:12px}.tk-thread-replies{border-top:1px solid var(--line);padding-top:6px;margin-top:15px}
.tk-thread-replies>.muted{padding:25px 0;font-size:12px}
dialog:has(.tk-thread){width:720px}
.tk-main button:focus-visible,.tk-main summary:focus-visible,.tk-thread button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(max-width:800px){
 .tk-main .tk-timeline{max-height:none;overflow:visible;padding-right:0}
 .tk-message-content{max-width:calc(100% - 40px)}.tk-bubble{font-size:13px;padding:10px 12px}
 .tk-main .tk-icon-button,.tk-thread .tk-icon-button,.tk-main .tk-popover summary,.tk-thread .tk-popover summary{min-height:44px;min-width:40px}
 
 .tk-compose textarea,.tk-search input{font-size:16px}.tk-send{width:40px;height:40px}
 .tk-enter-hint{display:none}.tk-main .page-heading-action{font-size:11px}
 .tk-popover>div{right:auto;left:0}.is-self .tk-popover>div{left:auto;right:0}
 .tk-message-menu>div button{min-height:44px}.tk-message-meta{font-size:9px;gap:5px}
 .tk-thread-link{min-height:40px}.tk-also{flex-basis:100%;min-height:36px}
 dialog:has(.tk-thread){width:100%;max-width:none}
}
/* Keep conversation and composer in one viewport, like the current chat screen. */
body .talk-main.tk-main{display:flex;flex-direction:column;height:calc(100dvh - 174px);min-height:540px}
.tk-main>.page-heading,.tk-main>.local-menu-back,.tk-main>.tk-search,.tk-main>.tk-result,.tk-main>.tk-announcements,.tk-main>.tk-compose,.tk-main>.tk-mock-note,.tk-main>.tk-posting-note{flex-shrink:0}
body .tk-main .tk-timeline{flex:1;min-height:100px;max-height:none;overflow:auto}
.tk-main>.tk-mock-note{font-size:9px}
.tk-timeline .tk-popover>div{position:fixed;inset:auto;transform:translateY(-100%)}
@media(max-width:800px){body .talk-main.tk-main{height:calc(100dvh - 144px);min-height:500px}.tk-main>.local-menu-back{margin-bottom:8px}.tk-main .tk-timeline .tk-popover>div{position:absolute;right:0;left:auto;bottom:100%;transform:none}}
body .tk-popover>div,body .tk-main .tk-timeline .tk-popover>div{position:fixed;right:auto;bottom:auto;transform:none}
@media(max-width:800px){.tk-compose-tools .tk-send,.tk-enter-hint+.tk-send{margin-left:auto}}

/* Channel identity and tools share one compact header. */
body .tk-main>.tk-page-heading{position:relative;align-items:center;gap:12px;padding-top:12px;padding-bottom:12px;margin-bottom:12px}
.tk-heading-copy{min-width:0;flex:1}.tk-heading-copy h2{margin:0}
.tk-heading-copy p{font-size:11px;line-height:1.6;color:var(--muted);margin:3px 0 0;overflow-wrap:anywhere}
.tk-page-heading .page-heading-actions{flex-shrink:0;flex-wrap:nowrap}
.tk-search-popover{position:static}
.tk-search-popover>summary{position:relative;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;list-style:none;border:1px solid var(--line);border-radius:50%;background:var(--paper);color:var(--nav-text);cursor:pointer}
.tk-search-popover>summary::-webkit-details-marker{display:none}
.tk-search-popover>summary>.icon{width:18px;height:18px}
.tk-search-popover>summary:hover,.tk-search-popover[open]>summary{background:var(--nav-hover);color:var(--nav-current)}
.tk-search-popover.is-active>summary:after{content:'';position:absolute;right:1px;top:0;width:6px;height:6px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 2px var(--paper)}
.tk-search-options{position:absolute;right:12px;top:calc(100% + 6px);z-index:25;width:300px;max-width:calc(100% - 24px);padding:14px;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 28px #0002}
#tk-search label{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}
#tk-search>div{position:relative}#tk-search .icon{position:absolute;top:12px;left:10px;width:16px;height:16px;color:var(--muted)}
#tk-search input{box-sizing:border-box;width:100%;height:40px;border:1px solid var(--line);border-radius:6px;padding:7px 10px 7px 34px;font-size:12px;background:var(--paper);color:var(--ink)}
.tk-message-menu>div{min-width:200px;padding:6px}
.tk-message-menu>div button{display:flex;align-items:center;gap:12px;min-height:38px;padding:8px 12px;font-size:13px}
.tk-message-menu>div button>.icon{width:18px;height:18px;flex-shrink:0}
@media(max-width:800px){
 body .tk-main>.tk-page-heading{flex-wrap:nowrap;gap:8px;padding-top:10px;padding-bottom:10px}
 .tk-heading-copy h2{font-size:14px}.tk-heading-copy p{font-size:10px}
 .tk-search-popover>summary{width:44px;height:44px}
 #tk-search input{font-size:16px;height:44px}#tk-search .icon{top:14px}
 .tk-message-menu>div button{min-height:44px}
}

.tk-sidebar-heading{display:flex;align-items:center;gap:8px;padding:8px;font-size:12px;color:var(--ink)}
.tk-sidebar-heading>span{font-size:10px;color:var(--muted)}
.tk-sidebar-items{max-height:calc(100dvh - 270px);overflow:auto;scrollbar-width:thin}
body .tk-channel-list .tk-sidebar-entry{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:12px 8px;text-align:left;white-space:normal;font-weight:400}
body .tk-channel-list .tk-sidebar-entry>span{flex:initial;width:100%}
.tk-entry-channel{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted)}
.tk-entry-channel .icon{width:12px;height:12px;flex-shrink:0}
.tk-entry-author{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600}
.tk-entry-author time{margin-left:auto;font-size:9px;font-weight:400;color:var(--muted)}
.tk-entry-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.6;font-size:11px;overflow-wrap:anywhere}
.tk-sidebar-entry small{font-size:10px;color:var(--muted)}
.tk-sidebar-empty{font-size:12px;line-height:1.8;padding:8px;color:var(--muted)}
@media(max-width:800px){.tk-sidebar-items{max-height:none}.tk-entry-preview{font-size:13px}.tk-entry-author{font-size:12px}}
@media(max-width:800px){body .local-menu-view .talk-main.tk-main{display:none}}

.tk-posting-icon{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tk-heading-copy h2{display:flex;align-items:center;gap:7px}
.tk-heading-type{display:inline-flex;flex-shrink:0;color:var(--muted)}
.tk-heading-type .icon{width:17px;height:17px}

.tk-thread-link.has-comments,.tk-sidebar-entry .tk-comment-count{color:var(--blue-dark);font-weight:600}
.tk-thread-link.has-comments:hover span,.tk-thread-link.has-comments:focus-visible span{text-decoration:underline;text-underline-offset:3px}

/* Post actions first; thread count and latest reply share the next row. */
.tk-message-actions{gap:8px;padding-top:8px}
.tk-message-actions .tk-popover>summary{width:32px;height:32px;border-radius:50%;background:var(--wash)}
.tk-message-actions .tk-popover>summary .icon{width:18px;height:18px}
.tk-thread-summary{display:flex;align-items:center;flex-wrap:wrap;column-gap:22px;row-gap:2px;margin-top:5px;min-height:28px}
.tk-thread-summary .tk-thread-link{font-size:12px;padding:3px 0}
.tk-thread-summary time{font-size:11px;color:var(--muted);white-space:nowrap}
.is-self .tk-thread-summary{justify-content:flex-end}
@media(max-width:800px){.tk-message-actions .tk-popover>summary{width:44px;height:44px}.tk-thread-summary{column-gap:16px}.tk-thread-summary .tk-thread-link{font-size:12px;min-height:36px}}

.tk-send{display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0}.tk-send>.icon{width:18px;height:18px}
