/* A map canvas with temporary controls; intentionally loaded after the base styles. */
:root{--surface:#fff;--surface-ink:#283139;--surface-muted:#6d7b87;--surface-line:#e0e6ea;--surface-hover:#edf1f4;--surface-shadow:0 3px 18px #1e3b4a1c,0 1px 3px #263c4c0d;--surface-radius:15px}
:root[data-theme=dark]{--surface:#252a2e;--surface-ink:#edf1f4;--surface-muted:#a8b5be;--surface-line:#414b53;--surface-hover:#333e46;--surface-shadow:0 4px 22px #07101938,0 1px 3px #0003}
body{font-size:15px}#main{position:fixed!important;inset:0!important;height:100dvh!important;overflow:hidden}#main #map,#main #map-labels,.records-hidden #map,.records-hidden #map-labels{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
.atlas-bar{position:fixed;top:20px;left:24px;right:auto;bottom:auto;width:max-content;max-width:calc(100vw - 48px);height:56px;display:flex;align-items:center;gap:3px;padding:4px 7px 4px 20px;background:var(--surface);color:var(--surface-ink);border:1px solid #ffffffa6;border-radius:var(--surface-radius);box-shadow:var(--surface-shadow);backdrop-filter:blur(16px);z-index:40}
.atlas-actions{display:contents}
.atlas-brand{font-size:20px;line-height:1;font-weight:550;letter-spacing:-.7px;text-decoration:none;margin-right:13px;flex-shrink:0}.atlas-tool{height:42px;display:flex;align-items:center;justify-content:center;gap:8px;flex-direction:row;padding:0 12px;white-space:nowrap;color:var(--surface-ink);font-size:14px;line-height:1.2;font-weight:430;border-radius:10px;transition:background .15s,color .15s}.atlas-tool:hover,.atlas-tool[aria-expanded=true]{background:var(--surface-hover);color:var(--surface-ink);text-decoration:none}.atlas-tool svg{width:19px;height:19px;stroke-width:1.65;flex-shrink:0}.atlas-search{width:220px;justify-content:flex-start;color:var(--surface-muted);margin-right:3px;padding-left:8px}.atlas-search svg{width:18px;height:18px}.atlas-search>span{font-size:15px}.atlas-date{gap:8px;position:relative;margin:0 5px}.atlas-date:before,.atlas-date:after{content:'';position:absolute;top:9px;bottom:9px;width:1px;background:var(--surface-line)}.atlas-date:before{left:-5px}.atlas-date:after{right:-5px}.atlas-date>svg:first-child{width:17px;height:17px;color:var(--surface-muted)}.atlas-date>svg:last-child{width:12px;height:12px;color:var(--surface-muted)}#date-display{font-size:16px;font-variant-numeric:tabular-nums}#date-display small{font-size:11px;color:var(--surface-muted);margin-left:3px}#more-open>span{display:none}#more-open{width:39px;padding:0}#more-open svg{width:18px;height:18px}.atlas-popover{position:fixed;z-index:50;background:var(--surface);color:var(--surface-ink);border:1px solid #ffffffaa;border-radius:16px;box-shadow:0 6px 28px #20354326;backdrop-filter:blur(18px)}.atlas-more{padding:6px}.atlas-more .atlas-tool{width:100%;justify-content:flex-start;font-size:14px;padding:0 12px}.atlas-more .atlas-tool svg{color:var(--surface-muted)}.atlas-time{padding:16px 20px 20px;width:540px;max-width:calc(100vw - 28px)}.time-popover-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 13px}.time-popover-heading h2{font-size:17px;font-weight:550;letter-spacing:-.3px;margin:0}.time-popover-heading .icon-button{font-size:23px;color:var(--surface-muted);height:25px;width:25px}.atlas-time .timeline{position:relative;inset:auto;left:auto;right:auto;bottom:auto;height:auto;width:100%;padding:0;border:0;background:transparent;color:var(--surface-ink);border-radius:0;box-shadow:none}.atlas-time .timeline-controls{height:auto;min-height:39px;display:flex;align-items:center;flex-wrap:wrap;gap:9px}.atlas-time .play-button{height:34px;width:34px;background:var(--surface-ink);color:var(--surface);border-radius:9px;flex-shrink:0}.atlas-time .play-button:hover{opacity:.87}.atlas-time .play-button svg{width:14px;height:14px}.atlas-time .step-button{width:18px;height:34px;font-size:24px;color:var(--surface-muted)}.atlas-time #year-input{font-size:24px;font-weight:500;letter-spacing:-.5px;width:77px;color:var(--surface-ink);padding:4px 6px;border-radius:6px}.atlas-time #era-button{font-size:12px;color:var(--surface-muted);margin-right:7px}.atlas-time #date-label{display:none}.atlas-time #speed-dropdown{width:116px;margin:0 0 0 auto}.atlas-time #range-dropdown{width:136px}.atlas-time .timeline-spacer{display:none}.atlas-time .dropdown-trigger{font-size:12px;padding:5px 7px;height:32px;background:var(--surface-hover);border-radius:7px;color:var(--surface-ink);gap:8px}.atlas-time .small-control{height:27px;width:27px;display:grid;place-items:center;border-color:var(--surface-line);border-radius:6px;color:var(--surface-muted)}.atlas-time .scrubber{height:54px;margin:16px 0 0}.atlas-time #histogram{height:31px;bottom:18px;opacity:.75}.atlas-time #year-slider{height:22px;top:18px;cursor:pointer}.atlas-time #year-slider::-webkit-slider-thumb{width:9px;height:15px;margin-top:-6.5px;border:2px solid var(--surface);border-radius:4px;background:var(--surface-ink)}.atlas-time #year-slider::-webkit-slider-runnable-track{height:2px;background:#bdc8cf}.atlas-time #time-ticks{top:42px;height:18px}.atlas-time #time-ticks button{font-size:10px;color:var(--surface-muted)}
.panel,.feed-panel,.detail-panel,.layers-panel{background:var(--surface);color:var(--surface-ink);border:1px solid #ffffffa6;border-radius:var(--surface-radius);box-shadow:var(--surface-shadow)}.layers-panel{position:absolute;left:24px;top:92px!important;width:285px;max-height:calc(100dvh - 202px)!important;z-index:15;backdrop-filter:blur(14px)}.layers-panel .panel-heading,.feed-panel .panel-heading,.detail-panel .panel-heading{height:53px;min-height:53px;padding:14px 18px;background:var(--surface);border-color:var(--surface-line)}.panel-heading h2,.layers-panel .panel-heading h2,.feed-panel .panel-heading h2{font-size:17px;line-height:24px;letter-spacing:-.3px;font-weight:550}.panel-heading .icon-button{width:27px;height:27px;color:var(--surface-muted)}.layer-list{padding:8px 0}.layer-row,.layers-panel .layer-row{padding:9px 18px;min-height:40px;font-size:14px;color:var(--surface-ink)}.layer-row:hover{background:var(--surface-hover)}.switch{width:33px;height:20px}.switch-track:after{width:14px;height:14px;top:3px;left:3px}.switch input:checked+.switch-track:after{transform:translateX(13px)}.layers-panel .panel-section{padding:15px 18px;border-color:var(--surface-line)}.layers-panel .field-label{font-size:12px;color:var(--surface-muted);margin-bottom:10px}.layers-panel .dropdown-trigger{font-size:14px;height:37px;border:0;border-radius:8px;background:var(--surface-hover);padding:8px 10px}.layers-panel .data-note{font-size:12px!important;color:var(--surface-muted)!important}.layers-panel .text-button{font-size:13px}.dropdown-menu{font-size:14px;border-radius:11px;border:1px solid var(--surface-line);box-shadow:var(--surface-shadow);padding:5px;background:var(--surface);color:var(--surface-ink)}.dropdown-option{font-size:14px;min-height:38px;padding:9px 12px;border-radius:7px}.dropdown-option:hover,.dropdown-option[aria-selected=true]{background:var(--surface-hover)}
.feed-panel,.detail-panel{position:absolute;top:92px;right:24px;bottom:auto;left:auto;width:365px;height:calc(100dvh - 116px);max-height:calc(100dvh - 116px);max-width:calc(100vw - 32px);min-width:300px;min-height:260px;border:1px solid #ffffffaa;border-radius:15px;resize:both;z-index:12;overflow:hidden}.detail-panel{z-index:17;overflow:auto;height:fit-content;min-height:240px}.movable-panel .panel-heading{cursor:grab;user-select:none}.movable-panel.is-dragging{transition:none!important;box-shadow:0 10px 34px #20354330}.movable-panel.is-dragging .panel-heading{cursor:grabbing}.feed-filters{padding:10px 18px 6px;gap:15px}.feed-filters .dropdown-trigger{font-size:13px;height:32px;color:var(--surface-ink)}.viewport-filter{font-size:12px;padding:7px 18px 12px;color:var(--surface-muted)}.viewport-filter input{height:14px;width:14px}.feed-range{font-size:12px;line-height:1.5;padding:10px 18px;color:var(--surface-muted);border-color:var(--surface-line)}.feed-list{background:transparent}.record{display:block;padding:16px 18px;border-color:var(--surface-line);background:none;color:var(--surface-ink)}.record-meta{display:flex;justify-content:space-between;gap:14px;margin-bottom:7px}.record-meta time,.record-meta span{font-size:11px;color:var(--surface-muted);line-height:1.4;white-space:normal}.record h3{font-size:15px;line-height:1.45;font-weight:480;letter-spacing:-.12px;color:var(--surface-ink)}.record p{font-size:13px;line-height:1.65;color:var(--surface-muted);margin-top:8px}.record:hover,.record.selected{background:var(--surface-hover)}.feed-bottom{padding:13px 18px;font-size:11px;color:var(--surface-muted);border-color:var(--surface-line)}.feed-bottom .text-button{font-size:12px;color:var(--surface-ink)}.detail-body{padding:21px}.detail-body h2{font-size:23px;font-weight:550;line-height:1.25;letter-spacing:-.6px;margin:0 0 16px;color:var(--surface-ink)}.detail-body p{font-size:15px;line-height:1.7;color:var(--surface-ink);margin-bottom:14px}.detail-date{font-size:12px;color:var(--surface-muted);margin-bottom:13px}.detail-kind,.back-button{font-size:12px}.detail-body .record-field{font-size:13px;line-height:1.6;padding:10px 0}.source-links a{font-size:12px}.detail-related h3{font-size:15px}.battle-field h4{font-size:12px}.battle-field p{font-size:13px;line-height:1.7}.data-note{font-size:12px!important}.panel-reopen{display:none!important}
.world-stats.stats-unit{position:absolute!important;left:24px!important;right:auto!important;top:auto!important;bottom:26px!important;width:auto;min-width:220px;max-width:480px;padding:13px 17px;border-radius:14px;background:var(--surface);color:var(--surface-ink);border:1px solid #ffffffaa;box-shadow:var(--surface-shadow);z-index:8;display:flex;align-items:flex-start;gap:23px;flex-wrap:wrap}.stats-unit .stat-row{display:flex;flex-direction:column-reverse;align-items:flex-start;justify-content:flex-start;gap:5px;padding:0;min-width:0;font-size:12px;line-height:1.3;color:var(--surface-muted)}.stats-unit .stat-value{font-size:22px;font-weight:550;letter-spacing:-.65px;line-height:1.1;color:var(--surface-ink)}.stats-unit .stat-year{font-size:10px;letter-spacing:0;margin-left:5px;font-weight:400}.stats-unit .data-note{width:100%;margin:-8px 0 0!important;font-size:10px!important;color:var(--surface-muted)!important}.map-controls,.records-hidden .map-controls{position:absolute;left:auto;right:24px;bottom:26px;display:flex;flex-direction:row;align-items:center;gap:2px;padding:5px;background:var(--surface);border:1px solid #ffffffaa;border-radius:13px;box-shadow:var(--surface-shadow);z-index:9}.map-controls button{height:33px;width:33px;border:0;border-radius:8px}.map-controls button:hover{background:var(--surface-hover)}.map-controls button svg{width:16px;height:16px}.map-controls button:last-child{margin-left:3px}.map-credit,.records-hidden .map-credit{bottom:8px;left:26px;right:auto;font-size:9px;color:#607580;z-index:4}.map-status,.records-hidden .map-status{position:absolute;top:92px;left:50%;max-width:80%;border-radius:10px;border-color:#ffffffb8;font-size:13px;background:var(--surface);color:var(--surface-ink);box-shadow:var(--surface-shadow)}.map-tooltip{font-size:13px;line-height:1.5;border-radius:10px;padding:11px 14px;background:var(--surface);color:var(--surface-ink);border-color:var(--surface-line)}.journey-caption,.records-hidden .journey-caption{position:absolute;left:50%;bottom:28px;max-width:400px;font-size:13px;line-height:1.5;padding:12px 16px;z-index:10}.toast{bottom:28px;left:50%;font-size:14px;padding:13px 18px;border-radius:12px}.polity-label{font-size:13px}.polity-label.large{font-size:14px}.search-dialog{margin-top:96px;width:min(660px,calc(100vw - 32px));border-radius:17px}.search-input-row{padding:20px 23px}.search-input-row input{font-size:20px}.search-tabs{padding:0 23px;gap:27px}.search-tabs button{font-size:14px;padding:15px 0}.search-result{padding:17px 18px}.search-result strong{font-size:16px}.search-result small{font-size:12px}.search-status{font-size:11px}.sources-dialog{border-radius:17px}.sources-content{font-size:14px;line-height:1.7}.sources-content p{font-size:14px}.source-record strong{font-size:14px}.source-record small{font-size:12px}
@keyframes atlas-surface-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.atlas-popover:not([hidden]),.feed-panel:not([hidden]),.detail-panel:not([hidden]),.layers-panel:not([hidden]){animation:atlas-surface-in .18s cubic-bezier(.2,.7,.2,1)}:root[data-theme=dark] .atlas-bar,:root[data-theme=dark] .atlas-popover,:root[data-theme=dark] .panel,:root[data-theme=dark] .stats-unit,:root[data-theme=dark] .map-controls{border-color:#53616a6b}
@media(max-width:1150px){.atlas-bar{gap:1px;padding-left:17px}.atlas-search{width:185px}.atlas-tool{padding:0 10px;font-size:13px}.atlas-brand{margin-right:7px}.atlas-tool svg{width:18px;height:18px}#surprise-button{width:38px;padding:0}#surprise-button>span{display:none}.feed-panel,.detail-panel{width:345px}.stats-unit .stat-value{font-size:20px}}
@media(max-width:900px){.atlas-search{width:150px}.atlas-bar{left:18px;max-width:calc(100vw - 36px)}.atlas-tool{padding:0 9px;gap:6px}.atlas-brand{font-size:19px;margin-right:3px}.atlas-tool svg{width:17px;height:17px}#ask-open>span{display:none}#ask-open{width:36px;padding:0}.feed-panel,.detail-panel{right:18px;width:330px}.layers-panel{left:18px}.world-stats.stats-unit{left:18px!important}}
@media(min-width:701px) and (max-width:780px){#surprise-button{display:none}#explore-open>span{display:none}#explore-open{width:38px;padding:0;flex-shrink:0}.atlas-tool{flex-shrink:0}.atlas-search{width:145px}}
@media(max-width:700px){.atlas-bar{top:14px;left:14px;right:14px;bottom:auto;width:auto;max-width:none;height:100px;padding:0;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:48px 40px;column-gap:0;row-gap:12px;background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;pointer-events:none}.atlas-bar:before{content:'';position:absolute;left:0;right:0;top:0;height:48px;border:1px solid #ffffffc7;background:var(--surface);border-radius:14px;box-shadow:var(--surface-shadow);z-index:-1;backdrop-filter:blur(14px)}.atlas-brand{grid-column:1;grid-row:1;display:flex;align-items:center;padding-left:15px;font-size:18px;margin:0 9px 0 0;pointer-events:auto}.atlas-search{grid-column:2;grid-row:1;width:auto;min-width:0;height:42px;padding:0 3px;gap:7px;justify-content:flex-start;pointer-events:auto}.atlas-search>span{font-size:14px;overflow:hidden;text-overflow:ellipsis}.atlas-search svg{width:16px;height:16px}.atlas-date{grid-column:3;grid-row:1;margin:0 7px 0 0;height:37px;gap:4px;padding:0 8px;pointer-events:auto}.atlas-date:before,.atlas-date:after{display:none}.atlas-date>svg{display:none!important}#date-display{font-size:15px;white-space:nowrap}#date-display small{font-size:10px;margin-left:1px}#layers-button,#records-button,#explore-open,#surprise-button,#ask-open,#more-open{position:static;flex:0 0 auto;height:39px;background:var(--surface);border:1px solid #ffffffb3;box-shadow:var(--surface-shadow);border-radius:11px;pointer-events:auto;gap:7px;padding:0 11px;width:auto;font-size:12px}.atlas-actions{display:flex;grid-column:1 / -1;grid-row:2;align-items:center;gap:8px;min-width:0;pointer-events:none}#surprise-button{display:none}#ask-open{margin-left:auto;width:39px;padding:0}#more-open{width:39px;padding:0}#layers-button svg,#records-button svg,#explore-open svg,#ask-open svg{width:16px;height:16px}#explore-open{width:40px;padding:0}#explore-open>span{display:none}#ask-open>span{display:none}.atlas-popover{max-width:calc(100vw - 28px)}.atlas-more{left:auto!important;right:14px!important;width:230px!important;top:121px!important;padding:6px}.atlas-time{left:14px!important;right:14px!important;top:122px!important;width:auto!important;padding:17px 18px 20px}.time-popover-heading{margin-bottom:12px}.time-popover-heading h2{font-size:16px}.atlas-time .timeline-controls{gap:7px;min-height:34px}.atlas-time #year-input{width:68px;font-size:23px}.atlas-time #era-button{font-size:11px;margin-right:0}.atlas-time #speed-dropdown{width:105px;margin-left:auto}.atlas-time #range-dropdown{width:132px;margin-top:4px}.atlas-time .small-control{display:grid;margin-top:4px}.atlas-time .timeline .dropdown-trigger{font-size:12px;padding:5px 7px;gap:7px}.atlas-time .timeline-spacer{display:block;flex:1}.atlas-time .scrubber{margin-top:16px;height:52px}.atlas-time #time-ticks button{font-size:10px}.layers-panel{left:14px;right:14px;top:124px!important;bottom:auto;width:auto;max-height:calc(100dvh - 222px)!important;border-radius:16px}.layers-panel .panel-heading{height:50px;min-height:50px;padding:12px 18px}.layers-panel .layer-row{min-height:42px;padding:10px 18px;font-size:14px}.layers-panel .panel-section{padding:15px 18px}.feed-panel,.detail-panel{position:absolute!important;left:14px!important;right:14px!important;top:auto!important;bottom:98px!important;width:auto!important;height:44dvh;max-height:calc(100dvh - 234px);min-width:0;min-height:215px;resize:none;border-radius:17px}.detail-panel{height:auto;max-height:55dvh;min-height:0;overflow:auto}.feed-panel .panel-heading,.detail-panel .panel-heading{height:49px;min-height:49px;padding:12px 18px}.feed-panel .panel-heading h2{font-size:16px}.feed-filters{padding:8px 18px 5px;gap:15px}.feed-filters .dropdown-trigger{font-size:12px;height:29px}.viewport-filter{position:static;padding:5px 18px 10px;font-size:12px}.feed-range{display:block;font-size:11px;padding:8px 18px}.record{padding:13px 18px}.record h3{font-size:15px;line-height:1.45}.record-meta time,.record-meta span{font-size:11px}.record p{font-size:13px}.feed-bottom{padding:10px 18px}.feed-bottom .text-button{font-size:12px}.detail-body{padding:18px 20px 21px}.detail-body h2{font-size:22px;line-height:1.3}.detail-body p{font-size:14px;line-height:1.7}.detail-body .record-field{font-size:12px}.source-links a{font-size:12px}.detail-kind,.back-button{font-size:12px}.detail-date{font-size:12px}.world-stats.stats-unit{left:14px!important;top:auto!important;bottom:20px!important;width:auto;max-width:calc(100vw - 145px);min-width:0;padding:12px 14px;gap:16px;flex-wrap:nowrap;z-index:8}.stats-unit .stat-row{min-width:0;flex:none;gap:4px;font-size:10px;max-width:100px}.stats-unit .stat-value{font-size:18px;letter-spacing:-.4px}.stats-unit .stat-year{font-size:9px}.stats-unit .data-note{display:none}.map-controls,.records-hidden .map-controls{right:14px;left:auto;bottom:20px;padding:4px;gap:0;border-radius:12px}.map-controls button{height:29px;width:29px}.map-controls button svg{width:14px;height:14px}.map-credit,.records-hidden .map-credit{left:16px;right:auto;bottom:5px;font-size:8px}.map-status,.records-hidden .map-status{top:125px;font-size:12px}.journey-caption,.records-hidden .journey-caption{bottom:100px;left:50%;max-width:calc(100vw - 28px);font-size:12px;padding:10px 13px}.polity-label{font-size:12px}.polity-label.large{font-size:13px}.search-dialog{margin-top:14px;max-height:calc(100dvh - 28px);width:calc(100vw - 28px)}.search-input-row{padding:18px}.search-input-row input{font-size:18px}.search-tabs{padding:0 18px;gap:23px;overflow:auto}.search-tabs button{font-size:13px;white-space:nowrap}.search-results{max-height:65dvh}.search-result strong{font-size:15px}.search-result small{font-size:12px}.search-status{font-size:11px}.toast{bottom:100px;max-width:calc(100vw - 28px);font-size:13px;left:50%}.atlas-brand:focus-visible,.atlas-tool:focus-visible{outline:2px solid var(--surface-ink);outline-offset:-3px}}
@media(max-width:370px){.atlas-search>span{font-size:13px}.atlas-search svg{display:none}.atlas-tool{gap:5px!important}#layers-button,#records-button{padding:0 9px;font-size:11px}.world-stats.stats-unit{gap:12px;padding:12px}.stats-unit .stat-row{font-size:9px}.stats-unit .stat-value{font-size:17px}}
@media(prefers-reduced-motion:reduce){.atlas-popover,.atlas-tool,.movable-panel,.panel{animation:none!important;transition:none!important}}

@media(max-width:700px){.world-stats.stats-unit{flex-wrap:wrap;column-gap:15px;row-gap:12px;cursor:pointer}.stats-unit .stat-row:nth-of-type(n+3){display:none}.feed-panel,.detail-panel{bottom:var(--stats-clearance,98px)!important;max-height:calc(100dvh - 146px - var(--stats-clearance,98px))!important}.feed-panel{height:56dvh!important}.detail-panel{height:auto!important}.layers-panel{max-height:calc(100dvh - 140px - var(--stats-clearance,98px))!important}.stats-unit[data-more=true]:after{content:'+';position:absolute;right:6px;top:4px;font-size:11px;color:var(--surface-muted)}.world-stats.stats-unit:focus-visible{outline:2px solid #8ba9bd;outline-offset:3px}}

@media(min-width:701px){.layers-panel{max-height:calc(100dvh - 92px - var(--stats-clearance,112px))!important}}

.panel,.atlas-popover{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

@media(max-width:350px){#layers-button>span,#records-button>span{display:none}#layers-button,#records-button{width:40px;padding:0}}
