:root {
  color-scheme: light;
  /* 2026-08-27 modernization: two-face type system (serif reads, sans operates)
     + script-aware line-heights. The webfonts are loaded from Google Fonts in
     each page head; before this, "Noto Sans Bengali" was named but never
     loaded, so desktop fell back to system Bangla. */
  --font-body: "Hind Siliguri", "Noto Sans Bengali", "Segoe UI", "Inter", system-ui, sans-serif;
  --font-display: "Noto Serif Bengali", Georgia, serif;
  --lh-bn: 1.75;
  --lh-en: 1.6;
  --shadow-lift: 0 10px 28px rgba(74, 38, 17, 0.12);
  --bg: #faf6ed;
  --card: #ffffff;
  --border: #e8dfc9;
  --text: #2a1810;
  --muted: #6b5a48;
  --accent: #5c2f10;
  --accent-light: #8a4d24;
  --accent-deep: #3d1d08;
  --accent-gold: #b08550;
  --accent-gold-soft: #e8d5b0;
  --neutral-soft: #f3ecdc;
  --neutral-strong: #2a1810;
  --good: #2d6a4f;
  --bad: #9d2235;
  --warn: #b07c00;
  --shadow: 0 2px 6px rgba(74, 38, 17, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
h1, h2, h3 { margin: 0 0 0.6rem; }
h1 { font-size: 1.25rem; }
h2 { font-size: 1.15rem; font-family: var(--font-display); font-weight: 700; }
h3 { font-size: 1rem; margin-top: 1rem; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.2rem;
  background: var(--bg);
  color: var(--accent);
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--border);
}
.topbar h1 {
  color: var(--accent);
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
}
.brand-topbar-logo {
  display: block;
  height: 76px;
  width: auto;
}
.topbar-meta { font-size: 0.85rem; color: var(--accent); }

.lang-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-light);
  padding: 0.2rem 0.55rem;
  margin-left: 0.3rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 3px;
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.screen { display: none; padding: 1.2rem; max-width: 960px; margin: 0 auto; }
.screen.active { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.muted { color: var(--muted); font-size: 0.9rem; }

/* Setup screen */
.mode-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.7rem;
}
.mode-card { cursor: pointer; display: flex; }
.mode-card input[type=radio] { display: none; }
.mode-card-body {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  transition: all 0.15s;
  flex: 1;
}
.mode-card input[type=radio]:checked + .mode-card-body {
  border-color: var(--accent);
  background: #fdf7ee;
}
.mode-title { font-weight: 600; margin-bottom: 0.2rem; }
.mode-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
/* Mark the Super Practice tiles as a distinct group with a gold left accent
   only — NOT the border+fill of the selected state, so an unpicked Super tile
   never reads as "selected." The checked rule below still wins when picked. */
.mode-card-super .mode-card-body { border-left: 4px solid var(--accent-gold); }

.filter-row { display: flex; gap: 1rem; flex-wrap: wrap; }
fieldset {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.6rem 0.9rem;
  margin: 0 0 0.7rem;
  flex: 1;
  min-width: 200px;
}
fieldset.full-width { flex-basis: 100%; }
legend { font-size: 0.85rem; color: var(--muted); padding: 0 0.4rem; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.3rem 0.7rem;
  font-size: 0.9rem;
}
.checkbox-grid label { cursor: pointer; }

.filter-stats {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#match-count { font-weight: 600; }
.match-breakdown { font-size: 0.85rem; color: var(--muted); }

.opt-row {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center;
}
.opt-row label { font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.opt-row select { padding: 0.25rem 0.4rem; }

/* Merged Filter + Session card: a subtle divider separates the two halves,
   and the Start button sits inline at the right of the count/order pickers
   so it stays visible without scrolling. */
#setup-controls #session-card {
  margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border);
}
.session-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; flex-wrap: wrap;
}
.session-actions .opt-row { flex: 1; }
.session-actions .primary-btn { white-space: nowrap; }

button {
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.primary-btn:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 38, 17, 0.18);
}
.primary-btn:disabled { background: #aaa; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.secondary-btn:hover { background: #fdf7ee; transform: translateY(-1px); }
.link-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  padding: 0;
}

/* Quiz screen */
.quiz-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); }
.timer.warn { color: var(--warn); }
.timer.danger { color: var(--bad); }

.question-card { padding: 1.4rem 1.5rem; }

.q-stem {
  font-size: 1.1rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.6;
}
.q-stem.bn { font-weight: 500; }
.q-stem.en { color: var(--muted); font-size: 1rem; font-style: italic; border-left: 3px solid var(--border); padding-left: 0.7rem; }

