:root {
  --pfh-primary: #1D422E;
  --pfh-primary-hover: #173725;
  --pfh-secondary: #8B6C45;
  --pfh-text: #242019;
  --pfh-muted: #69625B;
  --pfh-accent: #F0EADF;
  --pfh-bg: #F9F7F1;
  --pfh-bg-alt: #F3EFE3;
  --pfh-border: #E2DED4;
  --pfh-white: #FFFFFF;
  --pfh-danger: #A53B32;
  --pfh-warning: #8B6C45;
  --pfh-info: #56697A;
  --pfh-radius-sm: 8px;
  --pfh-radius: 14px;
  --pfh-radius-lg: 22px;
  --pfh-shadow-sm: 0 2px 10px rgba(36, 32, 25, .05);
  --pfh-shadow: 0 14px 40px rgba(36, 32, 25, .08);
  --pfh-shadow-focus: 0 18px 50px rgba(29, 66, 46, .14);
  --pfh-container: 1280px;
  --pfh-font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --------------------------------------------------------------------------
 * Site-wide typography
 * --------------------------------------------------------------------------
 * IBM Plex Sans Arabic is the canonical typeface for the public website.
 * The selectors below intentionally avoid icon glyph elements so Font Awesome
 * and other icon libraries keep their own font-family.
 */
html,
body,
body.rtl,
body[class*="elementor-kit-"] {
  font-family: var(--pfh-font-family) !important;
}

body[class*="elementor-kit-"] {
  --e-global-typography-primary-font-family: "IBM Plex Sans Arabic";
  --e-global-typography-secondary-font-family: "IBM Plex Sans Arabic";
  --e-global-typography-text-font-family: "IBM Plex Sans Arabic";
  --e-global-typography-accent-font-family: "IBM Plex Sans Arabic";
}

body :where(
  h1, h2, h3, h4, h5, h6,
  p, li, blockquote, figcaption, cite,
  label, button, input, textarea, select, option,
  table, th, td,
  .elementor-heading-title,
  .elementor-widget-text-editor,
  .elementor-button,
  .elementor-item,
  .elementor-icon-list-text,
  .elementor-field,
  .elementor-tab-title,
  .elementor-tab-content,
  .elementor-accordion-title,
  .elementor-toggle-title,
  .elementor-post__title,
  .elementor-post__excerpt
) {
  font-family: var(--pfh-font-family) !important;
}

/* Links normally inherit typography; this covers Elementor navigation links
   that may have an explicit font configured in older templates. */
body .elementor-nav-menu a,
body .elementor-widget-button a,
body .elementor-widget-theme-post-title .elementor-heading-title {
  font-family: var(--pfh-font-family) !important;
}


.pfh-page,
.pfh-family-tree,
.pfh-family-tree * { box-sizing: border-box; }

.pfh-page {
  color: var(--pfh-text);
  background: var(--pfh-bg);
  line-height: 1.9;
  font-family: var(--pfh-font-family);
}

.pfh-page a { color: var(--pfh-primary); }
.pfh-page a:focus-visible,
.pfh-family-tree button:focus-visible,
.pfh-family-tree input:focus-visible { outline: 3px solid rgba(139, 108, 69, .35); outline-offset: 3px; }

.pfh-container {
  width: min(var(--pfh-container), calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(44px, 6vw, 96px);
}

.pfh-page-header,
.pfh-hero,
.pfh-story-hero { margin-block-end: clamp(40px, 6vw, 76px); }

.pfh-page-header h1,
.pfh-hero h1,
.pfh-story-hero h1 {
  font-family: var(--pfh-font-family);
  font-size: clamp(2.25rem, 5vw, 4.7rem);
  line-height: 1.3;
  margin: .16em 0;
  letter-spacing: -.018em;
  color: var(--pfh-text);
}

.pfh-eyebrow {
  color: var(--pfh-secondary);
  font-size: .88rem;
  font-weight: 700;
  margin: 0 0 8px;
}

/* Person hero */
.pfh-hero {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--pfh-border);
  border-radius: var(--pfh-radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(243,239,227,.75));
  box-shadow: var(--pfh-shadow-sm);
}
.pfh-hero--no-media { grid-template-columns: 1fr; text-align: center; }
.pfh-hero--no-media .pfh-hero__content { max-width: 840px; margin-inline: auto; }
.pfh-hero__media:empty { display: none; }
.pfh-hero__media img,
.pfh-story-hero img,
.pfh-archive-preview img,
.pfh-page > .pfh-container > img {
  width: 100%; height: auto; border-radius: var(--pfh-radius); display: block;
}
.pfh-person-years { color: var(--pfh-muted); margin: 4px 0 10px; font-size: .95rem; }
.pfh-person-intro { color: var(--pfh-muted); font-size: 1.05rem; max-width: 68ch; margin: 14px auto 0; }
.pfh-meta-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--pfh-muted); }
.pfh-hero--no-media .pfh-meta-line { justify-content: center; }

.pfh-prose { max-width: 780px; font-size: 1.075rem; }
.pfh-prose--wide { max-width: 900px; }
.pfh-prose p, .pfh-prose li { max-width: 72ch; }
.pfh-section { margin-block: clamp(56px, 8vw, 108px); }
.pfh-section > h2 {
  font-family: var(--pfh-font-family);
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.45;
  margin-block-end: 24px;
}

/* Generic cards */
.pfh-grid, .pfh-source-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pfh-card, .pfh-person-card, .pfh-source-card, .pfh-search-result {
  border: 1px solid var(--pfh-border);
  border-radius: var(--pfh-radius);
  background: var(--pfh-white);
  padding: 20px;
  box-shadow: var(--pfh-shadow-sm);
}
.pfh-card img, .pfh-person-card:not(.pfh-tree-node) img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: calc(var(--pfh-radius) - 5px); margin-block-end: 12px; }
.pfh-person-card h3, .pfh-card h2, .pfh-source-card h3 { margin: .2em 0; font-size: 1.05rem; }
.pfh-person-card a, .pfh-card a, .pfh-source-card a, .pfh-search-result a { color: inherit; text-decoration: none; }

/* Verification */
.pfh-verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--pfh-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .78rem;
  line-height: 1.25;
  background: var(--pfh-white);
  color: var(--pfh-muted);
  white-space: nowrap;
}
.pfh-verification-badge__symbol { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-weight: 800; }
.pfh-verification-badge small { font-weight: 800; color: var(--pfh-primary); padding-inline-start: 2px; }
.pfh-status-verified { border-color: rgba(29,66,46,.25); color: var(--pfh-primary); background: rgba(29,66,46,.055); }
.pfh-status-strongly_supported { border-color: rgba(139,108,69,.34); color: #6F542F; background: rgba(139,108,69,.07); }
.pfh-status-probable { border-color: rgba(105,98,91,.28); background: rgba(105,98,91,.06); }
.pfh-status-genealogical_tradition { border-color: rgba(139,108,69,.28); border-style: dashed; background: #FBF7EE; }
.pfh-status-under_review { border-style: dashed; color: var(--pfh-info); background: #F7F9FA; }
.pfh-status-unresolved { border-style: dashed; color: var(--pfh-danger); background: #FFF8F6; }

/* Family Tree — focused graph UX */
.pfh-family-tree {
  position: relative;
  border: 1px solid var(--pfh-border);
  border-radius: var(--pfh-radius-lg);
  background:
    radial-gradient(circle at 50% 0, rgba(240,234,223,.72), transparent 36%),
    linear-gradient(180deg, var(--pfh-white), #FCFAF5 55%, var(--pfh-bg-alt));
  box-shadow: var(--pfh-shadow-sm);
  overflow: visible;
  color: var(--pfh-text);
}

.pfh-tree-toolbar {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--pfh-border);
  background: rgba(255,255,255,.84);
  border-radius: var(--pfh-radius-lg) var(--pfh-radius-lg) 0 0;
  backdrop-filter: blur(8px);
}
.pfh-tree-search { position: relative; flex: 1 1 420px; max-width: 560px; }
.pfh-tree-search > label { display: block; margin-block-end: 7px; color: var(--pfh-muted); font-size: .79rem; font-weight: 700; }
.pfh-tree-search__control { position: relative; display: flex; align-items: center; }
.pfh-tree-search__icon { position: absolute; inset-inline-start: 13px; color: var(--pfh-muted); font-size: 1.15rem; pointer-events: none; }
.pfh-tree-search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--pfh-border);
  border-radius: 10px;
  background: var(--pfh-white);
  color: var(--pfh-text);
  padding-inline: 42px 38px;
  font: inherit;
  font-size: .93rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.pfh-tree-search input:focus { border-color: rgba(29,66,46,.55); box-shadow: 0 0 0 4px rgba(29,66,46,.07); outline: 0; }
.pfh-tree-search__clear { position: absolute; inset-inline-end: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--pfh-muted); font-size: 1.2rem; cursor: pointer; }
.pfh-tree-search__clear:hover { background: var(--pfh-accent); color: var(--pfh-primary); }
.pfh-tree-suggestions {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--pfh-border);
  border-radius: 12px;
  background: var(--pfh-white);
  box-shadow: var(--pfh-shadow);
  padding: 6px;
}
.pfh-tree-suggestion {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pfh-text);
  padding: 10px 12px;
  text-align: start;
  cursor: pointer;
  font: inherit;
}
.pfh-tree-suggestion:hover,
.pfh-tree-suggestion[aria-selected="true"] { background: var(--pfh-accent); color: var(--pfh-primary); }
.pfh-tree-suggestion small { color: var(--pfh-muted); }
.pfh-tree-suggestions__empty { padding: 12px; color: var(--pfh-muted); font-size: .88rem; }

