/* Malott.net — ledger-paper genealogy site
   Edit colors and fonts in :root. The build script never overwrites this file. */

:root {
  --paper: #f3efe6;
  --panel: #faf7f0;
  --ink: #262220;
  --soft: #6b5f4d;
  --rule: #cabf9f;
  --river: #8a1723;
  --river-deep: #601019;
  --wash: #ecdfc2;
  --gold: #b9932f;
  --gold-deep: #8a6d21;
  --steel: #6c757e;
  --serif: 'IM Fell English', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}

a { color: var(--river); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--river-deep); text-decoration-thickness: 2px; }
a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--river);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.2rem; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: var(--measure); }
.muted { color: var(--soft); }
.small { font-size: 0.9rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- Banner (every page; larger on the home page) ---------- */
.site-banner { background: var(--river-deep); text-align: center; padding: 1.15rem 0; }
.site-banner .wrap { display: flex; flex-direction: column; align-items: center; }
.banner-crest { display: block; height: 2.6rem; width: auto; margin: 0 0 0.35rem; filter: brightness(1.12); }
.banner-title { font-family: var(--serif); font-size: 1.5rem; color: var(--paper); text-decoration: none; line-height: 1; }
.banner-title:hover { color: var(--wash); }
.site-banner--home { padding: clamp(2.2rem, 7vw, 4rem) 0 clamp(1.8rem, 5vw, 3rem); }
.site-banner--home .banner-crest { height: 8rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .site-banner--home .banner-crest { height: 11rem; } }
.site-banner--home .banner-title { font-size: 2.6rem; }

/* ---------- Layout: left-hand nav column + content column ---------- */
.layout { width: min(72rem, 100% - 2.5rem); margin-inline: auto; display: flex; align-items: flex-start; gap: 2.5rem; padding-top: 1.7rem; }
.side-nav { flex: 0 0 10.5rem; display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.95rem; position: sticky; top: 1.4rem; }
.side-nav a { color: var(--ink); text-decoration: none; padding: 0.4rem 0.6rem; border-left: 3px solid transparent; border-radius: 0 3px 3px 0; }
.side-nav a:hover { background: var(--panel); border-left-color: var(--rule); }
.side-nav a[aria-current="page"] { border-left-color: var(--river); color: var(--river); font-weight: 600; background: var(--panel); }
.content { flex: 1 1 0%; min-width: 0; }
.content .wrap { width: 100%; margin-inline: 0; }
@media (max-width: 42rem) {
  .layout { flex-direction: column; gap: 0.3rem; padding-top: 1.2rem; }
  .side-nav {
    flex-direction: row; flex-wrap: wrap; width: 100%; position: static;
    gap: 0.2rem 1.1rem; padding-bottom: 0.9rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--rule);
  }
  .side-nav a { padding: 0.2rem 0; border-left: none; border-bottom: 2px solid transparent; border-radius: 0; }
  .side-nav a:hover { background: none; border-bottom-color: var(--rule); }
  .side-nav a[aria-current="page"] { background: none; border-bottom-color: var(--river); }
}

.preview-banner {
  background: var(--ink); color: var(--paper); text-align: center; padding: 0.5rem 1rem; font-size: 0.9rem;
}

/* ---------- Home hero ---------- */
.hero { padding: 0 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 { max-width: 20ch; }
.hero .lead { font-size: 1.2rem; max-width: 40ch; margin: 1.3rem 0 2rem; color: var(--soft); }
.searchbox { max-width: 34rem; }
.searchbox label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.searchbox input {
  width: 100%; font: inherit; font-size: 1.15rem; padding: 0.7rem 0.9rem;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--ink); border-bottom-width: 3px; border-radius: 0;
}
.searchbox input::placeholder { color: var(--soft); }
.results { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--rule); border-top: 0; }
.results:empty { display: none; }
.results li { border-bottom: 1px solid var(--rule); }
.results li:last-child { border-bottom: 0; }
.results a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.9rem; text-decoration: none; color: var(--ink); }
.results a:hover, .results a:focus-visible { background: var(--wash); }
.results .r-life { color: var(--soft); white-space: nowrap; font-size: 0.92rem; }
.results .none { padding: 0.6rem 0.9rem; color: var(--soft); }

