.project-chat { margin-block: 24px; border-top: 3px solid #214f91; }
.chat-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.chat-heading h2 { margin: 8px 0; }
.chat-intro { max-width: 64ch; line-height: 1.6; color: #555; }
.chat-coverage { padding: 14px 16px; background: #f3f5f9; border-radius: 10px; color: #214f91; }
.chat-inventory { margin-block: 16px 24px; }
.chat-inventory summary, .chat-citations summary { cursor: pointer; padding-block: 10px; }
.chat-inventory ul { list-style: none; padding: 0; }
.chat-inventory li { padding: 12px 0; border-bottom: 1px solid #e5e7eb; overflow-wrap: anywhere; }
.chat-inventory small { display: block; margin-top: 5px; color: #555; }
.chat-log { display: grid; gap: 14px; }
.chat-message { border-left: 2px solid #c7d1df; padding: 12px 18px; min-width: 0; overflow-wrap: anywhere; }
.chat-message p { white-space: pre-wrap; line-height: 1.7; margin: 8px 0; }
.chat-user { background: #f3f5f9; border-radius: 0 12px 12px 0; }
.chat-message small { display: block; line-height: 1.6; color: #555; margin-top: 12px; }
.chat-citations { display: grid; gap: 5px; }
.chat-citations details { border-bottom: 1px solid #e5e7eb; }
.chat-citations summary, .chat-citations a { color: #214f91; }
.chat-citations blockquote { margin: 6px 0 12px; padding: 12px; background: #f3f5f9; line-height: 1.6; white-space: pre-wrap; }
.chat-answer-state { color: #214f91; }
.chat-prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 24px 16px; }
.chat-suggestion { border: 1px solid #c7d1df; border-radius: 16px; padding: 8px 12px; background: white; color: #214f91; font: inherit; cursor: pointer; }
.chat-form label { display: block; margin-bottom: 8px; }
.chat-form textarea { display: block; box-sizing: border-box; width: 100%; min-height: 96px; resize: vertical; font: inherit; line-height: 1.6; padding: 14px; border: 1px solid #c7d1df; border-radius: 12px; }
.chat-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.chat-actions small { margin-right: auto; max-width: 48ch; color: #555; line-height: 1.5; }
.chat-feedback { min-height: 1.5em; color: #214f91; line-height: 1.6; }
.project-chat :focus-visible { outline: 2px solid #214f91; outline-offset: 4px; }
.project-chat button:disabled { opacity: .55; cursor: not-allowed; }
.project-chat textarea:disabled { background: #f3f3f3; }
@media (max-width: 640px) {
  .chat-heading { flex-direction: column; gap: 8px; }
  .chat-actions { flex-wrap: wrap; }
  .chat-actions small { flex-basis: 100%; max-width: none; }
  .chat-actions button { flex: 1; }
  .chat-message { padding-inline: 12px; }
  .chat-suggestion { text-align: left; }
}
