#pdf-dialog {
  box-sizing: border-box;
  width: min(1100px, calc(100% - 24px));
  height: calc(100% - 24px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #dce0e6;
  border-radius: 10px;
  background: #fff;
  color: #1e2630;
}
#pdf-dialog[open] { display: flex; flex-direction: column; }
#pdf-dialog::backdrop { background: rgb(24 31 40 / 55%); }
.pdf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #dce0e6; }
.pdf-file-heading { flex: 1 1 230px; min-width: 0; }
#pdf-title { overflow-wrap: anywhere; font-size: .9rem; font-weight: 650; margin: 0; }
#pdf-date { margin: 3px 0 0; font-size: .75rem; color: #555f6d; }
#pdf-date:empty { display: none; }
.pdf-close { margin-left: auto; }
.pdf-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.pdf-bar button, .pdf-bar select, .pdf-bar a {
  box-sizing: border-box; min-height: 34px; padding: 6px 10px; font: inherit; font-size: .8rem;
  border: 1px solid #dce0e6; border-radius: 6px; background: white; color: #1e2630;
}
.pdf-bar a { text-decoration: none; display: flex; align-items: center; }
.pdf-bar :is(button, a, select):not(:disabled) { cursor: pointer; }
.pdf-bar button:disabled { color: #69727d; background: #f4f5f7; }
#pdf-page-label { min-width: 72px; text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; }
#pdf-status:not(:empty) { padding: 9px 12px; font-size: .85rem; }
.pdf-scroll-area { position: relative; flex: 1 1 0; min-height: 0; }
#pdf-viewport { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; background: #e8ebef; }
#pdf-pages { --page-margin: 12px auto; --page-border: 0; }
#pdf-pages .page { box-shadow: 0 1px 4px rgb(0 0 0 / 18%); }
#pdf-pages .textLayer .highlight.selected { background-color: rgb(255 205 45 / 62%); }

#citation-dialog {
  box-sizing: border-box;
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 20px;
  border: 1px solid #dce0e6;
  border-radius: 10px;
  color: #1e2630;
  background: white;
}
#citation-dialog::backdrop { background: rgb(24 31 40 / 55%); }
#citation-title { overflow-wrap: anywhere; font-size: 1rem; margin: 0; }
#citation-date { margin: 4px 0 0; font-size: .8rem; color: #555f6d; }
#citation-date:empty { display: none; }
#citation-quote {
  margin: 16px 0; padding: 12px 14px; border-left: 3px solid #a4aebd; background: #f5f7fa;
  font-size: .95rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.citation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.citation-actions form { margin-left: auto; }
.citation-actions :is(button, a) {
  box-sizing: border-box; padding: 8px 11px; font: inherit; font-size: .85rem;
  border: 1px solid #dce0e6; border-radius: 6px; color: #1e2630; background: white;
  text-decoration: none; cursor: pointer;
}
#citation-pdf, #citation-link { background: #27394c; border-color: #27394c; color: white; }
