.site-body #copyResults {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 420px));
  align-items: start;
  gap: 24px;
}

.site-body .copy-result-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #091329 !important;
  border-color: #284e7c !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgb(0 0 0 / 16%) !important;
  transition: border-color 160ms ease;
}

.site-body .copy-result-card:hover,
.site-body .copy-result-card:focus-within {
  border-color: #5b8fca !important;
}

.copy-result-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.copy-result-open:focus-visible {
  outline: 2px solid #82c9ff;
  outline-offset: -4px;
}

.copy-result-preview {
  display: flex;
  height: 234px;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: #0d1930;
  overflow: hidden;
}

.copy-result-preview svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #9baec9;
}

.copy-result-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  color: #c0cde0;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-result-info {
  display: grid;
  gap: 8px;
  padding: 18px 16px 0;
}

.copy-result-info h3 {
  margin: 0;
  overflow: hidden;
  color: #edf3ff;
  font-size: 16px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-result-title { cursor: text; }
.copy-title-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #82c9ff;
  border-radius: 4px;
  padding: 3px 7px;
  outline: 0;
  background: #0d1930;
  color: #edf3ff;
  font: inherit;
}

.copy-result-model {
  overflow: hidden;
  color: #a1b4ce;
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-result-footer {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.copy-result-footer time {
  color: #a1b4ce;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.site-body .copy-result-footer .btn,
.site-body .copy-result-dialog .copy-item-actions .btn {
  min-height: 40px;
  padding: 8px 12px;
}

.copy-result-dialog {
  width: min(1100px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #284e7c;
  border-radius: 14px;
  background: #091329;
  color: #edf3ff;
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.copy-result-dialog::backdrop { background: rgb(2 6 18 / 78%); }
.site-body .copy-result-dialog .copy-item { border: 0; border-radius: 0 !important; }
.site-body .copy-result-dialog .copy-document { display: block; height: min(70dvh, 720px); }
.site-body .copy-result-dialog .copy-document-main { height: 100%; }

@media (max-width: 640px) {
  .site-body #copyResults { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .copy-result-preview { height: 210px; padding: 20px; }
  .copy-result-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .site-body .copy-result-dialog .copy-document { height: auto; }
  .site-body .copy-result-dialog .copy-document-main { height: 48dvh; min-height: 0; }
  .site-body .copy-result-dialog .copy-item-head { gap: 12px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-body .copy-result-card { transition: none; }
  .site-body .copy-result-dialog .copy-document-main { scroll-behavior: auto; }
}
