/* Famiglia Ziroli — site stylesheet
   Editorial, book-like: Cormorant Garamond over Lora, paper ground, colour as stroke. */

:root {
  --paper: #f3f2f2;
  --surface: #eae9e9;
  --ink: #201f1d;
  --brass: #b68235;
  --brass-100: #fff3e4;
  --brass-200: #ffe3bf;
  --brass-500: #c28d41;
  --brass-600: #a06f24;
  --brass-700: #7d5411;
  --brass-800: #5a3b0a;
  --navy: #0A1952;
  --wine: #7A2E38;
  --laurel: #9b9797;
  --n100: #f8f4f4;
  --n200: #eae7e7;
  --n300: #d7d3d3;
  --n400: #bab6b6;
  --n500: #9b9797;
  --n600: #7d7979;
  --n700: #605d5d;
  --n800: #444141;
  --n900: #2d2b2b;
  --muted: #605d5d;
  --divider: rgba(32, 31, 29, .16);
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: Lora, Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 2px rgba(45, 43, 43, .14);
  --shadow-md: 0 3px 10px rgba(45, 43, 43, .16);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, .22);
  --gutter: 48px;
  --header-h: 71px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--font-body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .4em; }
p { margin: 0 0 18px; }
a { color: var(--brass-700); text-underline-offset: 3px; }
a:hover { color: var(--brass-600); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
::selection { background: rgba(182, 130, 53, .3); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tnum { font-variant-numeric: tabular-nums; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 4px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container-wide { max-width: 1240px; }
.section { padding: 72px 0; }
.section-tight { padding: 56px 0; }
.two-col { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.side-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.side-col-wide { grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; }
.prose { max-width: 72ch; }
.prose p { font-size: 16px; line-height: 1.7; text-align: justify; hyphens: auto; text-wrap: pretty; margin: 0 0 18px; }
.prose ul { padding-left: 20px; }
.dropcap::first-letter { font-family: var(--font-heading); font-size: 64px; line-height: .8; float: left; padding: 8px 10px 0 0; color: var(--brass-700); }
.lede { font-family: var(--font-heading); font-size: 19px; line-height: 1.6; }
.kicker { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 20px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-700); font-variant-numeric: tabular-nums; }
.kicker em { font-family: var(--font-heading); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--muted); }
.kicker-stack { flex-direction: column; gap: 8px; }
.signature { font-family: var(--font-heading); font-style: italic; font-size: 22px; margin: 28px 0 0; line-height: 1.3; }
.signature strong { font-style: normal; font-weight: 600; }
.laurel-rule { display: flex; align-items: center; gap: 16px; margin: 0; }
.laurel-rule::before, .laurel-rule::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.pull { margin: 36px 0; padding: 0 0 0 24px; border-left: 1px solid var(--brass); font-family: var(--font-heading); font-style: italic; font-size: 26px; line-height: 1.3; color: var(--brass-800); }
.pull p { margin: 0; }
.plate { border: 6px solid var(--surface); outline: 1px solid var(--divider); }
.plate img { filter: sepia(.22) saturate(.82) contrast(1.05); }
figcaption { font-size: 12px; margin-top: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.note { font-size: 14px; color: var(--muted); }

/* ── Buttons, tags, chips ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; font-family: var(--font-heading); font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--ink); background: transparent; border: 1px solid transparent; padding: 9px 17px; border-radius: 4px; transition: background .15s, border-color .15s; }
.btn-primary { color: var(--brass-700); border-color: var(--brass); }
.btn-primary:hover { background: rgba(182, 130, 53, .12); color: var(--brass-700); }
.btn-primary:active { background: rgba(182, 130, 53, .22); }
.btn-secondary { border-color: var(--divider); }
.btn-secondary:hover { background: rgba(32, 31, 29, .07); }
.btn-ghost { color: var(--brass-700); padding-inline: 6px; }
.btn-ghost:hover { background: rgba(182, 130, 53, .1); }
.btn-block { width: 100%; }
.tag { display: inline-flex; align-items: center; font-size: 12px; letter-spacing: .02em; padding: 3px 10px; border-radius: 3px; background: var(--n200); color: var(--n800); }
.tag-outline { background: transparent; border: 1px solid var(--brass); color: var(--brass-700); }
.tag-dashed { border-style: dashed; }
.chip { display: inline-block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: var(--n200); color: var(--n700); border: 1px solid transparent; white-space: nowrap; }
.chip-p { background: var(--brass-100); color: var(--brass-800); border: 1px dashed var(--brass-500); }
.chip-t { background: transparent; color: var(--n700); border: 1px dashed var(--n500); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-pat { background: var(--navy); } .dot-mat { background: var(--wine); } .dot-imm { background: var(--brass); } .dot-inlaw { background: var(--laurel); }

.seg { display: inline-flex; overflow: hidden; border: 1px solid var(--divider); border-radius: 4px; padding: 0; margin: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg-opt + .seg-opt { border-left: 1px solid var(--divider); }
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt:has(input:checked) { color: var(--brass-700); box-shadow: inset 0 0 0 1px var(--brass); }
.seg-opt:not(:has(input:checked)):hover { background: rgba(32, 31, 29, .07); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: -2px; }
.input { width: 100%; min-height: 36px; padding: 6px 10px; font: inherit; font-size: 14px; color: var(--ink); caret-color: var(--brass); background: transparent; border: 1px solid var(--divider); border-radius: 4px; }
.input:hover { border-color: rgba(32, 31, 29, .45); }
.input:focus-visible { border-color: var(--brass); outline-offset: 0; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(243, 242, 242, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--divider); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; padding: 12px var(--gutter); position: relative; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; color: inherit; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { font-family: var(--font-heading); font-weight: 600; font-size: 22px; white-space: nowrap; }
.nav > ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a { display: inline-block; font-size: 14px; color: inherit; text-decoration: none; padding: 6px 0 3px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--brass-700); border-bottom-color: var(--brass); }
.has-sub { display: flex; align-items: center; gap: 2px; }
.sub-toggle { background: none; border: 0; padding: 4px 2px; cursor: pointer; color: inherit; line-height: 1; display: inline-flex; }
.sub-toggle svg { transition: transform .2s; }
.has-sub.open .sub-toggle svg { transform: rotate(180deg); }
.nav .sub { position: absolute; top: calc(100% + 6px); left: -14px; min-width: 250px; margin: 0; padding: 8px 0; list-style: none; background: var(--paper); border: 1px solid var(--divider); box-shadow: var(--shadow-md); border-radius: 4px; display: none; flex-direction: column; gap: 0; z-index: 60; }
.sub li { display: block; }
.sub a { display: block; padding: 8px 16px; border: 0; font-size: 14px; }
.sub a:hover, .sub a[aria-current] { background: rgba(182, 130, 53, .08); border: 0; }
.nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub, .nav .has-sub.open > .sub { display: flex; }
.nav-toggle { display: none; background: none; border: 1px solid transparent; border-radius: 4px; padding: 8px; cursor: pointer; margin-left: auto; }
.nav-toggle svg { display: block; }

@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .nav-toggle { display: inline-flex; }
  .brand { margin-right: 0; }
  .site-header .wrap { justify-content: space-between; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--divider); box-shadow: var(--shadow-lg); max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav li { border-bottom: 1px solid var(--divider); }
  .nav a { display: block; padding: 13px 0; font-size: 16px; border: 0; }
  .nav a:hover, .nav a[aria-current] { border: 0; }
  .has-sub { flex-wrap: wrap; justify-content: space-between; }
  .has-sub > a { flex: 1; }
  .sub-toggle { padding: 12px; }
  .nav .sub { position: static; display: none; width: 100%; box-shadow: none; border: 0; border-top: 1px dashed var(--divider); border-radius: 0; padding: 4px 0 6px 16px; background: transparent; }
  .nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub { display: none; }
  .nav .has-sub.open > .sub { display: flex; }
  .sub li { border: 0; }
  .sub a { padding: 9px 0; font-size: 15px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 19px; }
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 640px; display: grid; place-items: center; color: #fff; text-align: center; overflow: hidden; isolation: isolate; }
.hero-md { min-height: 420px; }
.hero-sm { min-height: 380px; }
.hero-xs { min-height: 340px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(18, 18, 20, .45); z-index: -1; }
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 56px var(--gutter); max-width: 1100px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.hero-eyebrow .dot { border: 1px solid #fff; width: 10px; height: 10px; }
.hero-title { margin: 0; border: 3px solid #fff; padding: 22px 56px; font-family: var(--font-heading); font-size: clamp(34px, 7vw, 76px); font-weight: 400; letter-spacing: .01em; line-height: 1.05; }
.hero-sm .hero-title, .hero-md .hero-title, .hero-xs .hero-title { font-size: clamp(30px, 5vw, 56px); padding: 18px 44px; }
.hero-sub { margin: 0; font-family: var(--font-heading); font-style: italic; font-size: clamp(18px, 2.4vw, 26px); font-weight: 400; text-wrap: balance; }
.hero-chevron { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; }
@media (max-width: 600px) {
  .hero { min-height: 440px; }
  .hero-md, .hero-sm, .hero-xs { min-height: 300px; }
  .hero-title { padding: 14px 22px; }
  .hero-sm .hero-title, .hero-md .hero-title, .hero-xs .hero-title { padding: 12px 20px; }
}
html.js .hero-title { animation: box-in 1s cubic-bezier(.2, .7, .2, 1) both; }
html.js .hero-sub, html.js .hero-eyebrow { animation: fade-up .8s .45s ease-out both; }
html.js .hero-chevron { animation: fade-up 1s 1.1s ease-out both, bob 2.4s 2s ease-in-out infinite; }
@keyframes box-in { from { clip-path: inset(0 50% 0 50%); opacity: 0; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ── Cards ──────────────────────────────────────────────────────────── */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--divider); border-radius: 4px; background: transparent; text-decoration: none; color: inherit; overflow: hidden; transition: border-color .2s; }
a.card:hover { border-color: var(--brass); color: inherit; }
.card-media { height: 200px; border-bottom: 1px solid var(--divider); background: var(--n100); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.22) saturate(.82) contrast(1.05); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.card-kicker { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-700); }
.card-title { font-family: var(--font-heading); font-size: 24px; font-weight: 400; line-height: 1.15; }
.card-text { font-size: 13px; color: var(--n700); }
.card-row { flex-direction: row; align-items: stretch; }
.card-row .card-media { width: 150px; height: auto; flex: none; border-bottom: 0; border-right: 1px solid var(--divider); }
.card-row .card-body { padding: 18px 22px; }
.card-row .card-title { font-size: 26px; }
.card-portrait { border-top: 3px solid var(--laurel); }
.card-portrait.b-pat { border-top-color: var(--navy); } .card-portrait.b-mat { border-top-color: var(--wine); }
.card-portrait .card-media { aspect-ratio: 4 / 5; height: auto; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--n600); }
.card-portrait .card-title { font-size: 21px; font-weight: 600; line-height: 1.1; }
.card-portrait .card-kicker.b-pat { color: var(--navy); } .card-portrait .card-kicker.b-mat { color: var(--wine); } .card-portrait .card-kicker.b-inlaw { color: var(--muted); }
.card-portrait .card-kicker .verify { color: var(--brass-700); }
.card-dates { font-family: var(--font-heading); font-style: italic; font-size: 15px; color: var(--n700); font-variant-numeric: tabular-nums; }
.placeholder-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; line-height: 1.7; }
@media (max-width: 960px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cards-3 { grid-template-columns: 1fr; gap: 14px; }
  .cards-3 .card { flex-direction: row; align-items: stretch; }
  .cards-3 .card-media { width: 110px; height: auto; flex: none; border-bottom: 0; border-right: 1px solid var(--divider); }
  .cards-3 .card-media svg { width: 78px; height: auto; }
  .cards-3 .card-body { padding: 14px 16px; }
  .cards-3 .card-title { font-size: 19px; }
  .cards-3 .card-text { display: none; }
  .card-row .card-media { width: 110px; }
  .card-row .card-title { font-size: 20px; }
  .card-row .card-body { padding: 14px 16px; }
}
@media (max-width: 520px) { .cards-4 { grid-template-columns: 1fr; } .card-portrait .card-media { aspect-ratio: 16 / 7; } }