.pfh-tree-nav { display: flex; gap: 8px; flex: 0 0 auto; }
.pfh-tree-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--pfh-border);
  border-radius: 9px;
  background: var(--pfh-white);
  color: var(--pfh-text);
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
}
.pfh-tree-nav__button:hover:not(:disabled) { border-color: rgba(29,66,46,.28); background: var(--pfh-accent); color: var(--pfh-primary); }
.pfh-tree-nav__button:disabled { opacity: .4; cursor: not-allowed; }

.pfh-tree-viewport { position: relative; min-height: 320px; padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 42px); overflow-x: auto; }
.pfh-tree-stage { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.pfh-tree-group { position: relative; width: 100%; }
.pfh-tree-group__heading { display: flex; align-items: center; justify-content: center; gap: 7px; margin-block-end: 14px; color: var(--pfh-muted); font-size: .82rem; font-weight: 700; }
.pfh-tree-group__heading small { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--pfh-accent); color: var(--pfh-secondary); font-size: .72rem; }
.pfh-tree-group-items { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: 14px; }
.pfh-tree-group--compact { width: auto; min-width: min(280px, 100%); }
.pfh-tree-group--compact .pfh-tree-group-items { flex-direction: column; }

.pfh-tree-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 42px);
  width: 100%;
}
.pfh-tree-focus { width: min(360px, 100%); flex: 0 1 360px; }
.pfh-tree-connector { width: 1px; height: 32px; background: linear-gradient(var(--pfh-border), var(--pfh-secondary), var(--pfh-border)); margin-inline: auto; position: relative; }
.pfh-tree-connector::after { content: ''; position: absolute; inset-inline-start: 50%; bottom: -1px; width: 7px; height: 7px; transform: translateX(-50%); border-radius: 50%; background: var(--pfh-bg); border: 2px solid var(--pfh-secondary); }
[dir="rtl"] .pfh-tree-connector::after { transform: translateX(50%); }
.pfh-tree-related { margin-block-start: 36px; padding-block-start: 28px; border-top: 1px dashed var(--pfh-border); }

.pfh-tree-node {
  width: min(260px, 100%);
  padding: 16px;
  border: 1px solid var(--pfh-border);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--pfh-shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pfh-tree-node:hover { transform: translateY(-2px); border-color: rgba(29,66,46,.28); box-shadow: var(--pfh-shadow); }
.pfh-tree-node.pfh-person-card--focus {
  width: 100%;
  padding: 20px;
  border: 1.5px solid var(--pfh-primary);
  background: linear-gradient(180deg, #FFFFFF, #F7F3E9);
  box-shadow: var(--pfh-shadow-focus);
}
.pfh-tree-node__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pfh-tree-node__avatar {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px;
  aspect-ratio: 1 !important;
  object-fit: cover;
  border-radius: 50% !important;
  margin: 0 !important;
  border: 1px solid var(--pfh-border);
}
.pfh-tree-node__avatar--placeholder { display: grid; place-items: center; background: var(--pfh-accent); color: var(--pfh-primary); font-weight: 800; font-size: 1.05rem; }
.pfh-tree-node__identity { min-width: 0; }
.pfh-tree-node__identity h3 { margin: 0; line-height: 1.45; font-size: .98rem; font-weight: 800; }
.pfh-tree-node__identity h3 a { color: var(--pfh-text); text-decoration: none; }
.pfh-tree-node__identity h3 a:hover { color: var(--pfh-primary); }
.pfh-tree-node__years { display: block; margin-block-start: 3px; color: var(--pfh-muted); font-size: .76rem; direction: ltr; text-align: start; }
.pfh-tree-node__meta { margin-block-start: 12px; }
.pfh-tree-node__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-start: 12px; padding-block-start: 10px; border-top: 1px solid rgba(226,222,212,.72); }
.pfh-tree-node__profile, .pfh-tree-focus-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--pfh-primary); font-size: .76rem; font-weight: 700; text-decoration: none; }
.pfh-tree-focus-btn { border: 0; background: transparent; cursor: pointer; padding: 4px; font-family: inherit; }
.pfh-tree-focus-btn:hover, .pfh-tree-node__profile:hover { text-decoration: underline; }

.pfh-tree-loading [data-pfh-tree-content] { opacity: .48; pointer-events: none; }
.pfh-tree-loading::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 36px; height: 36px;
  margin: -18px;
  border: 3px solid rgba(29,66,46,.15);
  border-top-color: var(--pfh-primary);
  border-radius: 50%;
  animation: pfh-spin .7s linear infinite;
  z-index: 30;
}
@keyframes pfh-spin { to { transform: rotate(360deg); } }

.pfh-tree-legend { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--pfh-border); background: rgba(255,255,255,.78); border-radius: 0 0 var(--pfh-radius-lg) var(--pfh-radius-lg); }
.pfh-tree-legend > strong { font-size: .82rem; color: var(--pfh-text); }
.pfh-tree-legend__items { display: flex; flex-wrap: wrap; gap: 9px 14px; }
.pfh-tree-legend__item { display: inline-flex; align-items: center; gap: 5px; color: var(--pfh-muted); font-size: .75rem; }
.pfh-tree-legend__item b { color: currentColor; font-size: .95rem; }

/* Evidence and research */
.pfh-evidence-panel { display: grid; gap: 14px; }
.pfh-evidence-item { border: 1px solid var(--pfh-border); border-radius: 12px; background: var(--pfh-white); padding: 14px 16px; box-shadow: var(--pfh-shadow-sm); }
.pfh-evidence-item summary { cursor: pointer; font-weight: 700; }
.pfh-conflict-notice { border-inline-start: 4px solid var(--pfh-secondary); background: var(--pfh-bg-alt); padding: 18px 20px; border-radius: 12px; }
.pfh-conflict-notice .pfh-status { display: inline-block; margin-block-end: 8px; font-size: .8rem; font-weight: 800; color: var(--pfh-secondary); }

/* Timeline */
.pfh-timeline { position: relative; display: grid; gap: 0; }
.pfh-timeline::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 96px; width: 1px; background: var(--pfh-border); }
.pfh-timeline-item { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 34px; padding-block: 22px; position: relative; }
.pfh-timeline-year { font-weight: 800; color: var(--pfh-secondary); text-align: end; }
.pfh-timeline-content { border: 1px solid var(--pfh-border); border-radius: 12px; padding: 16px 18px; background: var(--pfh-white); }
.pfh-timeline-content::before { content: ''; position: absolute; inset-inline-start: 92px; margin-block-start: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--pfh-bg); border: 2px solid var(--pfh-secondary); }

