/* Scoped to the XML content entry point; genealogy displays keep their layout. */
.site-page .source-meta { margin: .35em 0; color: #53696b; }
.site-page .fund-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); gap: 24px; padding: 24px 0; border-top: 1px solid #d7ccba; }
.site-page .fund-description { min-width: 0; line-height: 1.65; }
.site-page .fund-images { display: grid; gap: 16px; align-content: start; }
.site-page .fund-images a { display: block; }
.site-page .fund-images img { display: block; width: auto; max-width: 100%; max-height: 440px; margin: auto; object-fit: contain; }
.site-page .enlarge-label { display: block; padding: 10px 0; text-align: center; text-decoration: underline; }
.site-page .fund-question { padding: 10px 12px; border-left: 3px solid #285c68; background: #f5eddf; }
.site-page .contact-address { margin: 12px 0 24px; }
/* Keep dates and labels readable in the main biography table. */
.site-page .biography-article .Brief > table.hidden > tbody > tr > td:first-child:not([colspan]) {
  min-width: clamp(6rem, 22vw, 9rem);
  overflow-wrap: normal;
}
.site-page.reading-page .site-main-grid { grid-template-columns: minmax(0, 1fr); }
.site-page.reading-page .site-content { width: 100%; max-width: 96ch; justify-self: center; }
.site-page.reading-page .site-article { font-size: 17px; line-height: 1.7; padding: clamp(16px, 3vw, 32px); overflow-wrap: normal; }
.site-page.reading-page .site-article p { line-height: 1.7; margin: .5em 0 1em; }
.site-page.reading-page .site-article :is(.Brief, .din-a4, .din-a5) { box-sizing: border-box; width: auto; max-width: 70ch; margin: 0 auto; padding: 0; font-size: inherit; line-height: inherit; }
.site-page.reading-page .site-article > :is(p, ul, ol, section, h2, h3) { max-width: 70ch; margin-left: auto; margin-right: auto; }
.site-page.reading-page .site-article :is(h2, h3, h4) { margin-top: 1.25em; line-height: 1.35; }
.site-page.reading-page .site-article table { width: max-content; min-width: 42rem; max-width: none; border-collapse: collapse; overflow-wrap: normal; }
.site-page.reading-page .site-article :is(td, th) { padding: 8px 10px; word-break: normal; overflow-wrap: normal; }
.site-page.reading-page .site-article th, .site-page.reading-page .site-article .right { white-space: nowrap; }
.site-page .source-table-scroll { overflow-x: auto; max-width: 100%; margin: 12px 0; border: 1px solid #d7ccba; border-radius: 4px; }
.site-page .source-table-scroll:focus-visible { outline: 3px solid #285c68; outline-offset: 3px; }
.site-page .table-hint { color: #53696b; font-size: .85em; }
.site-page .chapter-navigation { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin: 8px 0 24px; font: 15px/1.4 Arial, sans-serif; }
.site-page .chapter-navigation :is(a, span) { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; border: 1px solid #d7ccba; border-radius: 6px; }
.site-page .chapter-navigation span { color: #53696b; }
.site-page .chapter-overview summary { cursor: pointer; padding: 8px 0; font-weight: bold; }
.site-page .chapter-overview a { display: inline-block; padding: 8px 0; }
.site-page :is([id], a[name]) { scroll-margin-top: 20px; }
@media (max-width: 650px) {
  .site-page .fund-item { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .site-page .fund-images img { max-height: none; }
  .site-page .chapter-navigation { grid-template-columns: 1fr; gap: 8px; }
  .site-page.reading-page .site-article { padding: 16px; font-size: 16px; }
}
@media print { .site-page .chapter-overview, .site-page .chapter-navigation, .site-page .table-hint { display: none; } .site-page .source-table-scroll { overflow: visible; } }

.marriage-register-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.marriage-register-scroll:focus-visible {
  outline: 3px solid #285c68;
  outline-offset: -3px;
}
.site-article .marriage-register-scroll > table.marriage-register {
  width: 100%;
  min-width: 33rem;
  max-width: none;
  table-layout: fixed;
  border-collapse: collapse;
}
.site-article .marriage-register-scroll > table.marriage-register :is(th, td) {
  box-sizing: border-box;
  padding: 6px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}
.marriage-register th:nth-child(1) { width: 17%; }
.marriage-register th:nth-child(2) { width: 7rem; }
.marriage-register th:nth-child(n+5) { width: 3rem; }

@media print {
  .site-article .marriage-register-scroll > table.marriage-register { min-width: 0; }
}

.site-page.reading-page .site-article table.historical-source-table {
  width: 100%;
  min-width: 28rem;
  table-layout: fixed;
}
.site-page.reading-page .site-article .historical-source-table :is(th, td) {
  box-sizing: border-box;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}
.historical-source-table th:first-child { width: 28%; }
.historical-source-table th:last-child,
.historical-source-table-with-volume th:nth-last-child(2) { width: 3.5rem; }

@media print {
  .site-page.reading-page .site-article table.historical-source-table { min-width: 0; }
}