/* ── Stats, recent, footer ──────────────────────────────────────────── */
.stats { border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding-top: 28px; padding-bottom: 28px; }
.stat { border-right: 1px solid var(--divider); padding: 4px 8px; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 700px) {
  .stats .container { grid-template-columns: 1fr 1fr; padding: 0; }
  .stat { padding: 18px 8px; border-bottom: 1px solid var(--divider); }
  .stat:nth-child(even) { border-right: 0; }
  .stat:nth-last-child(-n + 2) { border-bottom: 0; }
  .stat b { font-size: 34px; }
}
.recent { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--divider); }
.recent a { text-decoration: none; color: inherit; padding: 22px 24px; border-bottom: 1px solid var(--divider); border-left: 1px solid var(--divider); display: flex; gap: 16px; align-items: flex-start; }
.recent a:first-child { border-left: 0; padding-left: 0; }
.recent a:last-child { padding-right: 0; }
.recent .bar { width: 4px; align-self: stretch; background: var(--wine); border-radius: 1px; flex: none; }
.recent .bar.b-pat { background: var(--navy); }
.recent small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.recent strong { display: block; font-family: var(--font-heading); font-size: 22px; font-weight: 600; line-height: 1.15; margin: 4px 0 2px; }
.recent a:hover strong { color: var(--brass-700); }
.recent span.meta { font-size: 13px; color: var(--n700); }
@media (max-width: 760px) { .recent { grid-template-columns: 1fr; } .recent a, .recent a:first-child, .recent a:last-child { border-left: 0; padding: 18px 0; } }