/* Forms */
.pfh-contribution-form, .pfh-search-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; max-width: 860px; }
.pfh-contribution-form label { display: grid; gap: 7px; font-weight: 600; }
.pfh-contribution-form input, .pfh-contribution-form select, .pfh-contribution-form textarea, .pfh-search-form input { width: 100%; border: 1px solid var(--pfh-border); border-radius: 9px; padding: 12px 14px; background: var(--pfh-white); color: var(--pfh-text); font: inherit; }
.pfh-contribution-form textarea { min-height: 140px; }
.pfh-wide { grid-column: 1 / -1; }
.pfh-button { appearance: none; display: inline-flex; justify-content: center; align-items: center; min-height: 42px; border: 1px solid var(--pfh-primary); border-radius: 9px; padding: 10px 18px; color: #fff; background: var(--pfh-primary); font-weight: 700; text-decoration: none; cursor: pointer; font-family: inherit; }
.pfh-button:hover { background: var(--pfh-primary-hover); }
.pfh-search-form { grid-template-columns: 1fr auto; margin-block-end: 24px; }
.pfh-search-results { display: grid; gap: 10px; }
.pfh-search-result span { font-size: .75rem; text-transform: uppercase; color: var(--pfh-muted); }

.pfh-empty, .pfh-notice { border: 1px dashed var(--pfh-border); border-radius: 12px; background: var(--pfh-bg-alt); padding: 18px; color: var(--pfh-muted); }
.pfh-empty--tree { display: grid; gap: 4px; text-align: center; }
.pfh-empty--tree strong { color: var(--pfh-text); }
.pfh-success { border-style: solid; border-color: rgba(29,66,46,.25); }
.pfh-error { border-style: solid; border-color: var(--pfh-danger); }

/* Data tables */
.pfh-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--pfh-border); border-radius: 12px; background: var(--pfh-white); }
.pfh-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.pfh-table th, .pfh-table td { border-bottom: 1px solid var(--pfh-border); padding: 12px 14px; text-align: start; vertical-align: top; }
.pfh-table th { background: var(--pfh-bg-alt); color: var(--pfh-muted); font-size: .8rem; }
.pfh-table tr:last-child td { border-bottom: 0; }
.pfh-source-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--pfh-border); border: 1px solid var(--pfh-border); border-radius: 12px; overflow: hidden; margin-block-end: 32px; }
.pfh-source-details > div { background: var(--pfh-white); padding: 14px; }
.pfh-source-details dt { color: var(--pfh-muted); font-size: .8rem; }
.pfh-source-details dd { margin: 4px 0 0; font-weight: 700; }
.pfh-transcription { white-space: normal; background: var(--pfh-bg-alt); padding: 20px; border-radius: 12px; }
.pfh-rights { color: var(--pfh-muted); font-size: .9rem; }
.pfh-contribute-cta { padding: clamp(24px,4vw,46px); background: var(--pfh-bg-alt); border: 1px solid var(--pfh-border); border-radius: var(--pfh-radius-lg); }

@media (max-width: 900px) {
  .pfh-grid, .pfh-source-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pfh-hero { grid-template-columns: 1fr; }
  .pfh-hero__media { max-width: 440px; margin-inline: auto; }
  .pfh-tree-center { flex-direction: column; }
  .pfh-tree-group--compact { width: 100%; }
  .pfh-tree-group--compact .pfh-tree-group-items { flex-direction: row; }
}

@media (max-width: 680px) {
  .pfh-container { width: min(100% - 28px, var(--pfh-container)); padding-block: 34px; }
  .pfh-grid, .pfh-source-list, .pfh-contribution-form { grid-template-columns: 1fr; }
  .pfh-wide { grid-column: auto; }
  .pfh-tree-toolbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .pfh-tree-search { max-width: none; flex-basis: auto; }
  .pfh-tree-nav { width: 100%; }
  .pfh-tree-nav__button { flex: 1 1 0; }
  .pfh-tree-viewport { padding: 28px 12px; overflow-x: hidden; }
  .pfh-tree-group-items { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; padding: 3px 4px 10px; margin-inline: -4px; }
  .pfh-tree-node { flex: 0 0 min(260px, 82vw); scroll-snap-align: center; }
  .pfh-tree-focus { width: min(100%, 360px); }
  .pfh-tree-legend { align-items: flex-start; flex-direction: column; padding: 14px; }
  .pfh-tree-legend__items { gap: 8px 12px; }
  .pfh-timeline::before { inset-inline-start: 9px; }
  .pfh-timeline-item { grid-template-columns: 1fr; gap: 8px; padding-inline-start: 28px; }
  .pfh-timeline-year { text-align: start; }
  .pfh-timeline-content::before { inset-inline-start: 5px; margin-block-start: -29px; }
  .pfh-source-details { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .pfh-container { width: min(100% - 22px, var(--pfh-container)); }
  .pfh-tree-node { flex-basis: min(242px, 86vw); }
  .pfh-search-form { grid-template-columns: 1fr; }
  .pfh-hero { padding: 22px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .pfh-page *, .pfh-family-tree * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Branch listing and public research questions */
.pfh-branch-grid,.pfh-question-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.pfh-branch-card,.pfh-question-card{border:1px solid var(--pfh-border,#E2DED4);background:var(--pfh-white,#fff);border-radius:12px;padding:1.25rem;box-shadow:0 10px 30px rgba(36,32,25,.035)}.pfh-branch-card__head{display:flex;align-items:flex-start;gap:.8rem}.pfh-branch-card__mark{inline-size:2.4rem;block-size:2.4rem;border-radius:50%;display:grid;place-items:center;background:var(--pfh-accent,#F0EADF);color:var(--pfh-primary,#1D422E);font-weight:700}.pfh-branch-card h3,.pfh-question-card h3{margin:.1rem 0 .45rem}.pfh-branch-card h3 a{color:var(--pfh-text,#242019);text-decoration:none}.pfh-branch-card__strength{margin:0;color:var(--pfh-muted,#69625B);font-size:.88rem}.pfh-branch-card__footer{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--pfh-border,#E2DED4)}.pfh-branch-card__footer>a{color:var(--pfh-primary,#1D422E);font-weight:600;text-decoration:none}.pfh-open-questions{display:grid;gap:2rem}.pfh-open-questions__section>h2{margin-block:0 1rem}.pfh-question-card__meta{display:flex;justify-content:space-between;gap:.75rem;color:var(--pfh-secondary,#8B6C45);font-size:.84rem;font-weight:600}.pfh-question-card__statement{font-size:1.05rem;font-weight:600;line-height:1.8}.pfh-question-card--claim{background:var(--pfh-background-alt,#F3EFE3)}@media(max-width:900px){.pfh-branch-grid,.pfh-question-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.pfh-branch-grid,.pfh-question-grid{grid-template-columns:1fr}.pfh-branch-card__footer{align-items:flex-start;flex-direction:column}}

/* 0.3.0 — Approved Elementor template components */
.pfh-entity-card {
  overflow: hidden;
  border: 1px solid var(--pfh-border);
  border-radius: 12px;
  background: var(--pfh-white);
  box-shadow: var(--pfh-shadow-sm);
}
.pfh-entity-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--pfh-bg-alt); }
.pfh-entity-card__media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .22s ease; }
.pfh-entity-card:hover .pfh-entity-card__media img { transform: scale(1.025); }
.pfh-entity-card__body { display: grid; gap: 9px; padding: 20px; }
.pfh-entity-card__eyebrow { color: var(--pfh-secondary); font-size: .74rem; font-weight: 800; letter-spacing: .02em; }
.pfh-entity-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.65; }
.pfh-entity-card h3 a { color: var(--pfh-text); text-decoration: none; }
.pfh-entity-card h3 a:hover { color: var(--pfh-primary); }
.pfh-entity-card__meta { margin: 0; color: var(--pfh-secondary); font-size: .84rem; font-weight: 600; }
.pfh-entity-card__excerpt { margin: 0; color: var(--pfh-muted); font-size: .92rem; line-height: 1.8; }
.pfh-entity-card__footer { padding-block-start: 4px; }
.pfh-source-card__bibliography { margin: .35rem 0; color: var(--pfh-muted); font-size: .86rem; }
.pfh-source-card__footer { margin-block-start: .8rem; }

.pfh-relation-groups { display: grid; gap: 20px; }
.pfh-relation-group { display: grid; gap: 10px; }
.pfh-relation-group h4 { margin: 0; color: var(--pfh-text); font-size: .92rem; }
.pfh-relation-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pfh-relation-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--pfh-border);
  border-radius: 999px;
  background: var(--pfh-bg);
  color: var(--pfh-primary);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}
