/* Border exploration: source outlines and dated historical evidence. */
.border-map-back,.border-breadcrumb{min-height:44px;text-align:left;color:var(--gold);font:14px/1.4 system-ui;padding:8px 0}.border-breadcrumb{margin-bottom:6px}.border-status{margin:24px 0;padding:17px;background:#152c30;border:1px solid #49625b;border-radius:12px}.border-status h3{font:400 22px/1.35 Georgia,serif;margin:0 0 8px}.border-status-note{font-size:12px;line-height:1.6;color:#b8c9c6}.border-status dl{margin:18px 0 0}.border-status dl>div+div{margin-top:18px}.border-status dt{font-size:12px;color:var(--gold);font-weight:600;margin-bottom:6px}.border-status dd{font-size:14px;line-height:1.7;color:#d1ddda;margin:0}.border-topics{display:flex;flex-wrap:wrap;gap:7px}.border-topics span{padding:6px 9px;background:#1c333a;border-radius:6px;color:#d2d8c8;font-size:11px}.border-comparison-evidence{font-size:13px;line-height:1.65;color:#c1cfd3;margin:10px 0 22px}.border-comparison-evidence summary,.border-source-details>summary{min-height:44px;box-sizing:border-box;padding:12px 0;color:var(--gold);cursor:pointer}.border-comparison-evidence ul{padding-left:20px}.border-comparison-evidence li+li{margin-top:10px}.border-compare,.border-event-record{box-sizing:border-box;min-height:44px;width:100%;padding:12px;text-align:center}.border-event-record{border:1px solid #50665f;border-radius:8px;color:var(--gold);font-size:14px;margin-bottom:22px}.border-scroll{overflow-wrap:anywhere}.border-scroll h2:focus{outline:none}.border-source-details{margin:20px 0}.map-event-return small{display:block;color:#bfcdce;font:11px/1.4 system-ui;margin-top:3px}.border-map-back:focus-visible,.border-breadcrumb:focus-visible,.border-event-record:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
@media(max-width:700px),(max-height:500px){
 body.reading-border{overflow:hidden}body.reading-border .timeline{visibility:hidden}body.reading-border.fullscreen-map #workspace{z-index:70}
 body.reading-border #exploration-panel{position:fixed!important;inset:0!important;width:100%!important;height:100vh!important;height:100dvh!important;max-height:none!important;min-height:0!important;box-sizing:border-box;padding:env(safe-area-inset-top,0px) max(18px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(18px,env(safe-area-inset-left,0px))!important;border:0!important;border-radius:0!important;z-index:70;display:flex;background:#101b27}
 body.reading-border .exploration-heading{flex-shrink:0;min-height:56px;margin:0;border-bottom:1px solid #354951}
 body.reading-border .exploration-scroll{overflow:auto;min-height:0;padding-top:12px;overscroll-behavior:contain;scroll-padding-top:16px}
 body.reading-border .exploration-bottom{padding:12px 0;flex-shrink:0;border-top:1px solid #354951}
 body.reading-border .exploration-heading>button:last-child{min-width:44px;min-height:44px}body.reading-border .exploration-bottom button{min-height:44px}body.reading-border .border-scroll h2{font:400 28px/1.2 Georgia,serif}body.reading-border .border-scroll input,body.reading-border .border-scroll select{font-size:16px;min-height:44px}
 body.reading-border .border-body,body.reading-border .border-status dd{font-size:16px;line-height:1.7}
 body.reading-border .border-story{min-height:60px}body.reading-border .border-filter-row{grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr)}
}

.investigating-borders .map-top{top:68px}.investigating-borders .large-year{font-size:29px}.investigating-borders .globe-note{font-size:11px}.border-scroll{padding-top:3px}.border-intro{font-size:14px;line-height:1.65;color:#b9cddd;margin:0 0 20px}.border-entity-label{display:block;font-size:12px;color:#b9cad9;margin-bottom:9px}#border-entity-choice,.border-filter-row select{width:100%;background:#112130;border:1px solid #3f566a;border-radius:6px;color:#d1dce5;font:13px 'DM Sans',system-ui,sans-serif;padding:10px;min-width:0}#border-entity-choice{font-size:14px;margin-bottom:18px}.border-coverage{padding:11px;border:1px solid #3b5266;background:#1b2c3c;border-radius:7px;margin-bottom:12px}.border-coverage strong{font-size:14px;font-weight:500;line-height:1.5;color:#e0c99d}.border-coverage p{font-size:13px;line-height:1.65;color:#b4c6d5;margin:9px 0 0}.border-filter-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0 13px}.border-scroll .search-box{margin:0 0 18px}.border-results-heading{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#a8bdcf;margin:0 0 10px}.border-story{display:flex;width:100%;text-align:left;gap:12px;padding:16px 0;border-top:1px solid #354c61}.border-story-symbol{display:flex;align-items:center;justify-content:center;flex:0 0 31px;height:31px;border:1px solid var(--story-color);color:var(--story-color);border-radius:50%;font-size:19px}.border-story>span:last-child{display:flex;flex-direction:column;gap:7px}.border-story strong{font-size:15px;line-height:1.45;font-weight:500;color:#e1e6ea}.border-story small{font-size:11px;line-height:1.4;color:#aebfcf}.border-story:hover strong{color:#e8c58c}.border-empty{border:1px dashed #4d6478;border-radius:8px;padding:18px 15px;margin:12px 0 20px}.border-empty strong{font-size:15px;line-height:1.5;font-weight:500}.border-empty p{font-size:13px;line-height:1.75;color:#aec3d3;margin:10px 0}.border-empty button{font-size:12px;margin-top:5px}.outline-record{background:#152839;border:1px solid #405c72;border-top:2px solid #ccb17c;border-radius:6px;padding:16px;margin-bottom:22px}.outline-heading{display:flex;justify-content:space-between;align-items:start;gap:8px}.outline-heading .eyebrow{font-size:10px;letter-spacing:1px;line-height:1.6}.outline-heading button{font-size:20px;line-height:1;color:#a8c0d3}.outline-record h3{font:500 20px/1.35 Manrope,system-ui,sans-serif;margin:12px 0}.outline-record>p{font-size:14px;line-height:1.7;color:#becfdc}.outline-record strong{font-weight:500;color:#e9d7b4}.record-metadata,.outline-neighbors{font-size:12px!important;color:#99b4c9!important;line-height:1.7}.record-navigation{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:16px 0}.record-navigation button{font-size:12px;border:1px solid #52697c;border-radius:5px;padding:8px 7px;color:#dcc79d}.record-navigation>span{font-size:10px;text-align:center;line-height:1.4;color:#a1b8ca}.outline-intervals{font-size:12px;color:#bbccda;padding:11px 0;border-block:1px solid #3b5369}.outline-intervals summary{cursor:pointer}.outline-intervals>div{max-height:190px;overflow:auto;display:flex;flex-direction:column;gap:2px;margin-top:10px}.outline-intervals button{padding:8px;font-size:12px;color:#a9c1d4;text-align:left;border-radius:4px}.outline-intervals button[aria-current]{background:#384239;color:#ead5ac}.outline-record .evidence-label{font-size:12px;line-height:1.75;color:#acbfcd}.outline-links{display:flex;gap:18px;margin-top:12px}.outline-links a{font-size:12px;color:#ddc697;text-decoration:none}.outline-links a:hover{text-decoration:underline}.border-story-date{display:flex;flex-direction:column;gap:10px;margin:12px 0 16px;color:var(--story-color)}.border-story-date>span{font-size:12px;letter-spacing:.5px}.border-story-date strong{font-size:17px;font-weight:500}.border-effect{border-left:2px solid #d8b97f;padding:2px 0 2px 14px;font-size:15px;line-height:1.6;color:#e0d2b8;margin:18px 0 23px}.border-body{font-size:15px;line-height:1.85;color:#c5d4df;margin:0 0 24px}.border-evidence{padding:16px;background:#1a2d3b;border:1px solid #436077;border-radius:8px;margin:20px 0}.border-evidence .eyebrow{font-size:10px;letter-spacing:1.3px}.border-evidence p{font-size:13px;line-height:1.8;color:#b7ccda;margin:11px 0 0}.border-related{padding:6px 0 15px}.border-related .eyebrow{font-size:10px;letter-spacing:1px;display:block;margin-bottom:12px}.border-related button{display:block;font-size:13px;text-align:left;color:#cddbe5;border:1px solid #3f586f;padding:10px 12px;border-radius:6px;margin:8px 0;width:100%}.border-sources-title{font-size:17px;font-weight:500;margin:18px 0 13px}.context-source{display:block;text-decoration:none;padding:13px 0;border-top:1px solid #354c61;font-size:14px;line-height:1.55;color:#cfdae4}.context-source>span{display:block;color:#d4bc89;font-size:10px;text-transform:uppercase;letter-spacing:1px;margin-bottom:5px}.context-source:hover{color:#f1d29c}.border-source-note{font-size:11px;line-height:1.75;color:#93abbf;margin:20px 0}.border-detail-button{color:#c9dbe9;border-color:#58738a}.investigating-borders .exploration-bottom>.primary-button{font-size:12px;margin:0 0 7px}.presenting.investigating-borders .exploration-heading{display:flex}.presenting.investigating-borders .border-body{font-size:16px}.presenting .border-effect{font-size:16px}

@media(max-width:700px){.investigating-borders .globe-note{display:none}.investigating-borders .map-controls{bottom:95px}.investigating-borders .map-top{top:68px}.border-scroll .border-intro,.border-coverage p,.border-empty p{font-size:14px}.border-body{font-size:16px}.border-story strong{font-size:16px}.border-story small{font-size:12px}.border-evidence p{font-size:14px}}

.investigating-borders.has-event-return .map-dock{bottom:114px}
@media(max-width:360px){body.reading-border .border-filter-row{grid-template-columns:1fr}}

/* Dated detail stays on the map; evidence expands inside the existing reader. */
.boundary-summary{padding:16px;margin:18px 0;border:1px solid #bdaf795e;border-radius:14px;background:#172d35;color:#e7e6d8}
.boundary-summary h3{font:600 23px Georgia,serif;margin:9px 0}.boundary-summary p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.boundary-summary .boundary-reference{color:#e7ce97;font-size:12px}
.boundary-summary button{width:100%;min-height:48px;margin:4px 0;white-space:normal}.boundary-summary details{border-top:1px solid #ffffff20;padding-top:4px}.boundary-summary summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px}.boundary-summary details>a{display:block;min-height:40px;padding:9px 0;color:#e8cf98;font-size:12px}.boundary-summary a{color:#d5dca9}.boundary-summary .phase-citations{display:flex;flex-wrap:wrap}
#browse-boundary-details{min-height:44px;width:100%;margin-top:10px;border:1px solid #e3c48c55;background:#213d44;color:#f0d7a6;border-radius:8px}
#boundary-map-key{position:absolute;z-index:8;top:16px;left:18px;max-width:min(340px,calc(100% - 100px));padding:10px 13px;border:1px solid #d4c29466;border-radius:12px;background:#102632ed;box-shadow:0 6px 22px #0003;color:#f2e4c9;pointer-events:auto}
#boundary-map-key button{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-height:44px;width:100%;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer}#boundary-map-key strong{font:600 18px Georgia,serif}#boundary-map-key span{font:11px system-ui;color:#d5c8a8}#boundary-map-key small{font:10px/1.7 system-ui;display:block;margin-top:4px;color:#bacfcf}#boundary-map-key a{color:inherit;text-underline-offset:2px}
body.has-boundary-overlay .era-card,body.has-boundary-overlay #close-view-note,body.has-boundary-overlay .map-legend,body.has-boundary-overlay #naming-status{display:none}
body.has-boundary-overlay #map-event-return{bottom:32px}
@media(max-width:700px){#boundary-map-key{top:72px;left:12px;padding:8px 10px;max-width:calc(100% - 84px)}#boundary-map-key strong{font-size:17px}#boundary-map-key span{font-size:10px}#boundary-map-key small{font-size:9px}body.has-boundary-overlay #map-event-return{bottom:31px}body.has-boundary-overlay .map-dock{bottom:125px}}
body.has-boundary-overlay .map-top{top:16px}body.has-boundary-overlay .legend{display:none}body.has-boundary-overlay .map-scale{left:18px;right:auto;bottom:133px}body.has-boundary-overlay #zoom-level{font-size:10px;letter-spacing:-.3px}
@media(min-width:701px){body.has-boundary-overlay .map-scale{bottom:32px;left:auto;right:82px}}

body.has-boundary-overlay #map-dock{display:none}

/* Keep the map, year controls and reading return reachable on a sideways phone. */
@media(max-height:500px) and (min-width:701px){
 .topbar{height:52px;padding:0 16px;gap:12px}.brand strong{font-size:15px;letter-spacing:2px}.brand-icon{font-size:25px}
 body:not(.fullscreen-map):not(.presenting) #workspace{height:calc(100vh - 158px);height:calc(100dvh - 158px);min-height:0}
 body:not(.fullscreen-map):not(.presenting) .timeline{height:106px;padding:5px 18px 0;box-sizing:border-box}
 .timeline .time-heading,.timeline .time-helper,.timeline-ticks,.era-jumps{display:none}
 .timeline-top{min-height:40px}.timeline-track{margin-top:5px}.event-timeline{margin-top:4px;height:22px}
 .year-form input,.year-form select,.year-form button,.play-controls>button,.play-controls select{min-height:36px}
 #boundary-map-key{top:8px;left:12px;max-width:300px;padding:7px 10px}
 #boundary-map-key strong{font-size:16px}#boundary-map-key small{display:none}
 body.has-boundary-overlay .map-top{top:8px;right:12px}
 body.has-boundary-overlay #map-event-return{left:12px;bottom:26px;min-height:44px;width:min(300px,38%);padding:6px 10px}
 body.has-boundary-overlay #map-event-return strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.has-boundary-overlay #map-event-return small{display:none}
 body.has-boundary-overlay .map-controls{display:flex;flex-direction:row;bottom:26px;right:12px}
 body.has-boundary-overlay .map-controls button{width:44px;height:44px;border-radius:0}
 body.has-boundary-overlay .map-scale{bottom:78px;right:12px;left:auto}
 body.reading-border .exploration-heading{min-height:44px}body.reading-border .exploration-bottom{padding:4px 0}
}
.boundary-summary h3:focus{outline:none}

#boundary-map-attribution{position:absolute;bottom:0;left:0;right:0;z-index:8;box-sizing:border-box;min-height:22px;padding:3px 8px;background:#0c1a25f5;color:#d5e0dc;font:10px/16px system-ui;white-space:nowrap;overflow-x:auto;scrollbar-width:thin}#boundary-map-attribution a{color:inherit;text-underline-offset:2px}

/* v44: one outline card opens the evidence; avoid a second card covering the map. */
body.has-boundary-overlay #map-event-return{display:none}
@media(max-width:700px){body.has-boundary-overlay .map-scale{bottom:32px}}
