/* Shared sizing and mobile rail. Loaded after page styles. */
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%;overflow-x:clip}
img,video,iframe,svg{max-width:100%}
.portal-workspace,.portal-content,.portal-content>*,.discovery>*,.auth-card-expanded{min-width:0}
.portal-content :is(input,select,textarea){max-width:100%}
.portal-content :is(.panel,.tool-panel,.op-panel,.profile-editor,.course-layout>*,.lesson-layout>*,.op-referral-hero>*){min-width:0}
.lesson-row>span:nth-child(2){min-width:0;flex:1}
:is(.lesson-row b,.lesson-preview-copy strong,.discipline-module h3,.discipline-card h3,.course-card h3,.module h2,.lesson-sequence a,.page-heading h1,.catalog-card h3){display:block!important;min-width:0;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase!important;-webkit-line-clamp:unset!important}
.sidebar-mobile-toggle,.sidebar-backdrop{display:none}
.portal-sidebar .sidebar-link .icon,.portal-sidebar .sidebar-collapse .icon{width:24px!important;height:24px!important;min-width:24px!important;flex:0 0 24px!important}.portal-sidebar .sidebar-link{min-height:48px}.question-module,.question-module-body{min-width:0;max-width:100%}.discipline-module h3{width:100%;max-width:100%;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.discipline-module .question-module-body{width:100%;overflow:hidden}.access-label{display:inline-block;font-size:12px;font-weight:700;margin:8px 0;color:var(--theme-accent)}
.profile-appearance{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;padding:16px;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface)}
.profile-appearance button{display:flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-surface-muted);color:var(--theme-text);font:inherit;cursor:pointer}
[data-essay-body]{min-height:220px;height:auto;resize:vertical;overflow-y:hidden;line-height:1.6}
.op-referral-hero{max-width:100%;flex-wrap:wrap;overflow:hidden}
.op-referral-hero>div{max-width:100%}.referral-balance{min-width:0;overflow-wrap:anywhere}
.op-copy-row input{min-width:0}.game-keypad button{background:#eee7ff;color:#42236e;border:1px solid #b9a4dc}
/* Playing is a viewport scene, including browsers without the Fullscreen API. */
body.game-is-playing{overflow:hidden}
body.game-is-playing .game-play{position:fixed;inset:0;z-index:300;width:100%;max-width:none;height:100dvh;margin:0!important;padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom));background:var(--theme-surface,#fff);color:var(--theme-text,#20243a);display:flex;flex-direction:column;gap:8px;text-align:center;overflow:hidden}
.game-viewport-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;height:40px}
.game-viewport-toolbar strong{min-width:0;flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;text-transform:uppercase}
.game-viewport-toolbar button{border:1px solid var(--theme-border);border-radius:10px;padding:8px 12px;background:var(--theme-surface-muted);color:var(--theme-text);cursor:pointer;font:inherit}
body.game-is-playing .game-play>div:not(.game-viewport-toolbar){width:min(100%,760px);min-height:0;flex:1;margin:0 auto;display:flex;flex-direction:column;gap:8px}
body.game-is-playing :is(.game-play h3,.game-play p,.game-progress,.quiz-game-options,.memory-board){margin:0}
body.game-is-playing .game-play h3{font-size:clamp(22px,5vh,44px);line-height:1.2}
body.game-is-playing .game-play [data-quiz-prompt]{font-size:clamp(16px,2.8vh,23px);text-align:left;min-height:0;overflow:auto;flex:1}
body.game-is-playing .game-play-top{font-size:13px;flex:none}
body.game-is-playing .game-progress{height:5px;flex:none}
body.game-is-playing .game-answer{min-height:40px;padding:5px;font-size:26px;border-color:#baa6de}
body.game-is-playing .game-keypad{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:1;min-height:0;width:min(100%,400px);max-width:400px;margin:0 auto}
body.game-is-playing .game-keypad button{min-height:32px;padding:4px;font-size:22px}
body.game-is-playing :is(.tool-primary,.op-outline){padding:9px 12px;min-height:36px;font-size:14px;flex:none}
body.game-is-playing :is(.game-feedback,[data-quiz-feedback]){font-size:13px;min-height:0;max-height:18dvh;overflow:auto;line-height:1.35}
body.game-is-playing .quiz-game-options{grid-template-columns:1fr;gap:6px;flex:none}
body.game-is-playing .quiz-game-options button{padding:9px 12px;font-size:14px;line-height:1.3}
body.game-is-playing .memory-board{flex:1;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:6px}
body.game-is-playing .memory-board button{min-height:0;font-size:clamp(11px,2vh,16px);padding:5px;overflow-wrap:anywhere}
.game-play[hidden]{display:none!important}
@media(max-width:760px){
 html{scroll-padding-top:64px}body{width:100%;margin:0}
 .portal-shell{display:block!important;width:100%;min-width:0}
 .portal-body .portal-sidebar{position:fixed!important;inset:0 auto 0 0!important;width:min(280px,85vw)!important;height:100dvh;transform:translateX(-100%)!important;visibility:hidden;z-index:110;padding:16px 8px!important;overflow:hidden;display:flex;flex-direction:column}
 .portal-body .portal-workspace{width:100%!important;margin-left:0!important;min-width:0}
 .portal-sidebar .sidebar-brand,.portal-sidebar .sidebar-collapse,.portal-sidebar .sidebar-group-label,.portal-sidebar .sidebar-label{display:none!important}
 .portal-sidebar .sidebar-mobile-toggle{display:grid;place-items:center;flex:none;width:44px;height:44px;margin:0 auto 8px;border:1px solid #ffffff30;border-radius:10px;background:#ffffff12;color:white;font-size:24px;cursor:pointer}
 .portal-sidebar .sidebar-nav{flex:1;min-height:0;padding:0!important;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:auto;scrollbar-width:none}
 .portal-sidebar .sidebar-link{display:flex;justify-content:center;gap:10px;min-height:44px;width:100%;padding:10px 8px!important;margin:3px 0!important;white-space:nowrap}
 .portal-sidebar .sidebar-link .icon{width:22px;height:22px;flex:none}
 body.portal-body.sidebar-mobile-open .portal-sidebar{transform:none!important;visibility:visible!important;width:min(300px,85vw)!important}
 .sidebar-mobile-open .portal-sidebar .sidebar-label{display:inline!important;min-width:0;overflow:hidden;text-overflow:ellipsis}
 .sidebar-mobile-open .portal-sidebar .sidebar-link{justify-content:flex-start}
 .sidebar-mobile-open .sidebar-backdrop{display:block;position:fixed;inset:0;z-index:105;background:#0005;border:0;cursor:pointer}
 .portal-header{position:sticky!important;top:0;z-index:100;display:flex!important;flex-wrap:nowrap!important;gap:6px;min-height:60px;height:60px;padding:8px!important;width:100%;min-width:0}
 .portal-header h1{flex:1;min-width:0;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px!important;line-height:1.3}
 .portal-header .mobile-menu,.portal-header .header-cart{display:none!important}
 .portal-header .sidebar-mobile-toggle{display:grid!important;place-items:center;width:44px!important;height:44px!important;flex:0 0 44px;border:0;background:transparent;color:inherit;cursor:pointer}.portal-header .sidebar-mobile-toggle svg{width:32px;height:24px}
 .portal-header .header-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:6px;margin:0;width:auto!important;flex:none}
 .portal-header .header-actions :is(.header-icon-button,.josy-trigger){display:grid;place-items:center;width:32px!important;height:32px!important;min-width:32px!important;padding:0!important;border-radius:9px}
 .portal-header .josy-trigger :is(b,.josy-count,small){display:none!important}.portal-header .josy-spark{font-size:22px}
 .portal-header .header-name{display:none!important}.portal-header .header-avatar{width:32px!important;height:32px!important;font-size:15px}
 .portal-header .header-actions .header-profile{width:32px!important;height:32px!important;padding:0!important}
 .header-dropdown{position:fixed;top:64px;right:8px;width:min(340px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 80px);overflow:auto}
 .portal-content{padding:12px 10px!important;width:100%;min-width:0}
 .portal-content :is(input:not([type=checkbox]):not([type=radio]),select,textarea),.auth-card-expanded :is(input,select,textarea){font-size:16px!important}
 .portal-content :is(.page-heading h1,.tool-heading h2,.reference-heading h2,.op-page-heading h2){font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
 .portal-content :is(.tool-heading>div,.reference-heading>div,.page-heading,.op-page-heading){min-width:0}
 .portal-content :is(.planner-layout,.profile-layout,.course-layout,.lesson-layout,.essay-layout,.feed-layout,.op-two-columns,.detail-columns,.overview-charts,.overview-bottom,.overview-kpis,.catalog-grid,.tool-card-grid,.simulation-card){display:grid;grid-template-columns:minmax(0,1fr)!important}
 .portal-content :is(.form-pair,.form-actions,.profile-hero,.panel-top,.op-referral-hero){flex-wrap:wrap}
 .form-pair>*{flex:1 1 100%}.tool-panel,.op-panel,.panel{padding:16px!important}
 .tool-heading{gap:10px}.tool-heading-icon{width:42px;height:42px;border-radius:12px;flex:none}.tool-heading p{font-size:13px}
 .planner-days{grid-template-columns:1fr!important;overflow:visible}.planner-day{min-height:100px}
 .bars-chart{min-width:0!important;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px}.bar-value{font-size:10px}.bar-track{width:75%}
 .op-referral-hero{padding:20px!important;gap:18px}.op-referral-hero h2{font-size:23px}.referral-balance{width:100%}
 .toast-stack{left:10px;right:10px;bottom:12px}.portal-toast{min-width:0;max-width:100%;font-size:13px}
 .discovery-nav,.auth-site-nav{width:100%;padding:10px 14px;gap:8px}.discovery-nav nav,.auth-site-nav nav{min-width:0;gap:6px}
 .discovery-nav nav>a:not(.discovery-primary),.auth-site-nav nav>a:not(.auth-nav-action){display:none}
 .discovery-nav .discovery-primary,.auth-site-nav .auth-nav-action{padding:10px 14px;white-space:nowrap}
 .discovery,.auth-card-expanded{max-width:100%;min-width:0}.auth-card-expanded{margin:18px auto;padding:20px}
 .profile-appearance{flex-wrap:wrap}.essay-nav{flex-direction:row;flex-wrap:wrap}
 .question-paper,.activity-frame,.answer-card{min-width:0}.activity-frame{grid-template-columns:1fr!important}
 .game-detail{padding:16px}.discovery-section-head{flex-wrap:wrap}
}
.profile-notifications{padding:12px;border-top:1px solid var(--theme-border)}.profile-notifications summary{cursor:pointer;font-weight:700}.profile-notification-list a{white-space:normal}.load-more{display:flex;justify-content:center;gap:16px;margin:20px 0}.load-more a{padding:12px 20px;border:1px solid var(--theme-border);border-radius:12px;color:var(--theme-text);font-weight:700}
.social-navigation nav a{display:flex;align-items:center;gap:8px;padding:10px 12px;color:var(--theme-text);text-decoration:none;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface)}.social-navigation nav a.active{background:#6542c7;color:white}.profile-notifications summary{position:relative;padding-right:24px}.profile-notifications .notification-count{right:0;top:0}.subject-tabs a{text-decoration:none;white-space:nowrap}.course-payment-page{display:grid;gap:18px}
@media(max-width:760px){.portal-content .social-board{display:block!important;width:100%;min-width:0}.social-navigation{position:static!important;width:100%!important;padding:0!important;margin-bottom:12px}.social-navigation-brand,.social-navigation h3,.social-navigation>p,.social-side{display:none!important}.social-navigation nav{display:flex!important;overflow-x:auto;gap:6px;padding:4px 0;scrollbar-width:none}.social-navigation nav>a,.social-navigation nav>button{flex:none;white-space:nowrap;width:auto!important;padding:9px 12px!important}.social-stream,.social-stream-posts,.social-entry{width:100%;min-width:0}.social-compose summary{gap:8px;padding:12px!important;font-size:13px}.social-compose summary>span:nth-child(2){flex:1;min-width:0}.social-entry header{padding:12px!important;gap:8px;min-width:0}.social-entry-author{min-width:0;flex:1}.social-entry-author b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.social-entry-content{padding:12px!important;overflow-wrap:anywhere}.social-entry-content h3{font-size:18px!important;line-height:1.4}.social-entry-content p{font-size:15px!important;line-height:1.6;white-space:pre-wrap}.social-entry-image{height:auto!important;max-height:440px;object-fit:contain!important}.social-platform-tag{font-size:10px}.social-entry-comments{padding:12px!important;overflow-wrap:anywhere}.social-entry-comments form{display:flex;gap:8px}.social-entry-comments input{min-width:0;flex:1;width:0}.social-entry-actions,.social-entry-meta{padding:10px 12px!important}.op-plan-grid,.cart-layout{grid-template-columns:minmax(0,1fr)!important}.course-payment-page{min-width:0}.course-payment-page h2{font-size:20px}}
@media(max-height:500px){body.game-is-playing .game-play{padding:6px;gap:4px}.game-viewport-toolbar{height:30px}body.game-is-playing .game-play>div:not(.game-viewport-toolbar){gap:4px}body.game-is-playing .game-play h3{font-size:22px}body.game-is-playing .game-keypad{max-width:360px;gap:3px}body.game-is-playing .game-keypad button{min-height:24px;padding:1px;font-size:16px}body.game-is-playing .game-answer{min-height:30px;font-size:20px}body.game-is-playing :is(.tool-primary,.op-outline){min-height:28px;padding:4px;font-size:12px}}