.pfh-relation-chip:hover { background: var(--pfh-accent); border-color: rgba(29,66,46,.25); }

.pfh-detail-list { display: grid; gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--pfh-border); border-radius: 12px; background: var(--pfh-border); }
.pfh-detail-list > div { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 13px 15px; background: var(--pfh-white); }
.pfh-detail-list dt { color: var(--pfh-muted); font-size: .82rem; }
.pfh-detail-list dd { margin: 0; color: var(--pfh-text); font-weight: 700; }

.pfh-source-reliability { display: grid; gap: 12px; }
.pfh-source-reliability > p { margin: 0; }
.pfh-source-reliability__note { padding: 18px 20px; border-inline-start: 4px solid var(--pfh-secondary); border-radius: 10px; background: var(--pfh-bg-alt); color: var(--pfh-text); }
.pfh-source-reliability__note p { margin-block: 0 .8em; }
.pfh-source-reliability__note p:last-child { margin-block-end: 0; }

.pfh-linked-entities { display: grid; gap: 9px; }
.pfh-linked-entity { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid var(--pfh-border); border-radius: 9px; background: var(--pfh-white); }
.pfh-linked-entity > span { color: var(--pfh-secondary); font-size: .76rem; font-weight: 800; }
.pfh-linked-entity a, .pfh-linked-entity strong { color: var(--pfh-text); font-weight: 700; text-decoration: none; }
.pfh-linked-entity a:hover { color: var(--pfh-primary); }

.pfh-history-overview { display: grid; gap: 18px; }
.pfh-history-overview__grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.pfh-stat-card { display: grid; gap: 3px; min-height: 104px; place-content: center; text-align: center; border: 1px solid var(--pfh-border); border-radius: 12px; background: var(--pfh-white); color: var(--pfh-text); text-decoration: none; box-shadow: var(--pfh-shadow-sm); }
.pfh-stat-card strong { color: var(--pfh-primary); font: 800 1.5rem/1.2 var(--pfh-font-family); }
.pfh-stat-card span { color: var(--pfh-muted); font-size: .84rem; }
.pfh-stat-card:hover { border-color: rgba(29,66,46,.3); background: var(--pfh-accent); }
.pfh-history-overview__range { margin: 0; color: var(--pfh-muted); }

.pfh-contact-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; max-width: 860px; }
.pfh-contact-form label { display: grid; gap: 7px; font-weight: 600; }
.pfh-contact-form input, .pfh-contact-form textarea { width: 100%; border: 1px solid var(--pfh-border); border-radius: 9px; padding: 12px 14px; background: var(--pfh-white); color: var(--pfh-text); font: inherit; }
.pfh-contact-form textarea { min-height: 160px; resize: vertical; }
.pfh-contact-form .pfh-checkbox { display: flex; grid-column: 1 / -1; flex-direction: row; align-items: flex-start; gap: 9px; font-weight: 500; }
.pfh-contact-form .pfh-checkbox input { width: auto; margin-block-start: .35em; }
.pfh-honeypot { position: absolute !important; inset-inline-start: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.pfh-evidence-item__body blockquote { margin: 12px 0; padding: 12px 16px; border-inline-start: 3px solid var(--pfh-secondary); background: var(--pfh-bg-alt); color: var(--pfh-text); }

@media (max-width: 900px) {
  .pfh-history-overview__grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .pfh-detail-list > div { grid-template-columns: 1fr; gap: 3px; }
  .pfh-linked-entity { grid-template-columns: 1fr; gap: 3px; }
  .pfh-history-overview__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pfh-contact-form { grid-template-columns: 1fr; }
  .pfh-contact-form .pfh-wide, .pfh-contact-form .pfh-checkbox { grid-column: auto; }
}
@media (max-width: 420px) {
  .pfh-history-overview__grid { grid-template-columns: 1fr; }
}

/* 0.3.0 listing cards — people and archive grids */
.pfh-grid--listing { align-items: stretch; }
.pfh-listing-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.pfh-listing-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--pfh-bg-alt); }
.pfh-listing-card__media img { width: 100%; height: 100%; margin: 0 !important; border-radius: 0 !important; object-fit: cover; transition: transform .22s ease; }
.pfh-listing-card:hover .pfh-listing-card__media img { transform: scale(1.025); }
.pfh-listing-card__body { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 20px; }
.pfh-listing-card__eyebrow { color: var(--pfh-secondary); font-size: .74rem; font-weight: 800; }
.pfh-listing-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.65; }
.pfh-listing-card h3 a { color: var(--pfh-text); text-decoration: none; }
.pfh-listing-card h3 a:hover { color: var(--pfh-primary); }
.pfh-listing-card__meta { margin: 0; color: var(--pfh-secondary); font-size: .83rem; font-weight: 700; }
.pfh-listing-card__excerpt { margin: 0; color: var(--pfh-muted); font-size: .9rem; line-height: 1.8; }
.pfh-listing-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block-start: auto; padding-block-start: 10px; border-top: 1px solid var(--pfh-border); }
.pfh-listing-card__footer > a { color: var(--pfh-primary); font-size: .82rem; font-weight: 800; text-decoration: none; }
.pfh-listing-card__footer > a:hover { text-decoration: underline; }

/* 0.3.1 — Shared public form system, RTL/localization polish */
.pfh-form-shell,
.pfh-form-shell * { box-sizing: border-box; }

.pfh-form-shell {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  color: var(--pfh-text);
  font-family: var(--pfh-font-family);
}

.pfh-form-shell .pfh-form {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.pfh-form-shell .pfh-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  width: 100%;
}

.pfh-form-shell .pfh-form-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pfh-form-shell .pfh-form-field--wide,
.pfh-form-shell .pfh-form-actions,
.pfh-form-shell .pfh-form-consents {
  grid-column: 1 / -1;
}

.pfh-form-shell .pfh-form-label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  color: var(--pfh-text);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.55;
}

.pfh-form-shell .pfh-form-required {
  color: var(--pfh-secondary);
  font-weight: 800;
}

.pfh-form-shell .pfh-form-control {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--pfh-border);
  border-radius: 8px;
  outline: 0;
  background: var(--pfh-white);
  color: var(--pfh-text);
  box-shadow: none;
  font: 500 .96rem/1.5 var(--pfh-font-family);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.pfh-form-shell select.pfh-form-control {
  padding-inline-end: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--pfh-muted) 50%),
    linear-gradient(135deg, var(--pfh-muted) 50%, transparent 50%);
  background-position:
    calc(16px) calc(50% - 2px),
    calc(11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.pfh-form-shell[dir="ltr"] select.pfh-form-control {
  padding-inline-end: 42px;
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
}

.pfh-form-shell .pfh-form-control:hover {
  border-color: #D5D0C5;
}

.pfh-form-shell .pfh-form-control:focus,
.pfh-form-shell .pfh-form-control:focus-visible {
  border-color: var(--pfh-primary);
  box-shadow: 0 0 0 4px rgba(29, 66, 46, .10);
}

.pfh-form-shell .pfh-form-control[aria-invalid="true"] {
  border-color: var(--pfh-danger);
  box-shadow: 0 0 0 4px rgba(165, 59, 50, .08);
}

.pfh-form-shell .pfh-form-textarea {
  min-height: 172px;
  height: auto;
  padding-block: 13px;
  resize: vertical;
  line-height: 1.85;
}

.pfh-form-shell .pfh-form-consents {
  display: grid;
  gap: 12px;
  padding-block-start: 2px;
}

.pfh-form-shell .pfh-form-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  color: var(--pfh-text);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.75;
  cursor: pointer;
}

.pfh-form-shell .pfh-form-checkbox input[type="checkbox"] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: .28em 0 0;
  accent-color: var(--pfh-primary);
  cursor: pointer;
}

