:root{
  --blue:#204d9b;
  --blue2:#123e8b;
  --red:#b03131;
  --ink:#20242c;
  --panel:transparent;
  --left:210px;
  --top:110px;
}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}
body{
  font-family:Georgia,"Times New Roman",serif;
  color:var(--ink);
  background:#f3f3f3 url("background.png") center center / cover fixed no-repeat;
}
.shell{width:100vw;height:100vh;display:grid;grid-template-rows:var(--top) 1fr;padding:0 18px 18px}
.topbar{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:20px;padding:4px 8px 0 4px}
.site-brand{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:12px;min-width:max-content;overflow:visible;z-index:1100}
.site-emblem{display:block;width:auto;height:108px;flex:0 0 auto;object-fit:contain}
.person-name{font:400 20px Georgia,"Times New Roman",serif;line-height:1;color:var(--blue2);white-space:nowrap}
.language-wrap{position:relative;margin-left:auto;z-index:1000}
.language-button{
  border:0;
  background:transparent;
  color:var(--blue2);
  font:400 20px Georgia,"Times New Roman",serif;
  padding:8px 20px;
  border-radius:0;
  cursor:pointer;
  text-shadow:none;
  box-shadow:none;
  outline:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.language-symbol{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;line-height:1;opacity:1;filter:none;flex:0 0 auto;background:transparent;border:0;box-shadow:none}
.language-symbol-img{display:block;width:100%;height:100%;object-fit:contain;background:transparent}
.language-text{display:inline-block}

.language-button:hover,.language-button:focus,.language-button:active{
  background:transparent;
  text-shadow:none;
  box-shadow:none;
}
.language-menu{position:absolute;right:0;top:48px;z-index:1001;min-width:145px;background:rgba(255,255,255,.95);border:1px solid #bdc9dd;border-radius:10px;overflow:hidden;box-shadow:0 10px 28px rgba(0,0,0,.15)}
.language-menu button{display:block;width:100%;border:0;border-bottom:1px solid #e5e9ef;background:transparent;text-align:left;padding:10px 14px;font:16px Arial,sans-serif;cursor:pointer;color:#26354c}
.language-menu button:hover{background:#edf3ff}
.workspace{min-height:0;display:grid;grid-template-columns:var(--left) minmax(0,1fr);gap:18px}
.sidebar{min-height:0;height:100%;display:flex;flex-direction:column;align-items:center;padding-top:2px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;overscroll-behavior:contain}
.portrait{display:block;width:200px;height:auto;max-height:260px;object-fit:contain}
.main-menu{width:100%;margin-top:18px;display:flex;flex-direction:column;gap:8px}
.main-menu button{border:0;background:transparent;color:var(--blue2);font:25px/1.1 Georgia,"Times New Roman",serif;text-align:left;padding:7px 10px;cursor:pointer;border-radius:8px}
.main-menu button:hover,.main-menu button.active{background:transparent;text-decoration:underline}

.content-panel{min-width:0;min-height:0;height:100%;background:transparent;border:0;border-radius:0;overflow:hidden;backdrop-filter:none}
.content-scroll{height:100%;overflow:auto;padding:18px 24px 26px;scrollbar-width:thin}
.cv-title{font-size:clamp(33px,3.2vw,55px);line-height:1;color:var(--blue);margin:0 0 6px}
.biography-title{font-size:42px;color:var(--blue);font-weight:normal;margin:0 0 18px}
.cv-subtitle{font-size:18px;font-style:italic;color:#6b6d72;margin-bottom:16px}
.cv-columns{display:grid;grid-template-columns:minmax(250px,32%) minmax(0,1fr);gap:22px;align-items:start}
.cv-left{background:transparent;padding:14px 16px;border-radius:8px}
.cv-left h2,.cv-right h2{color:var(--red);font-size:17px;margin:14px 0 8px}
.cv-left,.cv-left *{font-weight:normal}
.cv-left h2:first-child,.cv-right h2:first-child{margin-top:0}
p,li{font-size:16.5px;line-height:1.34}
p{margin:0 0 10px}
ul{margin:0 0 10px;padding-left:20px}
a{color:#2c65ae}
.section-placeholder{max-width:1000px;padding:6px 10px}
.section-placeholder h1{font-size:42px;color:var(--blue);font-weight:normal;margin:0 0 18px}
.section-placeholder p{font-size:20px}
@media(max-width:900px){
  :root{--left:165px;--top:96px}
  .site-emblem{height:90px}.site-brand{gap:8px}.person-name{font-size:20px}.language-symbol{width:28px;height:28px}.portrait{width:158px}.main-menu button{font-size:20px}
  .cv-columns{grid-template-columns:1fr}.cv-left{background:transparent}
  p,li{font-size:15px}
}

/* Right working field: use regular weight throughout. */
.cv-right, .cv-right *{font-weight:normal}
/* Nested publication items */
.publication-sublist {
  margin-top: 0.45rem;
  margin-left: 1.4rem;
  padding-left: 1.1rem;
}
.publication-sublist li {
  margin: 0.32rem 0;
}


/* Contacts map: fit the available viewport height without vertical scrolling */
.contacts-section{max-width:none;width:100%;height:100%;padding-right:0;display:flex;flex-direction:column;min-height:0}
.contacts-section h1{flex:0 0 auto}
.contacts-section p{flex:0 0 auto}
.contacts-map{display:block;flex:1 1 auto;min-height:0;width:auto;max-width:100%;height:auto;max-height:100%;margin-top:8px;border:0;background:transparent;object-fit:contain;object-position:left top}
.content-scroll:has(.contacts-section){overflow:hidden}


/* CubeTechnology page */
.cube-section{max-width:none;width:100%;}
.cube-section h1{margin-top:12px;}
.cube-hero-image{float:right;display:block;width:min(43%,500px);height:auto;max-height:380px;object-fit:contain;margin:-4px 112px 10px 10px;background:transparent;}
.cube-list{margin-top:4px;padding-left:20px;}
.cube-list li{font-size:18px;line-height:1.35;}
@media(max-width:900px){.cube-section h1{margin-top:10px}.cube-hero-image{width:min(50%,360px);max-height:280px;margin:-3px 52px 10px 8px}.cube-list li{font-size:16px}}


/* Integrated PDF publication viewer */
.pdf-viewer-page{height:100%;min-height:0;display:flex;flex-direction:column;background:rgba(255,255,255,.20)}
.pdf-viewer-header{flex:0 0 auto;display:grid;grid-template-columns:auto minmax(220px,1fr) auto;align-items:center;gap:12px;padding:4px 6px 8px}
.pdf-viewer-header h1{margin:0;color:var(--blue);font-size:26px;font-weight:normal;text-align:center}
.pdf-back-button{border:0;background:transparent;color:#2c65ae;font:17px Georgia,"Times New Roman",serif;text-decoration:underline;cursor:pointer;padding:5px 2px;text-align:left}
.pdf-viewer-links{display:flex;gap:12px;align-items:center;justify-content:flex-end;white-space:nowrap}
.pdf-viewer-links a{font-size:15px}
.pdf-pages-scroll{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:center;gap:12px;padding:10px 12px 18px;background:rgba(230,233,238,.88);border:1px solid rgba(32,77,155,.20);scrollbar-width:thin}
.pdf-page-image{display:block;width:min(100%,1100px);height:auto;background:#fff;box-shadow:0 1px 8px rgba(0,0,0,.16)}
.content-scroll:has(.pdf-viewer-page){overflow:hidden;padding:8px 12px 10px}
@media(max-width:900px){
  .pdf-viewer-header{grid-template-columns:1fr;gap:4px}
  .pdf-viewer-header h1{text-align:left;font-size:21px}
  .pdf-viewer-links{justify-content:flex-start;white-space:normal;flex-wrap:wrap}
  .pdf-back-button{font-size:15px}
}


/* Site statistics page */
.stats-section{max-width:1180px;padding-bottom:34px}
.stats-section h2{color:var(--red);font-size:23px;font-weight:normal;margin:22px 0 10px}
.stats-section h3{color:var(--blue2);font-size:19px;font-weight:normal;margin:8px 0}
.stats-updated{font-size:16px!important;color:#5d6670;margin-top:-8px}
.stats-cards{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:14px;margin:12px 0 20px}
.stats-card{border:1px solid rgba(32,77,155,.22);background:transparent;border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:5px}
.stats-card span{font-size:16px;color:#44536a}
.stats-card strong{font-size:34px;font-weight:normal;color:var(--blue2)}
.stats-world-map{display:block;width:100%;max-width:1050px;height:auto;border:none;background:transparent;border-radius:0}
.stats-grid.two-col{display:grid;grid-template-columns:1.15fr .85fr;gap:22px;margin-top:12px}
.stats-table{width:100%;border-collapse:collapse;background:transparent}
.stats-table th,.stats-table td{border-bottom:1px solid rgba(32,77,155,.18);padding:7px 9px;text-align:left;font-size:15px}
.stats-table th{color:var(--blue2);font-weight:normal}
.stats-table td:not(:first-child),.stats-table th:not(:first-child){text-align:right}
.stats-bars{display:flex;flex-direction:column;gap:8px;max-width:900px}
.stats-bar-row{display:grid;grid-template-columns:82px minmax(120px,1fr) 48px;gap:10px;align-items:center;font-size:15px}
.stats-bar-row>div{height:18px;background:rgba(32,77,155,.10);border-radius:9px;overflow:hidden}
.stats-bar-row i{display:block;height:100%;background:rgba(32,77,155,.70);border-radius:9px}
.stats-bar-row b{font-weight:normal;color:var(--blue2);text-align:right}
.stats-fact{font-size:16px!important;line-height:1.5}
.stats-note{font-size:14px!important;color:#5f6770;margin-top:22px;padding-top:10px;border-top:1px solid rgba(32,77,155,.18)}
@media(max-width:900px){
  .stats-cards{grid-template-columns:1fr}
  .stats-grid.two-col{grid-template-columns:1fr}
  .stats-bar-row{grid-template-columns:72px minmax(90px,1fr) 40px}
}

/* Keep the complete main menu reachable on short/zoomed browser windows.
   The menu font size is preserved; only portrait height and vertical spacing are reduced. */
@media(max-height:760px){
  .portrait{width:auto;max-width:190px;max-height:210px}
  .main-menu{margin-top:10px;gap:4px}
  .main-menu button{padding-top:5px;padding-bottom:5px}
  
}
@media(max-height:640px){
  .portrait{width:auto;max-width:175px;max-height:165px}
  .main-menu{margin-top:7px;gap:2px}
  .main-menu button{padding-top:3px;padding-bottom:3px}
  
}

/* v106: live Statistics page */
.stats-map-wrap{position:relative;width:100%;max-width:1050px;line-height:0;overflow:visible}
.stats-map-markers{position:absolute;inset:0;pointer-events:none}
.stats-map-marker{position:absolute;transform:translate(-50%,-50%);border-radius:50%;background:#59636d;border:0.5px solid #36444f;box-sizing:border-box;display:flex;align-items:center;justify-content:center;box-shadow:none}
.stats-map-marker i{display:none}
.stats-city-label{position:absolute;transform:translate(4px,-50%);font:500 6.67px/1.15 Arial,sans-serif;color:#193b5a;white-space:nowrap;text-shadow:0 1px 2px #fff,1px 0 2px #fff,-1px 0 2px #fff;z-index:2;max-width:110px;overflow:visible}
.stats-city-label:before{content:"";position:absolute;left:-5px;top:50%;transform:translateY(-50%);width:4px;height:4px;border-radius:50%;background:#59636d;border:0.5px solid #36444f;box-shadow:none;box-sizing:border-box}
.stats-city-label-left{transform:translate(calc(-100% - 4px),-50%)}
.stats-city-label-left:before{left:auto;right:-5px}
.stats-city-label-collapsed{color:transparent!important;text-shadow:none!important}
.stats-unlocated-cities{font:500 9px/1.4 Arial,sans-serif;color:#38556c;margin:5px 0 8px}
@media(max-width:600px){.stats-city-label{font-size:5.33px;max-width:65px}}

/* v112: About GeoSite uses the same page-image viewer as Proposal for Publishers.
   This removes the browser PDF toolbar and side controls. */
.person-name-link{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  font:400 20px Georgia,"Times New Roman",serif;
  line-height:normal;
  color:var(--blue2);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  min-width:max-content;
  white-space:nowrap;
  overflow:visible;
  position:relative;
  z-index:1101;
}
#aboutGeoSiteLabel{display:inline-block;white-space:nowrap;font:inherit;line-height:inherit;color:inherit;}
.person-name-link:hover,.person-name-link:focus-visible{
  text-decoration:underline;
  text-underline-offset:5px;
}
.about-pages-scroll{height:100%;}
.content-scroll:has(.about-pages-scroll){overflow:hidden;padding:0;}

/* v126: force full localized About GeoSite label and reserve space beside emblem. */
.person-name-link{
  margin-left:22px !important;
  min-width:150px !important;
  justify-content:flex-start !important;
  overflow:visible !important;
  font-size:0 !important;
  color:transparent !important;
}
.person-name-link > *{display:none !important;}
.person-name-link::before{
  display:inline-block;
  white-space:nowrap;
  font:400 20px Georgia,"Times New Roman",serif;
  line-height:normal;
  color:var(--blue2);
  content:"About GeoSite";
}
html[lang="ru"] .person-name-link::before{content:"О ГеоСайте";}
html[lang="en"] .person-name-link::before{content:"About GeoSite";}
html[lang="zh"] .person-name-link::before{content:"关于GeoSite";}
@media(max-width:900px){
  .person-name-link{margin-left:18px !important;min-width:140px !important;}
  .person-name-link::before{font-size:20px;}
}

/* v127: preserve the image-based About GeoSite viewer while restoring PDF hyperlinks. */
.pdf-page-wrap{
  position:relative;
  display:block;
  width:min(100%,1100px);
  flex:0 0 auto;
}
.pdf-page-wrap .pdf-page-image{
  width:100%;
  max-width:none;
}
.pdf-link-hotspot{
  position:absolute;
  display:block;
  z-index:20;
  cursor:pointer;
  pointer-events:auto !important;
  touch-action:manipulation;
  background:transparent;
  border:0;
  text-decoration:none;
}
.pdf-link-hotspot:hover,
.pdf-link-hotspot:focus-visible{
  outline:1px solid rgba(32,77,155,.35);
  background:rgba(32,77,155,.06);
}

/* v130: preserve both PDF external links and internal table-of-contents navigation. */
.pdf-internal-goto{pointer-events:auto !important;cursor:pointer !important;}


/* v135 TEST ONLY: original PDF documents embedded in the site's work area */
.pdf-native-viewer{height:100%;min-height:0;display:flex;flex-direction:column}
.pdf-native-frame{display:block;flex:1 1 auto;width:100%;min-height:250px;border:1px solid rgba(32,77,155,.28);background:#fff}
.pdf-native-fallback{flex:0 0 auto;padding:5px 8px;font-size:13px;color:#44536a}
.pdf-native-fallback a{font-size:13px}
.pdf-native-about .pdf-viewer-header{grid-template-columns:minmax(0,1fr) auto}
.pdf-native-about .pdf-viewer-header h1{text-align:left}
.pdf-native-viewer .pdf-viewer-links{flex-wrap:wrap;justify-content:flex-end;row-gap:4px}
@media(max-width:900px){
 .pdf-native-about .pdf-viewer-header{grid-template-columns:minmax(0,1fr)}
 .pdf-native-about .pdf-viewer-links{justify-content:flex-start}
 .pdf-native-viewer .pdf-viewer-header h1{font-size:19px}
}


.pdf-mobile-open{display:none}

/* v137: phone/tablet-only layout. Desktop rules above are unchanged.
   Responsive flow avoids the fixed 210px sidebar and 110px topbar on small
   viewports. Keep content, document links and statistics scripts untouched. */
@media screen and (max-width:980px){
  html,body{
    width:100%;height:auto;min-height:100%;
    overflow-x:hidden;overflow-y:auto;
  }
  body{background-attachment:scroll}
  .shell{
    width:100%;height:auto;min-height:100dvh;
    display:flex;flex-direction:column;
    padding:8px 12px 18px;
  }
  .topbar{
    display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
    gap:3px;padding:0 0 8px;
  }
  .site-brand{
    position:relative;left:auto;transform:none;
    width:100%;min-width:0;max-width:100%;
    align-items:center;justify-content:flex-start;
    gap:8px;overflow:visible;
  }
  .site-emblem{
    width:auto;height:62px;max-width:38%;flex:0 0 auto;
    object-fit:contain;
  }
  .person-name-link{
    margin-left:0!important;min-width:0!important;max-width:100%;
    flex:0 1 auto;overflow:visible;
    white-space:normal;align-items:center;
  }
  .person-name-link::before{
    font-size:clamp(16px,3.3vw,20px);
    line-height:1.2;white-space:normal;overflow-wrap:anywhere;
  }
  .language-wrap{margin:0;align-self:flex-end;max-width:100%}
  .language-button{
    font-size:clamp(14px,3vw,18px);
    padding:4px 4px;gap:5px;max-width:100%;
  }
  .language-symbol{width:24px;height:24px}
  .language-text{overflow-wrap:anywhere}
  .language-menu{top:34px;max-width:min(88vw,260px)}
  .workspace{display:flex;flex-direction:column;gap:8px;min-height:0}
  .sidebar{
    display:flex;flex-direction:row;align-items:center;
    width:100%;height:auto;min-height:0;
    gap:10px;padding:0;overflow:visible;
  }
  .portrait{
    width:74px;height:auto;max-height:98px;max-width:74px;
    flex:0 0 74px;object-fit:contain;
  }
  .main-menu{
    width:auto;min-width:0;flex:1 1 auto;
    margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:2px 6px;align-items:center;
  }
  .main-menu button{
    min-width:0;font-size:clamp(14px,3vw,18px);
    line-height:1.18;padding:7px 4px;
    overflow-wrap:anywhere;text-align:left;
  }
  .content-panel{
    display:block;min-width:0;width:100%;height:auto;min-height:45vh;
    overflow:visible;
  }
  .content-scroll{
    width:100%;height:auto;min-height:45vh;
    overflow:visible;overflow-wrap:anywhere;
    padding:10px 2px 26px;
  }
  .section-placeholder{max-width:100%;width:100%;padding:3px 1px}
  .section-placeholder h1,.biography-title{
    font-size:clamp(27px,5.5vw,38px);line-height:1.12;
    overflow-wrap:anywhere;
  }
  .cv-title{font-size:clamp(27px,5.5vw,40px);overflow-wrap:anywhere}
  .cv-columns{grid-template-columns:minmax(0,1fr);gap:8px}
  .cv-left{padding:5px 2px}
  p,li{font-size:clamp(15px,2.4vw,17px);line-height:1.42}
  .publication-sublist{margin-left:8px;padding-left:18px}
  .cube-hero-image{
    float:none;display:block;
    width:min(100%,340px);height:auto;max-height:230px;
    margin:0 auto 10px;
  }
  .cube-list li{font-size:clamp(15px,2.4vw,17px)}
  .contacts-section{height:auto;min-height:0;display:block}
  .contacts-map{
    display:block;flex:none;width:100%;max-width:100%;height:auto;
    min-height:0;max-height:none;object-fit:contain;
    margin:12px 0 0;
  }
  .content-scroll:has(.contacts-section){overflow:visible}
  .stats-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .stats-card{min-width:0;padding:10px}
  .stats-card strong{font-size:27px}
  .stats-grid.two-col{grid-template-columns:minmax(0,1fr);gap:8px}
  .stats-grid.two-col>div{min-width:0;max-width:100%}
  .stats-table{display:block;width:100%;max-width:100%;overflow-x:auto;white-space:nowrap}
  .stats-map-wrap,.stats-world-map{max-width:100%}
  .stats-bar-row{grid-template-columns:68px minmax(0,1fr) 34px;gap:5px}
  .content-scroll:has(.pdf-viewer-page){
    height:auto;min-height:0;
    overflow:visible;padding:4px 0 16px;
  }
  .pdf-viewer-page,.pdf-native-viewer{
    display:flex;flex-direction:column;
    height:auto;min-height:0;max-width:100%;overflow:visible;
  }
  .pdf-viewer-header,
  .pdf-native-about .pdf-viewer-header{
    display:flex;flex-direction:column;align-items:flex-start;
    gap:5px;padding:5px 1px 8px;
  }
  .pdf-viewer-header h1,
  .pdf-native-about .pdf-viewer-header h1{
    font-size:clamp(17px,4vw,22px);
    line-height:1.2;text-align:left;overflow-wrap:anywhere;
  }
  .pdf-viewer-links,
  .pdf-native-about .pdf-viewer-links{
    justify-content:flex-start;white-space:normal;
    flex-wrap:wrap;max-width:100%;gap:10px;
  }
  .pdf-viewer-links a{overflow-wrap:anywhere}
  .pdf-mobile-open{display:inline}
  .pdf-native-frame{
    display:block;flex:0 0 auto;width:100%;max-width:100%;
    height:70dvh;min-height:410px;
    border:1px solid rgba(32,77,155,.28);
  }
  .pdf-page-image,.pdf-page-wrap{max-width:100%}
  #geosite-test-marker{
    left:6px!important;bottom:6px!important;
    max-width:calc(100vw - 12px)!important;
    padding:3px 6px!important;font-size:10px!important;
  }
}
@media screen and (max-width:360px){
  .shell{padding:6px 8px 14px}
  .site-emblem{height:53px}
  .portrait{width:60px;max-width:60px;max-height:78px;flex-basis:60px}
  .main-menu{gap:1px 3px}
  .main-menu button{font-size:13px;padding:6px 2px}
  .stats-cards{grid-template-columns:minmax(0,1fr)}
  .pdf-native-frame{min-height:340px}
}

/* GeoSite-Test v151: city-first six-column table with localized referrers. */
.stats-country-table-scroll{max-width:100%;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;margin:10px 0 14px}
.stats-country-table{display:table;width:100%;min-width:945px;table-layout:fixed;border-collapse:collapse}
.stats-country-table th,.stats-country-table td{vertical-align:top;white-space:normal;overflow-wrap:break-word}
.stats-country-table th:nth-child(-n+2),.stats-country-table td:nth-child(-n+2){text-align:left}
.stats-country-table th:nth-child(n+3):nth-child(-n+5),.stats-country-table td:nth-child(n+3):nth-child(-n+5){text-align:right}
.stats-country-table th:nth-child(6),.stats-country-table td:nth-child(6){text-align:left}
.stats-country-table td.stats-source-cell{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.stats-country-table .stats-total-row th,.stats-country-table .stats-total-row td{font-weight:700;border-top:2px solid rgba(32,77,155,.40);color:var(--blue2);padding-top:10px}
.stats-country-table .stats-total-row small{display:block;font-size:12px;font-weight:normal;color:var(--blue2);margin-top:4px}
@media(max-width:700px){
 .stats-country-table-scroll .stats-country-table{display:table;width:100%;min-width:945px;overflow:visible}
 .stats-country-table th,.stats-country-table td{padding:7px 8px;font-size:14px}
}

/* GeoSite-Test v152: image flags and current-interface-language names. */
.language-menu{min-width:220px}
.language-menu button{display:flex;align-items:center;gap:8px;min-height:46px;white-space:nowrap}
.language-flag{display:block;width:42px;height:28px;flex:0 0 42px;object-fit:fill;border:1px solid rgba(38,53,76,.20);border-radius:2px;box-sizing:border-box}
.language-choice-code{display:inline-block;min-width:24px;flex:0 0 24px;font-weight:700;letter-spacing:.02em}
.language-choice-name{display:inline-block;flex:1 1 auto}

/* GeoSite-Test v154 — seismic-background-matched language dropdown. */
:root{--geosite-menu-gray:rgba(233,232,230,.96);--geosite-menu-edge:rgba(113,117,124,.40)}
.language-menu{background:var(--geosite-menu-gray);border-color:var(--geosite-menu-edge);box-shadow:0 5px 15px rgba(42,47,55,.13)}
.language-menu button{border-bottom-color:rgba(120,124,132,.20)}
.language-menu button:hover,.language-menu button:focus-visible{background:rgba(214,213,211,.88)}
.language-menu button:last-child{border-bottom:0}
.language-choice-code{font-size:14px;font-weight:400;letter-spacing:0}


/* GeoSite-Test v155: full Pushkin monument photograph, 1.5x former sidebar portrait.
   Wide desktops: old image was 200px wide, new photo is 300px wide without crop.
   Shared --left keeps the sidebar and header-offset aligned; narrower screens scale gracefully.
   The sidebar retains independent scrolling so all menu items remain accessible. */
@media screen and (min-width:981px){
  :root{--left:clamp(250px,23vw,310px)}
  .sidebar .portrait{
    width:min(300px,100%);
    height:auto;
    max-width:100%;
    max-height:390px;
    object-fit:contain;
    object-position:center;
    flex:0 0 auto;
    margin-inline:auto;
  }
}
@media screen and (min-width:981px) and (max-height:760px){
  .sidebar .portrait{max-height:315px}
}
@media screen and (min-width:981px) and (max-height:640px){
  .sidebar .portrait{max-height:248px}
}
@media screen and (min-width:601px) and (max-width:980px){
  .sidebar .portrait{width:111px;max-width:111px;max-height:147px;flex:0 0 111px;object-fit:contain}
}
@media screen and (max-width:600px){
  .sidebar .portrait{width:90px;max-width:90px;max-height:117px;flex:0 0 90px;object-fit:contain}
}

/* GeoSite-Test v156 — align left-side image to the first menu letter,
   and right-hand content to the site's emblem. Desktop only. */
@media screen and (min-width:981px){
  /* Main-menu buttons already have 10px internal left padding. */
  .sidebar .portrait{
    width:min(300px,calc(100% - 10px));
    align-self:flex-start;
    margin-left:10px;
    margin-right:0;
  }
  /* Remove the nested 24px + 10px indent, while keeping original
     padding for the specialized PDF viewer where it is needed. */
  .content-scroll{padding-left:0;}
  .section-placeholder{padding-left:0;}
}

/* GeoSite-Test v157: align the VISIBLE photograph edge to menu letters.
   v156 moved the image element but max-height + object-fit:contain letterboxed
   it inside an oversized 300px-wide CSS box on short desktop windows.
   Change the actual CSS width in proportion to the height limit instead.
   Sidebar and menu letter x = sidebar.left + button.padding-left (10px).
   No changes to mobile layout or page content. */
@media screen and (min-width:981px){
  .sidebar .portrait{
    align-self:flex-start;
    margin-left:10px;
    margin-right:0;
    width:min(300px,calc(100% - 10px));
    height:auto;
    max-height:none;
    object-fit:contain;
  }
}
@media screen and (min-width:981px) and (max-height:760px){
  .sidebar .portrait{
    width:min(257px,calc(100% - 10px));
    max-height:none;
  }
}
@media screen and (min-width:981px) and (max-height:640px){
  .sidebar .portrait{
    width:min(202px,calc(100% - 10px));
    max-height:none;
  }
}

/* GeoSite-Test v158: compact five-column geography, inline device totals. */
.stats-country-table{min-width:600px}
.stats-country-table th:nth-child(5),.stats-country-table td:nth-child(5){text-align:right}
.stats-device-line{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;margin-top:8px}
.stats-device-line h2{margin:10px 0}
.stats-device-items{display:flex;align-items:center;flex-wrap:wrap;column-gap:22px;row-gap:6px;font-size:16px}
.stats-device-item{white-space:nowrap}
@media(max-width:650px){.stats-country-table{min-width:530px}.stats-device-line{gap:4px 12px}}

/* GeoSite-Test v160: six columns restored; clear, wrapping referrals and a note under the table. */
.stats-country-table{min-width:950px}
.stats-country-table th:nth-child(3),.stats-country-table td:nth-child(3),
.stats-country-table th:nth-child(4),.stats-country-table td:nth-child(4),
.stats-country-table th:nth-child(5),.stats-country-table td:nth-child(5){text-align:right}
.stats-country-table th:nth-child(6),.stats-country-table td:nth-child(6){text-align:left}
.stats-country-table .stats-source-cell{white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.5}
.stats-table-note{margin:6px 0 20px;padding:9px 0 0}
@media(max-width:650px){.stats-country-table{min-width:950px}}


/* GeoSite-Test v161: keep all six column headings on one line.
   v160's 10% numeric columns were too narrow for RU headings.
   Only the table and its thead are affected; referral cells may still wrap. */
.stats-country-table{min-width:1120px}
.stats-country-table col:nth-child(1){width:16%!important}
.stats-country-table col:nth-child(2){width:14%!important}
.stats-country-table col:nth-child(3){width:15%!important}
.stats-country-table col:nth-child(4){width:17%!important}
.stats-country-table col:nth-child(5){width:12%!important}
.stats-country-table col:nth-child(6){width:26%!important}
.stats-country-table thead th{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}

/* GeoSite-Test v162: make referrals visible inside the page rather than beyond its right edge.
   Distribute the six table columns to fit desktop content width; wrap only referrals.
   Small screens retain their existing horizontal scrolling. */
@media (min-width:1101px){
  .stats-country-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important}
  .stats-country-table col:nth-child(1){width:17%!important}
  .stats-country-table col:nth-child(2){width:15%!important}
  .stats-country-table col:nth-child(3){width:11%!important}
  .stats-country-table col:nth-child(4){width:13%!important}
  .stats-country-table col:nth-child(5){width:11%!important}
  .stats-country-table col:nth-child(6){width:33%!important}
}
@media (max-width:1100px){
  .stats-country-table{min-width:1050px!important}
}
.stats-country-table th{white-space:nowrap;overflow-wrap:normal;word-break:normal}
.stats-country-table td.stats-source-cell{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}


/* GeoSite-Test v163: compact, page-matched controls for all embedded PDF views.
   Keep PDF document titles inside the PDFs (and iframe title); no repeated heading above PDF.
   Existing link font sizes, PDF file links, keyboard navigation and PDF content are unchanged. */
.pdf-viewer-page.pdf-native-viewer{background:transparent}
.pdf-native-viewer .pdf-viewer-header,
.pdf-native-about .pdf-viewer-header{
  display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;
  justify-content:space-between;column-gap:14px;row-gap:2px;
  min-height:0;margin:0;padding:0 1px 4px;
  background:transparent;border:0;box-shadow:none;
}
.pdf-native-viewer .pdf-viewer-links,
.pdf-native-about .pdf-viewer-links{
  display:flex;flex-direction:row;align-items:center;
  justify-content:flex-end;flex-wrap:wrap;
  column-gap:12px;row-gap:2px;
  margin:0;padding:0;background:transparent;
}
.pdf-native-viewer .pdf-back-button{padding:0;margin:0;line-height:1.15}
.pdf-native-viewer .pdf-viewer-links a{line-height:1.15}
.content-scroll:has(.pdf-viewer-page){padding-top:2px;padding-bottom:4px}
@media(max-width:980px){
 .pdf-native-viewer .pdf-viewer-header,
 .pdf-native-about .pdf-viewer-header{justify-content:flex-start;row-gap:3px}
 .pdf-native-viewer .pdf-viewer-links,
 .pdf-native-about .pdf-viewer-links{justify-content:flex-start;row-gap:3px}
}


/* GeoSite-Test v164: the narrow SITE toolbar above every embedded PDF is as
   short as the unchanged links allow (original font sizes preserved).
   The page wallpaper shows through all toolbar ancestors. This cannot restyle
   the browser's separate, built-in PDF toolbar INSIDE a third-party PDF iframe. */
.content-panel:has(.pdf-viewer-page),
.content-scroll:has(.pdf-viewer-page),
.pdf-viewer-page.pdf-native-viewer,
.pdf-native-viewer .pdf-viewer-header,
.pdf-native-about .pdf-viewer-header,
.pdf-native-viewer .pdf-viewer-links,
.pdf-native-about .pdf-viewer-links {
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
.pdf-native-viewer .pdf-viewer-header,
.pdf-native-about .pdf-viewer-header {
  padding:0!important;
  margin:0!important;
  min-height:0!important;
  height:auto!important;
  row-gap:0!important;
  line-height:1!important;
}
.pdf-native-viewer .pdf-viewer-links,
.pdf-native-about .pdf-viewer-links {
  padding:0!important;
  margin:0!important;
  row-gap:0!important;
  line-height:1!important;
}
.pdf-native-viewer .pdf-back-button {
  padding:0!important;
  margin:0!important;
  line-height:1!important;
}
.pdf-native-viewer .pdf-viewer-links a {
  padding:0!important;
  margin:0!important;
  line-height:1!important;
}
.content-scroll:has(.pdf-viewer-page){padding-top:0!important;}


/* GeoSite-Test v165: Transparent language controls; the outline is retained.
   The native Chromium PDF toolbar itself is suppressed by #toolbar=0 in index.html. */
.language-button, .language-button:hover,
.language-button:focus, .language-button:active {
  background:transparent!important;
  background-image:none!important;
  border:1px solid var(--geosite-menu-edge,rgba(113,117,124,.55))!important;
  border-radius:5px!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.language-menu {
  background:transparent!important;
  background-image:none!important;
  border:1px solid var(--geosite-menu-edge,rgba(113,117,124,.55))!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.language-menu button, .language-menu button:hover,
.language-menu button:focus-visible {
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
.language-menu button:hover, .language-menu button:focus-visible {
  outline:1px solid var(--geosite-menu-edge,rgba(113,117,124,.55));
  outline-offset:-1px;
}


/* GeoSite v167/v145: restore the original warm-grey background of the
   OPEN language dropdown only. Search box and closed language control remain
   transparent with their existing frames (per user request). */
.language-menu {
  background:var(--geosite-menu-gray,rgba(233,232,230,.96))!important;
  background-image:none!important;
  box-shadow:0 5px 15px rgba(42,47,55,.13)!important;
}
.language-menu button:hover,
.language-menu button:focus-visible {
  background:rgba(214,213,211,.88)!important;
  background-image:none!important;
}


/* GeoSite-Test v170: always-visible language menu replaces the old label.
   The globe sits on the left, vertically centered between two language rows.
   Preserve the established warm-gray menu and the transparent site search. */
.language-wrap {
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  max-width:100%;
}
.language-wrap .language-globe-static {
  display:flex!important;
  flex:0 0 48px!important;
  width:48px!important;
  min-width:48px!important;
  align-self:center!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  height:56px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  cursor:default!important;
  pointer-events:none;
}
.language-wrap .language-globe-static .language-symbol{
  display:block!important;
  width:46px!important;
  height:46px!important;
  flex:0 0 46px!important;
}
.language-wrap .language-menu {
  position:static!important;
  display:flex!important;
  flex:0 1 auto!important;
  flex-direction:column!important;
  min-width:218px!important;
  max-width:240px!important;
  top:auto!important;
  right:auto!important;
  border-radius:7px!important;
  overflow:hidden!important;
  margin:0!important;
  background:var(--geosite-menu-gray,rgba(233,232,230,.96))!important;
}
.language-wrap .language-menu button {
  display:flex!important;
  min-height:41px!important;
  padding:5px 10px!important;
  gap:7px!important;
  white-space:nowrap;
}
@media screen and (max-width:980px){
  .language-wrap .language-globe-static{flex-basis:38px!important;width:38px!important;min-width:38px!important;height:46px!important}
  .language-wrap .language-globe-static .language-symbol{width:36px!important;height:36px!important;flex-basis:36px!important}
  .language-wrap .language-menu{min-width:196px!important;max-width:210px!important}
  .language-wrap .language-menu button{min-height:39px!important;padding:4px 7px!important;gap:5px!important;font-size:15px!important}
  .language-wrap .language-flag{width:36px!important;height:25px!important;flex-basis:36px!important}
}
@media screen and (max-width:400px){
  .language-wrap .language-menu{min-width:186px!important;max-width:186px!important}
  .language-wrap .language-menu button{font-size:14px!important}
}

/* GeoSite-Test v171: compact, always-visible language choice.
   The menu is only as long as its widest localized language name
   (Russian: "Английский"), with two rows together no taller than the globe.
   Hide unused flags/codes from menu labels; keep the separate globe on left. */
.language-wrap{gap:4px!important}
.language-wrap .language-globe-static{
  flex:0 0 46px!important;
  width:46px!important;
  min-width:46px!important;
  height:46px!important;
}
.language-wrap .language-globe-static .language-symbol{
  width:46px!important;
  height:46px!important;
  flex:0 0 46px!important;
}
.language-wrap .language-menu{
  flex:0 0 auto!important;
  width:max-content!important;
  min-width:0!important;
  max-width:none!important;
  height:46px!important;
  min-height:46px!important;
  border-radius:5px!important;
  padding:0!important;
}
.language-wrap .language-menu button{
  flex:1 1 50%!important;
  width:100%!important;
  min-height:0!important;
  height:22px!important;
  padding:0 6px!important;
  gap:0!important;
  font-size:16px!important;
  line-height:20px!important;
  font-family:Arial,sans-serif!important;
  white-space:nowrap!important;
  text-align:left!important;
  align-items:center!important;
}
@media screen and (max-width:980px){
 .language-wrap{gap:3px!important}
 .language-wrap .language-globe-static{
   flex:0 0 36px!important;
   width:36px!important;
   min-width:36px!important;
   height:40px!important;
 }
 .language-wrap .language-globe-static .language-symbol{
   width:36px!important;
   height:36px!important;
   flex:0 0 36px!important;
 }
 .language-wrap .language-menu{
   width:max-content!important;
   min-width:0!important;
   max-width:none!important;
   height:40px!important;
   min-height:40px!important;
 }
 .language-wrap .language-menu button{
   min-height:0!important;
   height:19px!important;
   padding:0 5px!important;
   font-size:15px!important;
   line-height:17px!important;
 }
}


/* GeoSite-Test v172: an outlined, unfilled language selector.
   The globe and the 2 localized direct-selection rows remain unchanged. */
.language-wrap .language-menu {
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.language-wrap .language-menu button,
.language-wrap .language-menu button:hover,
.language-wrap .language-menu button:focus-visible {
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}

/* GeoSite-Test v173: ultrawide 21:9 / super-ultrawide monitor layout.
   Occupy the LEFT half of viewport width and the FULL viewport height.
   Keep standard 16:9 desktops, tablets, and phones unchanged. */
@media screen and (min-width:1800px) and (min-aspect-ratio:21/10) {
  :root { --left:clamp(210px,11vw,265px); }
  .shell {
    width:50vw;
    height:100vh;
    height:100dvh;
    min-height:0;
    margin-left:0;
    margin-right:auto;
    padding:0 16px 16px;
  }
  .workspace{min-height:0;}
}

/* GeoSite-Test v174: align the first (top) row with the publications text
   only on very wide 21:9 displays. The working area remains LEFT aligned
   at 50vw x 100dvh, with no impact on 16:9 or mobile layouts. */
@media screen and (min-width:2301px) and (min-aspect-ratio:21/10) {
  .topbar .topbar-main {
    width:100%;
    max-width:1000px;
    justify-self:start;
  }
}

/* Round the photograph corners without changing the image or its crop. */
.sidebar .portrait {
  border-radius:14px;
  clip-path:inset(0 round 14px);
}

/* GeoSite-Test v175: full-height proportional UI on ultrawide television screens.
   The unscaled Publications page ends around y=750px in the 21:9 layout.
   Scale every site element together to fill screen height, without imposing
   the old 50%-of-screen *visual* width restriction. Width may grow to 100%.
   Clamp to 2x to avoid overshooting the screen width; shorter windows use 1x.
   CSS division (100dvh / 750px) yields a unitless zoom factor in Chromium.
   The shell's logical height is divided by the same factor, so its visual
   bottom remains at 100dvh and longer pages keep their own scrollbars. */
@media screen and (min-width:1800px) and (min-aspect-ratio:21/10) {
  .shell {
    zoom: clamp(1, calc(100dvh / 750px), 2);
    height: calc(100dvh / clamp(1, calc(100dvh / 750px), 2));
  }
}

/* GeoSite-Test v176: adaptation driven by actual page content.
   Preserve the classic layout on 16:9/mobile. For ultrawide screens,
   adaptive-layout.js measures text and imagery in the selected language,
   then sets the CSS zoom based on BOTH available height and width.
   The old 750px reference is deliberately overridden. */
@media screen and (min-width:1800px) and (min-aspect-ratio:21/10) {
  .shell {
    zoom:1;
    height:100vh;
    height:100dvh;
    min-height:0;
  }
}


/* GeoSite-Test v177: restore flag icons and RU/EN/ZH codes beside each
   language name. Previous v171 removed these controls unintentionally.
   Keep the existing two-line compact selector, clear background and border.
   The labels remain language-dependent; do not change language switching. */
.language-wrap .language-menu button {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:4px!important;
  padding:0 5px!important;
  box-sizing:border-box!important;
  white-space:nowrap!important;
}
.language-wrap .language-menu .language-flag {
  display:block!important;
  width:29px!important;
  min-width:29px!important;
  height:19px!important;
  flex:0 0 29px!important;
  object-fit:contain!important;
  box-sizing:border-box!important;
}
.language-wrap .language-menu .language-choice-code {
  display:inline-block!important;
  min-width:19px!important;
  flex:0 0 19px!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:0!important;
}
.language-wrap .language-menu .language-choice-name {
  display:inline-block!important;
  flex:0 0 auto!important;
  font-size:15px!important;
  white-space:nowrap!important;
}
@media screen and (max-width:600px) {
  .language-wrap .language-menu button { gap:3px!important; padding:0 4px!important; }
  .language-wrap .language-menu .language-flag {
    width:24px!important;min-width:24px!important;height:16px!important;flex-basis:24px!important;
  }
  .language-wrap .language-menu .language-choice-code {
    min-width:17px!important;flex-basis:17px!important;font-size:10px!important;
  }
  .language-wrap .language-menu .language-choice-name { font-size:13px!important; }
}

/* GeoSite-Test v178: keep the top toolbar as wide as the actual publication
   content column at ALL desktop viewport widths, including television
   browser zoom levels that fall below 2301 CSS pixels.
   The content scroll area has 24px right padding and publication content
   itself is capped at 1000px; matching both avoids the long empty header.
   Mobile toolbar retains its existing layout; medium-width two-row
   toolbar keeps its arrangement and gets the same right edge alignment. */
@media screen and (min-width:981px) {
  .topbar .topbar-main {
    width:calc(100% - 24px);
    max-width:1000px;
    justify-self:start;
  }
}
/* GeoSite-Test: publication titles opening internal PDFs use the standard
   hyperlink blue (#2c65ae), as do external links, in RU/EN/ZH. */
#content .section-placeholder a.internal-publication-link,
#content .section-placeholder a.internal-publication-link:link,
#content .section-placeholder a.internal-publication-link:visited,
#content .section-placeholder a.internal-publication-link:hover,
#content .section-placeholder a.internal-publication-link:focus-visible {
  color: #2c65ae !important;
  text-decoration: underline;
}


/* GeoSite-Test v185: a single PDF toolbar line after opening a search result. */
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return){
  display:flex!important;align-items:center!important;flex-wrap:nowrap!important;
  justify-content:space-between!important;gap:8px!important;
  min-height:0!important;padding:4px 6px 8px!important;
}
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return)>.pdf-back-button{
  display:none!important;
}
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return)>.search-return{
  flex:0 1 auto!important;min-width:0!important;margin:0!important;padding:0!important;
}
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return)>.search-return button{
  padding:0!important;margin:0!important;white-space:nowrap!important;
}
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return)>.pdf-viewer-links{
  display:flex!important;flex:0 1 auto!important;align-items:center!important;
  justify-content:flex-end!important;flex-wrap:nowrap!important;
  gap:12px!important;min-width:0!important;margin-left:auto!important;
}
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return)>.pdf-viewer-links a{
  white-space:nowrap!important;overflow-wrap:normal!important;
}
#content .pdf-native-viewer .pdf-viewer-header:has(.search-return)>.pdf-highlight-status{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;
  margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;
  white-space:nowrap!important;border:0!important;
}

/* Visited during last three days: blue; first-seen red style below has priority. */
.stats-recent-place{color:#0866cc!important;font-weight:400}
.stats-recent-place-explanation{color:#0866cc;font-weight:inherit}
.stats-city-label.stats-city-recent{color:#0866cc!important;font-weight:700}
.stats-city-label.stats-city-recent:before{background:#62cff5;border-color:#087eb8}

/* Newly first-seen city/country, visible for seven days. */
.stats-new-place{color:#bf1424!important;font-weight:400}
.stats-new-place-explanation{color:#bf1424;font-weight:inherit}
.stats-city-label.stats-city-new{color:#bf1424!important;font-weight:700}
.stats-city-label.stats-city-new:before{background:#d8212e;border-color:#a30e1a}

/* GeoSite-Test: Times New Roman compact labels, normal abbreviations, vertically centred with each flag. */
.language-wrap .language-menu button { align-items:center!important; font-family:"Times New Roman",Times,serif!important; }
.language-wrap .language-menu .language-choice-code { font-family:"Times New Roman",Times,serif!important; font-weight:400!important; font-size:12px!important; line-height:19px!important; align-self:center!important; }
.language-wrap .language-menu .language-choice-name { font-family:"Times New Roman",Times,serif!important; font-weight:400!important; font-size:10px!important; line-height:19px!important; align-self:center!important; }
@media screen and (max-width:600px) {
  .language-wrap .language-menu .language-choice-code { font-size:10px!important; line-height:16px!important; }
  .language-wrap .language-menu .language-choice-name { font-size:9px!important; line-height:16px!important; }
}

/* GeoSite-Test: sticky six-column statistics table header in its own vertically scrollable panel. */
.stats-country-table-scroll {
  max-height: min(68vh, 680px)!important;
  overflow-y:auto!important;
  overflow-x:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.stats-country-table { border-collapse:separate!important; border-spacing:0!important; }
.stats-country-table thead th {
  position:sticky!important;
  top:0!important;
  z-index:5!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

.stats-country-table thead,
.stats-country-table thead tr,
.stats-country-table-scroll {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

/* Opaque sticky labels prevent scrolled rows showing through. No decorative frame. */
.stats-country-table thead th {
  background:#f2f5f8!important;
  background-clip:padding-box!important;
  border:0!important;
  box-shadow:none!important;
}
.stats-country-table thead tr { background:#f2f5f8!important; }

/* Header colour sampled from page backdrop: neutral warm grey, opaque to prevent overlap. */
.stats-country-table thead th,
.stats-country-table thead tr {
  background:#eae9e7!important;
  border:0!important;
  box-shadow:none!important;
}

/* GeoSite trace-tone header outline — one subtle perimeter, no internal grid. */
.stats-country-table thead th {
  border-top:1px solid #b8b8b5!important;
  border-bottom:1px solid #b8b8b5!important;
  border-left:0!important;
  border-right:0!important;
  box-shadow:none!important;
}
.stats-country-table thead th:first-child { border-left:1px solid #b8b8b5!important; }
.stats-country-table thead th:last-child { border-right:1px solid #b8b8b5!important; }

/* GeoSite work-screen perimeter matching table header border. */
.content-panel { border:0!important; box-shadow:none!important; }

/* Full viewport perimeter, including topbar and sidebar. */
.shell { border:0!important; box-sizing:border-box!important; }

/* Clearly visible viewport border, inset from browser clipping edge. */
body::after { content:""; position:fixed; inset:0; border:4.33px solid #b8b8b5; pointer-events:none; z-index:2147483000; box-sizing:border-box; }

/* GeoSite Test: three publication categories and inner pages */
.pub-category-list{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;max-width:900px;margin-top:22px}
.pub-category-link{font:inherit;text-align:left;cursor:pointer;width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;border:1px solid rgba(35,75,116,.20);border-radius:9px;color:var(--blue);background:transparent;transition:background .15s,border-color .15s}
.pub-category-link:hover,.pub-category-link:focus-visible{background:rgba(44,94,154,.055);border-color:rgba(35,75,116,.47)}
.pub-category-heading{font-size:clamp(19px,2.25vw,25px);line-height:1.4}.pub-category-arrow{font-size:28px;font-weight:300;flex:none}
.pub-return{font:inherit;color:var(--blue);border:0;background:transparent;cursor:pointer;padding:4px 0 16px;font-size:17px}.pub-return:hover{text-decoration:underline}.pub-category-page h1{margin-top:4px}.pub-category-entries{margin-top:16px}.pub-category-entries>li{margin-bottom:12px;line-height:1.4}
@media(max-width:700px){.pub-category-link{padding:12px 14px}.pub-category-heading{font-size:19px}}

/* GeoSite-Test: archive illustration on Publications landing */
.pub-landing-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,34%);align-items:start;gap:clamp(18px,3vw,46px);max-width:1150px}
.pub-landing-layout .pub-category-list{margin-top:16px;max-width:none}
.pub-archive-illustration{width:100%;height:auto;max-height:min(72vh,730px);object-fit:contain;object-position:center top;display:block;background:transparent}
@media(max-width:700px){.pub-landing-layout{grid-template-columns:minmax(0,1fr)}.pub-archive-illustration{max-width:230px;max-height:310px;margin:10px auto 0}}

/* Compact Publications landing */
.pub-landing-layout{align-items:center;gap:clamp(12px,2vw,28px);max-width:1150px}
.pub-landing-layout .pub-category-list{gap:6px;margin-top:0;align-self:center}
.pub-landing-layout .pub-category-link{padding:5px 15px;min-height:0;border-radius:7px}
.pub-landing-layout .pub-category-heading{font-size:clamp(17px,1.75vw,21px);line-height:1.18}
.pub-landing-layout .pub-category-arrow{font-size:23px;line-height:1}
.pub-archive-illustration{max-height:min(56vh,500px);object-position:center center;align-self:center}
@media(max-width:700px){.pub-landing-layout{align-items:start}.pub-landing-layout .pub-category-link{padding:8px 12px}.pub-archive-illustration{max-height:220px;margin:0 auto}}

/* Horizontal publication correction after user screenshot */
.pub-landing-layout{grid-template-columns:minmax(0,1fr) minmax(200px,40%);align-items:start;column-gap:16px;max-width:1150px}
.pub-landing-layout .pub-category-list{width:calc(100% - 90px);max-width:none;gap:12px;margin-top:18px;align-self:start}
.pub-landing-layout .pub-category-link{padding:16px 22px;min-height:0;border-radius:9px}
.pub-landing-layout .pub-category-heading{font-size:clamp(19px,2.25vw,25px);line-height:1.4}
.pub-landing-layout .pub-category-arrow{font-size:28px;line-height:1.2}
.pub-archive-illustration{margin-top:-32px;max-height:min(64vh,570px);object-position:center top;align-self:start}
@media(max-width:700px){.pub-landing-layout{grid-template-columns:minmax(0,1fr)}.pub-landing-layout .pub-category-list{width:100%;margin-top:12px}.pub-landing-layout .pub-category-link{padding:12px 14px}.pub-archive-illustration{margin:0 auto;max-height:240px}}

/* Publication cover: move closer and up, fit desktop height */
@media(min-width:901px){
.pub-landing-layout{grid-template-columns:minmax(0,1fr) minmax(180px,33%);column-gap:0;max-width:1100px;align-items:start}
.pub-landing-layout .pub-category-list{width:calc(100% - 42px);margin-top:14px}
.pub-archive-illustration{position:relative;left:-50px;top:-94px;margin:0 0 -94px;max-height:min(49vh,430px);width:calc(100% + 44px);object-fit:contain;object-position:center top;align-self:start}
}
@media(min-width:901px) and (max-height:850px){.pub-archive-illustration{top:-110px;margin-bottom:-110px;max-height:43vh}.pub-landing-layout .pub-category-link{padding:12px 20px}.pub-landing-layout .pub-category-list{gap:10px;margin-top:8px}}

/* Publications screenshot correction: narrower horizontal frames, image lower and beneath Search */
@media(min-width:901px){
.pub-landing-layout{grid-template-columns:minmax(0,1fr) 34%;column-gap:0;max-width:1040px;align-items:start}
.pub-landing-layout .pub-category-list{width:calc(100% - 150px);gap:12px;margin-top:18px}
.pub-landing-layout .pub-category-link{padding:16px 20px}
.pub-archive-illustration{position:relative;left:-145px;top:35px;margin:0 0 0 -0px;width:calc(100% + 88px);max-height:min(57vh,485px);object-position:center top;align-self:start}
}
@media(min-width:901px) and (max-height:850px){.pub-archive-illustration{top:26px;margin-bottom:0;max-height:48vh}.pub-landing-layout .pub-category-link{padding:12px 18px}}

/* Align publications book with three categories and below Search, leave category frames unchanged */
@media(min-width:901px){.pub-archive-illustration{left:-225px;top:-30px;margin:0;width:calc(100% + 88px);max-height:min(57vh,485px);object-position:center top}}
@media(min-width:901px) and (max-height:850px){.pub-archive-illustration{left:-225px;top:-30px;max-height:48vh}}

/* Center publication book in free space between categories and screen right edge */
@media(min-width:901px){.pub-archive-illustration{left:-55px;top:-30px}}
@media(min-width:901px) and (max-height:850px){.pub-archive-illustration{left:-55px;top:-30px}}

/* Move archive cover left by about 2.5 background waves, retain height and box dimensions */
@media(min-width:901px){.pub-archive-illustration{left:-155px;top:-30px}}
@media(min-width:901px) and (max-height:850px){.pub-archive-illustration{left:-155px;top:-30px}}

/* GeoSite Test responsive book cover fix: display below publication categories on phone and tablet */
@media(max-width:900px){
.pub-landing-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;max-width:100%;align-items:start}
.pub-landing-layout .pub-category-list{width:100%;min-width:0;max-width:100%;margin-top:12px;gap:10px;align-self:start}
.pub-landing-layout .pub-category-link{width:100%;padding:12px 14px}
.pub-archive-illustration{display:block;visibility:visible;opacity:1;position:static;left:auto;top:auto;width:min(60%,260px);max-width:260px;max-height:300px;height:auto;margin:4px auto 12px;object-fit:contain;object-position:center;align-self:center;transform:none;float:none}
}
@media(max-width:480px){.pub-archive-illustration{width:min(58%,210px);max-height:235px;margin:0 auto 12px}.pub-landing-layout .pub-category-heading{font-size:18px}}

/* Mobile Publications: small book between page title and first category, right side */
@media(max-width:700px){
.section-placeholder:has(> .pub-landing-layout){position:relative;min-height:0}
.section-placeholder:has(> .pub-landing-layout)>h1{position:relative;z-index:1;padding-right:0;max-width:65%;margin-bottom:0}
.pub-landing-layout{display:block;position:relative;margin:0;padding:0;min-height:0}
.pub-landing-layout .pub-category-list{display:grid;grid-template-columns:minmax(0,1fr);width:100%;margin-top:118px;gap:10px}
.pub-landing-layout .pub-archive-illustration{display:block;position:absolute;z-index:0;top:-36px;right:4px;left:auto;bottom:auto;width:auto;max-width:min(31vw,112px);height:115px;max-height:115px;margin:0;object-fit:contain;object-position:center;transform:none;float:none}
}
@media(min-width:701px) and (max-width:900px){.pub-landing-layout .pub-archive-illustration{max-width:220px;max-height:260px;margin:0 auto 10px}}

/* Mobile book centered at Publications title; regular spacing before Monographs */
@media(max-width:700px){
.section-placeholder:has(> .pub-landing-layout)>h1{margin-bottom:10px}
.pub-landing-layout .pub-category-list{margin-top:10px;gap:10px}
.pub-landing-layout .pub-archive-illustration{top:-109px;right:4px;height:100px;max-height:100px;max-width:min(29vw,100px)}
}

/* GeoSite-Test v200: right-align the small Publications book beside the mobile menu, keeping its top aligned with Biography. */
@media(max-width:700px){.pub-landing-layout .pub-archive-illustration{right:4px;left:auto;top:-109px}}

/* GeoSite-Test v198: Sticky combined heading and transparent Back button. */
#content > .pub-category-page > .category-sticky-header {
  position: -webkit-sticky;
  position: sticky;
  top: -6px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  box-sizing: border-box;
  width: calc(100% + 20px);
  max-width: none;
  margin: -6px -10px 0;
  padding: 6px 10px 6px;
  background: #f3f3f3 url("background.png") center center / cover fixed no-repeat;
}
#content > .pub-category-page > .category-sticky-header > h1 {
  font: 400 25px/1.1 Georgia, "Times New Roman", serif;
  color: var(--blue2);
  margin: 0;
  padding: 0;
  max-width: 100%;
}
#content > .pub-category-page > .category-sticky-header > .pub-return {
  position: static;
  display: block;
  font-size: 17px;
  line-height: 1.12;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  max-width: 100%;
}
@media (max-width:700px) {
  #content > .pub-category-page > .category-sticky-header {
    top: -3px;
    width: calc(100% + 2px);
    margin: -3px -1px 0;
    padding: 3px 1px 6px;
  }
  #content > .pub-category-page > .category-sticky-header > h1 {
    font-size: 20px;
  }
  #content > .pub-category-page > .category-sticky-header > .pub-return {
    font-size: 16px;
  }
}

/* GeoSite-Test v199: A separate inner scrollbar keeps the category heading and Back stationary. */
/* The page content container never scrolls when a category is open. */
#content:has(> .pub-category-page) {
  overflow: hidden;
}
#content > .pub-category-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
/* Fixed row in normal flow, not sticky or floating over a list. */
#content > .pub-category-page > .category-sticky-header {
  position: static;
  top: auto;
  flex: 0 0 auto;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 4px;
  background: transparent;
  background-image: none;
}
/* Only articles can scroll, with clipping strictly below the header. */
#content > .pub-category-page > .pub-category-entries,
#content > .pub-category-page > .cv-right {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  margin: 0;
  padding: 6px 12px 18px 20px;
}
#content > .biography-category-page > .cv-right {
  padding-left: 0;
}
@media (max-width:980px) {
  #content:has(> .pub-category-page) {
    height: min(70dvh,740px);
    min-height: 270px;
    overflow: hidden;
  }
  #content > .pub-category-page { height: 100%; }
  #content > .pub-category-page > .category-sticky-header {
    position: static;
    top: auto;
    margin: 0;
    padding: 0 0 3px;
  }
  #content > .pub-category-page > .pub-category-entries,
  #content > .pub-category-page > .cv-right {
    padding-right: 8px;
  }
}

/* GeoSite-Test v201: align the actual left edge of the Publications book with CubeTechnology's image on phones. */
/* Both visual boxes now have the same width, and the narrow book sits at the left of its box. */
/* CubeTechnology image, menus, and images at tablet/desktop widths are not changed. */
@media screen and (max-width:700px) {
  .pub-landing-layout > img.pub-archive-illustration:not(.cube-landing-illustration) {
    left: auto;
    right: 4px;
    width: min(29vw, 100px);
    object-fit: contain;
    object-position: left center;
  }
}

/* GeoSite2 v222: compact left menu, no reduction of the portrait. */
@media screen and (min-width:981px){.main-menu{margin-top:8px;gap:2px}.main-menu button{padding-top:3px;padding-bottom:3px}}

/* GeoSite2 v223: fit all six main-menu items without shrinking the portrait. */
@media screen and (min-width:981px){
  .sidebar .main-menu { margin-top:0; gap:0; }
  .sidebar .main-menu button { padding-top:0; padding-bottom:0; line-height:1; }
  /* Very short windows remain scrollable without a visible left scrollbar. */
  .sidebar { scrollbar-width:none; -ms-overflow-style:none; }
  .sidebar::-webkit-scrollbar { width:0; height:0; display:none; }
}

/* GeoSite2 v225: distribute available vertical space between all menu items. */
@media screen and (min-width:981px){
  .sidebar .main-menu{
    display:flex;flex-direction:column;
    flex:1 1 auto;min-height:0;
    margin-top:6px;margin-bottom:8px;
    gap:0;justify-content:space-between;
  }
  .sidebar .main-menu button{
    flex:0 0 auto;
    padding:3px 10px;
    line-height:1.08;
  }
}

/* GeoSite2 v227: root menu pages do not show an unnecessary right scrollbar.
   Preserve wheel, touchpad and keyboard scrolling for long material. */
@media screen and (min-width:981px){
  .content-scroll.main-menu-view{
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:none;
    -ms-overflow-style:none;
    padding-bottom:8px;
  }
  .content-scroll.main-menu-view::-webkit-scrollbar{
    width:0;height:0;display:none;
  }
}


/* Test GeoSite: fixed coordinate dots, collision-aware city-name placement. */
.stats-map-wrap .stats-city-label.stats-city-label-anchored {
  width: 0;
  height: 0;
  max-width: none;
  transform: none;
  overflow: visible;
  pointer-events: none;
}
.stats-map-wrap .stats-city-label-anchored::before {
  left: -2px;
  right: auto;
  top: -2px;
  transform: none;
}
.stats-map-wrap .stats-city-label-anchored > .stats-city-name {
  position: absolute;
  display: block;
  left: 8px;
  top: 0;
  width: max-content;
  max-width: none;
  font: inherit;
  color: inherit;
  white-space: nowrap;
  transform: translateY(-50%);
  text-shadow: 0 1px 2px #fff, 1px 0 2px #fff, -1px 0 2px #fff;
}
.stats-map-wrap .stats-city-label-collapsed > .stats-city-name {
  visibility: hidden;
}
@media (max-width: 600px) {
  .stats-map-wrap .stats-city-label-anchored > .stats-city-name {
    font-size: 5.33px;
  }
}

/* GeoSite2 v254: geography table headings align with their data columns. */
.stats-country-table thead th:nth-child(1),
.stats-country-table thead th:nth-child(2),
.stats-country-table thead th:nth-child(6) {
  text-align:left!important;
}
.stats-country-table thead th:nth-child(3),
.stats-country-table thead th:nth-child(4),
.stats-country-table thead th:nth-child(5),
.stats-country-table tbody td:nth-child(3),
.stats-country-table tbody td:nth-child(4),
.stats-country-table tbody td:nth-child(5) {
  text-align:right!important;
}
.stats-country-table thead th,
.stats-country-table tbody td {
  box-sizing:border-box;
  padding-left:9px;
  padding-right:9px;
}
