.summary-reference {
  display: inline;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.summary-reference .ai-chat-reference-number, .summary-reference.ai-chat-reference-number {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: super;
  background-color: var(--gentle-blue);
}
.summary-reference + .summary-reference {
  margin-left: 0.35rem;
}

.summary-reference-line {
  margin-bottom: 2rem;
}
.summary-reference-line .summary-reference:first-of-type {
  margin-left: 0.35rem;
}

.document-chunk-preview {
  position: fixed;
  z-index: 1000;
  width: min(34rem, 100vw - 2rem);
  max-height: min(28rem, 100vh - 2rem);
  padding: 1rem;
  overflow: auto;
  color: #000;
  background: #fff;
  border: 1px solid #6b7280;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.document-chunk-preview-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #d1d5db;
}
.document-chunk-preview-title {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.document-chunk-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
  font-size: 1rem;
}
.document-chunk-preview-field {
  display: inline-flex;
  align-items: center;
}
.document-chunk-preview-text {
  min-width: 0;
}
.document-chunk-preview p,
.document-chunk-preview h1,
.document-chunk-preview h2,
.document-chunk-preview h3,
.document-chunk-preview h4,
.document-chunk-preview h5,
.document-chunk-preview h6 {
  margin: 0 0 0.75rem;
}
.document-chunk-preview p:empty {
  min-height: 0.75rem;
}
.document-chunk-preview ul,
.document-chunk-preview ol {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
}
.document-chunk-preview table {
  width: 100%;
  margin-bottom: 0.75rem;
  border-collapse: collapse;
}
.document-chunk-preview th,
.document-chunk-preview td {
  padding: 0.5rem;
  border: 1px solid #9ca3af;
  text-align: left;
  vertical-align: top;
}
.document-chunk-preview th {
  background: #f3f4f6;
}
