/* ECXBay v4.9.0 — Compact, symmetric intelligence panels
   Preserve all existing chart, map, language and data-bindings.
   Flexible height: no card is stretched simply to match a taller neighbour. */
#ecxm-app .ecxi-explorer-layout{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:clamp(14px,1.5vw,22px);
  margin:0 0 20px;
}
#ecxm-app .ecxi-explorer-stack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:clamp(14px,1.5vw,22px);
  min-width:0;
}
#ecxm-app .ecxi-explorer-stack>.ecxi-box{
  height:auto;
  min-height:0;
  flex:none;
  margin:0;
}
#ecxm-app .ecxi-explorer-stack .ecxi-box-head{min-height:54px;align-items:center}
#ecxm-app .ecxi-explorer-stack .ecxi-tablewrap{max-height:clamp(235px,29vh,380px)}
#ecxm-app .ecxi-explorer-stack .ecxi-blockstream .ecxi-hint{margin:12px 0 0}
#ecxm-app .ecxi-explorer-stack .ecxi-inspector [data-ecxi-result]{min-width:0;margin-top:12px}
#ecxm-app .ecxi-explorer-stack .ecxi-inspector .ecxi-empty{
  min-height:0;
  padding:16px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:15px;
  row-gap:4px;
  align-items:center;
  justify-content:start;
  text-align:left;
  border:1px solid rgba(97,155,204,.16);
  border-radius:14px;
  background:rgba(14,32,54,.4);
}
#ecxm-app .ecxi-explorer-stack .ecxi-inspector .ecxi-empty>b{
  grid-row:1/span 2;grid-column:1;margin:0;
  font-size:35px;line-height:1;color:#60c9ea;
}
#ecxm-app .ecxi-explorer-stack .ecxi-inspector .ecxi-empty>strong{
  grid-row:1;grid-column:2;font-size:14px;line-height:1.4;
}
#ecxm-app .ecxi-explorer-stack .ecxi-inspector .ecxi-empty>p{
  grid-row:2;grid-column:2;max-width:none;margin:0;
  font-size:12px;line-height:1.55;color:#9aafc7;
}
#ecxm-app .ecxi-explorer-stack .ecxi-mempool-summary{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
}
/* Preserve the waiting/error message. Do not show an empty 130px bar plot. */
#ecxm-app .ecxi-fee-bars:has(> span:only-child){
  height:auto;
  min-height:46px;
  align-items:center;
  justify-content:center;
  padding:12px;
  border:1px dashed rgba(103,161,207,.21);
  border-radius:12px;
  margin-top:12px;
}
#ecxm-app .ecxi-fee-bars:has(> span:only-child)>span{
  color:#97b2c9;
  font-size:12px;line-height:1.45;
}
#ecxm-app .ecxi-explorer-stack .ecxi-scope-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
#ecxm-app .ecxi-explorer-stack .ecxi-scope-grid>div{
  min-height:104px;
  align-content:center;
  border:1px solid rgba(107,160,212,.15);
  border-radius:14px;
}
#ecxm-app .ecxi-explorer-stack .ecxi-scope-grid p{line-height:1.5}
/* Blockfab: give each rich module the full available width rather than stretching
   a short mainnet header card to the height of the drivechain catalogue. */
#ecxm-app .ecxi-blockfab-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:clamp(14px,1.5vw,22px);
  align-items:start;
}
#ecxm-app .ecxi-blockfab-grid>.ecxi-box{
  min-height:0;
  height:auto;
  width:100%;
  align-self:start;
  margin:0;
}
#ecxm-app .ecxi-header-fields{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
#ecxm-app .ecxi-header-fields>div{min-height:75px;align-content:center}
#ecxm-app .ecxi-header-forensics .ecxi-hash-lines{
  grid-template-columns:auto minmax(0,1fr);
  gap:8px 16px;
  align-items:center;
}
#ecxm-app .ecxi-header-forensics .ecxi-hash-lines>small{margin:0}
#ecxm-app .ecxi-header-forensics .ecxi-hash-lines>code{min-width:0;font-size:12px}
#ecxm-app .ecxi-drivechains .ecxi-drive-status{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
#ecxm-app .ecxi-drivechains .ecxi-drive-status-item:first-child{grid-column:auto}
#ecxm-app .ecxi-drivechains .ecxi-slot-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
#ecxm-app .ecxi-drivechains .ecxi-slot-card{
  min-height:86px;
  grid-template-columns:45px minmax(0,1fr) 12px;
  gap:10px;
}
#ecxm-app .ecxi-drivechains .ecxi-slot-number{width:45px;height:45px}
#ecxm-app .ecxi-drivechains .ecxi-slot-detail{
  margin-top:16px;
  padding:17px 20px;
}
#ecxm-app .ecxi-drivechains .ecxi-drive-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
/* Metrics and technical analysis should use a balanced grid without tall empty panels. */
#ecxm-app .ecxi-metrics,#ecxm-app .ecxi-advanced-metrics{align-items:stretch}
#ecxm-app .ecxi-metrics>.ecxi-metric,#ecxm-app .ecxi-advanced-metrics>.ecxi-advanced-metric{min-width:0;min-height:0}
#ecxm-app .intel-analysis-grid>div{min-height:0}
#ecxm-app .intel-patterns p:last-child{border-bottom:0}
#ecxm-app .intel-donation-body{gap:10px}
#ecxm-app .intel-donation-body .intel-copy-status:empty{display:none}
/* On tablets the header fields and drivechain cards naturally reorganize. */
@media (max-width:1300px){
  #ecxm-app .ecxi-header-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
  #ecxm-app .ecxi-drivechains .ecxi-slot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1020px){
  #ecxm-app .ecxi-explorer-layout{grid-template-columns:minmax(0,1fr)}
  #ecxm-app .ecxi-explorer-stack{gap:14px}
  #ecxm-app .ecxi-drivechains .ecxi-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  #ecxm-app .ecxi-explorer-stack .ecxi-scope-grid{grid-template-columns:minmax(0,1fr)}
  #ecxm-app .ecxi-explorer-stack .ecxi-mempool-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  #ecxm-app .ecxi-explorer-stack .ecxi-mempool-summary>div:last-child{grid-column:1/-1}
  #ecxm-app .ecxi-header-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  #ecxm-app .ecxi-header-forensics .ecxi-hash-lines{grid-template-columns:minmax(0,1fr);gap:4px}
  #ecxm-app .ecxi-drivechains .ecxi-drive-status{grid-template-columns:repeat(2,minmax(0,1fr))}
  #ecxm-app .ecxi-drivechains .ecxi-drive-status-item:first-child{grid-column:1/-1}
  #ecxm-app .ecxi-drivechains .ecxi-drive-actions{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:460px){
  #ecxm-app .ecxi-drivechains .ecxi-slot-grid{grid-template-columns:minmax(0,1fr)}
  #ecxm-app .ecxi-explorer-stack .ecxi-inspector .ecxi-empty{grid-template-columns:32px minmax(0,1fr);column-gap:10px;padding:13px}
  #ecxm-app .ecxi-explorer-stack .ecxi-inspector .ecxi-empty>b{font-size:28px}
  #ecxm-app .ecxi-drivechains .ecxi-drive-status{grid-template-columns:minmax(0,1fr)}
  #ecxm-app .ecxi-drivechains .ecxi-drive-status-item:first-child{grid-column:auto}
}
