:root{--bg:#eef2f1;--panel:#fff;--panel-soft:#f8faf8;--ink:#1d2523;--muted:#65726f;--line:#dbe3e0;--teal:#0f766e;--teal-dark:#115e59;--amber:#b7791f;--amber-soft:#fff7e6;--red:#b42318;--red-soft:#fff1f0;--green-soft:#ecfdf3;--shadow:0 18px 50px #16221f1f}*{box-sizing:border-box}html,body{height:100%}body{background:var(--bg);color:var(--ink);margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}button,textarea,select,input{font:inherit}button{cursor:pointer}.app-shell{grid-template-columns:248px minmax(0,1fr);height:100dvh;min-height:0;display:grid;overflow:hidden}.sidebar{color:#edf5f2;background:#17211f;flex-direction:column;gap:20px;min-height:0;padding:24px;display:flex;overflow:auto}.brand,.sidebar-metric,.roadmap-row,.mode-switch button,.topbar,.topbar-actions,.panel-heading,.brief-title-row,.tag-row,.editor-toolbar,.judge-header,.rubric-item,.follow-up-button,.history-heading,.history-item{align-items:center;display:flex}.brand{gap:12px}.brand strong,.brand span,.sidebar-metric strong,.sidebar-metric span{display:block}.brand span,.sidebar-metric span{color:#aebfba;font-size:.82rem}.brand-mark{color:#123b36;background:#d4f7ee;border-radius:8px;place-items:center;width:42px;height:42px;display:grid}.mode-switch{gap:8px;display:grid}.mode-switch button{color:#cddbd7;text-align:left;background:0 0;border:1px solid #ffffff14;border-radius:8px;gap:10px;width:100%;padding:11px 12px}.mode-switch button.active{color:#17211f;background:#effaf7}.mode-switch button:disabled{cursor:not-allowed;opacity:.42}.sidebar-section{gap:10px;display:grid}.eyebrow{color:var(--muted);letter-spacing:0;text-transform:uppercase;font-size:.72rem;font-weight:700}.sidebar .eyebrow{color:#91aaa4}.roadmap-row{color:#9fb2ad;gap:10px;padding:8px 0}.roadmap-row.current{color:#f6fffc}.sidebar-metric{border-top:1px solid #ffffff1f;gap:12px;margin-top:auto;padding-top:20px}.user-chip{background:#ffffff0a;border:1px solid #ffffff1a;border-radius:8px;justify-content:space-between;align-items:center;gap:12px;min-width:0;padding:12px;display:flex}.user-chip strong,.user-chip span{min-width:0;display:block}.user-chip strong{text-overflow:ellipsis;white-space:nowrap;line-height:1.2;overflow:hidden}.user-chip span{color:#aebfba;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;overflow:hidden}.user-chip button{color:#effaf7;background:0 0;border:1px solid #ffffff1f;border-radius:8px;flex:none;place-items:center;width:34px;height:34px;display:grid}.auth-screen{background:var(--bg);place-items:center;min-height:100vh;padding:20px;display:grid}.auth-card{background:var(--panel);border:1px solid var(--line);width:min(100%,440px);box-shadow:var(--shadow);border-radius:8px;gap:20px;padding:24px;display:grid}.auth-brand{color:var(--ink)}.auth-card h1{margin:4px 0 8px;font-size:2rem;line-height:1.1}.auth-card p{color:var(--muted);margin:0;line-height:1.5}.auth-form,.auth-form label{display:grid}.auth-form{gap:12px}.auth-form label{color:var(--muted);gap:7px;font-size:.84rem;font-weight:750}.auth-form input{border:1px solid var(--line);min-height:42px;color:var(--ink);background:var(--panel-soft);border-radius:8px;padding:0 12px}.auth-error{font-weight:700;color:var(--red)!important}.text-button,.secondary-action,.danger-action{border:1px solid var(--line);background:var(--panel-soft);min-height:38px;color:var(--ink);border-radius:8px;font-weight:740}.text-button{color:var(--teal-dark);background:0 0;border:0}.secondary-action{color:#fff;background:#17211f;justify-content:center;align-items:center;gap:8px;display:inline-flex}.danger-action{background:var(--red-soft);color:var(--red);border-color:#ffd0cc;justify-content:center;align-items:center;gap:8px;display:inline-flex}.secondary-action:disabled,.danger-action:disabled{opacity:.7;cursor:wait}.app-content{flex-direction:column;gap:20px;min-width:0;height:100dvh;min-height:0;padding:24px;display:flex;overflow:hidden}.topbar{flex:none;justify-content:space-between;gap:20px}.topbar h1,.judge-header h2,.problem-brief h2{margin:0}.topbar h1{font-size:clamp(1.75rem,3vw,2.7rem);line-height:1.05}.topbar-actions{gap:10px}.icon-button,.primary-button,.follow-up-button{border:0;border-radius:8px}.icon-button{background:var(--panel);width:42px;height:42px;color:var(--ink);border:1px solid var(--line);place-items:center;display:grid}.primary-button{background:var(--teal);color:#fff;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:0 16px;font-weight:750;display:inline-flex}.primary-button:disabled{opacity:.7;cursor:wait}.content-grid{flex:1;grid-template-columns:minmax(180px,218px) minmax(720px,1fr) minmax(292px,330px);align-items:stretch;gap:12px;min-height:0;display:grid;overflow:hidden}.problem-panel,.editor-panel,.judge-panel,.history-panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:8px}.problem-panel,.judge-panel{padding:16px}.problem-panel,.editor-panel,.judge-panel{height:100%;min-height:0}.problem-panel{flex-direction:column;min-width:0;display:flex;overflow:hidden}.panel-heading{color:var(--muted);justify-content:space-between;margin-bottom:12px}.problem-list{flex:1;align-content:start;gap:8px;min-height:0;display:grid;overflow:auto}.problem-card{border:1px solid var(--line);background:var(--panel-soft);width:100%;color:var(--ink);text-align:left;border-radius:8px;padding:12px}.problem-card.selected{border-color:var(--teal);background:#f0fbf8}.problem-card strong,.problem-card span{display:block}.problem-card strong{margin-bottom:6px}.problem-card span{color:var(--muted);font-size:.82rem;line-height:1.35}.problem-meta{align-items:center;gap:8px;margin-top:12px;display:flex}.pill,.tag-row span,.principles span,.verdict{border-radius:999px;padding:5px 9px;font-size:.75rem;font-weight:750}.pill.easy{color:#166534;background:#e8f7ef}.pill.medium{background:var(--amber-soft);color:#92400e}.pill.hard{background:var(--red-soft);color:var(--red)}.editor-panel{flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.problem-brief,.requirement-box,.editor-toolbar{padding:16px}.problem-brief{border-bottom:1px solid var(--line);gap:10px;display:grid}.brief-title-row{justify-content:space-between;gap:12px}.problem-brief p,.requirement-box p,.judge-result p,.empty-judge p,.feedback-block p{color:var(--muted);margin:0;line-height:1.55}.tag-row{flex-wrap:wrap;gap:8px}.tag-row span{color:#46524f;background:#eef2f1}.level-tabs{gap:8px;padding:12px 16px 0;display:flex;overflow-x:auto}.level-tabs button{border:1px solid var(--line);background:var(--panel-soft);color:var(--muted);white-space:nowrap;border-radius:8px;padding:8px 12px}.level-tabs button.active{color:#fff;background:#17211f;border-color:#17211f}.requirement-box{gap:8px;display:grid}.editor-toolbar{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--panel-soft);justify-content:space-between}.editor-toolbar div{color:var(--teal-dark);align-items:center;gap:8px;font-weight:750;display:inline-flex}.editor-toolbar select{border:1px solid var(--line);min-height:36px;color:var(--ink);background:#fff;border-radius:8px;padding:0 10px}.code-editor-shell{background:#101816;border:0;flex:1;width:100%;height:auto;min-height:0}.editor-loading{color:#bcefe1;background:#101816;place-items:center;height:100%;min-height:0;font-weight:750;display:grid}.judge-panel{min-width:0;max-height:none;position:static;overflow:auto}.judge-header{justify-content:space-between;gap:12px;margin-bottom:12px}.judge-header h2{margin:2px 0 0;font-size:1.55rem}.inspector-count{color:var(--muted);font-size:.82rem;font-weight:750}.inspector-tabs{border:1px solid var(--line);background:var(--panel-soft);border-radius:8px;grid-template-columns:repeat(3,1fr);gap:4px;margin-bottom:14px;padding:4px;display:grid}.inspector-tabs button{min-height:34px;color:var(--muted);background:0 0;border:0;border-radius:6px;font-size:.82rem;font-weight:750}.inspector-tabs button.active{color:var(--ink);background:#fff;box-shadow:0 1px 8px #16221f14}.inspector-tabs button:disabled{cursor:not-allowed;opacity:.45}.verdict{color:#41504c;white-space:nowrap;background:#edf2f0}.verdict.level-ready,.verdict.strong-pass{background:var(--green-soft);color:#067647}.verdict.needs-work{background:var(--red-soft);color:var(--red)}.judge-result,.rubric-list,.feedback-block,.empty-judge{gap:12px;display:grid}.judge-source{flex-wrap:wrap;gap:7px;display:flex}.judge-source span,.history-judge-source{color:#40504c;background:#eef2f1;border-radius:999px;padding:5px 8px;font-size:.72rem;font-weight:750}.rubric-list{margin:6px 0}.rubric-item{border:1px solid var(--line);background:var(--panel-soft);border-radius:8px;justify-content:space-between;gap:12px;padding:11px}.rubric-item strong,.rubric-item span{display:block}.rubric-item span{color:var(--muted);margin-top:4px;font-size:.82rem;line-height:1.35}.rubric-item b{color:var(--teal-dark)}.feedback-block{border-top:1px solid var(--line);padding-top:12px}.feedback-block h3{margin:0;font-size:.95rem}.follow-up-button{color:#fff;background:#17211f;justify-content:space-between;gap:10px;min-height:44px;padding:0 12px;font-weight:760}.empty-judge{text-align:center;background:var(--panel-soft);border-radius:8px;place-items:center;min-height:240px;padding:28px}.empty-judge svg{color:var(--teal)}.history-panel{gap:14px;margin-top:16px;padding:16px;display:grid}.history-panel.embedded{box-shadow:none;background:0 0;border:0;margin:0;padding:0}.history-heading{justify-content:space-between;gap:16px}.history-heading h2{margin:2px 0 0;font-size:1.05rem}.history-heading>span{color:var(--muted);white-space:nowrap;font-size:.86rem}.history-list{grid-template-columns:1fr;gap:8px;display:grid}.history-item{border:1px solid var(--line);background:var(--panel-soft);width:100%;min-width:0;color:var(--ink);text-align:left;border-radius:8px;gap:10px;padding:10px}.history-item.current{background:#f0fbf8;border-color:#0f766e7a}.history-item.selected{box-shadow:inset 0 0 0 2px #0f766e59}.history-icon{width:34px;height:34px;color:var(--teal-dark);background:#e5f4f1;border-radius:8px;flex:none;place-items:center;display:grid}.history-item div:nth-child(2){flex:1;min-width:0}.history-item strong,.history-item span{display:block}.history-item strong{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.history-item span{color:var(--muted);font-size:.8rem}.history-item .history-judge-source{width:fit-content;max-width:100%;margin-top:7px;display:inline-block}.history-item b{color:var(--teal-dark);font-size:1.05rem}.verdict.compact{flex:none;padding:4px 8px}.empty-history,.history-summary{border:1px solid var(--line);background:var(--panel-soft);border-radius:8px;padding:12px}.empty-history p{color:var(--muted);margin:0;line-height:1.5}.history-summary{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.review-detail-panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:8px;gap:16px;margin-top:16px;padding:16px;display:grid}.review-detail-panel.embedded{box-shadow:none;background:0 0;border:0;margin:0;padding:0}.review-detail-header,.review-detail-actions,.review-detail-meta,.review-code>div{align-items:center;display:flex}.review-detail-header{border-bottom:1px solid var(--line);justify-content:space-between;gap:16px;padding-bottom:12px}.review-detail-header h2,.review-detail-header p,.review-feedback h3,.review-code h3{margin:0}.review-detail-header h2{margin-top:2px;font-size:1rem}.review-detail-header p{color:var(--muted);margin-top:4px;font-size:.88rem}.review-detail-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px}.review-detail-meta{flex-wrap:wrap;gap:8px}.review-detail-meta>span:not(.verdict){color:#40504c;background:#eef2f1;border-radius:999px;padding:5px 9px;font-size:.76rem;font-weight:750}.review-detail-grid{grid-template-columns:minmax(0,1fr) minmax(320px,.85fr);align-items:start;gap:14px;display:grid}.review-feedback,.review-code{gap:12px;min-width:0;display:grid}.review-feedback>p{color:var(--muted);margin:0;line-height:1.55}.review-feedback-columns{grid-template-columns:1fr 1fr;gap:12px;display:grid}.review-code{border:1px solid var(--line);background:#101816;border-radius:8px;overflow:hidden}.review-code>div{color:#fff;background:#17211f;justify-content:space-between;gap:10px;padding:12px}.review-code>div span{color:#bcefe1;font-size:.78rem;font-weight:750}.review-code pre{color:#e8fff8;white-space:pre;max-height:300px;margin:0;padding:16px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.84rem;line-height:1.65;overflow:auto}.history-summary strong{color:var(--teal-dark)}.history-summary>span:last-child{color:var(--muted)}.studio-workbench{flex:1;grid-template-columns:minmax(240px,290px) minmax(420px,1fr) minmax(320px,400px);align-items:stretch;gap:14px;min-height:0;display:grid;overflow:hidden}.judge-settings-workbench{flex:1;grid-template-columns:minmax(260px,340px) minmax(520px,760px);align-items:stretch;gap:14px;min-height:0;display:grid;overflow:hidden}.studio-catalog,.studio-main-editor,.studio-side-panel{background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 30px #16221f14}.studio-catalog{flex-direction:column;min-width:0;min-height:0;display:flex;position:static;overflow:hidden}.studio-main-editor,.studio-side-panel{padding:16px}.studio-main-editor{min-width:0;min-height:0;overflow:auto}.studio-side-editor{align-content:start;gap:14px;min-width:0;min-height:0;display:grid;position:static;overflow:auto}.studio-panel-title,.studio-edit-header,.studio-savebar,.studio-problem-row,.studio-icon-actions,.studio-save-state{align-items:center;display:flex}.studio-panel-title{border-bottom:1px solid var(--line);justify-content:space-between;gap:12px;padding:16px}.studio-main-editor .studio-panel-title,.studio-side-panel .studio-panel-title{margin-bottom:14px;padding:0 0 14px}.studio-panel-title h2{margin:2px 0 0;font-size:1rem}.studio-problem-list{flex:1;align-content:start;min-height:0;display:grid;overflow:auto}.studio-problem-row{border:0;border-bottom:1px solid var(--line);width:100%;min-width:0;color:var(--ink);text-align:left;background:#fff;gap:10px;padding:12px 14px}.studio-problem-row:hover{background:#f7fbfa}.studio-problem-row.selected{box-shadow:inset 3px 0 0 var(--teal);background:#eefaf6}.studio-problem-row>span:nth-child(2){min-width:0}.studio-problem-row strong,.studio-problem-row small{display:block}.studio-problem-row strong{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.studio-problem-row small{color:var(--muted);margin-top:3px;font-size:.76rem}.status-dot{background:#94a3b8;border-radius:999px;flex:none;width:9px;height:9px}.status-dot.active{background:var(--teal)}.status-dot.inactive{background:var(--amber)}.studio-edit-header{border-bottom:1px solid var(--line);justify-content:space-between;gap:18px;margin-bottom:16px;padding-bottom:16px}.studio-edit-header>div:first-child{flex:1;min-width:0}.studio-title-input{width:100%;color:var(--ink);background:0 0;border:0;padding:4px 0 0;font-size:clamp(1.55rem,2vw,2.2rem);font-weight:800;line-height:1.08}.studio-save-state{border:1px solid var(--line);background:var(--panel-soft);color:var(--muted);border-radius:999px;gap:7px;padding:7px 10px;font-size:.78rem;font-weight:750}.studio-main-editor label,.studio-side-panel label{color:var(--muted);gap:7px;font-size:.84rem;font-weight:750;display:grid}.studio-field-grid{grid-template-columns:1fr 1fr;gap:10px;display:grid}.studio-field-grid.level-grid{grid-template-columns:minmax(0,1fr) 82px}.studio-field-span{grid-column:1/-1}.studio-wide-field{margin-top:12px}.studio-main-editor input,.studio-main-editor select,.studio-main-editor textarea,.studio-side-panel input,.studio-side-panel select,.studio-side-panel textarea{border:1px solid var(--line);width:100%;color:var(--ink);background:var(--panel-soft);border-radius:8px}.studio-main-editor input,.studio-main-editor select,.studio-side-panel input,.studio-side-panel select{min-height:38px;padding:0 10px}.studio-main-editor textarea,.studio-side-panel textarea{resize:vertical;min-height:88px;padding:10px;line-height:1.45}.studio-main-editor .starter-code-editor{color:#e8fff8;background:#101816;min-height:320px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.84rem}.studio-level-strip{gap:7px;margin-bottom:12px;padding-bottom:10px;display:flex;overflow-x:auto}.studio-level-strip button{border:1px solid var(--line);background:var(--panel-soft);color:var(--muted);white-space:nowrap;border-radius:999px;padding:7px 10px;font-size:.8rem;font-weight:750}.studio-level-strip button.active{color:#fff;background:#17211f;border-color:#17211f}.judge-config-strip{gap:8px;max-height:190px;margin-bottom:12px;display:grid;overflow:auto}.judge-config-strip.expanded{flex:1;align-content:start;min-height:0;max-height:none;margin:0;padding:12px}.judge-config-editor{max-width:760px}.judge-routing-note{color:var(--muted);margin:10px 0 14px;font-size:.84rem;line-height:1.45}.judge-routing-note.empty{border:1px solid var(--line);background:var(--panel-soft);border-radius:8px;padding:12px}.judge-config-strip button{border:1px solid var(--line);background:var(--panel-soft);width:100%;min-width:0;color:var(--ink);text-align:left;border-radius:8px;padding:10px}.judge-config-strip button.active{box-shadow:inset 3px 0 0 var(--teal);background:#eefaf6;border-color:#0f766e47}.judge-config-strip strong,.judge-config-strip span{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.judge-config-strip span{color:var(--muted);margin-top:3px;font-size:.76rem}.secret-input{border:1px solid var(--line);background:var(--panel-soft);border-radius:8px;grid-template-columns:18px 1fr;align-items:center;gap:6px;min-height:38px;padding-left:10px;display:grid}.studio-side-panel .secret-input input{background:0 0;border:0;min-height:36px;padding-left:0}.studio-savebar.compact{margin-top:14px;margin-bottom:-16px;position:static}.full-width-action{width:100%}.studio-icon-actions{gap:8px}.danger-icon{color:var(--red);background:var(--red-soft);border-color:#ffd0cc}.studio-savebar{border-top:1px solid var(--line);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#fffffff0;justify-content:flex-end;gap:10px;margin:16px -16px -16px;padding:12px 16px;position:sticky;bottom:0}.studio-savebar>div:first-child{margin-right:auto}.studio-status{margin:0;font-size:.84rem;font-weight:750}.studio-status.success{color:var(--teal-dark)}.studio-status.error{color:var(--red)}.principles{flex-wrap:wrap;gap:8px;display:flex}.principles.compact{max-height:170px;overflow:auto}.principles span{color:#40504c;background:#f0f5f4}button:focus-visible,textarea:focus-visible,select:focus-visible,input:focus-visible{outline-offset:2px;outline:3px solid #0f766e3d}@media (max-width:1180px){html,body{height:auto;min-height:100%}body{overflow:auto}.app-shell{grid-template-columns:1fr;height:auto;min-height:100dvh;overflow:visible}.sidebar{grid-template-columns:1fr 1fr;display:grid;position:static;overflow:visible}.app-content{height:auto;min-height:0;overflow:visible}.sidebar-section,.sidebar-metric{display:none}.content-grid{grid-template-columns:minmax(0,1fr);overflow:visible}.studio-workbench,.judge-settings-workbench{grid-template-columns:minmax(220px,280px) minmax(0,1fr);overflow:visible}.studio-side-editor{grid-column:1/-1;grid-template-columns:1fr 1fr;position:static;overflow:visible}.history-list{grid-template-columns:1fr 1fr}.review-detail-grid,.review-feedback-columns{grid-template-columns:1fr}.judge-panel{grid-column:auto;max-height:none;position:static}.problem-panel,.editor-panel,.judge-panel{height:auto}.code-editor-shell,.editor-loading{height:620px;min-height:620px}}@media (max-width:820px){.app-content,.sidebar{padding:16px}.sidebar{grid-template-columns:1fr}.topbar{flex-direction:column;align-items:flex-start}.content-grid,.studio-workbench,.judge-settings-workbench,.studio-side-editor,.history-list{grid-template-columns:1fr}.code-editor-shell,.editor-loading{height:520px;min-height:520px}.topbar-actions,.primary-button,.secondary-action{width:100%}.primary-button,.secondary-action{justify-content:center}.studio-catalog,.studio-side-editor{position:static}.studio-field-grid{grid-template-columns:1fr}.studio-savebar{flex-wrap:wrap;position:static}}
