/* A quiet reading surface with one map toolbar and optional reference layers. */
.history-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body[data-atlas-page=history] main{padding-top:16px;max-width:1480px}
body[data-atlas-page=history] .atlas-history-title{font:500 clamp(1.7rem,3vw,2.2rem)/1.15 var(--a-display);margin:0 0 16px;color:var(--a-ink)}
body[data-atlas-page=history] .journey-bar{margin:0 0 16px;padding:0 0 12px;gap:16px;flex-wrap:nowrap}
body[data-atlas-page=history] .journey-bar button{min-height:44px;border-radius:8px;font-size:.875rem}
body[data-atlas-page=history] .journey-modes{gap:3px;padding:3px;background:var(--a-surface);border-radius:11px}
body[data-atlas-page=history] .journey-modes button{border:0;padding:8px 15px;color:var(--a-muted);background:transparent}
body[data-atlas-page=history] .journey-modes button.active{background:var(--a-card);color:var(--a-ink);box-shadow:0 1px 4px #00000012}
body[data-atlas-page=history] #chapter-controls{flex:1;justify-content:flex-end;gap:8px}
body[data-atlas-page=history] .chapter-picker{flex:1;max-width:450px;min-width:0}
body[data-atlas-page=history] .chapter-picker label{font-size:.75rem;line-height:1.3;margin-bottom:3px;color:var(--a-muted)}
body[data-atlas-page=history] .chapter-picker select{font:400 .9375rem/1.4 system-ui,sans-serif;min-height:32px;padding:3px 22px 3px 0;color:var(--a-ink)}
body[data-atlas-page=history] #chapter-prev{width:44px;padding:8px;flex:none;background:var(--a-card);border:1px solid var(--a-line);color:var(--a-ink)}
body[data-atlas-page=history] #chapter-next{flex:none;white-space:nowrap;padding:8px 14px;background:var(--a-green);color:var(--a-paper)}
body[data-atlas-page=history] .chapter-progress-track{left:0;right:0;height:2px;background:var(--a-line)}
body[data-atlas-page=history] .atlas{grid-template-columns:minmax(0,1fr) minmax(320px,35%);height:var(--history-panel-height,660px);min-height:460px;border:1px solid var(--a-line);border-radius:14px;box-shadow:0 8px 28px #263c3510;overflow:hidden}
body[data-atlas-page=history] .map-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;background:var(--a-surface)}
body[data-atlas-page=history] .map-top{position:relative;inset:auto;padding:12px 14px;gap:10px;align-items:center;background:var(--a-card);border-bottom:1px solid var(--a-line);pointer-events:auto;z-index:3}
body[data-atlas-page=history] .map-top .eyebrow{display:none}
body[data-atlas-page=history] .map-top .era{font:500 1.2rem/1.25 var(--a-display);color:var(--a-ink);margin:0;max-width:100%;text-shadow:none}
.map-top-actions{display:flex;align-items:center;gap:8px;flex:none}
body[data-atlas-page=history] .view-switch{box-shadow:none;align-self:auto;border:1px solid var(--a-line);border-radius:7px;overflow:hidden}
body[data-atlas-page=history] .view-switch button{min-height:40px;padding:7px 10px;border:0;border-radius:0;background:transparent;color:var(--a-muted);font:500 .8rem/1.4 system-ui,sans-serif}
body[data-atlas-page=history] .view-switch button.active{background:var(--a-surface);color:var(--a-ink)}
body[data-atlas-page=history] #map{height:100%;min-height:0;overflow:hidden;background:#a9c1c9;touch-action:pan-y pinch-zoom;outline-offset:-3px}
body[data-atlas-page=history] .map-touch-enabled #map{touch-action:none}
#terrain-image,#modern-borders,#geolabels{pointer-events:none}
#terrain-image{filter:saturate(.65)}
.modern-border{fill:none;stroke:#5b5549;stroke-width:.7;stroke-opacity:.6;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.modern-border.is-disputed{stroke-dasharray:3 3}
.country-label{fill:#303f38;font:500 13px/1.2 system-ui,sans-serif;letter-spacing:.04em;paint-order:stroke;stroke:#fffbe5;stroke-opacity:.85;stroke-width:3px;stroke-linejoin:round}
.terrain-label{fill:#65513a;font:italic 13px/1.2 Georgia,serif;paint-order:stroke;stroke:#fffbe5;stroke-opacity:.85;stroke-width:3px;stroke-linejoin:round}
body[data-atlas-page=history] .pin text{stroke:#fffbe5;stroke-width:4px;fill:#173c32}
body[data-atlas-page=history] .pin:focus{outline:none}
body[data-atlas-page=history] .pin:focus-visible .halo{stroke:var(--a-ink);stroke-width:2;opacity:1}
body[data-atlas-page=history] .map-bottom{position:static;padding:8px 12px;background:var(--a-card);border-top:1px solid var(--a-line);gap:8px}
body[data-atlas-page=history] .map-bottom>span{background:none;padding:0;color:var(--a-muted);font-size:.75rem;line-height:1.4;max-width:none;flex:1}
.map-navigation{display:flex;align-items:center;gap:8px;pointer-events:auto}
body[data-atlas-page=history] .zoom{gap:3px}
body[data-atlas-page=history] .zoom button,body[data-atlas-page=history] #map-touch{min-height:44px;background:var(--a-card);border:1px solid var(--a-line);color:var(--a-ink);border-radius:7px}
body[data-atlas-page=history] .zoom button{width:40px;padding:5px;font-size:1.1rem}
body[data-atlas-page=history] #map-touch{font:500 .75rem/1.3 system-ui,sans-serif;padding:7px 10px;white-space:nowrap}
body[data-atlas-page=history] #map-touch[aria-pressed=true]{background:var(--a-green);color:var(--a-paper)}
#map-reference{padding:0 12px 9px;background:var(--a-card);font-size:.6875rem;line-height:1.4;color:var(--a-muted);text-align:left}
body[data-atlas-page=history] #story{min-height:0;max-height:100%;padding:28px;border-color:var(--a-line);background:var(--a-card);overscroll-behavior:auto;scrollbar-width:thin;scrollbar-color:var(--a-line) transparent}
body[data-atlas-page=history] #story h2{font:500 clamp(1.7rem,2.4vw,2.2rem)/1.12 var(--a-display);letter-spacing:-.4px;color:var(--a-ink)}
body[data-atlas-page=history] #story .lead{font-size:1.125rem;line-height:1.65}
body[data-atlas-page=history] #story .tag{margin-bottom:12px;font-size:.7rem}
body[data-atlas-page=history] .chapter-route{animation:none;stroke-dasharray:7 5}
.history-route-tools{margin:0;font-size:.8125rem}
.history-route-tools>summary{display:flex;align-items:center;min-height:42px;padding:7px 11px;border:1px solid var(--a-line);border-radius:7px;color:var(--a-ink);cursor:pointer;list-style:none;white-space:nowrap;font:500 .8rem/1.4 system-ui,sans-serif}
.history-route-tools>summary::-webkit-details-marker{display:none}
.history-route-tools>summary::after{content:'⌄';margin-left:6px}
.history-route-tools[open]>summary{background:var(--a-surface)}
.history-options-panel{position:absolute;right:12px;top:calc(100% + 6px);width:min(330px,calc(100% - 24px));padding:18px;border:1px solid var(--a-line);border-radius:12px;background:var(--a-card);box-shadow:0 10px 32px #142f3429;max-height:min(360px,calc(var(--history-panel-height,660px) - 120px));overflow:auto}
.history-options-panel>label{display:grid;gap:7px;font-weight:500}
.history-route-tools select{width:100%;max-width:100%;font:inherit;min-height:44px;background:var(--a-paper);color:var(--a-ink);border:1px solid var(--a-line);border-radius:6px;padding:8px}
.history-layer-toggles{display:grid;gap:2px;margin:10px 0}
.history-layer-toggles label{display:flex;align-items:center;gap:10px;min-height:44px}
.history-layer-toggles input{width:18px;height:18px;accent-color:var(--a-green)}
.history-route-tools p{font-size:.8125rem;line-height:1.6;margin:12px 0}
body[data-atlas-page=history] .legend{display:grid;justify-content:start;min-height:0;padding:12px 0 0;border-top:1px solid var(--a-line);background:transparent;color:var(--a-muted);gap:10px;font-size:.75rem}
body[data-atlas-page=history] .timeline{margin:0 0 16px;padding:16px 20px;background:var(--a-card);border:1px solid var(--a-line);border-radius:12px}
body[data-atlas-page=history] .timeline .eyebrow{display:none}
body[data-atlas-page=history] .year{font:500 1.7rem/1.2 var(--a-display);min-width:120px}
body[data-atlas-page=history] .time-heading{gap:14px}
body[data-atlas-page=history] .count{font-size:.75rem}
body[data-atlas-page=history] .time-buttons button{min-height:44px;border-radius:7px}
body[data-atlas-page=history] .history-depth{margin:14px 0 0;gap:10px;font-size:.75rem;border-top:1px solid var(--a-line);padding-top:8px}
body[data-atlas-page=history] .history-depth>input{display:none}
body[data-atlas-page=history] .depth-labels{gap:3px}
body[data-atlas-page=history] .depth-labels button{font-size:.75rem;padding:6px 10px;min-height:40px;border-radius:6px}
body[data-atlas-page=history] .depth-labels button.active{background:var(--a-surface);color:var(--a-ink)}
.history-source-links{padding-left:1.25rem;margin:.75rem 0;line-height:1.6}.history-source-links li{margin:.5rem 0}.history-source-links a{overflow-wrap:anywhere}
.documented-travel{stroke:#845328;pointer-events:none}.travel-stop{fill:#845328;stroke:#fff5d5;stroke-width:2}.travel-stop-label{font:12px system-ui,sans-serif;fill:#42331f;stroke:#fff8dd;stroke-width:3px;paint-order:stroke;pointer-events:none}
.history-place-links{border-block:1px solid var(--a-line);padding:.8rem 0;margin:1.2rem 0}.history-place-links ul{padding-left:1.1rem;font-size:.9rem;line-height:1.6}.history-place-links li{margin:.5rem 0}
html[data-theme=dark] #terrain-image{filter:brightness(.64) saturate(.55)}
html[data-theme=dark] .modern-border{stroke:#eee6cf;stroke-opacity:.5}
html[data-theme=dark] :is(.country-label,.terrain-label){fill:#f0ead7;stroke:#182c27;stroke-opacity:.9}
html[data-theme=dark] body[data-atlas-page=history] .pin text{fill:#fff5d9;stroke:#20382f}
html[data-theme=dark] .documented-travel{stroke:#f4c98c}html[data-theme=dark] .travel-stop-label{fill:#fff4d9;stroke:#253526}
@media(max-width:1000px){body[data-atlas-page=history] .atlas{grid-template-columns:minmax(0,1fr) 330px}body[data-atlas-page=history] #story{padding:22px}}
@media(max-width:850px){
 body[data-atlas-page=history] .map-top{align-items:flex-start;flex-direction:column;gap:8px}
 body[data-atlas-page=history] .map-top-actions{width:100%;justify-content:space-between}
}
@media(max-width:760px){
 body[data-atlas-page=history] main{padding:14px 12px 25px}
 body[data-atlas-page=history] .atlas-history-title{margin-bottom:14px;font-size:1.8rem}
 body[data-atlas-page=history] .journey-bar{flex-wrap:wrap;gap:12px;margin-bottom:12px}
 body[data-atlas-page=history] .journey-modes{width:100%}
 body[data-atlas-page=history] .journey-modes button{flex:1;min-height:40px}
 body[data-atlas-page=history] #chapter-controls{width:100%;gap:8px}
 body[data-atlas-page=history] .chapter-picker{max-width:none}
 body[data-atlas-page=history] .chapter-picker select{font-size:.875rem}
 body[data-atlas-page=history] #chapter-next{max-width:none;padding:8px 11px}
 body[data-atlas-page=history] .atlas{display:flex;flex-direction:column;height:auto;min-height:0;border-radius:12px}
 body[data-atlas-page=history] .map-shell{display:flex;flex-direction:column}
 body[data-atlas-page=history] #map{height:clamp(300px,44svh,420px);flex:none;cursor:default}
 .history-options-panel{max-height:min(360px,44svh)}
 body[data-atlas-page=history] .map-top{padding:10px 12px}
 body[data-atlas-page=history] .map-top .era{font-size:1.15rem}
 body[data-atlas-page=history] .map-bottom{flex-wrap:wrap;padding:8px 10px;gap:4px}
 body[data-atlas-page=history] .map-bottom>span{flex-basis:100%;font-size:.75rem;margin-bottom:3px}
 body[data-atlas-page=history] .map-navigation{width:100%;justify-content:space-between}
 body[data-atlas-page=history] .zoom button{width:44px}
 body[data-atlas-page=history] #story{max-height:none;overflow:visible;padding:24px 20px;border-left:0}
 body[data-atlas-page=history] .time-heading{flex-wrap:wrap;gap:10px}
 body[data-atlas-page=history] .timeline{padding:14px 12px}
 body[data-atlas-page=history] .count{width:100%}
 body[data-atlas-page=history] .time-buttons{gap:4px}
 body[data-atlas-page=history] .time-buttons #play{min-width:110px}
 body[data-atlas-page=history] .history-depth{gap:6px}
 body[data-atlas-page=history] .depth-labels button{padding:6px 8px}
}
