:root{
  --bg:#f5f7fa;--card:#fff;--ink:#142033;--muted:#667085;--line:#d9e1ea;
  --nav:#0f172a;--nav2:#1e293b;--blue:#2563eb;--blue2:#1d4ed8;--green:#147a52;
  --red:#b42318;--amber:#a15c00;--soft-blue:#eef4ff;--soft-green:#ecfdf3;--soft-red:#fff1f0;
  --soft-amber:#fff8eb;--mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);line-height:1.55}button,input,textarea,select{font:inherit}button{transition:.15s ease}a{color:inherit}.app{min-height:100vh}.stack{display:flex;flex-direction:column;gap:18px;width:100%}
.topbar{height:72px;background:var(--nav);color:#fff;display:flex;align-items:center;gap:18px;padding:0 24px;position:sticky;top:0;z-index:50;box-shadow:0 2px 12px #0f172a33}.menu-btn{display:none;border:0;background:#ffffff12;color:#fff;border-radius:10px;padding:8px 11px;font-size:20px}.brand-wrap{display:flex;align-items:center;gap:10px;min-width:310px}.brand{font-weight:850;letter-spacing:.1px}.tag{font-size:12px;padding:4px 9px;border:1px solid #ffffff28;border-radius:999px;color:#dbe5f5}.course-progress{margin-left:auto;width:240px;font-size:12px;color:#dce4ef}.bar{height:7px;background:#ffffff1a;border-radius:99px;overflow:hidden;margin-top:6px}.bar i{display:block;height:100%;background:#6ea8ff;border-radius:99px}.user-pill{display:flex;align-items:center;gap:10px;font-size:13px}.user-pill .btn{background:#ffffff0d;border-color:#ffffff28;color:#fff}
.layout{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:calc(100vh - 72px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:18px 14px;overflow:auto;position:sticky;top:72px;height:calc(100vh - 72px);display:flex;flex-direction:column}.side-title{font-size:13px;text-transform:uppercase;letter-spacing:.07em;color:#7c8798;font-weight:800;padding:4px 10px 10px}.lesson-btn{display:flex;align-items:flex-start;gap:8px;width:100%;text-align:left;border:0;background:transparent;padding:9px 10px;border-radius:10px;color:#344054;cursor:pointer;margin-bottom:2px;line-height:1.25}.lesson-btn:hover{background:#f4f6f8}.lesson-btn.active{background:#eaf0ff;color:#173b8f;font-weight:750}.lesson-btn.complete .lesson-num{background:#dcfae6;color:#137a4f}.lesson-num{flex:0 0 28px;height:24px;border-radius:7px;background:#f1f4f7;display:grid;place-items:center;font-size:11px;font-weight:800;color:#7b8491}.lesson-text{padding-top:2px}.sidebar-bottom{margin-top:auto;padding:16px 8px 4px}
.main{padding:34px 34px 48px;width:min(100%,1320px);margin:0 auto}.lesson-header{display:flex;gap:16px;align-items:flex-start;margin-bottom:18px}.lab-badge{flex:0 0 50px;width:50px;height:50px;border-radius:14px;background:var(--nav2);color:#fff;display:grid;place-items:center;font-weight:900;font-size:17px}.lesson-header-text h1{font-size:31px;line-height:1.15;margin:2px 0 6px}.lesson-header-text p{margin:0;color:var(--muted);font-size:16px}.eyebrow{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:850;color:#667085;margin-bottom:4px}
.card,.mission,.callout,.secret-card,.lesson-progress{width:100%;max-width:100%}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 1px 2px #10182808}.card h2,.card h3{margin-top:0}.workbench{padding:24px}.mission{background:linear-gradient(135deg,#172554,#1d4ed8);color:#fff;border-radius:18px;padding:22px 24px}.mission-label{text-transform:uppercase;letter-spacing:.11em;font-weight:850;font-size:11px;color:#bfdbfe}.mission h2{font-size:22px;line-height:1.35;margin:6px 0 0}.mission-extra{margin-top:9px;color:#e5edff}.callout{border-left:5px solid var(--blue);background:var(--soft-blue);border-radius:10px;padding:14px 17px;color:#20304a}.callout.safe{border-left-color:var(--green);background:var(--soft-green)}.callout.warn{border-left-color:#d17b00;background:var(--soft-amber)}.callout-title{display:block;margin-bottom:4px}.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}.section-heading h2{margin:0;font-size:21px}.pill{font-size:12px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:5px 9px;color:#475569;white-space:nowrap}.muted{color:var(--muted)}.small-note{font-size:13px;color:#6b7280}.lead{font-size:17px;color:#536074}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:14px 0}.action-grid{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cfd8e3;background:#fff;color:#263346;padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:700;text-decoration:none;min-height:42px}.btn:hover{background:#f8fafc;transform:translateY(-1px)}.btn.primary{background:var(--nav2);border-color:var(--nav2);color:#fff}.btn.blue{background:var(--blue);border-color:var(--blue);color:#fff}.btn.danger{background:#fff3f2;border-color:#f0b9b5;color:#9f261f}.btn.ghost{background:#f8fafc}.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}.label{display:block;font-size:13px;font-weight:800;margin:11px 0 6px}.input,.textarea,.select{width:100%;border:1px solid #cdd7e2;border-radius:10px;padding:11px 12px;background:#fff;color:var(--ink);outline:none}.input:focus,.textarea:focus,.select:focus{border-color:#7ea6ef;box-shadow:0 0 0 3px #2563eb14}.textarea{min-height:150px;resize:vertical;line-height:1.5}.textarea.compact{min-height:110px}.textarea.report{min-height:300px}.char-count{text-align:right;font-size:12px;color:#7b8491;margin:6px 0 12px}
.lesson-progress{display:flex;gap:8px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin:14px 0 18px}.progress-chip{display:flex;align-items:center;gap:7px;font-size:12px;color:#667085;padding:6px 8px;background:#f7f8fa;border-radius:8px}.progress-chip.done{background:#ecfdf3;color:#15724c}.progress-dot{width:20px;height:20px;border-radius:50%;background:#e6eaf0;display:grid;place-items:center;font-weight:800}.progress-chip.done .progress-dot{background:#c9f4d9;color:#126642}
.status-banner{border-radius:11px;padding:13px 15px;border:1px solid #d5dce5;background:#f8fafc}.status-banner strong{display:block;margin-bottom:3px}.status-banner.success{background:var(--soft-green);border-color:#b9e8cb;color:#145b3f}.status-banner.danger{background:var(--soft-red);border-color:#f1c0bc;color:#8d241e}.status-banner.warning{background:var(--soft-amber);border-color:#efd3a0;color:#865009}.status-banner.info{background:#eff6ff;border-color:#c6d9fb;color:#244a84}.status-text{font-size:14px}.result-box{margin-top:14px}.response-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px}.http-status{font-family:var(--mono);font-size:12px;font-weight:850}.http-status.ok{color:#15724c}.http-status.err{color:#a52a23}.code{font-family:var(--mono);white-space:pre-wrap;word-break:break-word;background:#0f172a;color:#e7eef9;border-radius:12px;padding:15px;max-height:430px;overflow:auto;font-size:12.5px;line-height:1.55;margin:0}.request-line{font-family:var(--mono);display:flex;gap:10px;align-items:center;padding:11px 13px;background:#f8fafc;border:1px solid #e1e7ee;border-radius:10px}.method{font-weight:900;color:#1d4ed8}.inline-code{display:inline-block;padding:7px 9px;background:#f3f5f8;border-radius:8px;font-family:var(--mono);font-size:12px;margin-top:8px;word-break:break-all}
.diagram{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:18px 0}.node{padding:10px 13px;border:1px solid #cad5e1;border-radius:10px;background:#fff;font-weight:650}.arrow{color:#8490a1;font-weight:900}.fact-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.fact-grid>div,.case-cards article{border:1px solid #e0e6ed;border-radius:11px;padding:13px;background:#fbfcfd}.fact-grid strong,.fact-grid span,.case-cards strong{display:block}.fact-grid span{color:#637083;margin-top:3px}.case-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:14px 0}.case-cards article{min-height:100px}.case-cards strong{margin-bottom:6px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.two-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}.action-panel{border:1px solid #dbe3ec;border-radius:13px;padding:16px;background:#fbfcfd}.danger-zone{background:#fff7f6;border-color:#f0cac7}.action-kicker{text-transform:uppercase;letter-spacing:.07em;font-size:11px;font-weight:850;color:#6b7280}.mode{font-size:11px;font-weight:900;padding:6px 9px;border-radius:999px}.mode.vuln{background:#fff0ee;color:#a12c25}.mode.fixed{background:#e7f8ee;color:#146a47}.retest-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.retest{display:flex;gap:8px;align-items:center;border:1px solid #e1e6ed;background:#f8fafc;border-radius:10px;padding:10px;font-size:13px;color:#667085}.retest span{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#e7ebf0;font-weight:850}.retest.done{background:#effcf4;border-color:#c5ebd3;color:#176a49}.retest.done span{background:#ccefd9;color:#135f42}
.steps-inline{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.step-card{display:flex;gap:10px;border:1px solid #e0e6ed;border-radius:12px;padding:14px;background:#fbfcfd}.step-num{flex:0 0 30px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eaf0ff;color:#1d4ed8;font-weight:900}.step-content{min-width:0}.step-content h3{font-size:14px;margin:3px 0 10px}.steps{padding-left:23px}.steps li{margin:5px 0}.state-machine{display:flex;justify-content:center;margin:16px 0}.state-current{padding:15px 20px;border-radius:13px;background:#eef4ff;border:1px solid #cfe0ff;font-weight:850;color:#244d92}.mini-table{display:grid;grid-template-columns:160px 1fr 110px;border:1px solid #dfe6ee;border-radius:11px;overflow:hidden;margin:15px 0}.mini-table>div,.mini-table>.th,.mini-table>span{padding:10px 12px;border-bottom:1px solid #e7ebf0}.mini-table .th{font-weight:850;background:#f3f6f9}.iframe{width:100%;height:150px;border:1px solid #dbe2ea;border-radius:10px;background:#fff}.finding-input{margin-bottom:10px}.capstone-id{display:inline-block;background:#eef4ff;border:1px solid #ccdcfb;padding:8px 11px;border-radius:9px;font-family:var(--mono);font-weight:800}
.knowledge .question{display:flex;gap:12px;padding:17px 0;border-top:1px solid #edf0f4}.knowledge .question:first-of-type{border-top:0}.question-num{flex:0 0 28px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#eef2f6;font-weight:850}.question-body{flex:1;min-width:0}.option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.option{display:flex;align-items:flex-start;gap:8px;border:1px solid #dbe2ea;border-radius:10px;padding:10px 11px;cursor:pointer;background:#fff}.option:hover{background:#f9fbfd}.option.selected{border-color:#81a6ef;background:#eff5ff}.option input{margin-top:3px}.notes .example{margin-top:12px;border-top:1px solid #e5e9ee;padding-top:10px}.notes .example summary{cursor:pointer;font-weight:750;color:#3e5578}.notes .example p{color:#5e6b7d}
.secret-card{display:grid;grid-template-columns:58px 1fr;gap:15px;border-radius:17px;padding:22px;border:1px solid #d7dfe8;background:#fff}.secret-card.ready{border-color:#b8dfc7;background:#f7fffa}.secret-icon{width:50px;height:50px;border-radius:14px;background:#edf1f5;display:grid;place-items:center;font-size:22px}.secret-card.ready .secret-icon{background:#dcf7e7}.secret-main h2{margin:1px 0 5px}.secret-main p{margin:4px 0 11px}.missing-list{margin:8px 0 14px;padding-left:20px;color:#697586}.secret-code-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.secret-code{font-family:var(--mono);font-size:17px;font-weight:900;background:#0f172a;color:#fff;padding:10px 13px;border-radius:10px;letter-spacing:.04em}.section-nav{display:flex;justify-content:space-between;gap:12px;margin-top:20px}.footer-note{font-size:12px;color:#8892a0;text-align:center;margin:22px 0 4px}
.login-page{min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(circle at top,#e9f0ff,#f6f8fb 55%)}.login-card{width:min(100%,650px);background:#fff;border:1px solid #d9e1ea;border-radius:22px;padding:30px;box-shadow:0 20px 55px #16203317}.login-brand{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#3260b7;font-weight:850}.login-card h1{font-size:34px;margin:5px 0 7px}.toast{position:fixed;right:20px;bottom:20px;background:#0f172a;color:#fff;padding:12px 15px;border-radius:11px;box-shadow:0 8px 28px #0003;z-index:80;max-width:380px}
@media(max-width:1100px){.course-progress{display:none}.layout{grid-template-columns:270px minmax(0,1fr)}.main{padding:28px 22px}.fact-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.topbar{height:64px;padding:0 12px}.menu-btn{display:block}.brand-wrap{min-width:0}.tag{display:none}.user-pill span{display:none}.layout{display:block}.sidebar{display:none;position:fixed;top:64px;left:0;bottom:0;width:min(88vw,330px);height:auto;z-index:45;box-shadow:8px 0 26px #0002}.sidebar.open{display:flex}.main{padding:20px 14px}.lesson-header-text h1{font-size:25px}.lesson-header{gap:11px}.lab-badge{width:44px;height:44px;flex-basis:44px}.two-col,.two-actions,.steps-inline,.case-cards,.option-grid,.retest-grid{grid-template-columns:1fr}.fact-grid{grid-template-columns:1fr 1fr}.secret-card{grid-template-columns:1fr}.secret-icon{width:44px;height:44px}.mini-table{grid-template-columns:95px 1fr 75px;font-size:12px}.section-nav .btn{flex:1}.brand{font-size:14px}.user-pill{margin-left:auto}}
@media(max-width:520px){.main{padding:16px 10px}.card,.workbench,.mission,.secret-card{padding:17px}.fact-grid{grid-template-columns:1fr}.lesson-header-text h1{font-size:22px}.callout{padding:12px 13px}.action-grid,.toolbar{align-items:stretch}.action-grid .btn,.toolbar .btn,.toolbar a.btn{width:100%}.section-heading{display:block}.pill{display:inline-block;margin-top:8px}.login-card{padding:22px}.login-card h1{font-size:28px}.mini-table{grid-template-columns:80px 1fr 65px}.mini-table>div,.mini-table>.th{padding:8px 7px}}


/* VulnShop 3.1: блок кода и независимые стенды многосценарных уроков */
.secret-card{grid-template-columns:58px minmax(0,1fr);align-items:start}
.secret-body{min-width:0;width:100%}
.secret-action{max-width:100%;white-space:normal;text-align:center}
.secret-code-row{margin-top:12px}
.secret-code{max-width:100%;overflow-wrap:anywhere}
.scenario-block{border:1px solid var(--line);background:#fff;border-radius:16px;padding:20px;margin:0;box-shadow:0 1px 2px #17203308}
.scenario-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px}
.scenario-heading h2{margin:0 0 5px}
.scenario-heading p{margin:0}
.scenario-number{flex:0 0 34px;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#eef4ff;color:#2459b8;font-weight:900}
.scenario-block>.patch-card{margin-top:16px;background:#fbfcfe}
@media(max-width:520px){
 .secret-card{grid-template-columns:1fr}
 .secret-body{width:100%}
 .secret-action,.secret-code-row .btn{width:100%}
 .secret-code-row{align-items:stretch}
 .secret-code{display:block;width:100%;font-size:15px}
 .scenario-block{padding:16px}
}
