/* Only problem pages with the existing integrated submission editor. */
html.ctoj-ui.cpl-active .content-app{width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box!important;padding:0 18px 24px!important;margin-left:0!important;margin-right:0!important}
html.ctoj-ui.cpl-active .cpl-container{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%!important;max-width:none!important;min-width:0!important;gap:18px!important}
html.ctoj-ui.cpl-active #problem-main{width:100%!important;max-width:none!important;min-width:0!important;flex:none!important;margin:0!important;box-sizing:border-box!important}
html.ctoj-ui.cpl-active .cpl-info{position:static!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;flex:none!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));align-items:start;gap:16px;box-sizing:border-box}
html.ctoj-ui.cpl-active .cpl-info>*{width:100%!important;min-width:0!important;margin:0!important;box-sizing:border-box}
html.ctoj-ui.cpl-active .cpl-info canvas{max-width:100%!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic){display:grid!important;grid-template-columns:minmax(0,var(--csw-task,45fr)) minmax(0,var(--csw-code,55fr))!important;grid-template-rows:auto auto!important;align-items:start!important;gap:0!important;overflow:visible!important;height:auto!important;min-height:0!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>.csw-toolbar{grid-column:1/-1!important;grid-row:1!important;position:static!important;width:auto!important;min-width:0!important;gap:8px;flex-wrap:wrap!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>.csw-statement{grid-column:1!important;grid-row:2!important;align-self:start!important;height:auto!important;max-height:calc(var(--cpl-code-height,65dvh) + 100px)!important;min-height:0!important;min-width:0!important;overflow:auto!important;overscroll-behavior:contain;padding:0!important;border-right:1px solid var(--cu-border,#dce6f2)!important;box-sizing:border-box!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>#submit-code{grid-column:2!important;grid-row:2!important;height:auto!important;min-height:0!important;min-width:0!important;overflow:visible!important;align-self:start!important;border-right:0!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>#submit-code>.ivu-card-body{display:flex!important;flex-direction:column!important;overflow:visible!important;height:auto!important;min-height:0!important;min-width:0!important;padding:12px!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>#submit-code>.ivu-card-body>div:first-child{display:flex!important;flex-direction:column!important;flex:0 0 auto!important;height:auto!important;min-height:0!important;min-width:0!important;margin:0 0 12px!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic) #submit-code .header{flex:0 0 auto!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;min-width:0!important;margin-bottom:10px!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic) #submit-code .vue-codemirror-wrap{display:block!important;flex:0 0 auto!important;min-height:0!important;min-width:0!important;height:var(--cpl-code-height,65dvh)!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic) #submit-code .CodeMirror{height:var(--cpl-code-height,65dvh)!important;min-height:0!important;max-height:none!important;width:100%!important;font-size:var(--cp-code-size,15px);box-sizing:border-box!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>.csw-status,html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>.csw-below{grid-column:1/-1!important;grid-row:auto!important;min-width:0!important;max-width:100%!important}
html.ctoj-ui.cpl-active .csw-tests{margin-top:14px!important;min-width:0!important;overflow:visible!important;max-height:none!important}
html.ctoj-ui.cpl-active .csw-tests textarea{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
html.ctoj-ui.cpl-active .csw-statement #problem-content{overflow-wrap:anywhere!important;min-width:0!important}
html.ctoj-ui.cpl-active .csw-statement pre{white-space:pre-wrap!important;overflow-wrap:anywhere!important}
html.ctoj-ui.cpl-active .csw-statement img{max-width:100%!important;height:auto}
html.ctoj-ui.cpl-active .cpl-size{display:inline-flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap}
@media(max-width:1100px){
html.ctoj-ui.cpl-active .content-app{padding-left:10px!important;padding-right:10px!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic){display:flex!important;flex-direction:column!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>.csw-toolbar{order:0!important;align-self:stretch}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>.csw-statement{order:1!important;max-height:55dvh!important;width:100%!important;border-right:0!important;border-bottom:1px solid var(--cu-border,#dce6f2)!important}
html.ctoj-ui.cpl-active #problem-main:not(.csw-full):not(.csw-classic)>#submit-code{order:2!important;width:100%!important}
html.ctoj-ui.cpl-active #problem-main>.csw-status{order:3!important;width:100%!important}
html.ctoj-ui.cpl-active #problem-main>.csw-below{order:4!important;width:100%!important}
html.ctoj-ui.cpl-active .csw-tests{display:flex!important;flex-direction:column!important;align-items:stretch!important}
}

/* v1.1: target the observed native wrapper even when Vue rewrites its class. */
html.ctoj-ui.cpl-active body{min-width:0!important}
html.ctoj-ui.cpl-active #app .content-app>.flex-container{display:block!important;flex-flow:column nowrap!important;align-items:stretch!important;justify-content:flex-start!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}
html.ctoj-ui.cpl-active #app .content-app>.flex-container>#problem-main{float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}
html.ctoj-ui.cpl-active #app .content-app>.flex-container>#right-column{display:grid!important;position:static!important;float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:18px 0 0!important;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))!important;gap:16px!important;box-sizing:border-box!important}
html.ctoj-ui.cpl-active #app #problem-main>#ctoj-progress{grid-column:1/-1!important;grid-row:auto!important;width:100%!important;min-width:0!important;box-sizing:border-box!important}
@media(max-width:1100px){html.ctoj-ui.cpl-active #app .content-app>.flex-container>#problem-main:not(.csw-full):not(.csw-classic){display:flex!important;flex-direction:column!important}}

/* Stable v1: explicit alternative modes, after legacy workspace rules. */
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full){display:flex!important;flex-direction:column!important;height:auto!important;overflow:visible!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full)>.csw-toolbar{order:0!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full)>.csw-statement{order:1!important;width:100%!important;max-height:none!important;overflow:visible!important;border-right:0!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full)>#submit-code{order:2!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full)>.csw-status{order:3!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full)>.csw-below,
html.ctoj-ui.cpl-active #app #problem-main.csw-classic:not(.csw-full)>#ctoj-progress{order:4!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full{position:fixed!important;inset:0!important;display:flex!important;flex-direction:column!important;gap:0!important;height:100dvh!important;max-height:100dvh!important;overflow:auto!important;z-index:1500}
html.ctoj-ui.cpl-active #app #problem-main.csw-full>.csw-toolbar{order:0!important;flex:none!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full>.csw-statement,
html.ctoj-ui.cpl-active #app #problem-main.csw-full>.csw-below,
html.ctoj-ui.cpl-active #app #problem-main.csw-full>#ctoj-progress{display:none!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full>#submit-code{order:1!important;width:100%!important;height:auto!important;min-height:0!important;flex:none!important;overflow:visible!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full>#submit-code>.ivu-card-body{display:flex!important;flex-direction:column!important;overflow:visible!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full #submit-code>.ivu-card-body>div:first-child{height:auto!important;min-height:0!important;flex:none!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full #submit-code .vue-codemirror-wrap,
html.ctoj-ui.cpl-active #app #problem-main.csw-full #submit-code .CodeMirror{height:var(--cpl-code-height,65dvh)!important;min-height:0!important;flex:none!important}
html.ctoj-ui.cpl-active #app #problem-main.csw-full>.csw-status{order:2!important;flex:none!important}
