:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#17211f;background:#f5f7f4;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--border: #d8ded8;--border-strong: #b8c4bd;--panel: #ffffff;--panel-subtle: #f9faf8;--ink-muted: #5d6a66;--green: #1f7a5a;--green-soft: #e7f4ee;--blue: #2563eb;--blue-soft: #eaf0ff;--red: #b42318;--red-soft: #fff0ed;--amber: #a15c00;--amber-soft: #fff5df;--shadow: 0 12px 30px rgba(23, 33, 31, .08)}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f5f7f4}button,input,textarea{font:inherit;letter-spacing:0}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.65}.app-shell{min-height:100vh;display:flex;flex-direction:column}.topbar{height:64px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);background:#ffffffeb;position:sticky;top:0;z-index:10;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.brand{display:flex;align-items:center;gap:12px;min-width:0}.brand-mark{width:36px;height:36px;border-radius:8px;background:#17211f;color:#fff;display:grid;place-items:center;flex:0 0 auto}.brand strong,.brand span{display:block;line-height:1.15}.brand strong{font-size:16px}.brand span{color:var(--ink-muted);font-size:13px;margin-top:3px}.api-state{height:34px;padding:0 12px;border:1px solid #b9dbc9;color:var(--green);background:var(--green-soft);border-radius:8px;display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px}.api-state-error{border-color:#f1b6aa;color:var(--red);background:var(--red-soft)}.workspace{flex:1;display:grid;grid-template-columns:240px minmax(300px,var(--subject-column, 420px)) 8px minmax(430px,1fr);gap:0;min-height:calc(100vh - 64px)}.workspace.sidebar-closed{grid-template-columns:minmax(300px,var(--subject-column, 420px)) 8px minmax(430px,1fr)}.workspace.resizing-subject{cursor:col-resize;-webkit-user-select:none;user-select:none}.problem-nav,.subject-panel,.work-panel{min-width:0;overflow:auto}.problem-nav{border-right:1px solid var(--border);background:#fbfcfa;padding:18px 14px}.problem-group+.problem-group{margin-top:24px}.problem-group h2{margin:0 0 10px;color:var(--ink-muted);font-size:12px;font-weight:700;text-transform:uppercase}.problem-buttons{display:grid;gap:6px}.problem-button{min-height:40px;width:100%;border:1px solid transparent;border-radius:8px;background:transparent;color:#263330;display:flex;align-items:center;gap:10px;padding:0 10px;text-align:left}.problem-button:hover{background:#eef3ef}.problem-button.active{background:#17211f;border-color:#17211f;color:#fff}.subject-panel{background:var(--panel);padding:24px}.subject-resizer{width:8px;min-width:8px;border-left:1px solid var(--border);border-right:1px solid var(--border);background:#eef2ee;color:#6d7a75;cursor:col-resize;display:flex;align-items:center;justify-content:center;touch-action:none;outline:none}.subject-resizer:hover,.subject-resizer:focus-visible,.workspace.resizing-subject .subject-resizer{background:#dfe7e1;color:#17211f}.subject-resizer svg{pointer-events:none}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.eyebrow{display:block;color:var(--green);font-size:12px;font-weight:800;text-transform:uppercase;margin-bottom:5px}h1,h2,p{margin:0}h1{font-size:28px;line-height:1.1}h2{font-size:20px;line-height:1.2}.meta-row{display:grid;gap:16px;margin-bottom:18px}.meta-label{display:block;color:var(--ink-muted);font-size:12px;font-weight:800;text-transform:uppercase;margin-bottom:7px}.chip-row{display:flex;flex-wrap:wrap;gap:6px}.chip{min-height:26px;max-width:100%;padding:5px 8px;border-radius:6px;background:var(--blue-soft);color:#1746a2;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;overflow-wrap:anywhere}.chip.muted{background:#eef1ef;color:#43504d}.subject-text{margin:0;white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.55;color:#202a27;border:1px solid var(--border);background:var(--panel-subtle);border-radius:8px;padding:16px}.work-panel{padding:18px;display:flex;flex-direction:column;gap:12px;background:#f5f7f4}.editor-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between}.file-tabs{display:flex;gap:6px;flex-wrap:wrap;min-width:0}.file-tab{height:34px;max-width:180px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:#fff;color:#263330;display:inline-flex;align-items:center;gap:7px}.file-tab span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-tab.active{border-color:#17211f;color:#fff;background:#17211f}.toolbar-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.primary-button,.secondary-button,.icon-button{height:36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border-strong);background:#fff;color:#17211f;padding:0 12px}.primary-button{border-color:var(--green);background:var(--green);color:#fff;min-width:86px}.secondary-button:hover,.icon-button:hover{background:#eef3ef}.primary-button:hover{background:#19674c}.icon-button{width:36px;padding:0}.topbar-icon{flex:0 0 auto;background:#f7f9f7}.add-file-form{display:flex;gap:8px}.add-file-form input{height:36px;width:180px;max-width:100%;border:1px solid var(--border);border-radius:8px;padding:0 10px;background:#fff}.code-editor-shell{width:100%;border:1px solid #3c3c3c;border-radius:8px;background:#1e1e1e;overflow:hidden}.code-editor-shell:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #1f7a5a2e}.code-editor-shell .cm-editor{min-height:420px;height:min(58vh,680px)}.code-editor-shell .cm-scroller{overflow:auto}.code-editor-shell .cm-content{min-height:420px}.code-editor-shell .cm-line{padding:0 14px}.run-console{display:grid;gap:10px}.run-input-grid{display:grid;grid-template-columns:minmax(180px,.45fr) minmax(260px,1fr);gap:10px}.run-field{display:grid;gap:6px;min-width:0}.run-field span{color:var(--ink-muted);font-size:12px;font-weight:800;text-transform:uppercase}.run-field input,.run-field textarea{width:100%;border:1px solid var(--border);border-radius:8px;background:#fff;color:#17211f;outline:none}.run-field input{height:38px;padding:0 10px}.run-field textarea{min-height:96px;max-height:240px;resize:vertical;padding:10px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.45}.run-field input:focus,.run-field textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #1f7a5a24}.run-output{border:1px solid var(--border);border-radius:8px;background:var(--panel);padding:14px;display:grid;gap:10px}.run-output.idle,.run-output.pending{min-height:54px;color:var(--ink-muted);display:flex;align-items:center;gap:8px}.run-output.passed{border-color:#a7d8be}.run-output.failed{border-color:#efbeb4}.command-line{display:grid;gap:5px}.command-line span{color:var(--ink-muted);font-size:12px;font-weight:800;text-transform:uppercase}.command-line code{display:block;max-width:100%;overflow-x:auto;border:1px solid #202927;border-radius:6px;background:#111816;color:#d4d4d4;padding:9px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;white-space:pre}.run-note{margin:0;color:#43504d;line-height:1.45}.inline-error{min-height:38px;padding:9px 11px;border:1px solid #f1b6aa;border-radius:8px;color:var(--red);background:var(--red-soft);display:flex;align-items:center;gap:8px}.result-panel{border:1px solid var(--border);border-radius:8px;background:var(--panel);padding:16px;box-shadow:var(--shadow)}.result-panel.idle{min-height:56px;color:var(--ink-muted);box-shadow:none;display:flex;align-items:center;gap:8px}.result-panel.passed{border-color:#a7d8be}.result-panel.failed{border-color:#efbeb4}.result-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.score-badge{min-width:56px;height:34px;border-radius:8px;display:grid;place-items:center;background:#17211f;color:#fff;font-weight:800}.feedback-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}.feedback-grid>div,.tip-box{border:1px solid var(--border);border-radius:8px;padding:12px;background:#fbfcfa}.feedback-grid p{color:#263330;line-height:1.5}.tip-box{margin-bottom:14px;background:var(--amber-soft);border-color:#efd6a8}.tip-box ul{margin:0;padding-left:18px;color:#3f3322}.tip-box li+li{margin-top:6px}.case-list{display:grid;gap:8px}.case-list details{border:1px solid var(--border);border-radius:8px;background:#fff;overflow:hidden}.case-list summary{min-height:42px;padding:9px 12px;display:grid;grid-template-columns:20px minmax(120px,1fr) minmax(160px,1.5fr);gap:8px;align-items:center;cursor:pointer}.case-list summary small{color:var(--ink-muted);line-height:1.3}.case-status{display:grid;place-items:center}.case-status.passed{color:var(--green)}.case-status.failed{color:var(--red)}.case-body{border-top:1px solid var(--border);padding:12px;display:grid;gap:10px}.output-block span{display:block;color:var(--ink-muted);font-size:12px;font-weight:800;text-transform:uppercase;margin-bottom:5px}.output-block pre{margin:0;max-height:260px;overflow:auto;border-radius:6px;border:1px solid #202927;background:#111816;color:#e8f2ed;padding:10px;font-size:12px;line-height:1.45;white-space:pre-wrap;word-break:break-word}.loading-screen,.empty-state{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-muted)}.empty-state{min-height:calc(100vh - 64px);grid-column:span 2}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1180px){.workspace{grid-template-columns:220px minmax(0,1fr)}.workspace.sidebar-closed{grid-template-columns:minmax(0,1fr)}.problem-nav{grid-row:1 / span 2}.subject-panel{grid-column:2;grid-row:1;border-right:0;border-bottom:1px solid var(--border)}.subject-resizer{display:none}.work-panel{grid-column:2;grid-row:2}.workspace.sidebar-closed .subject-panel,.workspace.sidebar-closed .work-panel{grid-column:1}}@media(max-width:820px){.topbar{height:auto;min-height:64px;padding:12px 14px;align-items:flex-start;flex-direction:column}.workspace{grid-template-columns:1fr;min-height:auto}.problem-nav,.subject-panel,.work-panel{border-right:0;grid-column:1;grid-row:auto;overflow:visible}.problem-nav{border-bottom:1px solid var(--border)}.problem-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.subject-panel,.work-panel{padding:16px}.work-panel{grid-column:auto}.editor-toolbar,.feedback-grid,.run-input-grid{grid-template-columns:1fr;display:grid}.toolbar-actions{flex-wrap:wrap}.code-editor-shell .cm-editor{min-height:360px;height:52vh}.code-editor-shell .cm-content{min-height:360px}.case-list summary{grid-template-columns:20px minmax(0,1fr)}.case-list summary small{grid-column:2}}@media(max-width:520px){.problem-buttons{grid-template-columns:1fr}.add-file-form{display:grid;grid-template-columns:1fr}.add-file-form input,.primary-button,.secondary-button{width:100%}}
