/* Shared, opt-in display changes. Default Tell layouts remain intact. */
html[data-tell-a11y] :focus-visible{outline:3px solid #173b87!important;outline-offset:4px!important}
html[data-tell-a11y] [data-tell-text]{font-size:calc(var(--tell-base-text)*var(--tell-text-scale,1))!important}
html[data-tell-measuring] [data-tell-text]{font-size:revert-layer!important}
/* Measurements use the underlying author style, not an already enlarged ancestor. */
html[data-tell-measuring] [data-tell-text]{font-size:var(--tell-base-text)!important}
.tell-reading-open{font:700 16px/1.2 Nunito,Arial,sans-serif!important;min-width:44px!important;min-height:44px!important;padding:8px!important;border:2px solid #7185ad!important;border-radius:14px!important;color:#243b64!important;background:#fffefa!important;cursor:pointer;flex-shrink:0}
html[data-tell-a11y] .tell-reading-open{font-size:20px!important;white-space:nowrap!important;width:48px!important;max-width:48px!important;height:48px!important}
.compacttop .tell-reading-open{order:1}.compacttop .xpchip{margin-left:auto}.portal-header{flex-wrap:wrap;gap:10px}
.tell-skip-link{position:fixed;left:8px;top:-180px;z-index:100000;background:white;color:#173b87;padding:12px;border:3px solid #173b87}.tell-skip-link:focus{top:8px}
#tell-reading-dialog{position:fixed;inset:0;margin:auto;width:min(540px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;box-sizing:border-box;border:3px solid #243b64;border-radius:20px;background:#fffefa;color:#243b64;font:16px/1.5 Nunito,Arial,sans-serif;z-index:100001}
#tell-reading-dialog::backdrop{background:#172647aa}#tell-reading-dialog h2{margin:0 0 12px}#tell-reading-dialog label{display:block;font-weight:800;margin-top:16px}#tell-reading-dialog select{display:block;width:100%;height:auto;min-height:48px;white-space:normal;padding:10px;border:2px solid #65799e;border-radius:8px;color:#243b64;background:white}#tell-reading-dialog button{min-height:44px;margin:8px 6px 0 0;padding:8px 12px;border:2px solid #65799e;border-radius:8px;color:#243b64;background:#ffdf76;white-space:normal}#tell-reading-dialog input{width:22px;height:22px}#tell-reading-dialog [data-tell-text]{max-width:100%;overflow-wrap:anywhere}
html[data-tell-theme=contrast]{--tell-surface:#fff;--tell-ink:#12233e;--tell-edge:#263f65}
html[data-tell-theme=cream]{--tell-surface:#fff3d8;--tell-ink:#302921;--tell-edge:#695c45}
html[data-tell-theme=contrast] body,html[data-tell-theme=cream] body{background:var(--tell-surface)!important;color:var(--tell-ink)!important}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) :is(.shell,.content,.lessoncard,.remember,.example,.case-dialogue,.case-takeaway,.practicecard,.practiceanswer,.wp-settings,.panel,.choice,.subscription,.teacher-screen-heading,.topic-card,.path-copy,.message,.mailcontent,.mailbody,.feedback,.profile-summary,.school-help,.portal-header,.teacher-bottom-nav,.game-tabs,.compacttop,.ts-login-intro,.login form,#tell-reading-dialog){background:var(--tell-surface)!important;color:var(--tell-ink)!important;border-color:var(--tell-edge)!important}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) :is(p,h1,h2,h3,h4,small,strong,b,label,span,td,th,a){color:var(--tell-ink)!important}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) :is(button,select,input,textarea,.button,.lessonbadge,.xpchip){color:var(--tell-ink)!important;background:var(--tell-surface)!important;border:2px solid var(--tell-edge)!important}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) a{text-decoration:underline!important}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) [aria-current=page],html:is([data-tell-theme=contrast],[data-tell-theme=cream]) .game-tabs .selected{outline:3px solid var(--tell-edge);outline-offset:-5px}
html[data-tell-motion=reduce] *,html[data-tell-motion=reduce] *::before,html[data-tell-motion=reduce] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){html[data-tell-a11y] *,html[data-tell-a11y] *::before,html[data-tell-a11y] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(main.content,.portal-main,.auth-card){overflow-wrap:anywhere}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .shell{display:flex!important;flex-direction:column!important;height:100dvh!important;min-height:0!important;padding-bottom:calc(122px + env(safe-area-inset-bottom))!important;box-sizing:border-box!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) main.content{display:block!important;flex:1 1 0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;padding:16px!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .lessonstage{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;margin-bottom:20px}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(.lessoncard,.practicecard,.case-dialogue,.playarea,.mailcontent,.feedback,.settingrow,.startscreen,.topic-card,.path-case,.achcard,.case-story){height:auto!important;max-height:none!important;min-height:min-content;overflow:visible!important;white-space:normal!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(button,a,input,select,textarea){white-space:normal;max-width:100%;height:auto;min-height:44px;overflow-wrap:anywhere}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(.game-tabs,.teacher-bottom-nav){height:112px!important;min-height:112px;align-items:stretch;padding-bottom:env(safe-area-inset-bottom);box-sizing:content-box}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(.game-tabs button,.teacher-bottom-nav a){padding:6px 2px!important;min-width:0;line-height:1.15!important;display:flex;flex-direction:column;justify-content:center;align-items:center}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(.game-tabs span,.teacher-bottom-nav span){overflow-wrap:anywhere}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(.decision,.settingrow,.lessonhead){flex-wrap:wrap;gap:12px}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .decision button{flex:1 1 180px}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .compacttop{flex:0 0 auto!important;height:auto!important;min-height:76px!important;align-items:center!important;padding-top:8px!important;padding-bottom:8px!important;overflow:visible!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) :is(.game-tabs span,.teacher-bottom-nav span){white-space:normal!important;width:100%;max-width:100%;line-height:1.15!important;overflow-wrap:anywhere!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .game-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;column-gap:8px!important;width:100%!important;box-sizing:border-box!important;height:calc(122px + env(safe-area-inset-bottom))!important;padding-left:max(8px,calc((100% - 620px)/2))!important;padding-right:max(8px,calc((100% - 620px)/2))!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .game-tabs button{width:100%!important;min-width:0!important;box-sizing:border-box!important}
html[data-tell-text-size]:not([data-tell-text-size=standard]) .ts-teacher .portal-main{padding-bottom:140px}
html[data-tell-text-size=largest] :is(.topic-grid,.achgrid){grid-template-columns:minmax(0,1fr)!important}
@media(max-width:900px){html[data-tell-text-size]:not([data-tell-text-size=standard]) .lessonstage{display:grid!important;grid-template-columns:minmax(0,1fr)!important}html[data-tell-text-size]:not([data-tell-text-size=standard]) .compacttop{gap:7px;min-height:64px;flex-wrap:wrap}html[data-tell-text-size]:not([data-tell-text-size=standard]) .compacttop .xpchip{padding:8px!important}html[data-tell-text-size]:not([data-tell-text-size=standard]) .topic-grid{grid-template-columns:minmax(0,1fr)!important}}
/* Settings never add a row to the sign-in page or game toolbar. */
.tell-entry-menu-open{display:inline-grid!important;place-items:center;width:44px!important;height:44px!important;min-width:44px;min-height:44px;padding:9px!important;border:2px solid #bac8e8!important;border-radius:14px!important;background:#fffefa!important;color:#30436b!important;box-shadow:0 3px #bac8e8;cursor:pointer;flex-shrink:0}
.tell-entry-menu-open svg{display:block;width:24px;height:24px}.tell-entry-menu-open.is-entry{position:fixed;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));z-index:1000;margin:0!important}
.tell-reading-setting{display:block;min-height:44px;padding:12px 16px;border:2px solid #bac8e8;border-radius:14px;background:#fffefa;color:#30436b;font:800 16px Nunito,system-ui;cursor:pointer}
.tell-ui-dialog{position:fixed;inset:0;margin:auto;width:min(440px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:2px solid #bac8e8;border-radius:20px;background:#fffefa;color:#263452;font:16px/1.5 Nunito,system-ui;box-sizing:border-box}
.tell-ui-dialog::backdrop{background:#172647aa}.tell-ui-dialog form{display:grid;gap:16px}.tell-ui-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.tell-ui-dialog h2{margin:0;font:800 26px/1.2 'Baloo 2',Nunito,system-ui}.tell-ui-dialog button{min-height:44px;padding:10px 14px;border:2px solid #bac8e8;border-radius:12px;background:#eee8ff;color:#30436b;font:800 16px Nunito,system-ui;cursor:pointer}.tell-ui-dialog .tell-dialog-close{width:44px;padding:4px;font-size:26px}.tell-ui-dialog nav{display:grid;gap:8px}.tell-ui-dialog a{display:flex;align-items:center;min-height:44px;color:#6550b5}.tell-ui-dialog small{color:#62708b}.tell-ui-dialog li{margin-bottom:12px}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) .tell-ui-dialog{background:var(--tell-surface);color:var(--tell-ink);border-color:var(--tell-edge)}
/* Fit the usual entry screens to the browser's usable viewport; retain natural
   overflow for zoom, enlarged text, keyboards, validation and short landscape. */
body.tell-login,body.ts-auth,body.login.tell-school-login{min-height:100dvh;box-sizing:border-box}
body.tell-login main.tell-auth{display:flex;flex-direction:column;gap:10px;padding:20px 0 12px;width:min(440px,calc(100% - 40px));box-sizing:border-box}
body.tell-login main.tell-auth>*{margin:0}
body.tell-login main.tell-auth .auth-logo{width:150px;height:auto;max-height:74px;align-self:center;margin:0 0 4px}
body.tell-login main.tell-auth h1{font-size:26px;line-height:1.15}
body.tell-login main.tell-auth>p{font-size:15px;line-height:1.4}
body.tell-login main.tell-auth .auth-small{font-size:12px!important;line-height:1.4}
body.tell-login main.tell-auth .auth-tabs{margin:2px 0 4px;padding:4px;min-height:48px;box-sizing:border-box}
body.tell-login main.tell-auth .auth-tabs a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:6px 12px;box-sizing:border-box}
body.tell-login main.tell-auth form{gap:12px}
body.tell-login main.tell-auth label{gap:6px}
body.tell-login main.tell-auth input:not([type=checkbox]),body.tell-login main.tell-auth select{min-height:46px;padding:10px 12px}
body.tell-login main.tell-auth form>button{min-height:48px;padding:10px 16px;font-size:18px;line-height:1.3}
body.tell-login main.tell-auth .outsight-credit{min-height:32px;gap:4px;align-items:center;font-size:12px;line-height:1.4}
body.tell-login main.tell-auth .outsight-credit a{min-height:32px}
body.ts-auth .portal-main{width:min(440px,calc(100% - 40px));padding:20px 0 0}
body.ts-auth .welcome{margin:0 auto 16px}
body.ts-auth .welcome .school-brand{margin-bottom:12px}
body.ts-auth .welcome .school-brand img{width:150px}
body.ts-auth .welcome h1{margin:6px 0;font-size:26px}
body.ts-auth .welcome>p{margin:8px 0;font-size:15px;line-height:1.4}
body.ts-auth .choices{gap:14px}
body.ts-auth .choice{padding:14px 18px}
body.ts-auth .choice h2{font-size:23px;margin-bottom:6px}
body.ts-auth .choice p{font-size:15px;line-height:1.4;margin:4px 0 8px}
body.ts-auth .choice strong{display:flex;align-items:center;min-height:32px;font-size:15px}
body.ts-auth .portal-main>.hint{margin:14px 0 0;font-size:12px;line-height:1.4}
body.ts-auth .portal-footer{padding:12px 20px;font-size:12px}
body.ts-auth .panel form{gap:12px}
body.ts-auth .panel label{gap:6px}
body.ts-auth .panel input:not([type=checkbox]){min-height:46px;padding:10px 12px}
body.ts-auth .panel .button.primary{min-height:48px;padding:10px 16px;font-size:18px}
body.ts-auth .panel>.hint{margin-top:16px;line-height:1.4}
body.login.tell-school-login{padding:20px 0 0}
body.tell-school-login .ts-login-brand{margin-bottom:16px}
body.tell-school-login .ts-login-brand .school-brand{margin-bottom:8px}
body.tell-school-login .ts-login-brand .school-brand img{width:150px}
body.tell-school-login .ts-login-brand h2{margin:6px 0;font-size:26px}
body.tell-school-login .ts-login-brand p{margin:8px 0;font-size:15px;line-height:1.4}
body.tell-school-login #login input:not([type=checkbox]):not([type=hidden]):not([type=submit]){min-height:46px;padding:10px 12px;margin:6px 0 12px}
body.tell-school-login #login .submit{padding-top:8px}
body.tell-school-login #login .button-primary{min-height:48px;padding:10px 14px!important}
body.tell-school-login #login #nav{margin-top:16px}
body.tell-school-login .ts-login-footer{padding:8px 20px 12px}
@media(max-height:650px){
 body.tell-login main.tell-auth{gap:7px;padding-top:14px;padding-bottom:10px}
 body.tell-login main.tell-auth .auth-logo{width:120px;max-height:56px;margin-bottom:0}
 body.tell-login main.tell-auth h1{font-size:24px}
 body.tell-login main.tell-auth>p{font-size:14px}
 body.ts-auth .portal-main{padding-top:14px}
 body.ts-auth .welcome{margin-bottom:12px}
 body.ts-auth .welcome .school-brand img,body.tell-school-login .ts-login-brand .school-brand img{width:120px}
 body.ts-auth .welcome h1,body.tell-school-login .ts-login-brand h2{font-size:24px}
 body.ts-auth .choices{gap:12px}
 body.ts-auth .choice{padding:12px 16px}
 body.ts-auth .choice h2{font-size:22px}
 body.ts-auth .choice p{font-size:14px}
 body.ts-auth .welcome>p,body.tell-school-login .ts-login-brand p{font-size:14px}
 body.login.tell-school-login{padding-top:14px}
}
@media(display-mode:standalone){body.tell-login main.tell-auth,body.ts-auth .portal-main{padding-top:max(20px,env(safe-area-inset-top))}body.login.tell-school-login{padding-top:max(20px,env(safe-area-inset-top))}}
/* WordPress also prints a separate privacy footer; the same link is in Settings. */
body.tell-school-login .privacy-policy-page-link{display:none}
body.tell-school-login .ts-login-footer p{margin:0;font-size:12px;line-height:1.4}
body.tell-school-login #login .forgetmenot{min-height:36px;display:flex;align-items:center;margin:0}
body.tell-school-login #login .forgetmenot label{min-height:36px;display:inline-flex;align-items:center}
body.tell-school-login #login .submit{margin:0}
@media(max-height:650px){body.login.tell-school-login{padding-top:10px}body.tell-school-login .ts-login-brand{margin-bottom:12px}body.tell-school-login #login #nav{margin-top:12px}}
@media(display-mode:standalone){body.tell-login main.tell-auth{padding-bottom:max(12px,env(safe-area-inset-bottom))}body.ts-auth .portal-footer,body.tell-school-login .ts-login-footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}}

/* Shared entry chrome mirrors the signed-in app without invented account stats. */
body.tell-entry-shell{padding-top:calc(env(safe-area-inset-top,0px) + 64px)!important;padding-bottom:max(12px,env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100dvh;box-sizing:border-box}
.tell-entry-header{position:fixed;inset:0 0 auto;z-index:1000;background:#f3f5ff;color:#30436b;border-bottom:1px solid #c4d2e6;padding:calc(env(safe-area-inset-top,0px) + 10px) max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px));box-sizing:border-box}
.tell-entry-header.is-schools{background:#2864a0;color:white;border-bottom-color:#1e5286}
.tell-entry-header-inner{max-width:1108px;margin:auto;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;align-items:center;min-height:44px}
.tell-entry-product{font:800 18px/1.2 'Baloo 2',Nunito,system-ui;text-align:center}
.tell-entry-header .tell-entry-menu-open.is-entry{position:static;inset:auto;display:grid!important;justify-self:end;margin:0!important;border:0!important;border-radius:12px!important;padding:10px!important;background:transparent!important;color:inherit!important;box-shadow:none!important;width:44px!important;height:44px!important}
.tell-entry-header .tell-entry-menu-open svg{width:24px;height:24px;display:block;flex-shrink:0}
#tell-entry-menu.tell-entry-dropdown{inset:calc(env(safe-area-inset-top,0px) + 72px) max(12px,calc((100vw - 1108px)/2)) auto auto;margin:0;width:min(360px,calc(100% - 24px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - 88px);box-sizing:border-box}
html:is([data-tell-theme=contrast],[data-tell-theme=cream]) .tell-entry-header{background:var(--tell-surface);color:var(--tell-ink);border-color:var(--tell-edge)}

/* Permit scrolling while excluding double-tap and pinch zoom gestures. */
@media(pointer:coarse){html.tell-controlled-gestures,html.tell-controlled-gestures body{touch-action:pan-x pan-y}}
