:root { color-scheme: light dark; --bg: #fbfaf7; --fg: #1f2328; --muted: #5a5e66; --line: #8c877c; --link: #2a4f7a; --visited: #5b3f86; --focus: #2a4f7a; --card: #ffffff; --soft: #eef1f5; --rule: #ddd8ce; --new: #1f6b3a; --new-bg: #e3f2e7; --doubt: #8a4b00; --doubt-bg: #fbecd7;
  --display: "PT Serif", Georgia, "Times New Roman", serif; --body: system-ui, -apple-system, "Segoe UI", sans-serif; }
@media (prefers-color-scheme: dark) {
:root { --bg: #16181b; --fg: #e8e6e1; --muted: #a8aab0; --line: #6f727a; --link: #8fb4e3; --visited: #c3a6ec; --focus: #8fb4e3; --card: #1e2125; --soft: #233041; --rule: #34373d; --new: #8fd6a4; --new-bg: #1d3325; --doubt: #f2c27d; --doubt-bg: #3a2c18; }
}
body { font-family: var(--body); max-width: 48rem; margin: 0 auto; padding: 0 1rem 3rem; line-height: 1.55; background: var(--bg); color: var(--fg); overflow-wrap: break-word; }
a { color: var(--link); }
a:visited { color: var(--visited); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2 { font-family: var(--display); line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2rem; margin: 0.4rem 0 0.3rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.3rem; }
.skip { position: absolute; left: -100vw; }
.skip:focus { position: static; }
.masthead { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; align-items: baseline; justify-content: space-between; padding: 1rem 0 0.6rem; border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--fg); }
.brand:visited { color: var(--fg); }
.masthead ul, .crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.masthead nav a { text-decoration: none; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-top: 0.9rem; }
.crumbs ol { gap: 0.2rem 0.4rem; }
.crumbs li + li::before { content: "›"; margin-right: 0.4rem; }
.private { font-style: italic; color: var(--muted); }
img { max-width: 100%; height: auto; }
.transcription { white-space: pre-line; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.9rem; }
.cards a { display: grid; gap: 0.35rem; text-decoration: none; font-size: 0.9rem; }
.cards img, .cards .tile { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule); border-radius: 0.3rem; background: var(--card); }
.cards .tile { display: block; }
.cards li { min-width: 0; }
.cards a > span { overflow-wrap: anywhere; }
.cards.rows { grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: 0.8rem 1.2rem; }
.cards.rows a { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.crops { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.6rem; }
.crops img { width: 100%; height: auto; }
.chart-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.pedigree { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 1.25rem; align-items: stretch; }
.generation { display: flex; flex-direction: column; justify-content: space-around; gap: 0.4rem; }
.slot { min-height: 2.6rem; display: flex; align-items: center; }
.box { display: inline-flex; flex-direction: column; min-width: 9rem; max-width: 13rem; padding: 0.3rem 0.55rem; border: 1px solid var(--line); border-radius: 0.35rem; background: var(--card); text-decoration: none; line-height: 1.25; }
.box .years { font-size: 0.8em; color: var(--muted); }
.box.private { border-style: dashed; color: var(--muted); font-style: italic; }
.descendants, .descendants ul { list-style: none; margin: 0; padding: 0; }
.descendants ul { margin-left: 1.1rem; padding-left: 0.9rem; border-left: 1px solid var(--line); }
.descendants li { padding: 0.3rem 0; }
.couple { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.union { margin-top: 0.3rem; }
.amp { color: var(--muted); }
.kin .label { color: var(--muted); }
.kin.self { font-weight: 600; }
.sub { color: var(--muted); font-size: 1.05rem; margin: 0; }
.lede { font-size: 1.05rem; }
.small { font-size: 0.9rem; color: var(--muted); margin: 0.2rem 0; }
/* tap targets of at least 18px for inline links in small text and teaser titles (R-19) */
.small a, .finding-teaser h3 a { padding-block: 0.15rem; }
.name-list a { display: inline-block; min-width: 1.5rem; }  /* a name shown as "?" stays tappable */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 1.2rem 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.kin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.8rem; }
.kin-grid section { background: var(--card); border: 1px solid var(--rule); border-radius: 0.5rem; padding: 0.7rem 0.9rem; min-width: 0; }
.kin-grid ul { list-style: none; margin: 0 0 0.4rem; padding: 0; display: grid; gap: 0.2rem; }
.kin-grid h3 + ul { margin-top: 0; }
.search-box { margin: 1.2rem 0 0.4rem; }
.search-box label { display: block; margin-bottom: 0.3rem; color: var(--muted); }
.search-box div { display: flex; gap: 0.5rem; }
#search input, .search-box input { flex: 1; min-width: 0; font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--card); color: var(--fg); min-height: 44px; box-sizing: border-box; }
.search-box button, #search button { font: inherit; padding: 0.6rem 1rem; border: 1px solid var(--link); border-radius: 0.4rem; background: var(--link); color: var(--bg); min-height: 44px; cursor: pointer; }
#search { display: flex; gap: 0.5rem; margin: 1rem 0; }
.founders { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.8rem; }
.founders li { display: grid; gap: 0.2rem; border: 1px solid var(--rule); border-radius: 0.5rem; padding: 0.7rem 0.9rem; background: var(--card); }
.finding-teaser h3 { margin-bottom: 0.2rem; }
.reader-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.reader-cards li { border: 1px solid var(--rule); border-radius: 0.5rem; padding: 0.9rem 1rem; background: var(--card); }
.reader-cards h2, .reader-cards h3 { margin: 0 0 0.3rem; }
.reader-cards .actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0.6rem 0 0; }
.reader-cards .actions a { min-height: 44px; display: inline-flex; align-items: center; }
.reader-cards .actions a.primary { border: 1px solid var(--link); border-radius: 0.4rem; padding: 0 0.9rem; text-decoration: none; font-weight: 600; }
.surname-folds { columns: 16rem; column-gap: 1.5rem; }
.surname-folds details { break-inside: avoid; margin: 0 0 0.3rem; }
.surname-folds summary { min-height: 24px; cursor: pointer; }
.surname-folds ul { margin: 0.2rem 0 0.6rem; padding-left: 1.2rem; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips a { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; box-sizing: border-box; border: 1px solid var(--rule); border-radius: 0.4rem; padding: 0.35rem 0.8rem; background: var(--card); text-decoration: none; }
.people { columns: 2 15rem; column-gap: 2rem; }
.people section { break-inside: avoid; margin-bottom: 0.8rem; }
.people ul { list-style: none; padding: 0; margin: 0; }
.people li { padding: 0.1rem 0; }
.people a { display: inline-block; padding: 0.3rem 0; }
.scan { display: grid; gap: 1rem; margin-top: 1.2rem; align-items: start; }
.scan.with-reading { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 40rem) { .scan.with-reading { grid-template-columns: minmax(0, 1fr); } }
.scan figure { margin: 0 0 1rem; }
.scan img, main > figure img { border: 1px solid var(--rule); border-radius: 0.3rem; background: var(--card); }
.reading h2 { margin-top: 0; }
.reading .transcription { font-family: var(--display); background: var(--card); border: 1px solid var(--rule); border-radius: 0.5rem; padding: 0.7rem 0.9rem; margin: 0; }
.ref { font-variant-numeric: tabular-nums; }
.chips .private { display: inline-block; border: 1px dashed var(--rule); border-radius: 0.4rem; padding: 0.35rem 0.7rem; }
.masthead nav a, .crumbs a, li a, .kin a, .box { display: inline-block; min-height: 24px; padding-block: 0.15rem; box-sizing: border-box; }
.box { display: inline-flex; }
.finding { background: var(--card); border: 1px solid var(--rule); border-radius: 0.5rem; padding: 0.7rem 0.9rem; margin-bottom: 0.8rem; }
.finding h2, .finding h3 { font-family: var(--display); font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--fg); margin: 0 0 0.3rem; }
.finding .transcription { margin: 0 0 0.3rem; }
.mark { display: inline-block; font-size: 0.8em; padding: 0 0.45rem; border-radius: 1rem; border: 1px solid var(--line); background: var(--soft); color: var(--fg); text-decoration: none; min-height: 0; }
a.mark { min-height: 24px; line-height: 22px; }
.mark-contradicted, .mark-unresolved { border-style: dashed; }
.kin.marked a:not(.mark) { font-weight: 600; }
.legend { background: var(--card); border: 1px solid var(--rule); border-radius: 0.5rem; padding: 0.6rem 0.8rem; }
body.wide { max-width: 72rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.6rem; }
.filters button { font: inherit; display: inline-flex; gap: 0.45rem; align-items: center; min-height: 44px; border: 1px solid var(--rule); background: var(--card); color: var(--fg); border-radius: 0.5rem; padding: 0.35rem 0.8rem; cursor: pointer; }
.filters button[aria-pressed="true"] { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.filters:not([hidden]) + .legend { display: none; }
.tag { font-size: 0.78rem; font-weight: 700; border-radius: 1rem; padding: 0.05rem 0.5rem; white-space: nowrap; }
.tag-new { color: var(--new); background: var(--new-bg); }
.tag-questioned { color: var(--doubt); background: var(--doubt-bg); }
.reader { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .reader { grid-template-columns: minmax(0, 1fr); } }
.head { min-height: 5.6rem; }
.head .facts { margin: 0; }
@media (min-width: 40rem) { .facts.fixed dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.more-facts > summary { cursor: pointer; color: var(--link); font-size: 0.9rem; min-height: 24px; }
.tree-view { min-width: 0; overflow-x: auto; }
.views { min-width: 0; }
.hourglass { display: grid; gap: 0.9rem; overflow-x: auto; padding-bottom: 0.5rem; }
.hg-row h3 { text-align: center; }
.hg-slots { display: grid; gap: 0.6rem; }
.hg-couple { display: grid; justify-items: center; align-content: start; gap: 0.3rem; padding: 0.3rem; border-bottom: 2px solid var(--line); border-radius: 0 0 0.6rem 0.6rem; }
.pair { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; }
.hg-me { display: grid; justify-items: center; gap: 0.4rem; background: var(--soft); border-radius: 0.7rem; padding: 0.6rem; }
.node.empty { display: inline-block; min-width: 9.5rem; min-height: 44px; border: 1px dotted var(--rule); border-radius: 0.5rem; }
details.side { width: 100%; text-align: center; }
details.side summary { font-size: 0.85rem; color: var(--link); cursor: pointer; min-height: 24px; }
details.side .doubt { color: var(--doubt); font-weight: 700; }
details.side.sub { flex-basis: 100%; }
details.more > summary { cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .toggle, details.more .toggle-less { color: var(--link); font-size: 0.85rem; white-space: nowrap; }
details.more .toggle-less, details.more[open] .excerpt, details.more[open] .toggle { display: none; }
details.more[open] .toggle-less { display: inline; }
details.shared summary { color: var(--link); cursor: pointer; min-height: 24px; margin-top: 0.4rem; }
.detail h4 { font-size: 0.85rem; margin: 0.4rem 0 0.2rem; }
.side-people { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; padding: 0.4rem; margin-top: 0.3rem; border: 1px dashed var(--rule); border-radius: 0.5rem; }
.tree-view .descendants li { padding: 0.25rem 0; }
.tree-view .couple { align-items: stretch; }
details.finding summary { font-family: var(--display); font-weight: 700; cursor: pointer; min-height: 24px; }
details.finding[open] summary { margin-bottom: 0.4rem; }
.band { display: grid; gap: 0.3rem; }
.band h3 { margin: 0; }
.band.own .couples { background: var(--soft); border-radius: 0.6rem; padding: 0.4rem; }
.couples { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.couple { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.2rem; border-radius: 0.6rem; border: 1px dashed transparent; }
.couple.joined { border-color: var(--rule); }
a.node { display: grid; gap: 0.1rem; min-width: 9.5rem; max-width: 13rem; min-height: 44px; padding: 0.35rem 0.55rem; border: 1px solid var(--rule); border-radius: 0.5rem; background: var(--card); color: var(--fg); text-decoration: none; line-height: 1.25; box-sizing: border-box; }
a.node:visited { color: var(--fg); }
a.node .label { font-size: 0.78rem; color: var(--muted); }
a.node .who { font-weight: 600; }
a.node .years { font-size: 0.82rem; color: var(--muted); }
a.node .tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.15rem; }
a.node.is-new { border: 2px solid var(--new); }
a.node.is-questioned { border: 2px dashed var(--doubt); }
a.node.is-new.is-questioned { border-style: solid; border-color: var(--new); box-shadow: inset 0 0 0 2px var(--doubt-bg); }
a.node.self { background: var(--soft); }
a.node[aria-current="true"] { outline: 3px solid var(--focus); outline-offset: 2px; }
a.node.dim { opacity: 0.35; }
.node-wrap { position: relative; display: inline-grid; }
a.peek { position: absolute; top: -0.45rem; right: -0.45rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--link); color: var(--link); font: italic 700 0.85rem/1 Georgia, serif; text-decoration: none; }
a.peek::before { content: ""; position: absolute; inset: -0.5rem; }
a.peek::after { content: "i"; }
a.peek:hover, a.peek:focus-visible { background: var(--link); color: var(--card); }
.panel .close { float: right; min-width: 44px; min-height: 44px; margin: -0.5rem -0.6rem 0 0.4rem; border: 0; background: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.panel { position: sticky; top: 0.75rem; background: var(--card); border: 1px solid var(--rule); border-radius: 0.6rem; padding: 0.8rem 0.9rem; max-height: calc(100vh - 1.5rem); overflow: auto; }
.panel .detail { border: 0; padding: 0; margin: 0; }
.detail { border-top: 1px solid var(--rule); padding-top: 0.8rem; margin-top: 0.8rem; }
.detail h3 { font-family: var(--display); font-size: 1.1rem; text-transform: none; letter-spacing: 0; color: var(--fg); margin: 0 0 0.4rem; }
.changes { list-style: none; padding: 0; display: grid; gap: 0.9rem; }
.changes li { display: grid; gap: 0.15rem; justify-items: start; }
.status { font-size: 0.8em; padding: 0.05rem 0.5rem; border-radius: 1rem; background: var(--soft); }
