body { font: 16px/1.5 system-ui, sans-serif; margin: 0 auto; max-width: 46rem; padding: 1rem; color: #1b1b1b; }
body.narrow { max-width: 28rem; }
header { display: flex; justify-content: space-between; align-items: center; }
h1 { font-size: 1.25rem; }
form { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
input, textarea { flex: 1; font: inherit; padding: 0.5rem; border: 1px solid #999; border-radius: 4px; }
button { font: inherit; padding: 0.5rem 1rem; border: 0; border-radius: 4px; background: #1b1b1b; color: #fff; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: wait; }
#messages .msg { margin: 1rem 0; padding: 0.75rem; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
#messages .user { background: #eef; }
#messages .assistant { background: #f5f5f5; }
#messages .sources { margin-top: 0.5rem; font-size: 0.9rem; white-space: normal; }
#login p, #chat-status, #login-status { color: #444; }
[hidden] { display: none !important; }
