*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:#f6f8fc;color:#16243d;line-height:1.5}header{height:76px;background:white;border-bottom:1px solid #e7eaf1;display:flex;align-items:center;justify-content:space-between;padding:0 max(4vw,22px)}a{color:#2858d8;text-decoration:none}.brand{font-size:20px;font-weight:850;letter-spacing:.4px;color:#202f58}.brand small{display:block;font-size:9px;font-weight:750;letter-spacing:2.4px;color:#637ca4;margin-left:25px}main{margin:42px auto 80px;padding:0 22px}.home{max-width:1130px;display:grid;grid-template-columns:1.1fr 1fr;gap:44px;align-items:center;min-height:65vh}.wide{max-width:1400px}.narrow{max-width:680px}.hero{padding:30px 0}h1{font-size:clamp(32px,4.3vw,58px);line-height:1.15;letter-spacing:-1.6px;margin:14px 0 22px}h1 em{font-style:normal;color:#315fe6}h2{font-size:23px;margin:8px 0 15px}p{color:#5c6b86}.eyebrow,.step{font-size:11px;letter-spacing:2px;font-weight:850;color:#3563df}.panel{background:white;padding:30px;border:1px solid #e9edf5;border-radius:19px;box-shadow:0 13px 38px #2234640a;margin-bottom:22px}.panel.centered{text-align:center;padding:60px 25px}.big-icon{font-size:60px}.muted{color:#66758c;font-size:13px}.pill,.chip{display:inline-block;background:#eef3ff;color:#3459a6;border-radius:100px;font-size:12px;font-weight:750;padding:8px 12px}.green{color:#118651;background:#e7f9ef}label{display:block;font-size:12px;color:#4b5c7a;font-weight:750;margin:14px 0 6px}input,select,textarea{border:1px solid #dce3f0;border-radius:10px;background:#fff;color:#1b2d4b;padding:13px 14px;width:100%;outline:none;font:inherit}input:focus,textarea:focus{border-color:#3867e9;box-shadow:0 0 0 3px #3966e515}textarea{resize:vertical;min-height:70px}button,.smallbtn{background:#315ee2;color:white;display:inline-block;padding:12px 19px;border:0;border-radius:10px;font-size:14px;font-weight:750;cursor:pointer}button:hover,.smallbtn:hover{filter:brightness(.94)}form>button:not(.ghost){margin-top:20px}button.ghost,.ghost,.outline{background:white!important;border:1px solid #dce3f0;color:#3154b2;padding:10px 15px;border-radius:10px;cursor:pointer}form#go button,.panel form>button[type=submit]{width:100%}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dashboard-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:24px}.qeditor{border:1px solid #e8edf6;background:#fafbff;padding:16px;margin:18px 0;border-radius:12px}.quiz-row{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #e8edf4;padding:14px 0}.quiz-row:last-child{border:0}.quiz-row p{margin:5px 0}.link-panel{display:flex;justify-content:space-between;gap:22px;align-items:center}.pin{font-size:48px;letter-spacing:7px;font-weight:850;color:#2a50bd}.linktext{font-size:13px;word-break:break-all;color:#556984;background:#f7f9fd;padding:10px;border-radius:9px;margin:12px 0}.actions{display:flex;flex-direction:column;align-items:flex-start;gap:11px}.start{background:#159866}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat{padding:23px;background:white;border-radius:15px;border:1px solid #e8edf4}.stat b{font-size:30px;display:block;color:#234fc7}.stat span{font-size:12px;color:#60708c;font-weight:650}.sectionheading{display:flex;justify-content:space-between;align-items:center;gap:20px}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}th{text-align:left;color:#5f708b;font-size:11px;background:#f5f7fc}th,td{padding:13px;border-bottom:1px solid #edf0f5}.quiz-top{display:flex;align-items:center;justify-content:space-between}#clock{color:#2857d9;font-size:26px}.bar{height:7px;background:#e8effe;border-radius:7px;margin:22px 0}.bar div{height:100%;background:#4775ef;border-radius:7px}.choices{display:grid;gap:12px}.choice{background:white;border:1px solid #d7e1f4;color:#263b60;text-align:left;font-size:16px;padding:17px 18px}.choice:hover{background:#eef3ff}.choice:disabled{opacity:.55}.alert{background:#feecef;color:#9d2336;padding:12px;border-radius:10px}footer{text-align:center;color:#8895aa;padding:25px}@media(max-width:800px){.home,.dashboard-grid{grid-template-columns:1fr}.home{gap:10px}.stats{grid-template-columns:repeat(2,1fr)}.link-panel{flex-direction:column;align-items:stretch}.panel{padding:21px}.two{grid-template-columns:1fr}header{height:66px}}
/* Automatic teacher-start announcement */
.launch-count{font-size:4.4rem;font-weight:900;line-height:1.2;color:#1678dc;margin:14px auto;animation:pop 1s ease-in-out infinite}
@keyframes pop{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
#launch{border:2px solid rgba(22,120,220,.22);box-shadow:0 16px 45px rgba(22,120,220,.12)}

/* Role selection - teacher/student landing */
.role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;max-width:1000px;margin:0 auto}.role-card{display:flex;flex-direction:column;gap:12px;min-height:335px}.role-card h2{margin:2px 0}.role-icon{font-size:40px}.role-button{display:block;text-align:center;background:#1769e0;color:white!important;border-radius:10px;text-decoration:none;padding:14px 16px;margin-top:auto;font-weight:700}.role-card form{margin-top:auto}.role-card button{width:100%}@media(max-width:700px){.role-grid{grid-template-columns:1fr}.role-card{min-height:unset}}

/* Updated interactive registration and topper elements */
.clickable-stat{cursor:pointer;border:1px solid #93c5fd;text-align:left;font:inherit;width:100%;color:inherit}.clickable-stat:hover{box-shadow:0 0 0 3px #bfdbfe;transform:translateY(-2px)}
details.panel>summary{cursor:pointer;font-size:1.05rem;margin-bottom:16px}details.panel:not([open])>summary{margin-bottom:0}
.podium{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:12px;margin:18px 0}.podium-card{border:1px solid #e1e7f0;border-radius:14px;padding:15px;background:#f7faff}.podium-card strong{display:block;margin-bottom:8px}.podium-card div{font-size:1.2rem;font-weight:700}.podium-card small{display:block;margin-top:5px}.podium-card .podium-marks{font-size:1.5rem;font-weight:800;margin-top:8px;color:#0b6b3a}.podium-1,.topper-1{background:#fff4ce!important}.podium-2,.topper-2{background:#eef2f7!important}.podium-3,.topper-3{background:#fce8d7!important}

/* Quiz flow: answer highlight, Next button, timer bar, submission message */
.quiz-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
.quiz-actions .outline{min-width:120px}
.choice.picked{border-color:#1678dc;background:#e8f2ff}
.timebar{height:6px;border-radius:99px;background:#e7eaf1;overflow:hidden;margin:6px 0 14px}
.timebar>div{height:100%;width:100%;background:#1678dc;transition:width .2s linear}
#clock.urgent{color:#d92d20}
.small{font-size:.85rem}
.success-panel{border:2px solid #86efac;background:#f0fdf4}
.success-panel .big-icon{color:#16a34a}
/* leaderboard highlight for the top three */
tr.topper-row td{font-weight:700}
tr.topper-1 td:first-child{border-left:5px solid #f5b301}
tr.topper-2 td:first-child{border-left:5px solid #94a3b8}
tr.topper-3 td:first-child{border-left:5px solid #d9822b}
.podium-1{border:2px solid #f5b301!important;box-shadow:0 8px 24px rgba(245,179,1,.25)}
.podium-2{border:2px solid #94a3b8!important}
.podium-3{border:2px solid #d9822b!important}
#student-details[hidden]{display:none}

/* v3: teacher-created student/team accounts */
.flash{padding:12px 16px;border-radius:10px;margin:0 0 12px;font-size:14px;font-weight:600}
.flash-ok{background:#e7f9ef;color:#0f7a49;border:1px solid #b6ebcf}
.flash-err{background:#feecef;color:#9d2336;border:1px solid #f7c6cf}
.role-card .alert{font-size:14px}
button.danger{color:#b42318!important;border-color:#f3c3bd!important;padding:6px 12px;font-size:12px}
input[type=file]{padding:10px}