.pfh-form-shell .pfh-form-checkbox a {
  color: var(--pfh-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pfh-form-shell .pfh-form-checkbox input[type="checkbox"]:focus-visible,
.pfh-form-shell .pfh-form-upload__button:focus-visible,
.pfh-form-shell .pfh-form-submit:focus-visible {
  outline: 3px solid rgba(139, 108, 69, .28);
  outline-offset: 3px;
}

.pfh-form-shell .pfh-form-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  min-height: 126px;
  padding: 20px;
  border: 1px dashed #CFC7B7;
  border-radius: 10px;
  background: var(--pfh-bg);
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.pfh-form-shell .pfh-form-upload:hover,
.pfh-form-shell .pfh-form-upload.is-dragover {
  border-color: var(--pfh-primary);
  background: #FBFCF9;
  box-shadow: 0 0 0 4px rgba(29, 66, 46, .06);
}

.pfh-form-shell .pfh-form-upload.is-error {
  border-color: var(--pfh-danger);
  background: #FFF9F8;
}

.pfh-form-shell .pfh-form-upload__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--pfh-border);
  border-radius: 50%;
  background: var(--pfh-accent);
  color: var(--pfh-primary);
  font: 800 1.25rem/1 var(--pfh-font-family);
}

.pfh-form-shell .pfh-form-upload__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pfh-form-shell .pfh-form-upload__copy strong {
  color: var(--pfh-text);
  font-size: .95rem;
  font-weight: 700;
}

.pfh-form-shell .pfh-form-upload__copy span,
.pfh-form-shell .pfh-form-upload__filename {
  color: var(--pfh-muted);
  font-size: .82rem;
  line-height: 1.7;
}

.pfh-form-shell .pfh-form-upload__button {
  appearance: none;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--pfh-primary);
  border-radius: 8px;
  background: var(--pfh-white);
  color: var(--pfh-primary);
  font: 700 .86rem/1.4 var(--pfh-font-family);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}

.pfh-form-shell .pfh-form-upload__button:hover {
  background: var(--pfh-accent);
}

.pfh-form-shell .pfh-form-upload__filename {
  grid-column: 2 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pfh-form-shell .pfh-form-upload.has-file .pfh-form-upload__filename {
  color: var(--pfh-primary);
  font-weight: 700;
}

.pfh-form-shell .pfh-form-actions {
  display: flex;
  justify-content: flex-start;
  padding-block-start: 2px;
}

.pfh-form-shell[dir="rtl"] .pfh-form-actions { justify-content: flex-start; }

.pfh-form-shell .pfh-form-submit {
  width: min(100%, 290px);
  min-height: 50px;
  border-radius: 8px;
  padding-inline: 24px;
  background: var(--pfh-primary);
  color: var(--pfh-white);
  font-weight: 800;
  transition: background-color .16s ease, opacity .16s ease;
}

.pfh-form-shell .pfh-form-submit:hover { background: var(--pfh-primary-hover); }
.pfh-form-shell .pfh-form-submit:disabled,
.pfh-form-shell .pfh-form-submit[aria-disabled="true"] { opacity: .68; cursor: wait; }

.pfh-form-message {
  width: 100%;
  margin-block-end: 20px;
  padding: 14px 16px;
  border: 1px solid var(--pfh-border);
  border-radius: 9px;
  background: var(--pfh-bg-alt);
  color: var(--pfh-text);
  font-size: .93rem;
  line-height: 1.75;
}

.pfh-form-success {
  border-color: rgba(29, 66, 46, .24);
  background: rgba(29, 66, 46, .055);
  color: var(--pfh-primary);
}

.pfh-form-error {
  border-color: rgba(165, 59, 50, .45);
  background: rgba(165, 59, 50, .045);
  color: #7B2E28;
}

.pfh-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pfh-honeypot {
  position: absolute !important;
  inset-inline-start: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.pfh-empty--tree {
  justify-items: center;
  gap: 9px;
  padding: 24px 20px;
}
.pfh-empty--tree strong { font: 700 1rem/1.65 var(--pfh-font-family); }
.pfh-empty--tree span { max-width: 52ch; }
.pfh-empty__action { margin-block-start: 6px; min-height: 42px; }
.pfh-button--secondary { color: var(--pfh-primary); background: transparent; }
.pfh-button--secondary:hover { color: #fff; background: var(--pfh-primary); }

.pfh-verification-badge__grade {
  display: inline-flex;
  align-items: center;
  padding-inline-start: 7px;
  margin-inline-start: 3px;
  border-inline-start: 1px solid currentColor;
  opacity: .86;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .pfh-form-shell .pfh-form-grid { grid-template-columns: 1fr; gap: 18px; }
  .pfh-form-shell .pfh-form-field--wide,
  .pfh-form-shell .pfh-form-actions,
  .pfh-form-shell .pfh-form-consents { grid-column: auto; }
  .pfh-form-shell .pfh-form-upload { grid-template-columns: auto minmax(0, 1fr); }
  .pfh-form-shell .pfh-form-upload__button { grid-column: 1 / -1; width: 100%; }
  .pfh-form-shell .pfh-form-upload__filename { grid-column: 1 / -1; }
  .pfh-form-shell .pfh-form-submit { width: 100%; }
}

@media (max-width: 420px) {
  .pfh-form-shell .pfh-form-upload {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 17px;
  }
  .pfh-form-shell .pfh-form-upload__button,
  .pfh-form-shell .pfh-form-upload__filename { grid-column: auto; width: 100%; }
  .pfh-form-shell .pfh-form-control { font-size: .92rem; }
}

/* 0.3.2-alpha Stage C — documentation context and disambiguation */
.pfh-listing-card__context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block: 2px 4px;
}
.pfh-listing-card__context > span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--pfh-border);
  border-radius: 9px;
  background: var(--pfh-bg-alt);
  color: var(--pfh-text);
  font-size: .78rem;
  line-height: 1.55;
}
.pfh-listing-card__context small {
  display: block;
  color: var(--pfh-muted);
  font-size: .68rem;
  font-weight: 700;
}
.pfh-listing-card__context a,
.pfh-listing-card__context strong { color: var(--pfh-primary); font-weight: 800; text-decoration: none; }
.pfh-listing-card__lineage {
  margin: 0;
  color: var(--pfh-muted);
  font-size: .76rem;
  line-height: 1.65;
}
.pfh-listing-card__lineage > span { color: var(--pfh-secondary); font-weight: 800; }

.pfh-branch-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-block: 16px 12px;
}
.pfh-branch-card__facts > span {
  padding: 10px 11px;
  border: 1px solid var(--pfh-border);
  border-radius: 10px;
  background: var(--pfh-bg-alt);
  line-height: 1.55;
}
.pfh-branch-card__facts small { display: block; color: var(--pfh-muted); font-size: .72rem; font-weight: 700; }
.pfh-branch-card__facts a,
.pfh-branch-card__facts strong { color: var(--pfh-primary); font-weight: 800; text-decoration: none; }
.pfh-branch-card__summary { margin: 0; color: var(--pfh-text); font-size: .9rem; line-height: 1.8; }
.pfh-branch-card__note {
  margin-block: 12px 0;
  padding-block-start: 12px;
  border-top: 1px dashed var(--pfh-border);
  color: var(--pfh-muted);
  font-size: .84rem;
  line-height: 1.8;
}

.pfh-tree-lineage {
  width: min(100%, 920px);
  margin-inline: auto;
  padding: 12px 14px;
  border: 1px solid var(--pfh-border);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--pfh-shadow-sm);
}
.pfh-tree-lineage__label {
  display: block;
  margin-block-end: 7px;
  color: var(--pfh-secondary);
  font-size: .72rem;
  font-weight: 800;
}
.pfh-tree-lineage ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .78rem;
}
.pfh-tree-lineage li { display: inline-flex; align-items: center; gap: 8px; }
.pfh-tree-lineage li:not(:last-child)::after { content: '←'; color: var(--pfh-secondary); opacity: .72; }
.pfh-tree-lineage a { color: var(--pfh-primary); font-weight: 700; text-decoration: none; }
.pfh-tree-lineage [aria-current="page"] { color: var(--pfh-text); }

.pfh-tree-node__context {
  display: grid;
  gap: 3px;
  margin-block: 8px 2px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--pfh-bg-alt);
  color: var(--pfh-muted);
  font-size: .7rem;
  line-height: 1.55;
}
.pfh-tree-node__context a { color: var(--pfh-primary); font-weight: 700; text-decoration: none; }

