/* AfriPrime v93: layout and accessibility only. */
.ap93-table-scroll{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
.ap93-table-scroll:focus-visible{outline:3px solid #ae8736;outline-offset:3px}
@media(max-width:900px){
 body.ap93-responsive,body.ap93-responsive *,body.ap93-responsive *::before,body.ap93-responsive *::after{box-sizing:border-box}
 body.ap93-responsive :is(main,section,article,aside,header,footer,nav,form,fieldset){min-width:0}
 body.ap93-responsive :is(img,video,canvas){max-width:100%}
 body.ap93-responsive :is(input,select,textarea){min-width:0;max-width:100%;font-size:16px}
 body.ap93-responsive :is(button,.button,.ms-btn,.btn){max-width:100%;min-height:44px;white-space:normal;line-height:1.4;overflow-wrap:anywhere}
 body.ap93-responsive :is(h1,h2,h3,p,label,small,dt,dd,td,th){overflow-wrap:anywhere}
 body.ap93-responsive :is(.grid,.columns,.overview-grid,.section-grid,.lower-grid,.workspace,.classroom)>*{min-width:0}
 body.ap93-responsive :is(pre,code){max-width:100%;overflow-wrap:anywhere}
 body.ap93-responsive pre{overflow:auto;white-space:pre-wrap}
 body.ap93-responsive dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;margin:auto}
 body.ap93-responsive .ap93-table-scroll{width:100%;min-width:0}
 body.ap93-responsive .ap93-table-scroll table{min-width:480px;width:100%}
 body.ap93-responsive :is(.actions,.heading-buttons,.section-head,.panel-title){flex-wrap:wrap;gap:10px}
 body.ap93-responsive :is(.actions,.heading-buttons)>*{min-width:0}
 body.ap93-responsive [style*="grid-template-columns"]{min-width:0}
 body[data-ap-page="dashboard"] #tab-portfolio .wrap>div:first-child>div:first-child{flex-direction:column;align-items:flex-start!important;gap:14px}
 body[data-ap-page="dashboard"] #tab-portfolio button[id^="tv_"]{flex:1 1 90px;letter-spacing:.2px;font-size:12px!important;padding:10px!important}
 body[data-ap-page="dashboard"] .prime-sidebar{justify-content:space-between;align-items:center}
 body[data-ap-page="dashboard"] .prime-sidebar .prime-side-brand{max-width:calc(100% - 95px)}
 body[data-ap-page="dashboard"] .ms-toolbar>*{flex:1 1 130px;min-width:0}
 body[data-ap-page="dashboard"] .ms-toolbar input{flex-basis:100%}
 body[data-ap-page="dashboard"] .ms-network-stage{max-width:100%;overflow:auto;min-height:250px}
 body[data-ap-page="dashboard"] .ms-member{min-width:0;width:250px;max-width:100%}
 body[data-ap-page="dashboard"] .ms-list .ms-member{width:100%}
 body[data-ap-page="dashboard"] .ms-mobile-nav{padding-bottom:env(safe-area-inset-bottom)}
 body[data-ap-page="owners-control"] :is(.grid,.card,.panel){min-width:0;max-width:100%}
 body[data-ap-page="owners-control"] :is(input,select,textarea){width:100%}
 body[data-ap-page="owners-control"] .ap93-table-scroll table{min-width:560px}
}
@media(max-width:760px){
 body[data-ap-page="academy"] main{grid-template-columns:minmax(0,1fr)!important;width:100%;gap:20px;padding:24px 16px}
 body[data-ap-page="academy"] aside{width:100%;min-width:0;position:static}
 body[data-ap-page="academy"] #lessons{display:block;max-width:100%;max-height:260px;overflow:auto}
 body[data-ap-page="academy"] #lessons button{min-width:0;white-space:normal;width:100%;font-size:14px;padding:12px}
 body[data-ap-page="academy"] .hero{padding:32px 20px}
 body[data-ap-page="academy"] .hero a{display:inline-flex;align-items:center;margin:6px 0;max-width:100%;line-height:1.5}
 body[data-ap-page="academy"] .hero a+a{margin-left:0}
 body[data-ap-page="academy"] :is(article,.lab,.quiz,.example){min-width:0;padding:18px}
 body[data-ap-page="academy"] .flow span{min-width:110px;overflow-wrap:anywhere}
 body[data-ap-page="home"] .prime-gold-copy h2{font-size:clamp(30px,9vw,42px)}
 body[data-ap-page="home"] .prime-hero-caption{flex-wrap:wrap;gap:8px}
 body[data-ap-page="home"] .scene-chip{max-width:calc(100% - 24px)}
 body[data-ap-page="home"] .prime-gold-status{white-space:normal;overflow-wrap:anywhere;max-width:100%}
 body[data-ap-page="home"] .prime-gold-copy .prime-button{white-space:normal;min-width:0;gap:8px}
 body[data-ap-page="afrie-card"] .topbar{height:auto;min-height:66px;display:flex;flex-wrap:wrap;padding:12px 16px;gap:10px}
 body[data-ap-page="afrie-card"] .topbar-left{flex:1 1 100%;min-width:0}
 body[data-ap-page="afrie-card"] .topbar-right{display:flex;flex:1 1 100%;min-width:0;gap:8px;justify-content:space-between;flex-wrap:wrap}
 body[data-ap-page="afrie-card"] .topbar-right .country{display:none}
 body[data-ap-page="afrie-card"] #cardAccountName{max-width:120px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
 body[data-ap-page="afrie-card"] .topbar-right>.avatar{flex-shrink:0}
 body[data-ap-page="afrie-card"] .mode-strip{gap:12px;flex-wrap:wrap}
 body[data-ap-page="afrie-card"] :is(.card-actions,.card-tier-switch){flex-wrap:wrap;gap:10px}
 body[data-ap-page="afrie-card"] .card-actions>*{flex:1 1 110px}
 body[data-ap-page="afrie-card"] .panel-title{align-items:flex-start;gap:10px}
 body[data-ap-page="afrie-card"] .panel-title h2{font-size:16px;line-height:1.4}
 body[data-ap-page="afrie-card"] .card-scene{width:100%;max-width:100%;min-width:0}
 body[data-ap-page="afrie-card"] .card-fine>span:first-child{max-width:63%;letter-spacing:.3px;line-height:1.4}
 body[data-ap-page="afrie-card"] :is(.button,.mode-strip button){font-size:13px}
 body[data-ap-page="afrie-card"] .page-heading p{font-size:14px;line-height:1.65}
 body[data-ap-page="courses"] :is(.actions,.reader-nav){flex-wrap:wrap;gap:10px}
 body[data-ap-page="courses"] .actions>*{flex:1 1 130px;min-width:0}
 body[data-ap-page="courses"] :is(.visual-grid,.concept-cards,.number-story){min-width:0}
 body[data-ap-page="courses"] :is(.pills,.budget-grid){gap:10px}
 body[data-ap-page="partners"] .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-ap-page="gold-master"] :is(.heading,.topbar,.panel-head,.chart-head){flex-wrap:wrap;height:auto;gap:12px;padding-block:14px}
 body[data-ap-page="gold-master"] .heading>button{font-size:12px;flex-basis:100%}
 body[data-ap-page="gold-master"] .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-ap-page="gold-master"] .chart-expanded{inset:4px;padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:480px){
 body.ap93-responsive [style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}
 body[data-ap-page="dashboard"] .cmd-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-ap-page="dashboard"] .cmd-val{font-size:clamp(20px,6vw,26px);overflow-wrap:anywhere}
 body[data-ap-page="dashboard"] :is(.card-hdr,.copy-head,.ref-header,.rank-header){flex-wrap:wrap;gap:12px}
 body[data-ap-page="dashboard"] :is(.bot-name,.card-title){line-height:1.4}
 body[data-ap-page="dashboard"] .prime-topbar .nav-right{gap:8px}
 body[data-ap-page="dashboard"] #cBtn{max-width:190px}
 body[data-ap-page="dashboard"] #app{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
 body.ap93-responsive :is(header,.topbar) .brand{min-width:0;overflow-wrap:anywhere}
 body[data-ap-page="afrie-card"] .metric-row{grid-template-columns:1fr}
 body[data-ap-page="afrie-card"] .card-name{font-size:19px!important}
 body[data-ap-page="afrie-card"] .card-panel .card-africa{width:65px;height:65px}
 body[data-ap-page="afrie-card"] .chip{width:30px;height:23px}
 body[data-ap-page="owners"] :is(header,.section-head){flex-wrap:wrap}
 body[data-ap-page="owners-control"] .card{padding:18px}
 body[data-ap-page="owners-control"] button{width:100%;margin-right:0}
 body[data-ap-page="courses"] :is(.visual-grid,.budget-grid){grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){body.ap93-responsive{scroll-behavior:auto}}