/* ---------- Sections ---------- */
.band { border-top: 1px solid var(--rule); padding: clamp(2rem, 5vw, 3.5rem) 0; }
.band > .wrap > h2:first-child { margin-bottom: 0.4rem; }
.band .intro { color: var(--soft); max-width: var(--measure); margin-bottom: 1.6rem; }

.lines-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 4rem; }
.line-head h3 a { color: var(--ink); text-decoration: none; }
.line-head h3 a:hover { color: var(--river); text-decoration: underline; }
.line-head p { color: var(--soft); margin: 0.2rem 0 0; font-size: 0.97rem; }

/* Line of descent: a vertical spine, oldest at the top */
.spine { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.spine li {
  display: grid; grid-template-columns: 5.6rem 1.6rem 1fr; column-gap: 0.4rem;
  position: relative; padding-bottom: 1.15rem;
}
.spine li::before {
  content: ""; position: absolute; top: 0.95rem; bottom: -0.35rem;
  left: calc(5.6rem + 0.4rem + 0.8rem - 1px); width: 2px; background: var(--rule);
}
.spine li:last-child::before { display: none; }
.spine .yr {
  font-family: var(--serif); font-size: 1.55rem; line-height: 1.25; text-align: right; white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
.spine .dot { position: relative; }
.spine .dot::after {
  content: ""; position: absolute; left: 50%; top: 0.62rem; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--ink); border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
}
.spine li:last-child .dot::after { background: var(--river); box-shadow: 0 0 0 1px var(--river); }
.spine.trunk li:last-child .dot::after { background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.spine.trunk li:last-child::before { display: block; bottom: -0.2rem; background: linear-gradient(var(--rule), transparent); }
.spine .who a { font-size: 1.1rem; font-weight: 500; }
.spine .where { display: block; color: var(--soft); font-size: 0.92rem; }
.spine .span { color: var(--soft); font-size: 0.92rem; }
.spine-note { color: var(--soft); font-size: 0.92rem; margin: 0.2rem 0 0 6.4rem; }

.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem 4rem; }

/* ---------- Tables (family index, events) ---------- */
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
table.plain thead th { font-weight: 600; font-size: 0.9rem; color: var(--soft); border-bottom: 2px solid var(--ink); }
table.plain td.num, table.plain th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.plain td:first-child { font-family: var(--serif); font-size: 1.25rem; }

.place-list { list-style: none; margin: 0; padding: 0; }
.place-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); padding: 0.5rem 0; }
.place-list .count { color: var(--soft); font-variant-numeric: tabular-nums; }

