
:root{
  --kfh-ink:#1d1a18;
  --kfh-navy:#241f1c;
  --kfh-blue:#59626a;
  --kfh-sky:#f3eee5;
  --kfh-sand:#f8f3e8;
  --kfh-gold:#d0a21d;
  --kfh-rust:#b3222d;
  --kfh-green:#28493c;
  --kfh-border:#ddd3c4;
  --kfh-white:#fffdf8;
  --kfh-silver:#d9d9d9;
}
.kfh{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--kfh-ink);line-height:1.62;max-width:1180px;margin:0 auto;font-size:16px}
.kfh *{box-sizing:border-box}
.kfh h1,.kfh h2,.kfh h3{line-height:1.15;color:var(--kfh-navy);margin-top:0}
.kfh h1{font-size:clamp(2.4rem,6vw,5rem);letter-spacing:-.04em;margin-bottom:.2em}
.kfh h2{font-size:clamp(1.65rem,3vw,2.6rem);letter-spacing:-.02em}
.kfh h3{font-size:1.2rem}
.kfh p{margin:.65em 0 1em}
.kfh a{color:#1d6388}
.kfh-hero{position:relative;overflow:hidden;border-radius:24px;background:linear-gradient(135deg,#e8f0f4,#f4efe6);min-height:440px;padding:54px 54px 36px;margin:0 0 22px;display:flex;align-items:flex-end}
.kfh-hero-art{position:absolute;inset:0;opacity:.25}
.kfh-hero-art svg{width:100%;height:100%}
.kfh-wave{fill:#6c8da1}
.kfh-ship,.kfh-castle{fill:none;stroke:#203c52;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.kfh-hero-copy{position:relative;z-index:1;max-width:770px}
.kfh-eyebrow,.kfh-kicker{text-transform:uppercase;letter-spacing:.14em;font-size:.77rem;font-weight:800;color:var(--kfh-rust)}
.kfh-subtitle{font-size:1.3rem;color:#4c6170;margin-top:0}
.kfh-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.kfh-button{display:inline-block;background:var(--kfh-navy);color:white!important;padding:11px 16px;border-radius:999px;text-decoration:none;font-weight:700}
.kfh-button-secondary{background:white;color:var(--kfh-navy)!important;border:1px solid var(--kfh-border)}
.kfh-summary-strip{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--kfh-border);border-radius:18px;overflow:hidden;margin:20px 0 26px;background:white}
.kfh-summary-strip>div{padding:16px 18px;border-right:1px solid var(--kfh-border)}
.kfh-summary-strip>div:last-child{border-right:0}
.kfh-summary-strip strong{display:block;color:var(--kfh-navy);font-size:.92rem}
.kfh-summary-strip span{font-size:.82rem;color:#63727e}
.kfh-tabs{display:flex;gap:8px;overflow:auto;padding:7px;background:#f5f7f8;border:1px solid var(--kfh-border);border-radius:14px;position:sticky;top:12px;z-index:20;margin-bottom:28px}
.kfh-tab{appearance:none;border:0;background:transparent;border-radius:10px;padding:10px 12px;white-space:nowrap;cursor:pointer;font:inherit;font-size:.9rem;font-weight:700;color:#53636f}
.kfh-tab.is-active{background:var(--kfh-navy);color:white}
.kfh-panel{display:none;animation:kfhFade .22s ease}
.kfh-panel.is-active{display:block}
@keyframes kfhFade{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:none}}
.kfh-section-heading{margin:34px 0 22px;max-width:850px}
.kfh-section-heading p:last-child{color:#5c6974;font-size:1.06rem}
.kfh-callout{border-left:5px solid var(--kfh-gold);background:#fbf7ee;padding:17px 20px;border-radius:0 12px 12px 0;margin:22px 0}
.kfh-callout-blue{border-left-color:var(--kfh-blue);background:var(--kfh-sky)}
.kfh-wide-image{display:block;width:100%;max-height:390px;object-fit:contain;margin:22px auto;border-radius:14px;background:white;border:1px solid var(--kfh-border);padding:8px}
.kfh-grid{display:grid;gap:18px;margin:22px 0}
.kfh-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.kfh-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.kfh-card{background:#fff;border:1px solid var(--kfh-border);border-radius:16px;padding:18px;box-shadow:0 8px 24px rgba(28,50,67,.05)}
.kfh-card-wide{margin:20px 0}
.kfh-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.kfh-card-head h3{margin-bottom:8px}
.kfh-card-body p:last-child{margin-bottom:0}
.kfh-badge{display:inline-block;font-size:.69rem;letter-spacing:.05em;font-weight:800;padding:5px 8px;border-radius:999px;white-space:nowrap;background:#edf1f3;color:#4a5a64}
.kfh-badge-proved{background:#e4f2e8;color:#315a3d}
.kfh-badge-very-strong,.kfh-badge-proved---very-strong{background:#e5eef8;color:#2b5573}
.kfh-badge-open{background:#fff0d7;color:#79551e}
.kfh-badge-not-proved{background:#f6e3e1;color:#773b35}
.kfh-badge-conflicted{background:#f0e6f4;color:#66416f}
.kfh-badge-tentative{background:#f7eedf;color:#6b542f}
.kfh-badge-family-tradition,.kfh-badge-historic-context{background:#eee8dd;color:#6a5738}
.kfh-badge-confirmed-person{background:#e4efe9;color:#3d6350}
.kfh-two-col{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin:32px 0}
.kfh-lineage-list{list-style:none!important;margin:0!important;padding:0!important}
.kfh-lineage-list li{padding:10px 0;border-bottom:1px solid var(--kfh-border)}
.kfh-lineage-list span{display:block;font-weight:750;color:var(--kfh-navy)}
.kfh-lineage-list small{display:block;color:#6a7780}
.kfh-lineage-muted{opacity:.86}
.kfh-storyline{position:relative;margin:20px 0 30px}
.kfh-storyline:before{content:"";position:absolute;left:116px;top:0;bottom:0;width:2px;background:#d6dfe4}
.kfh-era{display:grid;grid-template-columns:100px 1fr;gap:32px;padding:0 0 32px;position:relative}
.kfh-era:after{content:"";position:absolute;left:109px;top:6px;width:16px;height:16px;border-radius:50%;background:var(--kfh-gold);border:3px solid white;box-shadow:0 0 0 1px #d3c09d}
.kfh-era-year{text-align:right;font-size:.8rem;font-weight:800;color:var(--kfh-rust)}
.kfh-era-copy{background:#fff;border:1px solid var(--kfh-border);border-radius:15px;padding:18px}
.kfh-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.kfh-mini-grid>div{background:#f7f8f8;padding:12px;border-radius:10px}
.kfh-mini-grid strong,.kfh-mini-grid span{display:block}
.kfh-mini-grid span{font-size:.85rem;color:#65717a}
.kfh-tree{overflow:auto;background:#fbfcfc;border:1px solid var(--kfh-border);border-radius:16px;padding:18px;margin:20px 0}
.kfh-tree ul{padding-left:28px;position:relative;list-style:none!important;margin:0!important}
.kfh-tree ul ul{border-left:1px solid #b9c8d1}
.kfh-tree li{position:relative;padding:5px 0 5px 20px}
.kfh-tree ul ul>li:before{content:"";position:absolute;left:-1px;top:22px;width:18px;border-top:1px solid #b9c8d1}
.kfh-person{display:inline-flex;flex-direction:column;min-width:240px;border:1px solid var(--kfh-border);background:white;padding:9px 12px;border-radius:10px}
.kfh-person strong{color:var(--kfh-navy)}
.kfh-person span{font-size:.78rem;color:#65737d}
.kfh-person.kfh-proved{border-left:5px solid #5b8168}
.kfh-person.kfh-strong{border-left:5px solid #5d8197}
.kfh-person.kfh-open{border-left:5px solid #c89440}
.kfh-feature{border:1px solid var(--kfh-border);border-radius:16px;overflow:hidden;background:white}
.kfh-feature img{width:100%;height:260px;object-fit:cover;object-position:top}
.kfh-feature>div{padding:18px}
.kfh-filter{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.kfh-filter button{border:1px solid var(--kfh-border);background:white;border-radius:999px;padding:7px 11px;cursor:pointer;font:inherit;font-size:.82rem;font-weight:700;color:#586873}
.kfh-filter button.is-active{background:var(--kfh-navy);color:white;border-color:var(--kfh-navy)}
.kfh-card.is-hidden{display:none}
.kfh-checklist li{margin-bottom:7px}
.kfh-source-list{columns:2;column-gap:32px}
.kfh-source-list li{break-inside:avoid;margin-bottom:8px}
.kfh-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.kfh-gallery figure{margin:0;border:1px solid var(--kfh-border);border-radius:13px;background:white;overflow:hidden}
.kfh-gallery img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;object-position:top;transition:transform .2s ease}
.kfh-gallery a:hover img{transform:scale(1.02)}
.kfh-gallery figcaption{padding:10px 12px;font-size:.8rem;color:#5e6d77}
.kfh-footer{border-top:1px solid var(--kfh-border);margin-top:42px;padding:22px 0;color:#5d6b75}
@media(max-width:900px){
  .kfh-summary-strip{grid-template-columns:1fr 1fr}
  .kfh-summary-strip>div:nth-child(2){border-right:0}
  .kfh-grid-3{grid-template-columns:1fr 1fr}
  .kfh-gallery{grid-template-columns:1fr 1fr}
  .kfh-hero{padding:36px 28px 28px}
}
@media(max-width:650px){
  .kfh{font-size:15px}
  .kfh-summary-strip,.kfh-grid-2,.kfh-grid-3,.kfh-two-col,.kfh-gallery,.kfh-mini-grid{grid-template-columns:1fr}
  .kfh-summary-strip>div{border-right:0;border-bottom:1px solid var(--kfh-border)}
  .kfh-summary-strip>div:last-child{border-bottom:0}
  .kfh-storyline:before{left:10px}
  .kfh-era{grid-template-columns:1fr;padding-left:28px;gap:8px}
  .kfh-era:after{left:3px;top:5px}
  .kfh-era-year{text-align:left}
  .kfh-source-list{columns:1}
  .kfh-tabs{top:4px}
}

.kfh-web-visuals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 28px}
.kfh-web-visuals figure,.kfh-feature-image{margin:0;border:1px solid var(--kfh-border);border-radius:14px;overflow:hidden;background:#fff}
.kfh-web-visuals img{width:100%;height:200px;object-fit:cover;display:block}
.kfh-web-visuals figcaption,.kfh-feature-image figcaption{padding:10px 12px;font-size:.76rem;color:#5d6b75}
.kfh-feature-image{margin:18px 0 24px}
.kfh-feature-image img{width:100%;max-height:390px;object-fit:cover;display:block}
.kfh-details{border:1px solid var(--kfh-border);border-radius:15px;background:#fff;margin:28px 0;overflow:hidden}
.kfh-details summary{cursor:pointer;padding:16px 18px;font-weight:800;color:var(--kfh-navy);background:#f7f9fa}
.kfh-details-body{padding:18px}
.kfh-pedigree{columns:2;column-gap:38px;margin:15px 0 0;padding-left:22px}
.kfh-pedigree li{break-inside:avoid;margin:0 0 9px;padding-left:3px}
.kfh-note{background:#f7f1e7;border-radius:10px;padding:12px}
.kfh-link-card{border:1px solid var(--kfh-border);border-radius:14px;padding:16px;background:#fff}
.kfh-link-card h4{margin:0 0 6px;color:var(--kfh-navy);font-size:1rem}
.kfh-link-card p{font-size:.9rem;margin:.3em 0 .7em}
@media(max-width:900px){.kfh-web-visuals{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.kfh-web-visuals{grid-template-columns:1fr}.kfh-pedigree{columns:1}}

.kfh-badge-strong{background:#e7f0f7;color:#2f5872}.kfh-badge-important{background:#f7eedf;color:#6b542f}.kfh-badge-very-strong-historic-context{background:#e8efe8;color:#46614c}


/* v1.3 Family Stories */
.kfh-story-key{display:flex;gap:9px;flex-wrap:wrap;margin:10px 0 28px}
.kfh-story-key>span{display:flex;align-items:center;gap:7px;font-size:.78rem;color:#63717b}
.kfh-story-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:26px;align-items:center;background:linear-gradient(135deg,#f1f5f7,#f7f1e7);border:1px solid var(--kfh-border);border-radius:20px;padding:18px;margin:22px 0 30px}
.kfh-story-hero figure{margin:0}
.kfh-story-hero img{width:100%;border-radius:13px;display:block}
.kfh-story-hero figcaption{font-size:.73rem;color:#66757f;padding:8px 4px 0}
.kfh-story-card{background:#fff;border:1px solid var(--kfh-border);border-radius:16px;padding:18px;box-shadow:0 6px 22px rgba(28,50,67,.045)}
.kfh-story-card-emphasis{border-left:5px solid var(--kfh-rust)}
.kfh-story-card-fun{background:#fbf8f1}
.kfh-story-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.kfh-story-card-head h3{margin:0 0 9px}
.kfh-story-card ul{padding-left:19px}
.kfh-sensitive-embed{margin:14px 0 10px;background:#f8f1ec;border:1px solid #e0d5c3;border-radius:14px;padding:12px}
.kfh-sensitive-embed figcaption{font-size:.8rem;color:#5d5348;padding:0 0 10px}
.kfh-sensitive-embed iframe{display:block;width:100%;min-height:760px;border:1px solid var(--kfh-border);border-radius:10px;background:#fff}
.kfh-story-source{display:inline-block;margin-top:7px;font-size:.83rem;font-weight:750}
.kfh-source-buttons{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}
.kfh-source-buttons a{display:inline-block;border:1px solid var(--kfh-border);background:#f7f9fa;border-radius:999px;padding:6px 10px;text-decoration:none;font-size:.78rem;font-weight:700}
.kfh-source-buttons a:hover{background:var(--kfh-sky)}
.kfh-story-wide{background:#f3f6f7;border:1px solid var(--kfh-border);border-radius:18px;padding:22px;margin:18px 0 32px}
.kfh-story-wide-warm{background:#fbf7ee}
.kfh-badge-primary-record{background:#e3f0e7;color:#31583c}
.kfh-badge-documented{background:#e5eef8;color:#2b5573}
.kfh-badge-documented-profile{background:#ece8f6;color:#554672}
.kfh-badge-historic-account{background:#ede9df;color:#64573e}
.kfh-badge-family-memory{background:#fff0d7;color:#78571f}
.kfh-badge-local-tradition{background:#f4e6df;color:#72493e}
.kfh-badge-important{background:#f4e9d2;color:#76571f}
@media(max-width:760px){
  .kfh-story-hero{grid-template-columns:1fr}
}


/* v1.4 heraldic redesign */
.kfh{background:linear-gradient(180deg,#fffdf8 0%,#fbf7ef 100%)}
.kfh h1,.kfh h2,.kfh h3{color:var(--kfh-navy)}
.kfh a{color:#9b1e27}
.kfh-hero{position:relative;overflow:hidden;border-radius:28px;min-height:460px;padding:42px 42px 32px;margin:0 0 22px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr);gap:28px;align-items:center;border:1px solid #ccb790;background:linear-gradient(180deg,rgba(255,250,242,.98),rgba(246,238,223,.98)),repeating-linear-gradient(90deg,rgba(40,73,60,.10) 0 16px,rgba(40,73,60,.02) 16px 22px,rgba(179,34,45,.12) 22px 34px,rgba(28,24,22,.08) 34px 44px,rgba(208,162,29,.10) 44px 52px,rgba(248,243,232,.18) 52px 68px),repeating-linear-gradient(0deg,rgba(40,73,60,.08) 0 12px,rgba(248,243,232,.06) 12px 20px,rgba(179,34,45,.10) 20px 28px,rgba(28,24,22,.08) 28px 34px,rgba(208,162,29,.08) 34px 40px,rgba(248,243,232,.12) 40px 52px);box-shadow:0 18px 45px rgba(30,21,11,.08)}
.kfh-hero-pattern{position:absolute;inset:0;background:radial-gradient(circle at 12% 18%,rgba(208,162,29,.14),transparent 24%),radial-gradient(circle at 90% 14%,rgba(179,34,45,.10),transparent 18%),radial-gradient(circle at 82% 84%,rgba(40,73,60,.08),transparent 20%);pointer-events:none}
.kfh-hero-copy,.kfh-hero-crest{position:relative;z-index:1}
.kfh-eyebrow,.kfh-kicker{color:#8f1c24}
.kfh-subtitle{color:#4e4946}
.kfh-button{background:var(--kfh-rust)}
.kfh-button-secondary{background:#fff9ef;color:var(--kfh-navy)!important;border:1px solid #ccb790}
.kfh-heraldry-note{margin:16px 0 0;font-size:.88rem;color:#625851;max-width:680px}
.kfh-hero-crest{display:grid;gap:18px;align-items:center}
.kfh-hero-crest-main,.kfh-hero-crest-motto{margin:0;background:rgba(255,253,248,.86);border:1px solid #d8c4a2;border-radius:18px;padding:14px;box-shadow:0 10px 24px rgba(40,22,9,.08)}
.kfh-hero-crest-main img,.kfh-hero-crest-motto img{display:block;width:100%;max-width:320px;margin:0 auto;height:auto}
.kfh-hero-crest-motto figcaption{margin-top:10px;text-align:center;color:#574f4b;font-size:.9rem}
.kfh-summary-strip{border:1px solid #d8c4a2;background:linear-gradient(180deg,#fffdf8,#f7f0e3)}
.kfh-summary-strip>div{border-right:1px solid #e1d5c2}
.kfh-summary-strip strong{color:#7c1620}
.kfh-tabs{background:linear-gradient(180deg,#faf4ea,#f1e7d6);border:1px solid #d7c8ad;box-shadow:0 8px 20px rgba(40,22,9,.06)}
.kfh-tab{color:#5d534d}
.kfh-tab.is-active{background:var(--kfh-rust);color:#fff}
.kfh-callout{background:#fdf7ed;border-left-color:var(--kfh-gold)}
.kfh-callout-blue{background:#f4eee5;border-left-color:var(--kfh-green)}
.kfh-callout-heraldry{background:#faf4e4;border-left-color:var(--kfh-rust)}
.kfh-callout-warm{background:#f9f1e4;border-left-color:var(--kfh-gold)}
.kfh-card,.kfh-feature,.kfh-story-card,.kfh-era-copy,.kfh-tree,.kfh-gallery figure,.kfh-story-wide{border-color:#e0d5c3;box-shadow:0 8px 24px rgba(30,21,11,.05)}
.kfh-feature-heraldry img{object-fit:contain;background:#faf4e7}
.kfh-badge-open{background:#fff0d7;color:#7a4b00}
.kfh-badge-proved{background:#e4f0e8;color:#2f5c40}
.kfh-badge-very-strong,.kfh-badge-proved---very-strong{background:#efe6d8;color:#704f17}
.kfh-badge-not-proved{background:#f4dfdf;color:#7d242a}
.kfh-badge-conflicted{background:#eee5de;color:#6a5149}
.kfh-badge-family-tradition,.kfh-badge-historic-context{background:#f7efdf;color:#6a5738}
.kfh-gallery figcaption{background:#fffdf8}
.kfh-footer{border-top:1px solid #dcccb2}
@media(max-width:900px){.kfh-hero{grid-template-columns:1fr}}


/* v1.5 spacing refinement */
.kfh-panels{
  padding:0 20px 30px;
}
.kfh-panel > :first-child{
  margin-top:24px;
}
.kfh-footer{
  margin-left:20px;
  margin-right:20px;
  padding-bottom:26px;
}
.kfh-section-heading-compact{
  margin-bottom:12px;
}
.kfh-target-grid{
  margin-top:14px;
}
.kfh-badge-scan-required{background:#f7ead5;color:#76501f}
.kfh-badge-partly-confirmed{background:#e6efe9;color:#315c42}
.kfh-badge-likely---conflicted{background:#f1e5df;color:#70443c}
.kfh-badge-actionable{background:#e8ead8;color:#505b29}
@media(max-width:650px){
  .kfh-panels{padding:0 12px 22px}
  .kfh-footer{margin-left:12px;margin-right:12px}
}


/* v1.6 compact hero + clearer navigation */
.kfh-hero{
  min-height:0;
  padding:28px 30px 24px;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  gap:22px;
}
.kfh h1{
  font-size:clamp(2.6rem,5vw,4.25rem);
}
.kfh-hero-copy p{
  max-width:720px;
}
.kfh-hero-crest{
  grid-template-columns:minmax(150px,1.15fr) minmax(110px,.75fr);
  gap:10px;
}
.kfh-hero-crest-main,
.kfh-hero-crest-motto{
  padding:10px;
  border-radius:14px;
}
.kfh-hero-crest-main img{
  max-width:205px;
}
.kfh-hero-crest-motto img{
  max-width:125px;
}
.kfh-hero-crest-motto figcaption{
  font-size:.72rem;
  margin-top:5px;
}
.kfh-heraldry-note{
  margin-top:11px;
  font-size:.82rem;
}
.kfh-summary-strip{
  margin-top:14px;
}

/* The navigator is now visually labeled and stays available while reading. */
.kfh-tabs{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 10px;
  position:sticky;
  top:8px;
  z-index:50;
  border:1px solid #cfb98e;
  box-shadow:0 10px 24px rgba(40,22,9,.10);
}
body.admin-bar .kfh-tabs{
  top:40px;
}
.kfh-nav-title{
  flex:0 0 auto;
  padding:4px 10px 4px 5px;
  border-right:1px solid #dbcbae;
  line-height:1.12;
}
.kfh-nav-title strong{
  display:block;
  color:#7c1620;
  font-size:.82rem;
}
.kfh-nav-title span{
  display:block;
  margin-top:2px;
  color:#776c64;
  font-size:.69rem;
}
.kfh-tab-list{
  display:flex;
  gap:5px;
  overflow-x:auto;
  scrollbar-width:thin;
  flex:1 1 auto;
  padding:1px 0 2px;
}
.kfh-tab{
  position:relative;
  border:1px solid transparent;
  padding:9px 11px;
  border-radius:9px;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.kfh-tab:hover{
  background:#fff8ec;
  border-color:#d8c29c;
  transform:translateY(-1px);
}
.kfh-tab.is-active{
  box-shadow:0 3px 9px rgba(124,22,32,.18);
}
.kfh-panel{
  scroll-margin-top:96px;
}
#kfh-viking-story,
#kfh-direct-line,
#kfh-family-stories,
#kfh-archive{
  scroll-margin-top:96px;
}

/* A subtle visual cue that the tab bar is interactive. */
.kfh-tabs::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:-1px;
  height:2px;
  background:linear-gradient(90deg,#b3222d,#d0a21d,#28493c);
  opacity:.42;
}

@media(max-width:900px){
  .kfh-hero{
    grid-template-columns:1fr;
    padding:24px;
  }
  .kfh-hero-crest{
    grid-template-columns:1fr 1fr;
    max-width:480px;
  }
  .kfh-hero-crest-main img{max-width:175px}
  .kfh-hero-crest-motto img{max-width:110px}
  .kfh-tabs{
    align-items:stretch;
    gap:6px;
  }
  .kfh-nav-title{
    display:none;
  }
}
@media(max-width:782px){
  body.admin-bar .kfh-tabs{
    top:52px;
  }
}
@media(max-width:650px){
  .kfh-hero{
    padding:20px 18px;
  }
  .kfh-hero-crest{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .kfh-hero-crest-main img{max-width:145px}
  .kfh-hero-crest-motto img{max-width:92px}
  .kfh-tabs{
    top:5px;
    margin-left:-3px;
    margin-right:-3px;
  }
  .kfh-tab{
    padding:9px 10px;
    font-size:.82rem;
  }
}


/* v1.7 research-audit statuses */
.kfh-badge-source-conflict{background:#f3dfdc;color:#7a2f35}
.kfh-badge-strong-event---name-conflict{background:#f3dfdc;color:#7a2f35}
.kfh-badge-geni-lead{background:#ece6f5;color:#5d4670}
.kfh-badge-compiled-lead{background:#efe8da;color:#6d5529}
.kfh-badge-method{background:#e6ebed;color:#47565e}
.kfh-geni-grid .kfh-story-card{position:relative}
.kfh-geni-grid .kfh-story-card::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:3px;
  border-radius:16px 16px 0 0;
  background:linear-gradient(90deg,var(--kfh-rust),var(--kfh-gold),var(--kfh-green));
}


/* v1.8 navigation, icon and hero refinement */
.kfh-title{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.kfh-title span{display:inline-block}
.kfh-page-mark{width:42px;height:42px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 2px 4px rgba(0,0,0,.12))}
.kfh-nav-title{display:flex;align-items:center;gap:12px;min-width:190px}
.kfh-nav-title strong,.kfh-nav-title span{display:block}
.kfh-nav-title img.kfh-nav-mark{width:34px;height:34px;object-fit:contain;flex:0 0 auto}
.kfh-tabs{position:sticky;top:8px;z-index:70;margin:0 0 18px;border-radius:18px;overflow:hidden;background:linear-gradient(180deg,#fbf6ed,#efe4cf)!important;border:1px solid #d7c19c!important;box-shadow:0 10px 26px rgba(40,22,9,.12)!important}
body.admin-bar .kfh-tabs{top:40px}
.kfh-tab-list{display:flex;gap:6px;flex:1 1 auto;align-items:center;flex-wrap:wrap;overflow:visible;white-space:normal;padding:4px 0 6px}
.kfh-tab-list::-webkit-scrollbar{height:0;width:0}
.kfh-tab{font-size:1rem;font-weight:700}
.kfh-tab.is-active{background:var(--kfh-rust)!important;color:#fff!important}
.kfh-hero{grid-template-columns:minmax(0,1.2fr) minmax(320px,.95fr);padding:24px 28px 22px;gap:18px}
.kfh-hero-crest{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:14px;max-width:100%}
.kfh-hero-crest-main,.kfh-hero-crest-motto{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:280px;padding:14px;margin:0}
.kfh-hero-crest-main img{max-width:230px;max-height:230px;width:auto;height:auto}
.kfh-hero-crest-motto img{max-width:155px;max-height:170px;width:auto;height:auto}
.kfh-hero-crest-motto figcaption{margin-top:10px;max-width:220px}
.kfh-summary-strip{margin-top:12px}
.kfh-panel{scroll-margin-top:108px}
#kfh-viking-story,#kfh-direct-line,#kfh-family-stories,#kfh-archive{scroll-margin-top:108px}
@media(max-width:1180px){
  .kfh-tab-list{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-bottom:8px}
  .kfh-tab{flex:0 0 auto}
}
@media(max-width:980px){
  .kfh-hero{grid-template-columns:1fr}
  .kfh-hero-crest{grid-template-columns:repeat(2,minmax(0,1fr));max-width:600px}
}
@media(max-width:782px){body.admin-bar .kfh-tabs{top:52px}}
@media(max-width:680px){
  .kfh-nav-title{min-width:unset;padding-right:0}
  .kfh-nav-title span{display:none}
  .kfh-hero{padding:20px 18px}
  .kfh-hero-crest-main,.kfh-hero-crest-motto{min-height:220px;padding:10px}
  .kfh-hero-crest-main img{max-width:170px;max-height:180px}
  .kfh-hero-crest-motto img{max-width:120px;max-height:130px}
  .kfh-page-mark{width:34px;height:34px}
}
\n\n/* v1.9 expanded archive */\n.kfh-document-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0 34px}\n.kfh-document-card{display:grid;grid-template-columns:130px 1fr;gap:15px;align-items:start;background:#fff;border:1px solid var(--kfh-border);border-radius:16px;padding:13px;box-shadow:0 8px 24px rgba(30,21,11,.05)}\n.kfh-document-card>a:first-child{display:block;background:#f7f2e8;border-radius:10px;overflow:hidden}\n.kfh-document-card img{display:block;width:100%;height:160px;object-fit:cover;object-position:top}\n.kfh-document-card h3{font-size:1rem;margin:2px 0 6px}\n.kfh-document-card p{font-size:.85rem;margin:.3em 0 .6em;color:#5f676d}\n.kfh-document-card div>a{font-size:.82rem;font-weight:750}\n.kfh-brad-gallery figure{background:#fffaf1}\n.kfh-brad-gallery img{background:#f6efe4}\n.kfh-badge-documented-context{background:#e4efe8;color:#315b40}\n.kfh-badge-historic-tradition{background:#f0eadf;color:#66553a}\n.kfh-badge-historic---caution{background:#f6e6de;color:#7a4638}\n@media(max-width:980px){.kfh-document-grid{grid-template-columns:1fr}.kfh-document-card{grid-template-columns:110px 1fr}.kfh-document-card img{height:135px}}\n@media(max-width:600px){.kfh-document-card{grid-template-columns:1fr}.kfh-document-card img{height:220px;object-fit:contain}}\n

/* v1.9.1 navigation cleanup */
.kfh-tabs{
  display:block;
  padding:10px 14px 11px;
}
.kfh-tab-list{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 9px;
  overflow:visible;
  white-space:normal;
  padding:0;
}
.kfh-tab{
  flex:0 0 auto;
}
@media(max-width:1180px){
  .kfh-tab-list{
    flex-wrap:wrap;
    overflow:visible;
    white-space:normal;
    padding-bottom:0;
  }
}
@media(max-width:700px){
  .kfh-tab-list{
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    white-space:nowrap;
    padding-bottom:5px;
  }
}


/* v1.10 mobile navigation */
.kfh-mobile-nav-toggle{
  display:none;
}

@media(max-width:760px){
  .kfh-tabs{
    position:sticky;
    top:6px;
    z-index:100;
    display:block;
    padding:6px !important;
    margin-bottom:14px;
    overflow:visible !important;
    border-radius:14px;
  }

  body.admin-bar .kfh-tabs{
    top:50px;
  }

  .kfh-mobile-nav-toggle{
    appearance:none;
    width:100%;
    min-height:58px;
    display:flex;
    align-items:center;
    gap:11px;
    border:0;
    border-radius:10px;
    padding:8px 10px;
    background:#fffaf0;
    color:var(--kfh-ink);
    text-align:left;
    cursor:pointer;
    box-shadow:0 2px 8px rgba(40,22,9,.06);
  }

  .kfh-mobile-nav-toggle>img{
    width:38px;
    height:38px;
    object-fit:contain;
    flex:0 0 auto;
  }

  .kfh-mobile-nav-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
    line-height:1.12;
  }

  .kfh-mobile-nav-copy small{
    font-size:.68rem;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#8a6c48;
    font-weight:750;
  }

  .kfh-mobile-nav-copy strong{
    margin-top:3px;
    font-size:1rem;
    color:var(--kfh-rust);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .kfh-mobile-nav-icon{
    width:24px;
    height:20px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    flex:0 0 auto;
  }

  .kfh-mobile-nav-icon i{
    display:block;
    width:100%;
    height:2px;
    border-radius:2px;
    background:#5d5148;
    transition:transform .18s ease, opacity .18s ease;
  }

  .kfh-tabs.is-open .kfh-mobile-nav-icon i:nth-child(1){
    transform:translateY(9px) rotate(45deg);
  }
  .kfh-tabs.is-open .kfh-mobile-nav-icon i:nth-child(2){
    opacity:0;
  }
  .kfh-tabs.is-open .kfh-mobile-nav-icon i:nth-child(3){
    transform:translateY(-9px) rotate(-45deg);
  }

  .kfh-tab-list{
    display:none !important;
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    width:100%;
    max-height:70vh;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    white-space:normal !important;
    grid-template-columns:1fr;
    gap:5px;
    padding:8px !important;
    background:#fffaf0;
    border:1px solid #d7c19c;
    border-radius:12px;
    box-shadow:0 16px 34px rgba(40,22,9,.18);
  }

  .kfh-tabs.is-open .kfh-tab-list{
    display:grid !important;
  }

  .kfh-tab{
    width:100%;
    display:block;
    padding:12px 13px !important;
    border-radius:9px;
    text-align:left;
    font-size:.96rem !important;
    line-height:1.2;
    white-space:normal !important;
  }

  .kfh-tab.is-active{
    background:var(--kfh-rust) !important;
    color:#fff !important;
  }

  .kfh-panel,
  #kfh-viking-story,
  #kfh-direct-line,
  #kfh-family-stories,
  #kfh-archive{
    scroll-margin-top:86px !important;
  }
}

@media(max-width:420px){
  .kfh-mobile-nav-copy strong{
    font-size:.94rem;
  }
  .kfh-mobile-nav-toggle>img{
    width:34px;
    height:34px;
  }
}


/* v1.11 deep links + U.S. migration map */
.kfh-hero{
  margin-bottom:18px;
}

.kfh-migration-map{
  margin:28px 0 8px;
  padding:16px;
  border:1px solid #dfd2bd;
  border-radius:18px;
  background:rgba(255,253,248,.78);
  box-shadow:0 8px 24px rgba(30,21,11,.05);
}

.kfh-migration-map img{
  display:block;
  width:100%;
  height:auto;
  max-height:620px;
  object-fit:contain;
}

.kfh-migration-map figcaption{
  max-width:900px;
  margin:8px auto 0;
  padding:8px 6px 2px;
  color:#665d56;
  font-size:.85rem;
  text-align:center;
}

.kfh-panel{
  scroll-margin-top:108px !important;
}

@media(max-width:760px){
  .kfh-migration-map{
    margin-top:20px;
    padding:8px;
    border-radius:14px;
  }

  .kfh-migration-map figcaption{
    text-align:left;
    font-size:.8rem;
  }

  .kfh-panel{
    scroll-margin-top:86px !important;
  }
}


/* v1.12 extended generations + colonial Payne line */
.kfh-generation-timeline{
  margin:20px 0 28px;
  padding:22px;
  border:1px solid #ded1bd;
  border-radius:18px;
  background:rgba(255,253,248,.82);
  box-shadow:0 8px 24px rgba(30,21,11,.045);
}

.kfh-generation-track{
  position:relative;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  padding:22px 0 26px;
}

.kfh-generation-track::before{
  content:"";
  position:absolute;
  left:5%;
  right:5%;
  top:52px;
  height:3px;
  border-radius:4px;
  background:linear-gradient(90deg,var(--kfh-rust),var(--kfh-gold),var(--kfh-green));
  opacity:.72;
}

.kfh-gen-node{
  position:relative;
  z-index:1;
  min-width:0;
  padding:0 6px;
  text-align:center;
}

.kfh-gen-node::before{
  content:"";
  display:block;
  width:14px;
  height:14px;
  margin:12px auto 13px;
  border:4px solid #fffaf0;
  border-radius:50%;
  background:var(--kfh-rust);
  box-shadow:0 0 0 2px #c8ac7f;
}

.kfh-gen-node:nth-child(2)::before,
.kfh-gen-node:nth-child(3)::before{
  background:var(--kfh-gold);
}

.kfh-gen-node:nth-child(n+4)::before{
  background:var(--kfh-green);
}

.kfh-gen-year{
  display:block;
  min-height:18px;
  color:#8b6e4f;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.kfh-gen-node strong{
  display:block;
  font-family:Georgia,serif;
  font-size:.96rem;
  line-height:1.18;
}

.kfh-gen-node small{
  display:block;
  margin-top:5px;
  color:#756b63;
  font-size:.72rem;
  line-height:1.25;
}

.kfh-gen-open{
  opacity:.78;
}

.kfh-generation-children{
  position:relative;
  margin-top:4px;
  padding-top:20px;
  border-top:1px solid #e3d6c1;
}

.kfh-children-label{
  text-align:center;
  margin-bottom:14px;
}

.kfh-children-label span{
  display:block;
  color:#8f1c24;
  font-size:.68rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.kfh-children-label strong{
  display:block;
  margin-top:3px;
  font-family:Georgia,serif;
  font-size:1.05rem;
}

.kfh-children-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}

.kfh-children-grid article{
  padding:11px 10px;
  border:1px solid #e1d3bd;
  border-radius:11px;
  background:#fffaf1;
  text-align:center;
}

.kfh-children-grid strong{
  display:block;
  font-size:.85rem;
  line-height:1.2;
}

.kfh-children-grid span{
  display:block;
  margin-top:4px;
  color:#786e65;
  font-size:.72rem;
}

.kfh-lineage-parent{
  padding-bottom:4px !important;
}

.kfh-lineage-children{
  margin:8px 0 2px 15px !important;
  padding:0 0 0 13px !important;
  border-left:2px solid #d6b678;
  list-style:none !important;
}

.kfh-lineage-children li{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:5px 0 !important;
  border-bottom:1px dotted #e1d7c7 !important;
}

.kfh-grid-4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.kfh-next-generation-cards .kfh-card h3{
  margin-top:0;
  font-size:1.02rem;
}

.kfh-feature-payne{
  margin:18px 0 25px;
  align-items:flex-start;
}

.kfh-feature-payne img{
  max-height:640px;
  object-fit:contain;
  background:#faf6ed;
}

.kfh-payne-line{
  margin:0;
  padding-left:22px;
}

.kfh-payne-line li{
  padding:7px 0 8px;
  border-bottom:1px solid #e5dac9;
}

.kfh-payne-line li:last-child{
  border-bottom:0;
}

.kfh-payne-line strong{
  display:inline-block;
  margin-right:7px;
}

.kfh-payne-line span{
  color:#7d6250;
  font-size:.83rem;
}

.kfh-payne-line small{
  display:block;
  margin-top:2px;
  color:#776e67;
  font-size:.75rem;
}

.kfh-badge-primary-derived{
  background:#e4eee7;
  color:#355842;
}

.kfh-badge-collateral{
  background:#ede8f3;
  color:#5d4c70;
}

.kfh-badge-strong---mixed{
  background:#eee8da;
  color:#66532d;
}

@media(max-width:900px){
  .kfh-generation-track{
    grid-template-columns:repeat(3,minmax(0,1fr));
    row-gap:22px;
  }

  .kfh-generation-track::before{
    display:none;
  }

  .kfh-gen-node{
    padding:10px 7px;
    border:1px solid #e1d4c0;
    border-radius:11px;
    background:#fffaf1;
  }

  .kfh-gen-node::before{
    margin:5px auto 8px;
  }

  .kfh-children-grid,
  .kfh-grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:560px){
  .kfh-generation-timeline{
    padding:13px;
  }

  .kfh-generation-track{
    grid-template-columns:1fr;
    gap:8px;
    padding:4px 0 16px;
  }

  .kfh-gen-node{
    display:grid;
    grid-template-columns:34px 1fr;
    grid-template-areas:
      "dot year"
      "dot name"
      "dot meta";
    text-align:left;
    align-items:center;
  }

  .kfh-gen-node::before{
    grid-area:dot;
    margin:0 auto;
  }

  .kfh-gen-year{grid-area:year;min-height:0}
  .kfh-gen-node strong{grid-area:name}
  .kfh-gen-node small{grid-area:meta}

  .kfh-children-grid,
  .kfh-grid-4{
    grid-template-columns:1fr;
  }

  .kfh-children-grid article{
    text-align:left;
  }
}


/* v1.13 direct-line ancestral spine */
.kfh-direct-spine{
  margin:18px 0 34px;
  padding:20px;
  border:1px solid #dfd2bd;
  border-radius:20px;
  background:
    radial-gradient(circle at 50% 0%,rgba(208,162,29,.07),transparent 26%),
    rgba(255,253,248,.84);
  box-shadow:0 8px 26px rgba(30,21,11,.05);
}

.kfh-spine-intro{
  display:flex;
  gap:26px;
  flex-wrap:wrap;
  padding:0 4px 18px;
  border-bottom:1px solid #e5dac9;
}

.kfh-spine-intro>div{
  display:grid;
  grid-template-columns:13px auto;
  column-gap:8px;
  align-items:center;
}

.kfh-spine-intro strong{
  font-size:.84rem;
}

.kfh-spine-intro small{
  grid-column:2;
  color:#786e66;
  font-size:.72rem;
}

.kfh-spine-key{
  width:10px;
  height:10px;
  border-radius:50%;
}

.kfh-spine-key-direct{background:var(--kfh-rust)}
.kfh-spine-key-branch{background:#ccb47d}

.kfh-spine-track{
  position:relative;
  padding:28px 0 12px;
}

.kfh-spine-track::before{
  content:"";
  position:absolute;
  top:28px;
  bottom:12px;
  left:calc(24% + 29px);
  width:4px;
  border-radius:4px;
  background:linear-gradient(180deg,#bd8c29 0%,var(--kfh-rust) 45%,var(--kfh-green) 100%);
  opacity:.75;
}

.kfh-spine-generation{
  position:relative;
  display:grid;
  grid-template-columns:minmax(92px,.22fr) minmax(300px,.9fr) minmax(280px,1.1fr);
  gap:24px;
  align-items:center;
  min-height:132px;
  padding:10px 0 24px;
}

.kfh-spine-generation::before{
  content:"";
  position:absolute;
  left:calc(24% + 20px);
  top:48px;
  z-index:2;
  width:18px;
  height:18px;
  border:5px solid #fffaf0;
  border-radius:50%;
  background:var(--kfh-rust);
  box-shadow:0 0 0 2px #c9ad7b;
}

.kfh-spine-open::before{background:var(--kfh-gold)}
.kfh-spine-final::before{background:var(--kfh-green)}

.kfh-spine-generation-label{
  align-self:start;
  padding-top:30px;
  text-align:right;
}

.kfh-spine-generation-label span{
  display:block;
  color:#8b7561;
  font-size:.65rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.kfh-spine-generation-label strong{
  display:block;
  margin-top:3px;
  color:#5e4b3d;
  font-family:Georgia,serif;
  font-size:1.65rem;
  font-weight:400;
}

.kfh-spine-main{
  position:relative;
  z-index:3;
  padding-left:45px;
}

.kfh-spine-card{
  max-width:440px;
  padding:17px 18px 15px;
  border:1px solid #dfd1bb;
  border-left:5px solid var(--kfh-gold);
  border-radius:15px;
  background:#fffdf8;
  box-shadow:0 8px 20px rgba(30,21,11,.055);
}

.kfh-spine-card-strong{border-left-color:#5d8197}
.kfh-spine-card-tentative{border-left-color:#b98a2d}
.kfh-spine-card-proved{border-left-color:var(--kfh-green)}

.kfh-spine-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.kfh-spine-era{
  color:#796d64;
  font-size:.72rem;
  white-space:nowrap;
}

.kfh-spine-card h3{
  margin:0 0 7px;
  font-family:Georgia,serif;
  font-size:1.32rem;
  line-height:1.15;
}

.kfh-spine-card>p{
  margin:.35em 0 .75em;
  color:#5c5652;
  font-size:.9rem;
}

.kfh-spine-spouse{
  display:flex;
  align-items:baseline;
  gap:7px;
}

.kfh-spine-spouse span{
  color:#8c7768;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.kfh-spine-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.kfh-spine-meta span{
  display:inline-block;
  padding:4px 7px;
  border-radius:999px;
  background:#f4eee4;
  color:#695e55;
  font-size:.68rem;
}

.kfh-spine-branch{
  min-width:0;
}

.kfh-spine-branch details{
  border:1px solid #e1d5c1;
  border-radius:12px;
  background:#fbf7ef;
  overflow:hidden;
}

.kfh-spine-branch summary{
  position:relative;
  padding:11px 38px 11px 13px;
  color:#69574b;
  font-size:.82rem;
  font-weight:750;
  cursor:pointer;
  list-style:none;
}

.kfh-spine-branch summary::-webkit-details-marker{display:none}

.kfh-spine-branch summary::after{
  content:"+";
  position:absolute;
  top:50%;
  right:13px;
  transform:translateY(-50%);
  color:var(--kfh-rust);
  font-size:1.15rem;
  font-weight:400;
}

.kfh-spine-branch details[open] summary::after{content:"–"}

.kfh-spine-branch details[open] summary{
  border-bottom:1px solid #e5d8c5;
  background:#f8f1e6;
}

.kfh-spine-branch-body{
  padding:11px 13px 13px;
  color:#625b56;
  font-size:.82rem;
}

.kfh-spine-family-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  padding:12px;
}

.kfh-spine-family-chips>span{
  display:flex;
  flex-direction:column;
  min-width:120px;
  padding:7px 9px;
  border:1px solid #e1d6c4;
  border-radius:9px;
  background:#fffdf8;
  color:#594f49;
  font-size:.75rem;
  font-weight:700;
  line-height:1.2;
}

.kfh-spine-family-chips small{
  margin-top:3px;
  color:#85786e;
  font-size:.64rem;
  font-weight:500;
}

.kfh-spine-family-chips .is-direct{
  border-color:#cda85e;
  background:#fff6df;
}

.kfh-spine-end-note{
  padding:12px 14px;
  border-left:3px solid var(--kfh-green);
  border-radius:0 10px 10px 0;
  background:#f1f5f1;
  color:#586158;
  font-size:.82rem;
}

.kfh-spine-descendants{
  position:relative;
  margin:8px 0 0 calc(24% + 30px);
  padding:26px 0 4px 45px;
  border-top:1px solid #e1d5c2;
}

.kfh-spine-descendants::before{
  content:"";
  position:absolute;
  left:0;
  top:-2px;
  width:4px;
  height:29px;
  border-radius:0 0 4px 4px;
  background:var(--kfh-green);
  opacity:.75;
}

.kfh-spine-descendants-heading{
  margin-bottom:13px;
}

.kfh-spine-descendants-heading span{
  color:#8f1c24;
  font-size:.67rem;
  font-weight:850;
  letter-spacing:.11em;
  text-transform:uppercase;
}

.kfh-spine-descendants-heading h3{
  margin:3px 0 0;
  font-family:Georgia,serif;
  font-size:1.25rem;
}

.kfh-spine-descendant-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}

.kfh-spine-descendant-grid article{
  position:relative;
  padding:14px 12px;
  border:1px solid #dfd1bb;
  border-top:4px solid var(--kfh-green);
  border-radius:12px;
  background:#fffdf8;
}

.kfh-descendant-year{
  display:block;
  margin-bottom:5px;
  color:#987b55;
  font-size:.67rem;
  font-weight:800;
}

.kfh-spine-descendant-grid strong{
  display:block;
  font-family:Georgia,serif;
  font-size:.9rem;
  line-height:1.18;
}

.kfh-spine-descendant-grid small{
  display:block;
  margin-top:5px;
  color:#756c65;
  font-size:.7rem;
  line-height:1.3;
}

@media(max-width:980px){
  .kfh-spine-track::before{
    left:33px;
  }

  .kfh-spine-generation{
    grid-template-columns:44px minmax(0,1fr);
    gap:16px;
    padding-bottom:20px;
  }

  .kfh-spine-generation::before{
    left:24px;
  }

  .kfh-spine-generation-label{
    grid-column:1;
    grid-row:1 / span 2;
    padding-top:28px;
    text-align:center;
  }

  .kfh-spine-generation-label span{display:none}
  .kfh-spine-generation-label strong{font-size:1rem}

  .kfh-spine-main{
    grid-column:2;
    padding-left:0;
  }

  .kfh-spine-card{
    max-width:none;
  }

  .kfh-spine-branch{
    grid-column:2;
  }

  .kfh-spine-descendants{
    margin-left:33px;
    padding-left:28px;
  }

  .kfh-spine-descendant-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:600px){
  .kfh-direct-spine{
    padding:12px;
  }

  .kfh-spine-intro{
    display:grid;
    gap:10px;
  }

  .kfh-spine-track{
    padding-top:18px;
  }

  .kfh-spine-generation{
    grid-template-columns:32px minmax(0,1fr);
    gap:10px;
  }

  .kfh-spine-track::before{
    left:20px;
  }

  .kfh-spine-generation::before{
    left:12px;
    width:14px;
    height:14px;
    border-width:4px;
  }

  .kfh-spine-generation-label{
    padding-top:27px;
  }

  .kfh-spine-card{
    padding:13px 13px 12px;
  }

  .kfh-spine-card-top{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }

  .kfh-spine-era{
    white-space:normal;
  }

  .kfh-spine-family-chips{
    display:grid;
    grid-template-columns:1fr;
  }

  .kfh-spine-descendants{
    margin-left:20px;
    padding-left:22px;
  }

  .kfh-spine-descendant-grid{
    grid-template-columns:1fr;
  }
}


/* v1.14 collateral-evidence additions */
.kfh-badge-collateral-evidence{
  background:#e8efe8;
  color:#395c42;
}

.kfh-story-wide h3{
  margin-top:0;
}

.kfh-story-card-emphasis{
  position:relative;
}

.kfh-story-card-emphasis::after{
  content:"";
  position:absolute;
  inset:8px auto 8px -1px;
  width:4px;
  border-radius:4px;
  background:linear-gradient(180deg,var(--kfh-rust),var(--kfh-gold));
  opacity:.72;
}

@media(max-width:650px){
  .kfh-source-buttons{
    align-items:stretch;
  }
  .kfh-source-buttons a{
    width:100%;
    text-align:center;
  }
}


/* v1.15 remaining-target audit */
.kfh-target-audit .kfh-story-card{
  min-height:100%;
}

.kfh-target-priority{
  border-top:4px solid var(--kfh-rust);
}

.kfh-badge-original-file-required,
.kfh-badge-pension-file-required,
.kfh-badge-military-file-required,
.kfh-badge-probate-file-required,
.kfh-badge-record-chain-required{
  background:#f4e6d9;
  color:#714836;
}

.kfh-badge-new-target{
  background:#e4efe8;
  color:#345b42;
}

.kfh-badge-unproved-lead,
.kfh-badge-unidentified,
.kfh-badge-unresolved{
  background:#f4eddc;
  color:#755d2f;
}

.kfh-badge-family-memory-only{
  background:#eee5e1;
  color:#6e4c42;
}

@media(max-width:650px){
  .kfh-target-audit{
    grid-template-columns:1fr;
  }
}

.kfh-sensitive-photo img{display:block;width:100%;height:auto;border:1px solid var(--kfh-border);border-radius:10px;background:#fff}
.kfh-sensitive-photo .kfh-photo-credit{padding:9px 2px 0;font-size:.75rem;color:#66757f}


/* v1.35 Section 1 title-chain and priority research update */
.kfh-title-chain-block{
  margin:28px 0 34px;
  padding:24px;
  border:1px solid var(--kfh-border);
  border-radius:18px;
  background:#fbf8f1;
}

.kfh-acreage-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:18px 0 22px;
}

.kfh-acreage-grid article{
  padding:16px 18px;
  border:1px solid #dfd1bb;
  border-radius:12px;
  background:#fffdf8;
}

.kfh-acreage-grid span,
.kfh-acreage-grid small{
  display:block;
}

.kfh-acreage-grid span{
  color:#8d6d45;
  font-size:.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.kfh-acreage-grid strong{
  display:block;
  margin:4px 0 6px;
  font-family:Georgia,serif;
  font-size:1.18rem;
}

.kfh-acreage-grid small{
  color:#6e665f;
  line-height:1.45;
}

.kfh-title-chain{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0;
  padding:8px 0 18px;
  list-style:none;
}

.kfh-chain-node{
  min-width:0;
  min-height:156px;
  padding:14px;
  border:1px solid #d9cab4;
  border-top:4px solid var(--kfh-green);
  border-radius:12px;
  background:#fff;
  box-shadow:0 5px 14px rgba(52,44,34,.05);
}

.kfh-chain-node small,
.kfh-chain-node strong,
.kfh-chain-node span,
.kfh-chain-node em{
  display:block;
}

.kfh-chain-node small{
  margin-bottom:5px;
  color:#8d6d45;
  font-size:.67rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.kfh-chain-node strong{
  font-family:Georgia,serif;
  line-height:1.18;
}

.kfh-chain-node span{
  margin-top:7px;
  color:#6f6861;
  font-size:.76rem;
  line-height:1.4;
}

.kfh-chain-node em{
  margin-top:12px;
  padding-top:9px;
  border-top:1px solid #eadfce;
  color:#725f49;
  font-size:.68rem;
  font-style:normal;
  font-weight:800;
  line-height:1.3;
}

.kfh-chain-node:not(:last-child) em::after{
  content:"  →";
  color:var(--kfh-rust);
  font-size:1rem;
}

.kfh-chain-open{
  border-top-color:var(--kfh-rust);
  background:#fff8f2;
}

.kfh-chain-conflict{
  border-top-color:var(--kfh-gold);
  background:#fffaf0;
}

.kfh-chain-explainers{
  margin-top:8px;
}

.kfh-priority-table-wrap{
  overflow-x:auto;
  margin:14px 0 28px;
  border:1px solid var(--kfh-border);
  border-radius:12px;
  background:#fff;
}

.kfh-priority-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  font-size:.86rem;
}

.kfh-priority-table th,
.kfh-priority-table td{
  padding:12px 14px;
  border-bottom:1px solid #e8dfd2;
  vertical-align:top;
  text-align:left;
  line-height:1.45;
}

.kfh-priority-table th{
  background:#f3ecdf;
  color:#4c4138;
  font-size:.73rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.kfh-priority-table tr:last-child td{
  border-bottom:0;
}

.kfh-badge-corrected-lead{
  background:#f3ead9;
  color:#72572e;
}

.kfh-badge-court-theory{
  background:#ece7f1;
  color:#5f506d;
}

.kfh-badge-highest-priority{
  background:#f4e3da;
  color:#7a4938;
}

@media(max-width:980px){
  .kfh-title-chain{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .kfh-title-chain-block{
    padding:16px;
  }
  .kfh-acreage-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:560px){
  .kfh-title-chain{
    grid-template-columns:1fr;
  }
  .kfh-chain-node{
    min-height:0;
  }
}
