/* Genealogy live results — page-only, does not change the shared library catalog styles. */
.genealogy-live-results {
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.genealogy-live-results[hidden] { display: none; }
.genealogy-live-results > #pension-results[hidden],
.genealogy-live-results > #deep-links[hidden] { display: none; }
.genealogy-live-results > #deep-links { margin: 0; }

.source-group {
  background: var(--card, #fbf6ea);
  border: 1px solid var(--rule, #d9c89a);
  box-shadow: var(--shadow, none);
}
.source-group > summary {
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  font-family: var(--display, inherit);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--navy, #1b2a4a);
}
.source-group > summary::-webkit-details-marker { color: var(--gold, #c4a35a); }
.source-group .count {
  font-family: var(--serif, inherit);
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--ink-soft, #4a4336);
  font-weight: normal;
}
.source-body {
  padding: 0 0.9rem 1rem;
  border-top: 1px solid var(--rule, #d9c89a);
}
.source-body .fulltext-results { margin: 0.6rem 0 0; }
.source-body .fulltext-results-inner {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.source-hits {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}
.source-hit {
  border-top: 1px solid var(--rule, #d9c89a);
  padding: 0.7rem 0 0.75rem;
}
.source-hit:first-child { border-top: 0; padding-top: 0.55rem; }
.source-hit h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  color: var(--navy, #1b2a4a);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.source-hit h3 a { color: inherit; }
.source-hit .meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft, #4a4336);
  overflow-wrap: anywhere;
}
.source-hit .source-label { display: block; margin-top: 0.15rem; }
.source-unavailable,
.source-empty {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft, #4a4336);
}
.source-more {
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
}
.source-more a { margin-right: 0.9rem; white-space: normal; }

#deep-links li,
#deep-links .muted { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .genealogy-fields { grid-template-columns: 1fr; }
  .genealogy-search button { width: 100%; justify-self: stretch; }
  .source-group > summary { font-size: 1rem; padding: 0.75rem 0.8rem; }
  .source-body { padding: 0 0.8rem 0.9rem; }
  .page-jump ul { gap: 0.35rem 0.85rem; }
}

/* Pre-existing long official URLs in the reference lists can stretch the
   flex column on a phone; keep the layout within the viewport. */
@media (max-width: 900px) {
  .columns,
  .col-main,
  .prose,
  .genealogy-live-results,
  #search-results {
    min-width: 0;
    max-width: 100%;
  }
  .prose a,
  #deep-links,
  #reference-body,
  .source-hit,
  .fulltext-hit {
    overflow-wrap: anywhere;
  }
}
