/* ==========================================================================
   Dòng Họ — main stylesheet
   ========================================================================== */

:root {
	--accent: #8B1E1E;
	--gold: #B8862B;
	--gold-light: #E8C676;
	--gold-text: #8A6514;
	--ink: #1F1A17;
	--body: #3A2F25;
	--muted: #5C4A33;
	--paper: #F7F2EA;
	--paper-2: #EFE6D6;
	--card: #FFFDF8;
	--line: #E3D6BF;
	--line-2: #D9C7A4;
	--on-accent: #F7F2EA;
	--on-accent-soft: #F3E9D8;
	--serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover { color: var(--ink); }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	background: var(--ink);
	color: #fff;
	padding: 10px 16px;
	border-radius: 4px;
}
.skip-link:focus { left: 8px; color: #fff; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack--tight { gap: 12px; }
.align-start { align-self: flex-start; }
.muted { color: var(--muted); }

/* Buttons & links ------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 12px 26px;
	border: 1.5px solid transparent;
	border-radius: 4px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--ink); color: #fff; }
.btn--gold { background: var(--gold-light); color: var(--ink); }
.btn--gold:hover { background: #F3D899; color: var(--ink); }
.btn--ghost-light { border-color: var(--on-accent-soft); color: var(--on-accent); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn--outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--outline:hover { background: var(--accent); color: var(--on-accent); }

.link-arrow {
	font-weight: 600;
	padding: 10px 0;
	text-decoration: none;
	color: var(--accent);
}
.link-arrow:hover { text-decoration: underline; }

/* Header ---------------------------------------------------------------- */

.site-header {
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	position: relative;
	z-index: 20;
}
.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--accent);
	min-width: 0;
}
.brand:hover { color: var(--accent); }
.brand svg { flex: none; }
.brand__logo { width: auto; max-height: 52px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__name { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.brand__place { font-size: 13px; color: var(--muted); }

.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav > ul { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.primary-nav li { position: relative; }
.primary-nav a {
	display: block;
	padding: 10px 0;
	color: var(--ink);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current_page_item > a {
	color: var(--accent);
	border-bottom-color: var(--gold);
}
.primary-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 220px;
	padding: 8px 16px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(31, 26, 23, .1);
	display: none;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: block; }

.nav-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	border: 1.5px solid var(--line-2);
	border-radius: 4px;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.primary-nav { display: none; width: 100%; }
	.primary-nav.is-open { display: block; }
	.primary-nav > ul { flex-direction: column; gap: 0; }
	.primary-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.primary-nav .current-menu-item > a { border-bottom-color: var(--line); }
	.primary-nav .sub-menu {
		position: static; display: block; box-shadow: none; border: 0;
		background: transparent; padding: 0 0 0 16px; min-width: 0;
	}
}

/* Hero ------------------------------------------------------------------ */

.hero { background: var(--accent); color: var(--on-accent); }
.hero__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 56px;
	padding-top: 88px;
	padding-bottom: 88px;
}
.hero__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero__eyebrow {
	font-size: 14px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold-light);
	font-weight: 600;
}
.hero__title {
	margin: 0;
	font-family: var(--serif);
	font-size: clamp(40px, 6vw, 64px);
	line-height: 1.08;
	font-weight: 700;
}
.hero__lead { margin: 0; font-size: 19px; max-width: 520px; color: var(--on-accent-soft); }
.hero__motto { display: flex; align-items: center; gap: 14px; }
.hero__motto::before { content: ""; width: 48px; height: 2px; background: var(--gold-light); flex: none; }
.hero__motto span { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold-light); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero__media {
	flex: 1 1 420px;
	min-width: 0;
	padding: 12px;
	border: 1.5px solid var(--gold-light);
	border-radius: 4px;
}

/* Media + placeholders -------------------------------------------------- */

