:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.45;
  color: #1a1a1a;
  background: #faf9f7;
}

body {
  margin: 0 auto;
  max-width: 52rem;
  padding: 1.25rem 1rem 3rem;
}

.scope-note {
  color: #444;
  font-size: 0.95rem;
  max-width: 40rem;
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  background: #f0eeea;
  border-radius: 6px;
  border-left: 3px solid #64748b;
}

.page-head h1 {
  font-size: 1.75rem;
  font-weight: 650;
  margin: 0.25rem 0;
}

.crumb a {
  color: #2563eb;
  text-decoration: none;
}
.crumb a:hover {
  text-decoration: underline;
}

.life {
  color: #555;
  font-size: 0.95rem;
}

.evt {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

.relations {
  margin: 1.75rem 0;
}

.relations h2 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.relations ul {
  margin: 0;
  padding-left: 1.25rem;
}

.relations a {
  color: #1d4ed8;
  font-weight: 500;
  text-decoration: none;
}
.relations a:hover {
  text-decoration: underline;
}

.sunburst-section {
  margin-top: 2rem;
}

.sunburst-section .hint {
  color: #444;
  font-size: 0.9rem;
  margin-top: 0;
}

#sunburst-root {
  margin-top: 1rem;
  overflow: auto;
}

#sunburst-root svg {
  display: block;
  margin: 0 auto;
}

.arc-hit:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.arc-label {
  font-size: 13px;
  font-weight: 600;
  fill: #111;
  pointer-events: none;
  letter-spacing: 0.01em;
}

.arc-label .arc-label-dates {
  font-size: 11px;
  font-weight: 500;
  fill: #2d2d2d;
}

.sunburst-center {
  font-size: 15px;
  font-weight: 700;
  fill: #111;
}

.sunburst-center-meta {
  fill: #444;
}

.sunburst-center-sub {
  font-size: 12px;
  fill: #444;
}

.index-list .all-people {
  column-width: 18rem;
  column-gap: 2rem;
  padding-left: 1.25rem;
}

.index-list a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}
.index-list a:hover {
  text-decoration: underline;
}

/* Anor — utforskare (detalj / mappar) */
.explorer-section {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e0d8;
}

.explorer-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.explorer-intro {
  color: #444;
  font-size: 0.92rem;
  max-width: 44rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.explorer-tree {
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 100%;
  overflow-x: auto;
}

.explorer-folder {
  margin: 0.15rem 0 0.35rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e8e4dc;
  padding: 0.2rem 0.45rem 0.45rem;
}

.explorer-folder > summary {
  cursor: pointer;
  list-style-position: outside;
  padding: 0.2rem 0.15rem;
  font-weight: 500;
}

.explorer-folder > summary::marker,
.explorer-folder > summary::-webkit-details-marker {
  color: #64748b;
}

.explorer-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.explorer-link:hover {
  text-decoration: underline;
}

.explorer-link.is-current {
  background: #fef3c7;
  color: #1e3a5f;
  border-radius: 4px;
  padding: 0.05em 0.3em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.explorer-dates {
  color: #555;
  font-weight: 400;
  font-size: 0.88em;
  margin-left: 0.25em;
}

.explorer-branches {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-left: 0.5rem;
}

.explorer-branch {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.35rem 0.5rem;
  align-items: start;
  border-left: 2px solid #cbd5e1;
  padding-left: 0.6rem;
  margin-left: 0.15rem;
}

.explorer-branch-father {
  border-left-color: #6b8cae;
}

.explorer-branch-mother {
  border-left-color: #9b8cb8;
}

.explorer-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding-top: 0.2rem;
}

.explorer-sub {
  min-width: 0;
}

.explorer-sub .explorer-folder {
  margin-top: 0.15rem;
}

.explorer-leaf {
  padding: 0.2rem 0.25rem;
  display: inline-block;
  max-width: 100%;
}

.explorer-leaf .explorer-link.is-current {
  display: inline;
}

.explorer-placeholder {
  color: #6b7280;
  font-style: italic;
}

.explorer-cycle {
  color: #92400e;
  font-size: 0.9em;
}

/* Bilder (manifest → media/) */
.person-media {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e0d8;
}

.person-media > h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.media-album h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin: 1.25rem 0 0.5rem;
}

.media-album:first-child h3 {
  margin-top: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}

.media-fig {
  margin: 0;
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.media-fig a {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f4f2ee;
}

.media-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.media-fig figcaption {
  padding: 0.35rem 0.5rem 0.5rem;
  font-size: 0.78rem;
  color: #555;
  line-height: 1.25;
  word-break: break-word;
}

/* PDF / dokument (manifest pdfPersonIds) */
.person-documents {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e0d8;
}

.person-documents > h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.pdf-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #6b6560;
  max-width: 40rem;
  line-height: 1.45;
}

.pdf-album h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin: 1rem 0 0.35rem;
}

.pdf-album:first-child h3 {
  margin-top: 0;
}

.pdf-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.pdf-list a {
  font-weight: 500;
}

.pdf-suffix {
  color: #6b7280;
  font-size: 0.88em;
}

.file-size {
  color: #6b6560;
  font-size: 0.9em;
}

/* Global nav: Hem / Platser */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.5rem 0.75rem;
  background: #f0eeea;
  border-radius: 8px;
  border: 1px solid #e5e0d8;
}

.site-nav-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav-link:hover {
  text-decoration: underline;
}

.site-nav-link.is-active {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
  pointer-events: none;
}

/* Kartsida */
body.places-page {
  max-width: 100%;
  padding: 1.25rem 1rem 2rem;
}

.places-head .places-lead {
  color: #444;
  margin: 0.5rem 0 0.25rem;
}

.places-hint {
  color: #6b6560;
  font-size: 0.9rem;
  max-width: 48rem;
  line-height: 1.45;
  margin: 0.5rem 0 0;
}

.places-main {
  margin-top: 1rem;
  max-width: 100%;
}

.places-map {
  width: 100%;
  min-height: min(75vh, 720px);
  height: 70vh;
  background: #e5e3df;
  border-radius: 8px;
  border: 1px solid #d6d2ca;
  z-index: 0;
}

.map-tooltip-inner {
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
}

.map-tooltip-inner a {
  color: #1d4ed8;
}

.leaflet-tooltip.place-map-tooltip {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  max-width: 18rem;
}
