*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:14px;color:#212529;background:#f4f5f7;display:flex;flex-direction:column}
.nav{background:#353d47;color:#fff;height:52px;flex:0 0 52px;display:flex;align-items:center;padding:0 20px;gap:14px}
.nav .logo{font-weight:700;font-size:17px;letter-spacing:.3px;color:#fff;text-decoration:none}
.nav .logo span{color:#5aa2e0}
.crumb{color:#aab2bd;font-size:13px}.crumb a{color:#c8ced6;text-decoration:none}
.grow{flex:1}
main{flex:1;min-height:0;display:flex;flex-direction:column}
.wrap{max-width:1400px;width:100%;margin:0 auto;padding:18px 20px 40px}
.muted{color:#6c757d}
.chip{display:inline-block;padding:3px 9px;border-radius:4px;font-size:12px;font-weight:600;color:#fff;white-space:nowrap}
.ok{background:#28a745}.bad{background:#dc3545}.mid{background:#ffc107;color:#212529}.none{background:#6c757d}
.head{background:#fff;border:1px solid #dee2e6;border-radius:6px;padding:14px 18px;margin-bottom:14px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.head h1{font-size:20px;margin:0;font-weight:600}
.btn{border:1px solid #ced4da;background:#fff;color:#212529;border-radius:4px;padding:6px 12px;font-size:13px;cursor:pointer;font-weight:500}
.btn:hover{background:#f1f3f5}
.btn.primary{background:#3e8acc;border-color:#3e8acc;color:#fff}.btn.primary:hover{background:#2f76b5}
.btn:disabled{opacity:.6;cursor:wait}
/* Dashboard */
.groups h2{font-size:16px;margin:24px 0 10px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px}
.tile{background:#fff;border:1px solid #dee2e6;border-radius:6px;padding:14px;display:flex;flex-direction:column;gap:8px;text-decoration:none;color:inherit;transition:box-shadow .15s}
.tile:hover{box-shadow:0 2px 10px rgba(0,0,0,.08);border-color:#b8c4d0}
.tile .tt{font-weight:600;font-size:15px}
.bar{height:8px;background:#e9ecef;border-radius:4px;overflow:hidden}.bar>div{height:100%}
.intro{background:#fff;border:1px solid #dee2e6;border-radius:6px;padding:14px 18px;line-height:1.55}
/* Editor-Ansicht */
.toolbar{background:#fff;border-bottom:1px solid #dee2e6;padding:8px 16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.toolbar h1{font-size:17px;margin:0 8px 0 0;font-weight:600}
.status{font-size:12.5px;color:#6c757d}
.ide{flex:1;min-height:0;display:grid;grid-template-columns:210px minmax(0,1fr) minmax(360px,40%)}
@media(max-width:1000px){.ide{grid-template-columns:1fr;grid-auto-rows:auto}.files{max-height:160px}.editor{height:60vh}}
.files{background:#fafbfc;border-right:1px solid #dee2e6;overflow:auto;padding:8px 0;font-size:13px}
.files .dir{padding:6px 12px 2px;color:#6c757d;font-size:11.5px;word-break:break-all}
.files .f{padding:4px 12px 4px 20px;cursor:pointer;display:flex;justify-content:space-between;gap:6px}
.files .f:hover{background:#eef2f6}.files .f.act{background:#dceaf7;font-weight:600}
.files .f .ro{font-size:10px;color:#868e96;border:1px solid #ced4da;border-radius:3px;padding:0 3px}
.editor{min-height:0;position:relative}
.editor textarea{width:100%;height:100%;border:0;font:13px/1.45 SFMono-Regular,Menlo,Consolas,monospace;padding:10px;resize:none;outline:none}
.side{border-left:1px solid #dee2e6;background:#fff;display:flex;flex-direction:column;min-height:0}
.tabs{display:flex;border-bottom:1px solid #dee2e6;background:#fafbfc}
.tabs button{border:0;background:none;padding:10px 16px;font-size:13.5px;cursor:pointer;color:#495057;border-bottom:2px solid transparent}
.tabs button.act{color:#212529;font-weight:600;border-bottom-color:#3e8acc}
.pane{flex:1;overflow:auto;padding:14px 18px}
/* Ergebnis */
.scorehead{display:flex;align-items:center;gap:10px;margin-bottom:10px;flex-wrap:wrap}
details.grp{margin:6px 0 12px}
details.grp>summary{cursor:pointer;font-weight:600;padding:6px 10px;border-radius:4px;color:#fff;display:flex;justify-content:space-between;list-style:none}
details.grp>summary::-webkit-details-marker{display:none}
.tc{border-bottom:1px solid #eef0f2;padding:8px 2px}
.tc .t{display:flex;justify-content:space-between;gap:8px}
.tc .n{font-weight:500;word-break:break-word}
.tc .p{white-space:nowrap;font-size:12px;color:#495057}
.tc pre,.build pre{background:#f8f9fa;border:1px solid #e9ecef;border-radius:4px;padding:8px;margin:6px 0 0;font-size:12px;white-space:pre-wrap;word-break:break-word;max-height:260px;overflow:auto}
.tc.f .n::after{content:" failed";color:#dc3545;font-weight:400}
.tc.s .n::after{content:" passed";color:#28a745;font-weight:400}
.tc .nf{font-size:12px;color:#6c757d;margin-top:3px}
.build{border-left:4px solid #dc3545;padding:8px 12px;background:#fff5f5;border-radius:4px;margin-bottom:10px}
.spinner{display:inline-block;width:14px;height:14px;border:2px solid #cfd8e3;border-top-color:#3e8acc;border-radius:50%;animation:sp 0.8s linear infinite;vertical-align:-2px}
@keyframes sp{to{transform:rotate(360deg)}}
/* Aufgabenstellung */
.ps{line-height:1.6}
.ps h2{font-size:18px;border-bottom:1px solid #dee2e6;padding-bottom:6px;margin-top:4px}
.ps h3{font-size:16px;margin:22px 0 6px}
.ps h4{font-size:14.5px;margin:18px 0 4px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ps code{background:#f4f4f6;color:#c7254e;padding:1px 5px;border-radius:3px;font-size:12.5px;font-family:SFMono-Regular,Menlo,Consolas,monospace}
.ps pre{background:#f6f8fa;border:1px solid #e1e4e8;border-radius:4px;padding:10px;overflow:auto;font-size:12.5px}
.ps table{border-collapse:collapse;margin:6px 0}.ps td,.ps th{border:1px solid #ccc;padding:3px 9px;text-align:center}
.ps .hint{background:#eef5fc;border-left:4px solid #3e8acc;padding:8px 12px;border-radius:4px;margin:10px 0}
.ps .warn{background:#fff8e6;border-left:4px solid #ffc107;padding:8px 12px;border-radius:4px;margin:10px 0}
.tb{font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:10px;cursor:help}
.tb.ok{background:#d4edda;color:#155724}.tb.bad{background:#f8d7da;color:#721c24}.tb.none{background:#e9ecef;color:#6c757d}
.ico{display:inline-flex;width:18px;height:18px;border-radius:50%;align-items:center;justify-content:center;color:#fff;font-size:11px}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;z-index:50}
.modal>div{background:#fff;border-radius:8px;padding:20px;width:min(420px,90vw);display:flex;flex-direction:column;gap:10px}
.modal input{padding:8px;border:1px solid #ced4da;border-radius:4px;font-size:14px}
