#sources-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: min(31rem, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid var(--brand-rule, #d6dae0);
  background: var(--brand-paper, #f8f9fb);
  color: var(--brand-ink, #20252c);
  font-family: var(--sans, system-ui);
  overflow: hidden;
}
#sources-dialog[open] { display: flex; flex-direction: column; }
#sources-dialog::backdrop { background: rgb(18 23 30 / 58%); }
.source-library-head, .source-library-credit {
  padding: 1.15rem clamp(1.2rem, 3vw, 2rem);
  flex: none;
}
.source-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--brand-rule, #d6dae0);
}
#sources-title { margin: 0; font: 550 1.45rem/1.2 var(--sans, system-ui); letter-spacing: -.035em; }
#close-sources {
  padding: .65rem .9rem;
  border: 1px solid var(--brand-rule, #d6dae0);
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.source-library-list {
  list-style: none;
  margin: 0;
  padding: 0 clamp(1.2rem, 3vw, 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.source-library-list li + li { border-top: 1px solid var(--brand-rule, #d6dae0); }
.source-library-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .95rem .15rem;
  gap: 1rem;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.source-library-copy { display: grid; gap: .25rem; }
.source-library-meta { color: #536071; font-size: .78rem; }
.source-library-copy strong { font: 560 1.05rem/1.25 var(--sans, system-ui); }
.source-library-extract { font: 400 .91rem/1.4 var(--sans, system-ui); color: #46515f; }
.source-arrow {
  flex: none;
  width: .48rem;
  height: .48rem;
  margin-right: .45rem;
  border: solid var(--brand-action, #294e7a);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.source-library-credit a { color: var(--brand-action, #294e7a); }
.source-library-pick:hover strong { text-decoration: underline; text-underline-offset: .18em; }
#sources-dialog :focus-visible { outline: 2px solid var(--brand-action, #294e7a); outline-offset: -2px; }
.source-library-credit { margin: auto 0 0; font-size: .78rem; color: #536071; border-top: 1px solid var(--brand-rule, #d6dae0); }
@media (max-width: 620px) {
  #sources-dialog {
    inset: auto 0 0;
    width: 100%;
    height: min(87dvh, 43rem);
    border: 0;
    border-radius: 1rem 1rem 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
