.dsai-chat{--dsai-navy:#082b44;--dsai-blue:#149ed2;--dsai-blue-dark:#087bb2;--dsai-ink:#183342;--dsai-muted:#607480;--dsai-line:#dbe7ed;box-sizing:border-box;max-width:680px;padding:20px;margin:18px 0;border:1px solid var(--dsai-line);border-radius:14px;background:#fff;color:var(--dsai-ink);box-shadow:0 8px 28px rgba(8,43,68,.08);font-family:inherit;text-align:left}
.dsai-chat *{box-sizing:border-box}.dsai-chat h3,.dsai-chat p{font-family:inherit}.dsai-chat h3{margin:0;font-size:1.2rem;line-height:1.25}.dsai-chat p{margin:0 0 12px}.dsai-chat button,.dsai-chat textarea{font-family:inherit}
.dsai-chat-preview{padding:8px 12px!important;margin:0!important;background:#fff2cf;color:#664d08;font-size:.8rem;line-height:1.35;text-align:center}
.dsai-chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px}.dsai-chat-title,.dsai-chat-heading-actions{display:flex;align-items:center;gap:8px}.dsai-chat--floating .dsai-chat-title h3{color:#fff!important}.dsai-chat-status{width:9px;height:9px;border-radius:50%;background:#31d17c;box-shadow:0 0 0 3px rgba(49,209,124,.18)}
.dsai-chat-reset,.dsai-chat-close{flex:0 0 auto;padding:6px 9px;border:1px solid #a8bac4;border-radius:8px;background:#fff;color:#245e78;font-size:.78rem;line-height:1.2;cursor:pointer}.dsai-chat-close{display:grid;place-items:center;width:32px;height:32px;padding:0;font-size:1.45rem;line-height:1}.dsai-chat-reset:hover,.dsai-chat-close:hover{background:#f1f7fa}.dsai-chat-reset:disabled{opacity:.5;cursor:wait}
.dsai-chat-intro{color:var(--dsai-muted);font-size:.91rem;line-height:1.45}
.dsai-chat-quick-actions{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 4px}.dsai-chat-quick{padding:7px 10px;border:1px solid #9fd9ed;border-radius:999px;background:#f2fbfe;color:#075f86;font-size:.8rem;line-height:1.2;cursor:pointer}.dsai-chat-quick:hover{border-color:var(--dsai-blue);background:#e5f7fd}.dsai-chat-has-history .dsai-chat-quick-actions{display:none}
.dsai-chat-messages{min-height:96px;max-height:380px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:10px;margin:14px 0;padding:12px;border:1px solid #e1e9ed;border-radius:11px;background:#f5f8fa;scrollbar-width:thin;scrollbar-color:#b5c9d2 transparent}
.dsai-chat-message{max-width:92%;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:12px;line-height:1.48;font-size:.9rem}.dsai-chat-user{align-self:flex-end;background:#dff4fc;color:#083a50;border-bottom-right-radius:4px}.dsai-chat-assistant{align-self:flex-start;background:#fff;border:1px solid #e0e9ed;border-bottom-left-radius:4px}
.dsai-chat-links{display:flex;flex-direction:column;gap:6px;margin-top:10px;font-size:.9em}.dsai-chat-links a{color:#087fb4;text-decoration:underline;text-underline-offset:2px}.dsai-chat-citations{margin-top:10px;padding-top:8px;border-top:1px solid #e5ecef;font-size:.82em;color:#526771}.dsai-chat-citations summary{cursor:pointer;font-weight:600}.dsai-chat-citations span{display:flex;flex-direction:column;gap:5px;margin-top:7px}.dsai-chat-citations a{color:#087fb4;text-decoration:underline}
.dsai-chat-feedback{display:flex;align-items:center;gap:6px;margin-top:9px;padding-top:7px;border-top:1px solid #edf2f4;color:#607480;font-size:.78em}.dsai-chat-feedback span{margin-right:2px}.dsai-chat-feedback button{display:grid;place-items:center;width:28px;height:26px;padding:0;border:1px solid #cbdbe2;border-radius:7px;background:#f8fbfc;cursor:pointer}.dsai-chat-feedback button:hover{border-color:#149ed2;background:#eaf8fd}.dsai-chat-feedback button:disabled{opacity:.55;cursor:default}
.dsai-chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.dsai-chat-form label{grid-column:1/-1;font-weight:600;font-size:.86rem}.dsai-chat-form textarea{width:100%;min-width:0;min-height:44px;max-height:110px;resize:vertical;padding:10px 11px;border:1px solid #9fb5c0;border-radius:9px;background:#fff;color:var(--dsai-ink);font-size:.9rem;line-height:1.35}.dsai-chat-form button[type=submit]{min-height:44px;padding:10px 15px;border:0;border-radius:9px;background:var(--dsai-blue-dark);color:#fff;font-size:.88rem;font-weight:700;cursor:pointer}.dsai-chat-form button[type=submit]:hover{background:#056a99}.dsai-chat-form button:disabled{opacity:.55;cursor:wait}.dsai-chat small{display:block;margin-top:9px;color:#6a7d86;font-size:.72rem;line-height:1.35}
.dsai-chat button:focus-visible,.dsai-chat textarea:focus-visible,.dsai-chat-launcher:focus-visible{outline:3px solid rgba(20,158,210,.34);outline-offset:2px}

.dsai-floating{position:fixed;right:24px;bottom:calc(78px + env(safe-area-inset-bottom,0px));z-index:9990;display:flex;align-items:flex-end;justify-content:flex-end;font-family:inherit}.dsai-chat-launcher{display:flex;align-items:center;gap:9px;min-height:54px;padding:8px 17px 8px 10px;border:0;border-radius:999px;background:linear-gradient(135deg,var(--dsai-navy,#082b44),var(--dsai-blue,#149ed2));color:#fff;box-shadow:0 10px 30px rgba(8,43,68,.28);font-family:inherit;font-size:14px;font-weight:700;line-height:1.2;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}.dsai-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(8,43,68,.34)}.dsai-chat-launcher-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.16)}.dsai-chat-launcher-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.dsai-chat-launcher-label{white-space:nowrap}
.dsai-chat-panel{position:absolute;right:0;bottom:70px;width:min(410px,calc(100vw - 48px));height:620px;max-height:calc(100vh - 170px);height:min(620px,calc(100dvh - 170px));min-height:430px;overflow:hidden;border:1px solid rgba(8,43,68,.13);border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(8,43,68,.28);transform-origin:bottom right;animation:dsai-panel-in .18s ease-out}.dsai-chat-panel[hidden]{display:none!important}
.dsai-chat--floating{width:100%;height:100%;max-width:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;display:flex;flex-direction:column;overflow:hidden}.dsai-chat--floating .dsai-chat-heading{flex:0 0 auto;margin:0;padding:14px 15px;background:linear-gradient(135deg,var(--dsai-navy),#0b6086);color:#fff}.dsai-chat--floating .dsai-chat-reset,.dsai-chat--floating .dsai-chat-close{border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.1);color:#fff}.dsai-chat--floating .dsai-chat-reset:hover,.dsai-chat--floating .dsai-chat-close:hover{background:rgba(255,255,255,.2)}.dsai-chat--floating .dsai-chat-intro{flex:0 0 auto;margin:0;padding:12px 15px 0}.dsai-chat--floating .dsai-chat-quick-actions{flex:0 0 auto;margin:0;padding:10px 15px 2px}.dsai-chat--floating .dsai-chat-messages{flex:1 1 auto;min-height:120px;max-height:none;margin:10px 15px}.dsai-chat--floating .dsai-chat-form{flex:0 0 auto;margin:0 15px}.dsai-chat--floating .dsai-chat-form label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.dsai-chat--floating small{flex:0 0 auto;margin:0;padding:8px 15px 12px}
@keyframes dsai-panel-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

@media (max-width:600px){.dsai-floating{right:12px;bottom:calc(72px + env(safe-area-inset-bottom,0px))}.dsai-chat-launcher{width:56px;height:56px;min-height:56px;padding:9px;border-radius:50%;justify-content:center}.dsai-chat-launcher-icon{width:38px;height:38px}.dsai-chat-launcher-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.dsai-floating--open .dsai-chat-launcher{visibility:hidden;pointer-events:none}.dsai-chat-panel{position:fixed;left:12px;right:12px;top:calc(var(--dsai-visual-top,0px) + 12px);bottom:auto;width:auto;height:calc(var(--dsai-visual-height,100dvh) - 24px);max-height:calc(var(--dsai-visual-height,100dvh) - 24px);min-height:0;border-radius:16px;overscroll-behavior:contain}.dsai-chat--floating .dsai-chat-heading{padding:12px}.dsai-chat--floating .dsai-chat-intro{padding:10px 12px 0}.dsai-chat--floating .dsai-chat-quick-actions{padding:9px 12px 1px}.dsai-chat--floating .dsai-chat-messages{min-height:0;margin:9px 12px}.dsai-chat--floating .dsai-chat-form{margin:0 12px}.dsai-chat--floating small{padding:7px 12px 10px}.dsai-chat-message{max-width:95%}.dsai-visual-keyboard .dsai-chat-preview,.dsai-visual-keyboard .dsai-chat--floating .dsai-chat-intro,.dsai-visual-keyboard .dsai-chat--floating .dsai-chat-quick-actions,.dsai-visual-keyboard .dsai-chat--floating small{display:none}.dsai-visual-keyboard .dsai-chat--floating .dsai-chat-heading{padding:8px 10px}.dsai-visual-keyboard .dsai-chat--floating .dsai-chat-messages{margin:6px 10px}.dsai-visual-keyboard .dsai-chat--floating .dsai-chat-form{margin:0 10px 8px}.dsai-visual-keyboard .dsai-chat--floating .dsai-chat-form textarea{min-height:42px;max-height:64px}}
@media (max-width:380px){.dsai-chat-title h3{font-size:1.05rem}.dsai-chat-reset{font-size:.7rem;padding:5px 7px}.dsai-chat-form{grid-template-columns:minmax(0,1fr) 76px}.dsai-chat-form button[type=submit]{padding:9px 10px}}
@media (max-height:620px) and (min-width:601px){.dsai-chat-panel{min-height:0;max-height:calc(100dvh - 145px)}.dsai-chat--floating .dsai-chat-intro{display:none}}
@media (prefers-reduced-motion:reduce){.dsai-chat-launcher{transition:none}.dsai-chat-panel{animation:none}}

/* E19: administrators only — which path answered */
.dsai-chat-admin-note { margin-top: 8px; padding: 6px 8px; border-left: 3px solid #b45309; background: #fff7ed; color: #7c2d12; font-size: 11px; line-height: 1.4; }
