/* Printed place names retain scripture typography and faithful copy text. */
:is(.verse-text,.title-scripture) .geography-place {
 display:inline; min-width:0; min-height:0; width:auto; padding:0; margin:0;
 border:0; border-radius:0; box-shadow:none; background:transparent;
 color:inherit; font:inherit; line-height:inherit; letter-spacing:inherit;
 vertical-align:baseline; text-align:inherit; user-select:text;
 text-decoration:underline dotted color-mix(in srgb,var(--accent) 60%,transparent);
 text-decoration-thickness:1px; text-underline-offset:.19em; cursor:pointer;
}
:is(.verse-text,.title-scripture) .geography-place:hover,
:is(.verse-text,.title-scripture) .geography-place[aria-expanded='true'] { color:var(--accent); text-decoration-style:solid; }
.geography-place:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.geography-panel,.geography-detail {
 min-width:0; color:var(--text); font-family:var(--sans);
 font-size:max(16px,calc(var(--reader-font-size,18px) - 1px));
 line-height:var(--reader-line-height,1.85); overflow-wrap:anywhere;
}
.geography-panel {
 box-sizing:border-box; margin:8px 0 12px; padding:13px 16px 4px; border:1px solid var(--border);
 border-left:3px solid var(--accent); border-radius:10px; background:var(--surface-muted);
 overflow-anchor:none;
}
.geography-panel:focus { outline:none; }
.geography-heading { display:flex; gap:12px; justify-content:space-between; align-items:flex-start; }
.geography-heading > div { min-width:0; }
:is(.geography-panel,.geography-detail) .geography-heading h3 { font-size:1.25em; line-height:1.5; margin:0 0 5px; color:var(--text); }
.geography-eyebrow { font-size:.8em; color:var(--accent); font-weight:600; letter-spacing:.04em; }
.geography-close { width:32px; min-width:32px; height:32px; border:0; border-radius:6px; background:transparent; color:var(--text-secondary); font:inherit; font-size:24px; line-height:1; cursor:pointer; }
:is(.geography-panel,.geography-detail) p { margin:0 0 .5em; white-space:pre-line; }
:is(.geography-panel,.geography-detail) :is(h4,h5) { font:inherit; font-weight:700; margin:.55em 0 .2em; }
.geography-paragraph + .geography-paragraph { margin-top:.8em; }
.geography-scripture-excerpt { padding-left:.8em; border-left:2px solid var(--border); }
.geography-caption,.geography-card-category,.geography-card-meta,.geography-directory-note,.geography-result-count { color:var(--text-secondary); font-size:.88em; }
.geography-certainty { color:var(--accent); font-size:.93em; }
.geography-primary-location,.geography-background-section { border-top:1px solid var(--border); padding-top:8px; margin-top:14px; }
.geography-scenario { margin-top:18px; padding:12px 0 0; border-top:1px solid var(--border); }
.geography-scenario.is-current-context { border-top-color:var(--accent); }
.geography-scenario-heading { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.geography-context-tag { font-size:.72em; color:var(--accent); border:1px solid var(--border); border-radius:5px; padding:1px 7px; }
.geography-candidate { margin:5px 0 10px; }
.geography-candidate + .geography-candidate { margin-top:14px; padding-top:10px; border-top:1px dashed var(--border); }
.geography-map-link { display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--accent); text-decoration:none; font-size:.9em; }
.geography-source-link,.geography-detail-link { color:var(--accent); }
.geography-detail-link { font:inherit; font-size:.88em; background:none; border:0; padding:3px 0; text-align:left; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.geography-sources { margin:5px 0 8px; padding-left:1.2em; font-size:.85em; }
.geography-sources li { margin-bottom:5px; }
.geography-provenance { padding-top:8px; font-size:.8em; color:var(--text-secondary); }
.geography-collapse { display:block; width:100%; min-height:29px; border:0; background:transparent; color:var(--text-secondary); font:inherit; line-height:1.2; cursor:pointer; margin-top:3px; }
.geography-references { border-top:1px solid var(--border); padding-top:7px; margin-top:10px; }
.geography-references > summary { cursor:pointer; color:var(--accent); font-size:.93em; }
.geography-references > summary span { color:var(--text-secondary); padding-left:.35em; font-size:.9em; }
.geography-disclosure { box-sizing:border-box; }
.geography-disclosure > summary { cursor:pointer; color:var(--accent); font-weight:600; }
.geography-disclosure-body { padding-top:9px; }
.geography-testament > h5 { margin:0 0 7px; font-size:.88em; font-weight:600; }
.geography-testament + .geography-testament { border-top:1px solid var(--border); padding-top:10px; margin-top:12px; }
.geography-reference-items { --geography-reference-gap:calc(.6em + 12px); display:flex; flex-wrap:wrap; gap:6px var(--geography-reference-gap); align-items:center; }
/* Reserve the former divider width in every gap; the divider itself must not
   consume a flex item or shift the next column when the book changes. */
.geography-reference-slot { position:relative; display:flex; flex:0 0 calc(11.5em * .86); max-width:100%; min-width:0; }
.geography-reference { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:0 0 11.5em; width:11.5em; max-width:100%; height:3.25em; color:var(--accent); background:var(--surface); border:1px solid var(--border); border-radius:6px; font:inherit; font-size:.86em; line-height:1.35; padding:4px 7px; cursor:pointer; }
[data-language="both"] .geography-reference { height:4.5em; }
.geography-book-divider { position:absolute; inset-inline-start:calc(-1 * var(--geography-reference-gap)); top:50%; transform:translateY(-50%); width:var(--geography-reference-gap); text-align:center; color:var(--text-secondary); pointer-events:none; }
.geography-detail:focus { outline:none; }
.geography-alternatives { margin:10px 0 5px; border-top:1px solid var(--border); padding-top:6px; font-size:.9em; }
.geography-alternatives .geography-detail-link { margin-right:10px; }
/* The directory uses the existing page/card rhythm and does not load shards
   until a person chooses a place. All grid columns can shrink on phones. */
.geography-page-heading { margin-bottom:20px; }
.geography-page { min-width:0; overflow-anchor:none; }
.geography-filters { display:grid; grid-template-columns:minmax(220px,2fr) minmax(140px,1fr) minmax(160px,1fr) auto; gap:12px; align-items:end; padding:16px; }
.geography-filters label { display:flex; flex-direction:column; gap:6px; min-width:0; color:var(--text-secondary); font-size:14px; }
.geography-filters :is(input,select,.button) { min-height:40px; height:40px; box-sizing:border-box; }
.geography-filters :is(input,select) { width:100%; min-width:0; }
.geography-search-row { display:flex; gap:7px; }
.geography-search-row input { flex:1; }
.geography-search-row button { flex:none; }
.geography-clear { white-space:nowrap; }
.geography-result-count { margin:14px 0; }
.geography-place-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.geography-place-grid > .card.geography-place-card { padding:0; overflow:hidden; margin:0; height:100%; min-width:0; box-sizing:border-box; }
.geography-card-open { box-sizing:border-box; display:flex; flex-direction:column; gap:7px; width:100%; height:100%; padding:18px; background:transparent; border:0; color:var(--text); text-align:left; font:inherit; cursor:pointer; }
.geography-card-open:hover { background:color-mix(in srgb,var(--accent) 5%,transparent); }
.geography-card-open:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
.geography-card-open h3 { font-size:21px; line-height:1.5; margin:0; }
.geography-card-open p { margin:0; font-size:15px; line-height:1.7; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.geography-card-meta { margin-top:auto; padding-top:9px; width:100%; }
.geography-card-meta > span { float:right; color:var(--accent); }
.geography-page-actions { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:15px; }
.geography-page-actions .button { min-height:40px; }
.geography-detail { padding:22px 26px; }
.geography-detail .geography-heading h3 { font-size:1.65em; }
.geography-detail .geography-introduction { margin:14px 0 20px; }
.geography-background + .geography-background { margin-top:12px; }
.geography-more { display:flex; justify-content:center; margin:20px 0; }
.geography-directory-note { margin:20px 0 0; }
.geography-empty { padding:24px; text-align:center; }
@media(max-width:1100px){
 .geography-filters { grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); }
 .geography-clear { grid-column:3; }
 .geography-place-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px){
 .geography-filters { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; gap:10px; }
 .geography-query { grid-column:1/-1; }
 .geography-clear { grid-column:1/-1; justify-self:end; }
 .geography-place-grid { gap:10px; }
 .geography-card-open { padding:13px; }
 .geography-card-open h3 { font-size:19px; }
 .geography-card-open p { font-size:14px; }
 .geography-detail { padding:16px; }
 .geography-panel { padding:10px 11px 3px; }
 .geography-heading { gap:6px; }
}
@media(max-width:420px){.geography-place-grid{grid-template-columns:minmax(0,1fr);}.geography-card-open p{-webkit-line-clamp:2;}}
@media(prefers-reduced-motion:reduce){.geography-panel{animation:none!important;transition:none!important;}}

/* The search surface grows into the available space; additional topic tiles
   consume one equal-width column each, without hard-coding a topic count. */
.geography-toolbar { --topic-width:clamp(48px,4vw,60px); display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:stretch; gap:12px; }
.geography-toolbar .geography-filters { margin:0; grid-template-columns:minmax(0,1.5fr) minmax(110px,1fr) minmax(110px,1fr) auto; align-content:center; }
.geography-toolbar .geography-clear { grid-column:auto; }
.geography-journey-shortcuts { display:grid; grid-auto-flow:column; grid-auto-columns:var(--topic-width); gap:10px; align-items:stretch; }
.geography-journey-entry { box-sizing:border-box; width:100%; height:100%; min-height:112px; padding:9px 5px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; white-space:normal; }
.geography-journey-entry svg { flex:none; width:19px; height:19px; }
.geography-topic-labels { display:flex; align-items:center; justify-content:center; gap:3px; }
.geography-topic-text { writing-mode:vertical-rl; text-orientation:upright; white-space:nowrap; font-size:14px; line-height:1.2; letter-spacing:.05em; }
.geography-topic-text[lang='en'] { text-orientation:mixed; letter-spacing:0; }
[data-style='pixel'] .geography-topic-text { padding-inline:.12em; }
@media(max-width:1200px){
 .geography-toolbar .geography-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
 .geography-toolbar .geography-query { grid-column:1/-1; }
 .geography-toolbar .geography-clear { grid-column:2; }
}
@media(max-width:760px){
 .geography-toolbar { grid-template-columns:minmax(0,1fr); gap:10px; }
 .geography-journey-shortcuts { justify-self:end; gap:8px; }
 .geography-journey-entry { min-height:108px; padding-block:8px; }
 .geography-toolbar .geography-clear { grid-column:1/-1; justify-self:end; }
}