.q-options { list-style: none; padding: 0; margin: 0 0 1rem; }
.q-options li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.55rem;
  cursor: pointer;
  transition: all 0.1s;
}
.q-options li:hover { background: #fdf7ee; }
.q-options li.selected { border-color: var(--accent); background: #fdf7ee; }
.q-options li.correct { border-color: var(--good); background: #e7f3eb; }
.q-options li.wrong { border-color: var(--bad); background: #fbe7eb; }
.q-options li.disabled { cursor: default; opacity: 0.85; }
.q-options li.disabled:hover { background: transparent; }
.q-options li.disabled.correct:hover { background: #e7f3eb; }
.q-options li.disabled.wrong:hover { background: #fbe7eb; }

.opt-key {
  font-weight: 700;
  color: var(--accent);
  min-width: 1.4rem;
}
.opt-text { flex: 1; }
.opt-text .en { color: var(--muted); font-size: 0.9rem; font-style: italic; display: block; margin-top: 0.2rem; }

.q-feedback {
  margin: 0.8rem 0;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 0.92rem;
  display: none;
}
.q-feedback.show { display: block; }
.q-feedback.good { background: #e7f3eb; border-left: 4px solid var(--good); }
.q-feedback.bad  { background: #fbe7eb; border-left: 4px solid var(--bad); }
.q-feedback .meta-line { color: var(--muted); margin-top: 0.3rem; font-size: 0.85rem; }

.q-feedback .explanation {
  margin: 0.55rem 0 0.3rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.95rem;
  line-height: 1.5;
}
.q-feedback .explanation .bn { font-weight: 500; }
.q-feedback .explanation .en {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}
.q-feedback .tip {
  margin: 0.4rem 0;
  padding: 0.35rem 0.6rem;
  background: #f3edff;
  border-left: 3px solid #6c3a8c;
  font-size: 0.88rem;
  border-radius: 2px;
}
.q-feedback .tip .en { color: var(--muted); font-style: italic; font-size: 0.85rem; }
.tip-label { font-weight: 700; color: #6c3a8c; }

/* Results-list expandable explanation */
.result-explanation {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  padding-left: 0.2rem;
  border-left: 2px solid var(--border);
}
.result-explanation summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.8rem;
  user-select: none;
}
.result-explanation summary:hover { text-decoration: underline; }
.result-explanation > div { margin: 0.3rem 0 0.3rem 0.5rem; }
.result-explanation .tip { background: #f3edff; padding: 0.25rem 0.5rem; border-left: 2px solid #6c3a8c; border-radius: 2px; }

.q-actions {
  display: flex; justify-content: space-between; gap: 0.5rem;
  border-top: 1px solid var(--border); padding-top: 0.9rem; margin-top: 0.5rem;
}

/* Results screen */
.score-block {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; padding: 1rem; background: #fdf7ee; border-radius: 5px;
}
.score-main { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.score-main #score-raw { font-size: 1rem; font-weight: 400; color: var(--muted); margin-left: 0.5rem; }
.verdict { font-size: 1.1rem; font-weight: 600; }
.verdict.pass { color: var(--good); }
.verdict.fail { color: var(--bad); }

.by-law-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem; margin: 0.5rem 0;
}
.by-law-grid > div {
  border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem 0.7rem;
}
.by-law-grid .law { font-size: 0.85rem; color: var(--muted); }
.by-law-grid .score { font-size: 1.1rem; font-weight: 600; }

.results-list { max-height: 480px; overflow-y: auto; border: 1px solid var(--border); border-radius: 5px; padding: 0.5rem 0; }
.result-row {
  padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border);
  display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer;
}
.result-row:hover { background: #fdf7ee; }
.result-row:last-child { border-bottom: none; }
.result-mark { width: 1.5rem; font-weight: 700; }
.result-mark.good { color: var(--good); }
.result-mark.bad { color: var(--bad); }
.result-mark.skip { color: var(--muted); }
.result-text { flex: 1; }
.result-text .meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

.results-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* Demo results "What next?" card (DEMO_NEXT_STEP in app.js): same cream +
   gold-edge look as the setup-screen upgrade promo. No display rule on the
   section itself so the [hidden] attribute keeps working. */
.demo-next {
  background: var(--neutral-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-gold);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
}
.demo-next-h { color: var(--accent-deep); margin: 0 0 0.6rem; font-size: 1.1rem; }
.demo-next-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; flex-wrap: wrap;
  padding: 0.6rem 0; border-top: 1px solid var(--border);
}
.demo-next-row p { flex: 1 1 18rem; margin: 0; font-size: 0.92rem; }
.demo-next-btn { display: inline-block; text-decoration: none; white-space: nowrap; }

/* Browse screen */
.browse-controls {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.7rem; align-items: center;
}
.browse-controls input, .browse-controls select {
  padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 4px; font-size: 0.9rem;
}
.browse-controls input { flex: 1; min-width: 200px; }
.browse-results { max-height: 600px; overflow-y: auto; border: 1px solid var(--border); border-radius: 5px; }
.browse-row {
  padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border);
}
.browse-row:last-child { border-bottom: none; }
.browse-row .stem { margin: 0.2rem 0; }
.browse-row .meta { font-size: 0.8rem; color: var(--muted); }
.browse-row .answer { font-size: 0.85rem; color: var(--good); margin-top: 0.2rem; }

/* Language toggling */
.lang-bn-only .en, .lang-bn-only .q-stem.en { display: none !important; }
.lang-en-only .bn, .lang-en-only .q-stem.bn { display: none !important; }

/* Option-letter labels: Bangla (ক/খ/গ/ঘ) is canonical because Bar Council
   papers use Bangla letters. English-only mode swaps to A/B/C/D; Both mode
   defaults to Bangla because two synonymous letters side-by-side ("ক) A)")
   adds no information. Underlying option.key / question.answer stay A-E. */
.letter-en { display: none; }
body.lang-en-only .letter-bn { display: none; }
body.lang-en-only .letter-en { display: inline; }

/* In English-only mode, English is the primary text — drop the
   secondary-translation styling (muted gray, italic, smaller, border). */
.lang-en-only .q-stem.en {
  color: inherit;
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 500;
  border-left: none;
  padding-left: 0;
}
.lang-en-only .opt-text .en,
.lang-en-only .q-feedback .explanation .en,
.lang-en-only .q-feedback .tip .en {
  color: inherit;
  font-style: normal;
  font-size: inherit;
  margin-top: 0;
}

.source-badge.generated {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #8a5a00;
  background: #fdf3dc;
  border-left: 3px solid #d39a18;
  border-radius: 2px;
  font-weight: 600;
}
/* display:inline-block above outranks the UA [hidden] rule, so the hidden badge
   would otherwise render as an empty amber pill on non-generated questions. */
.source-badge.generated[hidden] { display: none; }

fieldset.disabled {
  opacity: 0.45;
}
fieldset.disabled legend {
  color: var(--muted);
}

/* ---- Auth: header user info ---- */
.topbar-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.user-info { font-size: 0.85rem; color: var(--accent-deep); }
.user-info .user-name  { font-weight: 600; }
.user-info .user-phone { opacity: 0.85; }
.user-info .muted      { color: var(--muted); }
.user-info .link-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-light);
  padding: 0.15rem 0.5rem;
  margin-left: 0.25rem;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 3px;
  text-decoration: none;
}
.user-info .link-btn:hover { background: var(--neutral-soft); }

/* ---- Auth screen ---- */
.auth-card { max-width: 420px; margin: 2rem auto 0; }
.auth-form { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.auth-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-form input[type=email],
.auth-form input[type=password] {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}
.auth-form input:focus { outline: 2px solid var(--accent-light); outline-offset: 1px; }
.auth-form .primary-btn { margin-top: 0.3rem; }
.auth-divider {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--muted); font-size: 0.8rem;
  margin: 1rem 0 0.6rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.auth-foot { margin-top: 1rem; font-size: 0.82rem; }
.auth-error {
  background: #fdecea;
  color: #9d2235;
  border-left: 3px solid #9d2235;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  border-radius: 3px;
  margin-top: 0.6rem;
}

/* ---- Signup form (pricing step 2) + status card (step 3) ---- */
/* .auth-form's display:grid / .signup-status's display:flex would override
   the UA's [hidden]{display:none} — restate it at higher specificity so the
   JS hidden-toggles actually hide. */
.signup-form[hidden], .signup-status[hidden] { display: none !important; }
.signup-form { margin-top: 0.7rem; max-width: 460px; gap: 0.55rem; }
.signup-form input[type=text],
.signup-form input[type=tel],
.signup-form input[type=email],
.signup-form input[type=password] {
  font: inherit;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}
/* "Which prep" + "Paid with" side by side where they fit */
.signup-choice-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.55rem;
}
.signup-choice {
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 0;
  min-inline-size: 0;
  padding: 0.45rem 0.7rem 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.signup-choice legend {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 0.3rem;
}
/* .signup-choice prefix outranks .auth-form label's display:grid, which would
   otherwise stack the radio circle above its text */
.signup-choice .signup-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.signup-file { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.signup-file-btn {
  display: inline-block;
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent-light);
  border-radius: 4px;
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.signup-file-btn:hover { background: var(--neutral-soft); }
.signup-file-name { font-size: 0.82rem; color: var(--muted); word-break: break-all; }
.signup-hint { margin: -0.2rem 0 0; font-size: 0.8rem; }
.signup-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-sending { opacity: 0.6; pointer-events: none; }
.signup-wa-fallback { margin-top: 0.5rem; font-size: 0.83rem; }
.plan-choose-btn { margin-top: 0.6rem; width: 100%; }

.signup-status {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
}
.signup-status--pending  { border-left: 4px solid #d39a18; background: #fdf7e8; }
.signup-status--approved { border-left: 4px solid #2f7d4f; background: #eef7f0; }
.signup-status--declined { border-left: 4px solid #9d2235; background: #fdf0ee; }
.signup-status p { margin: 0.35rem 0 0.6rem; font-size: 0.86rem; }
.signup-status .primary-btn { display: inline-block; text-decoration: none; }
.signup-status-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.signup-again-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.86rem;
  color: var(--accent);
  cursor: pointer;
}
.signup-again-btn:hover { background: var(--neutral-soft); }
.signup-spinner {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  flex: none;
  border: 2px solid #e5d9b8;
  border-top-color: #d39a18;
  border-radius: 50%;
  animation: signup-spin 0.9s linear infinite;
}
@keyframes signup-spin { to { transform: rotate(360deg); } }

/* ---- Demo-mode gating ---- */
.lock-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #efece2;
  border: 1px solid var(--border);
  border-radius: 999px;
  vertical-align: middle;
}
.demo-only-note {
  margin-top: 0.8rem;
  padding: 0.55rem 0.75rem;
  background: #fdf3dc;
  border-left: 3px solid #d39a18;
  color: #6b4a00;
  font-size: 0.85rem;
  border-radius: 3px;
}
body:not(.demo-mode) .demo-only-note { display: none; }
body.demo-mode .demo-locked { display: none !important; }
body:not(.demo-mode) .lock-tag { display: none; }

/* ---- Demo / paid mode visibility (generic wrappers) ----
   The language-toggle rules at the bottom of this file use
   `body.lang-en-only #setup-screen .en` (specificity 1,2,1) with
   !important — so when a span carries both .en and .paid-only, the
   later language rule wins the cascade tie unless we boost specificity.
   We double the class (.paid-only.paid-only) which raises specificity
   to (1,3,1) and unambiguously wins. */
body:not(.demo-mode) .demo-only.demo-only,
body:not(.demo-mode) #setup-screen .demo-only.demo-only { display: none !important; }
body.demo-mode .paid-only.paid-only,
body.demo-mode #setup-screen .paid-only.paid-only { display: none !important; }

/* Demo: only Practice + Mock are visible (everything else is demo-locked),
   so a clean 2-up grid reads better than letting auto-fit stretch them. */
body.demo-mode .mode-row { grid-template-columns: repeat(2, 1fr); }

/* Demo: hide specific fieldsets inside the filter card (Year + Source). */
body.demo-mode .demo-hide { display: none !important; }

/* Demo Mock: hide the per-session count picker (always 25), show a
   compact "25 questions · 15 minutes" reminder above the row. */
.demo-mock-fixed { display: none; }
body.demo-mode.demo-mock-mode .demo-mock-fixed {
  display: block;
  padding: 0.5rem 0.75rem;
  background: #fdf3dc;
  border-left: 3px solid #d39a18;
  color: #6b4a00;
  font-size: 0.9rem;
  border-radius: 3px;
  margin: 0 0 0.8rem;
}
body.demo-mode.demo-mock-mode .num-questions-row { display: none !important; }

/* Demo banner (mode-picker card) — informational. The CTA lives in the
   upgrade-promo card below, so the banner is just text + a subtle inline
   text-link rather than a competing green button. */
.demo-banner {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.demo-banner-text { flex: 1; min-width: 240px; }
.upgrade-cta-inline {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  line-height: 1.45;
}
.upgrade-cta-inline:hover { color: var(--accent-light); }

/* Demo: the whole filter card collapses behind one toggle line — a first-time
   visitor should meet "pick a mode, start", not a wall of checkboxes. The
   toggle is demo-only; paid users keep the always-open filter card. */
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0.1rem 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-deep);
  cursor: pointer;
  text-align: left;
}
.filter-chev { display: inline-block; transition: transform 0.15s; color: var(--accent-gold); }
body.demo-mode #filter-card.demo-collapsed > :not(.filter-toggle) { display: none; }
body.demo-mode #filter-card > h2 { display: none; }
body.demo-mode #filter-card:not(.demo-collapsed) .filter-chev { transform: rotate(180deg); }
body.demo-mode #filter-card:not(.demo-collapsed) .filter-toggle { margin-bottom: 0.5rem; }

/* Upgrade promo card (demo-only): brand-aligned cream + gold-accent border,
   2-col feature list with white inner cards. Green CTA at the bottom is the
   only "loud" element, matching the landing-page Buy button. Goal: looks
   like a feature card on the brand site, not a pop-up ad. */
.upgrade-promo {
  background: var(--neutral-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-gold);
}
/* The feature list collapses behind the heading; the price + Buy CTA below
   stay visible, so the card is 3 compact lines until the visitor asks for
   detail. */
.upgrade-promo-h {
  color: var(--accent-deep);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.upgrade-promo-h::-webkit-details-marker { display: none; }
.upgrade-details[open] .upgrade-promo-h { margin-bottom: 0.9rem; }
.upgrade-details[open] .filter-chev { transform: rotate(180deg); }
.upgrade-details { margin-bottom: 0.9rem; }
.upgrade-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.upgrade-feature-list li {
  display: flex;
  gap: 0.55rem;
  background: #fff;
  padding: 0.6rem 0.75rem;
  border-radius: 5px;
  align-items: flex-start;
  border: 1px solid var(--border);
}
.upgrade-icon {
  font-size: 1.1rem;
  line-height: 1.3;
  flex-shrink: 0;
  color: var(--accent-gold);
}
.upgrade-feat-text { flex: 1; }
.upgrade-feat-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--accent-deep);
  margin-bottom: 0.1rem;
  line-height: 1.3;
}
.upgrade-feat-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.upgrade-cta-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.upgrade-price-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  color: var(--accent-deep);
}
.upgrade-price-currency { font-size: 1.2rem; font-weight: 600; }
.upgrade-price-amount {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -0.01em;
}
.upgrade-price-sub { font-size: 0.9rem; color: var(--muted); margin-left: 0.4rem; }
.upgrade-cta-main {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  margin-left: auto;
}
.upgrade-cta-main:hover { background: #15803d; }
.upgrade-cta-foot {
  width: 100%;
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.upgrade-cta-foot a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}
.upgrade-cta-foot a:hover { color: var(--accent-light); }

@media (max-width: 600px) {
  .upgrade-feature-list { grid-template-columns: 1fr; }
  .demo-banner { flex-direction: column; align-items: stretch; }
  .upgrade-cta-inline { text-align: center; }
}

@media (max-width: 720px) {
  .topbar h1 { font-size: 1.05rem; }
  .brand-topbar-logo { height: 52px; }
  .q-stem { font-size: 1rem; }
  .topbar { flex-wrap: wrap; gap: 0.4rem; }
  .topbar-meta { width: 100%; justify-content: flex-start; }

  /* Tighten the quiz screen on mobile so the Previous/Submit row
     isn't followed by a chunk of empty space before the footer. */
  #quiz-screen { padding: 0.9rem 1rem 0.6rem; }
  #quiz-screen .question-card { padding: 1.1rem 1.1rem 0.95rem; margin-bottom: 0.5rem; }
  #quiz-screen .q-actions { padding-top: 0.75rem; margin-top: 0.35rem; }
}


/* ============ LANDING PAGE (marketing on auth-screen) ============ */

/* Language toggle for landing — intentionally single-language.
   Default (Bangla & Both modes): show .bn, hide .en.
   English-only mode: hide .bn, show .en.
   "Both" mode on landing is treated the same as Bangla (no side-by-side).
   Note: !important is used because the existing .lang-bn-only/.lang-en-only
   rules elsewhere set !important on .bn/.en too. */
.landing .en { display: none !important; }
.landing .bn { display: inline; }
body.lang-en-only .landing .bn { display: none !important; }
body.lang-en-only .landing .en { display: inline !important; }

/* Same treatment for setup-screen chrome (mode picker, filter fieldset,
   session options). Stacking both languages inline on small UI elements —
   headings, buttons, filter labels — produces unreadable runs like
   "Choose your sessionআপনার সেশন বেছে নিন". In Both mode, default to
   Bangla; question content inside sessions still shows side-by-side via
   the .q-stem / .opt-text rules above. */
#setup-screen .en { display: none !important; }
#setup-screen .bn { display: inline; }
body.lang-en-only #setup-screen .bn { display: none !important; }
body.lang-en-only #setup-screen .en { display: inline !important; }



/* Landing-screen wrapper overrides the default .screen 960px cap so the
   marketing cards can breathe on desktop. Inner cards still cap their own
   width below; very wide screens leave equal side margins. */
.screen.landing { max-width: 1200px; }

.landing-hero,
.landing-pricing,
.landing-founder,
.landing-foot {
  max-width: 1100px;
  margin: 1rem auto;
}
/* Landing surface polish: one radius scale (section 16 > inner card 12 >
   box 8 > pill 999) and one warm shadow family, so the page reads as a
   single system instead of mixed chrome. Scoped to the landing screen. */
.screen.landing .card {
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(92, 47, 16, 0.05);
  padding: 1.4rem 1.6rem;
}
@media (max-width: 600px) {
  .screen.landing .card { padding: 1.1rem 1.2rem; }
}
.landing-pricing { scroll-margin-top: 100px; }
/* Hero text gets a narrower readable column inside the wider card so
   line lengths stay comfortable to read. */
.landing-hero .landing-h,
.landing-hero .landing-sub,
.landing-hero .landing-sub-en {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ EXAM HUB (post-login landing) ============
   Two equal track cards (MCQ Preliminary · Written). Like the setup screen,
   default hub chrome to Bangla in "Both" mode so labels don't stack into
   unreadable bilingual runs. */
#hub-screen .en { display: none !important; }
#hub-screen .bn { display: inline; }
body.lang-en-only #hub-screen .bn { display: none !important; }
body.lang-en-only #hub-screen .en { display: inline !important; }

.hub-hero { text-align: center; padding: 0.6rem 0 0.2rem; }
.hub-eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-gold); margin: 0; }
.hub-title { font-family: var(--font-display); font-weight: 800; font-size: 1.95rem; line-height: 1.25; color: var(--accent); margin: 0.3rem 0 0.4rem; }
.hub-sub { color: var(--muted); margin: 0 auto 1.5rem; max-width: 580px; }

.hub-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: stretch; }
@media (max-width: 680px) { .hub-tracks { grid-template-columns: 1fr; } }

.hub-track {
  display: flex; flex-direction: column; text-align: left; text-decoration: none;
  color: inherit; font: inherit; cursor: pointer; width: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.hub-track:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(92,47,16,0.15); border-color: var(--accent); }
.hub-track--written { background: linear-gradient(150deg, #ffffff 55%, #faf2e6); }
.hub-track-icon { font-size: 2.1rem; line-height: 1; }
.hub-track h3 { color: var(--accent); margin: 0.6rem 0 0.15rem; font-size: 1.2rem; }
.hub-stage { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--accent-gold-soft); color: var(--accent-deep); padding: 0.12rem 0.5rem; border-radius: 6px; }
.hub-track-meta { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 0.85rem; }
.hub-feats { list-style: none; padding: 0; margin: 0 0 1.2rem; flex: 1; }
.hub-feats li { font-size: 0.86rem; padding: 0.18rem 0 0.18rem 1.35rem; position: relative; }
.hub-feats li::before { content: "✓"; color: var(--accent-gold); font-weight: 700; position: absolute; left: 0; }
.hub-cta { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; color: #fff; background: var(--accent); padding: 0.55rem 1rem; border-radius: 9px; align-self: flex-start; }
.hub-track:hover .hub-cta { background: var(--accent-light); }

/* slim "back to hub" subnav at the top of the MCQ setup screen */
.screen-subnav { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.screen-subnav-title { font-weight: 700; color: var(--accent); }
.hub-back { background: none; border: 1px solid var(--accent-light); color: var(--accent); cursor: pointer; font: inherit; padding: 0.3rem 0.7rem; border-radius: 7px; }
.hub-back:hover { background: var(--accent); color: #fff; }

.landing-hero {
  text-align: center;
  /* warm surface: faint gold aura from the top + cream wash toward the foot,
     so the hero isn't a flat white sheet */
  background:
    radial-gradient(ellipse 65% 55% at 50% 0%, rgba(176, 133, 80, 0.10), transparent 70%),
    linear-gradient(165deg, #fffdf7 55%, #faf2e6);
}
.landing-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-gold, #b08550);
  margin: 0 0 0.5rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.landing-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.35rem;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin: 0 0 0.6rem;
  color: var(--accent-deep);
}
.landing-sub {
  font-size: 1.16rem;
  line-height: var(--lh-bn);
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.landing-sub-en {
  font-size: 0.88rem;
  color: #8a7560;
  margin: 0 0 1.2rem;
  font-style: italic;
}
.landing-h-small {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  margin: 0 0 0.5rem;
  color: var(--accent-deep);
}
/* The one ownable device: a short gold rule opening every landing section. */
.landing-h-small::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-gold);
  margin-bottom: 0.6rem;
}
/* Centered contexts keep the bar centered. */
.landing-final-cta .landing-h-small::before,
.landing-pullquote .landing-h-small::before { margin-left: auto; margin-right: auto; }

/* Stat band: proof-in-numbers with gold-gradient numerals — the hero's visual
   beat between the story and the CTA. The feature breakdown lives in the
   pricing cards; this is deliberately numbers-only. */
.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  margin: 1.4rem auto 0.2rem;
  text-align: center;
}
.landing-stat {
  padding: 0.2rem 1.7rem;
  border-left: 1px solid var(--border);
}
.landing-stat:first-child { border-left: 0; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep);
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #8a7560;
  margin-top: 0.05rem;
}

.landing-cta-row { text-align: center; margin-top: 1.2rem; }
.landing-cta {
  font-size: 1.05rem;
  padding: 0.85rem 1.5rem;
}
.landing-cta-sub {
  font-size: 0.85rem;
  color: #8a7560;
  margin: 0.5rem 0 0;
}

.landing-feat {
  padding-left: 1.2rem;
  margin: 0.6rem 0 1rem;
}
.landing-feat li { margin: 0.35rem 0; }

.landing-pay {
  background: var(--neutral-soft);
  padding: 0.95rem 1rem;
  border-radius: 6px;
  margin-top: 0.8rem;
  border-left: 3px solid var(--accent-gold);
}
.landing-pay h4 { margin: 0 0 0.45rem; font-size: 1rem; }
.landing-pay p { margin: 0.25rem 0; }
.payment-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  background: #fff;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #d4c5a7;
}

.founder-quote {
  font-style: italic;
  color: #4a3422;
  border-left: 3px solid #d4c5a7;
  padding-left: 0.8rem;
  margin: 0.6rem 0 0;
}

.landing-foot {
  text-align: center;
  font-size: 0.9rem;
  color: #8a7560;
}
.landing-foot p { margin: 0.4rem 0; }
.landing-foot a { color: var(--accent-gold); }

@media (max-width: 640px) {
  .landing-stats { grid-template-columns: 1fr 1fr; row-gap: 0.8rem; }
  .landing-stat:nth-child(3) { border-left: 0; }
  .landing-stat { padding: 0.1rem 0.8rem; }
  .landing-stat:nth-child(3) { border-left: 0; }
  .landing-h { font-size: 1.8rem; }
}


/* ---------- Feature showcase (screenshots) ---------- */
.landing-features { max-width: 1100px; margin: 1rem auto; }
.landing-feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.feat-card {
  background: #faf6ec;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
/* Wide feature card spans the full row — used for the bilingual showcase
   at the top of the feature grid since it's the lead differentiator. */
.feat-card-wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fcd34d;
}
.feat-thumb-tall { height: 240px; }
.feat-thumb {
  background: #ffffff;
  border-radius: 6px;
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
  display: block;
  overflow: hidden;
  line-height: 0;
}
.feat-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
/* Language-paired media: the app screenshots/clips exist as a Bangla and an
   English capture (shoot_written.mjs / shoot_mcq.mjs shoot both). Bangla and
   Both modes show the Bangla capture — Bangla is the canonical exam language;
   English-only mode swaps in the English one. Hidden variants have no layout,
   so the lazy-clip observer never loads a webm the visitor can't see. */
.media-en { display: none !important; }
body.lang-en-only .media-en { display: block !important; }
body.lang-en-only .media-bn { display: none !important; }
.feat-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.feat-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #6b5037;
  line-height: 1.4;
}

/* ---------- Testimonials ---------- */
.landing-testimonials { max-width: 1100px; margin: 1rem auto; }
.testimonial {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-gold);
  padding: 1rem 1.15rem 0.85rem;
  margin: 0.75rem 0;
  background: #fffdf7;
  border-radius: 10px;
}
/* Serif quote, upright: many Bangla faces have no true italic, so browsers
   fake-slant conjuncts — weight and the serif voice carry the emphasis. */
.testimonial-text {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--accent-deep);
}
.testimonial-cite {
  display: block;
  font-size: 0.85rem;
  color: #8a7560;
  font-style: normal;
}
.testimonial-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}
/* Single short testimonial card near the top of the landing */
.landing-pullquote .testimonial { margin: 0; }
.landing-pullquote .testimonial-text { font-size: 1.05rem; }

