/**
 * Ancestral Ledger: person pages. Light-touch styles that fit in with the site's theme.
 */
.famline-person-top {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em;
	align-items: flex-start;
	margin: 0 0 2em;
}
.famline-person-portrait {
	margin: 0;
	flex: 0 0 auto;
}
.famline-person-portrait-img {
	display: block;
	width: 180px;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}
.famline-person-details {
	flex: 1 1 240px;
	min-width: 0;
}
.famline-person-facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.35em 1.25em;
	margin: 0;
}
.famline-person-facts dt {
	font-weight: 600;
	margin: 0;
}
.famline-person-facts dd {
	margin: 0;
}
.famline-person-note {
	margin: 0.75em 0 0;
	font-size: 0.9em;
	opacity: 0.8;
}
.famline-person-bio {
	margin: 0 0 2em;
}
.famline-person-relatives {
	margin: 2em 0;
}
.famline-person-rel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1em 2em;
}
.famline-person-rel-group h3 {
	font-size: 1em;
	margin: 0 0 0.4em;
}
.famline-person-rel-group ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.famline-person-rel-group li {
	margin: 0 0 0.3em;
}
.famline-person-years,
.famline-person-rel-note {
	opacity: 0.75;
	font-size: 0.9em;
}
.famline-person-tree-link {
	margin: 2em 0 0;
}

/* Photo gallery */
.famline-person-photos {
	margin: 2em 0;
}
.famline-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75em;
	list-style: none;
	margin: 0;
	padding: 0;
}
.famline-gallery-item {
	margin: 0;
}
.famline-gallery-link {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 6px;
}
.famline-gallery-link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .2s;
}
.famline-gallery-link:hover img,
.famline-gallery-link:focus-visible img {
	transform: scale(1.04);
}
.famline-gallery-link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}
.famline-gallery-caption {
	display: block;
	margin-top: 0.35em;
	font-size: 0.85em;
	opacity: 0.8;
}

/* Lightbox */
.famline-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 4em 4.5em;
	border: 0;
	background: rgba(15, 20, 20, 0.94);
	color: #fff;
	box-sizing: border-box;
}
.famline-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.6);
}
.famline-lightbox-figure {
	height: 100%;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
}
.famline-lightbox-img {
	max-width: 100%;
	max-height: calc(100% - 3em);
	object-fit: contain;
}
.famline-lightbox-caption {
	text-align: center;
	max-width: 60ch;
}
.famline-lightbox-count {
	position: absolute;
	top: 1em;
	left: 1.25em;
	margin: 0;
	font-size: 0.9em;
	opacity: 0.8;
}
.famline-lightbox button {
	position: absolute;
	width: 2.75em;
	height: 2.75em;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
}
.famline-lightbox button:hover,
.famline-lightbox button:focus-visible {
	background: rgba(255, 255, 255, 0.25);
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.famline-lightbox-prev { left: 0.75em; top: 50%; transform: translateY(-50%); }
.famline-lightbox-next { right: 0.75em; top: 50%; transform: translateY(-50%); }
.famline-lightbox-close { right: 0.75em; top: 0.75em; }
@media (prefers-reduced-motion: reduce) {
	.famline-gallery-link img { transition: none; }
}

.famline-gallery-tags {
	display: block;
	margin-top: 0.2em;
	font-size: 0.8em;
	opacity: 0.8;
}
.famline-lightbox-tags {
	margin: 0;
	text-align: center;
}
.famline-lightbox-tags .famline-gallery-tags {
	font-size: 0.95em;
	opacity: 0.9;
}
.famline-lightbox-tags a {
	color: #fff;
}

/* Stories */
.famline-person-stories {
	margin: 2em 0;
}
.famline-story-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.famline-story-item {
	margin: 0 0 1.25em;
}
.famline-story-item h3 {
	margin: 0 0 0.2em;
	font-size: 1.1em;
}
.famline-story-date {
	margin: 0 0 0.3em;
	font-size: 0.9em;
	opacity: 0.75;
}
.famline-story-excerpt {
	margin: 0;
}
.famline-story-meta {
	font-size: 0.95em;
	opacity: 0.8;
	margin: 0 0 1.5em;
}
.famline-story-people {
	margin: 2em 0 0;
}
.famline-story-people ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 1.25em;
}
.famline-story-private {
	padding: 1em 1.25em;
	border-left: 4px solid currentColor;
	opacity: 0.85;
}

/* Story List block and shortcode */
.famline-story-cards .famline-story-item.has-thumb {
	display: grid;
	grid-template-columns: minmax(90px, 160px) 1fr;
	gap: 1em;
	align-items: start;
}
.famline-story-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
}
.famline-story-body h3 {
	margin: 0 0 0.2em;
	font-size: 1.1em;
}
.famline-story-cards .famline-story-meta {
	margin: 0 0 0.35em;
}
.famline-story-more {
	margin: 0.5em 0 0;
}
.famline-story-none {
	opacity: 0.8;
}
@media (max-width: 480px) {
	.famline-story-cards .famline-story-item.has-thumb {
		grid-template-columns: 1fr;
	}
}

.famline-locked {
	padding: 1em 1.25em;
	border-left: 4px solid currentColor;
	border-radius: 4px;
}

/* Life events timeline */
.famline-person-events {
	margin: 2em 0;
}
.famline-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid currentColor;
	border-left-color: color-mix(in srgb, currentColor 25%, transparent);
}
.famline-event {
	display: grid;
	grid-template-columns: minmax(7em, 11em) 1fr;
	gap: 0.25em 1em;
	margin: 0;
	padding: 0.4em 0 0.4em 1em;
	position: relative;
}
.famline-event::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 0.85em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.45;
}
.famline-event-date {
	font-size: 0.9em;
	opacity: 0.8;
}
.famline-event-detail {
	display: block;
	font-size: 0.92em;
	opacity: 0.85;
}
@media (max-width: 480px) {
	.famline-event {
		grid-template-columns: 1fr;
	}
}
/* Source reference numbers and the Sources list */
.famline-cite-marks {
	margin-left: 0.15em;
	font-size: 0.7em;
}
.famline-cite-mark {
	margin-right: 0.2em;
	text-decoration: none;
}
.famline-person-sources {
	margin: 2em 0;
	font-size: 0.92em;
}
.famline-source-list li {
	margin: 0 0 0.35em;
}
.famline-source-note {
	opacity: 0.8;
}