.pfh-person-context {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--pfh-border);
  border-radius: var(--pfh-radius);
  background: var(--pfh-white);
  box-shadow: var(--pfh-shadow-sm);
}
.pfh-person-context__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pfh-person-context__fact {
  padding: 12px;
  border-radius: 10px;
  background: var(--pfh-bg-alt);
}
.pfh-person-context__fact > span { display: block; color: var(--pfh-muted); font-size: .74rem; font-weight: 700; }
.pfh-person-context__fact strong { display: block; margin-block-start: 3px; color: var(--pfh-text); font-size: .9rem; }
.pfh-person-context__fact a { color: var(--pfh-primary); text-decoration: none; }
.pfh-person-context__lineage > span { display: block; margin-block-end: 8px; color: var(--pfh-secondary); font-size: .76rem; font-weight: 800; }
.pfh-person-context__lineage ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .84rem;
}
.pfh-person-context__lineage li { display: inline-flex; align-items: center; gap: 8px; }
.pfh-person-context__lineage li:not(:last-child)::after { content: '←'; color: var(--pfh-secondary); }
.pfh-person-context__lineage a { color: var(--pfh-primary); font-weight: 700; text-decoration: none; }
.pfh-person-context__sources { display: grid; gap: 8px; }
.pfh-person-context__source {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--pfh-border);
  border-radius: 9px;
  color: var(--pfh-text);
  text-decoration: none;
}
.pfh-person-context__source span { font-weight: 700; }
.pfh-person-context__source small { color: var(--pfh-muted); }

@media (max-width: 900px) {
  .pfh-listing-card__context,
  .pfh-person-context__facts { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .pfh-branch-card__facts { grid-template-columns: 1fr; }
  .pfh-tree-lineage { padding: 10px 11px; }
  .pfh-person-context__source { align-items: flex-start; flex-direction: column; }
}

/* 0.3.3-alpha Stage D — tree search, verification legend and evidence/source polish */
.pfh-family-tree .pfh-tree-toolbar {
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
}
.pfh-family-tree .pfh-tree-search {
  flex: 1 1 520px;
  max-width: 680px;
}
.pfh-family-tree .pfh-tree-search > label {
  margin-block-end: 8px;
  color: var(--pfh-text);
  font-size: .78rem;
  font-weight: 800;
}
.pfh-family-tree .pfh-tree-search__control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--pfh-border);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff 0%, #fdfcf9 100%);
  box-shadow: 0 7px 22px rgba(36,32,25,.055);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.pfh-family-tree .pfh-tree-search__control:focus-within {
  border-color: rgba(29,66,46,.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(29,66,46,.07), 0 10px 28px rgba(36,32,25,.07);
}
.pfh-family-tree .pfh-tree-search__icon {
  position: absolute;
  inset-inline-start: 16px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: var(--pfh-primary);
  pointer-events: none;
}
.pfh-family-tree .pfh-tree-search__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.pfh-family-tree .pfh-tree-search input {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 15px;
  outline: 0;
  background: transparent;
  color: var(--pfh-text);
  padding-inline: 50px 48px;
  font: inherit;
  font-size: .95rem;
  box-shadow: none;
}
.pfh-family-tree .pfh-tree-search input:focus { border: 0; box-shadow: none; outline: 0; }
.pfh-family-tree .pfh-tree-search input::placeholder { color: #8a857d; opacity: 1; }
.pfh-family-tree .pfh-tree-search__clear {
  position: absolute;
  inset-inline-end: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent !important;
  color: var(--pfh-muted) !important;
  padding: 0 !important;
  font: 500 1.25rem/1 inherit;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.pfh-family-tree .pfh-tree-search__clear:hover,
.pfh-family-tree .pfh-tree-search__clear:focus-visible {
  border-color: var(--pfh-border);
  background: var(--pfh-accent) !important;
  color: var(--pfh-primary) !important;
  outline: 0;
}
.pfh-family-tree .pfh-tree-suggestions {
  position: absolute;
  z-index: 50;
  inset-inline: 0;
  top: calc(100% + 10px);
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(139,108,69,.22);
  border-radius: 16px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 18px 45px rgba(36,32,25,.14);
  padding: 8px;
}
.pfh-family-tree .pfh-tree-suggestion {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 22px;
  align-items: center;
  gap: 11px;
  appearance: none;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--pfh-text) !important;
  padding: 8px 10px !important;
  text-align: start;
  cursor: pointer;
  font: inherit;
  box-shadow: none !important;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.pfh-family-tree .pfh-tree-suggestion + .pfh-tree-suggestion { margin-block-start: 3px; }
.pfh-family-tree .pfh-tree-suggestion:hover,
.pfh-family-tree .pfh-tree-suggestion:focus-visible,
.pfh-family-tree .pfh-tree-suggestion[aria-selected="true"] {
  border-color: rgba(29,66,46,.14) !important;
  background: var(--pfh-bg-alt) !important;
  color: var(--pfh-primary) !important;
  outline: 0;
}
.pfh-tree-suggestion__avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pfh-border);
  border-radius: 50%;
  background: var(--pfh-accent);
  color: var(--pfh-primary);
  font-size: .82rem;
  font-weight: 800;
}
.pfh-tree-suggestion__content { min-width: 0; display: grid; gap: 2px; }
.pfh-tree-suggestion__content strong {
  overflow: hidden;
  color: var(--pfh-text);
  font-size: .92rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pfh-tree-suggestion__content small {
  overflow: hidden;
  color: var(--pfh-muted);
  font-size: .75rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pfh-tree-suggestion__arrow { color: var(--pfh-secondary); opacity: .78; font-size: .9rem; }
.pfh-family-tree .pfh-tree-suggestions__empty {
  padding: 18px 14px;
  border-radius: 11px;
  background: var(--pfh-bg-alt);
  color: var(--pfh-muted);
  text-align: center;
  font-size: .86rem;
}

.pfh-tree-lineage {
  margin-block: 0 28px;
  padding: 13px 16px;
}
.pfh-tree-lineage__label { margin-block-end: 9px; }
.pfh-tree-lineage ol { row-gap: 9px; }

.pfh-tree-legend {
  gap: 12px 20px;
  padding: 15px 20px;
  border-top: 1px solid var(--pfh-border);
  background: rgba(255,255,255,.9);
}
.pfh-tree-legend__items { gap: 8px 10px; }
.pfh-tree-legend__item,
.pfh-tree-legend__item.pfh-status-verified,
.pfh-tree-legend__item.pfh-status-strongly_supported,
.pfh-tree-legend__item.pfh-status-probable,
.pfh-tree-legend__item.pfh-status-genealogical_tradition,
.pfh-tree-legend__item.pfh-status-under_review,
.pfh-tree-legend__item.pfh-status-unresolved {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  padding: 4px 8px;
  color: var(--pfh-muted);
  font-size: .75rem;
}
.pfh-tree-legend__item b {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--pfh-border);
  border-radius: 50%;
  background: var(--pfh-bg-alt);
  color: var(--pfh-primary);
  font-size: .8rem;
}

/* Linked source cards should fill the available Elementor column instead of
   reserving three empty grid tracks when only one source exists. */
.pfh-source-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.pfh-source-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border-radius: 14px;
}
.pfh-source-card h3 {
  margin: 0;
  color: var(--pfh-text);
  font-size: .98rem;
  line-height: 1.8;
}
.pfh-source-card h3 a:hover { color: var(--pfh-primary); }
.pfh-source-card__bibliography,
.pfh-source-meta { margin: 0; color: var(--pfh-muted); line-height: 1.7; }
.pfh-source-card__footer { margin-block-start: auto; padding-block-start: 8px; }

.pfh-evidence-panel { gap: 16px; min-width: 0; }
.pfh-evidence-panel > h3 { margin: 0 0 2px; }
.pfh-evidence-list { display: grid; gap: 10px; min-width: 0; }
.pfh-evidence-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--pfh-border);
  border-radius: 14px;
  background: var(--pfh-white);
  padding: 0;
  box-shadow: var(--pfh-shadow-sm);
}
.pfh-evidence-item summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 22px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 13px 15px;
  list-style: none;
  cursor: pointer;
  font-weight: 400;
}
.pfh-evidence-item summary::-webkit-details-marker { display: none; }
.pfh-evidence-item[open] summary { border-bottom: 1px solid var(--pfh-border); background: #fffdf9; }
.pfh-evidence-item__summary-main { min-width: 0; display: grid; gap: 2px; }
.pfh-evidence-item__kicker { color: var(--pfh-secondary); font-size: .68rem; font-weight: 800; }
.pfh-evidence-item__title {
  overflow: hidden;
  color: var(--pfh-text);
  font-size: .9rem;
  line-height: 1.6;
  text-overflow: ellipsis;
}
.pfh-evidence-item__reference { color: var(--pfh-muted); font-size: .72rem; }
.pfh-evidence-item__summary-status { display: flex; align-items: center; }
.pfh-evidence-item__chevron {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--pfh-secondary);
  transition: transform .16s ease;
}
.pfh-evidence-item[open] .pfh-evidence-item__chevron { transform: rotate(180deg); }
.pfh-evidence-item__body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}
.pfh-evidence-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin: 0;
}
.pfh-evidence-facts > div {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: var(--pfh-bg-alt);
}
.pfh-evidence-facts dt { color: var(--pfh-muted); font-size: .7rem; font-weight: 700; }
.pfh-evidence-facts dd { margin: 3px 0 0; color: var(--pfh-text); font-size: .84rem; font-weight: 700; }
.pfh-evidence-item__note { margin: 0; color: var(--pfh-muted); font-size: .82rem; line-height: 1.75; }
.pfh-evidence-item__link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pfh-primary);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.pfh-evidence-item__link:hover { text-decoration: underline; }

