/* Narrow-screen compatibility for the shared v239 header. Desktop card layout stays intact;
   quota and quote share one row without splitting their numeric values. */
@media(max-width:620px){
 body.shared-theme nav.app-nav>.nav-top-row,
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count){
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:auto auto auto;
  gap:5px;
 }
 body.shared-theme nav.app-nav .nav-info-group{display:contents}
 body.shared-theme nav.app-nav .nav-info-group>.logo{grid-column:1;grid-row:1;min-width:44px}
 body.shared-theme nav.app-nav .nav-actions-group{grid-column:1/-1;grid-row:1;margin-left:49px;min-width:0}
 body.shared-theme nav.app-nav .nav-actions-group>.nav-right{width:100%;min-width:0;gap:5px;justify-content:flex-end;flex-wrap:wrap}
 body.shared-theme nav.app-nav>.nav-top-row>.community-count,
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count)>.community-count{
  grid-column:1/-1;grid-row:2;width:100%;box-sizing:border-box;padding:1px 0;
 }
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-info-group>.mining-pool-badge,
 body.shared-theme nav.app-nav .nav-info-group>.mining-pool-badge{
  grid-column:1;grid-row:3;width:100%;min-width:0;max-width:none;
  height:auto;max-height:none;min-height:46px;overflow:visible;
  grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:4px;
  align-content:center;justify-content:start;white-space:normal;padding:6px 7px;
 }
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-info-group>.hash-market-widget,
 body.shared-theme nav.app-nav .nav-info-group>.hash-market-widget{
  grid-column:2;grid-row:3;width:100%;min-width:0;max-width:none;
  height:auto;max-height:none;min-height:46px;overflow:visible;
 }
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference]{
  grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;
  align-content:center;gap:4px;padding:6px 7px;
 }
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-copy{
  grid-column:1/-1;grid-row:1;min-width:0;width:100%;row-gap:1px;
 }
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-copy strong{
  font-size:clamp(10px,3.125vw,13px);line-height:1.2;letter-spacing:0;
  white-space:nowrap;overflow-wrap:normal;word-break:normal;
  overflow:visible;text-overflow:clip;max-width:100%;font-variant-numeric:tabular-nums;
 }
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-copy .hash-market-usd{
  grid-column:1/-1;white-space:normal;word-break:normal;overflow-wrap:normal;
  line-height:1.25;font-size:9px;overflow:visible;text-overflow:clip;
 }
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-network{
  display:none; /* X Layer remains in the full source description above. */
 }
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-test{
  grid-column:1;grid-row:2;justify-self:start;align-self:center;padding:0;border:0;background:transparent;font-size:9px;line-height:1.2;letter-spacing:0;
 }
 body.shared-theme nav.app-nav .mining-pool-metric small{font-size:9px;line-height:1.25;white-space:normal}
 body.shared-theme nav.app-nav .mining-pool-metric strong{font-size:clamp(10px,3.125vw,13px);line-height:1.2;white-space:nowrap;letter-spacing:0}
 body.shared-theme nav.app-nav .mining-pool-metric strong i{display:block;font-size:9px;line-height:1.25}
 body.shared-theme nav.app-nav .mining-pool-badge>em{grid-column:1;grid-row:2;justify-self:start;padding:0;border:0;background:transparent;font-size:9px;line-height:1.2}
 body.shared-theme nav.app-nav .nav-actions-group :is(.nav-x-link,.coin-pill,#loginBtn,#acctBtn,.lang-dd-btn){min-height:44px;min-width:44px}
 body.shared-theme nav.app-nav .nav-actions-group #coinPill{min-width:min-content;max-width:100%;flex:0 0 auto}
 body.shared-theme nav.app-nav .nav-actions-group #coinPill strong{white-space:nowrap;overflow-wrap:normal;word-break:normal}
 body.shared-theme nav.app-nav>.links[data-nav-mode=product]{
  scrollbar-width:none;overscroll-behavior-x:contain;scroll-padding-inline:6px;
  -webkit-overflow-scrolling:touch;
  mask-image:linear-gradient(to right,#000 calc(100% - 10px),transparent);
 }
 body.shared-theme nav.app-nav>.links[data-nav-mode=product]::-webkit-scrollbar{display:none}
 body.shared-theme nav.app-nav>.links[data-nav-mode=product]>:is(a,button.nav-coming-soon){min-height:44px;height:44px}
 body.shared-theme nav.app-nav>.links[data-nav-mode=product]>:last-child{margin-right:10px}
}
/* The existing land workspace becomes one column at 850px. Keep its map and
   deployment entry before the horizontal plot switcher on that same breakpoint. */
@media(max-width:850px){
 html[data-app-page="land"] .land-workspace>.land-main{order:0}
 html[data-app-page="land"] .land-workspace>.land-sidebar{order:1}
}
/* Shared desktop/mobile refinements: short population text keeps its count
   intact; the adjacent X and account controls use the same square frame. */
body.shared-theme nav.app-nav .community-count [data-community-count-text],
body.shared-theme nav.topbar .community-count [data-community-count-text]{white-space:nowrap;overflow-wrap:normal;word-break:normal}
body.shared-theme nav.app-nav .community-count [data-community-count-text]>strong,
body.shared-theme nav.topbar .community-count [data-community-count-text]>strong{font-weight:800}
body.shared-theme nav.app-nav .nav-actions-group :is(.nav-x-link,#acctBtn){
 box-sizing:border-box;flex:0 0 44px;align-self:center;
 width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;max-height:44px;
 padding:5px;line-height:1;
}


/* Keep population and latency beside the logo on phones. */
@media(max-width:620px){
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count){grid-template-columns:44px minmax(56px,1fr) auto;grid-template-rows:auto auto;gap:5px}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-info-group>.logo{grid-column:1;grid-row:1;min-width:44px;align-self:center}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count)>.community-count{grid-column:2;grid-row:1;align-self:center;flex-direction:column;gap:2px;padding:0;font-size:10px;line-height:1.3;white-space:nowrap;overflow-wrap:normal}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-actions-group{grid-column:3;grid-row:1;margin-left:0;justify-self:end}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-actions-group>.nav-right{gap:4px;flex-wrap:nowrap}
 body.shared-theme nav.app-nav .nav-actions-group #coinPill{max-width:86px;min-width:0;width:86px;padding-inline:4px;font-size:9px;overflow:hidden}
 body.shared-theme nav.app-nav .nav-actions-group #coinPill strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;max-width:100%}
 body.shared-theme nav.app-nav .nav-actions-group .lang-dd-btn{width:44px;min-width:44px;padding-inline:3px;font-size:10px;gap:2px}
 body.shared-theme nav.app-nav .nav-actions-group .nav-x-link{flex-basis:32px;min-width:32px;width:32px;max-width:32px;padding-inline:3px}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-info-group>.mining-pool-badge{grid-column:1/-1;grid-row:2;justify-self:start;width:calc(50% - 2.5px)}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-info-group>.hash-market-widget{grid-column:1/-1;grid-row:2;justify-self:end;width:calc(50% - 2.5px)}
 body.shared-theme nav.app-nav .server-latency{padding:1px 4px;min-height:17px;font-size:9px}
 body.shared-theme nav.app-nav .community-count [data-community-count-text]{white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:360px){
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count){grid-template-columns:44px minmax(52px,1fr) auto;gap:3px}
 body.shared-theme nav.app-nav .nav-actions-group #coinPill{width:65px;max-width:65px;font-size:9px}
 body.shared-theme nav.app-nav .nav-actions-group>.nav-right{gap:3px}
 body.shared-theme nav.app-nav .nav-actions-group .nav-x-link{flex-basis:28px;min-width:28px;width:28px}
}
@media(max-width:340px){
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count){grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto auto}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count)>.community-count{grid-column:2;grid-row:1;flex-direction:row;justify-content:flex-start;gap:8px}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-actions-group{grid-column:1/-1;grid-row:2;justify-self:stretch}
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count) .nav-info-group>:is(.mining-pool-badge,.hash-market-widget){grid-row:3}
}

