body {
    margin: 0;
    font-family: Arial, sans-serif;
}

header {
    background: #2e4a3d;
    color: #fff;
    padding: 1rem;
}

header nav a {
    margin: 0 1rem;
    color: #fff;
    text-decoration: none;
}

.hero {
    background: url('../images/hero-bg.jpg') center / cover no-repeat;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.container {
    width: 90%;
    margin: 0 auto;
    padding: 2rem 0;
}

.btn {
    padding: 1rem 2rem;
    background: #8b6f47;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.footer, footer {
    text-align: center;
    padding: 1rem 0;
    background: #eee;
}

form {
    max-width: 600px;
}

.form-field {
    display: block;
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 0.6rem;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-actions {
    margin-top: 1.5rem;
}

button {
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    cursor: pointer;
}
.poetry-toc {
    margin: 2rem 0 3rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    background: #faf8f4;
}

.poetry-toc h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.poetry-toc ol {
    columns: 2;
    column-gap: 2rem;
    padding-left: 1.2rem;
}

.poetry-toc li {
    margin-bottom: 0.4rem;
}

.poetry-toc a {
    text-decoration: none;
}

.poetry-toc a:hover {
    text-decoration: underline;
}

article {
    margin-bottom: 3rem;
}

article h3 {
    scroll-margin-top: 6rem; /* fixes anchor jump under header */
}
.descendants {
    max-width: 900px;
}

.portrait {
    max-width: 420px;
    margin: 2rem auto;
    text-align: center;
}

.portrait img {
    width: 100%;
    height: auto;
    border: 6px solid #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.portrait figcaption {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
}
.tree-wrapper {
    overflow-x: auto;
    padding: 2rem 0;
}

.family-tree,
.family-tree ul {
    padding-top: 20px;
    position: relative;
}

.family-tree ul {
    padding-left: 0;
}

.family-tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 10px 0 10px;
}

/* lines */
.family-tree li::before,
.family-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 1px solid #999;
    width: 50%;
    height: 20px;
}

.family-tree li::after {
    right: auto;
    left: 50%;
    border-left: 1px solid #999;
}

.family-tree li:only-child::after,
.family-tree li:only-child::before {
    display: none;
}

.family-tree li:only-child {
    padding-top: 0;
}

.family-tree li:first-child::before,
.family-tree li:last-child::after {
    border: 0 none;
}

.family-tree li:last-child::before {
    border-right: 1px solid #999;
    border-radius: 0 5px 0 0;
}

.family-tree li:first-child::after {
    border-radius: 5px 0 0 0;
}

/* vertical line */
.family-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 1px solid #999;
    width: 0;
    height: 20px;
}

/* person card */
.person {
    border: 1px solid #aaa;
    padding: 0.6rem 0.8rem;
    background: #fff;
    display: inline-block;
    font-size: 0.85rem;
    line-height: 1.3;
    max-width: 200px;
}

.person.root {
    font-size: 0.95rem;
    font-weight: 600;
}

.person.small {
    font-size: 0.75rem;
}
.lead {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.author {
    margin-top: 2rem;
    font-style: italic;
}
