.mbm-sp-entry{display:inline-flex;align-items:center;min-height:44px;margin:6px 0;text-decoration:none;padding:8px 12px;border:2px solid currentColor;border-radius:8px;font-weight:700}
.mbm-sp-dialog{width:min(1100px,94vw);max-height:92dvh;margin:auto;padding:0;border:3px solid #356f83;border-radius:18px;background:#fff;color:#1f2937;font-family:"Segoe UI",Arial,sans-serif;overflow:auto}
.mbm-sp-dialog::backdrop{background:#13233bcc}
.mbm-sp-closebar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 22px;border-bottom:2px solid #d6dfe4;background:#e4ebee;position:sticky;top:0;z-index:2}
.mbm-sp-closebar h2{font-size:1.15rem;margin:0;border:0}
.mbm-sp-body{padding:22px;max-width:1050px;margin:auto;font-size:1.12rem;line-height:1.5}
.mbm-sp-body h2{font-size:clamp(1.6rem,4vw,2.25rem);line-height:1.15;color:#1f2937;margin:12px 0}
.mbm-sp-kicker{font-size:.88rem;font-weight:800;color:#8e4f82;letter-spacing:.04em}
.mbm-sp-files{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}
.mbm-sp-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border:0;border-radius:8px;background:#356f83;color:#fff!important;font:700 1rem "Segoe UI",Arial,sans-serif;text-decoration:none;cursor:pointer;line-height:1.25}
.mbm-sp-button[hidden]{display:none!important}
.mbm-sp-body a:not(.mbm-sp-button){color:#265a6d;text-decoration:underline;text-underline-offset:3px}
.mbm-sp-body .mbm-sp-section{border:2px solid #c5d5dc;border-radius:12px;padding:14px 18px;margin:16px 0}
.mbm-sp-body summary{min-height:44px;padding:8px 0;font-weight:750;cursor:pointer;color:#265a6d;line-height:1.4}
.mbm-sp-body .mbm-sp-answer{padding:8px 14px;border-left:5px solid #238c80;background:#e1edeb;margin:14px 0}
.mbm-sp-body figure{margin:18px 0}
.mbm-sp-body img{display:block;width:100%;max-height:480px;object-fit:contain;background:#101c38;border-radius:12px}
.mbm-sp-body figcaption,.mbm-sp-small{font-size:.9rem;color:#4b5965}
.mbm-sp-table-wrap{overflow-x:auto;margin:16px 0}
.mbm-sp-body table{width:100%;border-collapse:collapse;font-size:1.05rem}
.mbm-sp-body td,.mbm-sp-body th{border:1px solid #a8bdc8;padding:10px 12px;text-align:left;vertical-align:top}
.mbm-sp-body thead th{background:#e4ebee}.mbm-sp-body tbody th{font-weight:600}
.mbm-sp-label{display:block;font-weight:700;margin:14px 0 5px}.mbm-sp-label span{font-weight:400}
.mbm-sp-body textarea{box-sizing:border-box;display:block;width:100%;border:2px solid #91aebc;border-radius:8px;padding:10px;font:inherit;background:#fff;color:#1f2937;resize:vertical;min-height:80px}
.mbm-sp-notice{border-left:5px solid #c18b2d;background:#f6eed9;padding:14px}
.mbm-sp-video iframe{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:8px;background:#101c38}
.mbm-sp-body li{margin:.5em 0}
.mbm-sp-page{margin:0;background:#edf1f3;color:#1f2937;font-family:"Segoe UI",Arial,sans-serif}
.mbm-sp-page main{margin:24px auto;background:#fff;border-top:9px solid #356f83;border-radius:16px;box-sizing:border-box}
.mbm-sp-body :focus-visible,.mbm-sp-closebar :focus-visible,.mbm-sp-entry:focus-visible{outline:4px solid #d39b2c;outline-offset:3px}
@media(max-width:600px){.mbm-sp-body{padding:14px;font-size:1.05rem}.mbm-sp-body .mbm-sp-section{padding:10px}.mbm-sp-closebar{padding:10px}.mbm-sp-files{flex-direction:column}.mbm-sp-body td,.mbm-sp-body th{padding:8px}.mbm-sp-page main{margin:8px}}
@media print{.mbm-sp-dialog,.mbm-sp-entry{display:none!important}.mbm-sp-page{background:#fff}.mbm-sp-page main{margin:0;border:0;padding:0}.mbm-sp-page nav,.mbm-sp-video,.mbm-sp-files{display:none}.mbm-sp-body figure,.mbm-sp-body table{break-inside:avoid}.mbm-sp-body textarea{min-height:24mm}}

/* Keep native stage controls clear of the reviewed site Back button on touch screens. */
@media screen and (max-width:960px){
 body:has(#mbm-science-pack) .controls{bottom:76px}
 body:has(#mbm-science-pack) .progress-label{bottom:124px}
 body:has(#mbm-science-pack) .slide-container{padding-bottom:156px}
 body:has(#mbm-science-pack):has(#mbmhud-home) .controls{bottom:124px}
 body:has(#mbm-science-pack):has(#mbmhud-home) .progress-label{bottom:172px}
 body:has(#mbm-science-pack):has(#mbmhud-home) .slide-container{padding-bottom:204px}
}
/* Standalone resource pages keep the shared tools after the teaching content. */
@media screen{
 .mbm-sp-page>#mbmhud-back,.mbm-sp-page>#mbmhud-home,.mbm-sp-page>#mbmhud-pill{position:static!important;left:auto!important;bottom:auto!important;transform:none!important;margin:12px 6px;vertical-align:middle}
}
/* Print the opened pupil task with writable space, without collapsed resource headings. */
@media print{
 .mbm-sp-page .mbm-sp-body{max-width:none;font-size:11pt;line-height:1.35;padding:10mm!important}
 .mbm-sp-page .mbm-sp-body>.mbm-sp-section:not([open]),.mbm-sp-page .mbm-sp-answer,.mbm-sp-page .mbm-sp-small{display:none!important}
 .mbm-sp-page .mbm-sp-body .mbm-sp-section{margin:8px 0;padding:10px}
 .mbm-sp-page .mbm-sp-body summary{min-height:0;padding:4px 0}
 .mbm-sp-page .mbm-sp-body li{margin:.25em 0}
 .mbm-sp-page .mbm-sp-body td,.mbm-sp-page .mbm-sp-body th{padding:5px 7px;font-size:11pt}
 .mbm-sp-page .mbm-sp-body textarea{height:24mm;min-height:24mm;resize:none}
}
