body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 2rem;
}
button {
  cursor: pointer;
}
.cite-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #0645ad;          /* standard link blue */
    cursor: pointer;
}
.cite-btn:hover {
    color: #0b0080;          /* darker blue on hover */
    text-decoration: underline;
}
/* Modal */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#modal {
  background: #fff;
  min-width: 60ch;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
#modal-header {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f8f8;
}
#close-modal {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.1rem 0.4rem;
}
#modal-body {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem 0.75rem 0.75rem;
  gap: 0.5rem;
  min-height: 15rem;
}
#tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.tab-btn {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f4f4f4;
}
.tab-btn.active {
  background: #e0e0e0;
  border-color: #999;
  font-weight: 600;
}
#toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
#current-tab-label {
  font-weight: 600;
}
#copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #777;
  background: #f5f5f5;
}
#copy-btn svg {
  width: 1em;
  height: 1em;
}
#content-wrapper {
  flex: 1;
  overflow: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
}
#tab-content {
  margin: 0;
  padding: 0.5rem;
  /* content type (pre vs html) is controlled in JS */
}
#tab-content pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
#status {
  color: #666;
  margin-top: 0.25rem;
}