.site-footer { border-top: 1px solid var(--divider); background: var(--n100); font-size: 13px; margin-top: auto; }
.site-footer .container { padding-top: 40px; padding-bottom: 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { width: 56px; height: 56px; object-fit: contain; }
.footer-brand b { display: block; font-family: var(--font-heading); font-size: 20px; font-weight: 600; }
.footer-brand p { margin: 2px 0 0; color: var(--n700); }
.footer-places { margin-top: 14px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); line-height: 1.8; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--brass-700); }
.footer-links .mail { color: var(--brass-700); text-decoration: underline; }
.footer-links .copy { color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .site-footer .container { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; padding-bottom: 28px; } }

/* ── Where we're from ───────────────────────────────────────────────── */
.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 56px; align-items: start; }
.drill { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 20px; }
.drill-num { display: flex; flex-direction: column; align-items: center; }
.drill-num span { font-family: var(--font-heading); font-size: 18px; font-variant-numeric: tabular-nums; color: var(--brass-700); width: 32px; height: 32px; border: 1px solid var(--brass); border-radius: 50%; display: grid; place-items: center; }
.drill-num i { flex: 1; width: 1px; background: var(--divider); }
.drill .card { margin-bottom: 20px; }
.drill .card:last-child { margin-bottom: 0; }
.map-embed { height: 520px; overflow: hidden; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-image { max-width: 720px; margin: 0 auto 40px; background: #fff; }
.map-image img { filter: none; }
@media (max-width: 960px) { .hub-grid { grid-template-columns: 1fr; gap: 40px; } .map-embed { height: 380px; } }
@media (max-width: 960px) { .two-col, .side-col, .side-col-wide { grid-template-columns: 1fr; gap: 24px; } }

.facts { border-top: 2px solid var(--ink); padding-top: 16px; font-size: 13px; position: sticky; top: calc(var(--header-h) + 24px); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 16px; font-variant-numeric: tabular-nums; }
.facts dt { color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--divider); }
.facts dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--divider); text-align: right; }
.facts dt:nth-last-of-type(1), .facts dd:nth-last-of-type(1) { border-bottom: 0; }
.facts .links { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
@media (max-width: 960px) { .facts { position: static; } }
.towns { columns: 3; column-gap: 32px; font-size: 14px; line-height: 1.8; padding-left: 18px; margin: 0; }
@media (max-width: 760px) { .towns { columns: 2; } }
@media (max-width: 460px) { .towns { columns: 1; } }

/* ── Ancestors & profiles ───────────────────────────────────────────── */
.anc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.anc-head p { max-width: 60ch; margin: 0; line-height: 1.65; text-wrap: pretty; }
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 24px; }
.portrait-slot { aspect-ratio: 4 / 5; border: 1px dashed var(--n400); background: var(--n100); display: grid; place-items: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; line-height: 1.8; padding: 12px; }
.side-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-700); margin: 0 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tree { display: flex; flex-direction: column; font-size: 13px; }
.mini-tree .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-tree .row3 { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; }
.mini-tree .stem { height: 20px; width: 1px; background: var(--n400); margin: 0 auto; }
.mini-tree .ring { display: grid; place-items: center; }
.mini-tree .ring span { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--navy); }
.mini-tree .kids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mt { display: block; border: 1px solid var(--n400); border-left: 3px solid var(--wine); padding: 8px 10px; text-decoration: none; color: inherit; font-family: var(--font-heading); font-weight: 600; font-size: 14px; line-height: 1.15; }
.mt.b-pat { border-left-color: var(--navy); }
.mt.b-inlaw { border-left-color: var(--laurel); }
.mt.self { border-color: var(--brass); background: #fff; }
.mt.dashed { border-style: dashed; border-color: var(--brass); border-left-style: solid; }
.mt small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 10px; color: var(--muted); }
.mt.sm { padding: 6px 8px; font-family: var(--font-body); font-weight: 400; font-size: 12px; }
a.mt:hover { border-color: var(--brass); color: inherit; }
.know { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.7; display: flex; flex-direction: column; gap: 6px; }
.verify-list { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.7; display: flex; flex-direction: column; gap: 8px; }
.verify-list li { display: flex; gap: 12px; }
.verify-list svg { flex: none; margin-top: 6px; }
.sources { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--n700); line-height: 1.7; }
.sources .side-label { display: block; margin-bottom: 6px; }
@media (max-width: 960px) {
  .profile { grid-template-columns: 1fr; gap: 32px; }
  .profile-side { flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .portrait-slot { width: 140px; flex: none; }
  .profile-side > div { flex: 1 1 200px; }
  .mini-tree-wrap { flex-basis: 100%; }
}

/* ── Journey ────────────────────────────────────────────────────────── */
.map-wrap { height: 560px; overflow: hidden; background: var(--paper); position: relative; }
.map-wrap svg { width: 100%; height: 100%; display: block; }
.map-wrap .land { fill: var(--n200); stroke: var(--navy); stroke-width: .6; stroke-opacity: .55; }
.map-wrap .graticule { fill: none; stroke: var(--divider); stroke-width: .5; }
.map-wrap .route { fill: none; stroke-width: 1.6; stroke-dasharray: 5 4; }
.map-wrap .pin circle { fill: var(--paper); stroke-width: 2; cursor: pointer; transition: r .2s; }
.map-wrap .pin:hover circle, .map-wrap .pin:focus circle { r: 9; }
.map-wrap .pin text { font-family: var(--font-heading); font-size: 14px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.map-wrap .pin .sub { font-family: var(--font-body); font-size: 9.5px; font-weight: 400; fill: var(--n700); letter-spacing: .06em; text-transform: uppercase; }
.map-tip { position: absolute; pointer-events: none; background: var(--paper); border: 1px solid var(--divider); box-shadow: var(--shadow-md); border-radius: 4px; padding: 10px 14px; font-size: 12px; line-height: 1.5; max-width: 260px; opacity: 0; transition: opacity .15s; z-index: 2; }
.map-tip h4 { font-size: 17px; margin: 0 0 4px; }
.map-tip ul { margin: 0; padding-left: 14px; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 12px; color: var(--n700); margin-top: 10px; font-variant-numeric: tabular-nums; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 18px; border-top: 2px dashed var(--navy); }
.map-legend .mat i { border-top-color: var(--wine); } .map-legend .imm i { border-top-color: var(--brass); }
@media (max-width: 760px) { .map-wrap { height: 380px; } .map-wrap .pin text { display: none; } .map-note { display: block; } }
.map-note { display: none; font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.timeline { display: grid; grid-template-columns: 1fr 60px 1fr; row-gap: 20px; font-variant-numeric: tabular-nums; }
.tl-era { grid-column: 1 / -1; text-align: center; font-family: var(--font-heading); font-size: 24px; font-weight: 600; padding: 8px 0; margin: 0; }
.tl-era em { font-weight: 400; color: var(--muted); }
.tl-left { grid-column: 1; text-align: right; }
.tl-right { grid-column: 3; }
.tl-axis { grid-column: 2; display: flex; flex-direction: column; align-items: center; }
.tl-axis span { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--navy); background: var(--paper); margin-top: 20px; flex: none; }
.tl-axis span.mat { border-color: var(--wine); } .tl-axis span.imm { border-color: var(--brass); } .tl-axis span.inlaw { border-color: var(--laurel); } .tl-axis span.p { border-style: dashed; }
.tl-axis i { flex: 1; width: 1px; background: var(--divider); }
.tl-card { display: inline-block; text-align: left; border: 1px solid var(--divider); padding: 14px 18px; max-width: 380px; font-size: 14px; }
.tl-card.p { border: 1px dashed var(--brass); }
.tl-card b { font-family: var(--font-heading); font-weight: 400; font-size: 26px; line-height: 1; display: block; margin-bottom: 4px; }
.tl-card em { color: var(--brass-700); }
.tl-card a { font-size: 12px; white-space: nowrap; }
@media (max-width: 700px) {
  .timeline { grid-template-columns: 28px 1fr; }
  .tl-left, .tl-right { grid-column: 2; text-align: left; }
  .tl-axis { grid-column: 1; }
  .tl-card { max-width: none; display: block; }
}

/* ── Stories ────────────────────────────────────────────────────────── */
.filters { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.filters .kicker { margin: 0 auto 0 0; }
.filters select.input { width: auto; min-height: 34px; font-size: 13px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 14px; }
.photo-slot { border: 1px dashed var(--n300); background: var(--n100); display: grid; place-items: end start; padding: 12px; font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.photo-empty { grid-row: span 2; border: 1px dashed var(--n400); background: var(--n100); display: grid; place-items: center; padding: 24px; text-align: center; }
.photo-empty h3 { font-size: 24px; font-weight: 400; margin: 14px 0 6px; }
.photo-empty p { font-size: 13px; color: var(--n700); max-width: 28ch; line-height: 1.6; margin: 0 auto 16px; }
.span-2r { grid-row: span 2; } .span-2c { grid-column: span 2; }
.stories-empty { border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); padding: 48px 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: center; }
.stories-empty h2 { font-size: 34px; font-weight: 400; line-height: 1.15; margin-bottom: 12px; }
.stories-empty p { line-height: 1.65; max-width: 56ch; margin: 0 0 20px; text-wrap: pretty; }
.story-skel { border: 1px solid var(--divider); padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; opacity: .75; }
.story-skel .lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-700); }
.story-skel .ttl { font-family: var(--font-heading); font-size: 22px; line-height: 1.1; }
.story-skel .dek { font-size: 13px; color: var(--n700); }
.story-skel .by { font-size: 11px; color: var(--muted); }
.story-skel .hr { height: 1px; background: var(--divider); margin: 6px 0; }
.story-skel .ln { height: 8px; background: var(--n200); }
.story-skel .q { font-family: var(--font-heading); font-style: italic; font-size: 15px; border-left: 1px solid var(--brass); padding-left: 10px; margin: 6px 0; }
@media (max-width: 960px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } .stories-empty { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .photo-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } .photo-slot { min-height: 120px; } .span-2c { grid-column: auto; } .span-2r, .photo-empty { grid-row: auto; } }

