:root {
    --ink: #2b2420;
    --ink-soft: #5c5147;
    --paper: #faf7f2;
    --paper-raised: #ffffff;
    --line: #e2d9cb;
    --accent: #7a2e2e;
    --accent-soft: #f1e4e4;
    --muted: #9a9088;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

.wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    margin: 0 0 0.3em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper-raised);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}
.site-header .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--ink);
}
.site-header .brand-mark { display: block; border-radius: 4px; }
.site-header nav a {
    margin-left: 20px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--accent); }

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 20px 0 40px;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

main.wrap { padding-top: 36px; padding-bottom: 40px; }

.hero-crest { text-align: center; margin-bottom: 12px; }
.hero-banner { max-width: 420px; width: 100%; height: auto; }

.page-header { margin-bottom: 28px; }
.page-header .subtitle { color: var(--ink-soft); margin-top: 4px; }

/* Pedigree (direct line) */
.pedigree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.pedigree-node {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 22px;
    width: 100%;
    max-width: 520px;
    text-align: center;
}
.pedigree-node .gen-tag {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.pedigree-node .name {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    margin: 4px 0;
}
.pedigree-node .dates { color: var(--ink-soft); font-size: 0.9rem; }
.pedigree-node .spouse {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.pedigree-node .spouse .name { font-size: 1rem; color: var(--ink); }
.pedigree-connector {
    width: 2px;
    height: 28px;
    background: var(--line);
}
.lead-note {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 4px;
    padding: 2px 8px;
}

.cta {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.leads-section {
    margin-top: 40px;
    padding: 20px 26px;
    background: var(--paper-raised);
    border: 1px dashed var(--line);
    border-radius: 8px;
}
.leads-section h2 { font-size: 1.1rem; margin-bottom: 4px; }
.leads-section .subtitle { margin-top: 0; margin-bottom: 16px; font-size: 0.9rem; }
.leads-section ol { margin: 0; padding-left: 22px; }
.leads-section li { margin-bottom: 14px; line-height: 1.55; font-size: 0.94rem; color: var(--ink-soft); }
.leads-section li:last-child { margin-bottom: 0; }
.leads-section li strong { color: var(--ink); }

/* Full tree browse */
.tree-search {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-bottom: 24px;
    background: var(--paper-raised);
    color: var(--ink);
}

.generation-group { margin-bottom: 30px; }
.generation-group h2 {
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
}
.person-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}
.person-row .dates { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.tag.direct { background: var(--accent-soft); color: var(--accent); }
.tag.living { background: #eef1ea; color: #4a6b4a; }

/* Person details */
.detail-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px 28px;
}
.detail-card dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 16px;
    margin: 18px 0;
}
.detail-card dt { color: var(--muted); font-size: 0.85rem; }
.detail-card dd { margin: 0; }
.detail-card .notes {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-size: 0.92rem;
    color: var(--ink-soft);
}
.link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a {
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .detail-card dl { grid-template-columns: 100px 1fr; }
}
