
/* ==========================================================================
   6.2.8.16.9.4.8 – REFERENCE BOX ALLOCATION ENFORCEMENT
   Purpose: make the actual frontend box allocation match the approved image.
   Contract-safe: CSS-only; no DOM/provider/data/business mutation.
   ========================================================================== */

/* MAIN ANALYSIS: exact approved allocation.
   Left card spans both rows; right side is two stacked cards spanning tracks 2+3. */
html body.btc-rc4836 .btc62816935-boundary-authority.btc6281693-engine .btc628169-main-analysis,
html body.btc-rc4836 .btc62816935-boundary-authority .btc6281693-engine .btc628169-main-analysis,
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis{
  display:grid!important;
  grid-template-columns:minmax(0, .86fr) minmax(0, .57fr) minmax(0, .57fr)!important;
  grid-template-rows:minmax(178px,auto) minmax(250px,auto)!important;
  grid-auto-flow:row!important;
  grid-auto-rows:auto!important;
  gap:12px!important;
  align-items:stretch!important;
}

/* Explicit slot authority beats legacy nth-child / 3-card equal-column rules. */
html body.btc-rc4836 .btc62816935-boundary-authority.btc6281693-engine
.btc628169-main-analysis > .btc628169-slot-recommendations,
html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-main-analysis > .btc628169-slot-recommendations{
  grid-column:1 / 2!important;
  grid-row:1 / 3!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  align-self:stretch!important;
}

html body.btc-rc4836 .btc62816935-boundary-authority.btc6281693-engine
.btc628169-main-analysis > .btc628169-slot-more-recommendations,
html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-main-analysis > .btc628169-slot-more-recommendations{
  grid-column:2 / 4!important;
  grid-row:1 / 2!important;
  width:auto!important;
  min-width:0!important;
  min-height:178px!important;
  height:auto!important;
  align-self:stretch!important;
}

html body.btc-rc4836 .btc62816935-boundary-authority.btc6281693-engine
.btc628169-main-analysis > .btc628169-slot-axes,
html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-main-analysis > .btc628169-slot-axes{
  grid-column:2 / 4!important;
  grid-row:2 / 3!important;
  width:auto!important;
  min-width:0!important;
  min-height:250px!important;
  height:auto!important;
  align-self:stretch!important;
}

/* Remove legacy forced tall cards responsible for the large empty columns. */
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis > .btc628169-master-panel{
  max-height:none!important;
}

/* MORE RECOMMENDATIONS: horizontal information density like reference. */
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-slot-more-recommendations{
  padding:14px 16px 12px!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-slot-more-recommendations > :is(h2,h3,h4):first-child{
  margin-bottom:7px!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-slot-more-recommendations p{
  margin:3px 0!important;
  line-height:1.38!important;
}

/* AXES: compact two-column internal composition. */
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-slot-axes{
  grid-template-columns:minmax(250px,.92fr) minmax(300px,1.08fr)!important;
  grid-template-rows:auto minmax(190px,1fr)!important;
  padding:13px 15px!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-slot-axes > :is(h2,h3,h4):first-child{
  margin-bottom:2px!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-axes-radar-host{
  min-height:185px!important;
  height:190px!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-axes-radar-host svg{
  width:235px!important;
  max-width:100%!important;
  max-height:190px!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-slot-axes .btc628169-axes-native-bars{
  min-height:0!important;
  padding:3px 7px!important;
  font-size:11px!important;
  line-height:1.18!important;
}

/* DEVELOPMENT: approved compact lower row.
   Goals = left track; period/radar = wide right block. */
html body.btc-rc4836 .btc62816935-boundary-authority.btc6281693-engine .btc628169-main-development,
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-development{
  display:grid!important;
  grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr)!important;
  grid-template-rows:auto!important;
  gap:12px!important;
  align-items:stretch!important;
  min-height:0!important;
  height:auto!important;
}

html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-main-development > .btc628169-slot-goals{
  grid-column:1!important;
  grid-row:1!important;
  min-height:150px!important;
  height:auto!important;
  align-self:stretch!important;
  padding:14px 16px!important;
}

html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-main-development > .btc628169-slot-radar{
  grid-column:2!important;
  grid-row:1!important;
  min-height:150px!important;
  height:auto!important;
  align-self:stretch!important;
  padding:14px 16px!important;
}

/* Period buttons stay in one compact horizontal band. */
html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-slot-radar :is(form,.btc-period-tabs,[class*="period"],[class*="range"]){
  align-items:flex-start!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority
.btc628169-slot-radar :is(button,.button,a){
  min-height:36px!important;
}

/* Prevent inherited fixed heights from turning empty cards into columns. */
html body.btc-rc4836 .btc62816935-boundary-authority
:is(.btc628169-main-analysis,.btc628169-main-development) > .btc628169-master-panel{
  max-height:none!important;
}

/* Rail remains independent and content-driven. */
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-context-rail{
  align-content:start!important;
  grid-auto-rows:max-content!important;
}
html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-context-rail > .btc628169-master-panel{
  min-height:0!important;
  height:auto!important;
}

/* Responsive contract fallbacks. */
@media (max-width:1180px){
  html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis{
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto!important;
  }
  html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis > .btc628169-slot-recommendations{
    grid-column:1!important;grid-row:auto!important;
  }
  html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis > .btc628169-slot-more-recommendations{
    grid-column:2!important;grid-row:auto!important;
  }
  html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis > .btc628169-slot-axes{
    grid-column:1 / -1!important;grid-row:auto!important;
  }
}
@media (max-width:860px){
  html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-analysis,
  html body.btc-rc4836 .btc62816935-boundary-authority .btc628169-main-development{
    grid-template-columns:1fr!important;
  }
  html body.btc-rc4836 .btc62816935-boundary-authority
  .btc628169-main-analysis > :is(.btc628169-slot-recommendations,.btc628169-slot-more-recommendations,.btc628169-slot-axes),
  html body.btc-rc4836 .btc62816935-boundary-authority
  .btc628169-main-development > :is(.btc628169-slot-goals,.btc628169-slot-radar){
    grid-column:1!important;grid-row:auto!important;
  }
}