/* Refer-a-friend card on the exam hub */
.refer-card { max-width: 720px; margin: 1.2rem auto 0; }
.refer-card .refer-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.refer-wa-btn { font-size: 0.9rem; }

/* 3-step product journey strip (browse -> cited section -> feedback) */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 0.8rem;
}
.journey-step { margin: 0; }
.journey-step img {
  width: 100%;
  display: block;
  border: 1px solid #e6dcc4;
  border-radius: 8px;
}
.journey-step figcaption {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--accent-deep);
}
@media (max-width: 760px) {
  .journey-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .landing-feat-grid { grid-template-columns: 1fr; }
  .feat-thumb { height: 120px; }
}


/* ---------- Wide showcase (full setup screen preview) ---------- */
.landing-showcase { max-width: 1100px; margin: 1rem auto; }
.showcase-thumb {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 0.75rem;
  overflow: hidden;
  line-height: 0;
}
.showcase-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Bonus offers block inside pricing card */
.landing-bonus {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 1rem 0 0.5rem;
}
.landing-bonus h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.landing-bonus .landing-feat { margin: 0; }


/* ============ LANDING v2 — restructured pricing/CTA/FAQ ============ */

/* Double CTA in the hero — buy on the left, demo on the right. */
.landing-cta-double {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.2rem 0 0.5rem;
}
.landing-cta-double .landing-cta { min-width: 220px; }
/* Primary buy CTA — same gold-ring + chocolate language as the featured plan
   card, so the hero and the pricing section read as one system. */
