/* Shared mobile viewport containment. Keep horizontal scrolling inside data/media panels. */
@media(max-width:767px){
html{max-width:100%;overflow-x:hidden;}
body{min-width:0!important;max-width:100%;overflow-x:hidden;}
@supports(overflow:clip){html,body{overflow-x:clip;}}
main,.main,.sd-main,.edu-layout,.account-layout,.dashboard-layout{min-width:0;max-width:100%;box-sizing:border-box;}
:is(.edu-layout,.account-layout,.dashboard-layout,.section-title,.system-heading,.actions)>*{min-width:0;}
:is(.site-header,.ag-site-header,.account-header,.student-header,.sd-header){max-width:100%;box-sizing:border-box;}
:is(.site-header,.ag-site-header,.account-header,.student-header,.sd-header) .actions{min-width:0;max-width:100%;}
body.reference-home header .actions>.outline,body.reference-home header .actions>.primary{display:none!important;}
.section-title h2,.system-heading h2{min-width:0;white-space:normal;overflow-wrap:break-word;}
.system{min-width:0;overflow:hidden;}
.system>img{max-width:100%;box-sizing:border-box;object-fit:cover;}
video,iframe,object,embed{max-width:100%;box-sizing:border-box;}
input,select,textarea{min-width:0;max-width:100%;box-sizing:border-box;}
pre{max-width:100%;overflow-x:auto;}
.table-responsive,.table-wrap,.table-wrapper,.data-table-wrap{max-width:100%;overflow-x:auto;}
.ag-more-menu{min-width:min(220px,calc(100vw - 24px));max-width:calc(100vw - 24px);box-sizing:border-box;}
}

