/* ================================================================
   Beard Family Genealogy Archive — shared stylesheet
   Theme matches the primary index page (index.htm), which in turn
   is a quieter companion to the trilogy site theme.
   ================================================================ */

:root {
  --paper:        #f1e9d8;
  --paper-deep:   #ebe1cc;
  --ink:          #1c1611;
  --ink-soft:     #3d3225;
  --ink-mute:     #6a5a48;
  --moss:         #2f3a23;
  --rust:         #8a3a22;
  --rule:         #b8a98a;
  --rule-soft:    #d6c9ae;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rust); text-decoration: none; border-bottom: 1px dotted var(--rule); transition: color 0.2s, border-color 0.2s; }
a:hover { color: var(--ink); border-bottom-color: var(--ink); }
a:visited { color: #6e3a29; }

/* ─────────── Trilogy cross-link banner ─────────── */
.trilogy-banner {
  background: #1c1611;
  color: #f1e9d8;
  padding: 10px 24px;
  font-size: 14px;
  border-bottom: 2px solid var(--rust);
}
.trilogy-banner a {
  color: #f1e9d8;
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: none;
}
.trilogy-banner a:hover { color: #fff; }
.trilogy-banner em { color: #c9b88a; font-style: italic; }
.trilogy-banner .right {
  float: right;
  color: #8a8270;
  font-style: italic;
}
@media (max-width: 600px) {
  .trilogy-banner .right { display: none; }
}

/* ─────────── Page shell ─────────── */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site {
  text-align: center;
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
header.site h1 {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.1;
}
header.site h1 a { color: inherit; border-bottom: none; }
header.site h1 a:hover { color: var(--rust); }
header.site .tagline {
  font-style: italic;
  color: var(--ink-mute);
  font-size: 15px;
}

nav.main {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 28px;
  padding: 22px 0 22px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 40px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
nav.main a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
nav.main a:hover {
  color: var(--rust);
  border-bottom-color: var(--rust);
}
nav.main a.current {
  color: var(--ink);
  font-weight: 700;
}

/* ─────────── Page content ─────────── */
main.content {
  margin-bottom: 60px;
}

main.content h1,
main.content h2,
main.content h3,
main.content h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
}

/* Top-of-content section heading (usually the page title for sub-pages) */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-soft);
}
.page-header .kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 700;
  margin-bottom: 10px;
}
.page-header h1 {
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
}
.page-header h1 a { border-bottom: none; color: inherit; }
.page-header h1 a:hover { color: var(--rust); border-bottom: 1px dotted var(--rust); }

main.content h2 { font-size: 22px; margin: 32px 0 14px; }
main.content h3 { font-size: 18px; margin: 24px 0 12px; font-weight: 700; letter-spacing: 0.02em; }
main.content h4 { font-size: 16px; margin: 20px 0 10px; font-weight: 700; }

main.content p {
  margin-bottom: 1em;
  color: var(--ink-soft);
}
main.content p b,
main.content p strong { color: var(--ink); }

main.content blockquote {
  border-left: 3px solid var(--rust);
  padding: 6px 0 6px 20px;
  margin: 20px 0 20px 10px;
  font-style: italic;
  color: var(--ink-soft);
}
main.content blockquote p { margin-bottom: 0.6em; }
main.content blockquote p:last-child { margin-bottom: 0; }

main.content ul, main.content ol { margin: 0 0 1em 20px; color: var(--ink-soft); }
main.content li { margin-bottom: 6px; }

main.content hr {
  border: 0;
  border-top: 1px solid var(--rule-soft);
  margin: 28px 0;
}

main.content img {
  max-width: 100%;
  height: auto;
  background: var(--paper-deep);
  box-shadow: 0 8px 22px -14px rgba(40,28,12,0.4);
  margin: 8px 0;
}
main.content img[align="right"],
main.content img.right {
  float: right;
  margin: 4px 0 12px 22px;
  max-width: 45%;
}
main.content img[align="left"],
main.content img.left {
  float: left;
  margin: 4px 22px 12px 0;
  max-width: 45%;
}
main.content figure { margin: 22px 0; }
main.content figcaption {
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  text-align: center;
  margin-top: 8px;
}

/* ─────────── Tables (genealogy vitals, children, references, etc.) ─────────── */
main.content table {
  border-collapse: collapse;
  margin: 16px 0 22px;
  width: 100%;
  max-width: 820px;
  font-size: 15px;
  background: var(--paper);
}
main.content table table { margin: 0; }   /* nested tables: no extra spacing */
main.content table td,
main.content table th {
  border: 1px solid var(--rule-soft);
  padding: 8px 12px;
  vertical-align: top;
  color: var(--ink-soft);
}
main.content table th {
  background: var(--paper-deep);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}
main.content table b,
main.content table strong { color: var(--ink); }
/* zebra striping for long tables (references, children lists) */
main.content table tbody tr:nth-child(even) > td { background: rgba(235,225,204,0.35); }
/* but disable zebra inside nested wrapper tables */
main.content table table tbody tr:nth-child(even) > td { background: transparent; }

/* Bio page: biography header block (name + "Biography of") */
.bio-title {
  margin: 0 0 24px;
}
.bio-title .kicker {
  display: block;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 700;
  margin-bottom: 6px;
}
.bio-title h1 {
  font-size: 34px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
}
.bio-title h1 a { color: inherit; border-bottom: none; }
.bio-title h1 a:hover { color: var(--rust); }

/* Notes / references heading above each lower table */
.section-label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 700;
  margin: 28px 0 10px;
}

/* Photographs and galleries — any full-width image block */
.photo-block {
  margin: 30px 0;
}

/* ─────────── Footer ─────────── */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 24px 0 30px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
footer.site .nav-links {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.10em;
}
footer.site .nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 10px;
  border-bottom: none;
}
footer.site .nav-links a:hover { color: var(--rust); }
footer.site .copy { margin-top: 6px; }
footer.site .trilogy-link {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
footer.site .trilogy-link:hover {
  color: var(--rust);
  border-color: var(--rust);
}

/* utility */
.clearfix::after { content: ""; display: table; clear: both; }
