:root {
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --accent-soft-border: rgba(99, 102, 241, 0.35);
  --accent-2: #0ea5e9;
  --accent-2-soft: rgba(14, 165, 233, 0.12);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.1);
  --danger: #be123c;
  --danger-soft: rgba(190, 18, 60, 0.1);
  --warning: #b45309;
  --warning-soft: rgba(180, 83, 9, 0.1);
  --muted: #6b7280;

  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-soft: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.6);
  --hairline: rgba(15, 23, 42, 0.07);

  --shadow-md: 0 8px 30px rgba(30, 41, 59, 0.10);
  --shadow-lg: 0 20px 45px rgba(30, 41, 59, 0.14);
  --radius: 16px;
  --transition: all 0.18s ease;

  --font-display: "Baloo Da 2", "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.16), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.14), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(129, 140, 248, 0.10), transparent 55%),
    linear-gradient(160deg, #eef1fb, #e7ecf7 45%, #eef2fb);
  background-attachment: fixed;
  overflow-x: hidden;
}
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(60px); z-index: -1; opacity: 0.55;
}
body::before { width: 360px; height: 360px; top: -120px; left: -100px; background: radial-gradient(circle, #a5b4fc, transparent 70%); }
body::after { width: 420px; height: 420px; bottom: -160px; right: -120px; background: radial-gradient(circle, #7dd3fc, transparent 70%); }

a { color: inherit; }
.hidden { display: none !important; }

.wrap, .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Topbar ---------- */
.navbar {
  position: sticky; top: 0; left: 0; right: 0; height: 4.25rem;
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.06);
  display: flex; align-items: center; z-index: 1000;
  padding: 0 1.5rem;
}
.navbar .brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 0.5rem;
}
.navbar .brand::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); display: inline-block;
}
.navbar { justify-content: space-between; }
.nav-links { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.92rem; text-decoration: none;
  padding: 0.7rem 1.3rem; border-radius: 999px; cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}
.btn:hover { background: var(--accent-hover); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.38); transform: translateY(-1px); }
.btn.secondary {
  background: var(--glass-soft); color: var(--text-primary); border-color: var(--glass-border);
  backdrop-filter: blur(8px); box-shadow: none;
}
.btn.secondary:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); }
.btn.danger { background: var(--danger); box-shadow: 0 4px 14px rgba(190, 18, 60, 0.25); }
.btn.danger:hover { background: #9f1239; }
.btn.ai { background: linear-gradient(135deg, #6d28d9, var(--accent-2)); box-shadow: 0 4px 14px rgba(109,40,217,0.3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------- Cards ---------- */
.card {
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; margin-top: 0; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }

/* ---------- Hero (landing) ---------- */
.hero { padding: 3.5rem 0 2.5rem; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  padding: 0.4rem 0.85rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: 0 auto 1rem; max-width: 20ch; }
.hero p.lede { font-size: 1.08rem; line-height: 1.65; color: var(--text-secondary); max-width: 52ch; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2rem 0; }
@media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { text-align: left; }
.feature-card .icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 0.9rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; margin: 0; }

/* ---------- Stats bar ---------- */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 700px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
.stat-card { text-align: center; padding: 1.4rem 1rem; }
.stat-card .num {
  font-family: var(--font-mono); font-size: 1.9rem; font-weight: 800; color: var(--accent);
  display: block; margin-bottom: 0.2rem;
}
.stat-card .label { font-size: 0.82rem; color: var(--text-tertiary); font-weight: 600; }

/* ---------- Section shell ---------- */
section.block { padding: 2.25rem 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 2rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; margin: 0 0 0.6rem; font-weight: 700;
}
.section-head p { color: var(--text-secondary); line-height: 1.6; margin: 0; font-size: 0.95rem; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step-card { position: relative; }
.step-card .num {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.8rem;
}
.step-card h3 { font-size: 0.98rem; margin-bottom: 0.35rem; }
.step-card p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* ---------- Batch cards ---------- */
.batch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .batch-grid { grid-template-columns: 1fr; } }
.batch-card { display: flex; flex-direction: column; }
.batch-card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.batch-card p.desc { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; margin: 0 0 0.9rem; flex-grow: 1; }
.batch-topic-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.9rem; }
.batch-topic-tag {
  font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-2-soft); color: var(--accent-2);
}
.batch-card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 0.8rem; border-top: 1px solid var(--hairline); }
.batch-price { font-family: var(--font-mono); font-weight: 800; color: var(--text-primary); }
.batch-price.free { color: var(--success); }
.batch-qcount { font-size: 0.78rem; color: var(--text-tertiary); font-weight: 600; }

/* ---------- Auth ---------- */
.auth-card { max-width: 420px; margin: 2rem auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 1.5rem; background: var(--glass-soft); padding: 4px; border-radius: 999px; border: 1px solid var(--hairline); }
.tab-btn {
  flex: 1; padding: 0.55rem 1rem; border-radius: 999px; border: none; background: transparent;
  cursor: pointer; font-weight: 600; font-size: 0.88rem; color: var(--text-secondary); font-family: var(--font-body);
  transition: var(--transition);
}
.tab-btn.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,0.25); }

.error { color: var(--danger); background: var(--danger-soft); padding: 0.6rem 0.9rem; border-radius: 10px; font-size: 0.85rem; margin-bottom: 12px; }
.success-msg { color: var(--success); background: var(--success-soft); padding: 0.6rem 0.9rem; border-radius: 10px; font-size: 0.85rem; margin-bottom: 12px; }

label { font-weight: 600; font-size: 0.85rem; display: block; margin-bottom: 5px; color: var(--text-secondary); }
input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  margin-bottom: 14px;
  transition: var(--transition);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-soft-border); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Dashboard grid ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.muted { color: var(--text-tertiary); font-size: 0.9rem; }

.dash-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.dash-card-head .icon { font-size: 1.4rem; }

/* ---------- Topic performance bars ---------- */
.topic-bar-row { margin-bottom: 16px; }
.topic-bar-label { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; font-weight: 600; }
.topic-bar-bg { background: var(--hairline); border-radius: 999px; height: 10px; overflow: hidden; }
.topic-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.level-weak { background: var(--danger); }
.level-needs_improvement { background: var(--warning); }
.level-strong { background: var(--success); }

.badge { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; margin-left: 6px; }
.badge.weak { background: var(--danger); }
.badge.needs_improvement { background: var(--warning); }
.badge.strong { background: var(--success); }

/* ---------- Exam / Results page (quiz-style: fixed header + single centered column) ---------- */
body.exam-mode .navbar { display: none; }
body.exam-mode { font-size: 18px; line-height: 1.6; }
body.exam-mode .wrap { max-width: 640px; padding: 6rem 1rem 3rem; }

.qz-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--glass-strong);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.04);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 0.85rem 1.25rem;
}
.qz-header h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary);
}
.qz-header-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.qz-timer {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em;
  padding: 8px 16px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border); color: var(--accent);
}
.qz-submit {
  background: var(--accent); color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
  padding: 8px 18px; border: 1px solid var(--accent); border-radius: 999px; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}
.qz-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.qz-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; overflow: hidden; }
.qz-progress > div { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s ease; }

.qz-notice { text-align: center; color: var(--text-secondary); font-size: 0.95rem; margin: 0 0 1rem; }

.qz-list { display: flex; flex-direction: column; gap: 1rem; }
.qz-question {
  background: var(--glass-strong); border-radius: var(--radius);
  box-shadow: 0 10px 25px -5px rgba(30, 41, 59, 0.05), 0 8px 10px -6px rgba(30, 41, 59, 0.05);
  border: 1px solid var(--glass-border); padding: 1.25rem; transition: var(--transition);
}
.qz-question > p { font-weight: 600; font-size: 1.15rem; margin: 0 0 0.85rem; color: var(--text-primary); }
.qz-question input[type="radio"] { display: none; }
.qz-option {
  display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 10px 16px;
  background: rgba(255,255,255,0.6); border: 1px solid var(--hairline); border-radius: 12px;
  font-size: 1.05rem; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.qz-option:hover { background: rgba(255,255,255,0.95); border-color: var(--accent-soft-border); transform: translateX(2px); }
.qz-question input[type="radio"]:checked + .qz-option {
  background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}
.qz-letter {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 0.8rem;
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border); color: var(--accent);
}
.qz-question input[type="radio"]:checked + .qz-option .qz-letter { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); color: #fff; }

