/* MADA V107 CONSOLIDATED — contrast and stable navigation across grades and staff. */
:root { --mada107-ink:#1e2c41; --mada107-muted:#48596d; }
body[data-mada-page="home"] .mada105-card { -webkit-tap-highlight-color:transparent }
body[data-mada-page="home"] .mada105-card .mada105-card-copy strong,
body[data-mada-page="home"] .mada105-card .mada105-card-copy small { opacity:1!important;filter:none!important }
body[data-mada-page="home"] .mada105-card-copy { min-width:0;overflow-wrap:anywhere }
body[data-mada-page="home"] .mada105-card .mada105-card-copy::before { box-shadow:0 1px 8px #25364b10 }
/* Bright junior and middle feature cards must never use white copy on pastel. */
body[data-mada-age-home="junior"] .mada105-card-copy strong,
body[data-mada-age-home="junior"] .mada105-card-copy small,
body[data-mada-age-home="middle"] .mada105-small .mada105-card-copy strong,
body[data-mada-age-home="middle"] .mada105-small .mada105-card-copy small,
body[data-mada-age-home="middle"] .mada105-reports .mada105-card-copy strong { color:var(--mada107-ink)!important;text-shadow:none!important; }
body[data-mada-age-home="junior"] .mada105-card-copy::before,
body[data-mada-age-home="middle"] .mada105-small .mada105-card-copy::before {background:#ffffffbd!important}
/* White-on-dark cards are given a contrast backing. */
body[data-mada-age-home="middle"] .mada105-hero .mada105-card-copy::before,
body[data-mada-age-home="middle"] .mada105-class .mada105-card-copy::before,
body[data-mada-age-home="senior"] .mada105-hero .mada105-card-copy::before,
body[data-mada-age-home="senior"] .mada105-small .mada105-card-copy::before,
body[data-mada-age-home="senior"] .mada105-reports .mada105-card-copy::before { background:#13253cc9!important }
/* Keep old teachers' panels readable regardless of decorative themes. */
.mada108 .mada108-stat span,.mada108 .mada108-panel-title p {color:#53627a!important}
.mada108 .mada108-action-copy small { color:#576881!important }
.mada108 .mada108-welcome h1,.mada108 .mada108-action-copy b {color:#223147!important}
/* Every normal compact viewport scrolls inside main; do not lock out vertical scrolling. */
@media(max-width:1199px){
 html{scroll-behavior:auto}
 body[data-mada-page="home"] .mada105-bottom,
 body.mada-unified-content .mada-unified-bottom{position:fixed!important;inset:auto 0 0!important;top:auto!important;bottom:0!important;max-height:none!important;height:auto!important;width:100%!important;transform:none!important;z-index:9400!important}
 body[data-mada-page="home"] #main{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))!important;}
 body[data-mada-page="home"] .mada105-shell{padding-bottom:calc(106px + env(safe-area-inset-bottom,0px))!important}
 body.mada-unified-content #main.mada-unified-main{padding-bottom:calc(105px + env(safe-area-inset-bottom,0px))!important}
 body.mada-compact-nav #main{overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch;overscroll-behavior-y:auto}
 body[data-mada-page="home"] .mada105-bottom button,
 body.mada-unified-content .mada-unified-bottom button { min-height:50px!important;flex:1 1 0; min-width:0; }
 body.mada-unified-focus .mada-unified-bottom { display:none!important }
}
/* Retain large sidebar-based layouts on desktop, not stretched child tiles. */
@media(min-width:1200px){body.mada108-staff-user .mada108{max-width:1500px}}
@media(prefers-reduced-motion:reduce){.mada105-card,.mada108-action {transition:none!important}}
