/* Senda v1: neutral surfaces frame server-provided institutional identity. */
:root{--surface:#f7f6f2;--s2:#eceae5;--s3:#e4e3de;--text:#111315;--text2:#535d65;--text3:#535d65;--border:#d5d7d6;--border2:#b7bdbe;--r:18px;--r-sm:11px;--blue:#005a70;--chat-raised:6px 6px 16px #b4b4af44,-5px -5px 14px #ffffffbb;--chat-inset:inset 2px 2px 5px #b4b4af33,inset -2px -2px 5px #ffffff88}
:root[data-chat-appearance=dark]{color-scheme:dark;--surface:#252a2e;--s2:#181d20;--s3:#30373c;--text:#f6f5f1;--text2:#c0c7cd;--text3:#c0c7cd;--border:#424a50;--border2:#626c73;--blue:#a4ddf1;--chat-raised:6px 6px 16px #05090b77,-4px -4px 12px #3b444a22;--chat-inset:inset 2px 2px 5px #05090b55}
.page{background:var(--s2)}
.shell{box-shadow:var(--chat-raised);border-radius:24px;min-height:0;height:min(820px,calc(var(--chat-viewport-height,100dvh) - 48px));max-height:none}
.header{flex-wrap:wrap;background:var(--surface);color:var(--text);border-bottom:3px solid var(--brand);padding:18px 22px;gap:12px}
.header-text{flex:1;min-width:0}.header-text h1{color:var(--text);font-size:17px;overflow-wrap:anywhere}.header-text p{color:var(--text2);opacity:1}
.header-icon{box-shadow:var(--chat-inset);border:1px solid var(--border);background:var(--s2);width:42px;height:42px;border-radius:13px}
.chat-appearance{display:flex;flex-direction:column;gap:3px;font-size:10px;color:var(--text2)}
.chat-appearance select{font:12px system-ui;padding:7px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);min-height:36px}
.messages{padding:22px;gap:18px}.bubble{font-size:15px;line-height:1.65;padding:13px 16px}.msg-row.bot .bubble{box-shadow:2px 2px 6px #0000000a}.bubble-wrap{max-width:86%;min-width:0}
.source-ref{background:var(--s2);color:var(--text2)}.source-ref a{color:var(--blue)!important}
.input-bar{background:var(--surface);gap:10px;padding:14px 18px;border-top:1px solid var(--border)}
.input-bar textarea{background:var(--s2);color:var(--text);border:1px solid var(--border);box-shadow:var(--chat-inset);border-radius:14px;font-size:16px;line-height:1.5}
.input-bar textarea::placeholder{color:var(--text2)}
#send-btn,#voice-btn{min-width:44px;min-height:44px;border-radius:14px}#send-btn{background:var(--brand);color:var(--brand-text)}
.quick-bar{background:var(--surface);border-color:var(--border)}.quick-btn{background:var(--s2);color:var(--text);border-color:var(--border);min-height:36px}
:focus-visible{outline:3px solid var(--chat-focus);outline-offset:3px}
[data-chat-appearance=dark] .bubble code{background:var(--s3)!important;color:var(--text)}
[data-chat-embedded=true] .page{padding:0;min-height:0;height:var(--chat-viewport-height,100dvh)}
[data-chat-embedded=true] .shell{height:100%;max-height:100%;border-radius:0;border:0;box-shadow:none}
@media(max-width:600px){.page{padding:0}.shell{height:var(--chat-viewport-height,100dvh);border-radius:0;border:0}.header{padding:12px}.messages{padding:14px}.bubble-wrap{max-width:88%}.input-bar{padding:12px}.chat-appearance{margin-left:auto}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}
.quick-label{color:var(--text2);opacity:1}

/* Rating ink stays independent of tenant accent; shape and pressed outline
   distinguish selection without relying on color. Disabled remains legible. */
.star-btn,.star-btn.active{color:var(--text2);opacity:1;border:2px solid transparent;border-radius:7px;min-width:34px;min-height:36px}
.star-btn[aria-pressed=true]{border-color:currentColor}
.star-btn:hover,.star-btn:focus-visible{color:var(--text)}
.star-btn:disabled{opacity:1;cursor:default}
.chat-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