/* ── About ──────────────────────────────────────────────────────────── */
.conf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 12px; }
.conf-card { border: 1px solid var(--n400); border-radius: 4px; padding: 14px 16px; }
.conf-card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; text-align: left; }
.conf-card.p { border: 1px dashed var(--brass); }
.conf-card.t { border: 1px dashed var(--n400); opacity: .8; }
.crest-box { border-top: 2px solid var(--ink); padding-top: 16px; }
.crest-box img { width: 180px; margin: 0 auto 16px; }
.crest-box dl { margin: 0; font-size: 13px; line-height: 1.55; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.crest-box dt { color: var(--muted); } .crest-box dd { margin: 0; }
@media (max-width: 700px) { .conf-cards { grid-template-columns: 1fr; } }

/* ── Family tree ────────────────────────────────────────────────────── */
.tree { display: flex; flex-direction: column; height: calc(100vh - var(--header-h)); min-height: 600px; background: var(--paper); border-bottom: 1px solid var(--divider); }
.tree-controls { display: flex; align-items: center; gap: 14px; padding: 9px var(--gutter); border-bottom: 1px solid var(--divider); flex-wrap: wrap; background: var(--paper); z-index: 3; }
.tree-search { max-width: 240px; min-height: 34px; }
.tree-controls .seg { font-size: 12px; }
.tree-controls .seg-opt { padding: 6px 10px; font-size: 12px; }
.tree-actions { display: flex; gap: 6px; margin-left: auto; }
.tree-actions .btn { font-size: 13px; padding: 6px 12px; }
.tree-branch-cycle { display: none; }
.tree-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; background-color: var(--paper); background-image: radial-gradient(circle, rgba(32, 31, 29, .13) 1px, transparent 1.2px); background-size: 24px 24px; }
.tree-canvas.dragging { cursor: grabbing; }
.tree-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tree-stage.anim { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tree-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.tree-edges path { fill: none; stroke: var(--laurel); stroke-width: 1.5; transition: stroke .2s, stroke-width .2s; }
.tree-edges path.uncertain { stroke: var(--brass); stroke-dasharray: 7 5; }
.tree-edges path.unassigned { stroke: var(--wine); stroke-dasharray: 2 5; }
.tree-edges path.couple { stroke: var(--navy); }
.tree-edges path.couple.dashed { stroke-dasharray: 4 3; }
.tree-edges path.hot { stroke: var(--brass) !important; stroke-width: 3; stroke-dasharray: none !important; }
.tree-edges circle { fill: var(--paper); stroke: var(--navy); stroke-width: 1.5; }
.tree-edges circle.dashed { stroke-dasharray: 2 2; }
.tree-edges circle.hot { stroke: var(--brass); stroke-width: 3; }
.tree-edges text.glyph { font-family: var(--font-heading); font-size: 13px; font-weight: 600; fill: var(--wine); text-anchor: middle; }
.tree-edges text.elabel { font-family: var(--font-body); font-size: 10px; fill: var(--brass-700); text-anchor: middle; letter-spacing: .08em; text-transform: uppercase; }
.node { position: absolute; width: 180px; height: 72px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; margin: 0; text-align: left; background: var(--n100); border: 1px solid var(--n400); border-radius: 4px; box-shadow: var(--shadow-sm); cursor: pointer; overflow: hidden; transition: opacity .25s, box-shadow .2s, border-color .2s; }
html.js .node.spring { animation: ft-spring .45s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes ft-spring { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
.node .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--laurel); }
.node.b-pat .bar { background: var(--navy); } .node.b-mat .bar { background: var(--wine); } .node.b-imm .bar { background: var(--brass); }
.node .mono { width: 36px; height: 36px; border-radius: 50%; flex: none; border: 1px dashed var(--laurel); color: var(--laurel); display: grid; place-items: center; font-family: var(--font-heading); font-weight: 600; font-size: 14px; letter-spacing: .02em; background: var(--paper); }
.node.b-pat .mono { border-color: var(--navy); color: var(--navy); } .node.b-mat .mono { border-color: var(--wine); color: var(--wine); } .node.b-imm .mono { border-color: var(--brass); color: var(--brass-700); }
.node .txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.node .nm { font-family: var(--font-heading); font-weight: 600; font-size: 15px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node .mt2 { font-size: 10.5px; line-height: 1.2; color: var(--n700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.node .chip { align-self: flex-start; font-size: 9px; padding: 1px 6px; margin-top: 1px; }
.node.c-P { border-style: dashed; border-color: var(--brass); }
.node.c-T { border-style: dashed; opacity: .7; }
.node.dim { opacity: .18; }
.node.on-path { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(182, 130, 53, .35); }
.node.selected { background: #fff; border-color: var(--brass); box-shadow: var(--shadow-md), 0 0 0 3px rgba(182, 130, 53, .25); }
.node:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.pill { position: absolute; width: 100px; height: 20px; border-radius: 10px; border: 1px solid var(--brass); background: var(--paper); color: var(--brass-800); font-family: var(--font-body); font-size: 10px; letter-spacing: .04em; cursor: pointer; padding: 0; z-index: 2; }
.pill.open { background: var(--brass-100); }
.rail { position: absolute; left: 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; white-space: nowrap; background: var(--paper); padding: 1px 6px; border-left: 2px solid var(--n300); z-index: 1; font-variant-numeric: tabular-nums; }
.tree-zoom { position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.tree-zoom .btn { background: var(--paper); font-size: 12px; padding: 6px 8px; }
.tree-zoom .btn-icon { width: 34px; height: 34px; padding: 0; font-size: 18px; font-family: var(--font-heading); }
.tree-legend { position: absolute; left: 100px; bottom: 14px; display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--n700); z-index: 2; max-width: 560px; pointer-events: none; }
.tree-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tree-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 1px; }
.tree-legend .sw { width: 12px; height: 12px; border: 1px solid var(--n500); border-radius: 2px; background: var(--n100); }
.tree-legend .sw.p { border: 1px dashed var(--brass); background: transparent; }
.tree-legend .sw.t { border: 1px dashed var(--n500); background: transparent; opacity: .6; }
.tree-legend em { font-family: var(--font-heading); font-size: 13px; flex-basis: 100%; }
.tree-minimap { position: absolute; right: 14px; bottom: 14px; width: 180px; height: 110px; border: 1px solid var(--divider); background: var(--n100); border-radius: 4px; z-index: 2; overflow: hidden; box-shadow: var(--shadow-sm); pointer-events: none; }
.tree-minimap svg { width: 100%; height: 100%; display: block; }
.tree-minimap .view { fill: rgba(182, 130, 53, .1); stroke: var(--brass); stroke-width: 12; }
.tree-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 420px; overflow-y: auto; background: var(--paper); border-left: 1px solid var(--divider); box-shadow: var(--shadow-lg); padding: 24px 28px 32px; display: flex; flex-direction: column; z-index: 5; cursor: auto; }
.tree-drawer[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.drawer-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-chips .tag { font-size: 11px; }
.drawer-chips .branch { background: transparent; border: 1px solid currentColor; }
.drawer-close { width: 32px; height: 32px; font-size: 22px; line-height: 1; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 4px; }
.drawer-close:hover { background: rgba(32, 31, 29, .07); }
.tree-drawer h2 { font-size: 30px; font-weight: 400; margin: 14px 0 4px; line-height: 1.05; }
.drawer-meta { font-family: var(--font-heading); font-style: italic; font-size: 17px; color: var(--n700); font-variant-numeric: tabular-nums; }
.drawer-photo { margin: 18px 0; display: grid; place-items: center; height: 150px; border: 1px dashed var(--n400); border-radius: 4px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--n100); }
.tree-drawer h3 { font-family: var(--font-body); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-700); margin: 0 0 8px; font-weight: 400; }
.drawer-facts { margin: 0 0 18px; padding-left: 18px; font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }
.drawer-none { font-size: 14px; color: var(--muted); font-style: italic; margin: 0 0 18px; }
.drawer-conn { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.drawer-conn > div { display: grid; grid-template-columns: 84px 1fr; gap: 9px; font-size: 14px; border-bottom: 1px solid var(--divider); padding-bottom: 9px; }
.drawer-conn .lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.drawer-conn .ppl { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.drawer-conn button { background: none; border: 0; padding: 0; font: inherit; color: var(--brass-700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.drawer-conn button:hover { color: var(--brass-600); }
.tree-drawer .btn-primary { align-self: flex-start; }
.tree-help { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 11px; color: var(--muted); background: rgba(243, 242, 242, .9); padding: 3px 10px; border-radius: 3px; pointer-events: none; z-index: 2; white-space: nowrap; }
@media (max-width: 960px) {
  .tree-legend { display: none; }
  .tree-minimap { display: none; }
  .tree-help { display: none; }
}
@media (max-width: 760px) {
  .tree { height: calc(100vh - 64px); min-height: 520px; }
  .tree-controls { gap: 8px; }
  .tree-search { max-width: none; flex: 1; min-height: 40px; font-size: 15px; }
  .tree-controls .seg, .tree-actions { display: none; }
  .tree-branch-cycle { display: inline-flex; min-height: 40px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
  .tree-drawer { top: auto; left: 0; right: 0; width: auto; max-height: 72%; border-left: 0; border-top: 1px solid var(--divider); border-radius: 12px 12px 0 0; padding: 12px 20px 28px; }
  .drawer-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--n300); margin: 0 auto 12px; }
  .tree-drawer h2 { font-size: 26px; }
}
.drawer-grip { display: none; }
@media (max-width: 760px) { .drawer-grip { display: block; } }

/* Accessible list under the canvas */
.gen-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 20px 0; border-top: 1px solid var(--divider); }
.gen-group h3 { font-size: 22px; margin: 0; font-variant-numeric: tabular-nums; }
.gen-group ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; font-size: 14px; line-height: 1.7; }
.gen-group li { break-inside: avoid; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.gen-group li .dot { position: relative; top: -1px; }
.gen-group .m { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .gen-group { grid-template-columns: 1fr; gap: 10px; } .gen-group ul { columns: 1; } }

/* ── Reveal on scroll ───────────────────────────────────────────────── */
html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s ease-out, transform .7s ease-out; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ── 404 ────────────────────────────────────────────────────────────── */
.notfound { text-align: center; padding: 96px var(--gutter); }
.notfound h1 { font-size: 64px; font-weight: 400; }

/* ── Motion & print ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .hero-title, html.js .hero-sub, html.js .hero-eyebrow, html.js .hero-chevron { animation: none; opacity: 1; }
}
@media print {
  .site-header, .site-footer, .hero-chevron, .tree { display: none; }
  .hero { min-height: 0; color: var(--ink); }
  .hero img, .hero::before { display: none; }
  .hero-title { border-color: var(--ink); }
  html.js .reveal { opacity: 1; transform: none; }
}
