@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fira+Code:wght@400&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{--line:#d7e1e3;--accent:#163d48;--ink:#18343d;--sans:'DM Sans',sans-serif;font-family:'DM Sans',sans-serif;color:#18343d;background:#f3f6f6;font-synthesis:none;font-size:14px}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit}button{cursor:pointer;color:inherit;background:transparent;border:1px solid #d2dfe1;border-radius:6px;padding:9px 13px}button:hover{background:#e6eef0}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #087f97;outline-offset:3px}header{height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;background:#fff;border-bottom:1px solid #d7e1e3}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#15333c;font-family:'Space Grotesk',sans-serif;font-weight:700;letter-spacing:1px;font-size:19px}.brand small{font:500 11px 'DM Sans',sans-serif;letter-spacing:1.8px;border-left:1px solid #c6d5d8;margin-left:8px;padding-left:20px}.mark{font-size:38px;line-height:1;color:#087e91}.header-actions{display:flex;gap:12px}.header-actions button:first-child{border:0}.accent{background:#163d48;color:#fff;border-color:#163d48}.accent:hover{background:#235261}main{display:grid;grid-template-columns:330px 1fr;height:calc(100dvh - 78px);min-height:560px}aside{background:#fff;border-right:1px solid #d7e1e3;padding:28px 24px;overflow-y:auto}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.7px;color:#6e858d}h1{font-family:'Space Grotesk',sans-serif;font-size:30px;letter-spacing:-1.2px;line-height:1.14;font-weight:500;margin:14px 0 23px}.methods{display:flex;flex-direction:column;gap:7px}.method{display:flex;align-items:center;gap:12px;text-align:left;padding:13px 11px;border:1px solid #dbe5e6;border-radius:7px}.method.active{background:#e8f4f5;border-color:#23849a;box-shadow:inset 3px 0 #23849a}.number{font:12px 'Space Grotesk';color:#759097}.method b{display:block;font-size:13px;font-weight:600}.method small{display:block;font-size:11px;color:#71868c;margin-top:4px}.method-icon{margin-left:auto;font-size:23px;color:#4d7f8d}.note{color:#70858c;font-size:12px;line-height:1.6}.section-head{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e1e9eb;padding-top:22px;margin-top:24px;margin-bottom:20px}.section-head button{border:0;font-size:12px;padding:0;color:#14788c}.range{display:block;margin-bottom:18px}.range-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin-bottom:9px}.range output{font-family:'Space Grotesk';font-size:12px;background:#f0f5f6;padding:3px 6px;border-radius:3px;color:#367080}input[type=range]{width:100%;accent-color:#287f92;height:4px;cursor:pointer}.select-label{display:block;font-size:13px;margin:16px 0}select{display:block;width:100%;padding:9px 8px;background:#f8fafb;border:1px solid #d7e2e5;border-radius:5px;color:#234852;margin-top:8px}.check{display:flex;align-items:center;gap:8px;font-size:13px;margin:14px 0}input[type=checkbox]{accent-color:#267e91;width:15px;height:15px}details{margin-top:22px;border-top:1px solid #e1e9eb;padding-top:20px}summary{cursor:pointer;font-weight:600;font-size:14px}.source{border-top:1px solid #e0e8ea;margin-top:25px;padding-top:20px;display:grid;gap:5px}.source span{font-size:10px;color:#728c93;letter-spacing:1.3px}.source b{font-size:12px;font-weight:500}.source small{font-size:11px;color:#8a9ca1}.workspace{position:relative;overflow:hidden;background:#e9f0f2;background-image:radial-gradient(#b3c8ce80 .7px,transparent .7px);background-size:20px 20px}.canvas-top{position:absolute;top:30px;left:30px;right:30px;display:flex;align-items:center;justify-content:space-between;z-index:2;pointer-events:none}h2{font-family:'Space Grotesk';font-weight:500;font-size:22px;letter-spacing:-.6px;margin:8px 0}.badge{font-size:11px;letter-spacing:.4px;background:#f7fafacc;border:1px solid #cbdce1;border-radius:30px;padding:8px 12px;color:#5b7a84}#stage{position:absolute;inset:0}canvas{position:absolute;inset:0;width:100%;height:100%}#map{touch-action:none;cursor:grab}#map:active{cursor:grabbing}#overlay{pointer-events:none}.view-tools{position:absolute;bottom:65px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:4px;padding:6px;background:#fff;box-shadow:0 4px 24px #23434c13;border:1px solid #cfdee3;border-radius:9px;white-space:nowrap}.view-tools button{border:0;padding:9px 12px}.segmented{display:flex;border-right:1px solid #dbe5e7;padding-right:6px;margin-right:4px}.segmented .selected{background:#e7f1f3;color:#156d80}.view-tools span{font:12px 'Space Grotesk';min-width:40px;text-align:center}.canvas-bottom{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;gap:15px;background:#f5f9fa;border-top:1px solid #d6e2e6;padding:14px 24px;font-size:11px;color:#6c858e}#status{color:#337687}dialog{max-width:720px;width:calc(100% - 30px);max-height:85dvh;border:1px solid #cddde2;border-radius:12px;padding:40px;color:#27444e;box-shadow:0 20px 100px #001a3250}dialog::backdrop{background:#0b27365c;backdrop-filter:blur(4px)}dialog p,dialog li{font-size:15px;line-height:1.7}dialog li{margin-bottom:14px}dialog a{color:#08788e}dialog h2{font-size:30px}dialog h3{margin-top:28px;font-size:16px}#close-dialog{float:right;border:0;font-size:24px}#error{position:absolute;top:40%;left:15%;right:15%;padding:25px;background:#fff0ed;border:1px solid #b44630;border-radius:8px;z-index:5}@media(min-width:1500px){main{grid-template-columns:355px 1fr}aside{padding:32px}}@media(max-width:850px){header{padding:0 16px;height:65px}.brand small{display:none}main{grid-template-columns:270px 1fr;height:calc(100dvh - 65px)}aside{padding:23px 16px}.canvas-top{left:20px;top:24px}.badge{display:none}.canvas-bottom span:last-child{display:none}.view-tools{gap:0}.view-tools button{padding:9px}.segmented{display:none}}@media(max-width:600px){header .header-actions button:first-child{font-size:0}header .header-actions button:first-child:after{content:'Notes';font-size:12px}.brand{font-size:16px}main{display:flex;flex-direction:column-reverse;height:auto;min-height:0}.workspace{height:65dvh;min-height:400px}aside{overflow:visible;border-right:0;padding:25px}h1 br{display:none}h1{font-size:27px}.methods{display:grid;grid-template-columns:1fr 1fr}.method{gap:8px}.method-icon{display:none}.method b{font-size:12px}.method small{font-size:10px}.canvas-top h2{font-size:18px}.canvas-top .eyebrow{font-size:10px}.view-tools{bottom:55px}.canvas-bottom{padding:12px 18px}.source{margin-bottom:15px}}
.method b,.range-head,.select-label,.check{font-size:14px}.method small{font-size:12px}.eyebrow,.brand small{font-size:12px}.source span,.source small,.source b,.canvas-bottom,.badge{font-size:12px}
.optimizer{padding:14px;background:#f1f7f8;border:1px solid #d4e4e8;border-radius:7px;margin:20px 0}.optimizer>.accent{width:100%;font-size:14px}.optimizer .select-label{font-size:12px;margin:12px 0}.search-actions button{font-size:12px;padding:6px 8px}.optimizer p:empty{display:none}button:disabled,select:disabled,input:disabled{opacity:.5;cursor:default}#land-score{color:#235c6b;font-weight:600}#search-result{color:#346779}
/* Keep conditional controls hidden even when their layout class sets display. */
[hidden]{display:none!important}
.area-ramp,.angle-ramp{height:10px;border-radius:3px;margin:12px 0 5px}.area-ramp{background:linear-gradient(90deg,#1a66e8,#f5f7f7,#ff9114)}.angle-ramp{background:linear-gradient(90deg,#f5f7f7,#b01fc9)}.ramp-labels{display:flex;justify-content:space-between;font-size:12px}
.map-source-controls{border-top:1px solid #dbe5e7;padding-top:8px;margin-top:20px}.hex-legend{display:grid;gap:8px;margin:12px 0 18px}.hex-legend-item{display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.3}.hex-swatch{display:block;flex:0 0 34px;height:30px;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}.legend-heading{font-size:12px;letter-spacing:1.5px;color:#657e88;margin:20px 0 6px}#missing-legend{border-top:1px solid #dbe5e7;padding-top:12px}#map-loading:empty{display:none}


#floating-legend{position:absolute;right:24px;top:105px;z-index:4;pointer-events:none;max-width:calc(100% - 32px)}.floating-legend-clusters{display:flex;align-items:flex-start;gap:14px;padding:12px;border:1px solid #ffffffa0;background:#f8fcfbd9;backdrop-filter:blur(12px);border-radius:12px;box-shadow:0 4px 20px #173d4815}.floating-legend-clusters>div{text-align:center;min-width:0}.floating-legend-clusters span{display:block;margin-left:82px;color:#173d48;font:24px Baskerville,"Baskerville Old Face",Georgia,serif}.lifezone-axis-label{fill:#173d48;font:italic 14px Baskerville,"Baskerville Old Face",Georgia,serif}.floating-legend-clusters svg{display:block;max-width:100%;height:auto;overflow:visible}.floating-legend-clusters polygon{pointer-events:auto;cursor:help;stroke:#ffffffa0;stroke-width:1;transition:filter .1s}.floating-legend-clusters polygon:hover,.floating-legend-clusters polygon:focus{filter:brightness(1.15);stroke:#173d48;stroke-width:2;outline:none}#floating-legend-tip{position:absolute;right:0;top:calc(100% + 6px);padding:7px 11px;background:#173d48;color:#fff;font-size:12px;border-radius:6px;white-space:nowrap;max-width:280px}@media(max-width:850px){#floating-legend{right:12px;top:90px;max-width:420px}.floating-legend-clusters{gap:6px;padding:8px}}


.relief-panel{background:linear-gradient(145deg,#f8f5ef,#f0f4f3);border:1px solid #d8ded8;border-radius:9px;padding:17px 15px;margin:22px -4px}.relief-panel>summary{font-family:'Space Grotesk',sans-serif;font-size:15px}.relief-tag{float:right;font:10px 'DM Sans',sans-serif;letter-spacing:1px;border:1px solid #bdcfc9;border-radius:4px;padding:2px 5px;color:#52766a}.relief-switch{font-weight:600;margin:17px 0 8px}.relief-looks{display:flex;gap:5px;margin:15px 0}.relief-looks button{flex:1;padding:7px 3px;background:#ffffff90;font-size:11px;border-color:#ced8d2}.relief-looks button:hover{background:#e0eae1;border-color:#7ca18a}.relief-panel .range output{background:#fff9;color:#567568}.relief-panel input[type=range],.relief-panel input[type=checkbox]{accent-color:#648c75}.relief-fine{margin-top:8px;padding-top:14px;border-color:#d7e0d8}.relief-fine summary{font-size:12px;color:#537066}.relief-panel .note{font-size:11px;line-height:1.5;color:#738075}#relief-status:empty{display:none}#relief-source-note{border-left:2px solid #b3a184;padding-left:9px;margin-top:17px}.relief-panel .select-label{font-size:12px}.relief-panel .select-label select{background:#ffffffa8}.relief-panel .range-head{font-size:12px}#relief-main-controls{margin-top:22px}
.ecology-range{margin:16px 0 20px}.ecology-range .range-head{margin-bottom:7px}.ecology-range .range-scale{display:flex;justify-content:space-between;color:#71868c;font:11px 'Space Grotesk',sans-serif;margin-top:4px;padding:0 2px}.ecology-range input[type=range]{accent-color:#568d7f}
.export-resolution{display:flex;align-items:center;gap:6px;color:#647c83;font-size:11px;white-space:nowrap}.export-resolution select{width:auto;min-width:145px;margin:0;padding:8px 25px 8px 8px;background:#f8fafb}
@media(max-width:850px){.export-resolution span{display:none}.export-resolution select{min-width:74px;padding-right:18px}}
.rivers-panel{background:linear-gradient(145deg,#f3faf9,#eef5f5);border:1px solid #d3e1df;border-radius:9px;padding:17px 15px;margin:22px -4px}.rivers-panel>summary{font-family:'Space Grotesk',sans-serif;font-size:15px}.rivers-panel .range{margin-bottom:18px}.rivers-panel .range output{background:#fff;color:#4a777a}
.map-source-panel .map-source-controls{border-top:0;margin-top:0;padding-top:8px}
.welcome-copy{font-size:13px;line-height:1.65;color:#587179;margin:0 0 22px}.preset-heading{font-size:11px;font-weight:700;letter-spacing:1.6px;color:#6e858d;margin:18px 0 9px}.layout-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 20px}.layout-preset-card,.style-preset-card{display:flex;flex-direction:column;align-items:stretch;gap:7px;text-align:left;padding:8px;background:#fff;border:1px solid #dbe5e6;border-radius:7px}.layout-preset-card:hover,.style-preset-card:hover{background:#f1f7f8;border-color:#23849a}.layout-preset-card b,.style-preset-card b{font-size:12px;font-weight:600;line-height:1.25}.layout-icon{display:block;width:100%;height:50px}.layout-icon path{fill:none;stroke:#111;stroke-width:1.8;stroke-linejoin:round}.style-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 20px}
/* Full-bleed map shell with a floating control column. */
html,body{width:100%;height:100%;overflow:hidden}
body{overflow:hidden}
header{display:none!important}
main{display:block!important;position:relative;width:100%;height:100dvh!important;min-height:100dvh!important}
.workspace{position:fixed;inset:0;width:100%;height:100dvh;min-height:0;overflow:hidden}
aside{position:fixed;z-index:8;left:20px;top:20px;bottom:20px;width:330px;max-height:calc(100dvh - 40px);display:flex;flex-direction:column;background:rgba(255,255,255,.94);border:1px solid rgba(205,218,220,.95);border-radius:14px;box-shadow:0 16px 46px rgba(22,52,59,.18);backdrop-filter:blur(18px);padding:24px 20px;overflow-y:auto}
.canvas-top,.canvas-bottom{display:none!important}
.view-tools{z-index:5;left:auto;right:24px;bottom:24px;transform:none}
/* Rotation dial: a circle with an off-centre dot that shows the map's turn; dragging around it turns the map in 15° steps. */
.rotate-dial{position:relative;width:34px;height:34px;min-width:34px;padding:0;margin-left:2px;border-radius:50%;box-shadow:none;cursor:grab;touch-action:none}
.rotate-dial:active{cursor:grabbing}
.rotate-dial .dial-dot{position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;transform:rotate(var(--dial,0deg)) translate(0,-10px);transition:transform .12s ease}
.rotate-dial:focus-visible{outline:2px solid #407b8c;outline-offset:2px}
.aside-export{margin-top:auto;padding-top:20px;border-top:1px solid var(--line)}
.export-split{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%}
.export-split #export{width:100%;min-height:44px;margin:0;border-radius:6px;font-size:14px;white-space:nowrap}
.export-split .export-resolution{position:relative;display:block;grid-row:1;width:100%;height:100%;margin:0;border:0}
.export-split .export-resolution span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.export-split .export-resolution select{display:block;width:100%;height:100%;min-width:0;min-height:44px;margin:0;padding:10px;border:1px solid var(--line);border-radius:6px;background:#f8fafb;color:var(--ink);font:14px var(--sans);text-align:left;cursor:pointer}
.export-split .export-resolution select option{background:#fff;color:var(--ink);font-size:12px}

@media(max-width:600px){
  main{display:block!important;height:100dvh!important;min-height:100dvh!important}
  .workspace{position:fixed;inset:0;width:100%;height:100dvh;min-height:0}
  aside{left:12px;right:12px;top:12px;bottom:auto;width:auto;height:42dvh;max-height:42dvh;padding:20px 18px;border:1px solid rgba(205,218,220,.95);border-radius:12px}
  .view-tools{left:auto;right:12px;bottom:12px}
}
.layout-preset-card.selected,.style-preset-card.selected{background:#e8f4f5;border-color:#23849a;box-shadow:inset 0 0 0 1px #23849a}

.aside-export{flex-shrink:0}
.aside-export #research{margin-top:10px;width:100%;font-size:12px}
.aside-export #status{display:block;margin-top:10px;font-size:12px;line-height:1.5}
@media(max-width:600px){.view-tools button{padding:8px 6px}.view-tools{max-width:calc(100% - 24px)}}

aside > details{flex-shrink:0}
.control-subheading{font-size:13px;font-weight:600;margin:20px 0 14px;color:#587179}
.section-actions{margin:16px 0}.section-actions button{font-size:12px}

#indicatrix-status:empty{display:none}

.style-thumb{display:block;width:100%;height:76px;object-fit:cover;background:#e9f0f2;border:0;border-radius:3px}

.workspace{background:var(--map-background,#e9f0f2)}
.color-control{display:flex;align-items:center;gap:10px;font-size:13px;margin:20px 0}.color-control span{margin-right:auto}.color-control input{width:42px;height:32px;padding:2px;border:1px solid #cbdade;border-radius:5px;cursor:pointer}.color-control output{font-size:11px;font-family:monospace;color:#587179}

/* Compact map controls and an independent, map-aware masthead. */
.map-heading{position:fixed;z-index:6;top:30px;left:24px;width:max-content;max-width:calc(100vw - 48px);pointer-events:none;color:var(--heading-ink,#193c49);opacity:1;transition:opacity .35s ease}
.map-heading h1,.sidebar-title{font-family:Baskerville,'Baskerville Old Face','Palatino Linotype',Georgia,serif;font-style:normal;font-weight:400;letter-spacing:-2px;line-height:1.08}
.map-heading h1{font-size:clamp(46px,5.7vw,82px);margin:0 0 15px}
.map-heading p{font-family:Gotham,'Avenir Next',Arial,sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:2.1px;text-transform:uppercase;line-height:1.6;margin:0}
.map-heading[data-obscured=true]{opacity:0}
.customizing .map-heading{left:382px}
aside{box-shadow:0 8px 30px #193a4518;background:#ffffffed;backdrop-filter:blur(20px);border-color:#ffffffb3}
aside>*{flex-shrink:0}
aside .sidebar-title{font-size:37px;margin:12px 0 18px;letter-spacing:-1.3px;padding-right:15px}
aside .welcome-copy{font-size:12px;line-height:1.7;color:#5e737a;margin:12px 0 20px}
#collapse-customize{position:relative;align-self:flex-end;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;margin:-8px -8px 0 auto;border:0;padding:0;font:28px/1 Arial,sans-serif;z-index:1}
#collapse-customize span{display:block;pointer-events:none}
#customize{display:none}
body:not(.customizing) aside{top:auto;bottom:24px;left:24px;right:auto;width:344px;height:auto;max-width:calc(100vw - 48px);max-height:none;padding:12px;border-radius:16px;overflow:visible}
body:not(.customizing) aside>:not(.layout-presets):not(.style-presets):not(#show-history):not(#customize):not(#tour-story):not(.history-tools):not(#tour-story-strip){display:none}
body:not(.customizing) .layout-presets,body:not(.customizing) .style-presets{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#c6d4d7 transparent;margin:0;padding:2px 2px 8px;scroll-snap-type:x proximity}
body:not(.customizing) .layout-preset-card,body:not(.customizing) .style-preset-card{flex:0 0 74px;padding:4px;border-radius:8px;scroll-snap-align:start;min-width:0;background:#f4f7f6;border-color:transparent}
body:not(.customizing) .layout-preset-card b,body:not(.customizing) .style-preset-card b{display:none}
body:not(.customizing) .layout-icon{height:44px}
body:not(.customizing) .style-preset-card{flex-basis:94px}
body:not(.customizing) .style-thumb{height:53px;border-radius:5px}
body:not(.customizing) .selected{border-color:#417886;box-shadow:0 0 0 1px #417886;background:#e1eef0}
body:not(.customizing) #customize{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin-top:2px;padding:9px;background:var(--control-bg);border:0;border-radius:6px;font-size:12px;font-weight:600;letter-spacing:.3px;color:var(--control-ink)}
body:not(.customizing) #customize:hover{background:var(--control-hover)}
#customize span{font-size:18px;line-height:1}
@media(max-width:700px){
 .map-heading{top:24px;left:12px;max-width:calc(100vw - 24px)}
 .map-heading h1{font-size:48px;letter-spacing:-1.7px}
 .map-heading p{font-size:10px;letter-spacing:1.4px}
 .customizing .map-heading{left:382px}
 body:not(.customizing) aside{left:12px;bottom:76px;max-width:calc(100vw - 24px)}
 .view-tools{right:12px;bottom:12px}
}
@media(prefers-reduced-motion:reduce){.map-heading{transition:none}}

.grid-settings{padding-top:4px;margin-top:18px;border-top:1px solid #e1e9eb}.grid-settings .color-control{margin:14px 0}.grid-settings .color-control span{max-width:145px}.grid-settings .range{margin-bottom:20px}

#export-progress{width:320px;max-width:calc(100vw - 40px);padding:28px;border:1px solid #d7e1e3;border-radius:12px;text-align:center}#export-progress::backdrop{background:rgba(233,240,242,.94)}#export-progress-text{margin:0 0 20px;font-weight:600}#export-cancel{min-width:100px}

/* Touch targets and safe areas for browser and home-screen use. */
.view-tools button span{font:inherit;min-width:0}
.short-label{display:none}
aside{overscroll-behavior:contain}
@media(max-width:700px){
 .map-heading{top:calc(24px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))}
 .map-heading h1{font-size:clamp(36px,11vw,56px)}
 .map-heading p{font-size:clamp(11px,3vw,14px)}
 .view-tools{left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));max-width:none;justify-content:space-between}
 .view-tools button{min-height:44px;min-width:44px;padding:8px}
 .view-tools .full-label{display:none}
 .view-tools .short-label{display:inline}
 .view-tools #zoom-value{min-width:32px}
 body:not(.customizing) aside{left:calc(12px + env(safe-area-inset-left));bottom:calc(84px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))}
 body:not(.customizing) #customize{min-height:44px}
 .customizing aside .sidebar-title{margin-top:0}
 .customizing aside summary{min-height:44px;align-content:center}
 .customizing aside input[type=range]{height:24px}
 .customizing aside select{font-size:16px;min-height:44px}
 #floating-legend{top:calc(122px + env(safe-area-inset-top));right:calc(12px + env(safe-area-inset-right));max-width:calc(100vw - 24px)}
 .floating-legend-clusters>div{min-width:0}
 .customizing #floating-legend{display:none}
}
@media(max-height:500px) and (orientation:landscape){
 body:not(.customizing) aside{bottom:calc(12px + env(safe-area-inset-bottom));width:300px}
 .map-heading{top:calc(12px + env(safe-area-inset-top))}
 .map-heading h1{font-size:40px;margin-bottom:6px}
 #floating-legend{display:none}
}
@media(max-width:700px) and (max-height:700px){
 #floating-legend{display:none}
 body:not(.customizing) .layout-icon{height:36px}
 body:not(.customizing) .style-thumb{height:42px}
}
@media(max-height:500px) and (orientation:landscape){
 body:not(.customizing) aside{width:min(300px,40vw)}
 .view-tools{left:auto;right:calc(12px + env(safe-area-inset-right))}
 .view-tools button{min-height:44px}
}

/* Phones use a compact legend and inexpensive composited panel shadows. */
#legend-toggle{display:none}
#reposition-done,.zoom-label{display:none}
#rotate[aria-pressed="true"]{background:#e1eef0;border-color:#417886;box-shadow:0 0 0 1px #417886}
#mobile-customization-warning{width:390px;max-width:calc(100vw - 32px);padding:24px}
#mobile-customization-warning p{margin:0 0 24px;font-size:16px;line-height:1.5}
.warning-actions{display:grid;gap:10px}
.warning-actions button{min-height:48px;font-size:14px}
#mobile-customization-warning .check{margin:20px 0 0;min-height:44px}
#mobile-legend-dialog{padding:48px 12px 20px;width:min(460px,calc(100vw - 24px));overflow:auto}
#close-legend{position:absolute;right:8px;top:4px;min-width:44px;min-height:44px;border:0;font-size:28px}
#mobile-legend-content .floating-legend-clusters{flex-wrap:wrap;justify-content:center;box-shadow:none;border:0;background:transparent;backdrop-filter:none}
#mobile-legend-content .floating-legend-clusters>div{width:198px}
#mobile-legend-content .floating-legend-clusters polygon{pointer-events:none}
#mobile-legend-content .floating-legend-clusters svg{width:198px}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 .repositioning #controls,.repositioning #legend-toggle{display:none!important}
 .repositioning .view-tools{display:flex;flex-wrap:wrap;left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));max-width:none;gap:4px;justify-content:center;padding:8px}
 .repositioning .view-tools button{min-height:44px;min-width:40px;padding:8px;font-size:14px}
 .repositioning .view-tools .full-label{display:inline}
 .repositioning .view-tools .short-label{display:none}
 .repositioning .view-tools .zoom-label{display:inline;font:14px var(--sans);min-width:0}
 .repositioning #reposition-done{display:block;margin-left:auto;min-width:56px}
 .customizing aside{inset:0;width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;background:#fff;backdrop-filter:none;padding:calc(8px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left))}
 #collapse-customize{position:relative;align-self:flex-end;width:44px;height:44px;margin:0 -8px 0 auto;background:transparent}
 .view-tools{display:none}
 #floating-legend{display:none!important}
 #legend-toggle:not([hidden]){display:block;position:absolute;right:12px;top:calc(114px + env(safe-area-inset-top));z-index:7;min-height:44px;background:#f8fcfbe8;backdrop-filter:none}
 body:not(.customizing) aside{bottom:calc(12px + env(safe-area-inset-bottom))}
 #relief-panel .relief-switch,#relief-custom,#relief-panel .relief-tag{display:none!important}

 .map-heading.over-infinite{background:var(--map-background,#e9f0f2);padding:8px 12px;border-radius:10px}
 .floating-legend-clusters,body:not(.customizing) aside{backdrop-filter:none}
 #error button{display:block;margin-top:12px}
}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){.customizing #legend-toggle{display:none}}
@media(max-width:700px) and (orientation:portrait){
 body:not(.customizing) aside{right:calc(12px + env(safe-area-inset-right));width:auto}
 #legend-toggle:not([hidden]){top:calc(150px + env(safe-area-inset-top))}
}

.floating-legend-clusters.lifezones-legend{display:block;width:440px;max-width:100%;box-sizing:border-box}#mobile-legend-content .lifezones-legend svg{width:100%}

.source .note{margin:4px 0;line-height:1.5;letter-spacing:0}.source .note:empty,.source small:empty{display:none}

/* The construction illustration belongs to About, independent of the map canvas. */
#about-construction{margin:8px 0 32px;clear:both}
.construction-view{position:relative;height:320px}
.construction-view canvas{position:relative;display:block;width:100%;height:100%;touch-action:none;cursor:grab}
.construction-view canvas:active{cursor:grabbing}
.construction-motion{position:absolute;right:0;bottom:10px;border:0;font-size:11px;color:#70858c;padding:8px}
#about-construction .construction-range{display:block;width:80%;margin:16px 10% 4px;height:18px}
.construction-stops{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.construction-stops button{border:0;font-size:12px;padding:8px 4px;color:#789096;min-height:40px}
.construction-stops button[aria-pressed=true]{color:#163d48;font-weight:700}
#about-construction .construction-caption{font-size:13px;line-height:1.6;text-align:center;min-height:42px;margin:12px 0 0}
#about-construction .construction-hint{text-align:center;font-size:11px;color:#809397;margin:2px 0}
.welcome-copy a{color:inherit;text-underline-offset:3px;white-space:nowrap}
@media(max-width:600px){#research-dialog{padding:24px}.construction-view{height:260px}.construction-stops button{font-size:11px}}

.construction-stops button{min-width:0;font-size:12px}.construction-motion:disabled{visibility:hidden}

.construction-toolbar{display:flex;justify-content:flex-start;margin:8px 0 0}
.construction-toolbar select{width:auto;max-width:100%;margin:0;padding:6px 26px 6px 8px;font-size:12px;color:#587179;background:transparent;border-color:transparent;cursor:pointer}
.construction-toolbar select:hover,.construction-toolbar select:focus{border-color:#d7e1e3;background:#f8fafb}

/* Distinguish the technical summary from the author’s introduction. */
#research-dialog .about-bot-copy{font-family:"Fira Code",monospace;color:#52616a}
#research-dialog .about-bot-copy p{font-size:14px;line-height:1.8;overflow-wrap:break-word}
#research-dialog summary:focus-visible{outline:2px solid #087f97;outline-offset:5px}
#about-sources ul{padding-left:22px}
#map-load-notice{position:absolute;z-index:8;top:18px;left:50%;transform:translateX(-50%);padding:10px 14px;border-radius:8px;background:#fff;color:#193c49;box-shadow:0 2px 15px #0002;font-size:13px}#map-load-notice[hidden]{display:none}#map-load-notice button{margin-left:8px;padding:5px 12px}
/* Temporary comparison control for the pre-rendered lighting resolution. */
.temporary-test{font-size:11px;color:#6f7f78;margin:8px 0}

/* Discovery markers are screen-space affordances, never geographic extents. */
.tour-markers{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.tour-markers[hidden],.tour-marker[hidden]{display:none}
.tour-marker{position:absolute;width:32px;height:32px;margin:-16px 0 0 -16px;padding:0;border:0;border-radius:50%;background:transparent;pointer-events:auto;touch-action:none;cursor:pointer;color:#fff9e8}
.tour-marker:hover,.tour-marker:active{background:transparent}
.tour-center{position:absolute;left:12px;top:12px;width:8px;height:8px;border:1px solid #28424ee0;border-radius:50%;background:currentColor;box-shadow:0 0 0 1px #fff9e866,0 1px 4px #142c4b66;transition:transform .18s}
.tour-marker:hover .tour-center,.tour-marker:focus-visible .tour-center{transform:scale(1.3)}
.tour-marker:focus-visible{outline:2px solid #fff9e8;outline-offset:3px;box-shadow:0 0 0 5px #28424e99}
.tour-ripple{position:absolute;inset:0;border:1px solid currentColor;border-radius:50%;box-shadow:0 0 1px #17394799;pointer-events:none;animation:tour-ripple 3.6s linear infinite}
@keyframes tour-ripple{0%{transform:scale(.25);opacity:0}12%{opacity:.65}100%{transform:scale(1.15);opacity:0}}
@media(prefers-reduced-motion:reduce){.tour-ripple{animation:none;transform:scale(.65);opacity:.35}.tour-ripple:nth-child(n+2){display:none}.tour-center{transition:none}}

/* Screen-only coordinates; never intercept map or marker gestures. */
#map-coordinates{position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);z-index:3;pointer-events:none;white-space:nowrap;padding:6px 9px;border-radius:5px;background:#fffffff0;color:#193c49;box-shadow:0 1px 6px #142c4b22;font:12px/1.4 "Fira Code",monospace;font-variant-numeric:tabular-nums}
#map-coordinates[hidden]{display:none}

/* The story occupies the existing compact picker shell. */
body:not(.customizing) aside.tour-story-open{min-height:var(--tour-card-height);max-height:calc(100dvh - 36px);overflow-y:auto}
body:not(.customizing) aside.tour-story-open>:not(#tour-story){display:none}
body:not(.customizing) aside.tour-story-open>#tour-story{display:block}
.tour-story-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding-top:6px;border-top:1px solid #c9d6d9;font-size:11px;color:#42636b;font-variant-numeric:tabular-nums}
.tour-story-nav[hidden]{display:none}
#tour-story .tour-story-nav button{min-width:44px;min-height:40px;padding:0 10px;border:0;border-radius:6px;font:inherit;font-size:22px;line-height:1;color:#234b59;background:#e0edef;cursor:pointer}
#tour-story .tour-story-nav button:hover{background:#cfe3e7}
#tour-story .tour-story-nav button:focus-visible{outline:2px solid #407b8c;outline-offset:2px}
#tour-story{position:relative;padding:10px 12px 8px}
#tour-story[hidden]{display:none}
#tour-story h2{font:400 29px/1.15 Baskerville,Georgia,serif;letter-spacing:-.6px;margin:2px 35px 12px 0}
#tour-story p{font-size:12px;line-height:1.5;margin:0 0 10px;color:#34545e}
#tour-story .tour-story-note{font-size:11px;line-height:1.5;color:#60777d;margin-bottom:6px}
#tour-story-close{position:absolute;right:-4px;top:-4px;width:44px;height:44px;padding:0;border:0;font:28px/1 Arial,sans-serif}
.tour-story-source{font-size:11px;color:#346e7c;text-underline-offset:3px}
.tour-routes{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
/* Comets are drawn on this canvas each frame: a bright head on a dark halo and a tail in three steps of falling opacity (tour-route-renderer.mjs). */
.tour-markers{z-index:2}
/* Map labels for the focused story: sites as black circles with all-caps names, areas as italic names. */
.tour-labels{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden}
.tour-labels[hidden]{display:none}
.tour-label{position:absolute;white-space:nowrap;color:#000;-webkit-text-stroke:3px rgba(255,255,255,.5);paint-order:stroke fill}
.tour-label[hidden]{display:none}
.tour-label[data-kind="site"]{padding-left:17px;margin:-7px 0 0 -6px;font:700 9.5px/14px Gotham,"Gotham SSm",Montserrat,"Proxima Nova","Avenir Next",Avenir,"Helvetica Neue",Arial,sans-serif;text-transform:uppercase;letter-spacing:.09em}
.tour-label[data-kind="site"]::before{content:"";position:absolute;left:0;top:1px;width:12px;height:12px;border-radius:50%;background:#000;border:2px solid rgba(255,255,255,.5);background-clip:padding-box}
.tour-label[data-kind="area"]{transform:translate(-50%,-50%);font:italic 500 22px/1.1 Baskerville,"Libre Baskerville","Baskerville Old Face",Georgia,"Times New Roman",serif;letter-spacing:.02em}
.tour-route-key{list-style:none;margin:0 0 12px;padding:0;font-size:11px;line-height:1.5;color:#34545e}
.tour-route-key li{position:relative;padding-left:17px;margin:5px 0}
.tour-route-key li::before{content:"";position:absolute;left:0;top:5px;width:7px;height:7px;border-radius:50%;background:var(--route-color,#fff3c9);box-shadow:0 0 0 1px #65797d}

.tour-areas{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:hidden}
.tour-areas .area-fill{fill:#ffcc73;fill-opacity:.22;stroke:none}
.tour-areas [data-kind="basin"] .area-fill{fill:#84e4ed;fill-opacity:.25}
.tour-areas .area-halo,.tour-areas .area-border{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.tour-areas .area-halo{stroke:#183841;stroke-width:4.8;stroke-opacity:.7}
.tour-areas .area-border{stroke:#fff3c9;stroke-width:2.4}
.tour-areas [data-kind="basin"] .area-border{stroke:#cefbff}


/* History mode: one stop of the unified timeline replaces the positioning toolbox. */
/* One look for the clickable things around the map: no border, a grey a step
   darker than the panel, the same ink; pressed states go a step darker again. */
:root{--control-bg:#f1f5f4;--control-hover:#dfeaed;--control-on:#d5e4e7;--control-ink:#34545e}
#show-history{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin:6px 0 2px;padding:9px;border:0;border-radius:6px;font-size:12px;font-weight:600;letter-spacing:.3px;color:var(--control-ink);background:var(--control-bg);cursor:pointer}
#show-history:hover{background:var(--control-hover)}
#show-history[aria-pressed="true"]{background:var(--control-on)}
.round-mark,.round-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:0;border-radius:50%;background:var(--control-bg);color:var(--control-ink);font:600 18px/1 'DM Sans',sans-serif;cursor:pointer}
.round-button:hover{background:var(--control-hover)}
#show-history .history-back{display:none;position:absolute;left:6px;top:50%;transform:translateY(-50%)}
.rotate-dial{border:0;background:var(--control-bg)}
.rotate-dial:hover{background:var(--control-hover)}
.rotate-dial .dial-dot{background:var(--control-ink)}
.view-tools button{color:var(--control-ink);font-size:12px;font-weight:600}
.view-tools button:hover{background:var(--control-bg)}
#legend-toggle:not([hidden]){border:0;background:var(--control-bg);color:var(--control-ink);font-size:12px;font-weight:600}
#tour-story .tour-story-nav button{background:var(--control-bg);color:var(--control-ink)}
#tour-story .tour-story-nav button:hover{background:var(--control-hover)}
#tour-story-close{color:var(--control-ink)}
.history-stop-labels button{color:var(--control-ink);opacity:.75}
.history-stop-labels button[aria-pressed="true"]{color:var(--control-ink);background:var(--control-on);opacity:1}
#history-toggle-retired{display:none}
#history-toggle input{margin:0;width:16px;height:16px;accent-color:#407b8c}
body:not(.customizing) aside.tour-story-open>#show-history{display:none}
body.history .view-tools{display:none}
.history-tools{position:fixed;z-index:6;right:24px;bottom:24px;width:min(600px,calc(100% - 440px));display:flex;flex-direction:column;gap:6px;padding:12px 64px 10px 14px;background:rgba(255,255,255,.94);border:1px solid rgba(205,218,220,.95);border-radius:12px;box-shadow:0 12px 36px rgba(22,52,59,.18);backdrop-filter:blur(18px)}
.history-tools[hidden]{display:none}
/* Fit above the turning dial at the pane's right edge: the positioning toolbox is hidden while the timeline is open. */
.history-side{position:absolute;right:12px;top:10px;bottom:8px;width:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
#history-fit{width:40px;height:30px;padding:0;border:0;border-radius:15px;background:var(--control-bg);color:var(--control-ink);font:600 11px/1 'DM Sans',sans-serif;cursor:pointer}
#history-fit:hover{background:var(--control-hover)}
#history-fit:focus-visible{outline:2px solid #407b8c;outline-offset:2px}
#history-dial{margin-left:0}
.history-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:#6e858d}
.history-head output{font-weight:650;letter-spacing:0;text-transform:none;font-size:12px;color:#234b59;font-variant-numeric:tabular-nums}
#history-stop{display:block;width:100%;height:28px;margin:0;accent-color:#407b8c;cursor:pointer}
/* Short approximate dates under the ticks; the age name sits in the panel heading. */
.history-stop-labels{display:grid;grid-template-columns:repeat(var(--stop-count,9),minmax(0,1fr));gap:2px;margin:0 0 2px}
.history-stop-labels button{min-height:30px;padding:3px 1px;border:0;border-radius:5px;font-family:inherit;font-size:10px;line-height:1.15;color:#60777d;background:transparent;cursor:pointer;font-variant-numeric:tabular-nums;white-space:nowrap}
.history-stop-labels button:hover{color:#234b59}
.history-stop-labels button[aria-pressed="true"]{color:#234b59;background:#e0edef;font-weight:650}
.history-stop-labels button:focus-visible,#history-stop:focus-visible{outline:2px solid #407b8c;outline-offset:2px}
.history-note{margin:0;font-size:11px;line-height:1.45;color:#60777d}
@media(max-width:700px){body.history .map-heading{display:none}body.history #legend-toggle{top:calc(env(safe-area-inset-top) + 150px)}.history-tools{left:12px;right:12px;bottom:auto;top:calc(env(safe-area-inset-top) + 64px);width:auto;padding:10px 12px 8px;gap:5px}.history-stop-labels button{font-size:9px;padding:2px 0;white-space:normal;line-height:1.15}}

/* Phones: the scrubber sits inside the sidebar where the options button was; a
   focused spot swaps it for a strip of cards (no arrows: the next one peeks in
   from the right and a thumb drag snaps, with native momentum). Cards take at
   most a third of the height and scroll inside. */
@media(max-width:700px), (max-width:1000px) and (max-height:500px){
 body.history:not(.customizing) #customize{display:none}
 body.history:not(.customizing) #show-history .history-back{display:inline-flex}
 body.history:not(.customizing) aside .layout-presets,body.history:not(.customizing) aside .style-presets{display:none}
 body.history:not(.customizing) #show-history{background:transparent;padding-left:44px;padding-right:44px}
 aside .history-tools{position:relative;inset:auto;width:auto;margin:4px 0 0;padding:6px 50px 2px 2px;background:transparent;border:0;box-shadow:none;backdrop-filter:none}
 aside .history-side{right:2px;top:4px;bottom:2px}
 body.history-focus:not(.customizing) aside .history-tools,body.history-focus:not(.customizing) aside .layout-presets,body.history-focus:not(.customizing) aside .style-presets,body.history-focus:not(.customizing) aside>#show-history{display:none}
 body.history-focus:not(.customizing) aside{background:transparent;border:0;box-shadow:none;backdrop-filter:none;padding:0;left:0;right:0;max-width:none;width:auto}
 body:not(.customizing) aside.tour-story-open>#tour-story-strip{display:flex}
 body:not(.customizing) aside.tour-story-open{min-height:0;max-height:none;overflow:visible}
 #tour-story-strip{display:flex;gap:10px;margin:0;padding:6px 12px 8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding:0 12px;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 #tour-story-strip::-webkit-scrollbar{display:none}
 .tour-story-card{position:relative;flex:0 0 84%;max-height:min(33dvh,320px);overflow-y:auto;overscroll-behavior-y:contain;scroll-snap-align:start;padding:12px 14px 10px;border-radius:14px;background:rgba(255,255,255,.96);border:0;box-shadow:0 4px 18px #14304022;opacity:.85;transform:scale(.97);transition:opacity .2s ease,transform .2s ease}
 .tour-story-card .tour-card-close{position:absolute;right:8px;top:8px}
 .tour-story-card h2{padding-right:34px}
 .tour-story-card.active{opacity:1;transform:none;border-color:#b9cdd2}
 .tour-story-card h2{font:400 22px/1.15 Baskerville,Georgia,serif;letter-spacing:-.4px;margin:2px 0 8px}
 .tour-story-card p{font-size:12px;line-height:1.5;margin:0 0 8px;color:#34545e}
 .tour-story-card .tour-story-note{font-size:11px;color:#60777d}
 .tour-story-card .tour-route-key{margin-bottom:8px}
}

/* Tablets and narrow windows: the scrubber keeps to the right of the sidebar and its ticks shrink before they collide. */
@media(min-width:701px) and (max-width:1000px){.history-tools{width:calc(100% - 420px);padding:10px 60px 8px 12px}.history-stop-labels button{font-size:9px;padding:2px 0;letter-spacing:-.1px;white-space:normal;line-height:1.15}}

/* Wide screens: the legend sits level with the title instead of below it. */
@media(min-width:1240px){#floating-legend{top:30px}}

/* Animation pane: history label size, still markers and ripple-free spots. */
.tour-label[data-kind="site"]{font-size:calc(9.5px*var(--label-scale,1));line-height:calc(14px*var(--label-scale,1));padding-left:calc(17px*var(--label-scale,1));margin:calc(-7px*var(--label-scale,1)) 0 0 calc(-6px*var(--label-scale,1))}
.tour-label[data-kind="site"]::before{width:calc(12px*var(--label-scale,1));height:calc(12px*var(--label-scale,1));top:calc(1px*var(--label-scale,1))}
.tour-label[data-kind="area"]{font-size:calc(22px*var(--label-scale,1))}
body.no-ripples .tour-ripple{display:none}
body.still .tour-ripple{animation:none;transform:scale(.65);opacity:.35}body.still .tour-ripple:nth-child(n+2){display:none}body.still .tour-center{transition:none}
/* More formats: the Instagram grid and the history posters. */
#export-more{position:relative;width:min(440px,calc(100vw - 32px));padding:22px 24px 20px;border:0;border-radius:14px;color:var(--ink)}
#export-more h2{font:400 26px/1.1 Baskerville,Georgia,serif;letter-spacing:-.5px;margin:0 0 14px}
#export-more-close{position:absolute;right:10px;top:10px;width:40px;height:40px;padding:0;border:0;border-radius:50%;font:26px/1 Arial,sans-serif;color:var(--control-ink);background:transparent}
#export-more-close:hover{background:var(--control-bg)}
.export-formats{display:flex;flex-direction:column;gap:8px}
.export-format{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;padding:10px 12px;text-align:left;background:var(--control-bg);border:0;border-radius:8px;color:var(--ink);cursor:pointer}
.export-format:hover{background:var(--control-hover)}
.export-format b{font-size:14px}.export-format small{font-size:11.5px;line-height:1.4;color:#5d727a}
.export-grid{display:flex;align-items:center;gap:10px;font-size:12px;margin:0 0 4px;color:#5d727a}.export-grid select{width:auto;margin:0;padding:6px 24px 6px 8px;font-size:12px}
#export-poster-formats{display:flex;flex-direction:column;gap:8px}#export-poster-formats .control-subheading{margin:10px 0 0}#export-poster-formats .note{margin:0 0 2px}
#export-poster-note{margin:6px 0 0}
.export-links a{color:#346e7c;text-underline-offset:3px;white-space:nowrap}.export-links span{display:block;margin-top:4px}

/* The isometric style's card is a link to the home page. */
a.style-preset-card{text-decoration:none;color:inherit;display:block;box-sizing:border-box}
