:root{font-family:Arial,Helvetica,sans-serif;color:#172a40;background:#f0f3f7;color-scheme:light}*{box-sizing:border-box}body{margin:0}button,a,textarea{font:inherit}button,.back{min-height:48px;min-width:48px;cursor:pointer}button{border:1px solid #cbd5df;border-radius:12px;padding:10px 16px;background:#fff;color:#17324f}button:disabled{opacity:.5;cursor:wait}a{color:#1b4e89}.room{max-width:780px;margin:auto;background:white;min-height:100dvh}header{position:sticky;top:0;z-index:2;background:#132a48;color:white;display:flex;align-items:center;gap:14px;padding:16px max(16px,env(safe-area-inset-left))}header h1{font-size:19px;margin:5px 0 0}header small{font-size:10px;letter-spacing:.16em}header .back{display:grid;place-items:center;color:white;text-decoration:none;border:1px solid #536982;border-radius:12px}#connection{margin-left:auto;font-size:11px;max-width:90px}.principle{font-size:12px;text-align:center;color:#52677f;margin:0;padding:16px;border-bottom:1px solid #e5ebf1}#status{padding:0 20px;line-height:1.6}#status:not(:empty){padding:18px 20px;background:#f6f8fb}#pins{padding:14px 20px;background:#f2f5fa;border-bottom:1px solid #dce4ed}#pins p{margin:5px 0;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}#older{display:block;margin:16px auto}#messages{padding:10px 20px 24px;min-height:30vh}.message{border-bottom:1px solid #e7edf3;padding:18px 0}.message.mine{border-left:3px solid #274e82;padding-left:14px}.meta{font-size:12px;color:#5b6e82;display:flex;flex-wrap:wrap;align-items:center;gap:8px}.meta strong{color:#182c44}.badge{font-size:10px;color:#163f76;border:1px solid #adc1d9;border-radius:20px;padding:3px 7px}.body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;margin:10px 0}.actions{display:flex;gap:8px;flex-wrap:wrap}.actions button{font-size:12px;min-height:44px;padding:7px 11px}.actions button[aria-pressed=true]{background:#eaf0f8;border-color:#284e80}#newMessages{position:fixed;bottom:220px;left:50%;transform:translateX(-50%);background:#132a48;color:#fff;z-index:3}#composer{position:sticky;bottom:0;background:#fff;border-top:1px solid #d7e0e9;padding:14px 20px max(14px,env(safe-area-inset-bottom));box-shadow:0 -6px 20px #132a4808}#composer>label{font-size:12px;font-weight:bold}textarea{display:block;resize:vertical;width:100%;border:1px solid #bdcad8;border-radius:12px;padding:12px;margin:8px 0;font-size:16px;max-height:150px}textarea:focus,button:focus-visible,a:focus-visible{outline:3px solid #668bbb;outline-offset:2px}.sendrow{display:flex;align-items:center;gap:12px}#count{font-size:11px;color:#576b81;margin-left:auto}#send,#submitReport{background:#c62632;color:#fff;border-color:#c62632;font-weight:bold;padding:12px 24px}#composer p{font-size:11px;color:#617287;margin:12px 0 0}#announcementLabel{font-size:11px}#moderation{padding:16px 20px;background:#f6f8fc}#moderation summary{min-height:48px;padding:14px 0;cursor:pointer}.report{padding:14px 0;border-bottom:1px solid #d6dfeb;overflow-wrap:anywhere}dialog{border:0;border-radius:16px;max-width:calc(100vw - 32px);width:460px;padding:24px}dialog::backdrop{background:#10284080}dialog h2{font-size:20px}[hidden]{display:none!important}@media(max-width:420px){header{gap:10px;padding:14px 12px}header h1{font-size:16px}#messages{padding:8px 16px 20px}#composer{padding-left:16px;padding-right:16px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.chat-link{color:#1b4e89;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;word-break:break-word;padding:3px 0;line-height:1.65}.chat-link:focus-visible{outline:3px solid #668bbb;outline-offset:3px}

.catchup-toolbar{padding:10px 20px;border-bottom:1px solid #e5ebf1}.catchup-toolbar:has(button[hidden]){display:none}#catchUp{font-weight:bold;color:#173f6b;min-height:44px}.catchup-panel{margin:16px 20px;padding:20px;background:#f2f5fa;border:1px solid #d7e2ed;border-radius:14px}.catchup-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.catchup-top h2{font-size:20px;margin:0}.catchup-top button{font-size:24px;border:0;background:none;padding:0}.catchup-panel h3{font-size:13px;text-transform:uppercase;letter-spacing:.06em;margin:20px 0 10px}.catchup-panel p{font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.catchup-update{border-top:1px solid #d8e2ed;padding:12px 0}.catchup-update strong{font-size:12px}.catchup-update p{margin:6px 0}.catchup-links a{display:block;font-size:14px;padding:10px 0;overflow-wrap:anywhere}.embedded .room{max-width:none}.embedded .back{display:none}.embedded header{padding:14px 16px}.embedded header h1{font-size:17px}.embedded .principle{font-size:11px}.embedded #messages{padding:8px 16px 20px}.embedded #composer{padding-left:16px;padding-right:16px}
header{height:80px;min-height:80px;z-index:4}.embedded header{height:70px;min-height:70px}.catchup-toolbar{position:sticky;top:80px;z-index:3;background:#fff}.embedded .catchup-toolbar{top:70px}.catchup-panel{scroll-margin-top:140px}

.training-tip{margin:16px 20px;padding:20px;background:#eaf1f8;border-left:3px solid #c62632;border-radius:12px}.tip-kicker{font-size:10px;letter-spacing:.12em;font-weight:bold;color:#526a83}.training-tip h2{font-size:19px;line-height:1.3;margin:9px 0}.training-tip p{font-size:14px;line-height:1.6;margin:9px 0}.training-tip .tip-action{font-weight:700;color:#173b63}.tip-source{font-size:10px;color:#63778c;margin-top:12px}#trainingTipRetry{margin-top:10px;font-size:12px;min-height:44px}

.training-tip{scroll-margin-top:140px}.catchup-toolbar{display:flex;gap:8px}#dailyTipOpen{min-height:44px;font-size:12px;color:#173f6b}

/* Daily Training Tip — CIS blue heading and red underline. */
#dailyTipOpen{background:#173b63;color:#fff;border:1px solid #173b63;border-bottom:3px solid #c62632;font-weight:700;padding:10px 14px}.training-tip{background:#edf4fc;border:1px solid #c5d7e9;border-left:0;overflow:hidden;box-shadow:0 3px 12px #173b6308}.tip-kicker{background:#173b63;color:#fff;margin:-20px -20px 16px;padding:14px 20px;border-bottom:3px solid #c62632;font-size:12px;font-weight:800;letter-spacing:.08em}.training-tip h2{color:#173b63}.training-tip .tip-action{background:#fff;border-left:3px solid #c62632;padding:12px 14px;border-radius:6px}.tip-source{color:#365b7f}

/* Keep coaching context above a separately scrolling conversation. */
html,body{height:100%;overflow:hidden}.room{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;position:relative}.room>header{position:relative;flex:none}.community-fixed-top{flex:none;background:white;z-index:2}.community-fixed-top .principle{padding:8px;font-size:11px}.community-fixed-top .catchup-toolbar{padding:6px 16px}.community-fixed-top .training-tip{margin:8px 16px;padding:12px}.community-fixed-top .tip-kicker{margin:-12px -12px 8px;padding:8px 12px}.community-fixed-top .training-tip h2{font-size:16px;margin:6px 0}.training-tip-content{max-height:12dvh;overflow:auto;overscroll-behavior:contain}.training-tip-content p{margin:6px 0;font-size:13px;line-height:1.45}.community-fixed-top .tip-action{padding:8px 10px}.community-fixed-top .tip-source{margin-top:6px}.community-fixed-top #pins{max-height:12dvh;overflow:auto;padding:8px 16px;border-left:3px solid #c62632}.community-fixed-top #pins p{font-size:12px;line-height:1.4}#conversationScroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding:16px}#messages{min-height:0}#composer{position:relative;flex:none;max-height:35dvh;overflow:auto;padding-top:10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}#newMessages{position:sticky;bottom:10px;left:50%;width:max-content}#catchUpPanel{scroll-margin:10px}@media(max-height:640px){.community-fixed-top .principle{display:none}.room>header{padding-top:8px;padding-bottom:8px}.training-tip-content{max-height:9dvh}.community-fixed-top #pins{max-height:9dvh}#composer textarea{max-height:70px}#composer>p{display:none}}

/* Frozen-header behavior: the complete tip never scrolls or truncates. */
.community-fixed-top .training-tip-content{max-height:none;overflow:visible;overscroll-behavior:auto}.community-fixed-top .training-tip{overflow:visible}.community-fixed-top .catchup-toolbar{position:static}.community-fixed-top .training-tip h2{font-size:15px;line-height:1.25}.community-fixed-top .training-tip-content p{font-size:12px;line-height:1.35;margin:5px 0}.community-fixed-top .tip-action{padding:6px 8px}.community-fixed-top .tip-source{font-size:10px}

/* Desktop drawer: the tip is the first frozen item below the room header. */
.embedded .community-fixed-top{display:flex;flex-direction:column;flex:0 0 auto;background:white}.embedded .community-fixed-top .principle{display:none}.embedded .community-fixed-top #trainingTip{order:0;margin-top:8px}.embedded .community-fixed-top #pins{order:1}.embedded .community-fixed-top .catchup-toolbar{order:2;position:static}.embedded .room{height:100dvh;min-height:0;overflow:hidden}.embedded #conversationScroll{flex:1 1 0;min-height:0;overflow-y:auto}.embedded .training-tip-content{max-height:none;overflow:visible}

#tipHistoryDialog{max-height:85dvh;overflow-y:auto;color:#173751}#tipHistoryDialog>button:first-child{float:right}.tip-history-card{border-top:1px solid #d7e0e9;padding:18px 0}.tip-history-card h3{margin:8px 0;font-size:18px}.tip-history-card p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.tip-history-card small{color:#5b6e82}.tip-history-action{border-left:3px solid #c62632;padding:8px 12px;background:#edf4fc}.catchup-toolbar{flex-wrap:wrap}

.community-fixed-top .tip-kicker{display:flex;align-items:center;justify-content:space-between;gap:10px}.tip-kicker #tipHistoryOpen{flex:none;min-height:44px;min-width:44px;padding:7px 12px;background:white;color:#173b63;border-color:#b9cde1;border-radius:8px;font-size:12px;font-weight:700;letter-spacing:0}

/* Phone chat: frozen tip, independent conversation, and an always reachable Send. */
@media(max-width:800px){
 html,body{height:100%;overflow:hidden}
 .room,.embedded .room{height:var(--chat-viewport-height,100dvh);min-height:0;max-height:var(--chat-viewport-height,100dvh)}
 .room>header,.embedded .room>header{height:58px;min-height:58px;padding:8px 12px}
 .room>header h1{font-size:16px}.room>header .back{min-height:40px;min-width:40px}
 .community-fixed-top{max-height:38%;overflow:auto;overscroll-behavior:contain}
 .community-fixed-top .principle{display:none}
 .community-fixed-top .catchup-toolbar{padding:5px 12px;gap:6px;flex-wrap:nowrap}
 .catchup-toolbar button{font-size:12px;min-height:40px;padding:8px 12px}
 .community-fixed-top .training-tip,.embedded .community-fixed-top #trainingTip{margin:6px 12px;padding:10px;overflow:hidden}
 .community-fixed-top .tip-kicker{margin:-10px -10px 6px;padding:5px 10px;font-size:10px}
 .tip-kicker #tipHistoryOpen{min-height:36px;padding:6px 10px;font-size:11px}
 .community-fixed-top .training-tip h2{font-size:14px;margin:5px 0}
 .community-fixed-top .training-tip-content,.embedded .training-tip-content{max-height:10dvh;overflow-y:auto;overscroll-behavior:contain}
 .community-fixed-top .training-tip-content p{font-size:12px;line-height:1.4}
 .community-fixed-top .tip-source{margin-top:4px;font-size:10px}
 #conversationScroll,.embedded #conversationScroll{flex:1 1 0;min-height:48px;overflow-y:auto}
 #composer{flex:0 0 auto;max-height:42%;padding:8px 12px calc(16px + env(safe-area-inset-bottom,0px));overflow-y:auto}
 #composer #memberIdentity,#composer>p{display:none}
 #composer>label{font-size:12px}
 #composer textarea{height:58px;min-height:44px;max-height:80px;resize:none;margin:6px 0;padding:10px;font-size:16px}
 #composer .sendrow{min-height:44px}
 #send{min-height:44px;padding:10px 22px}
 #composer #announcementLabel{font-size:10px}
}
@media(max-width:800px) and (max-height:520px){
 .community-fixed-top .training-tip-content,.community-fixed-top .tip-source{display:none}
 .community-fixed-top{max-height:32%}
 .room>header,.embedded .room>header{height:48px;min-height:48px}
 #composer{max-height:48%}
}

/* Show the complete coaching tip on phones; only the conversation scrolls. */
@media(max-width:800px){
 .community-fixed-top{max-height:none;overflow:visible}
 .community-fixed-top .training-tip-content,.embedded .training-tip-content{display:block;max-height:none;overflow:visible;overscroll-behavior:auto}
 .community-fixed-top .tip-source{display:block}
 .community-fixed-top .training-tip-content p{font-size:12px;line-height:1.35;margin:5px 0}
 .community-fixed-top .training-tip .tip-action{padding:6px 8px}
 #composer textarea{height:44px;min-height:44px;margin:4px 0}
 #composer{padding-top:6px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:800px) and (max-height:520px){
 .room{overflow-y:auto}
 .community-fixed-top{max-height:none}
 #conversationScroll,.embedded #conversationScroll{flex:1 0 100px}
 #composer{position:sticky;bottom:0;max-height:none}
}

/* CIS LIVE mobile: read the Daily Training Tip first, then swipe/tap to reclaim chat.
   Desktop and the server-authorized live chat experience remain unchanged. */
.tip-swipe-toggle{display:none}
@media(max-width:800px){
 .community-fixed-top,.embedded .community-fixed-top{display:flex;flex-direction:column;flex:0 0 auto;max-height:min(46dvh,380px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .community-fixed-top #trainingTip,.embedded .community-fixed-top #trainingTip{order:0;flex:0 0 auto;overflow:hidden;margin:7px 12px 3px;padding:10px}
 .community-fixed-top #pins,.embedded .community-fixed-top #pins{order:1;max-height:76px;overflow-y:auto}
 .community-fixed-top .catchup-toolbar,.embedded .community-fixed-top .catchup-toolbar{order:2;padding:3px 12px 6px}
 .community-fixed-top #dailyTipOpen{display:none!important}
 .community-fixed-top .training-tip-content,.embedded .community-fixed-top .training-tip-content{display:block;max-height:min(26dvh,235px);overflow-y:auto;overscroll-behavior:contain}
 .tip-swipe-toggle{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;min-width:0;margin-top:4px;padding:5px 8px;background:transparent;color:#173b63;border:0;border-top:1px solid #c5d7e9;border-radius:0;font-size:12px;font-weight:750;touch-action:pan-y}
 .tip-swipe-pill{width:30px;height:4px;border-radius:99px;background:#95abc5;flex:none}
 .tip-swipe-chevron{flex:none;transition:transform .15s ease}
 .training-tip .tip-kicker,.training-tip h2{touch-action:pan-y}
 .community-fixed-top .tip-kicker{border-bottom:3px solid #c62632}
 .tip-collapsed #trainingTip .training-tip-content,.tip-collapsed #trainingTip .tip-source,.tip-collapsed #trainingTip #trainingTipRetry{display:none!important}
 .tip-collapsed #trainingTip h2{font-size:13px;line-height:1.3;margin:5px 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .tip-collapsed #trainingTip .tip-swipe-toggle{margin-top:1px}
 .tip-collapsed #trainingTip .tip-swipe-chevron{transform:rotate(180deg)}
 #conversationScroll,.embedded #conversationScroll{flex:1 1 0;min-height:64px}
 .community-fixed-top #trainingTip .tip-action{padding:6px 8px}
}
@media(max-width:800px) and (max-height:520px){
 .room,.embedded .room{overflow:hidden}
 .community-fixed-top,.embedded .community-fixed-top{max-height:45dvh;overflow-y:auto}
 .community-fixed-top .training-tip-content,.embedded .training-tip-content{display:block;max-height:18dvh;overflow-y:auto}
 #conversationScroll,.embedded #conversationScroll{flex:1 1 0;min-height:48px}
 #composer{position:relative;flex:0 0 auto;max-height:42%}
}
@media(prefers-reduced-motion:reduce){.tip-swipe-chevron{transition:none}}

/* Member tagging fits above the composer on phones and in the desktop drawer. */
#composer{overflow:visible}#mentionPicker{position:absolute;bottom:100%;left:16px;right:16px;max-height:min(32dvh,260px);overflow-y:auto;background:#fff;border:1px solid #d7e0e9;border-radius:16px;box-shadow:0 -8px 28px #10284020;z-index:8;padding:6px;color:#17324f}#mentionPicker button{display:block;width:100%;text-align:left;border:0;border-radius:10px;background:#fff;color:#17324f;min-height:48px;padding:12px 16px;font-weight:600}#mentionPicker button:hover,#mentionPicker button[aria-selected=true]{background:#eef3f8}#mentionPicker>div{padding:12px;font-size:14px}.chat-mention{background:#dce9f4;color:#173b63;border-radius:5px;padding:1px 3px;font-weight:700}.message.mine .chat-mention{background:#fff;color:#173b63}.mention-badge{background:#fff0f2;color:#ae1d35;font-size:12px;border-radius:20px;padding:4px 9px;font-weight:700}.message.mentioned{box-shadow:inset 4px 0 #c62632}

/* Verified Belt room navigation; shared by phone, desktop and drawer. */
.belt-room-navigation{flex:none;padding:12px 20px;border-bottom:1px solid #e0e8ee;background:white;display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 14px;align-items:center}.belt-room-navigation label{font-size:10px;color:#647c8f;font-weight:800;letter-spacing:.1em}.belt-room-navigation select{font:700 14px Arial,sans-serif;min-height:44px;width:100%;background:#f1f6f9;color:#203b50;border:1px solid #d4e0e8;border-radius:11px;padding:9px 12px}.belt-room-navigation p{grid-column:1/-1;font-size:11px;line-height:1.45;color:#5e7689;margin:2px 0 0}.belt-room-navigation select:focus-visible{outline:3px solid #7a9bb5;outline-offset:2px}.room-empty{padding:28px 10px;color:#60788c;font-size:14px;line-height:1.6}@media(max-width:699px){.belt-room-navigation{padding:9px 18px;gap:3px 10px}.belt-room-navigation p{font-size:10px}.belt-room-navigation select{font-size:13px}}

/* Weekly topics belong to their Belt room and stay separate from ride reviews. */
.weekly-belt-topic{order:-1;flex:none;margin:12px 20px 4px;padding:17px 18px;background:#fff8f9;border:1px solid #eadce0;border-radius:17px;color:#223b4d}.weekly-topic-heading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 12px;align-items:center}.weekly-topic-kicker{font-size:10px;font-weight:800;letter-spacing:.1em;color:#995162}.weekly-topic-date{font-size:10px;color:#698091}.weekly-belt-topic h2{font-size:19px;line-height:1.3;letter-spacing:-.02em;margin:10px 0;color:#223b4d}.weekly-belt-topic details{margin:8px 0}.weekly-belt-topic summary{font-size:12px;font-weight:700;color:#385a72;cursor:pointer;padding:7px 0}.weekly-belt-topic details p{font-size:13px;line-height:1.65;margin:8px 0;color:#4c6578}.weekly-belt-topic .weekly-topic-question{font-size:13px;font-weight:600;line-height:1.55;color:#304e65;margin:9px 0}.weekly-topic-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.weekly-topic-actions button{font-size:11px;min-height:38px;padding:8px 11px;border-radius:10px;border:1px solid #d9dfe5;background:white;color:#294e69}.weekly-topic-actions button:first-child{font-weight:700}.weekly-topic-actions button:focus-visible{outline:3px solid #7e9db3;outline-offset:2px}body[data-belt-room]:not([data-belt-room=general]) #trainingTip,body[data-belt-room]:not([data-belt-room=general]) #dailyTipOpen{display:none!important}#weeklyTopicEditor{width:min(560px,calc(100vw - 32px));max-height:85dvh;overflow-y:auto;color:#213b50}#weeklyTopicEditor h2{font-size:22px;margin-top:0}#weeklyTopicEditor>p{font-size:13px;color:#637b8f;line-height:1.5}#weeklyTopicEditor label{display:block;font-size:12px;font-weight:700;margin:15px 0 7px}#weeklyTopicEditor input,#weeklyTopicEditor textarea{font:inherit;font-size:15px;width:100%;border:1px solid #c6d4df;border-radius:10px;padding:12px;max-height:none}#weeklyTopicEditor .weekly-topic-actions{justify-content:flex-end;margin-top:16px}#weeklyTopicEditor button[type=submit]{background:#be2036;border-color:#be2036;color:white}#weeklyTopicEditor [role=status]{font-size:12px;color:#a6253b}@media(max-width:699px){.weekly-belt-topic{margin:8px 18px 4px;padding:13px 15px}.weekly-belt-topic h2{font-size:17px}.weekly-belt-topic .weekly-topic-question{font-size:12px}.weekly-topic-actions button{min-height:40px}.weekly-belt-topic details p{font-size:12px}}

/* Shared community and Belt discussions are separate destinations. */
.chat-destination-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px;background:#f4f7fa;border-bottom:1px solid #dce5ec}.chat-destination-bar>span{font-size:9px;font-weight:800;letter-spacing:.09em;color:#6a8091}.chat-destination-bar a{font-size:12px;font-weight:700;color:#294e68;text-decoration:none;min-height:36px;display:flex;align-items:center}.chat-destination-bar a:focus-visible{outline:3px solid #7b9ab1;outline-offset:2px}body[data-chat-destination=live] #roomNavigation,body[data-chat-destination=live] #weeklyTopic{display:none!important}@media(max-width:699px){.chat-destination-bar{padding:6px 18px}.chat-destination-bar a{font-size:11px}.chat-destination-bar>span{font-size:8px}}
