/* A quiet, readable scale shared by all research views. */
:root{--ui-body:17px;--ui-label:14px;--ui-small:14px;--ui-meta:14px;--ui-muted:#52614b;--ui-secondary:#3f543b}
body{line-height:1.7}.intro p,.workspace-note,.festival-card-summary,.festival-detail p,.atlas-detail p,.pm-place-summary,.pm-location-note,.comparison-summary,.collection-summary{font-size:16px!important;line-height:1.75!important}
.library-kicker,.collection-kicker,.festival-kind,.festival-source-kind,.atlas-source-kind,.atlas-search-hit .library-kicker,.unified-profile .library-kicker,.timeline-legend,.pm-status,.intro .eyebrow,.reader-credit,.reader-edition small,.sacred-edition-context,.source-edition-note{font-size:14px!important;line-height:1.65;color:#52614b}
button,input,select,textarea{font-family:inherit}button:not(.pm-marker):not(.pm-marker-group),select,input:not([type=checkbox]):not([type=radio]){min-height:44px}input[type=checkbox]{width:18px;height:18px;accent-color:#46623b}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #526d42;outline-offset:3px}
.festival-card,.pm-place{position:relative}.festival-card[aria-pressed=true],.pm-place[aria-pressed=true]{padding-right:32px!important}.festival-card[aria-pressed=true]::after,.pm-place[aria-pressed=true]::after{content:'✓';position:absolute;right:12px;top:12px;font:700 16px/1.4 var(--sans);color:#3f5737}
.atlas-layout-picker [aria-pressed=true],.cities-view-switch [aria-pressed=true],.sacred-tabs [aria-pressed=true],.unified-profile-tabs [aria-selected=true]{box-shadow:inset 0 -3px #526d42;font-weight:650}
.source-context{padding:12px 16px;border-bottom:1px solid #dce3d4;background:#f8faf3;font-size:14px;line-height:1.7;color:#42543c}.source-context strong{font-weight:650}.source-context p{margin:5px 0!important;font-size:14px!important}.source-context span+span::before{content:' · ';white-space:pre}.source-edition-note{display:block;margin:5px 0 10px}.source-context code{font:inherit}.reader-credit a,.sacred-source-link{min-height:44px;display:inline-flex;align-items:center}
.festival-explore{border-top:1px solid #d5ddca;margin-top:24px;padding-top:20px}.festival-explore h3{font-size:24px;margin:0 0 8px}.festival-explore>p{font-size:14px!important;color:#52614b}.festival-explore-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.festival-explore-links button{display:grid;gap:4px;align-content:start;width:100%;text-align:left;border:1px solid #d9e1cf;border-radius:8px;background:#f8faf4;color:#344b3e;padding:12px;font:inherit;min-width:0}.festival-explore-links strong{font-size:16px}.festival-explore-links small{font-size:14px;line-height:1.65;color:#52614b}.festival-explore-links span{font-size:14px;font-weight:600}.festival-explore-links button:hover{background:#edf2e5;border-color:#879d73}
.map-workspace-host{position:relative;isolation:isolate;z-index:20}.map-workspace-tools{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:12px;background:#f5f8ef;border:1px solid #d8e0ce;border-radius:8px;min-width:0}.map-workspace-tools button,.map-detail-bar button{font:600 14px/1.5 var(--sans);color:#344b3e;background:#fffefa;border:1px solid #bbcbae;border-radius:6px;padding:10px 14px;min-height:44px;cursor:pointer}.map-workspace-tools button{flex-shrink:0}.map-workspace-hint{font-size:14px!important;line-height:1.6!important;color:#52614b!important;margin:0!important}.map-detail-dock{min-width:0;min-height:0;overflow:hidden}.map-detail-body{height:100%;overflow:auto;overscroll-behavior:contain}.map-detail-body>.inspector,.map-detail-body>.atlas-detail,.map-detail-body>.pm-detail{height:100%;max-height:none;box-sizing:border-box}.map-detail-bar{display:none}.workbench.map-workspace-host{grid-template-rows:auto minmax(0,1fr);gap:0;overflow:visible}.workbench.map-workspace-host>.map-workspace-tools{border-radius:0}.workbench.map-workspace-host>.map-pane{min-height:0}.workbench.map-workspace-host .map-actions #map-fullscreen{display:none}
.map-focus-mode{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;min-height:0!important;max-height:none!important;z-index:100!important;margin:0!important;padding:10px!important;border-radius:0!important;box-sizing:border-box;background:#f7f8f2;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,340px)!important;grid-template-rows:auto minmax(0,1fr)!important;gap:10px!important;overflow:hidden!important}
.map-focus-mode>.map-workspace-tools{grid-row:1;grid-column:1/-1}.map-focus-mode>.map-pane,.map-focus-mode>.atlas-map-panel,.map-focus-mode>.pm-map-panel{height:100%!important;min-height:0!important;grid-row:2;grid-column:1;display:flex;flex-direction:column;overflow:hidden}.map-focus-mode>.map-detail-dock{grid-row:2;grid-column:2}.map-focus-mode .graph-area,.map-focus-mode .atlas-graph-wrap,.map-focus-mode .pm-map{flex:1;min-height:0!important;height:auto!important}.map-focus-mode .atlas-map-guide,.map-focus-mode .atlas-family-people{display:none}.map-focus-mode .pm-map-footer{flex-shrink:0}.map-focus-mode .map-toolbar,.map-focus-mode .atlas-map-toolbar{flex-shrink:0}.map-focus-mode .pm-detail{max-height:none}.map-focus-mode .pm-detail-empty{height:auto}.map-focus-mode .map-footer{flex-shrink:0}.map-focus-mode .atlas-map-count{font-size:14px}
@media(max-width:760px){
 :root{--ui-body:17px;--ui-small:14px;--ui-meta:14px}.intro p{font-size:16px!important}.source-context{padding:12px}.source-context span{display:block}.source-context span+span::before{content:''}.map-workspace-tools{display:grid;gap:8px}.map-workspace-tools button{width:100%}.map-workspace-hint{font-size:14px!important}.map-workspace-host{padding-bottom:65px}.map-detail-dock{position:fixed;z-index:65;bottom:0;left:0;right:0;background:#fffefa;box-shadow:0 -5px 26px #25342626;border:1px solid #bac8aa;border-radius:14px 14px 0 0;max-height:52dvh;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom)}.map-detail-bar{display:block;flex-shrink:0;padding:5px 10px;border-bottom:1px solid #dce3d4}.map-detail-bar button{width:100%;border:0;background:transparent;text-align:left;padding:8px 4px}.map-detail-body{display:none;height:auto;min-height:0;overflow:auto;overscroll-behavior:contain}.map-detail-dock.is-open .map-detail-body{display:block}.map-detail-body>.inspector,.map-detail-body>.atlas-detail,.map-detail-body>.pm-detail{height:auto;max-height:none;border:0;padding:16px 18px}.map-detail-body h2,.map-detail-body h3{scroll-margin-top:80px}.workbench.map-workspace-host{display:block;height:auto!important;min-height:0}.workbench.map-workspace-host>.map-pane{height:620px}.map-workspace-host .atlas-graph-wrap{min-height:380px}.map-focus-mode{padding:8px 8px 65px!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr)!important;gap:8px!important}.map-focus-mode>.map-detail-dock{grid-column:auto;grid-row:auto}.map-focus-mode>.map-pane,.map-focus-mode>.atlas-map-panel,.map-focus-mode>.pm-map-panel{grid-column:1;grid-row:2;height:100%!important}.map-focus-mode .map-workspace-tools{display:flex;flex-wrap:wrap;padding:8px}.map-focus-mode .map-workspace-tools button{width:auto;flex:1}.map-focus-mode .map-workspace-hint{display:none}.map-focus-mode .discovery-bar,.map-focus-mode .map-footer,.map-focus-mode .graph-legend,.map-focus-mode .atlas-drag-hint,.map-focus-mode .pm-map-footer{display:none}.map-focus-mode .graph-area,.map-focus-mode .atlas-graph-wrap,.map-focus-mode .pm-map{min-height:120px!important}.map-focus-mode .atlas-map-toolbar h2{font-size:19px!important}.map-focus-mode .atlas-map-toolbar{padding:10px!important}.map-focus-mode .map-toolbar{padding:8px!important}.map-focus-mode .map-actions .depth-label select{max-width:145px}.map-focus-mode .map-title{font-size:14px}.festival-explore-links{grid-template-columns:1fr}.festival-explore-links button{padding:14px}.pm-religion,.festival-card-summary,.atlas-map-count,.atlas-zoom-value,.graph-legend{font-size:14px!important}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

.source-context summary{min-height:44px;padding:8px 0;box-sizing:border-box;cursor:pointer}.reference-read-action{display:block;font-size:14px;font-weight:600;margin-bottom:4px;color:#435d3b}

.city-reference-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0}.city-reference-actions a{min-height:44px;display:flex;align-items:center;font-size:14px;color:#40563b}.city-reference-actions .city-verse{min-height:44px;font-size:14px!important;line-height:1.6}

@media(max-width:760px){.map-focus-mode.map-sheet-open{padding-bottom:calc(52dvh + 8px + env(safe-area-inset-bottom))!important}.map-focus-mode.map-sheet-open .atlas-map-toolbar h2{font-size:17px!important}.map-focus-mode.map-sheet-open .map-workspace-tools{padding:4px}.map-focus-mode.map-sheet-open .atlas-map-toolbar{padding:6px 10px!important}}

@media(max-width:760px){.sidebar,.sidebar-shade{transition:none!important}.map-detail-bar{display:flex;gap:8px;align-items:center}.map-detail-toggle{flex:1;min-width:0}.map-detail-bar .map-detail-expand{width:44px!important;min-width:44px;flex:0 0 44px;text-align:center;font-size:22px!important}}

.festival-explore-shortcut{font:600 14px/1.5 var(--sans);min-height:44px;padding:10px 14px;background:#edf2e5;border:1px solid #c7d4b8;border-radius:6px;color:#344b3e;cursor:pointer}.festival-explore{scroll-margin-top:80px}

/* Content must grow with long names, compounds and source references. */
body{overflow-wrap:anywhere}
button,a,summary{overflow-wrap:anywhere}
.index-person,.index-person>div,.atlas-person-card,.atlas-search-hit,.comparison-account,.path-person-copy,.source-context,.reader-credit,.sacred-credit{min-width:0}
.reader-verse,.verse-text,.reader-chapter-heading h3,.unified-profile-header h2,.atlas-detail h2,.city-detail-heading h2{overflow-wrap:anywhere}
.map-detail-toggle{white-space:normal;text-align:left}
.topbar .breadcrumb strong,.breadcrumb #religion-crumb{max-width:none;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
@media(max-width:760px){
 .topbar{display:grid;grid-template-columns:44px minmax(0,1fr);gap:4px 8px;align-items:center;z-index:85;flex-wrap:wrap!important}
 .topbar>.mobile-menu{grid-column:1;grid-row:1;display:flex}
 .topbar-tools{grid-column:2;grid-row:1;justify-content:flex-end;margin:0;min-width:0}
 .topbar .breadcrumb{grid-column:1/-1;grid-row:2;display:flex;flex-basis:auto!important;max-width:none;gap:6px;flex-wrap:wrap;min-width:0}
 .topbar .breadcrumb>svg{display:none}
 .topbar #religion-crumb,.topbar .crumb-slash{display:block;max-width:none;flex-shrink:0}
 .topbar .breadcrumb strong{max-width:none;font-size:14px;flex:1 1 auto}
 .topbar .language-picker select{max-width:none!important;width:120px}
 .sidebar{z-index:80}.sidebar-shade.open{z-index:79}
 .topbar .breadcrumb #religion-crumb{font-size:14px;flex-shrink:1}
}

.unified-profile-header>div{min-width:0}
.unified-profile-tabs button{overflow-wrap:normal;hyphens:none}
@media(max-width:380px){.unified-profile-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-height:500px){.unified-profile .unified-profile-chrome{position:static}}
