.attachment-preview {
  margin: 0 0 10px;
  padding: 10px 13px;
  background: #eef6f2;
  border: 1px solid #c9ddd3;
  border-left: 3px solid #0d776f;
  border-radius: 7px;
  color: #345e5e;
  font-size: 12px;
}
.attachment-preview button { float: right; border: 0; background: none; color: #8b3434; cursor: pointer; font-size: 16px; }

.message.ai.rich-response {
  padding: 0;
  overflow: hidden;
  white-space: normal;
  border: 1px solid #d5dfda;
  border-radius: 12px 12px 12px 3px;
  box-shadow: 0 12px 35px rgba(9, 47, 53, .07);
}
.message.ai.rich-response::before { display: none; }
.response-masthead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 17px;
  background: linear-gradient(100deg, #092f35, #0c5559);
  color: #fff;
  border-bottom: 3px solid #d6aa4b;
}
.response-seal {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 50%;
  font: 800 14px Manrope, sans-serif;
}
.response-masthead > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.15; }
.response-masthead b { font: 800 11px Manrope, sans-serif; letter-spacing: .12em; }
.response-masthead small { margin-top: 3px; color: #bcd3d1; font-size: 9px; }
.response-masthead i { margin-left: auto; color: #e9cf91; font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.response-body { padding: 19px 21px 21px; color: #173d43; line-height: 1.68; }
.response-body > :first-child { margin-top: 0; }
.response-body > :last-child { margin-bottom: 0; }
.response-body h2,
.response-body h3,
.response-body h4 {
  font-family: Manrope, sans-serif;
  color: #083f46;
  line-height: 1.3;
}
.response-body h2 { margin: 23px 0 10px; padding-bottom: 7px; border-bottom: 1px solid #dce6e0; font-size: 18px; }
.response-body h3 { margin: 20px 0 8px; font-size: 15px; }
.response-body h4 { margin: 17px 0 7px; color: #3c6466; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.response-body p { margin: 0 0 12px; }
.response-body strong { color: #092f35; font-weight: 700; }
.response-body em { color: #496d70; }
.response-body ul,
.response-body ol { margin: 8px 0 15px; padding-left: 25px; }
.response-body li { margin: 6px 0; padding-left: 3px; }
.response-body li::marker { color: #0d8278; font-weight: 800; }
.response-body blockquote {
  margin: 16px 0;
  padding: 13px 15px;
  background: #f1f6f3;
  border-left: 4px solid #d5a43f;
  color: #365c60;
  font-family: Georgia, serif;
}
.response-body hr { margin: 20px 0; border: 0; border-top: 1px solid #dce5df; }
.response-body code { padding: 2px 5px; background: #edf2ef; border-radius: 4px; color: #075a62; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.response-body pre { overflow-x: auto; margin: 14px 0; padding: 15px; background: #092f35; border-radius: 7px; color: #edf8f5; }
.response-body pre code { padding: 0; background: transparent; color: inherit; }
.response-table-wrap { overflow-x: auto; margin: 15px 0 18px; border: 1px solid #d6e0db; border-radius: 7px; }
.response-body table { width: 100%; border-collapse: collapse; min-width: 460px; font-size: 12px; }
.response-body th { padding: 10px 12px; background: #0b5559; color: #fff; text-align: left; font-size: 11px; letter-spacing: .025em; }
.response-body td { padding: 10px 12px; border-top: 1px solid #e0e6e2; vertical-align: top; }
.response-body tbody tr:nth-child(even) { background: #f6f8f5; }

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  clear: both;
  padding: 13px 20px 15px;
  background: #f5f7f4;
  border-top: 1px solid #dde5df;
}
.export-actions::before { content: 'EXPORTER'; align-self: center; margin-right: 3px; color: #718684; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.export-actions button { border: 1px solid #bfd1c8; background: #fff; color: #174d52; border-radius: 5px; padding: 8px 12px; font-size: 11px; font-weight: 700; cursor: pointer; transition: .18s; }
.export-actions button:hover { border-color: #0f7c73; background: #eaf4ef; transform: translateY(-1px); }
.export-actions button:disabled { opacity: .6; cursor: wait; transform: none; }

.document-workbench { margin-top: 34px; padding: 30px; background: #fff; border: 1px solid #d9e0db; border-top: 4px solid #0b5c61; box-shadow: 0 16px 40px rgba(9,47,53,.05); }
.document-workbench > div:first-child { max-width: 720px; }
.document-workbench h2 { font: 800 28px Manrope; margin: 10px 0; }
.document-workbench p { color: #647a7d; line-height: 1.6; }
.document-workbench form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 25px; }
.document-workbench label { font-size: 12px; font-weight: 700; }
.document-workbench input,
.document-workbench select,
.document-workbench textarea { display: block; width: 100%; margin-top: 7px; padding: 11px; border: 1px solid #d3ddd6; border-radius: 5px; }
.document-workbench label:nth-child(3), .document-workbench .primary-btn { grid-column: 1 / -1; }
.document-result { margin-top: 25px; padding: 0; overflow: hidden; background: #fff; border: 1px solid #d5dfda; border-top: 4px solid #0f7c73; box-shadow: 0 14px 35px rgba(9,47,53,.06); white-space: normal; line-height: 1.65; }
.document-result-title { margin: 0; padding: 15px 20px; background: #f1f5f1; border-bottom: 1px solid #dae3dd; color: #173f44; font: 700 15px Manrope, sans-serif; }
.document-result > .rich-response .response-body { padding-top: 20px; }
.document-result > .export-actions { margin: 0; }

.conversation-context {
  max-width: 800px;
  margin: 0 auto 13px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #edf5f1;
  border: 1px solid #cdded5;
  border-left: 4px solid #0d7b72;
  border-radius: 7px;
  color: #315c60;
}
.conversation-context[hidden] { display: none; }
.conversation-context > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #0b5559; color: #fff; font-size: 17px; }
.conversation-context div { display: flex; flex-direction: column; min-width: 0; }
.conversation-context small { color: #67817e; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.conversation-context b { overflow: hidden; color: #143f44; font: 700 12px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.conversation-context em { margin-left: auto; color: #6a807e; font-size: 10px; font-style: normal; }

button.library-card { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.conversation-card { position: relative; border-top: 3px solid #0c746d; transition: transform .18s, box-shadow .18s, border-color .18s; }
.conversation-card:hover { transform: translateY(-3px); border-color: #d1a044; box-shadow: 0 14px 30px rgba(9,47,53,.09); }
.conversation-card small { font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.conversation-card h3 { margin: 15px 0 25px; line-height: 1.35; }
.conversation-card span { display: flex; align-items: center; justify-content: space-between; color: #6a817f; font-size: 11px; }
.conversation-card span b { color: #0c746d; font-size: 17px; }

@media (max-width: 700px) {
  .document-workbench form { grid-template-columns: 1fr; }
  .document-workbench label, .document-workbench label:nth-child(3), .document-workbench .primary-btn { grid-column: 1; }
  .response-body { padding: 17px; }
  .response-masthead i, .export-actions::before { display: none; }
  .conversation-context em { display: none; }
}
