:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:#f4f3ef;background:#090d11}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 78% -10%,#26312a 0,transparent 38%),#090d11}header{height:78px;padding:0 max(24px,calc((100vw - 1200px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #26302e}.brand{display:flex;align-items:center;gap:12px}.logo{display:grid;place-items:center;width:40px;height:40px;border:1px solid #da644f;border-radius:12px;font-size:25px;font-weight:800}.logo span{color:#e77d67}.brand strong{display:block;letter-spacing:.11em;font-size:20px}.brand small{display:block;color:#92a09a;font-size:10px;letter-spacing:.06em}.badge{font-size:10px;letter-spacing:.2em;color:#dfa187;border:1px solid #6b4238;border-radius:40px;padding:9px 13px}main{max-width:1200px;margin:auto;padding:44px 24px 70px}.intro{max-width:750px}.eyebrow{color:#db8474;letter-spacing:.24em;font-size:11px;font-weight:700}h1{font-size:clamp(37px,5.3vw,66px);letter-spacing:-.055em;line-height:1.07;margin:20px 0}h1 em{font-style:normal;color:#df7864}.intro>p:last-child{max-width:590px;color:#a5afaa;line-height:1.65;margin-bottom:30px}.map-shell{height:min(53vw,540px);min-height:360px;position:relative;overflow:hidden;border:1px solid #36413a;border-radius:22px;background:#111b18;box-shadow:0 30px 90px #0007}#map{width:100%;height:100%}.leaflet-container{background:#14201d}.leaflet-control-attribution{font-size:9px!important}.fog-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:500;pointer-events:none}.map-label{position:absolute;top:20px;left:20px;z-index:700;display:flex;gap:9px;align-items:center;background:#121a1bea;padding:10px 13px;border:1px solid #3c4743;border-radius:7px;font-size:10px;letter-spacing:.13em;font-weight:700;color:#ddd}.map-label i{width:7px;height:7px;border-radius:50%;background:#e57661;box-shadow:0 0 12px #f28060}.recenter{position:absolute;right:20px;top:20px;z-index:700;width:42px;height:42px;border:1px solid #596761;border-radius:10px;background:#111a19;color:#fff;font-size:30px;cursor:pointer}.dashboard{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0}.stat{display:flex;align-items:center;gap:17px;background:#141b1b;border:1px solid #293532;border-radius:14px;padding:17px 20px}.stat b{font-size:25px;color:#e67b66}.stat small{display:block;letter-spacing:.13em;color:#87938d;font-size:10px;margin-bottom:5px}.stat strong{font-size:19px}.actions{display:flex;gap:10px;margin-top:23px}button{font:inherit;cursor:pointer}.actions button{border:1px solid #5b6a63;border-radius:10px;padding:15px 22px;color:#eee;background:#1c2825;font-weight:700}.actions button:disabled{opacity:.42;cursor:default}.actions .primary{background:#da755f;border-color:#da755f;color:#14130f}#status{color:#d6e0d9;font-size:14px;min-height:24px}.fineprint{font-size:12px;color:#82918b;line-height:1.6;max-width:780px}@media(max-width:650px){header{height:69px;padding:0 16px}.badge{font-size:8px;padding:7px}.brand small{font-size:9px}main{padding:28px 15px 50px}.map-shell{height:53dvh;min-height:360px}.dashboard{gap:7px}.stat{padding:11px 7px;gap:5px}.stat b{font-size:17px}.stat small{font-size:8px;letter-spacing:.03em}.stat strong{font-size:15px}.actions button{padding:14px 17px}}
.dashboard{grid-template-columns:repeat(4,1fr)}
@media(max-width:850px){.dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Country progress follows the existing dashboard rhythm. */
.stat-country{grid-column:span 2}.stat-country #countryFlag{font-size:29px;line-height:1}.stat-country strong{overflow-wrap:anywhere}
@media(max-width:650px){.dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-country{grid-column:span 1}.stat-country #countryFlag{font-size:23px}}
/* Independent borders stay above the dark fog, including unrevealed places. */
.border-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:650;pointer-events:none}
.world-view{position:absolute;inset:0;z-index:680;background:#070d11;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#627276 #101b1f}
.world-view[hidden]{display:none}
.world-view canvas{display:block;height:100%;max-width:none;margin:0 auto}
.world-button{position:absolute;right:20px;top:72px;z-index:700;width:42px;height:42px;border:1px solid #71807e;border-radius:10px;background:#111a19;color:#fff;font-size:30px;line-height:1;cursor:pointer}
.map-shell.world-active .leaflet-control-zoom{display:none}
button.stat-country{text-align:left;color:inherit;font:inherit;cursor:pointer}
button.stat-country:hover,button.stat-country:focus-visible{border-color:#a7b1ac;outline-offset:2px}
.stat-country span{min-width:0}
button.stat-explored{text-align:left;color:inherit;font:inherit;cursor:pointer}
button.stat-explored:hover,button.stat-explored:focus-visible{border-color:#a7b1ac;outline-offset:2px}
.stat-explored span{min-width:0}
.country-picker{position:absolute;z-index:800;top:125px;right:20px;max-width:min(330px,calc(100% - 40px));max-height:calc(100% - 145px);overflow:auto;background:#111a1bdd;border:1px solid #71807e;border-radius:12px;padding:12px;box-shadow:0 20px 40px #000b;backdrop-filter:blur(12px)}
.country-picker[hidden]{display:none}
.country-picker-head{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:8px;font-size:14px}
.country-picker-head button{color:#fff;background:transparent;border:0;font-size:26px;line-height:1}
.country-options{display:grid;gap:6px}
.country-options button{display:flex;gap:10px;align-items:center;width:100%;padding:11px;color:#eee;background:#22302d;border:1px solid #43544e;border-radius:8px;text-align:left;font-size:14px}
@media(max-width:650px){.country-picker{left:15px;right:15px;max-width:none}}
.header-tools{display:flex;align-items:center;gap:8px}.language-picker select{background:#17211f;color:#f4f3ef;border:1px solid #4c5b55;border-radius:8px;padding:8px 4px;font-weight:700;font-size:12px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:470px){.header-tools .badge{display:none}.language-picker select{max-width:74px}}
.build-version{display:block;width:100%;margin-top:12px;color:#ed3948;text-align:center;font-size:11px;letter-spacing:.08em}

/* Keep controls centered on wide screens and anchored to both edges on phones. */
.actions{justify-content:center}
@media(max-width:650px){.actions{justify-content:space-between}.actions button{flex:1 1 0;min-width:0;padding:14px 10px;white-space:normal}}
/* Country overview first; the remaining four measurements share one disclosure. */
.dashboard.summary-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:10px}
.summary-stats .stat-country{grid-column:auto}
.stats-details{border:1px solid #34423d;border-radius:14px;background:#141b1b;overflow:hidden}
.stats-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;cursor:pointer;font-weight:700;color:#e5e8e3;list-style:none}
.stats-details summary::-webkit-details-marker{display:none}
.stats-details summary::after{content:'⌄';font-size:22px;line-height:1;color:#dc806d;transition:transform .2s}
.stats-details[open] summary::after{transform:rotate(180deg)}
.stats-details .details-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;padding:0 10px 10px}
.stats-details .stat{min-width:0}
@media(max-width:650px){.stats-details summary{padding:14px 16px}.stats-details .details-grid{gap:7px;padding:0 7px 7px}}
.settlement-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:0;margin-bottom:10px}.settlement-stats .stat{min-width:0}.settlement-stats strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.settlement-stats button.stat{text-align:left;color:inherit;font:inherit;cursor:pointer}.settlement-stats button.stat:hover,.settlement-stats button.stat:focus-visible{border-color:#a7b1ac;outline-offset:2px}
@media(max-width:650px){.settlement-stats .stat{gap:5px;padding:11px 7px}.settlement-stats .stat b{font-size:17px}.settlement-stats .stat strong{font-size:clamp(11px,3.2vw,15px)}}
.data-credit{display:block;color:#82918b;font-size:11px}.data-credit a{color:#bdc8bf}
.info-details{margin:14px 0;border:1px solid #34423d;border-radius:14px;background:#141b1b;overflow:hidden}
.info-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer;font-weight:700;color:#e5e8e3;list-style:none}
.info-details summary::-webkit-details-marker{display:none}
.info-details summary::after{content:'⌄';font-size:22px;line-height:1;color:#dc806d;transition:transform .2s}
.info-details[open] summary::after{transform:rotate(180deg)}
.info-details>div{padding:0 18px 16px}.info-details .fineprint{margin:12px 0}
.export-hint{margin:-2px 0 12px;color:#a8b7ad;font-size:12px}
.discovery-backdrop[hidden]{display:none}.discovery-backdrop{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:18px;background:#020607c9;backdrop-filter:blur(8px)}
.discovery-card{width:min(100%,460px);max-height:min(85dvh,700px);overflow:auto;background:radial-gradient(circle at top right,#283c34,#121c1a 60%);border:1px solid #9b695d;border-radius:22px;padding:28px;box-shadow:0 28px 80px #000b}
.discovery-kicker{color:#e7a28d;font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.discovery-card h2{font-size:clamp(25px,6vw,36px);line-height:1.15;margin:14px 0 20px;overflow-wrap:anywhere}
.discovery-card dl{margin:0 0 24px}.discovery-card dl div{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid #405149}.discovery-card dt{color:#9eafa5}.discovery-card dd{text-align:right;margin:0;font-weight:700;overflow-wrap:anywhere}
.discovery-card button{width:100%;border:0;border-radius:11px;padding:15px;background:#dd7d67;color:#131713;font-weight:800}
.export-backdrop[hidden]{display:none}.export-backdrop{position:fixed;inset:0;z-index:3100;display:grid;place-items:center;padding:18px;background:#020607c9;backdrop-filter:blur(8px)}
.export-card{width:min(100%,420px);background:#17231f;border:1px solid #9b695d;border-radius:20px;padding:26px;box-shadow:0 28px 80px #000b}
.export-card h2{margin:0 0 10px;font-size:24px}.export-card p{color:#a8b7ad;margin:0 0 20px}
.export-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.export-options.two-formats{grid-template-columns:repeat(2,minmax(0,1fr))}
.export-options button{min-width:0;padding:15px 8px;border:0;border-radius:11px;background:#dd7d67;color:#131713;font-weight:800;font-size:16px}.export-options button[hidden]{display:none}
.export-cancel{width:100%;margin-top:12px;padding:12px;border:1px solid #52645a;border-radius:11px;background:transparent;color:#e2e8e1}