/* ---------- Page titles ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.2rem; }
.page-head p { color: var(--soft); max-width: var(--measure); margin: 0.8rem 0 0; font-size: 1.1rem; }

/* ---------- People index ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin: 0.5rem 0 1.5rem; }
.filter .searchbox { flex: 1 1 20rem; }
.filter .count { color: var(--soft); padding-bottom: 0.7rem; }
.jump { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.family-group { margin-bottom: 2.2rem; scroll-margin-top: 1rem; }
.family-group h2 { border-bottom: 2px solid var(--ink); padding-bottom: 0.3rem; display: flex; justify-content: space-between; align-items: baseline; }
.family-group h2 .n { font-family: var(--sans); font-size: 0.95rem; color: var(--soft); }
.plist { list-style: none; margin: 0; padding: 0; columns: 2 22rem; column-gap: 3rem; }
.plist li { break-inside: avoid; border-bottom: 1px solid var(--rule); padding: 0.5rem 0; display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; }
.plist .life { color: var(--soft); font-size: 0.92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plist .birthplace { grid-column: 1 / -1; color: var(--soft); font-size: 0.88rem; }
[hidden] { display: none !important; }

/* ---------- Person page ---------- */
.back { display: inline-block; margin-top: 1.6rem; font-size: 0.95rem; }
.person-head { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem 2rem; align-items: start; padding: 1.2rem 0 2rem; }
.portrait {
  width: 9.5rem; aspect-ratio: 4 / 5; background: var(--panel); border: 1px solid var(--rule);
  display: grid; place-items: center; overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait .mono { font-family: var(--serif); font-size: 3rem; color: var(--soft); letter-spacing: 0.02em; }
.person-head .life { font-family: var(--serif); font-size: 1.5rem; margin: 0.5rem 0 0.9rem; color: var(--soft); }
.person-head .lede { max-width: 52ch; margin-bottom: 0.5rem; }
.person-head .aka { color: var(--soft); font-size: 0.93rem; }

.person-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2.5rem 4rem; padding-bottom: 4rem; }
.person-grid h2 { font-size: 1.6rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.3rem; margin: 0 0 0.4rem; }
.person-grid section + section, .person-grid aside section + section { margin-top: 2.2rem; }
table.events { width: 100%; border-collapse: collapse; }
table.events th, table.events td { text-align: left; vertical-align: baseline; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
table.events th { font-weight: 600; width: 8.5rem; }
table.events td.when { white-space: nowrap; width: 11rem; font-variant-numeric: tabular-nums; }
table.events .detail { display: block; color: var(--soft); font-size: 0.92rem; }

.family dl { margin: 0; }
.family dt { font-weight: 600; margin-top: 1rem; font-size: 0.95rem; color: var(--soft); }
.family dd { margin: 0.15rem 0 0; }
.family ul { list-style: none; padding: 0; margin: 0; }
.family li { padding: 0.15rem 0; }
.family .yrs { color: var(--soft); font-size: 0.9rem; margin-left: 0.3rem; }
.private { color: var(--soft); font-style: italic; }

.pedigree { margin: 0; }
.pedigree dt { font-weight: 600; font-size: 0.95rem; color: var(--soft); margin-top: 0.9rem; }
.pedigree dd { margin: 0.15rem 0 0; }
.pedigree ul { list-style: none; margin: 0; padding: 0; }
.pedigree li { padding: 0.1rem 0; }

ul.records { list-style: none; padding: 0; margin: 0; }
ul.records li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
ul.records .cite { display: block; color: var(--soft); font-size: 0.9rem; overflow-wrap: anywhere; }

/* ---------- Descendant outline ---------- */
.outline, .outline ul { list-style: none; margin: 0; padding: 0; }
.outline ul { margin-left: 0.55rem; padding-left: 1.1rem; border-left: 2px solid var(--rule); }
.outline li { padding: 0.28rem 0; }
.outline details > summary { cursor: pointer; }
.outline summary::marker { color: var(--river); }
.outline .life, .outline .spouse { color: var(--soft); font-size: 0.92rem; margin-left: 0.4rem; }
.outline .private { margin-left: 0; font-size: 0.92rem; }
.outline .leaf { padding-left: 1.05rem; }

/* ---------- Places & Records ---------- */
.region { margin-bottom: 2.4rem; }
.region h2 { border-bottom: 2px solid var(--ink); padding-bottom: 0.3rem; display: flex; justify-content: space-between; align-items: baseline; }
.region h2 .n { font-family: var(--sans); font-size: 0.95rem; color: var(--soft); }
.locality { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.locality strong { font-weight: 600; }
.locality .who { display: block; color: var(--soft); font-size: 0.93rem; margin-top: 0.1rem; }
.locality .who a { color: var(--river); }

.cem-map { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--panel); margin: 1.4rem 0; }
.cem-map img, .cem-map svg { display: block; width: 100%; max-width: 620px; height: auto; margin: 0 auto; }
.cem-map svg a.cem-link:focus { outline: 2px solid var(--river); outline-offset: 1px; }
.cem-map .cap { padding: 0.8rem 1.1rem 1.1rem; font-size: 0.92rem; color: var(--soft); }
.cem-town { padding: 1rem 0; border-top: 1px solid var(--rule); }
.cem-town h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; margin: 0 0 0.5rem; }
.cem-town h3 .n { font-family: var(--sans); font-weight: 400; color: var(--soft); font-size: 0.88rem; margin-left: 0.6rem; }
.cem-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.4rem; }
.cem-list li { break-inside: avoid; padding: 0.15rem 0; font-size: 0.98rem; }
.cem-list .soft { color: var(--soft); font-size: 0.86rem; font-style: italic; }
@media (max-width: 640px) { .cem-list { columns: 1; } }

