/* A public tree's front page and its register of persons (B323). */

.tree-hero { background: var(--navy); color: var(--on-navy); padding: 56px 0 104px; }
.tree-hero .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 56px; align-items: center; }
.tree-hero .text { display: flex; flex-direction: column; gap: 20px; }
.tree-hero .eyebrow { color: var(--leaf); }
.tree-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.75rem); line-height: 1.02; font-weight: 600; letter-spacing: -0.01em; }
.tree-hero .intro { margin: 0; font-size: 1.25rem; line-height: 1.6; color: var(--on-navy-muted); max-width: 34em; white-space: pre-line; }
.tree-hero .byline { margin: 0; font-size: 0.875rem; color: var(--on-navy-muted); }
.tree-hero .cover { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tree-hero .cover img { width: 100%; max-width: 520px; max-height: 440px; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.35)); }

.search { display: flex; gap: 8px; align-items: center; max-width: 580px; padding: 6px 6px 6px 22px; border-radius: 999px; background: #fffdf8; }
.search input { flex: 1; min-width: 0; min-height: 44px; border: 0; outline: 0; background: transparent; color: #13202d; font: inherit; font-size: 1rem; }
.search svg { flex: none; stroke: #4f5b66; }
.search .button { background: #0e6872; color: #ffffff; }
.search:focus-within { outline: 3px solid var(--leaf); outline-offset: 2px; }

.figures { position: relative; margin: -56px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); background: var(--card); border: 1px solid var(--rule); border-radius: 18px; box-shadow: var(--shadow); }
.figures div { padding: 26px 28px; border-right: 1px solid var(--rule); }
.figures div:last-child { border-right: 0; }
.figures dt { font-size: 0.875rem; color: var(--muted); }
.figures dd { margin: 6px 0 0; }
.figures .big { font-family: var(--serif); font-size: 2.5rem; font-weight: 600; line-height: 1.1; color: var(--heading); }
.figures .sub { font-size: 0.9rem; color: var(--muted); }

.block { padding-top: 96px; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 32px; margin-bottom: 28px; }
.block-head h2, .section-h { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.1; font-weight: 600; color: var(--heading); }
.block-head p { margin: 0; max-width: 30em; color: var(--muted); font-size: 1.1rem; }

.picks { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.picks a { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: 18px; text-decoration: none; color: inherit; }
.picks a:hover { border-color: var(--link); }
.picks .photo { width: 100%; height: 340px; object-fit: cover; object-position: center 22%; background: var(--rule); }
.picks .mono { height: 340px; font-size: 6rem; border-radius: 0; }
.picks .body { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 26px; }
.picks .years { font-size: 0.875rem; color: var(--muted); }
.picks h3 { margin: 0; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.2; color: var(--heading); }
.picks p { margin: 0; color: var(--muted); }
.picks .more { margin-top: 8px; font-weight: 700; color: var(--link); }

.band { margin-top: 96px; padding: 72px 0; background: var(--card); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.centuries { display: block; width: 100%; height: auto; }
.centuries .bar { fill: #c9dcdc; }
.centuries .bar.hot { fill: #0e6872; }
.centuries a:hover .bar, .centuries a:focus .bar { fill: #3c9aa2; }
.centuries .axis { stroke: var(--heading); stroke-width: 2; }
.centuries .label { font-size: 13px; fill: var(--muted); text-anchor: middle; }
.centuries .label.hot { fill: #0e6872; font-weight: 700; }
:root[data-theme='dark'] .centuries .bar { fill: #2c4a55; }
:root[data-theme='dark'] .centuries .bar.hot, :root[data-theme='dark'] .centuries a:hover .bar { fill: #78d4ca; }
:root[data-theme='dark'] .centuries .label.hot { fill: #78d4ca; }
:root[data-theme='dark'] .map { background: #1d2a36; }
.century { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 32px; margin-top: 28px; }
.century h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 1.9rem; color: var(--heading); }
.century p { margin: 0 0 14px; color: var(--muted); }

.archive { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.archive li { overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: 18px; }
.archive img { display: block; width: 100%; height: 280px; object-fit: cover; object-position: top; background: var(--rule); }
.archive p { margin: 0; padding: 16px 20px; font-weight: 600; color: var(--heading); }
.archive p > span { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 40px; align-items: start; }
.map { height: 420px; border-radius: 18px; border: 1px solid var(--rule); background: #dfe8ea; }
.place-list { margin: 0; padding: 0; list-style: none; }
.place-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }

.finder { padding: 40px 44px; background: var(--card); border: 1px solid var(--rule); border-radius: 18px; }
.finder .search { border: 1px solid var(--chip); margin: 18px 0; }

/* The register (B323): search, centuries and letters, 24 at a time */
.register-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--heading); }
.register-head p { margin: 6px 0 0; color: var(--muted); font-size: 1.1rem; }
.filters { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row > span { min-width: 92px; font-size: 0.875rem; color: var(--muted); }
.letters a { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--heading); text-decoration: none; }
.letters a[aria-current='true'] { background: #0e6872; color: #ffffff; }
.results { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 14px; }
.results a { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; text-decoration: none; color: var(--ink); }
.results a:hover { border-color: var(--link); }
.results .face { width: 56px; height: 56px; }
.results strong { display: block; color: var(--ink); }
.results span.yr { font-size: 0.875rem; color: var(--muted); }
.pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pages a, .pages span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--chip); background: var(--card); color: var(--heading); text-decoration: none; }
.pages [aria-current='page'] { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.pages span.gap { border: 0; background: none; }

@media (max-width: 760px) {
  .tree-hero { padding: 24px 0 72px; text-align: center; }
  .tree-hero .cover { order: -1; }
  .tree-hero .cover img { max-width: 240px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -40px 16px 0; }
  .figures div { padding: 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .figures .big { font-size: 1.75rem; }
  .block { padding-top: 56px; }
  .picks { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .picks li { scroll-snap-align: start; }
  .picks .photo, .picks .mono { height: 260px; }
  .band { margin-top: 56px; padding: 48px 0; }
  .archive { grid-template-columns: 1fr; }
  .finder { padding: 24px; }
  .filter-row > span { min-width: 100%; }
}
.find-actions { display: flex; flex-wrap: wrap; gap: 10px; }
