@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');
*{box-sizing:border-box}body{margin:0;background:#f5f5f0;color:#123c32;font-family:'Tajawal',Tahoma,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid #c7d5cc;border-radius:11px;padding:12px 20px;background:white;color:#163e33;font-weight:700}button:disabled{cursor:default;opacity:.65}button:hover:not(:disabled){filter:brightness(.94)}button:focus-visible,select:focus-visible{outline:3px solid #8da848;outline-offset:3px}main{max-width:1440px;margin:auto;padding:20px 32px}header{display:flex;align-items:center;justify-content:center;padding:4px 0 16px}.site-title{font-size:23px;font-weight:800;white-space:nowrap;line-height:1.4}.controls{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:16px}.controls button{font-size:17px}.setup{max-width:760px;margin:16px auto}.panel{background:white;border:1px solid #dce3dc;padding:28px;border-radius:20px}.panel h2{margin-top:0}.panel label{display:block;font-weight:700;margin:18px 0}.panel small{font-size:12px;font-weight:400;color:#526b5b;margin-right:8px}input,textarea{display:block;border:1px solid #cbd7cb;background:#fafbf8;width:100%;padding:12px;border-radius:10px;margin-top:9px;color:#163e33;resize:vertical;line-height:1.6}input:focus,textarea:focus{outline:2px solid #a8be73}.primary{background:#194e40;color:#fff;border-color:#194e40}.panel .primary{width:100%;margin-bottom:10px}.hint{font-size:14px;color:#526b5b;line-height:1.7}.error,.save-error{color:#9b2922;background:#fff0ed;padding:12px}.save-error{display:block;margin:8px auto}.eyebrow{font-size:14px;font-weight:700;color:#5a7136}.presentation{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;padding:14px 26px}.presentation header{padding:0}.presentation .controls{margin:0}.arena{min-height:0;text-align:center;width:100%;margin:0 auto;display:flex}.card{width:100%;background:white;border:2px solid #d4ded2;border-radius:24px;padding:clamp(14px,2.5vh,30px) clamp(20px,4vw,60px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:clamp(8px,1.8vh,20px);box-shadow:0 8px 25px #244a3509}.card h1{font-size:clamp(30px,5.8vh,58px);font-weight:800;line-height:1.3;margin:0;overflow-wrap:anywhere}.card h2{align-self:center;font-size:clamp(27px,5.2vh,52px);line-height:1.65;font-weight:700;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.countdown{display:flex;flex-direction:column;align-items:center;gap:10px}.timer{border-radius:50%;width:clamp(92px,16vh,145px);height:clamp(92px,16vh,145px);background:conic-gradient(#91ad46 var(--p),#e6ecdf 0);display:flex;flex-direction:column;justify-content:center;position:relative}.timer:before{content:'';position:absolute;inset:6px;background:white;border-radius:50%}.timer strong,.timer small{z-index:1}.timer strong{font-size:clamp(42px,8vh,72px);line-height:1.05}.timer small{font-size:16px;font-weight:700;color:#4d653d}.waiting{min-width:220px;background:#e8eedb;border:0;color:#425635;opacity:1!important;font-size:21px;padding:10px 24px}.answer-section{display:flex;flex-direction:column;gap:12px}.answer{padding:clamp(14px,2vh,24px);background:#edf4e1;border-radius:14px;font-size:clamp(28px,5vh,50px);font-weight:700;line-height:1.55;white-space:pre-wrap}.grading{display:flex;gap:14px;max-width:760px;width:100%;margin:auto}.grading button{width:50%;font-size:clamp(24px,4vh,36px);padding:10px 20px}.grading small{display:block;font-size:15px;margin-top:3px}.correct{background:#194e40;color:white}.wrong{background:#fff1eb;color:#963c25;border-color:#e8c2b2}.rolling h1{color:#52722c}.report{background:white;padding:35px;border-radius:20px;margin:20px 0}.reporthead{display:flex;align-items:center;justify-content:space-between;gap:20px}.report h1{font-size:32px}table{border-collapse:collapse;width:100%;margin-top:30px}th,td{padding:17px 10px;text-align:right;border-bottom:1px solid #e2e8dd}th{background:#edf1e6;font-size:14px}td:not(:nth-child(2)),th:not(:nth-child(2)){text-align:center}select{color:#194e40;background:#e9eddf;border:1px solid #c7d5cc;border-radius:10px;padding:8px 12px}.bankpreview{border:1px solid #dce3da;border-radius:10px;margin:18px 0;padding:12px}.bankpreview summary{cursor:pointer;font-weight:700}.bankpreview ol{max-height:420px;overflow:auto;padding-inline-start:25px}.bankpreview li{padding:12px 5px;border-bottom:1px solid #e5ebdf;font-size:15px;line-height:1.8}.bankpreview li p{color:#446629;margin:7px 0}.formula{display:inline-flex;gap:8px;align-items:center;font-family:Georgia,serif}.fraction{display:inline-flex;flex-direction:column;text-align:center;vertical-align:middle;line-height:1.25}.fraction span{padding:0 5px}.fraction span:first-child{border-bottom:1.5px solid currentColor}.fraction span:last-child{padding-top:2px}
@media(max-width:750px){main{padding:16px 12px}.site-title{font-size:23px}.presentation{padding:12px;gap:10px}.card{padding:20px 16px}.card h1{font-size:clamp(28px,6vw,42px)}.card h2{font-size:clamp(25px,5.5vw,38px);line-height:1.55}.answer{font-size:clamp(27px,6vw,40px)}.controls{gap:6px}.controls button{font-size:15px;padding:10px 14px}.panel{padding:20px}.report{padding:16px;overflow:auto}.reporthead{display:block}th,td{padding:12px 6px;font-size:12px}}
@media(max-height:560px) and (min-width:751px){.presentation{padding:8px 20px;gap:6px}.card{padding:12px 24px;gap:8px}.card h1{font-size:30px}.card h2{font-size:28px;line-height:1.45}.countdown{flex-direction:row;justify-content:center;gap:24px}.timer{width:80px;height:80px}.timer strong{font-size:38px}.answer{font-size:30px;padding:10px}.grading button{font-size:23px;padding:8px}.controls button{padding:8px 16px}}
@media print{@page{size:A4 portrait;margin:15mm}body{background:white;color:black}main{padding:0;max-width:none}header,.controls,.save-error,.report button{display:none}.report{padding:0;margin:0}.report h1{font-size:24px}th,td{color:black;border:1px solid #aaa;padding:10px}tr{break-inside:avoid}thead{display:table-header-group}.eyebrow{color:black}}
.home{min-height:100dvh;display:flex;flex-direction:column}.home header{flex:none}.home-start{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:25px 0 12vh}.home-start select,.home-start .primary{width:min(380px,100%);font-size:28px;padding:18px 24px;text-align:center;border-radius:14px}.home-start .error{max-width:500px;text-align:center}
.arena{display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px}.student-card{background:#e9efdf;border:2px solid #cad8b9;border-radius:18px;padding:clamp(10px,1.8vh,18px) 20px;display:grid;place-items:center}.student-card h1{font-size:clamp(30px,5.8vh,58px);font-weight:800;line-height:1.3;margin:0;overflow-wrap:anywhere}.card{grid-template-rows:minmax(0,1fr) auto}.rolling .student-card{border-color:#8ca85b}.rolling .student-card h1,.rolling .card h2{color:#365c2d}.rolling .card h2{opacity:.85}.rolling .student-card h1{will-change:contents}.student-card h1,.card h2{backface-visibility:hidden}
@media(max-width:750px){.arena{gap:10px}.student-card{padding:12px}.student-card h1{font-size:clamp(28px,6vw,42px)}}
@media(max-height:560px) and (min-width:751px){.arena{gap:8px}.student-card{padding:8px 16px}.student-card h1{font-size:30px}}
.grading{width:auto;max-width:none;justify-content:center;gap:12px}.grading button{width:auto;min-width:96px;padding:8px 22px;font-size:23px;line-height:1.25}.answer-section{gap:10px}
.countdown{flex-direction:row;justify-content:center;gap:22px}.timer{width:96px;height:96px;flex:none}.timer strong{font-size:48px}.timer small{font-size:14px}.waiting{min-width:150px;width:auto;opacity:1}.waiting[aria-pressed="true"]{background:#194e40;color:white}.home-start #password{width:min(380px,100%);font-size:28px;text-align:center;border-radius:14px;padding:18px 24px}.danger{background:#fff1ed;color:#9b2922;border-color:#dcae9f}.notice{position:fixed;bottom:6px;left:16px;right:16px;margin:0 auto;max-width:900px;z-index:5;text-align:center;border:1px solid #dcae9f;border-radius:10px;font-size:16px}.report p{font-size:15px}.report .controls{margin-top:22px}@media print{.notice{display:none}}@media(max-height:560px){.timer{width:80px;height:80px}.timer strong{font-size:38px}}

.stage-label{font:inherit;white-space:nowrap}@media(max-width:430px){.presentation .site-title{font-size:18px}}

.stage-label{color:#c42727;display:inline-block;margin-inline-start:22px}.result-button{font-size:21px;padding:10px 24px;white-space:nowrap}@media(max-width:600px){.countdown{gap:6px}.countdown .timer{width:58px;height:58px}.countdown .timer strong{font-size:28px}.countdown .timer small{font-size:11px}.countdown .waiting,.countdown .result-button{min-width:0;font-size:14px;padding:10px 8px}}@media(max-width:430px){.stage-label{margin-inline-start:12px}}
