/* SynkerX v4.0 — layout stability / typography guardrails */
:root{--sx-v40-gap:12px}
html,body{max-width:100%;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
.app-shell,.main,.main-content,.audit,.work-pane,.sx-multipage-pane,.sx-pane-context,.sx-pane-context-main,.sx-sidebar,.sx-rpl-nav,.sx-rpl-group-items,.admin-shell,.sx-admin-editor,.sx-admin-workbench,.sx-admin-explorer{min-width:0}
:is(.work-pane,.sx-multipage-pane,.admin-shell,.sx-pane-context,.sx-lib-shell,.sx-terminal-hub,.sx-ai-shell) :is(h1,h2,h3,h4,h5,h6,p,span,b,strong,small,label,li,td,th,code){overflow-wrap:anywhere}
:is(.work-pane,.sx-multipage-pane,.admin-shell) :is(p,li,.sx-pane-desc){line-height:1.65}
:is(.sx-nav-btn,.sx-rpl-group-toggle,.sx-admin-explorer a,.sx-admin-titlebar nav a,button,a){min-width:0}
.sx-nav-btn .sx-nav-label,.sx-admin-explorer a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sx-brand-copy,.sx-terminal-head>div,.sx-lib-banner-copy,.sx-lib-explorer-head>div,.sx-ai-title,.sx39-loader-copy{min-width:0}
input,textarea,select,button{max-width:100%}
textarea{resize:vertical}
pre{max-width:100%;overflow:auto;white-space:pre}
code{max-width:100%}
.sx-copyline{min-width:0}.sx-copyline code{min-width:0;overflow:auto;white-space:nowrap}
:is(.metric-grid,.stats,.perf-grid,.sx-lib-intro-grid,.sx-lib-wiki-grid,.sx-lib-glossary-grid,.sx-lib-topic-sections,.sx-ai-grid,.sx-ai-starter-grid)>*{min-width:0}
.sx-pane-title-row{min-width:0;flex-wrap:wrap}.sx-pane-title-row h3{min-width:0}
.sx-pane-tags,.sx-lib-banner-tags,.sx-lib-explorer-tags,.sx-lib-topic-badges,.sx-lib-chip-row{min-width:0}
.sx-rpl-group-items{overflow:hidden}
.sx-terminal-flow{max-width:100%;overflow:auto;padding-bottom:4px}
.sx-terminal-flow span{white-space:nowrap}
.table-wrap,.admin-table-wrap,[class*="table-wrap"]{max-width:100%;overflow:auto}
@media(max-width:900px){
  .sx-pane-context{align-items:flex-start!important}
  .sx-pane-context-main,.sx-pane-tags{width:100%}
  .sx-lib-topic-detail,.sx-terminal-hub,.sx-ai-shell{border-radius:14px!important}
}
@media(max-width:600px){
  :is(.work-pane,.sx-multipage-pane,.admin-shell) :is(h1,h2,h3){line-height:1.22}
  .sx-lib-subnav,.sx-lib-chip-row{overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:4px;scrollbar-width:thin}
  .sx-lib-subnav button,.sx-lib-chip-row button{flex:0 0 auto}
}
