.sipro-books{max-width:1160px;margin:20px auto;padding:20px;color:#17243a}
.sipro-hero{background:#173e68;color:white;padding:30px;border-radius:18px}
.sipro-search{display:flex;gap:10px;margin:24px 0;flex-wrap:wrap}
.sipro-search input{flex:1;min-width:180px;padding:12px;border:1px solid #ddd;border-radius:9px}
.sipro-search button,.sipro-book button,.sipro-checkout button{background:#e87839;color:white;border:0;border-radius:9px;padding:11px 15px;cursor:pointer}
.sipro-search a{padding:11px;color:#173e68}
.sipro-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:18px}
.sipro-book{border:1px solid #e2e8f0;border-radius:14px;padding:15px;background:white}
.sipro-book img{width:100%;height:210px;object-fit:contain}
.sipro-book h3{font-size:17px;margin:12px 0}.sipro-book form{display:flex;gap:8px;margin-top:12px}
.sipro-book input{width:58px}.sipro-pages{display:flex;justify-content:center;gap:20px;padding:30px}
.sipro-cartrow{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #eee;padding:16px 0}
.sipro-checkout{display:grid;gap:12px;max-width:560px;margin-top:22px}
.sipro-checkout input,.sipro-checkout textarea{padding:12px;border:1px solid #ddd;border-radius:8px}
@media(max-width:600px){.sipro-books{padding:12px}.sipro-hero{padding:20px}.sipro-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.sipro-book{padding:9px}.sipro-book img{height:140px}.sipro-book form{flex-wrap:wrap}}

.sipro-books-home-promo{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:14px 0;padding:16px 20px;border:1px solid #dce5ef;border-radius:15px;background:#fff;box-shadow:0 4px 15px rgba(20,40,60,.06)}
.sipro-books-home-copy{flex:1;min-width:190px}.sipro-books-home-copy strong{font-size:18px;color:#173e68}
.sipro-books-home-copy p{margin:4px 0 0;color:#516278;font-size:14px}
.sipro-books-home-link{display:inline-block;text-decoration:none!important;background:#e87839;color:#fff!important;font-weight:700;padding:12px 23px;border-radius:10px;white-space:nowrap}
@media(max-width:600px){.sipro-books-home-promo{padding:12px}.sipro-books-home-link{width:100%;text-align:center}}

.sipro-popup-body{margin:0;background:#f5f7fb;font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#17304c}
.sipro-shell{max-width:1120px;margin:auto;padding:0 16px 35px}.sipro-top{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:16px;background:#fff;border-bottom:1px solid #e2e8f0;gap:12px}
.sipro-brand{font-size:20px;font-weight:800;color:#173e68;text-decoration:none}.sipro-cart-link{font-weight:700;color:#d4652a;text-decoration:none}.sipro-main{padding:16px 0}.sipro-section{background:white;padding:20px;margin:17px 0;border-radius:15px;border:1px solid #e3e9f0}.sipro-section h2{font-size:19px;margin:0 0 15px}.sipro-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px}.sipro-choice{border:1px solid #d5e0eb;border-radius:10px;text-align:center;padding:14px 8px;text-decoration:none;color:#173e68;font-weight:750;background:#f7faff}.sipro-choice.selected{background:#173e68;color:white}.sipro-video{width:100%;max-height:360px;background:#111;border-radius:12px}.sipro-empty{padding:25px;background:#f5f7fb;border-radius:10px;color:#66788c}
body.sipro-modal-open{overflow:hidden!important}#sipro-books-overlay{position:fixed;inset:0;z-index:2147483000;background:rgba(15,25,40,.72);display:flex;justify-content:center;align-items:center;padding:18px}.sipro-dialog{width:min(1100px,100%);height:min(92dvh,950px);background:#f5f7fb;display:flex;flex-direction:column;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px #0005}.sipro-dialog-bar{flex:none;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border-bottom:1px solid #e1e5ec}.sipro-close{border:0;background:#b91c1c;color:#fff;padding:9px 13px;border-radius:8px;font-weight:700;cursor:pointer}.sipro-dialog iframe{flex:1;min-height:0;width:100%;border:0}
@media(max-width:600px){#sipro-books-overlay{padding:0}.sipro-dialog{height:100dvh;border-radius:0}.sipro-dialog-bar{padding:10px 14px}.sipro-section{padding:13px}.sipro-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.sipro-choice{padding:12px 5px}}
\n.sipro-video{display:block;width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:12px;background:#111}\n
/* SEMAS books v1.12.0.115: independent, polished iframe interface */
html:has(body.sipro-popup-body){height:100%;overflow:hidden}
body.sipro-popup-body{height:100dvh;overflow:hidden;background:#f1f5fa;font:15px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif!important}
.sipro-popup-body *{box-sizing:border-box}
.sipro-popup-body .sipro-shell{max-width:none!important;width:100%;height:100dvh;margin:0!important;padding:0!important;display:flex;flex-direction:column;overflow:hidden}
.sipro-popup-body .sipro-top{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px clamp(14px,3vw,32px);background:#fff;border-bottom:1px solid #e2e8f0}
.sipro-popup-body .sipro-brand{font-size:17px;font-weight:800;color:#173e68}
.sipro-popup-body .sipro-cart-link{background:#fff4e8;border:1px solid #f6c6a5;color:#b85013;padding:9px 14px;border-radius:10px}
.sipro-popup-body .sipro-main{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px clamp(14px,3vw,32px) 28px;max-width:none!important}
.sipro-popup-body .sipro-hero{background:linear-gradient(120deg,#123d69,#2868a1);padding:22px 24px;border-radius:16px;color:white}
.sipro-popup-body .sipro-hero h1{color:white;font-size:clamp(23px,3vw,32px);line-height:1.2;margin:0 0 7px;font-weight:800}
.sipro-popup-body .sipro-hero p{margin:0;color:#e7f2ff}
.sipro-popup-body .sipro-section{padding:18px 20px;margin:13px 0;border:1px solid #dfe7f0;border-radius:14px;box-shadow:0 3px 12px rgba(17,46,74,.035)}
.sipro-popup-body .sipro-section h2{font-size:18px;font-weight:800;color:#173e68;margin:0 0 12px}
.sipro-popup-body .sipro-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sipro-popup-body .sipro-choice{display:flex;justify-content:center;align-items:center;min-height:53px;border-radius:11px;background:#edf5fd;border:1px solid #bed5ec;color:#17426e;font-weight:800;font-size:15px;text-decoration:none;transition:background .15s,border-color .15s}
.sipro-popup-body .sipro-choice:hover,.sipro-popup-body .sipro-choice:focus-visible{background:#dceefe;border-color:#317cb8}
.sipro-popup-body .sipro-choice.selected{background:#173e68;color:#fff}
.sipro-popup-body .sipro-video{display:block;width:100%;max-width:780px;aspect-ratio:16/9;height:auto;border:0;border-radius:12px;background:#101d2d}
.sipro-popup-body .sipro-empty{padding:14px;border-radius:10px}
#sipro-books-overlay{overscroll-behavior:contain}
#sipro-books-overlay .sipro-dialog{background:#f1f5fa}
#sipro-books-overlay .sipro-dialog-bar{min-height:55px;padding:10px 18px}
#sipro-books-overlay .sipro-dialog-bar strong{font-size:16px;color:#173e68}
#sipro-books-overlay .sipro-dialog iframe{background:#f1f5fa}
@media(max-width:600px){.sipro-popup-body .sipro-top{padding:10px 12px}.sipro-popup-body .sipro-main{padding:12px 10px 20px}.sipro-popup-body .sipro-hero{padding:18px}.sipro-popup-body .sipro-section{padding:13px;margin:10px 0}.sipro-popup-body .sipro-buttons{gap:7px}.sipro-popup-body .sipro-choice{font-size:13px;min-height:45px}}
/* Ticker, marketplace and video should form one compact stack */
html,body{overscroll-behavior-y:auto}
main.mm-hub-workspace-v170{gap:0!important;padding-top:0!important;align-content:start!important;justify-content:flex-start!important}
main.mm-hub-workspace-v170>.semas-breaking-ticker{height:42px!important;min-height:42px!important;max-height:42px!important;flex:0 0 42px!important;margin:0 0 8px!important;padding:0!important}
main.mm-hub-workspace-v170>.sipro-books-home-promo{flex:0 0 auto!important;margin:0 0 10px!important;min-height:0!important;padding:12px 17px!important;position:relative}
main.mm-hub-workspace-v170>.mm-academic-v170{flex:0 0 auto!important;margin:0 0 12px!important}
main.mm-hub-workspace-v170>.sipro-books-home-promo .sipro-books-home-copy p{margin:3px 0 0!important}
@media(max-width:600px){main.mm-hub-workspace-v170>.semas-breaking-ticker{height:38px!important;min-height:38px!important;max-height:38px!important;flex-basis:38px!important;margin-bottom:7px!important}main.mm-hub-workspace-v170>.sipro-books-home-promo{padding:10px 12px!important;margin-bottom:8px!important}}

/* v116: restore news visibility and avoid flex sizing side effects from v115 */
main.mm-hub-workspace-v170{align-content:normal!important;justify-content:normal!important}
main.mm-hub-workspace-v170 > .semas-breaking-ticker{display:flex!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:35!important;box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:42px!important;max-height:none!important;overflow:hidden!important;margin:0 0 10px!important;padding:0!important;flex:none!important}
main.mm-hub-workspace-v170 > .semas-breaking-ticker .semas-breaking-label{display:block!important;flex:0 0 auto!important}
main.mm-hub-workspace-v170 > .semas-breaking-ticker .semas-breaking-viewport{display:block!important;min-width:0!important;flex:1 1 auto!important}
main.mm-hub-workspace-v170 > .sipro-books-home-promo{display:flex!important;visibility:visible!important;opacity:1!important;margin:0 0 10px!important;min-height:0!important}
main.mm-hub-workspace-v170 > .mm-academic-v170{margin-top:0!important}
.sipro-popup-body .sipro-main>.sipro-section:first-of-type{margin-top:12px}
.sipro-popup-body .sipro-video{max-width:680px}
@media(max-width:600px){main.mm-hub-workspace-v170>.semas-breaking-ticker{min-height:38px!important;margin-bottom:8px!important}}

/* v117: launch hold and responsive news placement */
.sipro-books-coming-soon{cursor:not-allowed!important;background:#66788c!important;border-color:#66788c!important;color:#fff!important;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;pointer-events:none;user-select:none;opacity:.9}
.sipro-books-soon-label{font-size:10px;font-weight:900;letter-spacing:.5px;padding:4px 7px;border-radius:6px;background:#fff;color:#33465b;white-space:nowrap}
main.mm-hub-workspace-v170 > .semas-breaking-ticker{display:flex!important;position:relative!important;visibility:visible!important;opacity:1!important;z-index:50!important;transform:none!important;top:auto!important;bottom:auto!important;flex-shrink:0!important;max-width:100%!important;min-width:0!important;min-height:40px!important;height:auto!important;max-height:none!important;overflow:hidden!important;box-sizing:border-box!important;margin-bottom:9px!important}
main.mm-hub-workspace-v170 > .semas-breaking-ticker .semas-breaking-track{display:inline-flex!important;white-space:nowrap!important;animation-play-state:running}
main.mm-hub-workspace-v170 > .semas-breaking-ticker .semas-breaking-viewport{min-width:0!important;overflow:hidden!important}
@media(max-width:600px){main.mm-hub-workspace-v170>.semas-breaking-ticker{min-height:38px!important;margin-bottom:8px!important}.sipro-books-coming-soon{width:100%}}

/* v118: Structural fix. Header is now BEFORE the news ticker in the DOM.
   Do not offset ticker with JS: sticky header reserves its own space. */
body.mm-mwalimu-public-page main.mm-hub-workspace-v170>.semas-brand-header{
 position:fixed!important;top:0!important;z-index:10015!important;
 margin:0 0 7px!important;flex-shrink:0!important;
}
body.mm-mwalimu-public-page main.mm-hub-workspace-v170>.semas-breaking-ticker{
 order:1!important;position:relative!important;top:auto!important;
 margin:0 0 9px!important;min-height:42px!important;
 transform:none!important;z-index:2!important;visibility:visible!important;
 opacity:1!important;display:flex!important;
}
body.mm-mwalimu-public-page main.mm-hub-workspace-v170>.sipro-books-home-promo{order:2!important;margin:0 0 10px!important}
body.mm-mwalimu-public-page main.mm-hub-workspace-v170>.mm-academic-v170{order:3!important}
@media(max-width:600px){
 body.mm-mwalimu-public-page main.mm-hub-workspace-v170>.semas-brand-header{margin-bottom:5px!important}
 body.mm-mwalimu-public-page main.mm-hub-workspace-v170>.semas-breaking-ticker{min-height:38px!important;margin-bottom:8px!important}
}


/* v119: restore natural homepage vertical scrolling, retaining fixed top header. */
html:has(#semasBrandHeader):not(:has(body.sipro-popup-body)),
body:has(#semasBrandHeader):not(.sipro-popup-body){
 height:auto!important;max-height:none!important;
 overflow-x:clip!important;overflow-y:auto!important;
 overscroll-behavior-y:auto!important;
 touch-action:pan-y pinch-zoom!important;
}
body:has(#semasBrandHeader) .mm-page{
 height:auto!important;min-height:100dvh!important;max-height:none!important;
 overflow:visible!important;overflow-y:visible!important;
}
body:has(#semasBrandHeader) main.mm-hub-workspace-v170{
 display:block!important;height:auto!important;min-height:0!important;
 max-height:none!important;overflow:visible!important;
 overflow-y:visible!important;touch-action:pan-y!important;
 padding-top:0!important;
}
body:has(#semasBrandHeader) main.mm-hub-workspace-v170>.semas-breaking-ticker{
 position:relative!important;top:auto!important;
 margin-top:0!important;transform:none!important;
}
body.sipro-modal-open,body.semas-news-open{overflow:hidden!important}

/* v120: compact button-only coming-soon presentation */
.sipro-books-home-promo{display:flex!important;justify-content:center!important;align-items:center!important;padding:7px 12px!important;margin:0 0 9px!important;min-height:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.sipro-books-home-promo .sipro-books-home-link{width:auto!important;min-width:180px!important;text-align:center!important;cursor:not-allowed!important}
@media(max-width:600px){.sipro-books-home-promo{padding:5px 8px!important;margin-bottom:7px!important}.sipro-books-home-promo .sipro-books-home-link{width:auto!important;max-width:100%!important}}