/* Course hub: reference-inspired overview and content layout, Gurukul colors. */
.course-hub{max-width:960px;margin:0 auto 32px;background:#fffdf7;border:1px solid #eadbbd;border-radius:14px;overflow:hidden;color:#372e24;box-shadow:0 6px 24px #6330000a}.course-hub-tabs{display:flex;gap:10px;padding:14px 18px;border-bottom:1px solid #eadbbd;background:#fff9eb}.course-hub-tabs button{appearance:none;background:transparent;border:0;border-radius:22px;padding:10px 22px;color:#625346;font:600 15px Arial,sans-serif;cursor:pointer}.course-hub-tabs button[aria-selected=true]{background:#850c19;color:#fff;box-shadow:0 3px 10px #850c1920}.course-hub-tabs button:focus-visible,.course-hub-lesson:focus-visible{outline:3px solid #d6a632;outline-offset:-3px}.course-hub-panel{padding:22px}.course-hub-cover{display:block;width:100%;max-height:360px;aspect-ratio:2/1;object-fit:contain;background:#f7f0df;border-radius:10px;margin-bottom:20px}.course-hub-title{margin:0 0 12px!important;font:700 24px/1.3 Arial,sans-serif!important;color:#790000!important}.course-hub-facts{font:600 13px/1.5 Arial,sans-serif;color:#887046;margin:10px 0 18px}.course-hub-about,.course-hub-details{padding:18px 0;border-top:1px solid #eee2cb}.course-hub-about h3,.course-hub-details h3{font:700 17px/1.3 Arial,sans-serif;color:#790000;margin:0 0 10px}.course-hub-about p,.course-hub-details p,.course-hub-status{font:14px/1.7 Arial,sans-serif;white-space:pre-line;margin:6px 0}.course-hub-primary{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:#850c19;color:#fff;font:600 14px/1.4 Arial,sans-serif;padding:12px 18px;margin:8px 0 18px;cursor:pointer}.course-hub-search{display:block;width:100%;box-sizing:border-box;border:1px solid #e2d7c3;border-radius:8px;background:#fff;padding:13px 14px;font:15px Arial,sans-serif;color:#372e24;margin:14px 0}.course-hub-list{display:flex;flex-direction:column}.course-hub-lesson{display:flex;align-items:center;gap:14px;width:100%;box-sizing:border-box;padding:15px 0;background:transparent;border:0;border-top:1px solid #eee2cb;text-align:left;color:inherit;cursor:pointer}.course-hub-lesson[hidden]{display:none}.course-hub-thumb,.course-hub-thumb-placeholder{width:110px;height:64px;object-fit:cover;border-radius:6px;background:#f6edd9;flex:none}.course-hub-thumb-placeholder{display:grid;place-items:center;color:#850c19;font-size:24px}.course-hub-lesson-copy{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.course-hub-lesson-copy strong{font:600 15px/1.4 Arial,sans-serif;overflow-wrap:anywhere}.course-hub-lesson-number{font:600 10px/1.3 Arial,sans-serif;color:#a17e3d;letter-spacing:.6px}.course-hub-lesson-copy small{font:12px/1.4 Arial,sans-serif;color:#817363}.course-hub-arrow{font:24px Arial,sans-serif;color:#ac8c53}.edu-course-focused .edu-hero{padding-bottom:14px!important}.edu-course-focused .edu-hero h1{font-size:26px!important;line-height:1.3!important}.course-hub .edu-rich-lesson{margin:0;border:0;box-shadow:none}.course-hub [hidden]{display:none!important}@media(max-width:600px){.course-hub{border-radius:10px;margin-bottom:20px}.course-hub-tabs{padding:10px 12px;gap:8px}.course-hub-tabs button{padding:9px 18px;font-size:14px}.course-hub-panel{padding:16px 12px}.course-hub-title{font-size:20px!important}.course-hub-thumb,.course-hub-thumb-placeholder{width:82px;height:48px}.course-hub-lesson{gap:10px;padding:14px 0}.course-hub-lesson-copy strong{font-size:14px}.course-hub-lesson-copy small{font-size:11px}.edu-course-focused .edu-hero h1{font-size:21px!important}.course-hub-cover{margin-bottom:16px}.course-hub-primary{max-width:100%;box-sizing:border-box}}
/* Student header: match the compact, single-row mobile reference. */
@media (max-width:767px){
body:has(.student-header) .ag-site-header.student-header{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:space-between!important;gap:clamp(4px,1.5vw,9px)!important;padding:7px 12px!important;min-height:64px!important;height:auto!important;max-width:100%!important;overflow:visible!important;box-sizing:border-box!important}
body:has(.student-header) .ag-site-header.student-header .student-header-menu{display:grid!important;place-items:center!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important;margin:0!important;padding:0!important;order:0!important}
body:has(.student-header) .ag-site-header.student-header .student-header-brand{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 1 clamp(105px,34vw,178px)!important;width:clamp(105px,34vw,178px)!important;min-width:0!important;max-width:178px!important;margin:0!important;padding:0!important;order:1!important}
body:has(.student-header) .ag-site-header.student-header .student-header-brand img{display:block!important;width:100%!important;max-width:100%!important;height:54px!important;max-height:54px!important;object-fit:contain!important}
body:has(.student-header) .ag-site-header.student-header .student-header-search{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 42px!important;width:42px!important;min-width:42px!important;max-width:42px!important;margin:0!important;padding:0!important;order:2!important}
body:has(.student-header) .ag-site-header.student-header .student-header-search input{display:none!important}
body:has(.student-header) .ag-site-header.student-header .student-header-search button{display:grid!important;place-items:center!important;flex:0 0 42px!important;width:42px!important;min-width:42px!important;height:42px!important;margin:0!important;padding:0!important}
body:has(.student-header) .ag-site-header.student-header .student-header-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important;gap:clamp(4px,1.2vw,8px)!important;min-width:0!important;margin:0 0 0 auto!important;padding:0!important;order:3!important}
body:has(.student-header) .ag-site-header.student-header .student-header-actions .dh-bell{display:none!important}
body:has(.student-header) .ag-site-header.student-header .student-header-actions .language{display:flex!important;align-items:center!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;padding:5px 7px!important;font-size:13px!important;white-space:nowrap!important}
body:has(.student-header) .ag-site-header.student-header .dh-profile{display:block!important;flex:0 0 auto!important;width:auto!important;margin:0!important;padding:0!important}
body:has(.student-header) .ag-site-header.student-header .student-header-profile{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;gap:0!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important}
body:has(.student-header) .ag-site-header.student-header .student-header-profile>span:not(.student-header-avatar){display:none!important}
body:has(.student-header) .ag-site-header.student-header .student-header-avatar{display:grid!important;place-items:center!important;flex:0 0 38px!important;width:38px!important;min-width:38px!important;height:38px!important;margin:0!important}
}
@media (max-width:380px){
body:has(.student-header) .ag-site-header.student-header{position:sticky!important;top:0!important;z-index:1000!important;gap:4px!important;padding:7px 8px!important}
body:has(.student-header) .ag-site-header.student-header .student-header-menu{flex-basis:34px!important;width:34px!important;min-width:34px!important;height:34px!important}
body:has(.student-header) .ag-site-header.student-header .student-header-brand{flex-basis:clamp(82px,29vw,112px)!important;width:clamp(82px,29vw,112px)!important;max-width:112px!important}
body:has(.student-header) .ag-site-header.student-header .student-header-brand img{height:46px!important;max-height:46px!important}
body:has(.student-header) .ag-site-header.student-header .student-header-search,body:has(.student-header) .ag-site-header.student-header .student-header-search button{flex-basis:32px!important;width:32px!important;min-width:32px!important;height:32px!important}
body:has(.student-header) .ag-site-header.student-header .student-header-actions .language{padding:4px 3px!important;font-size:11px!important}
body:has(.student-header) .ag-site-header.student-header .student-header-avatar{flex-basis:28px!important;width:28px!important;min-width:28px!important;height:28px!important}
}

/* Keep reference student header controls on one row on learning pages. */
@media(max-width:950px){body:has(.student-header) .ag-site-header.student-header .student-header-actions{width:auto!important;min-height:0!important;align-self:center!important}}
