/*
 * RootsPersona — tree hub ([rootspersona_hub] and its blocks).
 * Colours and fonts come from the same --rp-* custom properties as the persona
 * templates (see persona-templates.css), with fallbacks.
 */
.rp-hub {
	color: var(--rp-ink, #2b2721);
	font-family: var(--rp-font-body, inherit);
	line-height: 1.55;
	display: flex;
	flex-direction: column;
	gap: 2.6rem;
	min-width: 0;
}
.rp-hub *, .rp-hub *::before, .rp-hub *::after { box-sizing: border-box; }
.rp-hub a { color: var(--rp-accent, #8a5a2b); }
.rp-hub__title { font-family: var(--rp-font-heading, inherit); font-weight: 500; font-size: 1.65rem; margin: 0 0 .2rem; }
.rp-hub__sub, .rp-hub__note { color: var(--rp-muted, #8a7865); font-size: .92rem; margin: 0 0 1rem; font-family: var(--rp-font-caption, inherit); }
.rp-hub__cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
@media (max-width: 820px) { .rp-hub__cols { grid-template-columns: minmax(0, 1fr); } }
.rp-hub__cols > .rp-hub__block { background: var(--rp-card, #fffdf8); border: var(--rp-line-w, 1px) solid var(--rp-line, #e3d6c3); border-radius: var(--rp-radius, 12px); padding: 1.1rem 1.25rem; }

/* Intro */
.rp-hub__intro { text-align: center; }
.rp-hub__heading { font-family: var(--rp-font-heading, inherit); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 auto .4em; max-width: 900px; }
.rp-hub__lead { color: var(--rp-ink-2, #5d4c3c); font-style: italic; margin: 0 auto 1.2rem; }
.rp-hub__numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.1rem; margin: 0 0 1.4rem; font-family: var(--rp-font-caption, inherit); }
.rp-hub__number { min-width: 78px; }
.rp-hub__number b { display: block; font-size: 1.8rem; font-weight: 500; line-height: 1.1; color: var(--rp-accent, #8a5a2b); font-family: var(--rp-font-heading, inherit); }
.rp-hub__number span { font-size: .82rem; color: var(--rp-muted, #8a7865); }
.rp-hub__intro .rp-search { max-width: 640px; margin: 0 auto; }

/* Faces */
.rp-hub__faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 1rem .8rem; }
.rp-hub__face { text-align: center; text-decoration: none; color: var(--rp-ink-2, #5d4c3c) !important; }
.rp-hub__face img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto; border: 3px solid var(--rp-card, #fffdf8); box-shadow: 0 1px 6px rgba(0, 0, 0, .18); filter: sepia(.25); transition: filter .2s, border-color .2s; }
.rp-hub__face:hover img, .rp-hub__face:focus img { filter: none; border-color: var(--rp-accent, #8a5a2b); }
.rp-hub__face span { display: block; font-size: .8rem; line-height: 1.25; margin-top: .4rem; font-family: var(--rp-font-caption, inherit); }
.rp-hub__face small { display: block; color: var(--rp-muted, #8a7865); }
.rp-hub__more { display: inline-block; margin-top: .6rem; }

/* On these days */
.rp-hub__days { list-style: none; margin: 0; padding: 0; }
.rp-hub__days li { display: flex; gap: .9rem; padding: .55rem 0; border-bottom: var(--rp-line-w, 1px) solid var(--rp-line, #e3d6c3); }
.rp-hub__days li:last-child { border-bottom: 0; }
.rp-hub__days li.is-today .rp-hub__day { background: var(--rp-accent-soft, #f0e1cc); border-radius: var(--rp-radius-sm, 6px); }
.rp-hub__day { min-width: 62px; text-align: center; font-size: .78rem; line-height: 1.1; color: var(--rp-accent, #8a5a2b); padding: .2rem 0; font-family: var(--rp-font-caption, inherit); }
.rp-hub__day b { display: block; font-size: 1.45rem; font-weight: 500; font-family: var(--rp-font-heading, inherit); }
.rp-hub__year { color: var(--rp-muted, #8a7865); }
.rp-hub__ann { color: var(--rp-accent, #8a5a2b); font-size: .85rem; }

/* Where to begin */
.rp-hub__starts { display: grid; gap: .7rem; }
.rp-hub__start { border: var(--rp-line-w, 1px) solid var(--rp-line, #e3d6c3); border-radius: var(--rp-radius-sm, 8px); padding: .7rem .9rem; background: var(--rp-surface, #faf5ec); }
.rp-hub__k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-accent, #8a5a2b); font-family: var(--rp-font-caption, inherit); }
.rp-hub__v { font-size: 1.1rem; margin: .2rem 0 .1rem; }
.rp-hub__d { color: var(--rp-muted, #8a7865); font-size: .85rem; }

/* Through time */
.rp-hub__chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 30px; margin-bottom: 30px; position: relative; border-bottom: var(--rp-line-w, 1px) solid var(--rp-line, #e3d6c3); }
.rp-hub__bar { flex: 1; min-width: 6px; position: relative; background: color-mix(in srgb, var(--rp-accent, #8a5a2b) 55%, var(--rp-card, #fffdf8)); border-radius: 3px 3px 0 0; }
.rp-hub__bar:hover { background: var(--rp-accent, #8a5a2b); }
.rp-hub__bar i, .rp-hub__bar em { position: absolute; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .68rem; white-space: nowrap; font-family: var(--rp-font-caption, inherit); }
.rp-hub__bar i { bottom: -22px; color: var(--rp-muted, #8a7865); }
.rp-hub__bar em { top: -18px; color: var(--rp-ink-2, #5d4c3c); }
@media (max-width: 600px) { .rp-hub__bar i { display: none; } .rp-hub__bar:nth-child(3n+1) i { display: block; } }
.rp-hub__mark { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--rp-accent, #8a5a2b); padding-left: 4px; font-size: .7rem; color: var(--rp-accent, #8a5a2b); white-space: nowrap; pointer-events: none; font-family: var(--rp-font-caption, inherit); }
.rp-hub__facts { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; color: var(--rp-ink-2, #5d4c3c); font-size: .92rem; margin: 0; }

/* Families */
.rp-hub__fams { display: flex; flex-wrap: wrap; gap: .5rem; }
.rp-hub__fam { border: var(--rp-line-w, 1px) solid var(--rp-line, #e3d6c3); background: var(--rp-card, #fffdf8); border-radius: 999px; padding: .3rem .85rem; text-decoration: none; color: var(--rp-ink, #2b2721) !important; }
a.rp-hub__fam:hover { border-color: var(--rp-accent, #8a5a2b); }
.rp-hub__fam b { font-weight: 500; }
.rp-hub__fam span { color: var(--rp-muted, #8a7865); font-size: .82rem; margin-left: .35rem; }
.rp-hub__all { margin-top: .8rem; }
.rp-hub__all summary { cursor: pointer; color: var(--rp-accent, #8a5a2b); margin-bottom: .6rem; }

/* Places */
.rp-hub__places { list-style: none; margin: 0; padding: 0; }
.rp-hub__places li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 2.2rem; align-items: center; gap: .6rem; padding: .25rem 0; font-size: .95rem; }
.rp-hub__pbar { height: 8px; background: var(--rp-surface, #f4efe7); border-radius: 4px; overflow: hidden; }
.rp-hub__pbar span { display: block; height: 100%; background: color-mix(in srgb, var(--rp-accent, #8a5a2b) 55%, var(--rp-card, #fffdf8)); }
.rp-hub__places small { color: var(--rp-muted, #8a7865); text-align: right; }
.rp-hub .rp-map { margin-top: 0; }

/* Surname / place pages */
.rp-hub__back { margin: 0 0 -1.4rem; font-family: var(--rp-font-caption, inherit); }
.rp-hub__people { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 2rem; }
.rp-hub__people li { break-inside: avoid; display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.rp-hub__people img, .rp-hub__nopic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.rp-hub__nopic { background: var(--rp-surface, #f4efe7); border: var(--rp-line-w, 1px) solid var(--rp-line, #e3d6c3); }
.rp-hub__yrs { color: var(--rp-muted, #8a7865); font-size: .85rem; }
.rp-hub__empty { color: var(--rp-muted, #8a7865); }
