/* Apex responsive layer — loaded last on every page */
html{-webkit-text-size-adjust:100%}
img,video,svg{max-width:100%}
.apex-menu-btn{display:none}
@media (max-width:900px){
  body{overflow-x:hidden}
  .sidebar{transform:translateX(-100%);transition:transform .25s ease;width:min(280px,84vw)!important;box-shadow:none}
  body.apex-nav-open .sidebar{transform:translateX(0);box-shadow:0 0 40px rgba(0,0,0,.45)}
  .main{margin-left:0!important;width:100%;max-width:100vw;min-width:0}
  .apex-menu-btn{display:inline-flex;align-items:center;justify-content:center;position:fixed;top:10px;left:10px;z-index:60;width:42px;height:42px;border:0;border-radius:10px;background:#0B1829;color:#fff;font-size:20px;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.25)}
  body.apex-nav-open .apex-menu-btn{left:auto;right:10px;background:#993C1D}
  .apex-scrim{display:none;position:fixed;inset:0;background:rgba(11,24,41,.55);z-index:45}
  body.apex-nav-open .apex-scrim{display:block}
  .topbar,.page-header,.page-head,header.top{padding-left:62px!important}
  .main > *{max-width:100%}
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  .modal,.modal-box,.modal-content,.article-modal{max-width:96vw!important;width:96vw!important}
  [class*="grid"],.stats-row,.stat-grid,.cards,.kpi-row{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important}
  .toolbar,.filters,.filter-row,.actions,.topbar-actions{flex-wrap:wrap}
  input,select,textarea{max-width:100%}
  pre,code{white-space:pre-wrap;word-break:break-word}
}
@media (max-width:600px){
  .container,.wrap,section,.section{padding-left:16px!important;padding-right:16px!important}
  h1,.hero-title{overflow-wrap:anywhere}
}

/* overflow guards */
html{overflow-x:clip}
:has(> .stat-mini){flex-wrap:wrap}
@media (max-width:900px){
  .toc{position:static!important;max-height:none!important;width:auto!important}
  .layout>*{min-width:0}
  .hero-stats,.hero-stat-row{flex-wrap:wrap}
}
.stat-row{flex-wrap:wrap}
.pipeline-wrap{overflow-x:auto;max-width:100%}
@media (max-width:900px){
  [style*="grid-template-columns"]{grid-template-columns:1fr!important}
  .stat-row{gap:12px 20px}
}
@media (max-width:900px){
  .stat-row{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))!important;padding:1rem!important}
}
