@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
:root{--navy:#13264c;--blue:#2563d9;--muted:#66758f;--line:#dce4ef;--soft:#f4f7fb;--white:#fff;--green:#14845a;--red:#c94b4b;--amber:#ad6a17;font-family:'Noto Sans SC','Microsoft YaHei',sans-serif;color:var(--navy);background:#f8fafd;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}#app{min-height:100vh}.top{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:20}.brand{font-size:22px;font-weight:700;letter-spacing:-.035em;color:#10285a}.brand span{font-size:13px;font-weight:600;letter-spacing:.08em;margin-left:10px;color:#567197}.top-right{display:flex;gap:24px;align-items:center}.top-link{font-size:13px;font-weight:600;color:#4b5e7d}.top-link:hover,.top-link.active{color:var(--blue)}.user-button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:8px 13px;font-size:13px;color:var(--navy);font-weight:600}.shell{display:grid;grid-template-columns:214px minmax(0,1fr);min-height:calc(100vh - 68px)}.side{border-right:1px solid var(--line);background:#fff;padding:28px 12px}.side-label{font:600 10px 'IBM Plex Mono',monospace;letter-spacing:.13em;color:#a0acc0;padding:0 17px;margin:0 0 11px}.nav{border:0;background:transparent;text-align:left;width:100%;display:flex;gap:13px;align-items:center;padding:13px 17px;border-radius:6px;font-size:14px;font-weight:600;color:#576987;margin-bottom:5px}.nav:hover{background:#f3f7fd;color:#2258b8}.nav.active{background:#eaf2ff;color:#145bd1}.nav-icon{display:inline-flex;width:20px;justify-content:center;font:600 15px 'IBM Plex Mono',monospace}.side-foot{margin:42px 16px 0;border-top:1px solid var(--line);padding-top:18px;color:#92a0b3;font:11px/1.7 'IBM Plex Mono',monospace}.main{padding:32px clamp(20px,3.2vw,50px) 64px;max-width:1640px;width:100%;margin:auto}.page-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:27px;gap:20px}.page-head h1{margin:0;font-size:30px;line-height:1.25;letter-spacing:-.045em}.page-head p{margin:9px 0 0;color:var(--muted);font-size:14px}.mode{display:flex;align-items:center;gap:8px;color:#15744e;background:#e8f7ef;border:1px solid #ccebd9;border-radius:5px;padding:8px 11px;font-size:12px;font-weight:700;white-space:nowrap}.mode i{width:7px;height:7px;background:#20ae70;border-radius:50%}.dashboard{display:grid;grid-template-columns:minmax(0,1fr) 305px;gap:22px}.panel{border:1px solid var(--line);background:#fff;border-radius:9px;box-shadow:0 2px 10px rgba(20,48,90,.025)}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:21px 24px;border-bottom:1px solid var(--line)}.panel-heading h2{margin:0;font-size:17px}.subtle{color:var(--muted);font-size:12px}.text-action{border:0;background:none;color:var(--blue);font-weight:700;font-size:12px}.table-wrap{overflow-x:auto}.problem-table{width:100%;border-collapse:collapse;text-align:left}.problem-table th{font-size:11px;color:#8190a7;letter-spacing:.07em;font-weight:700;background:#f8fafd;padding:12px 22px;white-space:nowrap}.problem-table td{padding:18px 22px;border-top:1px solid #edf1f6;font-size:13px;white-space:nowrap}.problem-table tr[data-id]{cursor:pointer}.problem-table tr[data-id]:hover{background:#f7faff}.problem-table .letter{color:var(--blue);font:600 19px 'IBM Plex Mono',monospace}.problem-title{font-weight:700;font-size:15px;margin-bottom:3px}.problem-desc{color:var(--muted);font-size:12px;white-space:normal;line-height:1.5;max-width:480px}.status{display:inline-block;border-radius:4px;padding:6px 9px;font-size:11px;font-weight:700;background:#f1f4f8;color:#748298}.status.solved{background:#e6f5ed;color:#138154}.status.wrong{background:#fff0ec;color:#b65d45}.difficulty{display:flex;gap:3px}.difficulty b{height:6px;width:13px;border-radius:2px;background:#d9e2ef}.difficulty b.on{background:var(--blue)}.rail{display:flex;flex-direction:column;gap:18px}.rail .panel-heading{padding:18px 20px}.leader-row{display:grid;grid-template-columns:27px 1fr 45px;align-items:center;gap:7px;padding:11px 20px;border-top:1px solid #edf1f6;font-size:12px}.rank{font:600 12px 'IBM Plex Mono',monospace;color:#7e8ca4}.rank.top-rank{color:#b17519}.leader-row strong{font-size:13px}.leader-row .score{text-align:right;font:600 13px 'IBM Plex Mono',monospace;color:#1c4ca3}.empty{padding:30px 22px;color:var(--muted);font-size:13px;line-height:1.7}.summary{display:grid;grid-template-columns:1fr 1fr;gap:0}.summary div{padding:21px 20px;border-top:1px solid #edf1f6}.summary div:nth-child(odd){border-right:1px solid #edf1f6}.summary strong{display:block;font:600 23px 'IBM Plex Mono',monospace;color:#1c4ca3;margin-bottom:4px}.summary span{font-size:11px;color:var(--muted)}.info-strip{margin-top:22px;padding:20px 24px;border:1px solid var(--line);border-radius:8px;background:#f3f7fc;display:flex;align-items:flex-start;gap:13px;color:#556887;font-size:13px;line-height:1.65}.info-strip strong{color:var(--navy)}.icon-box{width:23px;height:23px;display:grid;place-items:center;border:1px solid #b7c9e1;border-radius:4px;color:#2762b4;flex:none;font:600 13px 'IBM Plex Mono',monospace}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:22px}.detail-main{padding:28px 32px}.back{border:0;background:transparent;color:var(--blue);font-size:13px;font-weight:700;padding:0;margin-bottom:20px}.detail-title{font-size:28px;margin:0 0 9px}.detail-lead{font-size:15px;color:#62738e;line-height:1.7;margin:0 0 28px}.section{border-top:1px solid var(--line);padding:22px 0}.section h3{font-size:14px;margin:0 0 10px}.section p{color:#50617e;font-size:13px;line-height:1.9;margin:0;white-space:pre-wrap}.code-inline{background:#f3f6fb;padding:14px 16px;border-radius:5px;color:#24436f;font:13px/1.7 'IBM Plex Mono',monospace;overflow:auto;white-space:pre-wrap}.download{display:inline-flex;gap:8px;align-items:center;padding:10px 13px;border:1px solid #adc5e7;border-radius:5px;color:#1959b5;font-size:12px;font-weight:700;margin-top:14px}.download:hover{background:#f0f6ff}.submit-panel{padding:22px}.submit-panel h2{margin:0 0 8px;font-size:17px}.submit-panel p{font-size:12px;color:var(--muted);line-height:1.65;margin:0 0 20px}.field{margin-bottom:16px}.field label{display:block;font-size:12px;font-weight:700;margin-bottom:7px}.field input,.field textarea{width:100%;border:1px solid #cdd9e9;border-radius:5px;padding:10px 11px;background:white;color:var(--navy);outline:none;font-size:13px}.field textarea{min-height:138px;resize:vertical;font-family:'IBM Plex Mono',monospace;line-height:1.5}.field textarea.source{min-height:88px}.field input:focus,.field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #e6efff}.primary{border:1px solid #245acc;background:#2865dc;color:white;padding:11px 18px;border-radius:5px;font-size:13px;font-weight:700}.primary:hover{background:#2056c2}.primary:disabled{opacity:.5;cursor:not-allowed}.full{width:100%}.ghost{border:1px solid #c8d7ea;background:#fff;color:#2559a3;padding:10px 15px;border-radius:5px;font-weight:700;font-size:12px}.verdict{margin-top:16px;padding:13px 14px;border-radius:5px;font-size:12px;line-height:1.6;background:#eaf7ef;color:#11774b}.verdict.fail{background:#fff2ee;color:#b24e39}.grid-meta{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 20px}.meta-chip{padding:6px 9px;background:#f1f5fb;border:1px solid #e2eaf4;border-radius:4px;font-size:11px;color:#58708d}.record-table{width:100%;border-collapse:collapse}.record-table th,.record-table td{padding:14px 18px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}.record-table th{font-size:11px;color:#8090a9;background:#f8fafd}.record-table code{font-family:'IBM Plex Mono',monospace}.teacher-toolbar{display:flex;justify-content:space-between;align-items:center;padding:17px 22px;border-bottom:1px solid var(--line)}.search{border:1px solid var(--line);border-radius:4px;padding:8px 10px;font-size:12px;min-width:250px}.login-backdrop{position:fixed;inset:0;background:rgba(10,28,60,.35);display:grid;place-items:center;z-index:50;padding:20px}.login-card{width:min(430px,100%);background:white;border:1px solid var(--line);border-radius:10px;padding:30px;box-shadow:0 20px 70px rgba(20,40,80,.17)}.login-card h2{margin:0 0 6px;font-size:24px}.login-card p{margin:0 0 24px;font-size:13px;color:var(--muted);line-height:1.6}.login-switch{display:flex;background:#f0f4fa;border-radius:5px;padding:4px;margin:0 0 22px}.login-switch button{flex:1;border:0;background:transparent;padding:9px;font-size:12px;font-weight:700;color:#6b7d98;border-radius:4px}.login-switch button.active{background:#fff;color:var(--blue);box-shadow:0 1px 4px #dce5ef}.error{color:#b94635;font-size:12px;min-height:20px;margin:8px 0}.hidden{display:none!important}@media(max-width:1050px){.dashboard,.detail-layout{grid-template-columns:1fr}.rail{display:grid;grid-template-columns:1fr 1fr}.side{display:none}.shell{display:block}.main{padding:26px 20px}.top{padding:0 20px}.top-link{display:none}}@media(max-width:650px){.page-head{align-items:flex-start;flex-direction:column}.page-head h1{font-size:25px}.rail{display:block}.rail .panel{margin-top:15px}.detail-main{padding:22px}.top{height:60px}.brand{font-size:18px}.brand span{display:none}.problem-table th:nth-child(3),.problem-table td:nth-child(3),.problem-table th:nth-child(4),.problem-table td:nth-child(4){display:none}.problem-table td,.problem-table th{padding:12px}.detail-layout{display:block}.submit-panel{margin-top:16px}}
.status.pending,.verdict.pending{background:#fff5df;color:#9a6514}
.field textarea.code-editor{min-height:330px;font-family:"IBM Plex Mono",Consolas,monospace;font-size:12px;line-height:1.6;tab-size:4}
.detail-layout.code-layout{grid-template-columns:minmax(0,1fr) minmax(480px,1.05fr)}.field textarea.code-editor{min-height:350px;white-space:pre;overflow:auto;font-size:13px;line-height:1.65;tab-size:4}@media(max-width:1050px){.detail-layout.code-layout{grid-template-columns:1fr}}
.problem-figure{margin:0 0 25px;border:1px solid #d7e7ef;border-radius:11px;overflow:hidden;background:#f0f8fb}.problem-figure a{display:block}.problem-figure img{display:block;width:100%;height:auto;aspect-ratio:12/5;object-fit:contain}.problem-figure figcaption{padding:9px 14px;background:#fff;color:#637e95;font-size:12px;border-top:1px solid #dfeaf0}.detail-main .code-inline{white-space:pre-wrap;line-height:1.7}.problem-table tr[data-id="F"]{background:#f7fbfa}.problem-table tr[data-id="F"] .letter{color:#188478}@media(max-width:650px){.problem-figure img{aspect-ratio:12/5;object-fit:contain}.problem-figure figcaption{font-size:11px}}
.editor-shell{border:1px solid #cbd9e8;border-radius:8px;overflow:hidden;background:#fafdff}.editor-shell:focus-within{border-color:#3171d7;box-shadow:0 0 0 3px #e6efff}.editor-head{height:37px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;background:#f0f5fb;border-bottom:1px solid #dce6f0;color:#5a7290;font:600 11px 'IBM Plex Mono',Consolas,monospace}.editor-body{height:360px;display:flex;min-width:0}.editor-lines,.editor-highlight,.field textarea.code-editor{font:13px/1.65 'IBM Plex Mono',Consolas,monospace;tab-size:4}.editor-lines{width:42px;flex:none;margin:0;padding:10px 9px 10px 0;text-align:right;color:#9caec0;background:#f5f8fc;border-right:1px solid #e2eaf2;overflow:hidden;user-select:none}.editor-surface{position:relative;flex:1;min-width:0}.editor-highlight{position:absolute;inset:0;margin:0;padding:10px 14px;white-space:pre;overflow:hidden;color:#223956;pointer-events:none}.field textarea.code-editor{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:10px 14px;border:0;border-radius:0;resize:none;overflow:auto;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#123b68;white-space:pre;outline:0;box-shadow:none}.field textarea.code-editor::selection{background:rgba(65,135,235,.25)}.tok-keyword{color:#8a45b3;font-weight:600}.tok-builtin{color:#176da3}.tok-string{color:#1a8b62}.tok-number{color:#c06e1b}.tok-comment{color:#8a9aab;font-style:italic}.editor-actions{display:flex;gap:10px}.editor-actions button{flex:1;white-space:nowrap}.run-result{margin-top:16px;border:1px solid #d6e3ee;background:#f7faff;border-radius:7px;padding:13px 14px;color:#294561;font-size:12px;line-height:1.6}.run-result strong{display:block;font-size:13px}.run-result .run-ok{color:#14805a}.run-result .run-bad{color:#b45342}.run-label{font:600 11px 'IBM Plex Mono',Consolas,monospace;color:#6d839c;margin:12px 0 5px}.run-result pre{margin:0;padding:11px 12px;background:#14253c;color:#e9f3ff;border-radius:5px;font:12px/1.6 'IBM Plex Mono',Consolas,monospace;white-space:pre-wrap;overflow:auto;max-height:260px}.run-result pre.run-stderr{color:#ffbdb2}.run-note{margin-top:10px;color:#68809a;font-size:11px}@media(max-width:650px){.editor-body{height:330px}.editor-actions{flex-direction:column}}
.asset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:15px}.asset-link{display:flex;flex-direction:column;gap:3px;padding:11px 13px;border:1px solid #cbdce9;border-radius:6px;background:#f9fcff;color:#245887;font-size:12px;font-weight:700}.asset-link:hover{border-color:#4e91c8;background:#f0f8ff}.asset-link small{font:11px 'IBM Plex Mono',Consolas,monospace;color:#8295aa;overflow-wrap:anywhere}.asset-link.featured{grid-column:1/-1;background:#eaf5f8;border-color:#9fcbd4;color:#146b7b}@media(max-width:650px){.asset-grid{grid-template-columns:1fr}}
.story-board{margin:-2px 0 23px;border:1px solid #cddfe9;border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 2px 12px rgba(20,48,90,.035)}.story-intro{padding:23px 26px 20px;background:linear-gradient(115deg,#eef7fa 0%,#f3f8fd 70%,#f9fbfd 100%);border-bottom:1px solid #dbe9ef}.story-kicker{font:700 11px 'IBM Plex Mono',Consolas,monospace;letter-spacing:.08em;color:#32829b}.story-intro h2{margin:8px 0 7px;font-size:23px;letter-spacing:-.025em;color:#173b60}.story-intro p{margin:0;max-width:940px;color:#536c83;font-size:13px;line-height:1.75}.story-track{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:16px}.story-step{position:relative;min-width:0;min-height:126px;display:flex;flex-direction:column;gap:8px;text-align:left;padding:13px 12px;border:1px solid #d9e5ee;background:#fbfdff;border-radius:7px;color:#304f6c}.story-step:hover{border-color:#5396bd;background:#f1f8fc}.story-step.done{border-color:#9ad2bd;background:#f3fbf7}.story-step-top{display:flex;align-items:center;justify-content:space-between;gap:5px}.story-step-top b{display:grid;place-items:center;width:25px;height:25px;border-radius:5px;background:#e8f2f8;color:#1e7190;font:700 13px 'IBM Plex Mono',Consolas,monospace}.story-step-top small{color:#7e95a8;font-size:10px;white-space:nowrap}.story-step strong{font-size:13px;color:#1f4568}.story-step>span:last-child{font-size:11px;line-height:1.55;color:#6a8195}.story-loop{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 17px;border-top:1px solid #e1edf2;background:#f7fafc;color:#5a7286;font-size:11px}.story-loop span{font-weight:700;color:#217b89;white-space:nowrap}.mission-section ol{margin:0;padding-left:20px;color:#50617e;font-size:13px;line-height:1.85}.mission-section li{padding-left:4px;margin:5px 0}.handoff-section{margin:10px 0 0;padding:17px 19px;border-radius:7px;border:1px solid #bcd8df;background:#eef7f8}.handoff-section span{display:block;color:#1b7785;font-size:11px;font-weight:700;letter-spacing:.06em;margin-bottom:5px}.handoff-section p{margin:0;color:#315f70;font-size:13px;line-height:1.75}@media(max-width:1100px){.story-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}.story-step{flex:0 0 170px;scroll-snap-align:start}}@media(max-width:650px){.story-intro{padding:20px}.story-intro h2{font-size:20px}.story-track{padding:12px}.story-step{flex-basis:155px;min-height:132px}.story-loop{display:block;line-height:1.7}.story-loop span{display:block;white-space:normal}}