.stone-section { padding: 1.4rem 0 0.4rem; }
.stone-section > p { color: var(--soft); max-width: var(--measure); margin: 0.4rem 0 0; }
.stone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.6rem; margin: 1.4rem 0 2.4rem; }
.stone-card { border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); overflow: hidden; }
.stone-card .shot { display: flex; align-items: center; justify-content: center; height: 13rem; background: #d9d3c2; }
.stone-card .shot img { max-width: 100%; max-height: 100%; display: block; }
.stone-card .cap { padding: 0.8rem 1rem 1rem; }
.stone-card h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin: 0 0 0.3rem; }
.stone-card .reads { font-size: 0.86rem; color: var(--soft); font-style: italic; margin: 0 0 0.5rem; }
.stone-card .match { font-size: 0.9rem; }
.stone-card .match.confirmed { color: var(--river-deep); }
.stone-card .match.lead { color: var(--gold-deep); }
.stone-card .match.none { color: var(--soft); }
.stone-jump { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 1rem 0 0; font-size: 0.94rem; }

.source { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.source h3 { font-size: 1.2rem; }
.source .by { color: var(--soft); font-size: 0.92rem; }
.source .who { display: block; font-size: 0.93rem; margin-top: 0.3rem; }

.placeholder { background: var(--wash); border-left: 4px solid var(--river); padding: 0.9rem 1.1rem; max-width: var(--measure); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 1.6rem 0 2.4rem; color: var(--soft); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.site-footer p { margin: 0; max-width: 60ch; }

/* ---------- Small screens ---------- */
@media (max-width: 52rem) {
  .lines-grid, .two-col, .person-grid { grid-template-columns: 1fr; }
  .person-head { grid-template-columns: 1fr; }
  .portrait { width: 7.5rem; }
  table.events th { width: 6.5rem; }
  table.events td.when { white-space: normal; width: auto; }
}
@media (max-width: 34rem) {
  table.events, table.events tbody, table.events tr, table.events th, table.events td { display: block; width: auto !important; }
  table.events tr { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  table.events th, table.events td { border: 0; padding: 0; }
  .spine li { grid-template-columns: 4.6rem 1.6rem 1fr; }
  .spine li::before { left: calc(4.6rem + 0.4rem + 0.8rem - 1px); }
  .spine .yr { font-size: 1.3rem; }
  .spine-note { margin-left: 6.6rem; }
}

@media print {
  .side-nav, .searchbox, .skip, .preview-banner { display: none !important; }
  .layout { display: block; }
  body { background: #fff; }
}

/* ---------- History, Legends and Lore ---------- */
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--river); margin: 0 0 0.5rem; }
.page-head .kicker { color: var(--river); font-size: 0.8rem; margin: 0 0 0.6rem; }
.article { padding-bottom: 4rem; }
.article h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.article h2 { font-size: 1.6rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.3rem; margin: 2.2rem 0 0.8rem; }
.article ul { padding-left: 1.2rem; }
.article li { margin-bottom: 0.4rem; }
.article .yrs { color: var(--soft); font-size: 0.93rem; }
.article-source { margin-top: 2.6rem; }
.article-source h2 { font-size: 1.3rem; border-bottom: 1px solid var(--rule); }
.article-source p { color: var(--soft); font-size: 0.95rem; }
.story-link { font-size: 0.95rem; }
.story-link a::after { content: " \2192"; }
.article-figure { float: right; margin: 0.4rem 0 1rem 1.6rem; text-align: center; }
.article-figure img { display: block; max-width: 100%; height: auto; }
.article-figure figcaption { font-size: 0.85rem; color: var(--soft); margin-top: 0.4rem; }
.article table.timeline { width: 100%; border-collapse: collapse; clear: both; }
.article table.timeline th, .article table.timeline td { text-align: left; vertical-align: top; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.article table.timeline th { width: 9.5rem; padding-right: 1rem; font-weight: 600; white-space: nowrap; }
.article ul.reading { list-style: none; padding: 0; font-size: 0.95rem; }
.article ul.reading li { padding-left: 1.4rem; text-indent: -1.4rem; }
.story-link + p { margin-top: 1.4rem; }
@media (max-width: 34rem) {
  .article-figure { float: none; margin: 0 auto 1rem; }
  .article table.timeline th { width: auto; white-space: normal; }
}

/* ---------- Photos and gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.8rem 1.6rem; padding-bottom: 4rem; }
.photo-grid--small { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); padding-bottom: 0; }
.photo { margin: 0; }
.photo .photo-link { display: block; background: var(--panel); border: 1px solid var(--rule); padding: 0.5rem; }
.photo .photo-link:hover, .photo .photo-link:focus-visible { border-color: var(--river); }
.photo img { display: block; width: 100%; height: 16rem; object-fit: contain; }
.photo-grid--small .photo img { height: 13rem; }
.photo figcaption { font-size: 0.9rem; color: var(--soft); margin-top: 0.6rem; line-height: 1.45; }
.portrait a { display: block; width: 100%; height: 100%; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 16, 14, 0.92); display: grid; grid-template-columns: 3.5rem 1fr 3.5rem; align-items: center; padding: 1rem; }
.lightbox[hidden] { display: none; }
.lb-open, .lb-open body { overflow: hidden; }
.lb-figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lb-img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; background: var(--panel); }
.lb-cap { color: var(--wash); font-size: 0.95rem; max-width: 60ch; text-align: center; margin-top: 0.9rem; }
.lb-cap a { color: #fff; }
.lightbox button { background: none; border: 0; color: var(--paper); font-size: 2.6rem; line-height: 1; cursor: pointer; padding: 0.4rem; }
.lightbox button:hover { color: #fff; }
.lightbox button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lightbox button[hidden] { visibility: hidden; display: block; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-close { position: absolute; top: 0.6rem; right: 0.8rem; }
@media (max-width: 34rem) {
  .lightbox { grid-template-columns: 2.2rem 1fr 2.2rem; padding: 0.5rem; }
  .lightbox button { font-size: 2rem; }
}

/* ---------- Long reports (DNA project) ---------- */
.article h3 { font-size: 1.3rem; margin: 1.8rem 0 0.6rem; }
.article h4 { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--soft); margin: 1.2rem 0 0.3rem; }
.notice { background: var(--wash); border-left: 4px solid var(--river); padding: 0.9rem 1.1rem; margin: 0 0 1.6rem; }
.notice p { margin: 0 0 0.5rem; }
.notice p:last-child { margin-bottom: 0; }
.notice-inline { background: var(--panel); border: 1px solid var(--rule); padding: 0.7rem 0.9rem; font-size: 0.95rem; }
.toc { border: 1px solid var(--rule); background: var(--panel); padding: 0.9rem 1.2rem; margin-bottom: 1rem; }
.toc-title { font-weight: 600; margin: 0 0 0.3rem; }
.toc ol { margin: 0; padding-left: 1.3rem; }
.toc li { margin: 0.15rem 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2rem; }
.table-cap { font-size: 0.85rem; font-weight: 600; color: var(--soft); margin: 1.2rem 0 0.4rem; }
.article table.data { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.article table.data th, .article table.data td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--rule); }
.article table.data thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.article table.markers { width: auto; font-variant-numeric: tabular-nums; }
.article table.markers th, .article table.markers td { text-align: center; padding: 0.3rem 0.45rem; white-space: nowrap; }
.article table.markers th[scope="row"] { text-align: left; font-weight: 600; }
.article table.markers td.diff { background: #f2df9a; font-weight: 600; }
.article table.timeline .src { display: block; font-size: 0.82rem; color: var(--soft); margin-top: 0.3rem; }
.article table.gedeon-timeline th { width: 9rem; }
.article-wide { margin: 1.4rem 0; }
.article-wide img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); }
.article-wide figcaption { font-size: 0.85rem; color: var(--soft); margin-top: 0.4rem; }
.snp { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; background: var(--panel); border: 1px solid var(--rule); padding: 0.6rem 0.8rem; overflow-wrap: anywhere; }
.signoff { font-family: var(--serif); font-size: 1.15rem; }
.dna-tree { margin: 0.4rem 0 1.6rem; font-size: 0.88rem; }
.dna-tree span { color: var(--soft); white-space: nowrap; }
.dt-root, .dt-box { background: var(--panel); border: 1px solid var(--rule); padding: 0.45rem 0.6rem; }
.dt-root { width: max-content; max-width: 100%; margin: 0 auto 1rem; position: relative; font-weight: 600; }
.dt-sons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; border-top: 2px solid var(--rule); padding-top: 0.9rem; }
.dt-col { display: flex; flex-direction: column; gap: 0.5rem; }
.dt-box + .dt-box { position: relative; }
.dt-list { line-height: 1.6; }
.dt-note { font-style: italic; color: var(--soft); padding: 0 0.6rem; }
@media (max-width: 40rem) {
  .dt-sons { grid-template-columns: 1fr 1fr; }
  .article table.gedeon-timeline th { width: auto; }
}
.timeline-link { margin: 0.9rem 0 0; font-size: 0.95rem; font-weight: 600; }
.timeline-link a::after { content: " \2192"; }
.hero .lead.welcome { max-width: var(--measure); color: var(--ink); line-height: 1.55; margin-bottom: 0.4rem; }
.hero .lead.welcome + .lead { margin-top: 0.6rem; }
.surnames { font-family: var(--serif); font-size: 1.25rem; line-height: 1.8; max-width: var(--measure); }
.hero .tree-link { margin: 1rem 0 0; }

