:root{--ink:#172033;--muted:#5b687b;--blue:#2563eb;--line:#dde5f0;--bg:#f4f6fb;--green:#087d68}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.7 "PingFang SC","Microsoft YaHei",system-ui,sans-serif}a{color:#1d4ed8;text-underline-offset:4px}button,input,select,textarea{font:inherit}button{cursor:pointer;white-space:nowrap}button,select,input[type=search]{min-height:38px;border:1px solid #cbd6e6;border-radius:7px;background:white;color:var(--ink);padding:6px 11px}button:hover:enabled{background:#eef4ff;border-color:#91afe1}button:disabled,select:disabled{opacity:.45;cursor:default}button.primary{background:var(--blue);border-color:var(--blue);color:white}button.primary:hover:enabled{background:#1d4ed8}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #0d9488;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip{position:absolute;left:20px;top:-100px;z-index:20;background:white;padding:10px}.skip:focus{top:10px}.topbar{padding:15px 28px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{text-decoration:none;font-weight:750;color:#1d3153}.brand span{font-weight:500;color:#718098;font-size:12px;margin-left:12px;letter-spacing:.08em}.topbar>a:last-child{font-size:13px}main{max-width:1640px;margin:auto;padding:27px 28px}.page-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:22px}.eyebrow{font-size:11px;letter-spacing:.2em;color:#2563eb;margin:0 0 5px;font-weight:700}h1{font-size:28px;line-height:1.4;margin:0;letter-spacing:-.025em}.badge{display:inline-block;vertical-align:middle;font-size:11px;font-weight:500;letter-spacing:0;color:#526786;border:1px solid #d4deec;padding:2px 8px;border-radius:20px;margin-left:15px}.page-heading>p{color:var(--muted);font-size:13px;margin:0 0 3px}.workspace{display:grid;grid-template-columns:minmax(300px,.83fr) minmax(480px,1.35fr);gap:20px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden;min-width:0;box-shadow:0 4px 16px #18345504}.question-navigation{padding:20px 22px 13px;border-bottom:1px solid var(--line);background:#fbfcff}.question-navigation label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.question-navigation input,.question-navigation select{width:100%;font-size:13px}.question-navigation select{margin-top:10px}.question-progress{display:flex;justify-content:space-between;align-items:center;margin-top:10px;color:var(--muted);font-size:12px}.question-progress button{min-height:28px;padding:0 10px;margin-left:6px}.question-content{padding:24px 24px 18px}.problem-meta{display:flex;justify-content:space-between;color:var(--blue);font-size:12px}.difficulty{padding:0 8px;border-radius:5px}.EASY{background:#e5f6ef;color:#08755e}.MEDIUM{background:#fff4dc;color:#91600f}.HARD{background:#ffedf0;color:#ad3451}h2{font-size:23px;line-height:1.5;margin:9px 0 16px}h3{font-size:13px;margin:20px 0 7px}p{overflow-wrap:anywhere}.format{border-top:1px solid #e7ecf4;margin-top:20px}.format p{margin:5px 0 12px;white-space:pre-wrap}.small{font-size:12px;line-height:1.8;color:var(--muted)}.example{border:1px solid var(--line);border-radius:8px;margin:10px 0;overflow:hidden}.example>summary{padding:8px 12px;background:#f8faff;cursor:pointer;font-size:12px;color:#526278}.example-body{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line)}.example-body>div{background:white;padding:10px 12px;min-width:0}.example-body label{font-size:11px;color:var(--muted)}pre{font:12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0;max-height:260px;overflow:auto}.explanation{margin:24px 0 18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.explanation>summary{padding:12px 0;cursor:pointer;font-size:13px;color:#1d4ed8;font-weight:600}.explanation h4{font-size:13px;color:#1e40af;margin:15px 0 8px}.explanation ol{padding-left:20px}.explanation li{margin:5px 0}.explanation .trace{background:#eff8f6;padding:12px;border-radius:7px}.explanation .trap{background:#fff9ee;padding:12px;border-radius:7px;font-size:12px}.explanation .cost{font-size:12px;color:var(--muted)}.editor-toolbar{padding:13px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px}.editor-toolbar>div:first-child{display:flex;align-items:center;gap:10px}.editor-toolbar label{color:var(--muted);font-size:12px}.editor-toolbar select{font-size:12px;min-width:135px}.code-actions{display:flex;gap:5px}.code-actions button{padding:4px 8px;font-size:12px;min-height:32px;border-color:transparent}.editor-caption{background:#292d35;color:#bdc4d0;font:11px/1.5 ui-monospace,monospace;display:flex;justify-content:space-between;gap:14px;padding:10px 17px;border-bottom:1px solid #ffffff12}.editor-caption span:last-child{font-family:system-ui,sans-serif;color:#a2b1b2}.CodeMirror{height:395px;font:13px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace}.CodeMirror-scroll{min-height:260px}.CodeMirror-lines{padding:18px 0}.CodeMirror-gutters{padding-right:10px}.CodeMirror pre.CodeMirror-line{padding-left:9px}.CodeMirror-focused{outline:2px solid #4d89e4;outline-offset:-2px}#code{width:100%;min-height:395px;background:#212121;color:#eee;border:0;padding:18px}.editor-help{font-size:11px;color:#78869a;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 16px;padding:9px 16px;background:#fafbfe;border-bottom:1px solid var(--line)}.test-panel{padding:18px 20px 13px}.test-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.test-heading h3{margin:0}.test-heading select{max-width:65%;min-height:30px;font-size:12px}.test-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.test-fields>div{min-width:0}.test-fields label{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}.test-fields textarea{display:block;width:100%;height:100px;resize:vertical;padding:10px;border:1px solid #ccd7e6;border-radius:7px;background:#fafcff;font:12px/1.7 ui-monospace,monospace;color:var(--ink)}.compare-toggle{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:11px;margin:11px 0 15px}.compare-toggle input{accent-color:var(--blue)}.run-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.run-actions button{font-size:12px;padding:7px 15px}.run-actions>span{font-size:11px;color:var(--muted);margin-left:auto}.service-note{font-size:11px;line-height:1.8;color:#6b788a;margin:13px 0 0}.results{padding:18px 20px 17px;border-top:1px solid var(--line);background:#fcfdff}.result-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.result-heading h3{margin:0}.result-heading>span{font-size:12px;color:var(--muted)}.result-heading>span.pass{color:var(--green)}.result-heading>span.fail{color:#b34242}.empty-state{text-align:center;color:#8793a5;padding:18px 0;font-size:12px;line-height:2}.result-case{margin-top:12px;border:1px solid var(--line);border-radius:8px;background:white}.result-case>summary{cursor:pointer;padding:9px 12px;font-size:12px;display:flex;justify-content:space-between;gap:12px}.result-case>summary .pass{color:var(--green)}.result-case>summary .fail{color:#b34242}.result-case>div{padding:8px 12px;border-top:1px solid var(--line)}.result-case label{color:var(--muted);font-size:11px}#diagnostics{margin-top:14px;font-size:12px}#diagnostics summary{cursor:pointer;color:#3f597e}#diagnostic-text{padding:12px;background:#fff4f1;border-radius:6px;max-height:320px}.judge-note{margin:16px 0 0;font-size:11px;color:#7b8899}.notice{padding:11px 16px;border:1px solid #efcf92;border-radius:8px;background:#fff9eb;color:#875f20;margin:0 0 18px;font-size:13px}footer{text-align:center;font-size:11px;color:#7b8798;padding:0 20px 24px}@media(min-width:1100px){.question-panel{max-height:calc(100vh - 32px);overflow:auto;position:sticky;top:16px}}@media(max-width:900px){main{padding:22px 16px}.topbar{padding:14px 18px}.workspace{grid-template-columns:1fr}.page-heading>p{display:none}.question-content{padding:20px}.CodeMirror{height:370px}.badge{font-size:10px}h1{font-size:24px}.question-navigation{padding:16px 20px}}@media(max-width:480px){.brand span{display:none}.editor-toolbar{flex-wrap:wrap;padding:10px 12px}.editor-toolbar label{display:none}.editor-toolbar select{min-width:125px;max-width:170px}.test-panel,.results{padding:16px 14px}.editor-caption{padding:10px 12px;font-size:10px}.test-fields{gap:8px}.run-actions>span{width:100%;margin:0}.badge{margin-left:8px}.question-content{padding:18px}.CodeMirror{font-size:12px}.page-heading{margin-bottom:16px}.editor-help{font-size:10px}}
