/* ZR Orion V123.31 RC11.9.3 — Mission Intelligence + Platform content-density stabilization */
:root{
  --zr-content-section-y:clamp(2.75rem,4.4vw,4.75rem);
  --zr-content-hero-top:clamp(1.75rem,3vw,3rem);
  --zr-content-hero-bottom:clamp(2.75rem,4.5vw,4.75rem);
  --zr-content-gap:clamp(1rem,1.8vw,1.5rem);
}

/* Remove the compounded inner-container padding introduced by the type-system layer. */
body.mi-system.zr-type-system :where(.mi-wrap,.content-wrap,.section-inner),
body.platform-editorial-v119.zr-type-system :where(.platform-wrap,.content-wrap,.section-inner,.shell,.wrap),
body.platform-content.zr-type-system :where(.platform-wrap,.content-wrap,.section-inner,.shell,.wrap){
  padding-top:0!important;
  padding-bottom:0!important;
  min-height:0!important;
  height:auto!important;
}

/* Natural, compact hero rhythm. */
body.mi-system .mi-hero,
body.platform-editorial-v119 :where(.platform-hero,.hero,.hero-section,.editorial-hero),
body.platform-content :where(.platform-hero,.hero,.hero-section,.editorial-hero){
  min-height:0!important;
  height:auto!important;
  padding-top:var(--zr-content-hero-top)!important;
  padding-bottom:var(--zr-content-hero-bottom)!important;
  margin-top:0!important;
  margin-bottom:0!important;
  display:block!important;
}
body.mi-system .mi-hero .mi-breadcrumbs,
body.platform-editorial-v119 :where(.breadcrumbs,.platform-breadcrumbs){margin-bottom:clamp(1.25rem,2vw,1.75rem)!important}

/* Remove doubled section spacing while retaining an executive editorial cadence. */
body.mi-system .mi-section,
body.platform-editorial-v119 :where(.section,.platform-section),
body.platform-content :where(.section,.platform-section){
  min-height:0!important;
  height:auto!important;
  padding-top:var(--zr-content-section-y)!important;
  padding-bottom:var(--zr-content-section-y)!important;
  margin-top:0!important;
  margin-bottom:0!important;
}
body.mi-system .mi-section.tight,
body.platform-editorial-v119 :where(.section.tight,.platform-section.tight),
body.platform-content :where(.section.tight,.platform-section.tight){
  padding-top:clamp(2rem,3vw,3rem)!important;
  padding-bottom:clamp(2rem,3vw,3rem)!important;
}

/* All editorial containers and cards size from content, never from manufactured row heights. */
body.mi-system main :where(.mi-editorial,.mi-proposition-sequence,.mi-signal-grid,.mi-tension-grid,.mi-domain-bands,.mi-consequence-sequence,.mi-path,.mi-loop,.mi-pillars,.mi-list,.mi-boundary-comparison,.mi-strategic-progression,.mi-depth-grid),
body.platform-editorial-v119 main :where(.pe-flow,.pe-ledger,.pe-atlas,.pe-kernel,.pe-evidence-chain,.pe-memory,.pe-engineering-band,.pe-engineering-flow,.pe-signal-bands,.pe-semantic-bands,.pe-foundations,.pe-boundaries,.pe-knowledge-basis,.platform-grid,.architecture-grid),
body.platform-content main :where(.pe-flow,.pe-ledger,.pe-atlas,.pe-kernel,.pe-evidence-chain,.pe-memory,.pe-engineering-band,.pe-engineering-flow,.pe-signal-bands,.pe-semantic-bands,.pe-foundations,.pe-boundaries,.pe-knowledge-basis,.platform-grid,.architecture-grid){
  min-height:0!important;
  height:auto!important;
  grid-auto-rows:auto!important;
  align-items:stretch!important;
  align-content:start!important;
}
body.mi-system main :where(.mi-feature,.mi-proposition,.mi-pillar,.mi-product-row,.mi-gap,.step,.node),
body.platform-editorial-v119 main :where(.pe-flow>*,.pe-ledger>*,.pe-atlas>*,.pe-kernel>*,.pe-evidence-chain>*,.pe-memory>*,.pe-engineering-band>*,.pe-engineering-flow>*,.pe-signal-bands>*,.pe-semantic-bands>*,.pe-foundations>*,.pe-boundaries>*,.pe-knowledge-basis>*),
body.platform-content main :where(.pe-flow>*,.pe-ledger>*,.pe-atlas>*,.pe-kernel>*,.pe-evidence-chain>*,.pe-memory>*,.pe-engineering-band>*,.pe-engineering-flow>*,.pe-signal-bands>*,.pe-semantic-bands>*,.pe-foundations>*,.pe-boundaries>*,.pe-knowledge-basis>*){
  min-height:0!important;
  height:auto!important;
  margin-bottom:0!important;
}

