/* Chalak exams — front-end. Colors follow the theme tokens when present. */
.chex{--c:var(--blue,#1f5fe0);--ln:var(--line,#e7ecf5);--mt:var(--muted,#6b7791);max-width:820px;margin:0 auto}
.chex h2{font-size:22px;margin:0 0 10px}
.chex-lead{color:var(--mt);font-size:14.5px}
.chex-notice{border-radius:12px;padding:12px 16px;margin-bottom:18px;font-size:14px;border:1px solid}
.chex-error{background:#fdecec;border-color:#f5b5b5;color:#8c1c1c}
.chex-info{background:#eaf1ff;border-color:#bcd2ff;color:#17408f}
.chex-success{background:#e8f7ee;border-color:#a8dcbd;color:#12693a}
.chex-form{background:#fff;border:1px solid var(--ln);border-radius:16px;padding:20px;margin-bottom:16px}
.chex-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.chex-grid label{display:block;font-size:13px;font-weight:700}
.chex-grid .chex-wide{grid-column:1/-1}
.chex-grid input,.chex-grid select,.chex-grid textarea{width:100%;margin-top:6px;padding:10px 12px;border:1px solid var(--ln);
  border-radius:10px;font-family:inherit;font-size:14px;font-weight:400;background:#fbfcfe}
.chex .btn{display:inline-block;background:var(--c);color:#fff;border:0;border-radius:10px;padding:11px 26px;
  font-family:inherit;font-size:15px;font-weight:700;cursor:pointer;text-decoration:none}
.chex-code{font-size:26px;letter-spacing:10px;text-align:center;padding:12px;width:200px;border:1px solid var(--ln);border-radius:12px}
.chex-otp{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.chex-inline{display:inline}
.chex-link{background:none;border:0;color:var(--c);cursor:pointer;font-family:inherit;font-size:13px;padding:0;text-decoration:underline}
.chex-facts{display:flex;gap:18px;flex-wrap:wrap;background:#fff;border:1px solid var(--ln);border-radius:14px;padding:14px 18px;margin:14px 0;font-size:13.5px}
.chex-list{list-style:none;padding:0;display:grid;gap:10px}
.chex-list a{display:flex;justify-content:space-between;background:#fff;border:1px solid var(--ln);border-radius:12px;padding:14px 16px}
.chex-list span{color:var(--mt);font-size:13px}

/* quiz */
.chex-timer{position:sticky;top:88px;z-index:20;background:var(--c);color:#fff;border-radius:12px;
  /* Nothing in the bar is clickable, so taps reach whatever it happens to cover. */
  pointer-events:none;
  padding:10px 18px;font-size:14px;font-weight:700;display:flex;gap:8px;align-items:center;margin-bottom:16px}
.chex-timer.warn{background:#c0392b}
.chex-clock{font-size:20px;font-variant-numeric:tabular-nums;direction:ltr}
.chex-q{background:#fff;border:1px solid var(--ln);border-radius:14px;padding:18px;margin-bottom:14px}
.chex-qt{font-weight:700;font-size:15px;display:flex;gap:10px;margin-bottom:12px}
.chex-qt span{flex:0 0 auto;width:26px;height:26px;border-radius:8px;background:var(--c);color:#fff;
  display:grid;place-items:center;font-size:12px}
.chex-opts{display:grid;gap:8px}
.chex-opts label{display:flex;gap:10px;align-items:center;border:1px solid var(--ln);border-radius:10px;
  padding:10px 12px;cursor:pointer;font-size:14px;background:#fbfcfe}
.chex-opts label:hover{border-color:var(--c)}
.chex-opts input{accent-color:var(--c)}

/* result */
.chex-result{display:flex;gap:20px;align-items:center;border-radius:16px;padding:22px;margin-bottom:18px;color:#fff}
.chex-result.pass{background:linear-gradient(120deg,#12693a,#1a9c56)}
.chex-result.fail{background:linear-gradient(120deg,#8c1c1c,#c0392b)}
.chex-result .chex-score{text-align:center;min-width:130px}
.chex-result .chex-score b{display:block;font-size:38px;line-height:1.2}
.chex-result .chex-score span{font-size:12px;opacity:.85}
.chex-result h2{margin:0 0 4px;color:#fff}
.chex-result p{margin:0;font-size:14px;opacity:.9}
.chex-card{background:#fff;border:1px solid var(--ln);border-radius:16px;padding:20px}
.chex-facts-list{list-style:none;padding:0;margin:0 0 16px;display:grid;gap:10px;font-size:14px}
.chex-facts-list li{display:flex;justify-content:space-between;gap:16px;border-bottom:1px dashed var(--ln);padding-bottom:8px}
.chex-facts-list span{color:var(--mt)}
.chex-cta{text-align:center}

/* The timer stops sticking once it reaches the end of .chex. Without clearance
   below the submit button it parks on top of that button and eats the tap. */
/* Breathing room under the last question, and a full-width tap target on a phone. */
#chex-quiz{padding-bottom:40px}
#chex-quiz .btn{width:100%}

@media(max-width:640px){
  .chex-grid{grid-template-columns:1fr}
  .chex-result{flex-direction:column;text-align:center}
  /* The site header is sticky and ~74px tall on a phone, so the timer parks under it. */
  .chex-timer{top:80px;padding:8px 14px;font-size:13px;gap:6px}
  .chex-clock{font-size:18px}
  .chex-q{padding:14px}
  .chex-opts label{padding:12px}
  .chex-code{width:100%;max-width:220px;font-size:22px;letter-spacing:8px}
  .chex-facts{gap:10px;padding:12px 14px;font-size:13px}
}

/* ---------- certificate verification ---------- */
.chex-verify{max-width:760px;margin:0 auto}
.chex-verify-head{background:linear-gradient(120deg,#12327d,#1f5fe0);color:#fff;border-radius:20px;
  padding:30px 28px;text-align:center;margin-bottom:18px}
.chex-badge{display:inline-block;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);
  border-radius:30px;padding:5px 16px;font-size:12px;font-weight:800;margin-bottom:12px}
.chex-verify-head h2{color:#fff;font-size:23px;margin:0 0 6px}
.chex-verify-head p{color:#d7e3ff;font-size:14px;margin:0 auto 20px;max-width:520px}
.chex-verify-form{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.chex-verify-form input{flex:1;min-width:200px;max-width:340px;padding:13px 16px;border:0;border-radius:12px;
  font-family:inherit;font-size:19px;font-weight:700;text-align:center;letter-spacing:3px;color:#16203a}
.chex-verify-form .btn{background:#fff;color:#1f5fe0}
.chex-verify-form .btn:hover{background:#ffd257;color:#12327d}

.chex-verify-hint{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.chex-verify-hint div{background:#fff;border:1px solid var(--ln);border-radius:14px;padding:16px;text-align:center}
.chex-verify-hint b{display:grid;place-items:center;width:30px;height:30px;margin:0 auto 8px;border-radius:50%;
  background:var(--blue-l,#e8f0ff);color:var(--c);font-size:14px}
.chex-verify-hint span{font-size:13px;color:var(--mt)}

.chex-verify-card{background:#fff;border:1px solid var(--ln);border-radius:18px;padding:22px;overflow:hidden}
.chex-verify-card.valid{border-color:#a8dcbd;box-shadow:0 8px 30px rgba(18,105,58,.08)}
.chex-verify-card.invalid{border-color:#f0b9b9;box-shadow:0 8px 30px rgba(140,28,28,.06)}
.chex-verify-state{display:flex;align-items:center;gap:14px;padding-bottom:16px;margin-bottom:16px;
  border-bottom:1px dashed var(--ln)}
.chex-verify-state .ic{flex:0 0 auto;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;
  font-size:22px;font-weight:800;color:#fff}
.valid .ic{background:#16a34a}
.invalid .ic{background:#c0392b}
.chex-verify-state h3{margin:0;font-size:17px}
.chex-verify-state p{margin:2px 0 0;font-size:13px;color:var(--mt)}
.chex-percent{margin-inline-start:auto;font-size:26px;font-weight:800;color:#16a34a;direction:ltr}
.chex-verify-card .btn{margin-top:6px}

@media(max-width:640px){
  .chex-verify-hint{grid-template-columns:1fr}
  .chex-verify-form input{max-width:100%}
}

/* ---------- recent certificate holders (home page) ---------- */
.chex-recent-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.chex-passer{display:flex;align-items:center;gap:12px;background:#fbfcfe;border:1px solid var(--ln);
  border-radius:14px;padding:12px 14px;transition:.2s}
.chex-passer:hover{border-color:var(--c);transform:translateY(-3px);box-shadow:0 8px 24px rgba(20,40,90,.08)}
.chex-passer .av{flex:0 0 auto;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(135deg,#1f5fe0,#12327d);color:#fff;font-weight:800;font-size:16px}
.chex-passer .who{flex:1;min-width:0}
.chex-passer .who b{display:block;font-size:14px}
.chex-passer .who span{display:block;font-size:12px;color:var(--mt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chex-passer .pc{font-size:13px;font-weight:800;color:#16a34a;direction:ltr}