/* Corrected (review) state */
.qz-question.reviewed .qz-option { cursor: default; }
.qz-question.reviewed .qz-option:hover { transform: none; background: rgba(255,255,255,0.6); border-color: var(--hairline); }
.qz-option.correct { background: #f0fdf4 !important; border: 1.5px solid #bbf7d0 !important; color: #065f46 !important; }
.qz-option.wrong   { background: #fef2f2 !important; border: 1.5px solid #fecaca !important; color: #991b1b !important; }
.qz-option.skipped { background: #fffbef !important; border: 1.5px solid #fde68a !important; color: #78350f !important; }
.qz-option.correct .qz-letter { background: #10b981; border-color: #10b981; color: #fff; }
.qz-option.wrong .qz-letter   { background: #ef4444; border-color: #ef4444; color: #fff; }
.qz-option.skipped .qz-letter { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.qz-question.q-correct { border-color: #bbf7d0; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.04); }
.qz-question.q-wrong   { border-color: #fecaca; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.04); }
.qz-question.q-skipped { border-color: #fde68a; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.04); }

/* Performance dashboard */
.dashboard-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius); border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.06), 0 5px 15px -5px rgba(15, 23, 42, 0.04);
  padding: 1.5rem; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem;
}
.dashboard-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 0.75rem; }
.dashboard-title { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.dashboard-badge { font-size: 0.75rem; font-weight: 700; padding: 4px 10px; background: #f1f5f9; color: #64748b; border-radius: 999px; text-transform: uppercase; }
.grid-stats { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 1rem; }
.qz-stat { border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; border: 1px solid #f1f5f9; background: #fff; }
.qz-stat .meta { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); margin-bottom: 0.25rem; }
.qz-stat .number { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.qz-stat.score-prime { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border-color: #bfdbfe; }
.qz-stat.score-prime .meta { color: #1e40af; }
.qz-stat.score-prime .number { color: var(--accent); font-size: 1.8rem; }
.qz-stat.card-success { border-left: 4px solid #10b981; } .qz-stat.card-success .number { color: #065f46; }
.qz-stat.card-danger  { border-left: 4px solid #ef4444; } .qz-stat.card-danger .number  { color: #991b1b; }
.qz-stat.card-warning { border-left: 4px solid #f59e0b; } .qz-stat.card-warning .number { color: #92400e; }
.dashboard-message { margin: 0; font-size: 0.95rem; color: var(--text-secondary); }

@media (max-width: 540px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .qz-stat.score-prime { grid-column: span 2; text-align: center; }
  .qz-header h1 { font-size: 1.05rem; }
  .qz-timer { padding: 6px 10px; font-size: 0.78rem; }
  .qz-submit { padding: 7px 12px; }
}

/* ---------- Explanation / AI box ---------- */
.explanation-box {
  background: var(--warning-soft); border: 1px solid rgba(180,83,9,0.25);
  border-radius: 12px; padding: 0.9rem 1.1rem; margin-top: 10px; font-size: 0.9rem; line-height: 1.55;
}
.ai-explain-box {
  background: linear-gradient(135deg, rgba(109,40,217,0.07), rgba(14,165,233,0.07));
  border: 1px solid rgba(109,40,217,0.2);
  border-radius: 12px; padding: 0.9rem 1.1rem; margin-top: 10px; font-size: 0.9rem; line-height: 1.6;
}
.ai-explain-box .ai-label { font-weight: 700; color: #6d28d9; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 0.85rem; }

/* ---------- Leaderboard ---------- */
.rank-row {
  display: flex; align-items: center; gap: 14px;
  padding: 0.85rem 1rem; border-radius: 12px; margin-bottom: 6px;
  background: rgba(255,255,255,0.5); border: 1px solid var(--hairline);
}
.rank-row.me { background: var(--accent-soft); border-color: var(--accent-soft-border); }
.rank-num {
  font-family: var(--font-mono); font-weight: 800; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
  background: var(--hairline); color: var(--text-secondary);
}
.rank-row:nth-child(1) .rank-num { background: #fde68a; color: #92400e; }
.rank-row:nth-child(2) .rank-num { background: #e2e8f0; color: #334155; }
.rank-row:nth-child(3) .rank-num { background: #fed7aa; color: #9a3412; }
.rank-name { font-weight: 700; flex: 1; }
.rank-score { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); font-size: 0.9rem; }
th { color: var(--text-tertiary); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

/* ---------- Checkbox group (admin batch topic picker) ---------- */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.checkbox-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.6); border: 1px solid var(--hairline);
  padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; cursor: pointer;
}
.checkbox-pill input { width: auto; margin: 0; }
.checkbox-pill.checked { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent); font-weight: 600; }


/* ---------- OMR (student dashboard) ---------- */
.omr-item { border: 1px solid var(--hairline); border-radius: 14px; padding: 1rem 1.1rem; margin-top: 0.9rem; background: var(--glass-soft); display: flex; flex-direction: column; gap: 0.7rem; }
.omr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.omr-score { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.omr-big { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.omr-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.omr-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.omr-chip.ok { background: var(--success-soft); color: var(--success); }
.omr-chip.bad { background: var(--danger-soft); color: var(--danger); }
.omr-chip.warn { background: var(--warning-soft); color: var(--warning); }
.omr-wait { margin: 0; color: var(--success); font-weight: 600; }
.omr-ok { margin: 0 0 0.6rem; color: var(--success); font-weight: 600; }
.omr-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
label.btn { cursor: pointer; margin: 0; color: #fff; }
.omr-upload { border-top: 1px dashed var(--hairline); padding-top: 0.8rem; }
.omr-canvas { display: block; width: 100%; max-width: 420px; height: auto; border-radius: 10px; border: 1px solid var(--hairline); margin: 0 0 0.7rem; }
.omr-review { display: flex; flex-direction: column; gap: 0.7rem; max-height: 480px; overflow-y: auto; padding-right: 4px; }
.omr-q { border: 1px solid var(--hairline); border-radius: 10px; padding: 0.6rem 0.8rem; background: rgba(255,255,255,0.6); }
.omr-qt { font-weight: 600; margin-bottom: 0.4rem; }
.omr-opt { padding: 0.25rem 0.6rem; border-radius: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.omr-opt.right { background: var(--success-soft); color: var(--success); font-weight: 600; }
.omr-opt.wrong { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.omr-link{font-weight:600;color:var(--accent,#d6197f);text-decoration:none}

/* ---------- Student dashboard (organised: header · stats · tabs) ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.dash-head h1 { margin: 0 0 0.2rem; }
.dash-head p { margin: 0; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 1.1rem; }
.dash-stat {
  background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 0.95rem 1.1rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.dash-stat .ds-num { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.dash-stat .ds-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
@media (max-width: 700px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }

.dash-tabs {
  display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.35rem; margin-bottom: 1.25rem;
  background: var(--glass-soft); border: 1px solid var(--glass-border); border-radius: 999px;
  position: sticky; top: 4.5rem; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  scrollbar-width: none;
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab {
  flex: 1 0 auto; border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem; color: var(--text-secondary);
  padding: 0.6rem 1.1rem; border-radius: 999px; transition: var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.dash-tab:hover { background: rgba(255,255,255,0.7); color: var(--text-primary); }
.dash-tab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(79,70,229,0.3); }
.tab-badge {
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem; border-radius: 999px; font-size: 0.74rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; background: var(--danger); color: #fff;
}
.dash-tab.active .tab-badge { background: #fff; color: var(--accent); }

.dash-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.dash-card-head h3 { margin: 0; flex: 1; }
.dash-card-head .icon { font-size: 1.3rem; }
.link-btn { background: none; border: 0; cursor: pointer; color: var(--accent); font-weight: 700; font-family: var(--font-body); font-size: 0.86rem; padding: 0.2rem 0.4rem; }
.link-btn:hover { text-decoration: underline; }
.dash-pane > .grid-2 > .card, .dash-pane > .grid-2 { margin-bottom: 0; }
.dash-pane > .grid-2 { margin-bottom: 1.25rem; }

.filter-chips { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.4rem 0 0.9rem; }
.chip {
  border: 1px solid var(--hairline); background: var(--glass-soft); color: var(--text-secondary); cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.84rem; padding: 0.35rem 0.9rem; border-radius: 999px; transition: var(--transition);
}
.chip:hover { border-color: var(--accent-soft-border); color: var(--accent); }
.chip.active { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent); }

/* exam cards (admin-opened MCQ exams) */
.ex-list { display: flex; flex-direction: column; gap: 0.8rem; }
.ex-card {
  display: grid; grid-template-columns: 1fr auto; gap: 0.8rem 1rem; align-items: center;
  border: 1px solid var(--hairline); border-left: 4px solid var(--accent); border-radius: 14px; padding: 0.95rem 1.1rem; background: rgba(255,255,255,0.65);
}
.ex-card.st-done { border-left-color: #10b981; }
.ex-card.st-in_progress { border-left-color: #f59e0b; background: rgba(255, 251, 235, 0.8); }
.ex-card.st-locked, .ex-card.st-closed, .ex-card.st-expired, .ex-card.st-empty { border-left-color: var(--text-tertiary); }
.ex-title { font-weight: 700; font-size: 1.02rem; margin: 0 0 0.3rem; word-break: break-word; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; font-size: 0.82rem; color: var(--text-secondary); }
.ex-meta span { display: inline-flex; align-items: center; gap: 0.25rem; background: rgba(15,23,42,0.05); padding: 2px 9px; border-radius: 999px; }
.ex-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; text-align: right; }
.ex-score { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.ex-score small { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.ex-note { grid-column: 1 / -1; margin: 0; font-size: 0.84rem; color: var(--text-secondary); }
.ex-review { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .ex-card { grid-template-columns: 1fr; }
  .ex-side { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}
.empty-state { text-align: center; padding: 1.4rem 0.5rem; color: var(--text-secondary); }
.empty-state .big { font-size: 2rem; display: block; margin-bottom: 0.3rem; }

/* live exam: countdown timer */
.qz-timer.live { font-variant-numeric: tabular-nums; }
.qz-timer.warn { background: var(--warning-soft); color: var(--warning); border-color: rgba(180,83,9,0.35); }
.qz-timer.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(190,18,60,0.4); animation: timerPulse 1s ease-in-out infinite; }
@keyframes timerPulse { 50% { opacity: 0.55; } }
.qz-counter { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin: 0 0 0.9rem; }
.qz-counter b { color: var(--accent); }
.rank-pill { display: inline-block; margin-top: 0.4rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 14px; border-radius: 999px; }


/* =====================================================================
   HOME / LANDING  (scoped to .lp — the rest of the app is untouched)
   Palette: deep ink-teal + fresh emerald + warm amber on soft cream.
   Fonts:   Plus Jakarta Sans (Latin/numbers) + Anek Bangla (headings) + Hind Siliguri (body)
   ===================================================================== */
.lp {
  --lp-ink: #0b2a2e;
  --lp-ink-2: #12424a;
  --lp-teal: #4f46e5;
  --lp-emerald: #10b981;
  --lp-mint: #d1fae5;
  --lp-amber: #f59e0b;
  --lp-amber-soft: #fef3c7;
  --lp-cream: #fbf8f1;
  --lp-line: rgba(11, 42, 46, 0.1);
  --lp-muted: #4b6468;
  --lp-head: "Plus Jakarta Sans", "Anek Bangla", "Hind Siliguri", sans-serif;
  --lp-bn: "Anek Bangla", "Hind Siliguri", sans-serif;
  color: var(--lp-ink);
  font-family: "Hind Siliguri", "Plus Jakarta Sans", sans-serif;
  padding-bottom: 2rem;
}
body.landing-mode {
  background:
    radial-gradient(circle at 90% -5%, rgba(16, 185, 129, 0.14), transparent 40%),
    radial-gradient(circle at 0% 30%, rgba(245, 158, 11, 0.10), transparent 38%),
    #fbf8f1;
}
body.landing-mode::before, body.landing-mode::after { display: none; }
.lp h1, .lp h2, .lp h3 { font-family: var(--lp-head); letter-spacing: -0.015em; }

/* buttons */
.lp-btn {
  font: 700 0.95rem var(--lp-head); border: 0; cursor: pointer; border-radius: 14px;
  padding: 0.85rem 1.5rem; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.lp-btn:hover { transform: translateY(-2px); }
.lp-btn.primary { background: linear-gradient(135deg, #fbbf24, var(--lp-amber)); color: #3b2300; box-shadow: 0 8px 22px rgba(245, 158, 11, .38); }
.lp-btn.primary:hover { box-shadow: 0 12px 28px rgba(245, 158, 11, .5); }
.lp-btn.ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.lp-btn.ghost:hover { background: rgba(255,255,255,.18); }
.lp-btn.solid { background: var(--lp-ink); color: #fff; }
.lp-btn.solid:hover { background: var(--lp-teal); }
.lp-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.lp-cta.center { justify-content: center; margin-top: 2rem; }

/* hero */
.lp-hero {
  position: relative; overflow: hidden; margin-top: 1.25rem; border-radius: 28px;
  background: linear-gradient(135deg, var(--lp-ink) 0%, var(--lp-ink-2) 55%, #0f5c58 100%);
  color: #fff; padding: 3.2rem 2.6rem;
  display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 2.4rem; align-items: center;
  box-shadow: 0 30px 60px rgba(11, 42, 46, .28);
}
.lp-hero-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.lp-hero-glow.g1 { width: 340px; height: 340px; background: #10b981; top: -120px; right: -60px; }
.lp-hero-glow.g2 { width: 280px; height: 280px; background: #f59e0b; bottom: -140px; left: 30%; opacity: .28; }
.lp-hero > :not(.lp-hero-glow) { position: relative; z-index: 1; }
.lp-pill {
  display: inline-flex; align-items: center; gap: .55rem; font-size: .8rem; font-weight: 600;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); padding: .4rem .9rem; border-radius: 999px;
}
.lp-pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: lpPulse 1.8s infinite; display: inline-block; }
@keyframes lpPulse { 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.lp-hero h1 { font-family: var(--lp-bn); font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.22; font-weight: 800; margin: 1.1rem 0 1rem; }
.lp-hero h1 em { font-style: normal; background: linear-gradient(90deg, #fcd34d, #fb923c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lede { color: rgba(255,255,255,.8); font-size: 1.05rem; line-height: 1.7; max-width: 52ch; margin: 0 0 1.7rem; }
.lp-trust { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.8rem; font-size: .85rem; color: rgba(255,255,255,.75); }
.lp-trust b { font: 800 1.35rem var(--lp-head); color: #fff; display: block; }

/* hero live panel */
.lp-hero-panel {
  background: rgba(255,255,255,.96); color: var(--lp-ink); border-radius: 20px; padding: 1.2rem;
  box-shadow: 0 24px 50px rgba(0,0,0,.3); transform: rotate(1.2deg);
}
.lp-panel-head { display: flex; align-items: center; gap: .55rem; font: 700 .85rem var(--lp-head); color: var(--lp-teal); margin-bottom: .8rem; }
.lp-mini { display: block; padding: .8rem .9rem; border-radius: 14px; background: var(--lp-cream); border: 1px solid var(--lp-line); margin-bottom: .6rem; }
.lp-mini:last-child { margin-bottom: 0; }
.lp-mini h4 { margin: 0 0 .3rem; font: 700 .95rem var(--lp-bn); line-height: 1.35; }
.lp-mini small { color: var(--lp-muted); font-size: .78rem; }
.lp-empty { color: var(--lp-muted); font-size: .9rem; line-height: 1.6; padding: .6rem .2rem; }

/* skeletons */
.lp-skel { height: 64px; border-radius: 14px; margin-bottom: .6rem; background: linear-gradient(90deg, #eef2ef 25%, #f7faf8 50%, #eef2ef 75%); background-size: 200% 100%; animation: lpShimmer 1.3s infinite; }
.lp-skel.tall { height: 200px; margin: 0; }
@keyframes lpShimmer { to { background-position: -200% 0; } }

/* stats */
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: -1.6rem 1.4rem 0; position: relative; z-index: 2; }
.lp-stat {
  background: #fff; border-radius: 18px; padding: 1.1rem 1.2rem; display: flex; align-items: center; gap: .9rem;
  border: 1px solid var(--lp-line); box-shadow: 0 12px 30px rgba(11,42,46,.1);
}
.lp-stat-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--lp-mint); }
.lp-stat:nth-child(2) .lp-stat-ico { background: var(--lp-amber-soft); }
.lp-stat:nth-child(4) .lp-stat-ico { background: var(--lp-amber-soft); }
.lp-stat b { display: block; font: 800 1.7rem/1.1 var(--lp-head); color: var(--lp-ink); }
.lp-stat small { color: var(--lp-muted); font-weight: 600; font-size: .82rem; }

/* sections */
.lp-sec { padding: 3.2rem 0 .4rem; }
.lp-sec-head { text-align: center; max-width: 640px; margin: 0 auto 2rem; }
.lp-sec-head h2 { font-family: var(--lp-bn); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin: .7rem 0 .5rem; }
.lp-sec-head p { margin: 0; color: var(--lp-muted); line-height: 1.65; }
.lp-sec-head.light h2 { color: #fff; }
.lp-kicker { display: inline-block; font: 700 .76rem var(--lp-head); letter-spacing: .08em; text-transform: uppercase; color: var(--lp-teal); background: var(--lp-mint); padding: .35rem .8rem; border-radius: 999px; }
.lp-kicker.amber { color: #92400e; background: var(--lp-amber-soft); }

/* batches */
.lp-batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }
.lp-batch {
  background: #fff; border: 1px solid var(--lp-line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 6px 18px rgba(11,42,46,.06);
}
.lp-batch:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(11,42,46,.14); }
.lp-batch-top { position: relative; padding: 1.3rem 1.3rem 2.6rem; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.lp-batch-top::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.14); }
.lp-batch-tag { font: 700 .72rem var(--lp-head); background: rgba(255,255,255,.2); padding: .25rem .65rem; border-radius: 999px; }
.lp-batch-top h3 { font-family: var(--lp-bn); font-size: 1.3rem; font-weight: 800; margin: .8rem 0 0; line-height: 1.3; position: relative; z-index: 1; }
.lp-batch-body { position: relative; z-index: 2; padding: 0 1.3rem 1.3rem; margin-top: -1.5rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.lp-batch-meta { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: 16px; border: 1px solid var(--lp-line); box-shadow: 0 8px 18px rgba(11,42,46,.08); }
.lp-batch-meta div { text-align: center; padding: .7rem .3rem; }
.lp-batch-meta div + div { border-left: 1px solid var(--lp-line); }
.lp-batch-meta b { display: block; font: 800 1.15rem var(--lp-head); }
.lp-batch-meta small { color: var(--lp-muted); font-size: .72rem; font-weight: 600; }
.lp-batch-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.lp-price { font: 800 1.25rem var(--lp-head); }
.lp-price.free { color: var(--lp-teal); }
.lp-price small { font-size: .75rem; font-weight: 600; color: var(--lp-muted); }
.lp-soon { font-size: .8rem; font-weight: 600; color: #92400e; background: var(--lp-amber-soft); padding: .25rem .7rem; border-radius: 999px; }

/* exams */
.lp-exams { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.lp-exam { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--lp-line); border-radius: 18px; padding: 1.1rem; transition: box-shadow .2s ease, transform .2s ease; }
.lp-exam:hover { box-shadow: 0 14px 30px rgba(11,42,46,.1); transform: translateY(-3px); }
.lp-date { flex: 0 0 62px; height: 70px; border-radius: 14px; background: var(--lp-mint); color: var(--lp-teal); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--lp-head); }
.lp-date b { font-size: 1.5rem; line-height: 1; font-weight: 800; }
.lp-date span { font-size: .72rem; font-weight: 700; margin-top: 4px; }
.lp-exam.ended .lp-date { background: #eef0ef; color: #64748b; }
.lp-exam h3 { font: 700 1.02rem var(--lp-bn); margin: 0 0 .25rem; line-height: 1.35; }
.lp-exam .by { font-size: .8rem; color: var(--lp-muted); margin-bottom: .55rem; }
.lp-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.lp-chip { font-size: .74rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; background: #f1f5f4; color: #34514f; }
.lp-chip.open { background: var(--lp-mint); color: #047857; }
.lp-chip.ended { background: #f1f5f9; color: #64748b; }
.lp-nodata { grid-column: 1 / -1; text-align: center; color: var(--lp-muted); background: #fff; border: 1px dashed var(--lp-line); border-radius: 18px; padding: 2rem 1rem; }

/* features */
.lp-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.lp-features article { background: #fff; border: 1px solid var(--lp-line); border-radius: 20px; padding: 1.4rem; }
.lp-features article span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.4rem; background: var(--lp-mint); margin-bottom: .9rem; }
.lp-features article:nth-child(even) span { background: var(--lp-amber-soft); }
.lp-features h3 { font: 700 1.05rem var(--lp-bn); margin: 0 0 .4rem; }
.lp-features p { margin: 0; color: var(--lp-muted); font-size: .9rem; line-height: 1.6; }

/* steps */
.lp-steps-wrap { margin-top: 3.4rem; background: linear-gradient(135deg, var(--lp-ink), var(--lp-ink-2)); border-radius: 28px; padding: 2.8rem 2rem 2.6rem; color: #fff; }
.lp-steps { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 900px; }
.lp-steps li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 1.3rem; }
.lp-steps li b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lp-amber); color: #3b2300; font: 800 1rem var(--lp-bn); margin-bottom: .8rem; }
.lp-steps h3 { font: 700 1.05rem var(--lp-bn); margin: 0 0 .35rem; }
.lp-steps p { margin: 0; color: rgba(255,255,255,.72); font-size: .88rem; line-height: 1.6; }

.lp-foot { text-align: center; color: var(--lp-muted); font-size: .85rem; padding: 2rem 0 .5rem; }

@media (max-width: 960px) {
  .lp-hero { grid-template-columns: 1fr; padding: 2.2rem 1.4rem; }
  .lp-hero-panel { transform: none; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); margin: 1rem 0 0; }
  .lp-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .lp-features, .lp-steps { grid-template-columns: 1fr; }
  .lp-exams { grid-template-columns: 1fr; }
  .lp-hero { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { .lp *, .lp-pulse { animation: none !important; transition: none !important; } }

/* brand logo (navbar + footer) */
.navbar .brand::before { display: none; }
.navbar .brand { gap: .6rem; font-family: "Plus Jakarta Sans", var(--font-display); font-weight: 800; font-size: 1.2rem; }
.brand-logo { height: 40px; width: 40px; object-fit: contain; display: block; }
.lp-foot { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.lp-foot img { object-fit: contain; }
.brand-logo { height: 48px; width: 48px; flex: none; }
.navbar .brand { min-width: 0; white-space: nowrap; cursor: pointer; }
body.landing-mode .navbar .btn:not(.secondary) { background: #4f46e5; box-shadow: 0 4px 14px rgba(79,70,229,.32); }
body.landing-mode .navbar .btn:not(.secondary):hover { background: #0b2a2e; }

/* =====================  MOBILE POLISH  ===================== */
@media (max-width: 640px) {
  .wrap, .container { padding: 0 .9rem; }

  /* navbar: one tidy row (brand + actions); logged-in users get a second scrollable row */
  .navbar { height: auto; min-height: 3.6rem; padding: .45rem .8rem; flex-wrap: nowrap; gap: .5rem; }
  .navbar .brand { flex: none; }
  .navbar .brand { font-size: 1rem; gap: .45rem; }
  .navbar .brand span { display: none; } /* logo only on mobile */
  .brand-logo { height: 38px; width: 38px; }
  .nav-links { flex-wrap: nowrap; gap: .4rem; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links .btn { padding: .5rem .85rem; font-size: .82rem; white-space: nowrap; min-height: 40px; }
  .nav-links .muted { display: none; }
  .nav-links .btn { flex: none; }

  .card { padding: 1.2rem; }

  /* home */
  .lp-hero { margin-top: .7rem; padding: 1.5rem 1.1rem 1.3rem; gap: 1.4rem; border-radius: 22px; }
  .lp-pill { font-size: .72rem; padding: .35rem .75rem; }
  .lp-hero h1 { font-size: 1.85rem; margin: .9rem 0 .8rem; }
  .lp-lede { font-size: .95rem; line-height: 1.65; margin-bottom: 1.3rem; }
  .lp-cta { flex-direction: column; gap: .6rem; }
  .lp-cta .lp-btn { width: 100%; min-height: 48px; }
  .lp-trust { gap: 1.2rem; margin-top: 1.2rem; }
  .lp-hero-panel { padding: 1rem; border-radius: 18px; }
  .lp-stats { gap: .7rem; margin-top: .8rem; }
  .lp-stat { padding: .8rem; gap: .65rem; flex-direction: column; align-items: flex-start; }
  .lp-stat-ico { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 11px; }
  .lp-stat b { font-size: 1.45rem; }
  .lp-stat small { font-size: .78rem; }

  .lp-sec { padding-top: 2.4rem; }
  .lp-sec-head { margin-bottom: 1.4rem; }
  .lp-sec-head h2 { font-size: 1.45rem; }
  .lp-sec-head p { font-size: .9rem; }
  .lp-batches { grid-template-columns: 1fr; gap: 1rem; }
  .lp-batch-top h3 { font-size: 1.15rem; }
  .lp-batch-foot .lp-btn { min-height: 44px; padding: .7rem 1.3rem; }

  .lp-exam { padding: .9rem; gap: .8rem; }
  .lp-date { flex-basis: 54px; height: 60px; }
  .lp-date b { font-size: 1.3rem; }
  .lp-exam > div:last-child { min-width: 0; }

  /* features: compact 2-column tiles */
  .lp-features { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .lp-features article { padding: 1rem; border-radius: 16px; }
  .lp-features article span { width: 38px; height: 38px; font-size: 1.15rem; margin-bottom: .6rem; }
  .lp-features h3 { font-size: .95rem; }
  .lp-features p { font-size: .8rem; line-height: 1.5; }

  .lp-steps-wrap { margin-top: 2.4rem; padding: 2rem 1rem 1.6rem; border-radius: 22px; }
  .lp-steps li { padding: 1rem; display: grid; grid-template-columns: 34px 1fr; column-gap: .8rem; align-items: start; }
  .lp-steps li b { grid-row: span 2; margin: 0; }
  .lp-steps h3 { font-size: 1rem; }
  .lp-steps-wrap .lp-cta.center { margin-top: 1.4rem; }
  .lp-foot { font-size: .78rem; padding-top: 1.4rem; text-align: center; }
}
@media (max-width: 360px) {
  .navbar .brand span { font-size: .9rem; }
  .brand-logo { height: 34px; width: 34px; }
  .nav-links .btn { padding: .45rem .7rem; font-size: .78rem; }
  .lp-hero h1 { font-size: 1.65rem; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-batch-meta b { font-size: 1rem; }
}

/* ---------- OMR question paper viewer ---------- */
.paper-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(11, 42, 46, .55); backdrop-filter: blur(4px); overflow-y: auto; padding: 1.2rem .8rem; }
.paper-sheet { max-width: 820px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 1.4rem 1.5rem 2rem; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.paper-bar { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; position: sticky; top: 0; background: #fff; padding-bottom: .8rem; border-bottom: 1px solid var(--hairline); }
.paper-actions { display: flex; gap: .5rem; }
.paper-hint { background: var(--warning-soft); color: var(--warning); border-radius: 10px; padding: .6rem .9rem; font-size: .88rem; margin: .9rem 0; }
.paper-list { padding-left: 1.4rem; margin: 0; }
.paper-list li { margin-bottom: 1.1rem; break-inside: avoid; }
.paper-q { font-weight: 600; margin-bottom: .4rem; line-height: 1.55; white-space: pre-wrap; }
.paper-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .9rem; font-size: .95rem; }
@media (max-width: 560px) { .paper-sheet { padding: 1rem; border-radius: 14px; } .paper-opts { grid-template-columns: 1fr; } .paper-actions .btn { padding: .5rem .8rem; } }
@media print {
  body.paper-open .navbar, body.paper-open .wrap { display: none !important; }
  body.paper-open .paper-modal { position: static; background: none; padding: 0; backdrop-filter: none; }
  body.paper-open .paper-sheet { box-shadow: none; max-width: none; padding: 0; }
  body.paper-open .paper-actions, body.paper-open .paper-hint { display: none; }
  body.paper-open .paper-bar { position: static; }
}
@media (max-width: 560px) {
  .ex-side { flex-wrap: wrap; justify-content: flex-start; gap: .5rem; }
  .ex-side .omr-chip { flex: 0 0 100%; text-align: center; }
  .ex-side .btn { flex: 1 1 150px; min-height: 44px; border-radius: 14px; }
  .ex-side .btn.secondary { background: #fff; border-color: var(--accent-soft-border); color: var(--accent); }
}

/* ---------- Dialog (replaces browser confirm / alert) ---------- */
.ud-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(15, 23, 42, .5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity .16s ease; }
.ud-overlay.show { opacity: 1; }
body.ud-open { overflow: hidden; }
.ud-card { width: min(100%, 420px); background: #fff; border-radius: 22px; padding: 1.7rem 1.5rem 1.3rem; text-align: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .35); transform: translateY(14px) scale(.96); transition: transform .2s cubic-bezier(.2,.9,.3,1.2); }
.ud-overlay.show .ud-card { transform: none; }
.ud-icon { width: 62px; height: 62px; margin: -2.9rem auto .9rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem;
  background: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, .16); border: 4px solid var(--accent-soft); }
.ud-card { margin-top: 1.6rem; }
.ud-warning .ud-icon, .ud-error .ud-icon { border-color: var(--warning-soft); }
.ud-danger .ud-icon { border-color: var(--danger-soft); }
.ud-success .ud-icon { border-color: var(--success-soft); }
.ud-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; margin: 0 0 .3rem; color: var(--text-primary); }
.ud-sub { display: inline-block; max-width: 100%; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .2rem .75rem; border-radius: 999px; font-size: .88rem; margin-bottom: .7rem; word-break: break-word; }
.ud-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: .3rem 0 .7rem; }
.ud-facts span { display: inline-flex; align-items: center; gap: .3rem; background: #f1f5f9; border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; font-weight: 600; color: var(--text-secondary); }
.ud-facts i { font-style: normal; }
.ud-msg { margin: .2rem 0 .8rem; color: var(--text-secondary); line-height: 1.65; font-size: .95rem; }
.ud-warn { display: flex; gap: .55rem; align-items: flex-start; text-align: left; background: var(--warning-soft); color: #92400e; border: 1px solid rgba(180, 83, 9, .22);
  border-radius: 12px; padding: .65rem .8rem; font-size: .88rem; line-height: 1.55; font-weight: 600; margin-bottom: .9rem; }
.ud-actions { display: flex; gap: .6rem; margin-top: 1.1rem; }
.ud-btn { flex: 1; font: 700 .95rem var(--font-body); padding: .8rem 1rem; border-radius: 14px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; min-height: 46px; }
.ud-btn:hover { transform: translateY(-1px); }
.ud-btn:focus-visible { outline: 3px solid var(--accent-soft-border); outline-offset: 2px; }
.ud-btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .32); }
.ud-btn.primary:hover { background: var(--accent-hover); }
.ud-btn.danger { background: var(--danger); color: #fff; box-shadow: 0 6px 18px rgba(190, 18, 60, .28); }
.ud-btn.ghost { background: #f1f5f9; color: var(--text-secondary); }
.ud-btn.ghost:hover { background: #e2e8f0; }
@media (max-width: 560px) {
  .ud-overlay { align-items: flex-end; padding: 0; }
  .ud-card { width: 100%; border-radius: 24px 24px 0 0; margin-top: 0; padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateY(40px); }
  .ud-icon { margin-top: -2.9rem; }
  .ud-overlay.show .ud-card { transform: none; }
  .ud-card { margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) { .ud-overlay, .ud-card { transition: none; } }

/* =====================  STUDENT DASHBOARD v2 · EDTECH  ===================== */
body.dash-mode {
  --d-ink:#0f1f2e; --d-sub:#5b6b7b; --d-mute:#8896a6;
  --d-teal:#4f46e5; --d-teal-dk:#4338ca; --d-mint:rgba(79,70,229,.08);
  --d-amber:#d99a1e; --d-blue:#3b6fd4; --d-violet:#7c5cdb;
  --d-good:#0f9d75; --d-mid:#e8a317; --d-weak:#e5484d;
  --d-bg:#f4f6fa; --d-line:#e5e9f0; --d-edge:#e5e9f0; --d-glass:#fff; --d-glass-hi:#fff;
  --d-shadow:0 1px 2px rgba(16,24,40,.04), 0 2px 10px rgba(16,24,40,.04);
  --d-num:"Plus Jakarta Sans","Anek Bangla","Hind Siliguri",sans-serif;
  background:var(--d-bg);
}
body.dash-mode::before, body.dash-mode::after { display:none; }
body.dash-mode .navbar { background:#fff; backdrop-filter:none; -webkit-backdrop-filter:none; border-bottom:1px solid var(--d-line); box-shadow:none; }
body.dash-mode .navbar .brand { color:var(--d-ink); }
.ic { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; flex:none; }

/* ---- layout ---- */
body.dash-mode .wrap { max-width:1260px; }
@media (min-width:901px) {
  body.dash-mode #view-dashboard { display:grid; grid-template-columns:240px minmax(0,1fr); column-gap:1.5rem; align-items:start; padding-bottom:2rem; }
  body.dash-mode #view-dashboard > .dash-head,
  body.dash-mode #view-dashboard > .dash-stats,
  body.dash-mode #view-dashboard > .dash-pane { grid-column:2; min-width:0; }
  body.dash-mode #view-dashboard > .dash-head { grid-row:1; }
  body.dash-mode #view-dashboard > .dash-stats { grid-row:2; }
  body.dash-mode #view-dashboard > .dash-pane { grid-row:3; }
  body.dash-mode #view-dashboard > .dash-tabs { grid-column:1; grid-row:1 / span 3; position:sticky; top:5.4rem; margin-top:1.5rem; }
}

/* ---- header ---- */
body.dash-mode .dash-head { margin:1.4rem 0 1.1rem; padding:0; background:none; border:0; box-shadow:none; backdrop-filter:none; align-items:center; color:var(--d-ink); }
.dh-eyebrow { display:block; font-size:.78rem; font-weight:600; letter-spacing:.02em; color:var(--d-teal); margin-bottom:.15rem; }
body.dash-mode .dash-head h1 { color:var(--d-ink); font:800 clamp(1.4rem,3.4vw,1.8rem)/1.25 var(--d-num); margin:0 0 .15rem; }
body.dash-mode .dash-head .muted { color:var(--d-sub); }
body.dash-mode .wl-chip { background:#fff; color:var(--d-ink); border:1px solid var(--d-line); box-shadow:var(--d-shadow); padding:.5rem .95rem; }
body.dash-mode .wl-chip:hover { border-color:var(--d-teal); background:#fff; }
.dh-refresh { display:inline-flex; align-items:center; gap:.4rem; }
.dh-refresh:disabled .ic { animation:dhspin .8s linear infinite; }
@keyframes dhspin { to { transform:rotate(360deg); } }

/* ---- KPI cards ---- */
body.dash-mode .dash-stats { grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; margin:0 0 1.25rem; }
body.dash-mode .dash-stat { position:relative; flex-direction:row; align-items:flex-start; gap:.85rem; padding:1.05rem 1.1rem; background:#fff; border:1px solid var(--d-line); border-radius:16px; box-shadow:var(--d-shadow); backdrop-filter:none; overflow:hidden; justify-content:flex-start; }
.k-teal { --k:#4f46e5; --k-soft:rgba(79,70,229,.10); } .k-blue { --k:#3b6fd4; --k-soft:rgba(59,111,212,.10); }
.k-amber { --k:#c98a0b; --k-soft:rgba(217,154,30,.15); } .k-violet { --k:#7c5cdb; --k-soft:rgba(124,92,219,.10); }
.ds-ico { flex:none; width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--k-soft); color:var(--k); }
.ds-ico .ic { width:20px; height:20px; }
.ds-body { display:flex; flex-direction:column; min-width:0; gap:.1rem; }
body.dash-mode .dash-stat .ds-label { font-size:.8rem; color:var(--d-sub); font-weight:500; }
body.dash-mode .dash-stat .ds-num { font:800 1.75rem/1.15 var(--d-num); color:var(--d-ink); }
.ds-note { font-size:.75rem; color:var(--d-mute); line-height:1.35; }
.ds-note.up { color:var(--d-good); font-weight:600; } .ds-note.down { color:var(--d-weak); font-weight:600; }
.ds-spark { position:absolute; top:1.1rem; right:1rem; width:70px; height:30px; }
.ds-spark svg { width:100%; height:100%; overflow:visible; }
.sp-line { fill:none; stroke:var(--k); stroke-width:2; vector-effect:non-scaling-stroke; stroke-linejoin:round; }
.sp-area { fill:var(--k-soft); stroke:none; }

/* ---- sidebar ---- */
body.dash-mode .dash-tabs { background:#fff; border:1px solid var(--d-line); box-shadow:var(--d-shadow); border-radius:16px; backdrop-filter:none; }
.dt-label { font-size:.7rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--d-mute); padding:.7rem .9rem .25rem; }
.dt-label:first-child { padding-top:.35rem; }
body.dash-mode .dash-tab { color:var(--d-sub); font-weight:600; border-radius:10px; gap:.65rem; }
body.dash-mode .dash-tab:hover { background:#f1f4f8; color:var(--d-ink); }
body.dash-mode .dash-tab.active { background:var(--d-mint); color:var(--d-teal-dk); box-shadow:none; }
body.dash-mode .dash-tab.active .ic { stroke:var(--d-teal); }
body.dash-mode .dash-tab.active .tab-badge { background:var(--d-teal); color:#fff; }
body.dash-mode .tab-badge { background:var(--d-weak); }
@media (min-width:901px) {
  body.dash-mode .dash-tabs { flex-direction:column; overflow:visible; gap:.15rem; padding:.6rem; }
  body.dash-mode .dash-tab { justify-content:flex-start; width:100%; padding:.62rem .8rem; position:relative; font-size:.93rem; }
  body.dash-mode .dash-tab .tab-badge { margin-left:auto; }
  body.dash-mode .dash-tab.active::before { content:""; position:absolute; left:-.6rem; top:20%; bottom:20%; width:3px; border-radius:0 3px 3px 0; background:var(--d-teal); }
}
@media (max-width:900px) {
  .dt-label { display:none; }
  body.dash-mode .dash-tabs { top:4.2rem; padding:.3rem; border-radius:14px; margin-bottom:1rem; }
  body.dash-mode .dash-tab { padding:.5rem .85rem; font-size:.88rem; }
  body.dash-mode .dash-tab.active { background:var(--d-teal); color:#fff; }
  body.dash-mode .dash-tab.active .ic { stroke:#fff; }
  body.dash-mode .dash-tab.active .tab-badge { background:#fff; color:var(--d-teal); }
}

/* ---- cards & shared bits ---- */
body.dash-mode .card { background:#fff; border:1px solid var(--d-line); border-radius:16px; box-shadow:var(--d-shadow); backdrop-filter:none; padding:1.2rem 1.3rem; }
body.dash-mode .dash-card-head { align-items:flex-start; margin-bottom:.9rem; }
body.dash-mode .dash-card-head .icon { display:none; }
body.dash-mode .dash-card-head h3 { color:var(--d-ink); font:700 1.02rem/1.3 var(--d-num); margin:0; }
.dch-title { flex:1; min-width:0; }
.dch-sub { margin:.1rem 0 0; font-size:.78rem; color:var(--d-mute); }
body.dash-mode .link-btn { color:var(--d-teal); white-space:nowrap; }
body.dash-mode .btn:not(.secondary):not(.danger) { background:var(--d-teal); box-shadow:0 2px 8px rgba(79,70,229,.25); }
body.dash-mode .btn:not(.secondary):not(.danger):hover { background:var(--d-teal-dk); }
body.dash-mode .btn.secondary { background:#fff; border:1px solid var(--d-line); color:var(--d-ink); box-shadow:none; }
body.dash-mode .btn.secondary:hover { border-color:var(--d-teal); color:var(--d-teal); }
body.dash-mode .chip { background:#fff; border-color:var(--d-line); }
body.dash-mode .chip.active { background:var(--d-teal); border-color:var(--d-teal); color:#fff; }
body.dash-mode .empty-state { color:var(--d-sub); }
.empty-state.slim { padding:1.1rem .5rem; font-size:.88rem; } .empty-state.slim .big { font-size:1.6rem; }
.sk { height:64px; border-radius:12px; background:linear-gradient(90deg,#eef1f6 25%,#f6f8fb 50%,#eef1f6 75%); background-size:200% 100%; animation:skl 1.3s infinite; }
.sk.tall { height:190px; } @keyframes skl { to { background-position:-200% 0; } }
body.dash-mode .ex-card { background:#fff; border:1px solid var(--d-line); border-left:4px solid var(--d-teal); border-radius:12px; box-shadow:none; }
body.dash-mode .ex-card.st-done { border-left-color:var(--d-good); }
body.dash-mode .ex-card.st-in_progress { border-left-color:var(--d-mid); background:#fffbeb; }
body.dash-mode .ex-title { color:var(--d-ink); }
body.dash-mode .ex-meta span { background:#f1f4f8; color:var(--d-sub); font-weight:600; }
body.dash-mode .ex-score { color:var(--d-teal); }

/* ---- overview grid ---- */
.ov-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:1rem; }
.ov-grid > .card { margin:0; min-width:0; }
.ov-open { grid-column:span 12; } .ov-trend { grid-column:span 8; } .ov-donut { grid-column:span 4; }
.ov-topics { grid-column:span 7; } .ov-focus { grid-column:span 5; }
.ov-results { grid-column:span 7; } .ov-board { grid-column:span 5; }
@media (max-width:1100px) { .ov-trend,.ov-topics,.ov-results { grid-column:span 7; } .ov-donut,.ov-focus,.ov-board { grid-column:span 5; } }
@media (max-width:760px) { .ov-grid > .card { grid-column:span 12 !important; } body.dash-mode .dash-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; } }
@media (max-width:560px) { .ds-spark { display:none; } body.dash-mode .dash-stat { padding:.85rem; gap:.6rem; } .ds-ico { width:36px; height:36px; } body.dash-mode .dash-stat .ds-num { font-size:1.45rem; } }

/* ---- bar + trend chart ---- */
.tc-legend { display:flex; gap:.8rem; font-size:.74rem; color:var(--d-sub); white-space:nowrap; }
.tc-legend span { display:inline-flex; align-items:center; gap:.3rem; }
.lg-bar { width:10px; height:10px; border-radius:3px; background:var(--d-good); } .lg-line { width:14px; height:3px; border-radius:2px; background:var(--d-blue); }
.tc { display:grid; grid-template-columns:30px minmax(0,1fr); grid-template-rows:220px auto; column-gap:.4rem; }
.tc-y { display:flex; flex-direction:column; justify-content:space-between; text-align:right; font-size:.7rem; color:var(--d-mute); font-variant-numeric:tabular-nums; transform:translateY(-.45em); height:calc(100% + .9em); }
.tc-plot { position:relative; border-bottom:1px solid var(--d-line); }
.tc-grid { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between; pointer-events:none; }
.tc-grid i { display:block; border-top:1px dashed #e9edf3; } .tc-grid i:last-child { border-top:0; }
.tc-cols { position:absolute; inset:0; display:flex; }
.tc-col { flex:1; display:flex; align-items:flex-end; justify-content:center; min-width:0; }
.tc-bar { position:relative; width:min(46%,42px); border-radius:8px 8px 0 0; transition:height .5s ease, filter .15s; transform-origin:bottom; animation:tcgrow .6s ease both; }
@keyframes tcgrow { from { transform:scaleY(.05); opacity:.4; } }
.tc-col:hover .tc-bar { filter:brightness(1.08); }
.tc-bar.good { background:linear-gradient(180deg,#26b58c,#0f9d75); } .tc-bar.mid { background:linear-gradient(180deg,#f2b73a,#e8a317); } .tc-bar.weak { background:linear-gradient(180deg,#ef6a6e,#e5484d); }
.tc-val { position:absolute; top:-1.35rem; left:50%; transform:translateX(-50%); font-size:.72rem; font-weight:700; color:var(--d-ink); white-space:nowrap; font-variant-numeric:tabular-nums; }
.tc-line { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.tc-path { fill:none; stroke:var(--d-blue); stroke-width:2.5; vector-effect:non-scaling-stroke; stroke-linejoin:round; stroke-linecap:round; }
.tc-area { fill:rgba(59,111,212,.08); }
.tc-dots { position:absolute; inset:0; pointer-events:none; }
.tc-dots i { position:absolute; width:9px; height:9px; margin:0 0 -4.5px -4.5px; border-radius:50%; background:#fff; border:2.5px solid var(--d-blue); }
.tc-x { grid-column:2; display:flex; padding-top:.4rem; } .tc-x span { flex:1; text-align:center; font-size:.7rem; color:var(--d-mute); white-space:nowrap; }
.tc-foot { display:flex; flex-wrap:wrap; gap:.4rem 1.2rem; margin-top:.9rem; padding-top:.8rem; border-top:1px solid var(--d-line); font-size:.8rem; color:var(--d-sub); }
.tc-foot b { color:var(--d-ink); font-family:var(--d-num); }
.tc-keys { margin-left:auto; display:inline-flex; align-items:center; gap:.3rem; font-size:.72rem; }
.tc-keys i { width:8px; height:8px; border-radius:50%; margin-left:.45rem; } .tc-keys i:first-child { margin-left:0; }
.tc-keys .good,.dn-legend .good { background:var(--d-good); } .tc-keys .mid { background:var(--d-mid); } .tc-keys .weak,.dn-legend .weak { background:var(--d-weak); }

/* ---- donut ---- */
.dn { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.dn-ring { position:relative; width:158px; height:158px; }
.dn-ring svg { width:100%; height:100%; transform:rotate(0deg); }
.dn-track { fill:none; stroke:#eef1f6; stroke-width:5; }
.dn-seg { fill:none; stroke-width:5; stroke-linecap:butt; transition:stroke-dasharray .6s ease; }
.dn-seg.good { stroke:var(--d-good); } .dn-seg.weak { stroke:var(--d-weak); } .dn-seg.skip { stroke:#b8c2cf; }
.dn-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.dn-center b { font:800 1.7rem/1 var(--d-num); color:var(--d-ink); } .dn-center small { font-size:.75rem; color:var(--d-mute); margin-top:.15rem; }
.dn-legend { list-style:none; margin:0; padding:0; width:100%; display:flex; flex-direction:column; gap:.45rem; }
.dn-legend li { display:flex; align-items:center; gap:.55rem; font-size:.86rem; color:var(--d-sub); }
.dn-legend li i { width:10px; height:10px; border-radius:3px; flex:none; } .dn-legend li i.skip { background:#b8c2cf; }
.dn-legend li span { flex:1; } .dn-legend li b { color:var(--d-ink); font-family:var(--d-num); } .dn-legend li em { font-style:normal; width:2.8rem; text-align:right; color:var(--d-mute); font-size:.78rem; }
.dn-total { margin-top:.2rem; padding-top:.55rem; border-top:1px solid var(--d-line); }

/* ---- topic bars ---- */
.tb-row { margin-bottom:.95rem; } .tb-top { display:flex; align-items:center; gap:.5rem; margin-bottom:.3rem; }
.tb-name { flex:1; min-width:0; font-weight:600; font-size:.92rem; color:var(--d-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-lv { font-size:.68rem; font-weight:700; padding:2px 8px; border-radius:999px; }
.tb-lv.good { background:rgba(15,157,117,.12); color:#0b7a5a; } .tb-lv.mid { background:rgba(232,163,23,.16); color:#9a6a05; } .tb-lv.weak { background:rgba(229,72,77,.12); color:#b8282d; }
.tb-pct { font:700 .9rem var(--d-num); width:2.9rem; text-align:right; color:var(--d-ink); }
.tb-track { position:relative; height:10px; border-radius:999px; background:#eef1f6; overflow:hidden; }
.tb-fill { height:100%; border-radius:999px; transition:width .6s ease; }
.tb-fill.good,.rs-fill.good { background:linear-gradient(90deg,#26b58c,#0f9d75); } .tb-fill.mid,.rs-fill.mid { background:linear-gradient(90deg,#f2b73a,#e8a317); } .tb-fill.weak,.rs-fill.weak { background:linear-gradient(90deg,#ef6a6e,#e5484d); }
.tb-mark { position:absolute; top:0; bottom:0; width:2px; background:rgba(255,255,255,.95); margin-left:-1px; }
.tb-meta { margin-top:.25rem; font-size:.73rem; color:var(--d-mute); }
.tb-more { display:block; margin:-.2rem auto .6rem; }
.tb-scale { position:relative; height:1rem; font-size:.66rem; color:var(--d-mute); display:flex; justify-content:space-between; border-top:1px solid var(--d-line); padding-top:.3rem; }
.tb-scale span[style] { position:absolute; transform:translateX(-50%); }

/* ---- focus card ---- */
.fc-block + .fc-block { margin-top:1.1rem; padding-top:1.1rem; border-top:1px solid var(--d-line); }
.fc-label { font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--d-mute); margin-bottom:.55rem; }
.fc-item { display:flex; align-items:center; gap:.6rem; padding:.55rem .7rem; border-radius:10px; background:#f7f9fc; margin-bottom:.4rem; }
.fc-n { width:22px; height:22px; border-radius:50%; background:#fff; border:1px solid var(--d-line); display:grid; place-items:center; font-size:.74rem; font-weight:700; color:var(--d-sub); flex:none; }
.fc-name { flex:1; min-width:0; font-weight:600; font-size:.9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fc-item b { font-family:var(--d-num); } .fc-item b.weak { color:var(--d-weak); } .fc-item b.mid { color:#b27d05; } .fc-item b.good { color:var(--d-good); }
.fc-good { margin:.2rem 0; color:var(--d-good); font-weight:600; } .fc-best { font-size:.82rem; color:var(--d-sub); margin-top:.5rem; }
.fc-prog { height:10px; border-radius:999px; background:#eef1f6; overflow:hidden; } .fc-prog-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,#3b6fd4,#7c5cdb); transition:width .6s ease; }
.fc-prog-meta { display:flex; justify-content:space-between; font-size:.8rem; color:var(--d-sub); margin:.4rem 0 .8rem; } .fc-prog-meta b { color:var(--d-ink); font-family:var(--d-num); }
.fc-cta { width:100%; }

/* ---- recent results ---- */
.rs-row { padding:.75rem 0; border-bottom:1px solid var(--d-line); } .rs-row:last-child { border-bottom:0; padding-bottom:0; } .rs-row:first-child { padding-top:0; }
.rs-top { display:flex; justify-content:space-between; gap:.6rem; align-items:baseline; }
.rs-title { font-weight:600; color:var(--d-ink); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rs-score { font-size:.82rem; color:var(--d-mute); white-space:nowrap; } .rs-score b { font:800 1.05rem var(--d-num); color:var(--d-ink); }
.rs-track { height:8px; border-radius:999px; background:#eef1f6; overflow:hidden; margin:.45rem 0 .35rem; } .rs-fill { height:100%; border-radius:999px; }
.rs-meta { display:flex; gap:.8rem; flex-wrap:wrap; font-size:.75rem; color:var(--d-mute); } .rs-ok { color:var(--d-good); font-weight:600; } .rs-bad { color:var(--d-weak); font-weight:600; } .rs-p { margin-left:auto; font-weight:700; color:var(--d-sub); }

/* ---- leaderboard ---- */
body.dash-mode .rank-row { background:#fff; border:0; border-bottom:1px solid var(--d-line); border-radius:0; margin:0; padding:.7rem .3rem; gap:.7rem; }
body.dash-mode .rank-row:last-child { border-bottom:0; }
body.dash-mode .rank-row.me { background:var(--d-mint); border-radius:10px; border-bottom-color:transparent; padding-left:.6rem; padding-right:.6rem; }
body.dash-mode .rank-num { width:30px; height:30px; font-family:var(--d-num); font-size:.82rem; background:#f1f4f8; }
body.dash-mode .rank-name { font-size:.92rem; min-width:0; } .rank-sub { font-size:.72rem; font-weight:500; }
body.dash-mode .rank-score { font-family:var(--d-num); color:var(--d-ink); width:3.4rem; text-align:right; }
.rank-bar { flex:0 0 70px; height:6px; border-radius:999px; background:#eef1f6; overflow:hidden; } .rank-bar i { display:block; height:100%; background:var(--d-teal); border-radius:999px; }
.you-tag { font-size:.66rem; background:var(--d-teal); color:#fff; padding:1px 7px; border-radius:999px; vertical-align:middle; margin-left:.2rem; }
.rank-gap { text-align:center; color:var(--d-mute); line-height:1; padding:.1rem 0; }
@media (max-width:420px) { .rank-bar { display:none; } }
@media (max-width:560px) { .tc { grid-template-rows:190px auto; } .tc-keys { margin-left:0; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { body.dash-mode .card { background:#fff; } }
@media (prefers-reduced-motion:reduce) { .tc-bar, .sk, .dn-seg, .tb-fill { animation:none; transition:none; } }


/* ---------- প্রশ্নব্যাংক (student) ---------- */
.qb-q { padding: 1rem 1.1rem; margin-bottom: .9rem; border: 1px solid var(--accent-soft-border); border-radius: 14px; background: rgba(255,255,255,.7); }
.qb-q h4 { margin: 0 0 .7rem; font-size: 1rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.qb-opt { display: flex; gap: .6rem; align-items: flex-start; width: 100%; text-align: left; margin: .35rem 0; padding: .6rem .8rem; border-radius: 10px;
  border: 1.5px solid var(--accent-soft-border); background: #fff; color: var(--text-primary); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.qb-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.qb-opt b { flex: 0 0 1.4rem; color: var(--accent); }
.qb-opt:disabled { cursor: default; }
.qb-opt.right { border-color: var(--success); background: var(--success-soft); }
.qb-opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.qb-note { margin: .6rem 0 0; font-size: .88rem; color: var(--text-secondary); white-space: pre-wrap; }
.qb-score { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .6rem 0; }
.qb-crumbs { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; margin: .2rem 0 .6rem; color: var(--text-tertiary); }
.qb-crumb { border: 0; background: none; font: inherit; font-weight: 600; font-size: .9rem; color: var(--accent); cursor: pointer; padding: .15rem .35rem; border-radius: 6px; }
.qb-crumb:hover { background: var(--accent-soft); }
.qb-crumb.on { color: var(--text-primary); cursor: default; }


/* =====================================================================
   ANSWER REVIEW PAGE  (#view-results)
   Calm, academic look: white surfaces, thin borders, one accent colour.
   Green / red / amber are used ONLY to show correct / wrong / skipped.
   ===================================================================== */
.rv { max-width: 820px; margin: 0 auto; padding: 1.5rem 1rem 4rem; color: var(--text-primary); }
.rv h2, .rv b { font-family: var(--font-body); }

/* ---- summary card ---- */
.rv-summary { --ring: var(--accent); background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1.5rem 1.6rem 1.25rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.25); }
.rv-summary.tier-top  { --ring: #059669; }
.rv-summary.tier-good { --ring: #4f46e5; }
.rv-summary.tier-mid  { --ring: #d97706; }
.rv-summary.tier-low  { --ring: #64748b; }
.rv-top { display: flex; align-items: center; gap: 1.6rem; }
.rv-ring { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.rv-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rv-ring .track { stroke: #eef2f7; }
.rv-ring .fill { stroke: var(--ring); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rv-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.rv-ring-center #statScore { font-size: 2rem; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rv-ring-center small { margin-top: 5px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; color: var(--text-tertiary); }
.rv-hero-text { min-width: 0; }
.rv-eyebrow { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 0.3rem; }
.rv-hero-text h2 { margin: 0 0 0.3rem; font-size: 1.55rem; line-height: 1.3; color: var(--text-primary); }
.rv-hero-text p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }
.rv-hero-text p:empty { display: none; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.rv-chip { padding: 0.26rem 0.75rem; border-radius: 8px; background: #f1f5f9; border: 1px solid #e2e8f0; color: #334155; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }

.rv-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.4rem 0 1rem; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.rv-tile { padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; border-left: 1px solid #e2e8f0; background: #fff; }
.rv-tile:first-child { border-left: 0; }
.rv-tile b { font-size: 1.55rem; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-tile .l { font-size: 0.78rem; font-weight: 600; color: var(--text-tertiary); }
.rv-tile.ok b { color: #047857; } .rv-tile.bad b { color: #b91c1c; } .rv-tile.skip b { color: #b45309; } .rv-tile.all b { color: #1e293b; }

.rv-meter { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #eef2f7; }
.rv-meter i { display: block; height: 100%; width: 0; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rv-meter .m-ok { background: #10b981; } .rv-meter .m-bad { background: #ef4444; } .rv-meter .m-skip { background: #f59e0b; }
.rv-hint { margin: 0.9rem 0 0; padding-top: 0.9rem; border-top: 1px solid #eef2f7; font-size: 0.92rem; line-height: 1.6; color: var(--text-secondary); }
.rv-hint:empty { display: none; }

/* ---- section title + filters ---- */
.rv-title { margin: 2rem 0 0.9rem; font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.rv-filters { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 1rem; background: #eef2f7; border-radius: 10px; flex-wrap: wrap; }
.rv-filter { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.42rem 0.95rem; border: 0; border-radius: 8px; background: transparent; color: #475569; font-family: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.rv-filter em { font-style: normal; font-size: 0.76rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.rv-filter:hover:not(:disabled):not(.active) { color: #0f172a; }
.rv-filter.active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.rv-filter.active em { color: var(--accent); }
.rv-filter:disabled { opacity: 0.45; cursor: default; }
.rv-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- question cards ---- */
.rv-q { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.15rem 1.3rem 1.1rem 1.45rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); scroll-margin-top: 90px; animation: rvIn 0.4s both; animation-delay: calc(min(var(--i, 0), 8) * 35ms); }
.rv-q::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, #cbd5e1); }
.rv-q.s-correct { --c: #10b981; } .rv-q.s-wrong { --c: #ef4444; } .rv-q.s-skipped { --c: #f59e0b; }
.rv-q-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.65rem; }
.rv-num { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.rv-state { font-weight: 700; font-size: 0.78rem; padding: 0.2rem 0.65rem; border-radius: 6px; }
.rv-q.s-correct .rv-state { background: #ecfdf5; color: #047857; }
.rv-q.s-wrong   .rv-state { background: #fef2f2; color: #b91c1c; }
.rv-q.s-skipped .rv-state { background: #fffbeb; color: #b45309; }
.rv-qtext { margin: 0 0 0.95rem; font-size: 1.1rem; font-weight: 600; line-height: 1.65; color: var(--text-primary); overflow-wrap: anywhere; }

.rv-opts { display: grid; gap: 0.45rem; }
.rv-opt { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.85rem; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; font-size: 1.02rem; color: #334155; }
.rv-letter { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 0.82rem; background: #f1f5f9; color: #475569; }
.rv-otext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rv-opt.is-correct { background: #f0fdf7; border-color: #86efac; color: #14532d; }
.rv-opt.is-correct .rv-letter { background: #10b981; color: #fff; }
.rv-opt.is-wrong { background: #fff5f5; border-color: #fca5a5; color: #7f1d1d; }
.rv-opt.is-wrong .rv-letter { background: #ef4444; color: #fff; }
.rv-tag { font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.rv-tag.ok { color: #047857; } .rv-tag.bad { color: #b91c1c; }

.rv-expl { display: flex; gap: 0.7rem; margin-top: 0.9rem; padding: 0.75rem 1rem; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; color: #334155; font-size: 0.93rem; line-height: 1.7; }
.rv-expl b { flex-shrink: 0; font-weight: 700; color: #1e293b; }

/* AI explanation: button + answer box (results, OMR review and question bank) */
.ai-slot .btn.ai { background: #fff; color: var(--accent); border: 1.5px solid #c7d2fe; box-shadow: none; border-radius: 10px; font-weight: 700; }
.ai-slot .btn.ai:hover:not(:disabled) { background: #eef2ff; border-color: var(--accent); transform: none; }
.ai-slot .btn.ai:disabled { opacity: 0.7; }
.ai-explain-box { background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid var(--accent); border-radius: 10px; color: #1e293b; animation: rvIn 0.3s both; }
.ai-explain-box .ai-label { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.05em; }

@keyframes rvIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 680px) {
  .rv-summary { padding: 1.2rem 1rem 1rem; }
  .rv-top { flex-direction: column; text-align: center; gap: 1rem; }
  .rv-chips { justify-content: center; }
  .rv-stats { grid-template-columns: repeat(2, 1fr); }
  .rv-tile:nth-child(3) { border-left: 0; }
  .rv-tile:nth-child(n+3) { border-top: 1px solid #e2e8f0; }
  .rv-filters { display: flex; }
  .rv-filter { flex: 1; justify-content: center; padding: 0.42rem 0.4rem; }
  .rv-q { padding: 1rem 0.95rem 1rem 1.2rem; }
  .rv-opt { flex-wrap: wrap; }
  .rv-tag { margin-left: calc(28px + 0.75rem); }
}
@media (prefers-reduced-motion: reduce) {
  .rv-q, .ai-explain-box { animation: none; }
  .rv-ring .fill, .rv-meter i, .rv-filter { transition: none; }
}

/* OMR review (dashboard → OMR tab) uses the same colour language */
.omr-q { position: relative; border: 1px solid var(--hairline); border-radius: 16px; padding: 0.85rem 1rem 0.85rem 1.2rem; background: #fff; overflow: hidden; box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.4); }
.omr-q::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #cbd5e1; }
.omr-q.s-correct::before { background: #10b981; } .omr-q.s-wrong::before { background: #ef4444; } .omr-q.s-skipped::before { background: #f59e0b; }
.omr-opt { padding: 0.4rem 0.7rem; margin-top: 4px; border-radius: 10px; border: 1.5px solid transparent; }
.omr-opt.right { border-color: #6ee7b7; background: #ecfdf5; color: #065f46; }
.omr-opt.wrong { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }


/* =====================================================================
   SITE FOOTER — deep teal ink to match the landing page; white text, one emerald accent
   ===================================================================== */
.site-foot { margin-top: 4rem; background: var(--lp-ink, #0b2a2e); color: rgba(255, 255, 255, 0.72); font-family: var(--font-body); position: relative; }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #4f46e5, #10b981 50%, #f59e0b); }
body.no-footer .site-foot { display: none; }
.sf-inner { max-width: 1180px; margin: 0 auto; padding: 3.2rem 1.5rem 1.4rem; }
.sf-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.1fr 1.2fr; gap: 2.6rem; }
.sf-logo { display: flex; align-items: center; gap: 0.7rem; color: #fff; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 0.9rem; }
.sf-logo img { object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.sf-brand p { margin: 0 0 1.1rem; max-width: 34ch; font-size: 0.93rem; line-height: 1.75; }
.sf-social { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sf-social a { padding: 0.35rem 0.85rem; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 8px; color: #fff; font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease; }
.sf-social a:hover { background: rgba(255, 255, 255, 0.1); border-color: #34d399; }
.sf-col h4 { margin: 0 0 1rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.sf-col a, .sf-col li a { display: block; width: fit-content; padding: 0.28rem 0; color: rgba(255, 255, 255, 0.72); font-size: 0.93rem; text-decoration: none; transition: color 0.15s ease, transform 0.15s ease; }
.sf-col a:hover { color: #6ee7b7; transform: translateX(2px); }
.sf-note { margin: 0.8rem 0 0; font-size: 0.86rem; line-height: 1.7; color: rgba(255, 255, 255, 0.55); max-width: 30ch; }
.sf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.sf-col li span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45); margin-bottom: 1px; }
.sf-col li em { font-style: normal; font-size: 0.93rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.sf-col li a { padding: 0; }
.site-foot a:focus-visible, .sf-top:focus-visible { outline: 2px solid #34d399; outline-offset: 3px; border-radius: 4px; }
.sf-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }
.sf-top { background: none; border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; border-radius: 8px; padding: 0.35rem 0.9rem; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background 0.15s ease; }
.sf-top:hover { background: rgba(255, 255, 255, 0.1); }
@media (max-width: 900px) { .sf-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } .sf-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .sf-inner { padding: 2.4rem 1.1rem 1.2rem; } .sf-grid { grid-template-columns: 1fr; gap: 1.8rem; } .sf-bottom { flex-direction: column; align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .sf-col a, .sf-social a, .sf-top { transition: none; } .sf-col a:hover { transform: none; } }


/* footer: Play Store button + contact icons */
.sf-play { display: inline-flex; align-items: center; gap: 0.7rem; margin: 0 0 1rem; padding: 0.5rem 1.1rem 0.5rem 0.9rem; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 10px; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.sf-play:not(.is-soon):hover { border-color: #34d399; transform: translateY(-1px); }
.sf-play.is-soon { opacity: 0.6; cursor: default; }
.sf-play svg { flex-shrink: 0; color: #6ee7b7; }
.sf-play-t { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.sf-play-t small { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.75); }
.sf-play-t b { font-family: var(--font-body); font-size: 1.12rem; font-weight: 700; color: #fff; }
.sf-col ul { gap: 0.95rem; }
.sf-col li { display: flex; align-items: flex-start; gap: 0.8rem; }
.sf-col li > div { min-width: 0; padding-top: 1px; }
.sf-ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); color: #6ee7b7; }
.sf-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sf-col li a { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .sf-play { transition: none; } .sf-play:not(.is-soon):hover { transform: none; } }

/* ---------- Teacher-designed question paper (student OMR view) — same look as the designer's preview ---------- */
.pd-sheet{position:relative;box-sizing:border-box;width:var(--pd-w);min-height:var(--pd-h);padding:var(--pd-m);margin:0 auto;background:#fff;color:#111;
  font-size:var(--pd-fs);line-height:var(--pd-lh);box-shadow:0 8px 30px rgba(15,23,42,.28);-webkit-print-color-adjust:exact;print-color-adjust:exact;overflow:hidden}
.pd-sheet>*:not(.pd-wm):not(.pd-foot){position:relative}
.pd-head{display:flex;gap:4mm;align-items:center;margin-bottom:2.5mm;padding-bottom:2.5mm}
.pd-head.a-center{justify-content:center;text-align:center}
.pd-head.a-left{text-align:left}
.pd-head.lg-center{flex-direction:column}
.pd-head.lg-right .pd-logo{order:2}
.pd-ht{flex:0 1 auto;min-width:0}
.pd-logo{max-height:20mm;max-width:38mm;object-fit:contain}
.pd-inst{font-size:1.35em;font-weight:800;line-height:1.25}
.pd-title{font-size:1.12em;font-weight:700}
.pd-sub{font-size:.95em;color:#333}
.pd-head.h-underline{border-bottom:2px solid var(--pd-accent)}
.pd-head.h-boxed{border:1.5px solid var(--pd-accent);padding:3mm;border-radius:1.5mm}
.pd-head.h-band{background:var(--pd-accent);color:#fff;padding:3mm;border-radius:1.5mm}
.pd-head.h-band .pd-sub{color:rgba(255,255,255,.88)}
.pd-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1mm 6mm;margin:0 0 3mm;font-size:.95em}
.pd-sb{display:flex;flex-wrap:wrap;gap:3mm 6mm;margin:0 0 3.5mm}
.pd-sbw{display:flex;align-items:flex-end;gap:1.5mm;flex:1 1 40mm}
.pd-sbw em{font-style:normal;white-space:nowrap}
.pd-sbw i{flex:1;border-bottom:1px solid #444;min-width:15mm;height:1.1em}
.pd-ins{border:1px solid #999;border-left:3px solid var(--pd-accent);padding:2mm 3mm;margin:0 0 3.5mm;font-size:.92em;white-space:pre-line}
.pd-ins b{display:block;margin-bottom:.5mm}
.pd-qs{column-count:var(--pd-cols);column-gap:10mm;column-rule:1px solid #d4d4d8}
.pd-q{break-inside:avoid;page-break-inside:avoid;margin:0 0 3.5mm}
.pd-qt{display:flex;gap:1.5mm;font-weight:600}
.pd-n{flex:none;min-width:5mm}
.pd-qx{flex:1;white-space:pre-line;overflow-wrap:anywhere}
.pd-m{flex:none;font-weight:600;color:#444}
.pd-opts{margin:1mm 0 0 6.5mm}
.pd-opts.o-grid2{display:grid;grid-template-columns:1fr 1fr;gap:.6mm 5mm}
.pd-opts.o-row{display:flex;flex-wrap:wrap;gap:.6mm 7mm}
.pd-o{display:flex;gap:1.5mm;overflow-wrap:anywhere}
.pd-ol{flex:none}
.pd-o.is-ans{font-weight:700;background:rgba(0,0,0,.08);border-radius:1mm;padding:0 1mm}
.pd-empty{color:#777;text-align:center;padding:10mm 0}
.pd-key{break-before:page;page-break-before:always;margin-top:6mm}
.pd-key h3{margin:0 0 3mm;font-size:1.1em;border-bottom:1.5px solid var(--pd-accent);padding-bottom:1.5mm}
.pd-keygrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(24mm,1fr));gap:1.5mm 4mm}
.pd-wm{position:absolute;inset:0;display:grid;place-items:center;font-size:60pt;font-weight:800;color:rgba(0,0,0,.07);transform:rotate(-30deg);text-transform:uppercase;white-space:nowrap;pointer-events:none;z-index:0}
.pd-foot{position:absolute;left:0;right:0;bottom:4mm;text-align:center;font-size:8.5pt;color:#555}
.paper-sheet.designed { max-width: calc(210mm + 3rem); }
.paper-sheet.designed .pd-wrap { background: #cbd5e1; border-radius: 12px; padding: .8rem; overflow-x: auto; }
@media (max-width: 560px) { .paper-sheet.designed .pd-wrap { padding: .4rem; } }
@media print {
  body.paper-open .paper-sheet.designed { max-width: none; }
  body.paper-open .paper-sheet.designed .pd-wrap { background: none; padding: 0; overflow: visible; border-radius: 0; }
  body.paper-open .pd-sheet { width: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; overflow: visible !important; zoom: 1 !important; }
  body.paper-open .pd-wm { position: fixed; }
  body.paper-open .pd-foot { position: fixed; left: 0; right: 0; bottom: calc(var(--pd-m) * -1 + 4mm); }
}

/* ---------- Topic progress report + adaptive topic picker ---------- */
.topic-bar-meta { font-size: .78rem; margin-top: 4px; }
.topic-pick-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .9rem; max-height: 55vh; overflow-y: auto; }
.topic-pick-item { display: grid; grid-template-columns: 1fr auto auto; gap: .15rem .6rem; align-items: center; text-align: left; width: 100%;
  padding: .7rem .9rem; border: 1.5px solid var(--hairline); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.topic-pick-item:hover { border-color: var(--accent); }
.topic-pick-item.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.topic-pick-item .tp-name { font-weight: 700; overflow-wrap: anywhere; }
.topic-pick-item .tp-pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.topic-pick-item .tp-sub { grid-column: 1 / -1; font-size: .78rem; }

/* ---------- Progress report: exam list, click for the exam's topics ---------- */
.rp-exam { border: 1.5px solid var(--hairline); border-radius: 14px; background: #fff; margin-bottom: .6rem; overflow: hidden; }
.rp-exam.open { border-color: var(--accent); }
.rp-head { display: grid; grid-template-columns: 1fr auto auto auto; gap: .6rem; align-items: center; width: 100%; padding: .75rem .9rem .2rem; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.rp-title { font-weight: 700; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.rp-sub { font-weight: 500; font-size: .78rem; }
.rp-pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-chev { transition: transform .2s; color: var(--accent); }
.rp-exam.open .rp-chev { transform: rotate(180deg); }
.rp-mini { font-size: .8rem; padding: 0 .9rem .7rem; }
.rp-detail { border-top: 1px dashed var(--hairline); padding: .9rem .9rem .3rem; background: var(--glass-soft, #f8fafc); }

.tp-tools { display: flex; gap: .9rem; align-items: center; margin-top: .8rem; font-size: .85rem; }
.tp-tools .muted { margin-left: auto; }
.topic-pick-item { grid-template-columns: auto 1fr auto auto; }
.topic-pick-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.topic-pick-item .tp-sub { grid-column: 2 / -1; }

/* ---------- Question bank: view / exam modes ---------- */
.qb-modes { display: flex; gap: .5rem; flex-wrap: wrap; margin: .3rem 0 .6rem; }
.qb-opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.qb-expl { margin-top: .35rem; font-weight: 400; }
.ex-side { flex-wrap: wrap; }

/* ---------- "see question": MCQ-exam-page style + basic explanation ---------- */
.paper-hint.ok { background: #ecfdf5; color: #047857; }
.paper-mcq { margin-top: .9rem; }
.paper-mcq .qz-question { break-inside: avoid; box-shadow: none; border: 1px solid #e2e8f0; }
.paper-mcq .qz-option { cursor: default; }
.paper-mcq .qz-option:hover { transform: none; }
.ai-explain-box.is-pending .ai-out { font-style: italic; }
@media print { body.paper-open .paper-mcq .qz-question { border: 0; padding: .4rem 0; } }

.paper-ans { margin-top: .4rem; font-size: .92rem; color: #047857; }
.pd-q .ai-explain-box, .paper-list .ai-explain-box { font-size: .85rem; }

.paper-modal .paper-extra { display: none; }
.paper-modal.show-ans .paper-extra { display: block; }

/* ---- "প্রত্যাশা ব্যাখ্যা" button + answer card (exam pages) ---- */
.ai-deep { margin-top: .75rem; }
.pd-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem .55rem .9rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 .92rem/1 inherit; font-family: inherit; color: #fff; letter-spacing: .01em;
  background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 48%, #0ea5e9 100%); background-size: 160% 100%;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .32), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .18s ease, box-shadow .18s ease, background-position .45s ease;
}
.pd-btn::after { /* soft shine that sweeps across on hover */
  content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
}
.pd-btn:hover:not(:disabled) { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 10px 26px rgba(79, 70, 229, .42), inset 0 1px 0 rgba(255, 255, 255, .3); }
.pd-btn:hover:not(:disabled)::after { transform: translateX(120%); transition: transform .7s ease; }
.pd-btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.pd-btn:focus-visible { outline: 3px solid rgba(14, 165, 233, .55); outline-offset: 3px; }
.pd-btn:disabled { cursor: progress; }
.pd-btn .pd-spark { flex: none; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .6)); animation: pdTwinkle 2.6s ease-in-out infinite; }
.pd-btn.is-loading .pd-spark { animation: pdSpin 1s linear infinite; }
.pd-btn.is-loading { background-position: 100% 0; opacity: .92; }
@keyframes pdTwinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(14deg); } }
@keyframes pdSpin { to { transform: rotate(360deg); } }

.ai-deep-text {
  margin-top: .65rem; padding: 0; overflow: hidden; border-radius: 14px; color: #1e293b; font-size: .94rem; line-height: 1.7;
  background: linear-gradient(180deg, #faf9ff, #f3f7ff); border: 1px solid rgba(124, 58, 237, .22);
  box-shadow: 0 8px 22px rgba(79, 70, 229, .10); animation: pdIn .35s ease both;
}
.ai-deep-text .pd-head { display: flex; align-items: center; gap: .45rem; padding: .5rem .9rem; color: #fff; font-size: .85rem;
  background: linear-gradient(120deg, #4f46e5, #7c3aed 55%, #0ea5e9); }
.ai-deep-text .pd-body { padding: .8rem .95rem .9rem; white-space: pre-wrap; }
.ai-deep-out.error { margin-top: .5rem; padding: .5rem .8rem; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: .85rem; }
@keyframes pdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pd-btn, .pd-btn::after, .pd-btn .pd-spark, .ai-deep-text { animation: none !important; transition: none !important; } }

/* ================= Exam page polish ================= */
body.exam-mode { background:
  radial-gradient(900px 500px at 8% -10%, rgba(99, 102, 241, .22), transparent 60%),
  radial-gradient(800px 480px at 100% 10%, rgba(14, 165, 233, .20), transparent 60%),
  radial-gradient(700px 500px at 50% 110%, rgba(167, 139, 250, .16), transparent 60%), #f5f7ff; background-attachment: fixed; }
body.exam-mode .wrap { max-width: 760px; }
.qz-header h1 { display: flex; align-items: center; gap: .5rem; }
.qz-header h1::after { content: ''; }
.qz-submit { background: linear-gradient(120deg, #4f46e5, #7c3aed); border: 0; padding: 9px 20px; box-shadow: 0 6px 16px rgba(79, 70, 229, .32); }
.qz-submit:hover { background: linear-gradient(120deg, #4338ca, #6d28d9); box-shadow: 0 10px 22px rgba(79, 70, 229, .4); }
.qz-timer { background: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .12); }
.qz-progress { height: 4px; }
.qz-progress > div { background: linear-gradient(90deg, #6366f1, #8b5cf6, #0ea5e9); }

.qz-notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: .6rem .9rem; }

/* progress hero: counter, bar, jump-to-question chips */
.qz-hero { background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 18px; padding: 1rem 1.15rem 1.05rem; margin: 0 0 1.1rem;
  box-shadow: 0 12px 30px -10px rgba(79, 70, 229, .18); }
.qz-hero .qz-counter { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .55rem; font-weight: 600; color: var(--text-primary); }
.qz-pct { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.qz-meter { height: 8px; border-radius: 999px; background: rgba(99, 102, 241, .12); overflow: hidden; }
.qz-meter > div { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #8b5cf6, #0ea5e9); transition: width .35s ease; }
.qz-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .8rem; }
.qz-chip { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--hairline); background: #fff; color: var(--text-secondary);
  font: 700 .78rem/1 inherit; font-family: inherit; cursor: pointer; transition: all .18s ease; }
.qz-chip:hover { transform: translateY(-2px); border-color: var(--accent-soft-border); color: var(--accent); }
.qz-chip.done { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; box-shadow: 0 4px 10px rgba(99, 102, 241, .3); }

/* question cards */
.qz-list { gap: 1.15rem; }
.qz-question { position: relative; padding: 1.35rem 1.4rem 1.2rem 1.4rem; border-radius: 20px; background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(99, 102, 241, .10); box-shadow: 0 14px 34px -14px rgba(30, 41, 59, .16);
  animation: qzIn .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.qz-question::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #c7d2fe, #bae6fd); transition: background .25s ease; }
.qz-question.answered::before { background: linear-gradient(180deg, #6366f1, #0ea5e9); }
.qz-question .qz-num { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 .55rem; margin-bottom: .6rem;
  border-radius: 11px; font-weight: 800; font-size: .9rem; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 6px 14px rgba(99, 102, 241, .3); }
.qz-question > p { font-size: 1.18rem; line-height: 1.65; font-weight: 700; margin: 0 0 1rem; }
.qz-option { padding: 12px 16px; border-radius: 14px; background: #fff; border: 1.5px solid #e8ecf7; font-weight: 500; }
.qz-option:hover { background: #f8f9ff; border-color: #a5b4fc; transform: translateX(3px); box-shadow: 0 6px 16px -8px rgba(99, 102, 241, .35); }
.qz-letter { width: 30px; height: 30px; font-size: .82rem; background: #eef2ff; border-color: #c7d2fe; transition: all .2s ease; }
.qz-question input[type="radio"]:checked + .qz-option { background: linear-gradient(120deg, #4f46e5, #7c3aed); border-color: transparent; box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .55); transform: translateX(3px); }
.qz-question input[type="radio"]:checked + .qz-option .qz-letter { background: #fff; color: #4f46e5; border-color: #fff; }
.qz-question input[type="radio"]:focus-visible + .qz-option { outline: 3px solid rgba(14, 165, 233, .5); outline-offset: 2px; }
@keyframes qzIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qz-question.reviewed { animation: none; }
.qz-question.reviewed::before, .paper-mcq .qz-question::before { display: none; }
@media (max-width: 600px) {
  .qz-question { padding: 1.1rem 1rem; border-radius: 16px; }
  .qz-question > p { font-size: 1.08rem; }
  .qz-chip { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .qz-question { animation: none; } }

/* ================= মক টেস্ট ================= */
.mk-step { display: flex; align-items: center; gap: .6rem; margin: 1.1rem 0 .6rem; }
.mk-step .btn { margin-left: auto; }
.mk-num { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 9px; color: #fff; font-weight: 800; font-size: .85rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 5px 12px rgba(99, 102, 241, .3); }
.mk-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.mk-subject { text-align: left; padding: .9rem 1rem; border-radius: 16px; border: 1.5px solid #e4e8f5; background: #fff; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: .2rem; transition: all .2s ease; }
.mk-subject:hover { transform: translateY(-2px); border-color: #a5b4fc; box-shadow: 0 10px 22px -12px rgba(99, 102, 241, .5); }
.mk-subject.on { background: linear-gradient(135deg, #4f46e5, #7c3aed); border-color: transparent; color: #fff; box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .6); }
.mk-s-name { font-weight: 800; font-size: 1.02rem; }
.mk-s-meta { font-size: .8rem; opacity: .75; }
.mk-topics { display: flex; flex-wrap: wrap; gap: .5rem; }
.mk-topic { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px; border: 1.5px solid #e4e8f5; background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; transition: all .18s ease; }
.mk-topic input { accent-color: #6366f1; }
.mk-topic em { font-style: normal; font-size: .75rem; color: var(--text-tertiary); }
.mk-topic.on { border-color: #818cf8; background: #eef2ff; color: #3730a3; }
.mk-count { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.mk-count input[type=range] { flex: 1; min-width: 160px; accent-color: #6366f1; }
.mk-count input[type=number] { width: 80px; }
.mk-go { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0 .4rem; flex-wrap: wrap; }
.mk-h { margin: 1.6rem 0 .6rem; }

.mk-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: -.2rem -.2rem 1rem; padding: .7rem .9rem .9rem; border-radius: 14px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -12px rgba(30, 41, 59, .25); overflow: hidden; }
.mk-bar-l { display: flex; flex-direction: column; min-width: 0; }
.mk-bar-r { display: flex; align-items: center; gap: .6rem; }
.mk-prog { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.mk-timer { font-family: var(--font-mono, monospace); font-weight: 800; padding: .3rem .8rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.mk-timer.warn { background: var(--danger-soft); color: var(--danger); animation: timerPulse 1s ease-in-out infinite; }
.mk-meter { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(99, 102, 241, .12); }
.mk-meter > div { height: 100%; width: 0; background: linear-gradient(90deg, #6366f1, #8b5cf6, #0ea5e9); transition: width .3s ease; }
#mockBox .qz-question { margin-bottom: 1rem; }
.mk-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 0 0 8px; padding: 11px 16px; border-radius: 14px; border: 1.5px solid #e8ecf7;
  background: #fff; font: inherit; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all .2s ease; }
.mk-opt:hover:not(.ro) { background: #f8f9ff; border-color: #a5b4fc; transform: translateX(3px); }
.mk-opt.on { background: linear-gradient(120deg, #4f46e5, #7c3aed); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .55); }
.mk-opt.on .qz-letter { background: #fff; color: #4f46e5; border-color: #fff; }
.mk-opt.ro { cursor: default; }
.mk-opt.ro em { margin-left: auto; font-style: normal; font-size: .75rem; font-weight: 700; opacity: .85; }
.mk-opt.ro.right { background: #f0fdf4; border-color: #86efac; color: #065f46; }
.mk-opt.ro.right .qz-letter { background: #10b981; border-color: #10b981; color: #fff; }
.mk-opt.ro.wrong { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.mk-opt.ro.wrong .qz-letter { background: #ef4444; border-color: #ef4444; color: #fff; }
.mk-score { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: 1.1rem 1.3rem; border-radius: 18px; margin-bottom: 1rem; color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #0ea5e9); box-shadow: 0 14px 30px -14px rgba(79, 70, 229, .6); }
.mk-score.ok { background: linear-gradient(135deg, #059669, #10b981 55%, #0ea5e9); }
.mk-score.bad { background: linear-gradient(135deg, #be123c, #e11d48 55%, #f97316); }
.mk-score.warn { background: linear-gradient(135deg, #d97706, #f59e0b 55%, #ef4444); }
.mk-pct { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.mk-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
#mockBox .rv-filters { display: flex; gap: .4rem; margin: 0 0 1rem; flex-wrap: wrap; }

/* ---- মক টেস্ট: compact subject/topic picker ---- */
.mk-search { width: 100%; margin: 0 0 .6rem; }
.mk-acc { max-height: 360px; overflow: auto; border: 1px solid #e4e8f5; border-radius: 14px; background: #fff; scrollbar-width: thin; }
.mk-sub { border-bottom: 1px solid #eef1fa; }
.mk-sub:last-child { border-bottom: 0; }
.mk-sub-h { display: flex; align-items: center; gap: .55rem; padding: .5rem .75rem; cursor: pointer; font-size: .92rem; transition: background .15s ease; }
.mk-sub-h:hover { background: #f6f7ff; }
.mk-sub.has .mk-sub-h { background: #f3f4ff; }
.mk-sub-cb, .mk-chip input { accent-color: #6366f1; width: 16px; height: 16px; flex: none; }
.mk-sub-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-sub-meta { font-size: .76rem; color: var(--text-tertiary); white-space: nowrap; }
.mk-pill { background: #6366f1; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .72rem; }
.mk-chev { transition: transform .2s ease; color: var(--text-tertiary); font-size: 1.1rem; line-height: 1; }
.mk-sub.open .mk-chev { transform: rotate(90deg); }
.mk-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: .15rem .75rem .7rem 2.2rem; }
.mk-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; border: 1px solid #e1e5f5; background: #fafbff; cursor: pointer; font-size: .82rem; font-weight: 600; transition: all .15s ease; }
.mk-chip input { width: 13px; height: 13px; }
.mk-chip em { font-style: normal; font-size: .7rem; color: var(--text-tertiary); }
.mk-chip:hover { border-color: #a5b4fc; }
.mk-chip.on { background: #eef2ff; border-color: #818cf8; color: #3730a3; }
.mk-sel { margin-top: .7rem; padding: .6rem .8rem; border-radius: 12px; background: #f5f7ff; border: 1px solid #e0e5fb; }
.mk-sel-h { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .85rem; flex-wrap: wrap; }
.mk-link { background: none; border: 0; color: #4f46e5; font-weight: 700; cursor: pointer; font-size: .8rem; }
.mk-sel-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.mk-tag { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .2rem .12rem .6rem; border-radius: 999px; background: #fff; border: 1px solid #c7d2fe; font-size: .76rem; font-weight: 600; color: #3730a3; }
.mk-tag button { border: 0; background: #e0e7ff; color: #3730a3; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: .8rem; }
.mk-tag.more { padding: .12rem .6rem; background: #eef2ff; }
.mk-hint { margin: .6rem 0 0; }
.mk-time { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mk-tp { padding: .35rem .8rem; border-radius: 999px; border: 1.5px solid #e1e5f5; background: #fff; font: inherit; font-size: .84rem; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: all .15s ease; }
.mk-tp:hover { border-color: #a5b4fc; }
.mk-tp.on { background: linear-gradient(120deg, #4f46e5, #7c3aed); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6); }
.mk-custom { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; border: 1.5px dashed #c7d2fe; font-size: .84rem; }
.mk-custom.on { border-style: solid; border-color: #6366f1; background: #eef2ff; }
.mk-custom input { width: 64px; border: 0; background: transparent; text-align: center; font: inherit; font-weight: 700; padding: .2rem; }
.mk-hist { padding: .6rem .9rem; }
@media (max-width: 600px) { .mk-acc { max-height: 300px; } .mk-chips { padding-left: .75rem; } }

/* ---------- forgot / reset password (inside the auth card) ---------- */
.auth-links { text-align: center; margin: 1rem 0 0; font-size: .88rem; }
.auth-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-title { margin: .2rem 0 .3rem; font-size: 1.2rem; }
.auth-sub { margin: 0 0 1rem; font-size: .88rem; line-height: 1.6; }

/* Sign in with Google */
.google-wrap { margin-top: 1rem; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.or-sep { display: flex; align-items: center; gap: .75rem; color: var(--muted, #6b7280); font-size: .82rem; margin: 0 0 .9rem; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .25; }

/* ---------- কোর্স (video courses) ---------- */
.cr-tools { display:flex; gap:.7rem; flex-wrap:wrap; align-items:center; margin-bottom:.7rem; }
.cr-tools .mk-search { flex:1; min-width:200px; margin:0; }
.chips { display:flex; gap:.4rem; flex-wrap:wrap; }
.cr-cats { margin-bottom:.9rem; }
.cr-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:1rem; }
.cr-card { background:#fff; border:1px solid var(--d-line,#e5e9f0); border-radius:14px; overflow:hidden; display:flex; flex-direction:column; transition:transform .15s, box-shadow .15s; }
.cr-card:hover { transform:translateY(-3px); box-shadow:0 10px 26px rgba(16,24,40,.10); }
.cr-thumb { position:relative; display:flex; align-items:center; justify-content:center; aspect-ratio:16/9; background:linear-gradient(135deg,#4f46e5,#3b6fd4) center/cover no-repeat; text-decoration:none; }
.cr-play { width:46px; height:46px; border-radius:50%; background:rgba(255,255,255,.92); color:#4f46e5; display:flex; align-items:center; justify-content:center; font-size:1rem; padding-left:3px; box-shadow:0 4px 14px rgba(0,0,0,.25); }
.cr-cat { position:absolute; top:.6rem; left:.6rem; background:rgba(15,31,46,.75); color:#fff; font-size:.72rem; font-weight:600; padding:2px 9px; border-radius:999px; }
.cr-body { padding:.85rem .95rem 1rem; display:flex; flex-direction:column; gap:.35rem; flex:1; }
.cr-title { margin:0; font-size:1rem; line-height:1.4; color:var(--d-ink,#0f1f2e); }
.cr-meta { font-size:.82rem; color:var(--d-sub,#5b6b7b); }
.cr-foot { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-top:auto; padding-top:.6rem; flex-wrap:wrap; }
.cr-foot .btn { padding:.45rem 1rem; font-size:.85rem; }
.cr-price { font-weight:800; color:var(--d-ink,#0f1f2e); }
.cr-price.free { color:#0f9d75; }
.cr-prog { display:flex; align-items:center; gap:.5rem; font-size:.78rem; color:var(--d-sub,#5b6b7b); font-weight:600; }
.cr-prog.big { min-width:220px; flex-direction:column; align-items:stretch; gap:.25rem; }
.cr-bar { flex:1; height:7px; border-radius:999px; background:#e5e9f0; overflow:hidden; }
.cr-bar i { display:block; height:100%; background:linear-gradient(90deg,#4f46e5,#0f9d75); border-radius:999px; transition:width .4s; }
.cr-head { display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; flex-wrap:wrap; margin:.3rem 0 .9rem; }
.cr-head h3 { margin:0 0 .15rem; }
.cr-enroll { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; background:var(--d-mint,rgba(79,70,229,.08)); border:1px solid rgba(79,70,229,.25); border-radius:12px; padding:.8rem 1rem; margin-bottom:1rem; }
.cr-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:1.1rem; align-items:start; }
@media (max-width:960px) { .cr-layout { grid-template-columns:1fr; } }
.cr-video { position:relative; aspect-ratio:16/9; background:#000; border-radius:12px; overflow:hidden; }
.cr-ltitle { margin:.8rem 0 .15rem; font-size:1.15rem; }
.cr-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin:.8rem 0; }
.cr-actions .btn { padding:.5rem 1rem; font-size:.86rem; }
.cr-desc { margin-top:1rem; padding-top:.8rem; border-top:1px solid var(--d-line,#e5e9f0); }
.cr-desc h5 { margin:0 0 .4rem; font-size:.95rem; }
.cr-text { white-space:pre-wrap; line-height:1.7; font-size:.92rem; color:var(--d-sub,#5b6b7b); }
.cr-res { display:flex; flex-direction:column; gap:.35rem; margin-top:.8rem; }
.cr-res a { color:var(--d-teal,#4f46e5); font-weight:600; font-size:.9rem; text-decoration:none; word-break:break-word; }
.cr-res a:hover { text-decoration:underline; }
.cr-slide { display:flex; align-items:center; justify-content:space-between; gap:.8rem; flex-wrap:wrap; margin-top:1rem; padding:.8rem 1rem; border:1px solid var(--d-line,#e5e9f0); border-radius:14px; background:var(--d-soft,rgba(79,70,229,.06)); }
.cr-slide-info { display:flex; align-items:center; gap:.7rem; min-width:0; }
.cr-slide-info b { font-size:.95rem; }
.cr-slide-info .muted { word-break:break-all; }
.cr-slide-ic { font-size:1.6rem; line-height:1; }
.cr-slide-btns { display:flex; gap:.5rem; flex-wrap:wrap; }
.cr-doc { font-size:.8rem; margin-left:.2rem; }
.cr-side { border:1px solid var(--d-line,#e5e9f0); border-radius:12px; overflow:hidden; background:#fff; max-height:78vh; overflow-y:auto; position:sticky; top:76px; }
@media (max-width:960px) { .cr-side { position:static; max-height:none; } }
.cr-side-head { padding:.8rem 1rem; font-weight:700; border-bottom:1px solid var(--d-line,#e5e9f0); display:flex; justify-content:space-between; gap:.5rem; flex-wrap:wrap; background:#f8fafc; }
.cr-sec summary { cursor:pointer; padding:.65rem 1rem; font-weight:700; font-size:.9rem; background:#fbfcfe; border-bottom:1px solid var(--d-line,#e5e9f0); list-style:none; display:flex; justify-content:space-between; gap:.5rem; }
.cr-sec summary::-webkit-details-marker { display:none; }
.cr-les { display:flex; align-items:center; gap:.6rem; width:100%; text-align:left; background:#fff; border:0; border-bottom:1px solid var(--d-line,#e5e9f0); padding:.6rem 1rem; cursor:pointer; font-family:inherit; font-size:.88rem; color:var(--d-ink,#0f1f2e); }
.cr-les:hover { background:#f4f8f8; }
.cr-les.on { background:var(--d-mint,rgba(79,70,229,.08)); font-weight:700; }
.cr-les.locked { color:#8896a6; }
.cr-ic { width:1.3rem; flex:none; text-align:center; font-size:.85rem; }
.cr-lt { flex:1; min-width:0; }
.cr-lt em { font-style:normal; font-size:.7rem; background:rgba(15,157,117,.12); color:#0f9d75; padding:1px 7px; border-radius:999px; margin-left:.3rem; font-weight:700; white-space:nowrap; }

/* locked-down player: YouTube's own UI is cropped away and click-blocked; only our own controls are usable */
.cr-video { position:relative; aspect-ratio:16/9; background:#05080d; border-radius:16px; overflow:hidden; box-shadow:0 18px 40px -18px rgba(8,20,32,.55), 0 0 0 1px rgba(255,255,255,.06); outline:none; user-select:none; -webkit-user-select:none; }
.cr-stage { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:100%; aspect-ratio:16/9; overflow:hidden; }
.cr-stage iframe, .cr-stage #crPlayer { position:absolute; left:0; width:100%; height:140%; top:-20%; border:0; pointer-events:none; }
.cr-shield { position:absolute; inset:0; z-index:2; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.cr-cover { position:absolute; inset:0; z-index:3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.7rem; padding:1rem 1rem 3.6rem; text-align:center; cursor:pointer; color:#fff;
  background:radial-gradient(120% 90% at 50% 0%, rgba(56,189,248,.22), transparent 60%), linear-gradient(160deg,#0b1f2a 0%,#0e2f3b 55%,#123a3a 100%); transition:opacity .25s; }
.cr-cover.hide { opacity:0; pointer-events:none; }
.cr-bigplay { position:relative; width:74px; height:74px; border-radius:50%; background:linear-gradient(135deg,#38bdf8,#0f9d8a); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 10px 30px rgba(15,157,138,.55); transition:transform .15s; }
.cr-bigplay svg { width:34px; height:34px; margin-left:4px; }
.cr-bigplay::after { content:""; position:absolute; inset:-9px; border-radius:50%; border:2px solid rgba(56,189,248,.45); animation:crPulse 2s ease-out infinite; }
.cr-cover:hover .cr-bigplay { transform:scale(1.08); }
@keyframes crPulse { 0% { transform:scale(.9); opacity:.9; } 100% { transform:scale(1.35); opacity:0; } }
.cr-covt { font-weight:700; font-size:1.05rem; line-height:1.45; max-width:86%; text-shadow:0 2px 10px rgba(0,0,0,.4); }
.cr-hint { font-size:.76rem; opacity:.6; }
.cr-toast { position:absolute; left:50%; top:14px; transform:translate(-50%,-8px); z-index:6; background:rgba(11,18,32,.92); color:#fff; font-size:.82rem; padding:.5rem .9rem; border-radius:999px; max-width:88%; text-align:center; opacity:0; pointer-events:none; transition:.25s; backdrop-filter:blur(6px); }
.cr-toast.on { opacity:1; transform:translate(-50%,0); }

/* double-click skip ripple */
.cr-rip { position:absolute; top:0; bottom:0; width:34%; z-index:4; display:flex; align-items:center; justify-content:center; pointer-events:none; opacity:0; color:#fff; background:rgba(255,255,255,.14); }
.cr-rip.left { left:0; border-radius:0 100% 100% 0 / 0 50% 50% 0; }
.cr-rip.right { right:0; border-radius:100% 0 0 100% / 50% 0 0 50%; }
.cr-rip span { display:flex; flex-direction:column; align-items:center; gap:.2rem; font-size:.8rem; }
.cr-rip svg { width:38px; height:38px; }
.cr-rip.go { animation:crRip .6s ease-out; }
@keyframes crRip { 0% { opacity:0; } 15% { opacity:1; } 100% { opacity:0; } }

/* control bar: glass strip over the bottom of the video, hides itself while playing */
.cr-ctl { position:absolute; left:0; right:0; bottom:0; z-index:5; padding:2.6rem .9rem .55rem; background:linear-gradient(to top, rgba(4,10,18,.88), rgba(4,10,18,.55) 55%, transparent); transition:opacity .25s, transform .25s; color:#fff; }
.cr-video.idle .cr-ctl { opacity:0; transform:translateY(8px); pointer-events:none; }
.cr-video.idle { cursor:none; }
.cr-ctl.off { opacity:.4; pointer-events:none; }
.cr-row { display:flex; align-items:center; gap:.2rem; margin-top:.15rem; }
.cr-gap { flex:1; }
.cr-ib { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:0; border-radius:12px; background:transparent; color:#fff; cursor:pointer; transition:background .15s, transform .1s; }
.cr-ib:hover { background:rgba(255,255,255,.16); }
.cr-ib:active { transform:scale(.92); }
.cr-ib svg { width:24px; height:24px; }
.cr-time { font-size:.8rem; font-variant-numeric:tabular-nums; opacity:.92; margin-left:.4rem; white-space:nowrap; }
.cr-pill { display:inline-flex; align-items:center; gap:.3rem; height:32px; padding:0 .7rem; margin-left:.35rem; border:1px solid rgba(255,255,255,.22); border-radius:999px; background:rgba(255,255,255,.1); color:#fff; font-weight:700; font-size:.78rem; line-height:1; font-family:inherit; cursor:pointer; backdrop-filter:blur(6px); transition:background .15s; }
.cr-pill:hover { background:rgba(255,255,255,.2); }
.cr-pill svg { width:15px; height:15px; }
.cr-menuwrap { position:relative; }
.cr-menu { position:absolute; right:0; bottom:calc(100% + 10px); min-width:150px; max-height:220px; overflow-y:auto; display:none; flex-direction:column; padding:.35rem; background:rgba(14,24,38,.96); border:1px solid rgba(255,255,255,.12); border-radius:14px; box-shadow:0 14px 34px rgba(0,0,0,.45); backdrop-filter:blur(10px); }
.cr-menu.open { display:flex; }
.cr-mi { background:transparent; border:0; color:#e8eef5; text-align:left; font-family:inherit; font-size:.84rem; padding:.5rem .7rem; border-radius:9px; cursor:pointer; white-space:nowrap; }
.cr-mi:hover { background:rgba(255,255,255,.1); }
.cr-mi.on { background:rgba(56,189,248,.18); color:#5eead4; font-weight:700; }
.cr-mi.on::before { content:"✓ "; }

/* seek bar */
.cr-seek { -webkit-appearance:none; appearance:none; display:block; width:100%; height:18px; margin:0; padding:0; background:transparent; cursor:pointer; }
.cr-seek::-webkit-slider-runnable-track { height:5px; border-radius:99px; background:linear-gradient(to right,#38bdf8 var(--p,0%), rgba(255,255,255,.28) var(--p,0%)); }
.cr-seek::-moz-range-track { height:5px; border-radius:99px; background:rgba(255,255,255,.28); }
.cr-seek::-moz-range-progress { height:5px; border-radius:99px; background:#38bdf8; }
.cr-seek::-webkit-slider-thumb { -webkit-appearance:none; width:14px; height:14px; margin-top:-4.5px; border-radius:50%; background:#fff; box-shadow:0 0 0 4px rgba(56,189,248,.35); transform:scale(0); transition:transform .12s; }
.cr-seek::-moz-range-thumb { width:14px; height:14px; border:0; border-radius:50%; background:#fff; box-shadow:0 0 0 4px rgba(56,189,248,.35); transform:scale(0); transition:transform .12s; }
.cr-seek:hover::-webkit-slider-thumb, .cr-seek:focus-visible::-webkit-slider-thumb { transform:scale(1); }
.cr-seek:hover::-moz-range-thumb, .cr-seek:focus-visible::-moz-range-thumb { transform:scale(1); }

/* fullscreen (real, or "fill the screen" on iPhone) */
.cr-video:fullscreen, .cr-video:-webkit-full-screen { width:100vw; height:100vh; aspect-ratio:auto; border-radius:0; background:#000; }
.cr-video:fullscreen .cr-stage, .cr-video:-webkit-full-screen .cr-stage, .cr-video.pfs .cr-stage { width:min(100vw, 177.78vh); }
.cr-video.pfs { position:fixed; inset:0; z-index:9999; width:100vw; height:100dvh; aspect-ratio:auto; border-radius:0; }
body.cr-pfs-on { overflow:hidden; }
@media (max-width:560px) { .cr-ib { width:36px; height:36px; } .cr-time { font-size:.72rem; margin-left:.1rem; } .cr-pill { padding:0 .55rem; margin-left:.2rem; } .cr-bigplay { width:60px; height:60px; } .cr-covt { font-size:.92rem; } }

/* nicer lesson header + actions */
.cr-ltitle { margin:1rem 0 .2rem; font-size:1.25rem; letter-spacing:-.01em; }
.cr-actions .btn { border-radius:12px; }
.cr-side { border-radius:16px; box-shadow:0 10px 28px -16px rgba(16,24,40,.35); }
.cr-les.on { box-shadow:inset 3px 0 0 #0f9d8a; }

/* --- player hardening: the site's global input/label rules (padding, white background, margin-bottom, radius) must not touch the player --- */
.cr-video { contain:paint; isolation:isolate; }
.cr-video input.cr-seek, .cr-video input.cr-seek:focus, .cr-video input.cr-seek:hover {
  -webkit-appearance:none; appearance:none; display:block; width:100%; height:18px; min-height:0; margin:0; padding:0; border:0; border-radius:0;
  background:transparent; box-shadow:none; outline:none; transition:none; flex:none;
}
.cr-video .cr-ctl { display:flex; flex-direction:column; padding-top:1.9rem; }
.cr-video .cr-row { flex:none; }
.cr-video button { margin:0; font-family:inherit; }
.cr-video .cr-pill { margin:0 0 0 .35rem; }
.cr-video .cr-time { margin:0 0 0 .4rem; }
.cr-video .cr-ctl, .cr-video .cr-row { max-width:100%; }

/* course header progress: the bar must keep its height inside the column layout */
.cr-prog.big .cr-bar { flex:none; width:100%; height:8px; }
.cr-prog.big { align-self:flex-end; }

/* narrow screens: everything must fit on one row (fullscreen button included) */
.cr-video .cr-row { min-width:0; }
.cr-video .cr-time { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.cr-video .cr-gap { flex:1 1 0; min-width:0; }
@media (max-width:560px) {
  .cr-video .cr-ib { width:32px; height:34px; }
  .cr-video .cr-ib svg { width:21px; height:21px; }
  .cr-video .cr-pill { height:30px; padding:0 .5rem; margin-left:.15rem; }
  .cr-video #crQLabel { display:none; }
  .cr-video .cr-time { font-size:.7rem; margin-left:.15rem; }
  .cr-video .cr-ctl { padding-left:.6rem; padding-right:.6rem; }
}
.cr-bigplay { margin-bottom:.9rem; }

/* =====================  DASHBOARD POLISH: inline exam actions + batch cards  ===================== */
/* exam card: title on the left, ALL actions in one row on the right (wraps under the title on narrow cards) */
.ex-card { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; }
.ex-card > div:first-child { flex: 1 1 260px; min-width: 0; }
.ex-side { flex: 0 1 auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; text-align: left; }
.ex-side .btn { white-space: nowrap; padding: .5rem 1.05rem; font-size: .88rem; }
.ex-note, .ex-review { flex: 1 1 100%; }
@media (max-width: 560px) { .ex-card > div:first-child { flex-basis: 100%; } .ex-side { width: 100%; justify-content: flex-start; } }

/* batches: one card each */
.bt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; margin-top: .9rem; }
.bt-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .8rem; background: #fff; border: 1px solid var(--hairline); border-radius: 16px;
  padding: 1.15rem 1.1rem 1.05rem; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 22px -12px rgba(30,41,59,.2); transition: transform .2s ease, box-shadow .2s ease; }
.bt-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,23,42,.05), 0 20px 34px -16px rgba(79,70,229,.35); }
.bt-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #4f46e5, #0ea5e9); }
.bt-card.st-none::before { background: linear-gradient(90deg, #4f46e5, #0ea5e9); }
.bt-card.st-pending::before { background: #f59e0b; }
.bt-card.st-rejected::before { background: #e5484d; }
.bt-card header { display: flex; gap: .8rem; align-items: center; }
.bt-av { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font: 800 1.2rem/1 var(--font-display); color: #4f46e5; background: rgba(79,70,229,.1); }
.bt-hd { min-width: 0; }
.bt-hd h4 { margin: 0 0 .3rem; font-size: 1.02rem; line-height: 1.3; word-break: break-word; }
.bt-meta { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .78rem; }
.bt-meta span { background: #f1f4f8; color: var(--text-secondary); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.bt-meta .bt-price { background: rgba(79,70,229,.1); color: #4f46e5; }
.bt-meta .bt-price.free { background: rgba(15,157,117,.12); color: #0f9d75; }
.bt-exams { display: flex; flex-direction: column; max-height: 216px; overflow-y: auto; border-top: 1px solid var(--hairline); padding-top: .4rem; }
.bt-ex { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .45rem 0 .45rem .95rem; border-bottom: 1px dashed var(--hairline); }
.bt-ex:last-child { border-bottom: 0; }
.bt-ex::before { content: ""; position: absolute; left: 0; top: .95rem; width: 6px; height: 6px; border-radius: 50%; background: #0ea5e9; }
.bt-ex-t { font-weight: 600; font-size: .9rem; word-break: break-word; }
.bt-ex-s { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: .8rem; }
.bt-none { margin: 0; font-size: .85rem; }
.bt-act { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bt-act .btn { flex: 1 1 auto; }
@media (max-width: 560px) { .bt-grid { grid-template-columns: 1fr; } }
/* phones: status text on its own line, the action buttons side by side */
@media (max-width: 640px) {
  .ex-side .omr-chip { flex: 0 0 100%; text-align: left; background: none; padding: 0; font-size: .8rem; }
  .ex-side .btn { flex: 1 1 calc(50% - .35rem); min-width: 0; padding: .55rem .5rem; font-size: .85rem; }
}
.bt-hint { margin: 0; font-size: .85rem; color: var(--muted); }

/* ---------- অ্যাফিলিয়েট ---------- */
.af-intro h4 { margin:.2rem 0 .6rem; }
.af-rules { margin:.2rem 0 1rem; padding-left:1.2rem; display:grid; gap:.35rem; font-size:.93rem; }
.af-link { padding:.9rem 1rem; border:1px solid var(--d-line,#e5e9f0); border-radius:14px; background:var(--d-soft,rgba(79,70,229,.06)); margin-bottom:1rem; }
.af-linkrow { display:flex; gap:.5rem; flex-wrap:wrap; margin:.35rem 0; }
.af-linkrow input { flex:1; min-width:200px; }
.af-stats { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:.7rem; margin-bottom:1rem; }
.af-stat { padding:.7rem .85rem; border:1px solid var(--d-line,#e5e9f0); border-radius:12px; display:grid; gap:.15rem; }
.af-stat span { font-size:.78rem; color:var(--muted,#64748b); }
.af-stat b { font-size:1.15rem; }
.af-stat.main { background:var(--accent,#4f46e5); color:#fff; border-color:transparent; }
.af-stat.main span { color:rgba(255,255,255,.85); }
.af-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1rem; margin:1rem 0; }
.af-card { padding:1rem; border:1px solid var(--d-line,#e5e9f0); border-radius:14px; }
.af-card h5, .af-h { margin:0 0 .6rem; font-size:1rem; }
.af-h { margin-top:1.2rem; }
.af-tw { overflow-x:auto; }
.af-table { width:100%; border-collapse:collapse; font-size:.9rem; }
.af-table th, .af-table td { text-align:left; padding:.5rem .55rem; border-top:1px solid var(--d-line,#e5e9f0); vertical-align:top; }
.af-table th { font-size:.78rem; color:var(--muted,#64748b); border-top:0; }
.af-terms { margin-top:1rem; }
.af-terms summary { cursor:pointer; font-weight:600; }

/* profile menu (top-right corner) */
.dash-tab-profile { display:none !important; }
.prof { position:relative; }
.prof-btn { display:flex; align-items:center; gap:.5rem; background:transparent; border:1px solid var(--border,#e5e9f0); border-radius:999px; padding:.25rem .7rem .25rem .3rem; cursor:pointer; color:inherit; font:inherit; }
.prof-btn:hover, .prof.open .prof-btn { background:rgba(79,70,229,.08); }
.prof-av { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,#0f3d3a,#4f46e5); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.9rem; }
.prof-name { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; font-size:.9rem; }
.prof-pop { position:absolute; right:0; top:calc(100% + 8px); min-width:240px; background:#fff; color:#1f2937; border:1px solid var(--border,#e5e9f0); border-radius:12px; box-shadow:0 12px 32px rgba(16,24,40,.16); padding:.4rem; z-index:60; display:none; }
.prof.open .prof-pop { display:block; }
.prof-head { padding:.6rem .7rem; border-bottom:1px solid #eef1f5; margin-bottom:.3rem; } .prof-head b { display:block; } .prof-head small { color:#6b7280; word-break:break-all; }
.prof-item { display:flex; align-items:center; gap:.6rem; width:100%; text-align:left; background:none; border:0; padding:.55rem .7rem; border-radius:8px; cursor:pointer; font:inherit; color:inherit; }
.prof-item:hover { background:#f3f6f9; } .prof-item.danger { color:#b91c1c; } .prof-item .ic { width:18px; height:18px; flex:none; }
.prof-sep { height:1px; background:#eef1f5; margin:.3rem 0; }
@media (max-width:900px) { .prof { display:none; } }
.acc-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:.9rem; }
.acc-head { display:flex; align-items:center; gap:1rem; margin-bottom:1rem; } .acc-av { width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg,#0f3d3a,#4f46e5); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.6rem; font-weight:700; }
.acc-sec { margin-top:1.4rem; padding-top:1.1rem; border-top:1px solid #eef1f5; }

/* MathJax output: keep long formulas inside their box (scroll sideways instead of breaking the layout) */
mjx-container { max-width: 100%; }
mjx-container[display="true"] { display: block; overflow-x: auto; overflow-y: hidden; margin: .6em 0 !important; }
mjx-container svg { vertical-align: middle; }

/* OMR exam timer chip (counts down after the student presses Start) */
.omr-timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.omr-timer.bad { background: #fde8e8; color: #b42318; }


/* ---------- Ranking window of one exam ---------- */
.exam-rank-card { width: min(100%, 520px); text-align: left; }
.exam-rank-card .ud-icon, .exam-rank-card .ud-title, .exam-rank-card .ud-sub { text-align: center; }
.exam-rank-list { max-height: min(55vh, 460px); overflow-y: auto; margin: .9rem 0 .4rem; padding-right: 2px; }
.exam-rank-list .rank-row { margin-bottom: 4px; padding: .6rem .8rem; }
.exam-rank-list .rank-sub { font-size: .75rem; font-weight: 500; }
.exam-rank-list .rank-gap { text-align: center; color: var(--muted); padding: .2rem 0; }
