/* Shared layout safeguards; wide data tables scroll inside their own containers. */
*,*::before,*::after{box-sizing:border-box}img,video,canvas{max-width:100%}main,.main,.main-content,.content,.card,.form-group{min-width:0}.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}td,th{overflow-wrap:anywhere}.toolbar,.card-head,.topbar-actions{flex-wrap:wrap;gap:10px}button,a.btn{min-height:40px}.form-grid>*{min-width:0}input,select,textarea{max-width:100%}.card-title{overflow-wrap:anywhere}
@media(max-width:767px){.form-grid,.js-review-form{grid-template-columns:minmax(0,1fr)!important}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.card-head{align-items:flex-start}input,select,textarea{font-size:16px}.top{flex-wrap:wrap;gap:10px}.wrap{width:100%;padding-bottom:calc(88px + env(safe-area-inset-bottom))}button,a.btn{min-height:44px}}
@media(max-width:360px){.stats-grid{grid-template-columns:minmax(0,1fr)!important}}

.module-tabs,.req-tabs-row,.req-tabs-card{min-width:0;max-width:100%;overflow-x:auto}.stat-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important}.card-head>div{min-width:0;max-width:100%;flex-wrap:wrap}.card-head>div[style*="display:flex"]{flex-wrap:wrap}.content>*{min-width:0;max-width:100%}
@media(max-width:767px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.module-tabs,.req-tabs-row{flex-wrap:wrap;overflow-x:visible}.module-tab,.req-tab{max-width:100%;white-space:normal}}

.stat-card,.stat-label,.stat-value{min-width:0;overflow-wrap:anywhere}.card>form{flex-wrap:wrap}.card-head{max-width:100%}
/* Match every toolbar control and button, with larger targets on phones. */
.ft{--ft-h:40px}.ft .ft-btn{height:var(--ft-h);min-height:var(--ft-h)}
@media(max-width:767px){.ft{--ft-h:44px}}
.ft .ft-field>input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),.ft .ft-field>select{height:var(--ft-h);min-height:var(--ft-h)}