.pfh-linked-entities {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 10px;
}
.pfh-linked-entity {
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  min-height: 58px;
  padding: 11px 13px;
  border-radius: 11px;
}

@media (max-width: 760px) {
  .pfh-family-tree .pfh-tree-toolbar { align-items: stretch; flex-direction: column; }
  .pfh-family-tree .pfh-tree-search { width: 100%; max-width: none; flex-basis: auto; }
  .pfh-family-tree .pfh-tree-search__control { min-height: 50px; }
  .pfh-family-tree .pfh-tree-search input { height: 48px; }
  .pfh-tree-lineage { margin-block-end: 22px; }
  .pfh-evidence-item summary { grid-template-columns: minmax(0,1fr) 22px; }
  .pfh-evidence-item__summary-status { grid-column: 1 / -1; grid-row: 2; }
  .pfh-evidence-facts { grid-template-columns: 1fr; }
}

/* 0.3.4-alpha Stage E — interactive tree modes, generations, branch focus and lineage view */
.pfh-tree-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--pfh-border);
  border-bottom: 1px solid var(--pfh-border);
  background: rgba(249,247,241,.72);
}
.pfh-tree-control-group {
  display: grid;
  gap: 7px;
}
.pfh-tree-control-group__label {
  color: var(--pfh-muted);
  font-size: .7rem;
  font-weight: 800;
}
.pfh-tree-control-group--branches {
  flex: 1 1 100%;
}
.pfh-tree-segmented,
.pfh-tree-branch-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pfh-tree-segmented {
  width: max-content;
  padding: 3px;
  border: 1px solid var(--pfh-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(36,32,25,.035);
}
.pfh-tree-segmented__button,
.pfh-tree-branch-filter__button {
  appearance: none;
  border: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  font: inherit;
  transition: background-color .16s ease, color .16s ease, transform .16s ease, border-color .16s ease;
}
.pfh-tree-segmented__button {
  min-height: 34px;
  padding: 6px 12px !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--pfh-muted) !important;
  font-size: .78rem;
  font-weight: 800;
}
.pfh-tree-segmented--compact .pfh-tree-segmented__button {
  min-width: 34px;
  padding-inline: 9px !important;
}
.pfh-tree-segmented__button:hover,
.pfh-tree-segmented__button:focus-visible {
  background: var(--pfh-bg-alt) !important;
  color: var(--pfh-primary) !important;
  outline: 0;
}
.pfh-tree-segmented__button.is-active {
  background: var(--pfh-primary) !important;
  color: #fff !important;
}
.pfh-tree-control-group.is-disabled {
  opacity: .46;
}
.pfh-tree-segmented__button:disabled {
  cursor: not-allowed;
}
.pfh-tree-branch-filter__button {
  min-height: 34px;
  padding: 6px 12px !important;
  border: 1px solid var(--pfh-border) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--pfh-text) !important;
  font-size: .76rem;
  font-weight: 800;
}
.pfh-tree-branch-filter__button:hover,
.pfh-tree-branch-filter__button:focus-visible {
  border-color: rgba(29,66,46,.35) !important;
  background: var(--pfh-bg-alt) !important;
  color: var(--pfh-primary) !important;
  outline: 0;
}
.pfh-tree-branch-filter__button.is-active {
  border-color: rgba(29,66,46,.24) !important;
  background: var(--pfh-accent) !important;
  color: var(--pfh-primary) !important;
}

.pfh-tree-descendant-level {
  margin-block-start: 0;
}
.pfh-tree-descendant-level .pfh-tree-group__heading span {
  color: var(--pfh-secondary);
}
.pfh-tree-group--descendant-2 .pfh-tree-node,
.pfh-tree-group--descendant-3 .pfh-tree-node {
  border-color: rgba(139,108,69,.18);
  background: #fffefb;
}
.pfh-tree-group--descendant-3 .pfh-tree-node {
  transform: scale(.97);
  transform-origin: top center;
}

.pfh-tree-lineage-chain {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: 8px 0 28px;
}
.pfh-tree-lineage-chain__heading {
  display: grid;
  gap: 4px;
  margin-block-end: 18px;
  padding: 14px 16px;
  border: 1px solid var(--pfh-border);
  border-radius: 13px;
  background: var(--pfh-bg-alt);
  text-align: start;
}
.pfh-tree-lineage-chain__heading strong {
  color: var(--pfh-primary);
  font-size: .94rem;
}
.pfh-tree-lineage-chain__heading span {
  color: var(--pfh-muted);
  font-size: .76rem;
  line-height: 1.7;
}
.pfh-tree-lineage-chain__nodes {
  display: grid;
  justify-items: center;
}
.pfh-tree-lineage-chain__node {
  width: min(100%, 360px);
}
.pfh-tree-lineage-chain__connector {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--pfh-secondary), rgba(139,108,69,.22));
  position: relative;
}
.pfh-tree-lineage-chain__connector::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid var(--pfh-secondary);
  border-radius: 50%;
  background: var(--pfh-bg);
  transform: translateX(-50%);
}
.pfh-tree-lineage-chain__node--focus .pfh-person-card {
  box-shadow: 0 16px 40px rgba(29,66,46,.11);
}
.pfh-tree-stage--lineage .pfh-tree-lineage {
  margin-block-end: 20px;
}
.pfh-tree-stage--lineage .pfh-tree-node__actions {
  min-height: 36px;
}

.pfh-tree-lineage a[data-pfh-focus] {
  cursor: pointer;
}
.pfh-tree-lineage a[data-pfh-focus]:hover {
  color: var(--pfh-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pfh-tree-loading .pfh-tree-controls,
.pfh-tree-loading .pfh-tree-toolbar {
  pointer-events: none;
}

@media (max-width: 760px) {
  .pfh-tree-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 13px 14px 15px;
  }
  .pfh-tree-control-group,
  .pfh-tree-control-group--branches { width: 100%; }
  .pfh-tree-segmented { width: 100%; }
  .pfh-tree-segmented__button { flex: 1 1 0; }
  .pfh-tree-branch-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-block-end: 3px;
    scrollbar-width: thin;
  }
  .pfh-tree-branch-filter__button { flex: 0 0 auto; }
  .pfh-tree-lineage-chain { padding-inline: 6px; }
  .pfh-tree-lineage-chain__node { width: min(100%, 330px); }
  .pfh-tree-group--descendant-3 .pfh-tree-node { transform: none; }
}