/* Mission-domain and semantic tables become balanced two-column bands on desktop. */
body.mi-system .mi-domain-bands,
body.mi-system .mi-consequence-sequence,
body.platform-editorial-v119 :where(.pe-signal-bands,.pe-semantic-bands),
body.platform-content :where(.pe-signal-bands,.pe-semantic-bands){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:1px!important;
  margin-top:clamp(1.5rem,2.5vw,2rem)!important;
  padding:0!important;
  background:rgba(103,223,245,.18)!important;
  border:1px solid rgba(103,223,245,.18)!important;
}
body.mi-system .mi-domain-bands li,
body.mi-system .mi-consequence-sequence li,
body.platform-editorial-v119 :where(.pe-signal-bands li,.pe-semantic-bands li),
body.platform-content :where(.pe-signal-bands li,.pe-semantic-bands li){
  min-height:0!important;
  height:auto!important;
  padding:1rem 1.15rem!important;
  margin:0!important;
  border:0!important;
  align-items:flex-start!important;
  line-height:1.5!important;
}
/* Odd concluding item becomes a full-width conclusion, never an empty companion cell. */
body.mi-system :where(.mi-domain-bands,.mi-consequence-sequence)>li:last-child:nth-child(odd),
body.platform-editorial-v119 :where(.pe-signal-bands,.pe-semantic-bands)>li:last-child:nth-child(odd),
body.platform-content :where(.pe-signal-bands,.pe-semantic-bands)>li:last-child:nth-child(odd){grid-column:1/-1!important}

/* Responsive auto-fit matrices prevent incomplete fixed-column rows. */
body.mi-system :where(.mi-signal-grid,.mi-tension-grid,.mi-pillars,.mi-depth-grid),
body.platform-editorial-v119 :where(.pe-ledger,.pe-atlas,.pe-kernel,.pe-evidence-chain,.pe-memory,.pe-engineering-band,.pe-foundations,.pe-boundaries,.pe-knowledge-basis,.platform-grid,.architecture-grid),
body.platform-content :where(.pe-ledger,.pe-atlas,.pe-kernel,.pe-evidence-chain,.pe-memory,.pe-engineering-band,.pe-foundations,.pe-boundaries,.pe-knowledge-basis,.platform-grid,.architecture-grid){
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important;
  gap:1px!important;
}
body.mi-system :where(.mi-signal-grid,.mi-tension-grid)>li{
  min-height:0!important;
  padding:1.1rem 1.2rem!important;
}

/* Sequential flows retain visual progression, but their final incomplete row closes at full width. */
body.mi-system :where(.mi-path,.mi-loop,.mi-strategic-progression),
body.platform-editorial-v119 :where(.pe-flow,.pe-engineering-flow),
body.platform-content :where(.pe-flow,.pe-engineering-flow){
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;
  gap:1px!important;
}
body.mi-system :where(.mi-path,.mi-loop,.mi-strategic-progression)>*:last-child:nth-child(3n+1),
body.platform-editorial-v119 :where(.pe-flow,.pe-engineering-flow)>*:last-child:nth-child(3n+1),
body.platform-content :where(.pe-flow,.pe-engineering-flow)>*:last-child:nth-child(3n+1){grid-column:1/-1!important}

/* Keep five category propositions horizontal on wide screens without phantom cells. */
@media(min-width:1100px){
  body.mi-system #category-definition .mi-proposition-sequence{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    border:1px solid var(--mi-line)!important;
    background:var(--mi-line)!important;
    gap:1px!important;
  }
  body.mi-system #category-definition .mi-proposition-sequence>.mi-feature{
    display:block!important;
    padding:1.35rem!important;
    border:0!important;
    background:var(--mi-panel-strong,#071521)!important;
  }
  body.mi-system #category-definition .mi-proposition-sequence>.mi-feature:before{
    display:block!important;
    margin-bottom:1.25rem!important;
    font-size:1.35rem!important;
  }
}

/* Prevent accidental empty placeholders from occupying grid tracks. */
body.mi-system main :where(div,section,article,li):empty,
body.platform-editorial-v119 main :where(div,section,article,li):empty,
body.platform-content main :where(div,section,article,li):empty{display:none!important}

@media(max-width:760px){
  :root{--zr-content-section-y:clamp(2.5rem,8vw,3.75rem);--zr-content-hero-top:1.5rem;--zr-content-hero-bottom:3rem}
  body.mi-system .mi-domain-bands,
  body.mi-system .mi-consequence-sequence,
  body.platform-editorial-v119 :where(.pe-signal-bands,.pe-semantic-bands),
  body.platform-content :where(.pe-signal-bands,.pe-semantic-bands){grid-template-columns:1fr!important}
  body.mi-system :where(.mi-domain-bands,.mi-consequence-sequence)>li,
  body.platform-editorial-v119 :where(.pe-signal-bands,.pe-semantic-bands)>li,
  body.platform-content :where(.pe-signal-bands,.pe-semantic-bands)>li{grid-column:auto!important}
}