.landing-cta-buy {
  border: 2px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  color: #fff;
  background:
    linear-gradient(135deg, #7a4a1f, var(--accent) 55%, #6b3a14) padding-box,
    linear-gradient(135deg, #d9b478, var(--accent-gold) 40%, #f0e2c4 65%, var(--accent-gold)) border-box;
  box-shadow: 0 6px 20px rgba(92, 47, 16, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.landing-cta-buy:hover {
  color: #fff;
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(92, 47, 16, 0.34);
}
/* Secondary landing CTAs (hero row + section demo links): quiet soft pills
   of equal weight, clearly subordinate to the buy CTA. */
.landing .secondary-btn.landing-cta {
  border-radius: 999px;
  border: 1px solid #d4c5a7;
  background: #fffdf7;
  color: var(--accent);
  font-size: 0.95rem;
  padding: 0.6rem 1.3rem;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.landing .secondary-btn.landing-cta:hover {
  border-color: var(--accent-gold);
  background: #faf2e6;
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .landing-cta-buy:hover, .landing .secondary-btn.landing-cta:hover { transform: none; }
}

/* Founder credential strip — a compact dark ribbon (not a full-width slab)
   with a gold rim, anchoring the hero without weighing it down. */
.founder-strip {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent) 70%, #6b3a14);
  color: #f0e2c4;
  border: 1px solid rgba(176, 133, 80, 0.55);
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-top: 1.3rem;
  text-align: center;
}

/* Launch banner inside pricing card. */
.pricing-launch-banner {
  background: linear-gradient(90deg, #dc2626 0%, #ea580c 100%);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin: -0.25rem 0 1.2rem;
}

/* Huge price block. */
.pricing-price-block { text-align: center; margin-bottom: 1.5rem; }
.pricing-price {
  /* inherit, not monospace: the mono stack has no Bengali glyphs, so ৳৬৪৯
     fell back per-glyph with ragged gaps between digits */
  font-family: inherit;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-variant-numeric: tabular-nums;
}
.price-currency { font-size: 2.2rem; }
.price-amount { font-size: 4.5rem; letter-spacing: -0.02em; }
.price-sub {
  margin: 0.5rem 0 0.3rem;
  font-size: 1.05rem;
  color: #4a3422;
}
.price-note { margin: 0; font-size: 0.85rem; }

/* 3-step buying flow. */
.pricing-steps-heading {
  margin: 0.8rem 0 0.6rem;
  text-align: center;
  font-size: 1.05rem;
  scroll-margin-top: 100px; /* sticky topbar — CTA jumps land below it */
}
.pricing-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  scroll-margin-top: 100px;
}
.pricing-step {
  display: flex;
  gap: 0.75rem;
  background: #faf6ec;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.step-body { flex: 1; }
.step-body strong { display: block; margin-bottom: 0.35rem; }
.step-body p { margin: 0.25rem 0 0; }
.payment-numbers { margin-top: 0.5rem; display: grid; gap: 0.3rem; }
.payment-row {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}
.pricing-wa-btn {
  background: #25d366;
  color: #fff;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 5px;
  font-weight: 600;
  margin-top: 0.5rem;
}
.pricing-wa-btn:hover { background: #1ebe5d; color: #fff; }

/* Testimonials — 2-column grid. */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
}
@media (max-width: 600px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* FAQ — native <details> with subtle styling. */
.landing-faq { max-width: 1100px; margin: 1rem auto; }
/* FAQ as an editorial list: hairline dividers, no boxes. */
.faq-item {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 0.95rem 0.15rem;
  margin: 0;
  background: transparent;
}
.faq-item:last-of-type { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  color: var(--accent-gold);
  font-weight: 700;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 0.6rem 0 0;
  color: #4a3422;
  font-size: 0.95rem;
}

/* Tucked auth card — smaller, less prominent than the marketing sections. */
.auth-card-tucked {
  max-width: 420px;
  margin: 1.5rem auto;
  background: #faf6ec;
  border: 1px dashed #d4c5a7;
}
.auth-card-tucked .auth-card-heading {
  font-size: 0.95rem;
  color: #6b5037;
  margin: 0 0 0.85rem;
  text-align: center;
  font-weight: 500;
}
.auth-demo-hidden {
  position: absolute;
  left: -9999px;
  visibility: hidden;
  width: 1px;
  height: 1px;
  pointer-events: auto;
}

/* Topbar Login link — shown in the not-signed-in state. */
.topbar-login-link {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-light);
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  margin-right: 0.4rem;
}
.topbar-login-link:hover {
  background: var(--neutral-soft);
  color: var(--accent);
}

/* Smooth scroll when clicking the topbar Login link → auth-card-anchor */
html { scroll-behavior: smooth; }

/* Copy-to-clipboard button shown next to bKash / Nagad numbers in the pricing card.
   Default state is neutral grey; .copied class swaps to green tick for ~1.8 seconds. */
.copy-btn {
  background: var(--border);
  border: 1px solid #d4c5a7;
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  font-size: 0.82rem;
  font-family: inherit;
  margin-left: 0.5rem;
  cursor: pointer;
  color: #6b5037;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.copy-btn:hover { background: #d4c5a7; }
.copy-btn:active { transform: translateY(1px); }
.copy-btn .copy-success { display: none; }
.copy-btn.copied {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.copy-btn.copied .copy-default { display: none; }
.copy-btn.copied .copy-success { display: inline-flex; align-items: center; gap: 0.25rem; }

/* Brand link in topbar — replaces plain h1 text. Clickable but visually
   identical so it doesn't read as a button. */
.brand-link {
  color: inherit;
  text-decoration: none;
}
.brand-link:hover { opacity: 0.85; }

/* Global site footer — present on every screen. The page's one dark
   institutional anchor (2026-08-27 modernization): a deep espresso band
   grounding the cream page, cream/gold text on it. */
.site-footer {
  border-top: 1px solid var(--border);
  background: #241105;
  padding: 1.15rem 1.2rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #cbbda9;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.6rem;
}
.site-footer-brand strong { color: #fbfaf7; font-family: var(--font-display); }
.site-footer-sep { color: rgba(232, 213, 176, 0.35); }
.site-footer a { color: #e8d5b0; }
.site-footer a:hover { text-decoration: underline; color: #fbfaf7; }
/* Social/contact links — inline SVG icons sized to the text line. */
.site-footer-social { display: inline-flex; align-items: center; gap: 0.55rem; }
.site-footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  text-decoration: none;
}
.site-footer-social a:hover { text-decoration: underline; }
.site-footer-social svg { width: 16px; height: 16px; display: block; flex: none; }
@media (max-width: 600px) {
  .site-footer { font-size: 0.78rem; padding: 0.7rem 0.8rem; }
  .site-footer-inner { gap: 0.3rem 0.5rem; }
  .site-footer-social svg { width: 15px; height: 15px; }
}

/* One-line feature announcement / cache-refresh nudge at the top of setup. */
.feature-note {
  margin: 0 0 0.85rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  background: #fdf6e8;
  border: 1px solid var(--accent-gold);
  border-radius: 6px;
  color: var(--accent);
}

/* ---- Super Practice (final-week exam modes) ---- */
.super-card { border-left: 4px solid var(--accent); }
.super-mode-card { display: block; cursor: pointer; }
.super-mode-card input { margin-right: 0.4rem; }
#super-options { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid #e8ddcb; }
.super-submodes { border: none; padding: 0; margin: 0 0 0.75rem; }
.super-submodes legend {
  font-weight: 600; color: var(--accent); padding: 0; margin-bottom: 0.5rem; font-size: 0.92rem;
}
.super-submodes label {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.55rem 0.7rem; margin-bottom: 0.45rem;
  border: 1px solid #e3d6c2; border-radius: 6px; cursor: pointer; background: #fffdf8;
}
.super-submodes label:hover { border-color: var(--accent-gold); }
.super-submodes input { float: left; margin-right: 0.5rem; }
.super-submodes .sm-title { font-weight: 600; }
.super-submodes .sm-meta { font-size: 0.8rem; color: #7a6a52; }
/* Post-answer trap hint (Super distinction/trap questions). */
.trap-hint {
  margin-top: 0.6rem; padding: 0.4rem 0.6rem; font-size: 0.85rem;
  background: #fdf3dc; border-left: 3px solid #d39a18; border-radius: 3px; color: #6b4a00;
}
.trap-hint .trap-label { font-weight: 700; margin-right: 0.35rem; }
/* In Super Practice the generic question-bank filters and the question-count/order
   pickers don't apply (each sub-mode has a fixed pool, count and timer), so hide them.
   The Start button stays — only the filter half and the option row are hidden, and
   the now-redundant divider above the lone Start button is dropped. */
body.super-mode #filter-card { display: none !important; }
body.super-mode #setup-controls #session-card {
  border-top: none; margin-top: 0; padding-top: 0;
}
body.super-mode #session-card .opt-row { display: none !important; }

/* ---- Two-SKU pricing cards + exam banner + loss strip (2026-07-16) ------ */

/* Hero exam-date banner: the eyebrow, promoted to the page's urgency line. */
.exam-banner {
  display: inline-block;
  background: #f6ead2;
  border: 1px solid var(--accent-gold);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  color: var(--accent-deep);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.exam-banner .exam-days { color: var(--accent); }

/* Plan cards: Written featured (shiny), MCQ secondary. Since the landing-tracks
   section was folded in here (2026-07-18), these cards are the one "which prep +
   price" surface: badge → icon/name/exam-meta → price → features → CTA. */
.pricing-sub { margin: -0.4rem 0 0.4rem; }
.pricing-plans {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
  margin: 0.8rem 0 1.1rem;
  /* stretch, and .hub-feats' flex:1 pins each CTA to its card bottom — equal
     heights instead of a short MCQ card leaving a ragged hole on the right */
  align-items: stretch;
}
.plan-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf7;
  padding: 0.9rem 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(92, 47, 16, 0.12);
}
.plan-card--featured {
  position: relative;
  overflow: hidden;
  /* gold gradient ring: paint the card bg in the padding-box and the gradient
     in the border-box behind a transparent border */
  border: 2px solid transparent;
  background:
    linear-gradient(150deg, #fffdf7 60%, #faf2e6) padding-box,
    linear-gradient(135deg, #d9b478, var(--accent-gold) 40%, #f0e2c4 65%, var(--accent-gold)) border-box;
  box-shadow:
    0 6px 24px rgba(92, 47, 16, 0.12),
    0 0 0 4px rgba(176, 133, 80, 0.10);
}
.plan-card--featured:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(92, 47, 16, 0.18),
    0 0 0 4px rgba(176, 133, 80, 0.16);
}
/* slow sheen sweep across the featured card */
.plan-card--featured::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -45%;
  width: 30%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.4) 50%, transparent);
  transform: rotate(14deg);
  animation: plan-sheen 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes plan-sheen {
  0%   { left: -45%; }
  30%  { left: 115%; }
  100% { left: 115%; }
}
@media (prefers-reduced-motion: reduce) {
  .plan-card--featured::after { display: none; }
  .plan-card, .plan-card:hover, .plan-card--featured:hover { transform: none; }
}
.plan-head { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.3rem; }
.plan-icon { font-size: 1.9rem; line-height: 1; }
.plan-meta { margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.plan-card--featured .plan-badge {
  background: linear-gradient(135deg, var(--accent), #7a4a1f 60%, var(--accent));
  box-shadow: 0 2px 8px rgba(92, 47, 16, 0.25);
}
.plan-card--featured .plan-choose-btn {
  background: linear-gradient(135deg, #7a4a1f, var(--accent) 55%, #7a4a1f);
  box-shadow: 0 4px 14px rgba(92, 47, 16, 0.3);
}
.plan-card--featured .plan-choose-btn:hover { background: var(--accent-light); }
.plan-badge {
  display: inline-block;
  align-self: flex-start; /* stay a pill — don't stretch across the flex card */
  margin: 0 0 0.4rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.plan-badge--muted { background: #e8dcc8; color: var(--accent-deep); }
.plan-name { margin: 0 0 0.2rem; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--accent-deep); }
.plan-card .pricing-price .price-amount { font-family: var(--font-display); font-weight: 800; font-size: 2.7rem; }
.plan-card .pricing-price .price-currency { font-family: var(--font-display); font-size: 1.7rem; }
.plan-card .price-sub { margin: 0.3rem 0 0.5rem; font-size: 0.92rem; }
.plan-card .pricing-included { margin-bottom: 0.7rem; }
.plan-bonus {
  margin-top: 0.35rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--accent-gold);
  font-weight: 700;
  color: var(--accent-deep);
}
@media (max-width: 720px) {
  .pricing-plans { grid-template-columns: 1fr; }
}

/* Single-offer pricing (2026-07-23 one ৳649 product): one centred card
   instead of the old two-SKU grid, capped so it doesn't span the whole card. */
.pricing-plans--single {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}
/* The "plus full MCQ platform" line: set off from the Written feature list
   above it, same treatment as .plan-bonus. */
.pricing-included-bonus {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--accent-gold);
  color: var(--accent-deep);
}
/* Secondary demo link sitting under the buy button, centred. */
.plan-demo-link--sub { text-align: center; margin: 0.55rem 0 0; }

/* Repositioning problem→feature grid: text-only cards, reuses .landing-feat-grid. */
.landing-problems-sub { margin: 0.1rem 0 0.2rem; }
.landing-problem-grid .feat-card strong { display: block; margin-bottom: 0.3rem; }
.landing-problem-grid .feat-card p { margin: 0; }

/* Honest loss-aversion strip (2026 amendments). */
.landing-loss { border-left: 4px solid var(--accent-gold); }
.landing-loss p { margin: 0; line-height: 1.7; }
.landing-loss-lead { margin: 0 0 0.7rem !important; }
.landing-loss-foot { margin: 0.75rem 0 0 !important; color: var(--muted); font-size: 0.95rem; }
/* 2026-amendment figures as separated cards instead of one dense paragraph */
.landing-loss-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem;
}
.landing-loss-list li {
  background: #fffdf7; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.55rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.landing-loss-list .loss-new { font-weight: 700; color: var(--accent-deep); }
.landing-loss-list .loss-old {
  font-size: 0.82rem; color: var(--muted); text-decoration: line-through;
  text-decoration-color: var(--accent-gold);
}
@media (max-width: 560px) { .landing-loss-list { grid-template-columns: 1fr; } }

/* Why/problem narrative + demo affordances (2026-07-16 Written-first rework) */
.landing-why p { line-height: 1.75; margin: 0 0 0.9rem; }
.landing-why .landing-cta-row { margin-top: 0.4rem; }
.plan-demo-link { margin: 0 0 0.55rem; font-size: 0.9rem; }
.landing-cta-row { flex-wrap: wrap; }

/* Flow clips inside feature cards (lazy-loaded webm with poster fallback) */
.feat-thumb video.feat-video { width: 100%; display: block; border-radius: 8px; }

/* Hero CTA stack: primary centered, secondaries in a row beneath */
.landing-cta-center { justify-content: center; }
.landing-cta-secondary-row { margin-top: 0.6rem; gap: 0.6rem; }

/* ============ 2026-08-27 modernization: global polish ============ */
/* Visible keyboard-focus ring in the brand accent, everywhere. */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}
/* The new hover lifts respect reduced-motion, like the ones that predate them. */
@media (prefers-reduced-motion: reduce) {
  .primary-btn:hover, .secondary-btn:hover { transform: none; }
}

/* ===================== RENEWAL (2026-09-08) ==============================
   A lapsed customer is signed in, not signed out (auth.js mode "expired"):
   they get the demo pool with renewal wording, plus a dedicated renew screen
   that reuses the buy flow's step/status/form styling verbatim. */

.renew-hero { text-align: center; }
.renew-title { margin: 0 0 0.5rem; }
.renew-lead { font-size: 1.02rem; margin: 0 0 0.7rem; }
.renew-note { max-width: 54ch; margin: 0 auto; line-height: 1.65; }
.renew-steps { margin-top: 1.4rem; }
.renew-meanwhile { margin-top: 1.2rem; text-align: center; }
.renew-meanwhile p { margin: 0 0 0.7rem; }
.renew-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.renew-actions .secondary-btn { text-decoration: none; }

/* Expiry nudge on the exam hub — shown only in the last few days of a live
   window (renew.js), since there is no outbound email to warn anyone. */
.renew-nudge {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin: 0 0 1rem; padding: 0.7rem 0.95rem;
  border: 1px solid #e6cf9e; border-left: 4px solid var(--accent-gold, #b08550);
  border-radius: 10px; background: #fdf7e8; font-size: 0.9rem;
}
.renew-nudge[hidden] { display: none !important; }
.renew-nudge-icon { font-size: 1.05rem; }
.renew-nudge-cta {
  margin-left: auto; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: 0.35rem 0.8rem; border-radius: 8px;
  background: var(--accent, #5c2f10); color: #fff;
}
.renew-nudge-cta:hover { filter: brightness(1.08); }

/* Buy wording -> renew wording on the shared demo surfaces. Purely
   presentational: an expired user's pool and locks are the demo's exactly. */
.cta-renew { display: none; }
body.expired-mode .cta-buy { display: none; }
body.expired-mode .cta-renew { display: inline; }
.expired-banner-text { display: none; }
body.expired-mode .expired-banner-text { display: block; }
body.expired-mode .demo-banner .demo-banner-text:not(.expired-banner-text) { display: none; }
/* They already have an account, so the "already paid, log in" foot is noise. */
body.expired-mode .upgrade-cta-foot { display: none; }
.topbar-renew { font-weight: 600; }
