.history-section.history-with-map .history-layout{grid-template-columns:minmax(0,1.5fr) minmax(310px,1fr);gap:20px}
.history-with-map .history-event-list{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;padding:0}
.history-route-map{min-width:0;position:sticky;top:20px;border:1px solid #d6e0d3;border-radius:14px;overflow:hidden;background:#f6f8ef}
.history-route-canvas{height:560px;background:#b8d8e1;z-index:0}
.history-map-tools{padding:14px 16px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;font-size:12px;color:#36533d}
.history-map-tools strong{font-size:13px}.history-map-tools label{display:flex;align-items:center;gap:5px;cursor:pointer}
.history-map-key{font-size:11px;line-height:1.8;color:#58705a;margin:0;padding:10px 16px}
.history-direction-marker{background:none;border:0}.history-route-map .history-direction-marker .atlas-direction-arrow{border:2px solid white;border-radius:50%;width:32px;height:32px;background:var(--direction-color);color:white;cursor:pointer;box-shadow:0 1px 5px #163d3455;display:grid;place-items:center;padding:0}
.history-direction-marker button span{display:block;transform:rotate(var(--direction-angle));font-size:21px;line-height:1}
.history-direction-marker button:focus-visible{outline:3px solid #163d34;outline-offset:3px}
.history-route-label{font-size:12px;color:#203f35;background:#fffffff2;border:1px solid #cfdbc9;border-radius:5px;box-shadow:none}
.history-route-links{margin-block:14px}.history-route-links .history-route-note{background:#eef4e8;padding:12px 14px;border-left:3px solid #74935f;font-size:13px;line-height:1.8}
.history-route-steps{display:grid;gap:7px;margin-block:14px}.history-route-steps button{width:100%;text-align:left;background:#fff;border:1px solid #d7e1d0;border-radius:8px;padding:10px 12px;color:#36553b;font:inherit;cursor:pointer}
.history-route-steps strong,.history-route-steps small{display:block;line-height:1.7}.history-route-steps strong{font-size:13px}.history-route-steps small{font-size:11px;color:#77856e}
.history-route-steps button[aria-pressed=true]{background:#e9f1e1;border-color:#68885a}.history-route-sources{border-top:1px solid #dce4d5;padding-top:12px;margin-top:12px;font-size:12px;line-height:1.9}
.history-route-sources summary{cursor:pointer;color:#536e46}.history-route-sources a{color:#355d45}.history-route-unknown,.history-place-note{font-size:12px!important;line-height:1.8;color:#66745d!important}
.history-atlas-link{display:inline-block;margin-top:14px;font-size:12px;color:#355e44}
/* Transparent gaps between Atlas controls must not intercept map arrows. */
.atlas-page .atlas-control-stack,.atlas-page .atlas-control-content{pointer-events:none}.atlas-page #atlas-controls-toggle,.atlas-page .atlas-control-content>*{pointer-events:auto}
.history-route-branch{display:flex;align-items:flex-start;flex-direction:column;gap:8px;margin:14px 0;padding:12px;border:1px solid #d6dfcf;border-radius:8px;background:#f8faf3}.history-route-branch>small{font-size:10px;color:#758569}.history-route-branch>strong{font-size:11px;line-height:1.7;color:#5c7350}.history-route-branch>div{display:flex;flex-wrap:wrap;gap:6px}.history-selected-route{padding:12px;background:#f4f6ed;border-left:3px solid #a68147;font-size:12px!important;line-height:1.9}.history-route-background p{font-size:12px!important;line-height:1.9}
@media(min-width:1500px){.history-route-canvas{height:640px}}
@media(max-width:1050px){.history-section.history-with-map .history-layout{grid-template-columns:minmax(0,1fr)}.history-route-map{position:relative;top:auto}.history-route-canvas{height:470px}.history-with-map .history-event-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:599px){.history-route-canvas{height:420px}.history-map-tools{padding:12px}.history-map-tools strong{font-size:12px}.history-with-map .history-event-list strong{font-size:12px}.history-with-map .history-event-list small{font-size:10px}}
@media print{.history-route-map{position:static;break-inside:avoid}.history-route-canvas{height:400px}.history-map-tools label,.history-route-links button{display:none}}

.history-flow-badge{font-size:12px!important;font-weight:700;color:#9f583b!important}.history-flow-badge.is-resettlement{color:#287c78!important}.history-flow-label{display:block;font-size:10px;color:#926139;margin:4px 0}.history-event-list [data-history-event="samaria-resettlement"] .history-flow-label{color:#287c78}

.history-flow-controls{margin:0;padding:8px 12px;border:1px solid #d6dfd1;border-radius:9px;background:#fffffff5;color:#36533d;font-size:12px;line-height:1.6;min-width:0}.history-flow-controls legend{font-size:11px;font-weight:700;padding:0 5px}.history-flow-controls label{display:inline-flex;align-items:center;gap:5px;cursor:pointer}.history-flow-controls input{accent-color:var(--history-flow-color,#365d47)}.history-flow-controls i{width:22px;border-top:3px solid var(--history-flow-color);display:inline-block}.history-flow-options{display:flex;flex-wrap:wrap;gap:4px 18px;margin-top:6px}.history-flow-options[hidden]{display:none}.history-flow-options small{flex-basis:100%;font-size:10px;color:#62745a}.history-route-map [data-history-flow-panel]:not(:empty){padding:0 12px 10px}.history-route-map [data-history-flow-panel]:empty{display:none}.atlas-page #atlas-history-flows{pointer-events:auto}.atlas-page #atlas-history-flows[hidden]{display:none}
.history-comparison-note{flex-basis:100%;font-size:10px;color:#62745a}.history-comparison-note summary{cursor:pointer}.history-comparison-note p{margin:5px 0;font-size:10px!important;line-height:1.7}
.atlas-page[data-history-compare=true] .atlas-control-content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px}.atlas-page[data-history-compare=true] #atlas-history-flows{flex:0 0 100%}.atlas-page[data-history-compare=true] .atlas-control-content>details{flex:1;min-width:0}.atlas-page[data-history-compare=true] .atlas-control-content>details[open]{flex-basis:100%}.atlas-page[data-history-compare=true] .atlas-era-control:not([open])>summary small,.atlas-page[data-history-compare=true] #atlas-detail-resolution{display:none}
