.oss-chat { position: fixed; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); z-index: 850; font-family: Manrope, sans-serif; color: #102438; }
.oss-chat [hidden] { display: none !important; }
.oss-chat .chat-panel { transform-origin: bottom right; }
.oss-chat button,.oss-chat input { font: inherit; }
.oss-chat button { cursor: pointer; }
.chat-launcher { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid #ffffff30; border-radius: 50px; padding: 13px 18px; background: #102438; color: white; box-shadow: 0 4px 18px #10243824; font-weight: 700 !important; font-size: 13px !important; transition: box-shadow .2s, transform .2s; }
.chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 7px 24px #10243830; }
.chat-launcher > span:first-child { color: #d9f885; font-size: 20px; line-height: 1; }
.chat-badge { position: absolute; top: -5px; right: -3px; display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid #f7f8f5; border-radius: 50%; background: #d9f885; color: #102438; font-size: 10px; }
/* Keep page section spacing out of the floating chat panel. */
.oss-chat .chat-panel { margin: 0; padding: 0; box-sizing: border-box; position: absolute; right: 0; bottom: 63px; width: min(350px, calc(100vw - 32px)); max-height: min(490px, calc(100dvh - 115px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e3e8ec; border-radius: 20px; background: #fff; box-shadow: 0 12px 45px #1024381c, 0 2px 8px #10243808; }
.chat-heading { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #edf0f3; background: transparent; }
.chat-identity { display: flex; align-items: center; gap: 10px; }
.chat-header-logo { width: 28px; height: 28px; object-fit: contain; }
.chat-heading h2 { margin: 0 0 3px; font-size: 15px; line-height: 1.3; letter-spacing: -.025em; font-weight: 750; color: #102438; }
.chat-heading p { display: flex; align-items: center; gap: 5px; margin: 0; color: #73818e; font-size: 10px; line-height: 1.4; }
.chat-presence { width: 5px; height: 5px; border-radius: 50%; background: #479478; }
.chat-ai-label { margin-left: 3px; padding: 1px 4px; border: 1px solid #e2e8ee; border-radius: 4px; color: #73818e; font-size: 8px; letter-spacing: .04em; }
.chat-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #73818e; font-size: 22px !important; line-height: 1; padding: 0; transition: background .2s; }
.chat-close:hover { background: #e9eef4; color: #102438; }
.chat-security { padding: 16px; overflow: auto; font-size: 12px; line-height: 1.6; color: #5c6b79; }
.chat-security > p { margin: 0 0 12px; }
.chat-conversation { display: flex; flex-direction: column; min-height: 0; }
.chat-messages { overflow-y: auto; overscroll-behavior: contain; min-height: 80px; max-height: 245px; padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: #d8e0e7 transparent; }
.chat-message-row { display: flex; align-items: flex-start; gap: 8px; }
.chat-message-row-user { justify-content: flex-end; }
.chat-avatar { width: 24px; height: 24px; object-fit: contain; flex: 0 0 24px; margin-top: 7px; }
.chat-typing .chat-message { color: #73818e; font-style: italic; }
.chat-message { min-width: 0; max-width: calc(100% - 32px); background: #f3f5f7; border: 1px solid #edf0f3; border-radius: 3px 14px 14px 14px; padding: 10px 12px; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-user { max-width: 87%; background: #175cff; border-color: transparent; color: white; border-radius: 14px 3px 14px 14px; }
.chat-source { display: block; color: #175cff; font-size: 10px; line-height: 1.5; margin-top: 6px; text-decoration: none; }
.chat-source:hover { text-decoration: underline; }
.chat-suggestions { padding: 0 14px 12px 46px; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggestions button,.chat-retry { border: 1px solid #e0e7ee; background: #fff; border-radius: 20px; padding: 7px 10px; color: #3d5872; font-size: 10px; line-height: 1.4; text-align: left; transition: border-color .2s, background .2s; }
.chat-suggestions button:hover,.chat-retry:hover { background: #f1f6ff; border-color: #b7cbee; }
.chat-form { display: flex; align-items: center; flex: 0 0 auto; margin: 0 12px; padding: 5px; background: #f8fafb; border: 1px solid #e3e8ec; border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.chat-form:focus-within { border-color: #99b7fb; box-shadow: 0 0 0 3px #175cff0a; }
.chat-form input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; padding: 9px 7px; font-size: 12px; color: #102438; }
.chat-form input::placeholder { color: #8895a1; }
.chat-form button { display: grid; place-items: center; border: 0; border-radius: 10px; background: #175cff; color: white; width: 32px; height: 32px; flex-shrink: 0; font-size: 20px; }
.chat-form button:disabled { opacity: .5; }
.chat-disclosure { margin: 8px 14px 10px; font-size: 9px; line-height: 1.5; color: #7a8793; }
.chat-disclosure a { color: #446789; }
.chat-status { flex: 0 0 auto; margin: 0; padding: 0 16px 12px; font-size: 11px; line-height: 1.6; color: #5c6b79; }
.chat-status:empty { padding: 0; }
.chat-sr,.chat-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body:has(.oss-chat) .arcade-launcher { right: auto; left: 22px; }
body:has(.oss-chat) .arcade-launcher-tip { right: auto; left: 64px; }
@media (max-width: 600px) { .oss-chat { right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); } .chat-messages { max-height: 32dvh; } .chat-form input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .oss-chat * { transition: none !important; } .chat-launcher:hover { transform: none; } }
/* Compact Markdown typography, independent of the site's page styles. */
.oss-chat .chat-markdown { white-space: normal; }
.oss-chat .chat-markdown p { margin: 0 0 8px; font: inherit; color: inherit; }
.oss-chat .chat-markdown > :first-child { margin-top: 0; }
.oss-chat .chat-markdown > :last-child { margin-bottom: 0; }
.oss-chat .chat-markdown ul,.oss-chat .chat-markdown ol { margin: 8px 0; padding-left: 19px; }
.oss-chat .chat-markdown li { margin: 0 0 7px; padding: 0; }
.oss-chat .chat-markdown li:last-child { margin-bottom: 0; }
.oss-chat .chat-markdown li > p { margin-bottom: 4px; }
.oss-chat .chat-markdown strong { font-weight: 750; }
.oss-chat .chat-markdown a { color: #175cff; text-decoration: underline; text-underline-offset: 2px; }
.oss-chat .chat-markdown :is(h1,h2,h3,h4,h5,h6) { margin: 12px 0 6px; font-size: 13px; line-height: 1.5; color: inherit; letter-spacing: normal; }
.oss-chat .chat-markdown code { font-size: 11px; background: #e7ecf2; padding: 1px 4px; border-radius: 4px; }
.oss-chat .chat-markdown pre { max-width: 100%; overflow-x: auto; margin: 8px 0; padding: 8px; background: #e7ecf2; border-radius: 6px; white-space: pre; }
.oss-chat .chat-markdown pre code { padding: 0; }
.oss-chat .chat-markdown blockquote { margin: 8px 0; padding: 0 0 0 9px; border-left: 2px solid #b9cbee; }
.oss-chat .chat-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 11px; }
.oss-chat .chat-markdown th,.oss-chat .chat-markdown td { padding: 5px 7px; border: 1px solid #dce3e7; text-align: left; }