/* Stage F — four fixed family branches + evidence-backed history */
@media (min-width: 1180px) {
  .pfh-branch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
  .pfh-branch-card { height: 100%; }
}
@media (min-width: 760px) and (max-width: 1179px) {
  .pfh-branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pfh-family-history-narrative {
  margin-block-end: 30px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--pfh-border, #E2DED4);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--pfh-white, #fff), color-mix(in srgb, var(--pfh-accent, #F0EADF) 38%, white));
  box-shadow: 0 18px 50px rgba(36,32,25,.045);
}
.pfh-family-history-narrative h2 {
  margin-block: 30px 10px;
  color: var(--pfh-primary, #1D422E);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
.pfh-family-history-narrative h2:first-child { margin-block-start: 0; }
.pfh-family-history-narrative p { line-height: 2; color: var(--pfh-text, #242019); }
.pfh-family-history-narrative a { color: var(--pfh-primary, #1D422E); font-weight: 700; text-underline-offset: 3px; }
.pfh-history-note {
  margin-block-start: 30px;
  padding: 18px 20px;
  border-inline-start: 4px solid var(--pfh-secondary, #8B6C45);
  border-radius: 10px;
  background: var(--pfh-background-alt, #F3EFE3);
  line-height: 1.9;
}
.pfh-event-header { max-width: 900px; }

/* Stage I — documented public biography facts */
.pfh-person-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}.pfh-person-fact{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:20px;border:1px solid var(--pfh-border,#E2DED4);border-radius:14px;background:#fff;min-height:128px}.pfh-person-fact small{color:var(--pfh-secondary,#8B6C45);font-weight:700}.pfh-person-fact strong{color:var(--pfh-text,#242019);font-size:1rem;line-height:1.8}.pfh-person-fact .pfh-verification-badge{margin-top:auto}@media(max-width:1024px){.pfh-person-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.pfh-person-facts{grid-template-columns:1fr}.pfh-person-fact{min-height:0}}

/* 0.3.10-alpha — History overview presentation */
.pfh-family-history-narrative,
.pfh-family-history-narrative.pfh-prose {
  width: 100%;
  max-width: none;
  margin: 0 0 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pfh-family-history-narrative__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}
.pfh-family-history-section {
  position: relative;
  min-width: 0;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--pfh-border, #E2DED4);
  border-radius: 18px;
  background: var(--pfh-white, #fff);
  box-shadow: 0 14px 40px rgba(36, 32, 25, .045);
  overflow: hidden;
}
.pfh-family-history-section:first-child {
  grid-column: 1 / -1;
  padding-inline-end: clamp(30px, 5vw, 58px);
  background: linear-gradient(135deg, var(--pfh-white, #fff), color-mix(in srgb, var(--pfh-accent, #F0EADF) 46%, white));
  border-color: color-mix(in srgb, var(--pfh-secondary, #8B6C45) 28%, var(--pfh-border, #E2DED4));
}
.pfh-family-history-section:last-child:nth-child(even) {
  grid-column: auto;
}
.pfh-family-history-section:last-child:nth-child(odd):not(:first-child) {
  grid-column: 1 / -1;
}
.pfh-family-history-section__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  margin-block-end: 13px;
  padding-inline: 9px;
  border: 1px solid color-mix(in srgb, var(--pfh-secondary, #8B6C45) 28%, transparent);
  border-radius: 999px;
  background: var(--pfh-bg-alt, #F3EFE3);
  color: var(--pfh-secondary, #8B6C45);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.pfh-family-history-section h2 {
  margin: 0 0 12px;
  color: var(--pfh-primary, #1D422E);
  font-size: clamp(1.16rem, 1.65vw, 1.42rem);
  line-height: 1.65;
}
.pfh-family-history-section p {
  max-width: none;
  margin: 0;
  color: var(--pfh-text, #242019);
  font-size: 1rem;
  line-height: 2.08;
}
.pfh-family-history-section a {
  color: var(--pfh-primary, #1D422E);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.pfh-family-history-narrative > .pfh-history-note {
  margin-block-start: 18px;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--pfh-secondary, #8B6C45) 28%, var(--pfh-border, #E2DED4));
  border-inline-start-width: 4px;
  border-radius: 14px;
  background: var(--pfh-bg-alt, #F3EFE3);
  color: var(--pfh-text, #242019);
  line-height: 1.95;
}
.pfh-history-overview {
  width: 100%;
  margin-block-start: 4px;
  padding-block-start: 6px;
}
.pfh-history-overview__grid {
  gap: 14px;
}
.pfh-stat-card {
  min-height: 112px;
  border-radius: 16px;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}
.pfh-stat-card:hover {
  transform: translateY(-2px);
}
.pfh-history-overview__range {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--pfh-bg-alt, #F3EFE3);
  text-align: center;
}
@media (max-width: 900px) {
  .pfh-family-history-narrative__grid { grid-template-columns: 1fr; }
  .pfh-family-history-section:first-child,
  .pfh-family-history-section:last-child:nth-child(odd):not(:first-child) { grid-column: auto; }
}
@media (max-width: 680px) {
  .pfh-family-history-section { padding: 22px 18px; border-radius: 14px; }
  .pfh-family-history-section:first-child { padding-inline-end: 18px; }
  .pfh-family-history-section h2 { font-size: 1.12rem; }
  .pfh-family-history-section p { font-size: .96rem; line-height: 2; }
}

/* PFH front-end community portal structure */
.pfh-portal{--pfh-green:#0f3f2d;--pfh-border:#e6ddcf;--pfh-soft:#f7f2e8;--pfh-text:#1f2933;direction:inherit;max-width:1120px;margin:0 auto 2rem;padding:1.25rem;color:var(--pfh-text)}
.pfh-portal-head{margin-bottom:1.25rem}.pfh-portal-head h2{margin:.15rem 0 .5rem;font-size:clamp(1.7rem,3vw,2.6rem)}.pfh-kicker{color:var(--pfh-green);font-weight:700;letter-spacing:.03em;margin:0 0 .25rem}.pfh-form{display:grid;gap:1rem}.pfh-form-grid,.pfh-account-grid,.pfh-committees{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}.pfh-form label{display:grid;gap:.35rem;font-weight:600}.pfh-form input,.pfh-form textarea,.pfh-form select{width:100%;border:1px solid var(--pfh-border);border-radius:14px;padding:.8rem;background:#fff;color:inherit}.pfh-hp{position:absolute!important;inset-inline-start:-9999px!important}.pfh-button{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:.72rem 1.1rem;background:var(--pfh-green);color:#fff!important;text-decoration:none;border:1px solid var(--pfh-green);font-weight:700;cursor:pointer}.pfh-button-secondary{background:#fff;color:var(--pfh-green)!important}.pfh-button-muted{background:var(--pfh-soft);color:var(--pfh-green)!important;border-color:var(--pfh-border)}.pfh-card,.pfh-committee-card{border:1px solid var(--pfh-border);border-radius:20px;background:#fff;padding:1.1rem;box-shadow:0 12px 30px rgba(15,63,45,.06)}.pfh-wide{grid-column:1/-1}.pfh-alert{border:1px solid var(--pfh-border);border-radius:18px;padding:1rem;margin:0 0 1rem;background:var(--pfh-soft)}.pfh-alert-success{border-color:#b8d8c6;background:#edf8f1}.pfh-alert-error{border-color:#e9b4a6;background:#fff1ed}.pfh-meta-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem;margin:1rem 0}.pfh-meta-grid div{background:var(--pfh-soft);border:1px solid var(--pfh-border);border-radius:14px;padding:.75rem}.pfh-meta-grid dt{font-size:.85rem;opacity:.75}.pfh-meta-grid dd{margin:0;font-weight:700}.pfh-committee-actions,.pfh-tabs,.pfh-family-nav{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.pfh-tabs a,.pfh-family-nav a{border:1px solid var(--pfh-border);border-radius:999px;padding:.55rem .9rem;text-decoration:none;color:var(--pfh-green);background:#fff}.pfh-tabs a.is-active{background:var(--pfh-green);color:#fff}.pfh-table-wrap{overflow:auto}.pfh-table{width:100%;border-collapse:collapse}.pfh-table th,.pfh-table td{border-bottom:1px solid var(--pfh-border);padding:.65rem;text-align:inherit}.pfh-diwan-post{border-top:1px solid var(--pfh-border);padding:1rem 0}.pfh-diwan-post img{border-radius:16px;margin:.75rem 0;max-width:100%;height:auto}.pfh-empty{background:var(--pfh-soft);border-radius:14px;padding:1rem}@media (max-width:640px){.pfh-portal{padding:.75rem}.pfh-button{width:100%}.pfh-tabs a,.pfh-family-nav a{flex:1 1 auto;text-align:center}}