.media { display: block; width: 100%; height: auto; border-radius: 4px; object-fit: cover; }
.ratio-4-3 { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.ratio-3-2 { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }

.ph {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	border-radius: 4px;
	background: repeating-linear-gradient(135deg, #E8DDC8 0 10px, #EFE6D6 10px 20px);
	color: var(--muted);
	font-size: 14px;
	text-align: center;
}
.hero .ph { border-radius: 2px; }

/* Stats ----------------------------------------------------------------- */

.stats { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.stats__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 24px;
	padding-top: 36px;
	padding-bottom: 36px;
	text-align: center;
}
.stat__num { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.stat__label { font-size: 15px; color: #4A3C2C; }

/* Sections -------------------------------------------------------------- */

.section { padding-top: 96px; padding-bottom: 96px; }
.section--tight { padding-top: 56px; padding-bottom: 96px; }
.section--alt { background: var(--paper-2); }
.section--card { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: 36px;
}
.section-title {
	margin: 0;
	font-family: var(--serif);
	font-size: clamp(32px, 4vw, 44px);
	line-height: 1.15;
	font-weight: 700;
}
.section-lead { margin: 0; font-size: 17px; color: var(--body); max-width: 640px; }
.eyebrow {
	font-size: 14px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gold-text);
	font-weight: 600;
}

.split { display: flex; flex-wrap: wrap; gap: 64px; }
.split > * { flex: 1 1 400px; min-width: 0; }
.split--center { align-items: center; gap: 56px; }

.prose { font-size: 17px; color: var(--body); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

.empty-note {
	padding: 28px;
	border: 1.5px dashed var(--line-2);
	border-radius: 6px;
	background: var(--card);
	color: var(--muted);
}

/* Timeline -------------------------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 20px; }
.timeline__rail { display: flex; flex-direction: column; align-items: center; flex: none; }
.timeline__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-top: 8px; }
.timeline__line { width: 2px; flex: 1; background: var(--line-2); }
.timeline li:last-child .timeline__line { display: none; }
.timeline__body { padding-bottom: 32px; }
.timeline li:last-child .timeline__body { padding-bottom: 0; }
.timeline__year { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--accent); }

/* Info list ------------------------------------------------------------- */

.info {
	margin: 0;
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 10px 20px;
	border-top: 1px solid var(--line);
	padding-top: 18px;
}
.info > div { display: contents; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Cards ----------------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.cards--honor { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.event-card {
	display: flex;
	gap: 20px;
	padding: 28px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
}
.event-date {
	flex: none;
	width: 72px;
	align-self: flex-start;
	padding: 8px 0;
	text-align: center;
	border: 1.5px solid var(--accent);
	border-radius: 4px;
}
.event-date__day { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.event-date__month { font-size: 12px; color: var(--muted); }
.event-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event-tag { font-size: 13px; font-weight: 600; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; }
.event-card__title { margin: 0; font-size: 20px; line-height: 1.35; }
.event-card__title a { color: var(--ink); text-decoration: none; }
.event-card__title a:hover { color: var(--accent); }
.event-card__meta { font-size: 14px; color: var(--muted); }
.event-card__text { margin: 0; font-size: 15px; color: #4A3C2C; }

.honor-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 28px;
	text-align: center;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
}
.avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; font-size: 12px; }
.honor-card__name { margin: 6px 0 0; font-size: 19px; }
.honor-card__name a { color: var(--ink); text-decoration: none; }
.honor-card__name a:hover { color: var(--accent); }
.honor-card__meta { font-size: 14px; color: var(--muted); }
.honor-card__text { margin: 0; font-size: 15px; color: var(--body); }

/* Gallery --------------------------------------------------------------- */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.gallery-item { margin: 0; }
.gallery-item figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Footer ---------------------------------------------------------------- */

.site-footer { background: var(--ink); color: #EDE4D3; }
.site-footer .container { padding-top: 64px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: #CFC3AE; }
.footer-col p { margin: 0; }
.footer-brand { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--gold-light); }
.footer-heading { margin: 0 0 4px; font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--on-accent); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #CFC3AE; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #3A322B; font-size: 14px; color: #A99D88; }

/* Inner page band -------------------------------------------------------- */

.page-band { background: var(--accent); color: var(--on-accent); }
.page-band__inner { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 10px; }
.breadcrumb { font-size: 14px; color: var(--gold-light); display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { color: #fff; }
.page-band__title { margin: 0; font-family: var(--serif); font-size: clamp(34px, 5vw, 48px); line-height: 1.12; }
.page-band__lead { margin: 0; font-size: 17px; color: var(--on-accent-soft); max-width: 680px; }

/* Entry content ---------------------------------------------------------- */

.entry { max-width: 800px; margin: 0 auto; padding: 56px 24px 96px; }
.entry-thumb { display: block; width: 100%; height: auto; border-radius: 6px; margin-bottom: 32px; }
.entry-portrait { display: block; width: 200px; height: 200px; object-fit: cover; border-radius: 50%; margin: 0 auto 32px; }
.entry-content { font-size: 17px; color: var(--body); }
.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; margin-top: 1.6em; }
.entry-content h2 { font-size: 30px; }
.entry-content h3 { font-size: 24px; }
.entry-content img { border-radius: 4px; }
.entry-content blockquote {
	margin-left: 0; margin-right: 0; padding: 4px 0 4px 24px;
	border-left: 3px solid var(--gold);
	font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink);
}
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--muted); }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* Posts list ------------------------------------------------------------- */

.post-list { display: flex; flex-direction: column; gap: 28px; }
.post-item { display: flex; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.post-item__thumb { flex: 0 1 280px; }
.post-item__thumb img { display: block; width: 100%; height: auto; border-radius: 4px; }
.post-item__body { flex: 1 1 320px; min-width: 0; }
.post-item__date { font-size: 14px; color: var(--muted); }
.post-item__title { margin: 4px 0 8px; font-family: var(--serif); font-size: 26px; line-height: 1.25; }
.post-item__title a { color: var(--ink); text-decoration: none; }
.post-item__title a:hover { color: var(--accent); }
.post-item p { margin: 0; color: var(--body); }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--line-2); border-radius: 4px;
	text-decoration: none; color: var(--ink);
}
.page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form .search-field {
	font: inherit; padding: 10px 12px; min-height: 44px;
	border: 1px solid #CDBB98; border-radius: 4px; background: #fff;
}
.search-form .search-submit {
	font: inherit; font-weight: 600; min-height: 44px; padding: 0 20px;
	background: var(--accent); color: var(--on-accent); border: 0; border-radius: 4px; cursor: pointer;
}

/* ==========================================================================
   Phả hệ (family tree)
   ========================================================================== */

.pha-he { padding-top: 32px; padding-bottom: 96px; }
.pha-he__intro { margin-bottom: 28px; }

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	padding: 20px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--sm { flex: 1 1 160px; }
.field--grow { flex: 3 1 260px; }
.field label { font-size: 14px; font-weight: 600; }
.field select, .field input {
	font: inherit;
	height: 46px;
	padding: 0 12px;
	border: 1px solid #CDBB98;
	border-radius: 4px;
	background: #fff;
	color: var(--ink);
	width: 100%;
}
.filter-status { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.filter-status:empty { display: none; }

.tree-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; margin-top: 28px; }
.tree-box {
	flex: 999 1 600px;
	min-width: 0;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
}

/* Tree: nested <ul> drawn as an org chart. */
.tree { overflow-x: auto; }
.tree-inner { width: max-content; min-width: 100%; padding: 32px 24px; }
.tree ul {
	display: flex;
	justify-content: center;
	margin: 0;
	padding: 28px 0 0;
	list-style: none;
	position: relative;
}
.tree-inner > ul { padding-top: 0; }
.tree li {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	padding: 28px 8px 0;
	list-style: none;
}
.tree li::before,
.tree li::after {
	content: "";
	position: absolute;
	top: 0;
	right: 50%;
	width: 50%;
	height: 28px;
	border-top: 2px solid var(--gold);
}
.tree li::after { right: auto; left: 50%; border-left: 2px solid var(--gold); }
.tree li:only-child::before,
.tree li:only-child::after { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before,
.tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--gold); border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }
.tree ul ul::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 0;
	height: 28px;
	border-left: 2px solid var(--gold);
}
/* Several roots: no connectors between them. */
.tree-inner > ul > li { padding-top: 0; }
.tree-inner > ul > li::before,
.tree-inner > ul > li::after { display: none; }

.tree li.is-collapsed > ul { display: none; }

.tree-node-wrap { display: flex; flex-direction: column; align-items: center; }

.tree-node {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 132px;
	max-width: 210px;
	min-height: 44px;
	padding: 8px 14px;
	border: 1.5px solid var(--gold);
	border-radius: 6px;
	background: #FBF7F0;
	color: var(--ink);
	text-align: center;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.35;
	transition: background-color .15s, opacity .15s, box-shadow .15s;
}
.tree-node:hover { background: #F3EAD9; color: var(--ink); }
.tree-node.is-female { border-style: dashed; }
.tree-name { font-weight: 600; }
.tree-meta { font-size: 12px; color: var(--muted); }
.tree-node.is-selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tree-node.is-selected .tree-meta { color: var(--on-accent-soft); }
.tree-node.is-match { box-shadow: 0 0 0 3px var(--gold-light); }
.tree-node.is-dim { opacity: .35; }
.tree-count { margin-top: 10px; font-size: 14px; color: var(--muted); }

.tree-toggle {
	width: 30px;
	height: 30px;
	margin-top: 6px;
	padding: 0;
	border: 1.5px solid var(--gold);
	border-radius: 50%;
	background: var(--card);
	color: var(--ink);
	font: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}
.tree-toggle:hover { background: var(--gold-light); }

/* Full tree: pannable / zoomable viewport. */
.tree.tree-box {
	position: relative;
	height: clamp(420px, 72vh, 780px);
	overflow: hidden;
	cursor: grab;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
}
.tree-box.is-dragging { cursor: grabbing; }
.tree-box .tree-inner { min-width: 0; transform-origin: 0 0; will-change: transform; }
.tree-box.is-animating .tree-inner { transition: transform .25s ease; }
.tree-controls {
	position: absolute;
	top: 12px;
	right: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	pointer-events: none;
}
.tree-controls > * { pointer-events: auto; }
.tree-ctl {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1.5px solid var(--gold);
	border-radius: 6px;
	background: var(--card);
	color: var(--ink);
	font: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.tree-ctl--text { font-size: 14px; }
.tree-ctl:hover { background: var(--gold-light); }
.tree-hint {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 8px;
	z-index: 2;
	margin: 0;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--card);
	opacity: .92;
	font-size: 12px;
	line-height: 1.4;
	color: var(--muted);
	pointer-events: none;
}

@media (max-width: 600px) {
	.tree.tree-box { height: clamp(380px, 62vh, 560px); }
	.tree-hint { right: auto; }
}

/* Fullscreen: tree + member panel fill the screen. The fixed position also
   covers browsers without element fullscreen (iPhone Safari). */
.tree-layout.is-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 100000;
	flex-wrap: nowrap;
	gap: 16px;
	margin: 0;
	padding: 16px;
	background: var(--paper);
}
.tree-layout.is-fullscreen .tree.tree-box { flex: 1 1 auto; height: auto; align-self: stretch; }
.tree-layout.is-fullscreen .member-panel {
	position: static;
	flex: 0 0 360px;
	max-height: 100%;
	overflow-y: auto;
}
.has-tree-fullscreen, .has-tree-fullscreen body { overflow: hidden; }
@media (max-width: 1023px) {
	.tree-layout.is-fullscreen { flex-direction: column; padding: 8px; gap: 8px; }
	.tree-layout.is-fullscreen .member-panel { flex: 0 0 auto; max-height: 38%; padding: 16px; gap: 12px; }
}

.tree--preview .tree-inner { padding: 0; }
.tree--preview .tree-node { min-width: 180px; max-width: 260px; font-size: 15px; padding: 10px 20px; }

/* Member panel */
.member-panel {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 28px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
}
@media (min-width: 1024px) {
	.member-panel { position: sticky; top: 24px; }
	.admin-bar .member-panel { top: 56px; }
}
.member-panel__head { display: flex; align-items: center; gap: 16px; }
.member-photo { flex: none; width: 80px; height: 80px; }
.member-photo img, .member-photo .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; font-size: 12px; }
.member-panel__name { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.member-panel__meta { font-size: 14px; color: var(--muted); }
.member-panel .info { font-size: 15px; }
.member-panel__bio h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.member-panel__bio p { margin: 0; font-size: 15px; color: var(--body); }
.member-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Single member page */
.member-layout { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 48px; padding-bottom: 96px; align-items: flex-start; }
.member-main { flex: 999 1 520px; min-width: 0; }
.member-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.member-card {
	display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start;
	padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 6px;
}
.member-card .info { flex: 1 1 260px; border-top: 0; padding-top: 0; }
.member-photo--lg { width: 160px; height: 160px; }
.sub-title { font-family: var(--serif); font-size: 28px; margin: 40px 0 12px; }
.side-box { padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.side-box h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.side-box ul { margin: 0; padding-left: 18px; }
.side-box li { padding: 2px 0; }
.side-box p { margin: 0; }

@media (max-width: 600px) {
	.hero__inner { padding-top: 56px; padding-bottom: 56px; gap: 36px; }
	.section { padding-top: 64px; padding-bottom: 64px; }
	.split { gap: 40px; }
	.event-card { padding: 20px; }
	.brand__name { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