/* Mobile header: identity first, paired pool figures on one line. */
@media(max-width:700px){
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count){display:grid!important;grid-template-columns:44px minmax(56px,1fr) auto!important;gap:6px!important}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group{display:contents!important}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.logo{grid-column:1!important;grid-row:1!important;min-width:0!important}
 body.shared-theme nav.app-nav>.nav-top-row>.community-count{grid-column:2!important;grid-row:1!important;align-self:center!important;justify-content:flex-start!important;align-items:flex-start!important;flex-direction:column!important;gap:2px!important;margin:0!important;padding:0 0 0 3px!important;font-size:10px!important;white-space:nowrap}
 body.shared-theme nav.app-nav>.nav-top-row>.nav-actions-group{grid-column:3!important;grid-row:1!important;justify-self:end!important;margin:0!important}
 body.shared-theme nav.app-nav>.nav-top-row>.nav-actions-group>.nav-right{flex-wrap:nowrap!important;gap:4px!important}
 body.shared-theme nav.app-nav .nav-actions-group #coinPill{max-width:86px!important;min-width:0!important;padding:4px!important;font-size:9px!important}
 body.shared-theme nav.app-nav .nav-actions-group .nav-x-link{width:30px!important;min-width:30px!important;padding:3px!important}
 body.shared-theme nav.app-nav .nav-actions-group .lang-dd-btn{width:44px!important;min-width:44px!important;padding:3px!important;font-size:10px!important}
 body.shared-theme nav.app-nav .community-count .server-latency{min-height:17px;padding:1px 4px;font-size:9px}
 body.shared-theme nav.app-nav .community-count .server-latency-label{display:none}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.mining-pool-badge{grid-column:1/-1!important;grid-row:2!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;width:100%!important;max-width:none!important;min-width:0!important;min-height:30px!important;padding:6px 9px!important}
 body.shared-theme nav.app-nav .mining-pool-badge>.mining-pool-metric{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;margin:0!important;padding:0!important;border:0!important;min-width:0}
 body.shared-theme nav.app-nav .mining-pool-badge>.mining-pool-metric+ .mining-pool-metric{justify-content:flex-end!important}
 body.shared-theme nav.app-nav .mining-pool-metric small{white-space:nowrap;font-size:9px!important;line-height:1.2!important}
 body.shared-theme nav.app-nav .mining-pool-metric strong{font-size:12px!important;line-height:1.2!important;white-space:nowrap}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.hash-market-widget{grid-column:1/-1!important;grid-row:3!important;width:100%!important;max-width:none!important}
}
@media(max-width:360px){
 body.shared-theme nav.app-nav>.nav-top-row:has(>.community-count){grid-template-columns:40px minmax(0,1fr)!important}
 body.shared-theme nav.app-nav>.nav-top-row>.community-count{flex-direction:row!important;align-items:center!important;gap:8px!important}
 body.shared-theme nav.app-nav>.nav-top-row>.nav-actions-group{grid-column:1/-1!important;grid-row:2!important}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.mining-pool-badge{grid-row:3!important}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.hash-market-widget{grid-row:4!important}
}
/* One mobile metrics row: pool, daily quota and the clickable LING price. */
@media(max-width:700px){
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.mining-pool-badge{grid-column:1/-1!important;grid-row:2!important;justify-self:start!important;width:calc(66.666% - 3px)!important;min-height:46px!important;gap:8px!important;padding:6px 8px!important;align-content:center!important;grid-template-rows:auto!important}
 body.shared-theme nav.app-nav .mining-pool-badge>.mining-pool-metric{flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:3px!important}
 body.shared-theme nav.app-nav .mining-pool-badge>.mining-pool-metric+ .mining-pool-metric{align-items:flex-end!important;justify-content:center!important}
 body.shared-theme nav.app-nav .mining-pool-badge>em{display:none!important}
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>.hash-market-widget{grid-column:1/-1!important;grid-row:2!important;justify-self:end!important;width:calc(33.334% - 3px)!important;min-height:46px!important;padding:6px 8px!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;align-content:center!important}
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-copy{grid-column:1!important;grid-row:1!important;row-gap:3px!important}
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] .hash-market-copy strong{font-size:clamp(9px,2.65vw,12px)!important;line-height:1.2!important;white-space:nowrap!important;letter-spacing:-.2px!important}
 body.shared-theme nav.app-nav .hash-market-widget[data-source=token-reference] :is(.hash-market-usd,.hash-market-network,.hash-market-test,em){display:none!important}
}
@media(max-width:360px){
 body.shared-theme nav.app-nav>.nav-top-row .nav-info-group>:is(.mining-pool-badge,.hash-market-widget){grid-row:3!important}
}