/* ---------- Research papers with data sheets ---------- */
.in-brief { border: 1px solid var(--rule); background: var(--panel); padding: 0.9rem 1.2rem; margin-bottom: 1.2rem; }
.in-brief h2 { font-size: 1.2rem; border: 0; margin: 0 0 0.4rem; padding: 0; }
.in-brief p { margin: 0; }
.toc ul { list-style: none; padding-left: 0.6rem; margin: 0.2rem 0 0.4rem; columns: 2 14rem; font-size: 0.9rem; }
.toc .when, .datasheet .when { color: var(--soft); font-size: 0.85em; font-family: var(--sans); }
.datasheet { border-top: 2px solid var(--ink); padding-top: 0.6rem; margin-top: 2rem; }
.datasheet h3 { margin: 0 0 0.6rem; font-size: 1.35rem; }
.datasheet .to-person { font-family: var(--sans); font-size: 0.8rem; margin-left: 0.4rem; }
.datasheet dl { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.93rem; }
.datasheet dt { font-weight: 600; color: var(--soft); }
.datasheet dd { margin: 0; }
.notes-head { font-weight: 600; font-size: 0.9rem; margin: 0.9rem 0 0.3rem; }
.ds-notes { font-size: 0.93rem; padding-left: 1.2rem; }
.ds-notes li { margin-bottom: 0.45rem; }
.refs { font-size: 0.88rem; padding-left: 2.2rem; overflow-wrap: anywhere; }
.refs li { margin-bottom: 0.4rem; }
.refs li:target { background: #f2df9a; }
.citation { background: var(--panel); border-left: 3px solid var(--rule); padding: 0.5rem 0.8rem; font-size: 0.93rem; }
@media (max-width: 34rem) { .datasheet dl { grid-template-columns: 1fr; gap: 0.1rem; } .datasheet dd { margin-bottom: 0.4rem; } }

/* ---------- Research notes and unconfirmed links on person pages ---------- */
.research-note { background: var(--wash); border-left: 4px solid var(--gold); padding: 0.8rem 1rem; }
.person-grid .research-note h2 { font-size: 1.2rem; border: 0; padding: 0; margin: 0 0 0.4rem; }
.research-note p { margin: 0; font-size: 0.95rem; }
.unconfirmed { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold-deep); border: 1px solid var(--gold); border-radius: 3px; padding: 0 0.3rem; margin-left: 0.2rem; }
.study-kids .kids-note { font-size: 0.85rem; color: var(--soft); margin: 0 0 0.3rem; }
.study-kids .kids-group { font-size: 0.85rem; font-weight: 600; margin: 0.4rem 0 0.1rem; }
.study-kids ul { margin-bottom: 0.3rem; }

/* ---------- Compact header on every page except the home page ---------- */
.site-banner:not(.site-banner--home) { padding: 0.45rem 0; text-align: left; }
.site-banner:not(.site-banner--home) .wrap { flex-direction: row; align-items: center; justify-content: flex-start; }
.site-banner:not(.site-banner--home) .banner-crest { height: 3.4rem; margin: 0; }
.banner-home { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; border-radius: 4px; }
.banner-name { font-family: var(--serif); font-size: 1.6rem; line-height: 1; color: var(--paper); }
.banner-home:hover .banner-name { color: var(--wash); }
.banner-home:hover .banner-crest { filter: brightness(1.3); }
.banner-home:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
