:root{
    --bg:#f5f7fa;--card:#fff;--txt:#0f172a;--muted:#6b7280;--brand:#1e90ff;--ok:#12b886;--bad:#ef4444;--hover:#e8eef6
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--txt);display:flex;min-height:100vh;align-items:center;justify-content:center}
.wrap{width:min(900px,92vw);background:var(--card);border-radius:20px;box-shadow:0 10px 30px rgba(2,6,23,.08);padding:24px 20px}
header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.title{font-weight:700;font-size:clamp(18px,2.4vw,24px)}
.progress{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden;display:flex}
.seg{height:100%}
.seg.ok{background: var(--ok)}
.seg.bad{background: var(--bad)}
.bar{display:flex;width:100%}
.q{margin-top:8px;font-size:clamp(18px,2.2vw,22px);font-weight:600}
.answers{margin-top:14px;display:grid;gap:10px}
.ans{border:1.5px solid #e5e7eb;border-radius:12px;padding:12px 14px;background:#f9fafb;cursor:pointer;transition:.18s ease}
.ans:hover{background:var(--hover)}
.ans.selected{outline:3px solid var(--brand);background:#f0f7ff}
.ans.correct{background:#ecfdf5;border-color:#a7f3d0}
.ans.wrong{background:#fef2f2;border-color:#fecaca}
.controls{display:flex;align-items:center;gap:10px;margin-top:16px}
.btn{border:0;border-radius:12px;padding:12px 16px;background:var(--brand);color:#fff;font-weight:600;cursor:pointer;transition:.2s ease}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.muted{color:var(--muted);font-size:14px}
.score{margin-top:18px;font-weight:700}
.figure{margin:12px 0 0}
.figure img{max-width:100%;border-radius:12px;display:block}
.figcap{font-size:12px;color:var(--muted);margin-top:6px}
.counter{min-width:72px;text-align:right}
.back-btn {
    background: transparent;
    color: var(--muted);
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
}
.back-btn:hover {
    background: var(--hover);
    border-color: #e5e7eb;
}