@media(max-width:900px){
 body[data-ap-page="afrie-card"] .topbar{height:auto;min-height:66px;flex-wrap:wrap;gap:10px;padding-block:12px}
 body[data-ap-page="afrie-card"] .topbar-left,body[data-ap-page="afrie-card"] .topbar-right{flex:1 1 100%;min-width:0}
 body[data-ap-page="afrie-card"] .topbar-right{flex-wrap:wrap;gap:8px;justify-content:space-between}
}
@media(max-width:760px){
 body[data-ap-page="card"] .topbar{height:auto;min-height:66px;flex-wrap:wrap;gap:10px;padding:12px 16px}
 body[data-ap-page="card"] .topbar-left,body[data-ap-page="card"] .topbar-right{min-width:0;flex-wrap:wrap}
 body[data-ap-page="card"] .topbar-right{gap:8px;margin-left:auto}
 body[data-ap-page="card"] .country{display:none}
 body[data-ap-page="academy"] #classroom{grid-template-columns:minmax(0,1fr)!important;width:100%;min-width:0}
 body[data-ap-page="academy"] #classroom>aside{max-width:100%}
}
@media(max-width:900px){
 body.ap93-responsive :is(.notice,.muted,.helper,.field-summary,[role="status"],#deployment,#status){overflow-wrap:anywhere;min-width:0;max-width:100%}
 body.ap93-responsive .notice *{overflow-wrap:anywhere;white-space:normal}
 body[data-ap-page="afrie-card"] .sidebar,body[data-ap-page="card"] .sidebar{max-height:100dvh;overflow-y:auto;overscroll-behavior:contain}
}
@media(max-width:760px){
 .ap93-profit-legend{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
 .ap93-profit-legend>span{min-width:0;white-space:normal!important;text-align:left!important;line-height:1.5}
 .ap93-rank-summary{flex-wrap:wrap;padding:20px!important;gap:16px!important}
 .ap93-rank-summary>div{min-width:0;max-width:100%}
 .ap93-rank-summary>div:last-child{flex-basis:100%;text-align:left!important;border-top:1px solid var(--brd);padding-top:14px}
}
@media(max-width:900px){
 body[data-ap-page="dashboard"] .prime-sidebar{flex-direction:row;flex-wrap:wrap}
 body[data-ap-page="dashboard"] .prime-side-brand{flex:0 1 auto;min-width:0;padding:0}
 body[data-ap-page="dashboard"] .prime-sidebar .ap-menu-toggle{flex:0 0 auto;margin-left:auto}
}
@media(max-width:760px){
 body[data-ap-page="gold-master"] nav{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
 body[data-ap-page="gold-master"] nav button{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal;min-width:max-content;max-width:none;font-size:13px}
}
.ap93-return-dashboard{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 12px;border:1px solid #b59c64;border-radius:9px;background:#fffdf5;color:#174b37;text-decoration:none;font-size:13px;font-weight:700;line-height:1.4}
body[data-ap-page="gold-master"] aside>.ap93-return-dashboard{margin-top:20px}
body[data-ap-page="gold-master"] .ap93-return-dashboard.compact{font-size:12px;padding:8px 10px}
#apDashboardRefresh{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;background:#fffcf5;border:1px solid #b59c64;border-radius:10px;color:#174b37;font:700 13px/1.3 system-ui;cursor:pointer}
#apDashboardRefresh:disabled{opacity:.65;cursor:progress}
@media(max-width:900px){body[data-ap-page="dashboard"] #apDashboardRefresh{order:5;flex:1 1 100%;width:100%;max-width:100%}}
