/* ══════════════════════════════════════════════════
   StartupPul — Quiz Portal Stylesheet
   ══════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --ink:     #111111;
  --ink2:    #444444;
  --ink3:    #888888;
  --white:   #ffffff;
  --off:     #f6f5f2;
  --off2:    #edebe6;
  --border:  rgba(0,0,0,0.12);
  --border2: rgba(0,0,0,0.22);

  --blue:    #1a56db;
  --blue-d:  #0c3580;
  --blue-l:  #e8f0fe;
  --green:   #1a7f5a;
  --green-l: #e3f5ed;
  --red:     #c0392b;
  --red-l:   #fdecea;
  --amber:   #b45309;
  --amber-l: #fef3cd;
  --purple:  #5c3dce;
  --purple-l:#ede9fe;
  --gold:    #d4a017;
  --navy:    #0C447C;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r:   10px;
  --rl:  16px;
  --rxl: 22px;
}

/* ── Base ── */
html { font-size: 16px; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--off);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
p { font-size: 1rem; color: var(--ink2); line-height: 1.75; }
button { font-family: var(--font); cursor: pointer; }
input  { font-family: var(--font); }

/* ── Screen system ── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ══════════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════════ */
.login-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media(max-width: 800px) { .login-grid { grid-template-columns: 1fr; } }

/* Left panel */
.login-left {
  background: linear-gradient(160deg, #060d24 0%, #0e2260 55%, #1a3a9e 100%);
  padding: 4rem 3.5rem;
  display: flex; flex-direction: column;
  justify-content: center; gap: 2.5rem;
  color: white;
}
.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: white;
}
.brand-mark.sm { width: 36px; height: 36px; font-size: 1rem; border-radius: 9px; }
.brand-text .name { font-size: 1.125rem; font-weight: 700; color: white; line-height: 1.1; }
.brand-text .tag  { font-size: 0.75rem; color: rgba(255,255,255,0.55); letter-spacing: 0.05em; }

.hero-text .eyebrow {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 0.5rem;
}
.hero-text h1 {
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.04em; color: white;
}
.hero-text p {
  font-size: 1rem; color: rgba(255,255,255,0.65);
  line-height: 1.7; max-width: 340px; margin-top: 1rem;
}

.stats-row { display: flex; align-items: center; gap: 24px; }
.stat-block .num { font-size: 2.25rem; font-weight: 800; color: white; line-height: 1; }
.stat-block .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: 2px; }
.stat-div { width: 1px; height: 44px; background: rgba(255,255,255,0.15); }

.login-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ltag {
  font-size: 0.8125rem; font-weight: 500;
  padding: 5px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

/* Right panel */
.login-right {
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2.5rem;
}
.login-card { width: 100%; max-width: 420px; }
.login-card h2 { font-size: 1.625rem; font-weight: 700; margin-bottom: 6px; }
.login-card-sub { font-size: 0.9375rem; color: var(--ink3); margin-bottom: 2rem; }

/* Form */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block; font-size: 0.875rem;
  font-weight: 500; color: var(--ink2); margin-bottom: 7px;
}
.field label em { font-style: normal; color: var(--ink3); font-weight: 400; }
.field input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border2); border-radius: var(--r);
  font-size: 0.9375rem; background: var(--off);
  color: var(--ink); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5;
}
.field input:focus {
  border-color: var(--blue); background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.field input::placeholder { color: var(--ink3); }

/* Buttons */
.btn-main {
  width: 100%; padding: 13px 20px;
  background: var(--ink); color: white;
  border: none; border-radius: var(--r);
  font-size: 1rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s;
}
.btn-main:hover { background: #333; }

.btn-ghost {
  width: 100%; padding: 12px 20px; margin-top: 10px;
  background: transparent; color: var(--ink2);
  border: 1.5px solid var(--border2); border-radius: var(--r);
  font-size: 0.9375rem; font-weight: 500;
  transition: background 0.2s;
}
.btn-ghost:hover { background: var(--off); }

.btn-outline {
  padding: 8px 16px; background: transparent; color: var(--ink2);
  border: 1.5px solid var(--border2); border-radius: var(--r);
  font-size: 0.875rem; font-weight: 500;
  white-space: nowrap; transition: background 0.2s;
}
.btn-outline:hover { background: var(--off); }

.btn-back-q {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; background: transparent; color: var(--ink3);
  border: none; border-radius: var(--r); font-size: 0.9rem;
  transition: color 0.2s;
}
.btn-back-q:hover { color: var(--ink); }

.error-msg {
  background: var(--red-l); color: var(--red);
  border-left: 3px solid var(--red); border-radius: 0;
  padding: 11px 16px; font-size: 0.9rem; margin-bottom: 14px;
}

/* ══════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 2rem;
  height: 62px; display: flex; align-items: center; gap: 14px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.user-pill {
  font-size: 0.875rem; font-weight: 600;
  padding: 5px 14px; border-radius: 20px;
  background: var(--blue-l); color: var(--blue-d);
}

/* ══════════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════════ */
.dash-wrap { max-width: 1040px; margin: 0 auto; padding: 2rem 2rem 4rem; }

.dash-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #0e1a3a 0%, #1a3a9e 100%);
  border-radius: var(--rxl); padding: 2.5rem 2.75rem;
  color: white; margin-bottom: 2rem;
}
.dash-greeting { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; color: white; }
.dash-sub { font-size: 0.9375rem; color: rgba(255,255,255,0.75); }
.dash-score-badge {
  text-align: center; min-width: 130px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: var(--rl); padding: 1.125rem 1.5rem;
}
.dash-score-badge .big-num { font-size: 2.25rem; font-weight: 800; display: block; line-height: 1; }
.dash-score-badge .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 4px; display: block; }

/* Improvement panel */
.improv-panel {
  background: var(--white); border-radius: var(--rl);
  padding: 1.75rem; margin-bottom: 2rem;
  border: 1.5px solid var(--border2);
}
.improv-panel h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.topic-bars { display: flex; flex-direction: column; gap: 14px; }
.topic-bar-row { display: grid; grid-template-columns: 130px 1fr 100px; align-items: center; gap: 14px; }
.topic-bar-label { font-size: 0.875rem; color: var(--ink2); font-weight: 500; }
.topic-bar-track { height: 8px; background: var(--off2); border-radius: 4px; overflow: hidden; }
.topic-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.topic-bar-pct   { font-size: 0.875rem; font-weight: 700; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.delta-badge { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.delta-pos { background: var(--green-l); color: var(--green); }
.delta-neg { background: var(--red-l);   color: var(--red); }
.delta-neu { background: var(--off2);    color: var(--ink3); }

/* Section label */
.modes-label {
  font-size: 0.75rem; font-weight: 700; color: var(--ink3);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px;
}

/* Mode tiles */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px; margin-bottom: 2.5rem;
}
.mode-tile {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border-radius: var(--rl);
  padding: 1.375rem 1.5rem;
  border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.18s;
}
.mode-tile:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.09); }
.mode-featured   { border-color: var(--gold); background: linear-gradient(135deg,#fffbeb,var(--white)); }
.mode-featured:hover { border-color: var(--amber); }
.mode-new        { border-color: var(--amber); background: linear-gradient(135deg,var(--amber-l),var(--white)); }
.mode-tile-icon  { font-size: 1.75rem; flex-shrink: 0; }
.mode-tile-body  { flex: 1; min-width: 0; }
.mode-tile-name  { font-size: 1rem; font-weight: 700; margin-bottom: 3px; color: var(--ink); }
.mode-tile-desc  { font-size: 0.8125rem; color: var(--ink3); line-height: 1.45; }
.mode-tile-badge {
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; flex-shrink: 0;
}
.badge-gold   { background: var(--amber-l); color: var(--amber); }
.badge-purple { background: var(--purple-l); color: var(--purple); }
.badge-green  { background: var(--green-l);  color: var(--green); }
.badge-blue   { background: var(--blue-l);   color: var(--blue-d); }
.badge-amber  { background: var(--amber-l);  color: var(--amber); }
.badge-red    { background: var(--red-l);    color: var(--red); }

/* History table */
.history-wrap { background: var(--white); border-radius: var(--rl); padding: 1.75rem; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th {
  text-align: left; padding: 9px 14px;
  background: var(--off); color: var(--ink3);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.history-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.history-table tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════════════════
   QUIZ SCREEN
   ══════════════════════════════════════════════════ */
.quiz-topbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.75rem; height: 60px;
}
.quiz-meta { flex: 1; display: flex; justify-content: center; }
.quiz-mode-pill {
  font-size: 0.875rem; font-weight: 600;
  color: var(--blue-d); background: var(--blue-l);
  padding: 5px 16px; border-radius: 20px;
}
.quiz-topbar-right { display: flex; align-items: center; gap: 14px; }
.quiz-clock {
  font-size: 1rem; font-weight: 700;
  padding: 5px 14px; border-radius: var(--r);
  background: var(--blue-l); color: var(--blue-d);
  letter-spacing: 0.04em;
}
.quiz-clock.warning { background: var(--red-l); color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.55} }
.quiz-score-live { font-size: 0.9375rem; font-weight: 700; color: var(--green); }

.quiz-progress-rail { height: 4px; background: var(--off2); position: sticky; top: 60px; z-index: 199; }
.quiz-progress-fill { height: 100%; background: var(--blue); transition: width 0.3s; }
.quiz-progress-label { padding: 8px 1.75rem 0; font-size: 0.8125rem; color: var(--ink3); }

.quiz-body { max-width: 800px; margin: 0 auto; padding: 1.75rem; }

.quiz-section-divider {
  font-size: 0.75rem; font-weight: 700;
  color: var(--ink3); text-transform: uppercase; letter-spacing: 0.1em;
  margin: 2.5rem 0 1.25rem; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.quiz-section-divider span { font-weight: 400; }

/* Question card */
.q-card {
  background: var(--white); border-radius: var(--rl);
  padding: 1.75rem; margin-bottom: 14px;
  border: 1.5px solid var(--border);
}
.q-card.important { border-left: 4px solid var(--gold); }
.q-locked { pointer-events: none !important; }
.q-locked .q-note { pointer-events: auto; }

.q-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.q-num  { font-size: 0.8125rem; font-weight: 700; color: var(--ink3); letter-spacing: 0.05em; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.badge-policy   { background: var(--purple-l); color: var(--purple); }
.badge-finance  { background: var(--green-l);  color: var(--green); }
.badge-business { background: var(--blue-l);   color: var(--blue-d); }
.badge-legal    { background: var(--amber-l);  color: var(--amber); }
.badge-important{ background: #FEF3CD; color: #92400e; }
.badge-correct  { background: var(--green-l);  color: var(--green); }
.badge-wrong    { background: var(--red-l);    color: var(--red); }

/* Bilingual question text */
.q-text   { margin-bottom: 1.25rem; }
.q-en     { font-size: 1rem; font-weight: 600; line-height: 1.6; color: var(--ink); margin-bottom: 6px; }
.q-hi     { font-size: 0.9375rem; font-weight: 400; line-height: 1.65; color: var(--ink2); padding-left: 14px; border-left: 2px solid var(--border2); margin-top: 5px; }

/* Options */
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 17px; min-height: 52px;
  border-radius: var(--r); border: 1.5px solid var(--border2);
  cursor: pointer; font-size: 0.9375rem; line-height: 1.5;
  background: var(--off); color: var(--ink);
  transition: all 0.15s;
}
.opt:not(.opt-locked):hover { border-color: var(--blue); background: var(--blue-l); }
.opt-locked  { cursor: default !important; }
.opt-correct { border-color: var(--green) !important; background: var(--green-l) !important; color: var(--green) !important; }
.opt-wrong   { border-color: var(--red)   !important; background: var(--red-l)   !important; color: var(--red)   !important; }
.opt-label   { font-size: 0.8125rem; font-weight: 700; min-width: 24px; flex-shrink: 0; margin-top: 1px; }
.opt-text    { flex: 1; }
.opt-tick, .opt-cross { margin-left: auto; font-size: 1rem; flex-shrink: 0; }

/* Explanation note */
.q-note {
  margin-top: 14px; padding: 14px 18px;
  border-radius: var(--r); font-size: 0.9375rem;
  line-height: 1.7; color: var(--ink);
  border-left: 3px solid var(--amber); border-radius: 0;
  background: var(--amber-l);
  animation: noteIn 0.22s ease; pointer-events: auto;
}
.q-note-correct { background: #edfaf3; border-left-color: var(--green); }
.q-note-correct strong { color: var(--green); }
.q-note-wrong   { background: #fdf1f1; border-left-color: var(--red); }
.q-note-wrong strong   { color: var(--red); }
@keyframes noteIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

/* Bottom bar */
.quiz-bottombar {
  position: sticky; bottom: 0;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 14px 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.quiz-answered-lbl { font-size: 0.875rem; color: var(--ink3); }
.btn-submit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; background: var(--navy); color: #E6F1FB;
  border: none; border-radius: var(--r);
  font-size: 0.9375rem; font-weight: 600;
}
.btn-submit:hover { background: var(--blue-d); }

/* Score popup */
.score-popup {
  position: fixed; top: 72px; right: 22px; z-index: 9999;
  min-width: 170px; padding: 14px 20px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 5px;
  opacity: 0; transform: translateX(130%);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.score-popup.popup-show { opacity: 1; transform: translateX(0); }
.score-popup.popup-correct { background: linear-gradient(135deg,#1a7f5a,#27a06e); color: white; }
.score-popup.popup-wrong   { background: linear-gradient(135deg,#c0392b,#e04133); color: white; }
.popup-result { font-size: 0.9375rem; font-weight: 700; }
.popup-stats  { display: flex; align-items: baseline; gap: 8px; }
.popup-score  { font-size: 1.875rem; font-weight: 800; line-height: 1; }
.popup-detail { font-size: 0.8125rem; opacity: 0.85; }

/* ══════════════════════════════════════════════════
   RESULTS SCREEN
   ══════════════════════════════════════════════════ */
.results-wrap { max-width: 840px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.results-nav  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }

.results-hero {
  display: flex; align-items: center; gap: 2.5rem;
  background: var(--white); border-radius: var(--rxl);
  padding: 2.5rem; margin-bottom: 1.75rem;
  border: 1.5px solid var(--border);
}
.score-ring { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.ring-svg   { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg    { fill: none; stroke: var(--off2); stroke-width: 10; }
.ring-fill  { fill: none; stroke: var(--blue); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease, stroke 0.4s; }
.ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-pct   { font-size: 1.625rem; font-weight: 800; color: var(--ink); line-height: 1; }
.ring-lbl   { font-size: 0.75rem; color: var(--ink3); margin-top: 3px; }

.results-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 4px; }
.results-grade { font-size: 0.9375rem; color: var(--ink2); margin-bottom: 1.25rem; line-height: 1.6; }
.results-stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rstat {
  text-align: center; padding: 12px 18px;
  background: var(--off); border-radius: var(--r);
  border: 1px solid var(--border); min-width: 72px;
}
.rstat span  { display: block; font-size: 1.375rem; font-weight: 700; line-height: 1; }
.rstat label { font-size: 0.75rem; color: var(--ink3); display: block; margin-top: 4px; }
.rstat.green span { color: var(--green); }
.rstat.red   span { color: var(--red); }
.rstat.grey  span { color: var(--ink3); }

/* Section breakdown */
.sec-breakdown { background: var(--white); border-radius: var(--rl); padding: 1.75rem; margin-bottom: 1.75rem; border: 1.5px solid var(--border); }
.sec-breakdown h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 1.25rem; }
.breakdown-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.breakdown-item { text-align: center; padding: 1.25rem; background: var(--off); border-radius: var(--r); border: 1px solid var(--border); }
.b-label  { font-size: 0.8125rem; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.b-pct    { font-size: 1.5rem; font-weight: 700; }
.b-detail { font-size: 0.8125rem; color: var(--ink3); margin-top: 3px; }
.b-bar    { height: 6px; background: var(--off2); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.b-bar-fill { height: 100%; border-radius: 3px; }

.improv-card { background: var(--white); border-radius: var(--rl); padding: 1.75rem; margin-bottom: 1.75rem; border: 2px solid var(--green); }
.weak-panel  { background: var(--white); border-radius: var(--rl); padding: 1.75rem; margin-bottom: 1.75rem; border: 1.5px solid var(--border); }
.weak-panel h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 1rem; }
.weak-list   { display: flex; flex-direction: column; gap: 10px; }
.weak-item   { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; background: var(--red-l); border-radius: var(--r); }
.weak-item .w-tag  { font-size: 1.125rem; flex-shrink: 0; margin-top: 2px; }
.weak-item .w-text { font-size: 0.9rem; color: var(--ink); flex: 1; line-height: 1.55; }

.results-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 2rem; }
.results-actions .btn-submit { padding: 12px 24px; }
.results-actions .btn-outline { padding: 11px 20px; }

.review-wrap { background: var(--white); border-radius: var(--rl); padding: 1.75rem; }
.section-heading { font-size: 1.0625rem; font-weight: 700; margin-bottom: 1.25rem; }

/* ══════════════════════════════════════════════════
   LEADERBOARD SCREEN
   ══════════════════════════════════════════════════ */
.lb-wrap    { max-width: 700px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.lb-nav     { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.lb-heading { font-size: 1.5rem; font-weight: 700; }

.lb-tabs {
  display: flex; gap: 4px; margin-bottom: 1.75rem;
  background: var(--off2); border-radius: var(--r); padding: 4px;
}
.lb-tab {
  flex: 1; padding: 10px 12px; border: none;
  border-radius: 8px; background: transparent;
  color: var(--ink3); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.lb-tab.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.lb-list { display: flex; flex-direction: column; gap: 10px; }
.lb-note { font-size: 0.8125rem; color: var(--ink3); margin-top: 1rem; text-align: center; line-height: 1.5; }

.lb-entry {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border-radius: var(--rl);
  padding: 14px 18px; border: 1.5px solid var(--border);
}
.lb-rank   { font-size: 1.125rem; font-weight: 700; width: 38px; text-align: center; }
.lb-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.lb-info   { flex: 1; min-width: 0; }
.lb-name   { font-size: 0.9375rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-org    { font-size: 0.8125rem; color: var(--ink3); margin-top: 2px; }
.lb-score-col { text-align: right; flex-shrink: 0; }
.lb-pct    { font-size: 1.375rem; font-weight: 800; color: var(--ink); }
.lb-detail { font-size: 0.75rem; color: var(--ink3); }
.lb-entry.rank-1 { border-color: var(--gold); background: linear-gradient(to right,#fffbeb,var(--white)); }
.lb-entry.rank-2 { border-color: #a0aec0; background: linear-gradient(to right,#f8fafc,var(--white)); }
.lb-entry.rank-3 { border-color: #b7794c; background: linear-gradient(to right,#fef6f0,var(--white)); }
.lb-empty  { text-align: center; padding: 3.5rem; color: var(--ink3); font-size: 0.9375rem; }

/* ── Responsive ── */
@media(max-width: 680px) {
  .nav-inner, .dash-wrap, .quiz-body,
  .results-wrap, .lb-wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .quiz-topbar { padding: 0 1.25rem; }
  .quiz-bottombar { padding: 12px 1.25rem; }
  .dash-banner { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.75rem; }
  .results-hero { flex-direction: column; align-items: flex-start; padding: 1.75rem; }
  .breakdown-grid { grid-template-columns: 1fr; }
  .topic-bar-row  { grid-template-columns: 90px 1fr 80px; }
  .modes-grid     { grid-template-columns: 1fr; }
  .login-left     { padding: 2.5rem 1.75rem; }
  .score-popup { top: auto; bottom: 80px; right: 50%; transform: translateX(50%) translateY(20px); }
  .score-popup.popup-show { transform: translateX(50%) translateY(0); }
}

/* btn-primary alias — used in login + results actions */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; background: var(--ink); color: white;
  border: none; border-radius: var(--r);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #333; }

/* btn-secondary alias — used in results actions */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; background: transparent; color: var(--ink);
  border: 1.5px solid var(--border2); border-radius: var(--r);
  font-size: 0.9375rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--off2); }

/* ══════════════════════════════════════════════════
   NEW AUTH FLOW — Login screen additions
   ══════════════════════════════════════════════════ */

/* Brand tag under name */
.brand-tag { font-size: 0.7rem; color: rgba(255,255,255,0.45); letter-spacing: 0.08em; margin-top: 1px; }

/* Auth buttons */
.auth-btn {
  width: 100%; padding: 13px 18px;
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--r); font-size: 0.9375rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
  border: 1.5px solid var(--border2);
}
.auth-btn-google {
  background: var(--white); color: var(--ink);
}
.auth-btn-google:hover { background: var(--off); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.auth-btn-mobile {
  background: var(--off); color: var(--ink);
}
.auth-btn-mobile:hover { background: var(--off2); }

.mobile-icon { font-size: 1.1rem; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 1rem 0; color: var(--ink3); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Auth links */
.auth-link {
  background: none; border: none; color: var(--blue);
  font-size: 0.9rem; font-weight: 500; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
  display: block; text-align: center; width: 100%;
}
.auth-link:hover { color: var(--blue-d); }

.auth-link-sm {
  background: none; border: none; color: var(--ink3);
  font-size: 0.8125rem; cursor: pointer; padding: 0;
}
.auth-link-sm:hover { color: var(--ink); }

.auth-footer {
  margin-top: 1.25rem; text-align: center;
  padding-top: 1rem; border-top: 1px solid var(--border);
}

/* Back button inside step */
.auth-back {
  background: none; border: none; color: var(--ink3);
  font-size: 0.875rem; cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.auth-back:hover { color: var(--ink); }

/* Mobile input with prefix */
.mobile-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--border2); border-radius: var(--r);
  background: var(--off); overflow: hidden;
  transition: border-color 0.2s;
}
.mobile-input-wrap:focus-within {
  border-color: var(--blue); background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.mobile-prefix {
  padding: 12px 14px; background: var(--off2);
  border-right: 1.5px solid var(--border2);
  font-size: 0.9rem; color: var(--ink2); white-space: nowrap;
  flex-shrink: 0;
}
.mobile-input-wrap input {
  flex: 1; padding: 12px 14px; border: none !important;
  background: transparent; font-size: 0.9375rem;
  color: var(--ink); outline: none !important;
  box-shadow: none !important;
}
.mobile-input-wrap input::placeholder { color: var(--ink3); }

/* Required star */
.req { color: var(--red); font-size: 0.875rem; margin-left: 2px; }

/* ── PROFILE COMPLETION MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
}
.modal-box {
  background: var(--white); border-radius: var(--rxl);
  padding: 2rem 2rem 1.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal-header { text-align: center; margin-bottom: 1.5rem; }
.modal-icon   { font-size: 2rem; margin-bottom: 0.5rem; }
.modal-title  { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.modal-sub    { font-size: 0.9rem; color: var(--ink2); line-height: 1.6; }

/* Countdown bar */
.modal-timer-bar {
  height: 3px; background: var(--off2);
  border-radius: 2px; overflow: hidden; margin-top: 1.25rem;
}
.modal-timer-fill {
  height: 100%; background: var(--blue);
  border-radius: 2px; width: 100%;
}
.modal-timer-lbl {
  font-size: 0.75rem; color: var(--ink3);
  text-align: center; margin-top: 8px;
}

@media(max-width: 480px){
  .modal-box { padding: 1.5rem 1.25rem 1.25rem; }
  .modal-title { font-size: 1.1rem; }
}

/* ══════════════════════════════════════════════════
   LOGIN LEFT PANEL — missing classes fix
   ══════════════════════════════════════════════════ */

.login-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media(max-width: 800px) { .login-grid { grid-template-columns: 1fr; } }

.login-left {
  background: linear-gradient(160deg, #060d24 0%, #0e2260 55%, #1a3a9e 100%);
  padding: 4rem 3.5rem;
  display: flex; flex-direction: column;
  justify-content: center; gap: 2.5rem;
  color: white;
  min-height: 100vh;
}

.login-brand {
  display: flex; align-items: center; gap: 12px;
}
.brand-name {
  font-size: 1.125rem; font-weight: 700;
  color: white; line-height: 1.1;
  letter-spacing: 0.02em;
}

.login-hero-text { display: flex; flex-direction: column; gap: 0; }

.login-eyebrow {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 0.75rem;
}

.login-heading {
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 800; line-height: 1.0;
  letter-spacing: -0.04em; color: white;
  margin-bottom: 1rem;
}

.login-sub {
  font-size: 1rem; color: rgba(255,255,255,0.65);
  line-height: 1.75; max-width: 340px;
}

.login-stats-row {
  display: flex; align-items: center; gap: 24px;
}
.login-stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num {
  font-size: 2.5rem; font-weight: 800;
  color: white; line-height: 1; display: block;
}
.stat-lbl {
  font-size: 0.75rem; color: rgba(255,255,255,0.45);
  display: block; letter-spacing: 0.05em;
}
.login-stat-div {
  width: 1px; height: 50px;
  background: rgba(255,255,255,0.15);
}

/* login-tags and ltag already exist, just ensuring login-right and card have full styles */
.login-right {
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2.5rem; min-height: 100vh;
}

.login-card {
  width: 100%; max-width: 420px;
}

.login-card-title {
  font-size: 1.75rem; font-weight: 700;
  color: #111; margin-bottom: 6px; line-height: 1.2;
}

.login-card-sub {
  font-size: 0.9375rem; color: #888;
  margin-bottom: 2rem; line-height: 1.6;
}

/* ── AUTH BUTTON full styles (override any partial) ── */
.auth-btn {
  width: 100%;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 10px;
  font-size: 0.9375rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  border: 1.5px solid rgba(0,0,0,0.18);
  margin-bottom: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.auth-btn-google {
  background: #ffffff; color: #111111;
}
.auth-btn-google:hover {
  background: #f6f5f2;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.auth-btn-mobile {
  background: #f6f5f2; color: #111111;
}
.auth-btn-mobile:hover { background: #edebe6; }

/* ── DIVIDER full fix ── */
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 1.125rem 0;
  color: #888; font-size: 0.8125rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.1);
}

/* ── AUTH LINKS full fix ── */
.auth-link {
  background: none; border: none;
  color: #1a56db; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
  display: block; text-align: center; width: 100%;
  font-family: inherit;
}
.auth-link:hover { color: #0c3580; }

.auth-footer {
  margin-top: 1.5rem; text-align: center;
  padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.1);
}
.auth-link-sm {
  background: none; border: none; color: #888;
  font-size: 0.8125rem; cursor: pointer; padding: 0;
  font-family: inherit;
}
.auth-link-sm:hover { color: #111; }

/* ── BACK BUTTON ── */
.auth-back {
  background: none; border: none; color: #888;
  font-size: 0.875rem; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: inherit; margin-bottom: 4px;
}
.auth-back:hover { color: #111; }

/* ── MOBILE INPUT ── */
.mobile-input-wrap {
  display: flex; align-items: stretch;
  border: 1.5px solid rgba(0,0,0,0.22); border-radius: 10px;
  background: #f6f5f2; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mobile-input-wrap:focus-within {
  border-color: #1a56db; background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.mobile-prefix {
  padding: 12px 14px; background: #edebe6;
  border-right: 1.5px solid rgba(0,0,0,0.12);
  font-size: 0.875rem; color: #444;
  white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center;
}
.mobile-input-wrap input {
  flex: 1; padding: 12px 14px;
  border: none !important; outline: none !important;
  background: transparent;
  font-size: 0.9375rem; color: #111;
  box-shadow: none !important;
  font-family: inherit;
}
.mobile-input-wrap input::placeholder { color: #aaa; }

.req { color: #c0392b; font-size: 0.875rem; margin-left: 2px; }

/* ── FIELD inputs full fix ── */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block; font-size: 0.875rem;
  font-weight: 500; color: #444; margin-bottom: 7px;
}
.field input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid rgba(0,0,0,0.22);
  border-radius: 10px; font-size: 0.9375rem;
  background: #f6f5f2; color: #111; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5; font-family: inherit;
}
.field input:focus {
  border-color: #1a56db; background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.field input::placeholder { color: #aaa; }

/* ── ERROR MSG ── */
.error-msg {
  background: #fdecea; color: #c0392b;
  border-left: 3px solid #c0392b;
  padding: 11px 16px; font-size: 0.875rem;
  line-height: 1.5; border-radius: 0;
}

/* ── BTN PRIMARY full fix ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; background: #111111; color: white;
  border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s; font-family: inherit;
}
.btn-primary:hover { background: #333; }

/* ══════════════════════════════════════════════════
   ADMIN — Login Screen
   ══════════════════════════════════════════════════ */
.admin-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #f6f5f2; padding: 2rem;
}
.admin-login-card {
  background: #ffffff; border-radius: 20px;
  padding: 2.5rem; width: 100%; max-width: 420px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.08);
}
.admin-login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 2rem;
}
.admin-login-title {
  font-size: 1.625rem; font-weight: 700;
  color: #111; margin-bottom: 6px;
}
.admin-login-sub {
  font-size: 0.9375rem; color: #888;
  margin-bottom: 1.75rem; line-height: 1.6;
}
.pw-wrap {
  position: relative; display: flex; align-items: center;
}
.pw-wrap input {
  width: 100%; padding: 12px 44px 12px 16px;
  border: 1.5px solid rgba(0,0,0,0.22);
  border-radius: 10px; font-size: 0.9375rem;
  background: #f6f5f2; color: #111; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.pw-wrap input:focus {
  border-color: #1a56db; background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.pw-toggle {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 4px; color: #888;
}

/* ══════════════════════════════════════════════════
   ADMIN — Dashboard
   ══════════════════════════════════════════════════ */
.admin-wrap {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.admin-badge {
  font-size: 0.75rem; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  background: #fdecea; color: #c0392b;
  border: 1px solid #f09595;
  letter-spacing: 0.05em;
}

/* Stats row */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 2rem;
}
.admin-stat-card {
  background: #ffffff; border-radius: 14px;
  padding: 1.375rem 1.5rem;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.asc-num {
  font-size: 2rem; font-weight: 800;
  line-height: 1; margin-bottom: 5px; color: #111;
}
.asc-lbl {
  font-size: 0.8125rem; color: #888; font-weight: 500;
}

/* Tabs */
.admin-tabs {
  display: flex; gap: 6px; margin-bottom: 1.5rem;
  background: #edebe6; border-radius: 12px; padding: 5px;
}
.admin-tab {
  flex: 1; padding: 10px 14px; border: none;
  border-radius: 9px; background: transparent;
  color: #888; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.admin-tab.active {
  background: #ffffff; color: #111;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.admin-tab-content { display: block; }

/* Search row */
.admin-search-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1rem;
}
.admin-search-input {
  flex: 1; padding: 10px 16px;
  border: 1.5px solid rgba(0,0,0,0.18);
  border-radius: 10px; font-size: 0.9375rem;
  background: #fff; color: #111; outline: none;
  font-family: inherit; transition: border-color 0.2s;
}
.admin-search-input:focus { border-color: #1a56db; }
.admin-search-input::placeholder { color: #aaa; }
.admin-count-pill {
  font-size: 0.8125rem; font-weight: 600;
  padding: 5px 14px; border-radius: 20px;
  background: #e8f0fe; color: #0c3580;
  white-space: nowrap;
}

/* Table */
.admin-table-wrap {
  overflow-x: auto; border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem; background: #fff;
}
.admin-table thead tr {
  background: #f6f5f2;
}
.admin-table th {
  padding: 12px 16px; text-align: left;
  font-size: 0.75rem; font-weight: 700;
  color: #888; text-transform: uppercase;
  letter-spacing: 0.07em; white-space: nowrap;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: #111; vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-user-row { cursor: pointer; transition: background 0.12s; }
.admin-user-row:hover { background: #f6f5f2; }

.td-num  { color: #aaa; font-size: 0.8125rem; font-weight: 600; width: 40px; }
.td-name { font-weight: 600; color: #111; min-width: 120px; }
.td-contact { color: #555; font-size: 0.8125rem; min-width: 160px; }

/* Score pills */
.score-pill {
  display: inline-block; font-size: 0.8125rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.sp-green { background: #e3f5ed; color: #1a7f5a; }
.sp-amber { background: #fef3cd; color: #b45309; }
.sp-red   { background: #fdecea; color: #c0392b; }

/* Empty state */
.admin-empty {
  text-align: center; padding: 3rem 2rem;
  color: #aaa; font-size: 0.9375rem;
  background: #fff; border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* User detail modal */
.user-detail-meta {
  display: flex; flex-direction: column; gap: 0;
  background: #f6f5f2; border-radius: 10px;
  overflow: hidden; margin-bottom: 0.5rem;
}
.udm-row {
  display: flex; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: 0.9rem;
}
.udm-row:last-child { border-bottom: none; }
.udm-lbl {
  font-size: 0.8rem; font-weight: 600; color: #888;
  text-transform: uppercase; letter-spacing: 0.07em;
  width: 120px; flex-shrink: 0;
}

/* Section analysis */
.sec-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 1rem;
}
.sec-analysis-card {
  background: #fff; border-radius: 14px;
  padding: 1.5rem; border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.sac-icon { font-size: 1.75rem; margin-bottom: 8px; }
.sac-name { font-size: 0.875rem; font-weight: 600; color: #888; margin-bottom: 10px; }
.sac-avg  { font-size: 2.25rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.sac-lbl  { font-size: 0.75rem; color: #aaa; margin-bottom: 10px; }
.sac-range {
  display: flex; justify-content: space-between;
  font-size: 0.8125rem; font-weight: 600; margin-bottom: 10px;
}
.sac-bar  { height: 6px; background: #edebe6; border-radius: 3px; overflow: hidden; }
.sac-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* Responsive */
@media(max-width: 680px) {
  .admin-wrap { padding: 1rem 1rem 3rem; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .admin-tabs { flex-direction: column; }
  .admin-search-row { flex-direction: column; align-items: stretch; }
  .sec-analysis-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════
   BOL BIHAR BUTTON — Landing page (big prominent)
   ══════════════════════════════════════════════════ */
.bol-bihar-btn {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px;
  background: linear-gradient(135deg, #0C447C, #1a56db);
  color: white; border: none; border-radius: 50px;
  cursor: pointer; overflow: hidden;
  box-shadow: 0 4px 20px rgba(12,68,124,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.bol-bihar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(12,68,124,0.5);
}
.bb-icon { font-size: 1.25rem; flex-shrink: 0; }
.bb-text { display: flex; flex-direction: column; align-items: flex-start; }
.bb-main { font-size: 0.9375rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.bb-sub  { font-size: 0.65rem; opacity: 0.75; letter-spacing: 0.05em; white-space: nowrap; }
.bb-pulse {
  position: absolute; top: 8px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: bb-ping 1.8s infinite;
}
@keyframes bb-ping {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.bol-bihar-btn.active {
  background: linear-gradient(135deg, #a32d2d, #e04133);
  box-shadow: 0 4px 20px rgba(192,57,43,0.4);
}

/* ── Small version in portal navbar ── */
.bol-bihar-btn-sm {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #0C447C, #1a56db);
  color: white; border: none; border-radius: 50px;
  cursor: pointer; font-size: 0.8125rem; font-weight: 600;
  box-shadow: 0 2px 12px rgba(12,68,124,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
.bol-bihar-btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(12,68,124,0.4);
}
.bb-sm-text { font-size: 0.8125rem; font-weight: 600; }

/* ── Floating FAB in quiz screen ── */
.bol-bihar-fab {
  position: fixed; bottom: 90px; right: 20px; z-index: 500;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #0C447C, #1a56db);
  color: white; border: none; border-radius: 50%;
  cursor: pointer; font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(12,68,124,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  justify-content: center;
}
.bol-bihar-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(12,68,124,0.55); }
.fab-label { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.05em; line-height: 1; opacity: 0.9; }

/* ── Portal voice panel (in quiz/dashboard) ── */
.portal-voice-panel {
  background: #f6f5f2; border-bottom: 1px solid rgba(0,0,0,0.10);
  position: sticky; top: 62px; z-index: 150;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.portal-voice-inner { max-width: 800px; margin: 0 auto; padding: 1rem 1.5rem; }
.pv-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.pv-title { font-size: 0.9375rem; font-weight: 700; color: #111; }

/* voice-resp already defined, vchip already defined */

/* ══════════════════════════════════════════════════
   MOBILE OPTIMISATION — Complete overhaul
   All breakpoints: 480px, 640px, 768px
   ══════════════════════════════════════════════════ */

/* ── 768px: Tablet adjustments ── */
@media (max-width: 768px) {
  /* Login: stack columns */
  .login-grid { grid-template-columns: 1fr; }
  .login-left  { min-height: auto; padding: 2.5rem 1.75rem; }
  .login-heading { font-size: 3rem; }
  .login-right { min-height: auto; padding: 2rem 1.75rem; }

  /* Dashboard banner stacks */
  .dash-banner { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.75rem; }
  .dash-score-badge { width: 100%; }

  /* Mode grid: 2 columns */
  .modes-grid { grid-template-columns: repeat(2, 1fr); }

  /* Results hero stacks */
  .results-hero { flex-direction: column; align-items: flex-start; }

  /* Section breakdown: 2 col */
  .breakdown-grid { grid-template-columns: repeat(2, 1fr); }

  /* Admin stats: 3 col */
  .admin-stats-row { grid-template-columns: repeat(3, 1fr); }

  /* Section analysis: 2 col */
  .sec-analysis-grid { grid-template-columns: repeat(2, 1fr); }

  /* Navbar: hide brand tag */
  .brand-tag { display: none; }

  /* Bol Bihar sm: hide text on tablet */
  .bb-sm-text { display: none; }
  .bol-bihar-btn-sm { padding: 8px 12px; }
}

/* ── 640px: Mobile ── */
@media (max-width: 640px) {

  /* === BASE === */
  html { font-size: 15px; }

  /* === LANDING.HTML NAV === */
  .nav-inner { padding: 0 1rem; height: 56px; gap: 8px; }
  .nav-brand .name { font-size: 0.9rem; }

  /* Bol Bihar button on mobile: icon only in nav */
  .voice-btn span { display: none; }
  .bol-bihar-btn {
    padding: 8px 12px;
  }
  .bb-text { display: none; }
  .bb-icon { font-size: 1.25rem; }
  .bb-pulse { top: 5px; right: 5px; }

  .nav-cta { padding: 8px 12px; font-size: 0.8125rem; }

  /* === VOICE PANEL === */
  .voice-panel { padding: 1rem; }
  .voice-row { flex-direction: column; gap: 8px; }
  .voice-row input { width: 100%; }
  .voice-ask { width: 100%; }
  .voice-chips { gap: 6px; }
  .vchip { font-size: 0.75rem; padding: 4px 10px; }

  /* === HERO === */
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 2rem; letter-spacing: -0.03em; }
  .hero-sub { font-size: 0.9375rem; }
  .hero-pill { font-size: 0.75rem; padding: 4px 12px; }

  /* Bridge stones: smaller on mobile */
  .stone { height: 28px; font-size: 0.6rem; }
  .bridge-wrap { padding: 0 0.5rem; }

  /* Badge row: scrollable */
  .badge-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
  .badge-row::-webkit-scrollbar { display: none; }
  .badge { white-space: nowrap; flex-shrink: 0; }

  /* CTA row: stack */
  .cta-row { flex-direction: column; align-items: center; }
  .btn-primary, .btn-ghost { width: 100%; max-width: 320px; }

  /* === SECTIONS STRIP === */
  .sec-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sec-pill { padding: 1rem; }
  .sec-pill .sn { font-size: 1.5rem; }
  .sec-pill .st { font-size: 0.875rem; }

  /* === FEATURES === */
  .feat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feat-card { padding: 1.125rem; }
  .feat-ico  { width: 36px; height: 36px; font-size: 1.125rem; }
  .feat-card h3 { font-size: 0.9rem; }
  .feat-card p  { font-size: 0.825rem; }

  /* === PRICING === */
  .price-grid { grid-template-columns: 1fr; }
  .pcard { padding: 1.5rem; }
  .plan-price .amt { font-size: 2rem; }
  .g-box { font-size: 0.875rem; }
  .cki { font-size: 0.875rem; }
  .plan-btn { padding: 12px; font-size: 0.9375rem; }

  /* === STEPS === */
  .step { gap: 12px; padding: 1rem 0; }
  .step-num  { width: 34px; height: 34px; font-size: 0.875rem; flex-shrink: 0; }
  .step-body h3 { font-size: 0.9375rem; }
  .step-body p  { font-size: 0.875rem; }

  /* === TESTIMONIALS === */
  .tgrid { grid-template-columns: 1fr; }
  .tcard blockquote { font-size: 0.875rem; }

  /* === FAQ === */
  .faq-item h3 { font-size: 0.9375rem; }
  .faq-item p  { font-size: 0.875rem; }

  /* === FINAL CTA === */
  .fcta { padding: 2.5rem 1.25rem; }
  .fcta h2 { font-size: 1.625rem; }
  .fcta p  { font-size: 0.9375rem; }

  /* === FOOTER === */
  .footer { flex-direction: column; text-align: center; padding: 1.25rem; }

  /* ════════════════════════════════
     QUIZ PORTAL MOBILE
     ════════════════════════════════ */

  /* === LOGIN SCREEN === */
  .login-left  { padding: 2rem 1.25rem; gap: 1.75rem; }
  .login-heading { font-size: 2.5rem; }
  .login-right { padding: 1.75rem 1.25rem; }
  .login-card  { max-width: 100%; }
  .login-card-title { font-size: 1.5rem; }
  .stats-row { gap: 16px; }
  .stat-block .num { font-size: 1.75rem; }
  .login-tags { gap: 6px; }
  .ltag { font-size: 0.75rem; padding: 4px 10px; }

  /* Auth buttons */
  .auth-btn { padding: 12px 14px; font-size: 0.875rem; }
  .auth-divider { margin: 0.875rem 0; }

  /* === NAVBAR === */
  .navbar { height: auto; padding: 0; }
  .nav-inner { height: 54px; padding: 0 1rem; flex-wrap: nowrap; gap: 6px; }
  .brand-name { font-size: 0.875rem; }
  .user-pill  { font-size: 0.75rem; padding: 4px 10px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-nav { padding: 6px 10px; font-size: 0.75rem; }
  .bol-bihar-btn-sm { padding: 7px 10px; border-radius: 8px; }

  /* Portal voice panel */
  .portal-voice-inner { padding: 0.875rem 1rem; }
  .voice-row { flex-direction: column; }
  .voice-row input { width: 100%; }
  .voice-ask { width: 100%; }

  /* === DASHBOARD === */
  .dash-wrap { padding: 1rem 1rem 3rem; }
  .dash-banner { padding: 1.5rem; border-radius: 14px; }
  .dash-greeting { font-size: 1.25rem; }
  .dash-sub { font-size: 0.875rem; }
  .modes-label { font-size: 0.7rem; }
  .modes-grid { grid-template-columns: 1fr; gap: 10px; }
  .mode-tile { padding: 1.125rem 1.25rem; gap: 12px; border-radius: 12px; }
  .mode-tile-icon { font-size: 1.5rem; }
  .mode-tile-name { font-size: 0.9375rem; }
  .mode-tile-desc { font-size: 0.75rem; }
  .mode-tile-badge { font-size: 0.625rem; padding: 2px 8px; }

  /* Improvement panel */
  .improv-panel { padding: 1.25rem; }
  .topic-bar-row { grid-template-columns: 80px 1fr 70px; gap: 8px; }
  .topic-bar-label { font-size: 0.75rem; }
  .topic-bar-pct   { font-size: 0.75rem; }
  .delta-badge     { font-size: 0.625rem; padding: 1px 5px; }

  /* History table: scrollable */
  .history-wrap { overflow-x: auto; }
  .history-table { min-width: 500px; }
  .history-table td, .history-table th { padding: 10px 12px; font-size: 0.8125rem; }

  /* === QUIZ SCREEN === */
  .quiz-topbar { height: 52px; padding: 0 1rem; }
  .quiz-meta { flex: 1; overflow: hidden; }
  .quiz-mode-pill { font-size: 0.75rem; padding: 4px 10px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quiz-clock { font-size: 0.875rem; padding: 4px 10px; }
  .quiz-score-live { font-size: 0.8125rem; }
  .quiz-progress-label { padding: 5px 1rem 0; font-size: 0.75rem; }
  .quiz-body { padding: 1rem; }
  .quiz-section-divider { font-size: 0.7rem; margin: 1.75rem 0 1rem; }

  /* Question card */
  .q-card { padding: 1.25rem; border-radius: 12px; margin-bottom: 10px; }
  .q-en { font-size: 0.9375rem; }
  .q-hi { font-size: 0.875rem; padding-left: 10px; }
  .q-meta { gap: 5px; margin-bottom: 10px; }
  .badge { font-size: 0.7rem; padding: 2px 7px; }
  .q-num { font-size: 0.75rem; }

  /* Options */
  .options { gap: 7px; }
  .opt { padding: 10px 12px; font-size: 0.875rem; min-height: 44px; gap: 10px; border-radius: 8px; }
  .opt-label { min-width: 20px; font-size: 0.75rem; }
  .q-note { font-size: 0.875rem; padding: 10px 12px; margin-top: 10px; }

  /* Bottom bar */
  .quiz-bottombar { padding: 10px 1rem; }
  .quiz-answered-lbl { font-size: 0.75rem; }
  .btn-submit { padding: 10px 18px; font-size: 0.875rem; }

  /* FAB position */
  .bol-bihar-fab { bottom: 76px; right: 16px; width: 52px; height: 52px; font-size: 1.25rem; }
  .fab-label { font-size: 0.45rem; }

  /* Score popup: bottom center */
  .score-popup { top: auto; bottom: 80px; right: 50%; transform: translateX(50%) translateY(20px); min-width: 150px; padding: 11px 16px; }
  .score-popup.popup-show { transform: translateX(50%) translateY(0); }
  .popup-score { font-size: 1.625rem; }
  .popup-result { font-size: 0.875rem; }

  /* === RESULTS SCREEN === */
  .results-wrap { padding: 1.25rem 1rem 3rem; }
  .results-nav  { margin-bottom: 1.25rem; }
  .results-hero { padding: 1.5rem; border-radius: 14px; gap: 1.5rem; }
  .score-ring   { width: 110px; height: 110px; }
  .ring-pct     { font-size: 1.375rem; }
  .results-title { font-size: 1.25rem; }
  .results-grade { font-size: 0.875rem; }
  .results-stat-row { gap: 8px; }
  .rstat { padding: 9px 12px; min-width: 60px; }
  .rstat span  { font-size: 1.25rem; }
  .rstat label { font-size: 0.7rem; }

  .sec-breakdown { padding: 1.25rem; border-radius: 12px; }
  .sec-breakdown h3 { font-size: 0.9375rem; margin-bottom: 1rem; }
  .breakdown-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .breakdown-item { padding: 0.875rem; }
  .b-pct  { font-size: 1.375rem; }
  .b-label { font-size: 0.75rem; }

  .improv-card { padding: 1.25rem; border-radius: 12px; }
  .weak-panel  { padding: 1.25rem; border-radius: 12px; }
  .weak-panel h3 { font-size: 0.9375rem; }
  .weak-item { padding: 10px 12px; }
  .weak-item .w-text { font-size: 0.8125rem; }

  .results-actions { flex-direction: column; }
  .results-actions .btn-submit  { width: 100%; padding: 12px; }
  .results-actions .btn-outline { width: 100%; padding: 11px; }

  .review-wrap { padding: 1.25rem; }
  .section-heading { font-size: 0.9375rem; }

  /* === LEADERBOARD === */
  .lb-wrap { padding: 1.25rem 1rem 3rem; }
  .lb-heading { font-size: 1.25rem; }
  .lb-tabs { gap: 3px; }
  .lb-tab  { font-size: 0.75rem; padding: 8px 6px; }
  .lb-entry { padding: 11px 12px; gap: 10px; border-radius: 12px; }
  .lb-name  { font-size: 0.875rem; }
  .lb-org   { font-size: 0.75rem; }
  .lb-pct   { font-size: 1.25rem; }
  .lb-detail{ font-size: 0.7rem; }
  .lb-avatar{ width: 36px; height: 36px; font-size: 0.875rem; }
  .lb-rank  { width: 30px; font-size: 1rem; }

  /* === ADMIN LOGIN === */
  .admin-login-card { padding: 1.75rem 1.25rem; border-radius: 14px; }
  .admin-login-title { font-size: 1.375rem; }

  /* === ADMIN DASHBOARD === */
  .admin-wrap { padding: 1rem 1rem 3rem; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .admin-stat-card { padding: 1rem; border-radius: 10px; }
  .asc-num { font-size: 1.625rem; }
  .admin-tabs { gap: 3px; }
  .admin-tab  { font-size: 0.75rem; padding: 8px 8px; }
  .admin-search-row { flex-direction: column; gap: 8px; }
  .admin-search-input { width: 100%; }
  .admin-table-wrap { border-radius: 10px; }
  .admin-table th, .admin-table td { padding: 10px 12px; font-size: 0.8125rem; }
  .sec-analysis-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sac-avg { font-size: 1.75rem; }

  /* === MODAL === */
  .modal-overlay { padding: 1rem; align-items: flex-end; }
  .modal-box { border-radius: 18px 18px 14px 14px; padding: 1.75rem 1.25rem 1.25rem; max-width: 100%; }
  .modal-title { font-size: 1.125rem; }
  .modal-sub   { font-size: 0.875rem; }

  /* === PROFILE MODAL === */
  .admin-login-wrap { padding: 1rem; }
}

/* ── 480px: Small phones ── */
@media (max-width: 480px) {
  html { font-size: 14px; }

  .login-heading { font-size: 2.25rem; }
  .hero h1 { font-size: 1.875rem; }
  .stat-num { font-size: 2rem; }

  .modes-grid { gap: 8px; }
  .mode-tile-name { font-size: 0.9rem; }

  .breakdown-grid { grid-template-columns: 1fr; }

  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .sec-analysis-grid { grid-template-columns: 1fr; }

  .feat-grid { grid-template-columns: 1fr; }

  .price-grid { grid-template-columns: 1fr; }

  /* Quiz options full width */
  .opt { padding: 10px 10px; }

  .bol-bihar-fab { width: 48px; height: 48px; bottom: 70px; right: 12px; }
}

/* ══════════════════════════════════════════════════
   BOL BIHAR — Featured prominent button in navbar
   ══════════════════════════════════════════════════ */
.bb-featured-btn {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 22px 12px 16px;
  background: linear-gradient(135deg, #0C447C 0%, #1a56db 100%);
  color: white; border: none; border-radius: 50px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 20px rgba(12,68,124,0.45), 0 2px 8px rgba(12,68,124,0.25);
  transition: transform 0.18s, box-shadow 0.18s;
  overflow: hidden;
  min-width: 200px;
}
.bb-featured-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  border-radius: inherit;
}
.bb-featured-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(12,68,124,0.48), 0 2px 8px rgba(12,68,124,0.25);
}
.bb-featured-btn:active { transform: scale(0.97); }

.bb-f-icon {
  font-size: 1.5rem;
  animation: bb-wiggle 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes bb-wiggle {
  0%, 90%, 100% { transform: rotate(0deg); }
  92%           { transform: rotate(-12deg); }
  96%           { transform: rotate(10deg); }
}
.bb-f-text {
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.02em; white-space: nowrap;
  line-height: 1.2;
}
.bb-f-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.7);
  animation: bb-live 2s infinite;
}
@keyframes bb-live {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ── Nav user block ── */
.nav-user-block {
  display: flex; align-items: center;
}

/* ── Nav icon button (leaderboard) ── */
.nav-icon-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  background: var(--off); color: var(--ink);
  border: 1px solid var(--border2); border-radius: 50px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  font-family: inherit; white-space: nowrap;
}
.nav-icon-btn:hover {
  background: var(--off2); border-color: rgba(0,0,0,0.28);
}

/* ── Sign out button ── */
.nav-signout-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  background: transparent; color: var(--ink3);
  border: 1px solid var(--border); border-radius: 50px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.nav-signout-btn:hover {
  background: var(--red-l); color: var(--red);
  border-color: #f09595;
}
.nav-signout-btn svg { flex-shrink: 0; }

/* ── Portal voice panel — remove "Sarvam AI" sub-text ── */
.pv-title { font-size: 0.9375rem; font-weight: 700; color: #111; }

/* ══════════════════════════════════════════════════
   MOBILE: Bol Bihar button adjustments
   ══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .bb-featured-btn { padding: 8px 12px; }
  .bb-f-text { display: none; }
  .bb-f-icon { font-size: 1.1rem; }
  .bb-f-dot  { width: 6px; height: 6px; }

  .nav-icon-btn { padding: 7px 10px; font-size: 0.8125rem; }
  .nav-icon-btn span:last-child { display: none; }
  .nav-signout-btn { padding: 7px 10px; }
  .nav-signout-btn span { display: none; }
}
@media (max-width: 400px) {
  .nav-user-block { display: none; }
}

/* ══════════════════════════════════════════════════
   PREMIUM BANNER — Dashboard
   ══════════════════════════════════════════════════ */
.premium-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #fef3cd, #fffbeb);
  border: 1.5px solid #d4a017; border-radius: 14px;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.pb-left   { display: flex; align-items: center; gap: 12px; }
.pb-icon   { font-size: 1.5rem; }
.pb-title  { font-size: 0.9375rem; font-weight: 700; color: #111; }
.pb-sub    { font-size: 0.8125rem; color: #888; margin-top: 2px; }
.pb-btn    {
  padding: 9px 20px; background: #0C447C; color: white;
  border: none; border-radius: 50px; font-size: 0.875rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  font-family: inherit;
}
.pb-btn:hover { background: #0d3580; }

/* ══════════════════════════════════════════════════
   TRIAL RESULTS OVERLAY
   ══════════════════════════════════════════════════ */
.trial-results-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 1.5rem;
  backdrop-filter: blur(4px);
}
.trial-results-box {
  background: #ffffff; border-radius: 24px;
  width: 100%; max-width: 640px;
  padding: 2rem; margin: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  animation: trialIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes trialIn {
  from { opacity:0; transform: scale(0.92) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

/* Score header */
.trial-score-header {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.trial-score-ring {
  position: relative; width: 110px; height: 110px; flex-shrink: 0;
}
.trial-score-ring svg { width: 100%; height: 100%; }
.trial-ring-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.trial-ring-pct { font-size: 1.5rem; font-weight: 800; color: #111; line-height: 1; }
.trial-ring-lbl { font-size: 0.6875rem; color: #888; margin-top: 2px; }

.trial-score-meta { flex: 1; }
.trial-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  padding: 3px 12px; border-radius: 20px;
  background: #e8f0fe; color: #0c3580; margin-bottom: 8px;
}
.trial-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 10px; color: #111; }
.trial-stat-row { display: flex; gap: 10px; }
.trial-stat {
  text-align: center; padding: 8px 14px;
  background: #f6f5f2; border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
}
.trial-stat span  { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1; }
.trial-stat label { font-size: 0.7rem; color: #888; display: block; margin-top: 3px; }
.trial-stat.green span { color: #1a7f5a; }
.trial-stat.red   span { color: #c0392b; }
.trial-stat.grey  span { color: #888; }

/* Insight box */
.trial-insight {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; background: #e8f0fe;
  border-radius: 12px; border-left: 3px solid #1a56db;
  margin-bottom: 1.25rem; font-size: 0.9rem;
  color: #0c3580; line-height: 1.6;
}
.insight-icon { font-size: 1.25rem; flex-shrink: 0; }

/* Section breakdown */
.trial-sec-breakdown {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 1.25rem;
}
.trial-sec-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #f6f5f2; border-radius: 10px;
  gap: 10px;
}
.trial-sec-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.trial-sec-icon { font-size: 1.25rem; flex-shrink: 0; }
.trial-sec-name { font-size: 0.875rem; font-weight: 600; color: #111; }
.trial-sec-sub  { font-size: 0.75rem; color: #aaa; }
.trial-sec-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 80px; }
.trial-sec-pct {
  font-size: 0.875rem; font-weight: 700;
  padding: 2px 10px; border-radius: 20px; white-space: nowrap;
}
.trial-bar { height: 5px; background: #e0ddd6; border-radius: 3px; width: 80px; overflow: hidden; }
.trial-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }

/* Help box */
.trial-help-box {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: #e3f5ed;
  border-radius: 12px; border-left: 3px solid #1a7f5a;
  margin-bottom: 1.25rem; font-size: 0.875rem;
  color: #0f4a30; line-height: 1.65;
}
.trial-help-icon { font-size: 1.5rem; flex-shrink: 0; }

/* Locked preview chips */
.trial-locked-preview { margin-bottom: 1.5rem; }
.tlp-label {
  font-size: 0.8125rem; font-weight: 600; color: #888;
  margin-bottom: 8px;
}
.tlp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tlp-chip {
  font-size: 0.75rem; padding: 4px 12px;
  background: #fdecea; color: #c0392b;
  border: 1px solid #f09595; border-radius: 20px;
}
.tlp-chip::before { content: '🔒 '; }

/* Plan cards */
.trial-plans-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 1.25rem;
}
.trial-plan-card {
  background: #f6f5f2; border: 1.5px solid rgba(0,0,0,0.10);
  border-radius: 14px; padding: 1.25rem; text-align: center;
}
.tpc-featured {
  background: linear-gradient(135deg, #e8f0fe, #f0f4ff);
  border-color: #1a56db;
}
.tpc-badge {
  font-size: 0.7rem; font-weight: 700; color: #0c3580;
  margin-bottom: 6px;
}
.tpc-name  { font-size: 0.8125rem; font-weight: 600; color: #888; margin-bottom: 4px; }
.tpc-price { font-size: 1.75rem; font-weight: 800; color: #111; margin-bottom: 4px; line-height: 1; }
.tpc-desc  { font-size: 0.75rem; color: #888; margin-bottom: 1rem; line-height: 1.4; }
.tpc-btn   {
  width: 100%; padding: 10px; border-radius: 50px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.tpc-ghost { background: transparent; color: #111; border: 1.5px solid rgba(0,0,0,0.2); }
.tpc-ghost:hover { background: #edebe6; }
.tpc-solid { background: #0C447C; color: white; border: none; }
.tpc-solid:hover { background: #0d3580; }

/* Coupon section */
.trial-coupon-section {
  background: #f6f5f2; border-radius: 12px;
  padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.trial-coupon-label {
  font-size: 0.875rem; font-weight: 600; color: #111; margin-bottom: 10px;
}
.trial-coupon-row { display: flex; gap: 8px; }
.trial-coupon-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid rgba(0,0,0,0.18); border-radius: 10px;
  font-size: 0.9375rem; background: white; color: #111;
  outline: none; font-family: inherit; letter-spacing: 0.08em;
}
.trial-coupon-input:focus { border-color: #1a56db; }
.trial-coupon-btn {
  padding: 10px 20px; background: #0C447C; color: white;
  border: none; border-radius: 10px; font-size: 0.875rem;
  font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.trial-coupon-btn:hover { background: #0d3580; }
.trial-coupon-msg {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
}
.trial-retry-btn {
  background: none; border: none; color: #888;
  font-size: 0.875rem; cursor: pointer; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px;
}
.trial-retry-btn:hover { color: #111; }

/* ══════════════════════════════════════════════════
   ADMIN — COUPON GENERATOR
   ══════════════════════════════════════════════════ */
.coupon-generator-card {
  background: white; border: 1.5px solid rgba(0,0,0,0.10);
  border-radius: 16px; padding: 1.75rem;
  margin-bottom: 1.75rem;
}
.cg-title { font-size: 1rem; font-weight: 700; color: #111; margin-bottom: 1.25rem; }
.cg-form  {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 12px; margin-bottom: 1.25rem;
}
.cg-field { display: flex; flex-direction: column; gap: 6px; }
.cg-field label {
  font-size: 0.8125rem; font-weight: 600; color: #555;
}
.cg-field input, .cg-field select {
  padding: 9px 12px; border: 1.5px solid rgba(0,0,0,0.18);
  border-radius: 8px; font-size: 0.9rem; font-family: inherit;
  background: #f6f5f2; color: #111; outline: none;
}
.cg-field input:focus, .cg-field select:focus {
  border-color: #1a56db; background: white;
}
.cg-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cg-success-box {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #e3f5ed;
  border-radius: 10px; font-size: 0.875rem; color: #0f4a30;
  border: 1px solid #1a7f5a;
}
.coupon-list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.coupon-code-cell {
  font-family: monospace; font-size: 0.9rem; font-weight: 700;
  background: #f6f5f2; padding: 3px 8px; border-radius: 6px;
  color: #0C447C; letter-spacing: 0.05em;
}
.coupon-type-badge {
  font-size: 0.75rem; font-weight: 600; padding: 2px 9px; border-radius: 20px;
}
.coupon-type-single { background: #e8f0fe; color: #0c3580; }
.coupon-type-multi  { background: #ede9fe; color: #5c3dce; }
.coupon-action-btn {
  font-size: 0.75rem; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; margin-right: 4px;
  font-family: inherit; border: 1px solid transparent;
}
.coupon-deactivate { background: #fdecea; color: #c0392b; border-color: #f09595; }
.coupon-activate   { background: #e3f5ed; color: #1a7f5a; border-color: #1a7f5a; }
.coupon-copy       { background: #f6f5f2; color: #555; border-color: rgba(0,0,0,0.15); }

/* ── Mobile trial results ── */
@media (max-width: 640px) {
  .trial-results-box { padding: 1.25rem; border-radius: 18px; }
  .trial-score-header { flex-direction: column; align-items: center; text-align: center; }
  .trial-score-ring { width: 90px; height: 90px; }
  .trial-ring-pct { font-size: 1.25rem; }
  .trial-plans-row { grid-template-columns: 1fr; }
  .trial-coupon-row { flex-direction: column; }
  .trial-coupon-btn { width: 100%; }
  .cg-form { grid-template-columns: 1fr; }
  .premium-banner { flex-direction: column; align-items: flex-start; }
}

/* ── Magic link "check your email" panel ── */
.magic-sent-box {
  text-align: center; padding: 1.75rem 1.25rem;
  background: #e8f0fe; border: 1.5px solid #b5d4f4;
  border-radius: 16px;
}
.msb-icon  { font-size: 2.5rem; margin-bottom: 0.75rem; }
.msb-title { font-size: 1.125rem; font-weight: 700; color: #0c3580; margin-bottom: 8px; }
.msb-text  { font-size: 0.9375rem; color: #0c3580; line-height: 1.65; }
.msb-hint  { font-size: 0.8125rem; color: #5a7fb0; margin-top: 12px; }

/* ── Spam-folder warning inside the magic link panel ── */
.msb-warn {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fef3cd; border: 1.5px solid #d4a017;
  border-radius: 10px; padding: 12px 14px;
  margin-top: 14px; text-align: left;
}
.msb-warn-icon { font-size: 1.125rem; flex-shrink: 0; line-height: 1.4; }
.msb-warn strong { color: #7a4a08; font-size: 0.9rem; }
.msb-warn-sub {
  font-size: 0.8125rem; color: #92580b;
  line-height: 1.55; display: block; margin-top: 3px;
}
.msb-warn-sub strong { font-size: 0.8125rem; }

/* ── Language toggle ── */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 7px 13px; border-radius: 50px;
  background: var(--off); border: 1px solid var(--border2);
  font-family: inherit; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
  white-space: nowrap; flex-shrink: 0;
}
.lang-toggle:hover { background: var(--off2); border-color: rgba(0,0,0,.3); }
.lt-active { color: #0C447C; }
.lt-dim    { color: #aaa; font-weight: 500; }
.lt-sep    { color: #ccc; font-weight: 400; }

.lang-toggle-login {
  display: block; width: 100%; margin-bottom: 10px;
  padding: 9px; text-align: center;
  font-size: 0.8125rem; color: var(--ink2); font-weight: 500;
}
@media (max-width: 640px) {
  .lang-toggle { padding: 6px 9px; font-size: 0.75rem; }
}

/* ══════════════════════════════════════════════════
   TABLET + TOUCH TARGET FIXES
   Added last so these rules win over earlier ones.
   ══════════════════════════════════════════════════ */

/* ── 1. TABLET LANDSCAPE (769px – 1024px) ──
   iPad landscape was falling through to desktop layout. */
@media (min-width: 769px) and (max-width: 1024px) {

  /* Login: keep two columns but rebalance — brand panel was crushing the form */
  .login-grid  { grid-template-columns: 0.85fr 1fr; }
  .login-left  { padding: 3rem 2.25rem; gap: 2rem; }
  .login-heading { font-size: 3.25rem; }
  .login-sub   { font-size: 0.9375rem; max-width: 300px; }
  .login-right { padding: 2.5rem 2rem; }
  .login-card  { max-width: 400px; }
  .stat-num    { font-size: 2rem; }
  .login-stats-row { gap: 18px; }

  /* Dashboard: 2 columns reads better than 3 cramped ones */
  .dash-wrap   { padding: 1.75rem 1.5rem 3rem; }
  .modes-grid  { grid-template-columns: repeat(2, 1fr); }
  .dash-banner { padding: 2rem; }

  /* Quiz body: tighter reading measure on tablet */
  .quiz-body   { max-width: 680px; padding: 1.5rem; }

  /* Results */
  .results-wrap    { padding: 1.75rem 1.5rem 3rem; }
  .breakdown-grid  { grid-template-columns: repeat(2, 1fr); }

  /* Admin: 3 stat cards per row fits; 4 does not */
  .admin-wrap        { padding: 1.75rem 1.5rem 3rem; }
  .admin-stats-row   { grid-template-columns: repeat(3, 1fr); }
  .sec-analysis-grid { grid-template-columns: repeat(2, 1fr); }

  /* Navbar has room for the full Bol Bihar label here */
  .bb-f-text   { display: inline; }
  .bb-sm-text  { display: inline; }
}

/* ── 2. LANDING PAGE TABLET (641px – 1024px) ──
   landing.html previously jumped desktop → 640px with nothing between. */
@media (min-width: 641px) and (max-width: 1024px) {
  .wrap        { padding: 0 1.75rem; }
  .hero        { padding: 3.5rem 0 2.5rem; }
  .hero h1     { font-size: clamp(2.25rem, 4.5vw, 3rem); }
  .hero-sub    { font-size: 1rem; max-width: 480px; }

  .sec-strip   { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .sec-pill    { padding: 1.25rem 1rem; }

  .feat-grid   { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .feat-card   { padding: 1.25rem; }

  /* Pricing side-by-side still works at this width, just tighter */
  .price-grid  { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pcard       { padding: 1.5rem; }
  .plan-price .amt { font-size: 2.25rem; }

  .tgrid       { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .bridge-wrap { max-width: 460px; }
  .fcta h2     { font-size: 1.875rem; }
}

/* ── 3. TOUCH TARGETS — 44px minimum on any touch device ──
   Uses a pointer query so desktop mouse users keep the compact look. */
@media (pointer: coarse) {

  .btn-nav,
  .nav-icon-btn,
  .nav-signout-btn,
  .btn-outline,
  .btn-back-q,
  .auth-link-sm,
  .lang-toggle {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* Leaderboard + admin tabs */
  .lb-tab,
  .admin-tab {
    min-height: 44px;
    display: flex; align-items: center; justify-content: center;
  }

  /* Admin coupon buttons were the worst offenders at ~24px */
  .coupon-action-btn {
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex; align-items: center;
    margin-bottom: 4px;
  }

  /* Mode tiles: full-width tap area */
  .mode-tile { min-height: 76px; }

  /* Quiz options — already adequate, but guarantee the floor */
  .opt { min-height: 48px; }

  /* Voice chips */
  .vchip { min-height: 36px; display: inline-flex; align-items: center; }

  /* Password reveal + modal close buttons */
  .pw-toggle { min-width: 44px; min-height: 44px; justify-content: center; display: flex; align-items: center; }

  /* Stop iOS auto-zooming on focus — triggers below 16px */
  input, select, textarea { font-size: 16px !important; }
}

/* ── 4. Prevent horizontal page scroll anywhere ── */
html, body { max-width: 100%; overflow-x: hidden; }

/* Long words / URLs shouldn't force the page wide */
.q-en, .q-hi, .opt-text, .q-note,
.feat-card p, .plan-desc, .cki,
.faq-item p, .step-body p {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Contact modal (copyable WhatsApp number, no redirect) ── */
.contact-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
}
.contact-box {
  position: relative; background: #fff; border-radius: 22px;
  padding: 2rem 1.75rem 1.75rem; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22); text-align: center;
  animation: contactIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes contactIn {
  from { opacity: 0; transform: scale(.93) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.contact-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 1.5rem;
  color: #aaa; cursor: pointer; line-height: 1;
  width: 36px; height: 36px; border-radius: 50%;
}
.contact-close:hover { background: #f6f5f2; color: #111; }
.contact-icon  { font-size: 2.25rem; margin-bottom: .5rem; }
.contact-title { font-size: 1.25rem; font-weight: 700; color: #111; margin-bottom: 4px; }
.contact-sub   { font-size: .875rem; color: #888; margin-bottom: 1.5rem; }
.contact-label {
  font-size: .7rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #aaa; margin-bottom: 8px;
}
.contact-number-row {
  display: flex; align-items: center; gap: 10px;
  background: #f6f5f2; border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 1.25rem;
}
.contact-number {
  flex: 1; font-size: 1.375rem; font-weight: 700;
  letter-spacing: .05em; color: #0C447C;
  user-select: all; -webkit-user-select: all; text-align: left;
}
.contact-copy-btn {
  padding: 9px 16px; background: #0C447C; color: #fff;
  border: none; border-radius: 9px; font-family: inherit;
  font-size: .8125rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; min-height: 40px;
}
.contact-copy-btn:hover { background: #0d3580; }
.contact-steps {
  display: flex; flex-direction: column; gap: 9px;
  text-align: left; margin-bottom: 1.25rem;
}
.cs-row { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: #444; }
.cs-n {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: #E8F0FE; color: #0C447C;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.contact-note {
  font-size: .8125rem; color: #888; line-height: 1.6;
  padding-top: 1rem; border-top: 1px solid rgba(0,0,0,.08);
}
@media (max-width: 480px) {
  .contact-box { padding: 1.75rem 1.25rem 1.25rem; }
  .contact-number { font-size: 1.25rem; }
}

/* ══════════════════════════════════════════════════
   PAYMENT MODAL (user-facing)
   ══════════════════════════════════════════════════ */
.pay-overlay{
  position:fixed;inset:0;z-index:3000;background:rgba(0,0,0,.55);
  backdrop-filter:blur(3px);display:flex;align-items:flex-start;
  justify-content:center;overflow-y:auto;padding:1.25rem;
}
.pay-box{
  position:relative;background:#fff;border-radius:22px;
  width:100%;max-width:420px;margin:auto;padding:1.75rem 1.5rem 1.5rem;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  animation:payIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes payIn{from{opacity:0;transform:scale(.94) translateY(16px);}to{opacity:1;transform:scale(1) translateY(0);}}
.pay-close{
  position:absolute;top:12px;right:14px;background:none;border:none;
  font-size:1.5rem;color:#aaa;cursor:pointer;line-height:1;
  width:36px;height:36px;border-radius:50%;
}
.pay-close:hover{background:#f6f5f2;color:#111;}
.pay-head{text-align:center;padding-bottom:1.25rem;border-bottom:1px solid rgba(0,0,0,.08);margin-bottom:1.25rem;}
.pay-plan-name{font-size:.8125rem;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.1em;}
.pay-amount{font-size:2rem;font-weight:800;color:#111;line-height:1.1;margin-top:4px;}
.pay-loading{text-align:center;padding:2rem 1rem;color:#888;font-size:.9375rem;}

.pay-qr-wrap{text-align:center;margin-bottom:1.25rem;}
.pay-qr{
  width:200px;height:200px;object-fit:contain;border-radius:14px;
  border:1.5px solid rgba(0,0,0,.1);background:#fff;padding:8px;
}
.pay-qr-hint{font-size:.8125rem;color:#888;margin-top:8px;}

.pay-field{margin-bottom:1rem;}
.pf-label{font-size:.7rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#aaa;margin-bottom:6px;}
.pf-row{
  display:flex;align-items:center;gap:10px;background:#f6f5f2;
  border:1.5px solid rgba(0,0,0,.12);border-radius:11px;padding:11px 13px;
}
.pf-value{flex:1;font-size:1.0625rem;font-weight:700;color:#0C447C;user-select:all;word-break:break-all;}
.pf-copy{
  padding:7px 13px;background:#0C447C;color:#fff;border:none;border-radius:8px;
  font-family:inherit;font-size:.75rem;font-weight:600;cursor:pointer;white-space:nowrap;min-height:36px;
}
.pf-copy.sm{padding:4px 10px;font-size:.7rem;min-height:30px;}
.pf-sub{font-size:.75rem;color:#888;margin-top:5px;}

.pay-bank{margin-bottom:1rem;border:1px solid rgba(0,0,0,.1);border-radius:11px;overflow:hidden;}
.pay-bank summary{padding:11px 14px;font-size:.875rem;font-weight:600;color:#444;cursor:pointer;background:#f6f5f2;}
.pay-bank-body{padding:12px 14px;display:flex;flex-direction:column;gap:9px;}
.pb-row{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:#888;}
.pb-row strong{color:#111;flex:1;user-select:all;}

.pay-note{
  background:#fef3cd;border-left:3px solid #d4a017;padding:11px 14px;
  font-size:.8125rem;color:#7a4a08;line-height:1.6;margin-bottom:1.25rem;border-radius:0 8px 8px 0;
}
.pay-divider{display:flex;align-items:center;gap:12px;margin:1.25rem 0;color:#aaa;font-size:.8125rem;font-weight:600;}
.pay-divider::before,.pay-divider::after{content:'';flex:1;height:1px;background:rgba(0,0,0,.1);}

.pay-file-btn{
  display:flex;align-items:center;justify-content:center;
  padding:14px;border:2px dashed rgba(0,0,0,.2);border-radius:12px;
  background:#f6f5f2;cursor:pointer;font-size:.9375rem;color:#444;
  transition:border-color .15s,background .15s;min-height:48px;
}
.pay-file-btn:hover{border-color:#0C447C;background:#E8F0FE;}
.pay-preview{width:100%;max-height:200px;object-fit:contain;border-radius:10px;margin-top:10px;border:1px solid rgba(0,0,0,.1);}
.pay-input{
  width:100%;padding:11px 14px;border:1.5px solid rgba(0,0,0,.18);
  border-radius:10px;font-family:inherit;font-size:.9375rem;background:#f6f5f2;color:#111;outline:none;
}
.pay-input:focus{border-color:#0C447C;background:#fff;}
.opt-lbl{color:#aaa;font-weight:400;text-transform:none;letter-spacing:0;}
.pay-error{
  background:#fdecea;color:#c0392b;border-left:3px solid #c0392b;
  padding:10px 13px;font-size:.8125rem;margin-top:12px;line-height:1.5;
}
.pay-submit{
  width:100%;padding:14px;background:#0C447C;color:#fff;border:none;
  border-radius:11px;font-family:inherit;font-size:1rem;font-weight:600;
  cursor:pointer;margin-top:14px;min-height:48px;
}
.pay-submit:hover{background:#0d3580;}
.pay-submit:disabled{opacity:.6;cursor:default;}
.pay-footnote{font-size:.75rem;color:#888;text-align:center;margin-top:12px;line-height:1.6;}

.pay-success{text-align:center;padding:1rem 0;}
.ps-icon{font-size:3rem;margin-bottom:.75rem;}
.ps-title{font-size:1.25rem;font-weight:700;color:#1a7f5a;margin-bottom:.5rem;}
.ps-text{font-size:.9375rem;color:#444;line-height:1.7;margin-bottom:.75rem;}
.ps-note{font-size:.8125rem;color:#888;margin-bottom:1rem;}

/* ══════════════════════════════════════════════════
   ADMIN — Payments tab
   ══════════════════════════════════════════════════ */
.pay-settings-card{
  background:#fff;border:1.5px solid rgba(0,0,0,.1);
  border-radius:16px;padding:1.75rem;margin-bottom:1.5rem;
}
.ps-grid{display:grid;grid-template-columns:1fr 240px;gap:1.5rem;}
.ps-left{display:flex;flex-direction:column;gap:12px;}
.cg-field textarea{
  padding:9px 12px;border:1.5px solid rgba(0,0,0,.18);border-radius:8px;
  font-family:inherit;font-size:.9rem;background:#f6f5f2;color:#111;
  outline:none;resize:vertical;line-height:1.6;
}
.cg-field textarea:focus{border-color:#1a56db;background:#fff;}
.ps-right{display:flex;flex-direction:column;gap:8px;}
.ps-qr-label{font-size:.8125rem;font-weight:600;color:#555;}
.ps-qr-box{
  width:100%;aspect-ratio:1;border:1.5px dashed rgba(0,0,0,.2);
  border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:#f6f5f2;overflow:hidden;
}
.ps-qr-img{width:100%;height:100%;object-fit:contain;padding:8px;}
.ps-qr-empty{font-size:.8125rem;color:#aaa;text-align:center;padding:1rem;}
.ps-qr-btn{
  display:flex;align-items:center;justify-content:center;padding:10px;
  background:#0C447C;color:#fff;border-radius:9px;font-size:.8125rem;
  font-weight:600;cursor:pointer;min-height:42px;
}
.ps-qr-btn:hover{background:#0d3580;}
.ps-qr-hint{font-size:.7rem;color:#aaa;text-align:center;line-height:1.5;}
.ps-bank-details{margin-top:1.25rem;border-top:1px solid rgba(0,0,0,.08);padding-top:1rem;}
.ps-bank-details summary{font-size:.875rem;font-weight:600;color:#555;cursor:pointer;}
.ps-updated{font-size:.75rem;color:#aaa;margin-top:10px;}

.pending-badge{
  display:inline-block;background:#fdecea;color:#c0392b;
  font-size:.75rem;font-weight:700;padding:2px 9px;border-radius:20px;margin-left:8px;
}
.pp-user{font-weight:600;color:#111;}
.pp-contact{font-size:.75rem;color:#888;margin-top:2px;}
.pp-view{color:#1a56db;font-weight:600;text-decoration:none;font-size:.8125rem;}
.pp-view:hover{text-decoration:underline;}
.pp-approve,.pp-reject{
  font-size:.75rem;font-weight:600;padding:6px 11px;border-radius:7px;
  cursor:pointer;font-family:inherit;border:1px solid transparent;margin-right:4px;min-height:34px;
}
.pp-approve{background:#e3f5ed;color:#1a7f5a;border-color:#1a7f5a;}
.pp-reject{background:#fdecea;color:#c0392b;border-color:#f09595;}
.pp-reviewed{font-size:.75rem;color:#aaa;}

@media(max-width:768px){
  .ps-grid{grid-template-columns:1fr;}
  .ps-right{max-width:260px;}
}
@media(max-width:640px){
  .pay-box{padding:1.5rem 1.25rem 1.25rem;}
  .pay-qr{width:170px;height:170px;}
  .pay-amount{font-size:1.75rem;}
}
@media(pointer:coarse){
  .pf-copy,.pp-approve,.pp-reject{min-height:40px;}
}

/* Proof view is now a button (signed URL), keep it looking like a link */
button.pp-view{
  background:none;border:none;padding:6px 2px;font-family:inherit;
  color:#1a56db;font-weight:600;font-size:.8125rem;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;
}
button.pp-view:hover{color:#0c3580;}
button.pp-view:disabled{opacity:.6;cursor:default;}
@media(pointer:coarse){ button.pp-view{min-height:40px;} }

/* ══════════════════════════════════════════════════
   FOCUS CTA — clickable weak-topic recommendation
   Replaces static "Focus: X needs work" text
   ══════════════════════════════════════════════════ */
.focus-cta {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #fdecea, #fef3f2);
  border: 1.5px solid #f09595;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  margin-top: 4px;
}
.focus-cta:hover {
  border-color: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192,57,43,.15);
}
.focus-cta:active { transform: scale(.98); }
.focus-cta-icon { font-size: 1.25rem; flex-shrink: 0; }
.focus-cta-text {
  flex: 1; font-size: .875rem; color: #7a2318; line-height: 1.5;
}
.focus-cta-text strong { color: #c0392b; }
.focus-cta-arrow {
  font-size: 1.125rem; color: #c0392b; flex-shrink: 0;
  transition: transform .15s;
}
.focus-cta:hover .focus-cta-arrow { transform: translateX(3px); }

/* ── Trial insight box — now clickable, scrolls to plans ── */
.trial-insight-cta {
  cursor: pointer;
  transition: background .15s, transform .15s;
  position: relative;
}
.trial-insight-cta:hover { background: #dbe8fc; transform: translateY(-1px); }
.trial-insight-cta:active { transform: scale(.99); }
.insight-arrow {
  font-size: 1rem; color: #1a56db; flex-shrink: 0;
  animation: insightBounce 1.6s ease-in-out infinite;
}
@keyframes insightBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

@media (pointer: coarse) {
  .focus-cta { min-height: 52px; padding: 14px 16px; }
  .trial-insight-cta { min-height: 52px; }
}
@media (max-width: 640px) {
  .focus-cta { padding: 12px 14px; gap: 10px; }
  .focus-cta-text { font-size: .8125rem; }
  .focus-cta-icon { font-size: 1.125rem; }
}

/* ══════════════════════════════════════════════════
   MASTERY CARD — dashboard preparation tracker
   ══════════════════════════════════════════════════ */
.mastery-card {
  background: var(--white); border: 1.5px solid var(--border2);
  border-radius: var(--rl); padding: 1.5rem; margin-bottom: 1.5rem;
}
.ms-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.ms-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.ms-sub   { font-size: .8125rem; color: var(--ink3); margin-top: 2px; }
.ms-score { text-align: right; flex-shrink: 0; }
.ms-score-num { font-size: 1.75rem; font-weight: 800; color: var(--navy); line-height: 1; }
.ms-score-lbl { font-size: .6875rem; color: var(--ink3); letter-spacing: .05em; text-transform: uppercase; }

/* Stacked progress bar */
.ms-bar {
  display: flex; height: 10px; border-radius: 6px;
  overflow: hidden; background: var(--off2); margin-bottom: 10px;
}
.ms-seg { height: 100%; transition: width .6s ease; }
.ms-mastered   { background: #1a7f5a; }
.ms-improving  { background: #7cc4a4; }
.ms-shaky      { background: #d4a017; }
.ms-struggling { background: #c0392b; }
.ms-unseen     { background: #ddd9d2; }

.ms-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: .75rem; color: var(--ink3); margin-bottom: 1.25rem;
}
.ms-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* Per-section rows — each is a shortcut into that section */
.ms-rows { display: flex; flex-direction: column; gap: 7px; }
.ms-row {
  width: 100%; display: grid;
  grid-template-columns: 22px 90px 1fr 40px 26px;
  align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  background: var(--off); border: 1px solid transparent;
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background .15s, border-color .15s;
}
.ms-row:hover { background: var(--off2); border-color: var(--border2); }
.ms-icon { font-size: 1rem; }
.ms-name { font-size: .8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-track { height: 6px; background: var(--off2); border-radius: 3px; overflow: hidden; }
.ms-fill  { display: block; height: 100%; border-radius: 3px; transition: width .6s ease; }
.ms-pct   { font-size: .75rem; font-weight: 700; color: var(--ink2); text-align: right; }
.ms-gap {
  font-size: .6875rem; font-weight: 700; color: #fff; background: #c0392b;
  border-radius: 20px; padding: 2px 0; text-align: center; min-width: 22px;
}
.ms-gap-none { font-size: .8125rem; color: #1a7f5a; text-align: center; }

@media (max-width: 640px) {
  .mastery-card { padding: 1.25rem; }
  .ms-row { grid-template-columns: 20px 68px 1fr 34px 24px; gap: 7px; padding: 8px; }
  .ms-name { font-size: .75rem; }
  .ms-score-num { font-size: 1.5rem; }
  .ms-legend { font-size: .6875rem; gap: 5px 10px; }
}
@media (pointer: coarse) { .ms-row { min-height: 44px; } }

/* ══════════════════════════════════════════════════
   REFER & EARN — user panel
   ══════════════════════════════════════════════════ */
.ref-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 1.25rem;
}
.ref-box {
  position: relative; background: #fff; border-radius: 22px;
  width: 100%; max-width: 440px; margin: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: refIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes refIn { from{opacity:0;transform:scale(.94) translateY(16px);} to{opacity:1;transform:scale(1) translateY(0);} }
.ref-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 1.5rem; color: #aaa;
  cursor: pointer; width: 36px; height: 36px; border-radius: 50%; line-height: 1;
}
.ref-close:hover { background: #f6f5f2; color: #111; }
.ref-loading { text-align: center; padding: 2rem 1rem; color: #888; font-size: .9375rem; }

.ref-head { display: flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; }
.ref-icon { font-size: 2rem; }
.ref-title { font-size: 1.25rem; font-weight: 700; color: #111; }
.ref-subtitle { font-size: .8125rem; color: #888; margin-top: 2px; }

/* Value proposition */
.ref-value-row { display: flex; align-items: center; gap: 8px; margin-bottom: 1.5rem; }
.ref-value-card {
  flex: 1; text-align: center; padding: 14px 10px;
  background: #f6f5f2; border-radius: 12px; border: 1px solid rgba(0,0,0,.08);
}
.ref-value-mine { background: #E8F0FE; border-color: #b5d4f4; }
.ref-value-amt { font-size: 1.375rem; font-weight: 800; color: #0C447C; line-height: 1; }
.ref-value-lbl { font-size: .6875rem; color: #888; margin-top: 4px; line-height: 1.4; }
.ref-value-plus { font-size: 1.125rem; color: #aaa; font-weight: 700; flex-shrink: 0; }

.ref-sec-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #aaa; margin-bottom: 8px;
}

/* Code display */
.ref-code-row {
  display: flex; align-items: center; gap: 10px;
  background: #f6f5f2; border: 1.5px dashed rgba(12,68,124,.3);
  border-radius: 12px; padding: 13px 15px; margin-bottom: 10px;
}
.ref-code {
  flex: 1; font-size: 1.25rem; font-weight: 800; color: #0C447C;
  letter-spacing: .08em; user-select: all;
}
.ref-copy-btn {
  padding: 8px 15px; background: #0C447C; color: #fff; border: none;
  border-radius: 9px; font-family: inherit; font-size: .8125rem;
  font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 38px;
}
.ref-copy-btn:hover { background: #0d3580; }
.ref-share-btn {
  width: 100%; padding: 12px; background: #1a7f5a; color: #fff;
  border: none; border-radius: 11px; font-family: inherit;
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  margin-bottom: 1.25rem; min-height: 46px;
}
.ref-share-btn:hover { background: #15664a; }

/* Stats */
.ref-stats { display: flex; gap: 8px; margin-bottom: 1.25rem; }
.ref-stat {
  flex: 1; text-align: center; padding: 11px 8px;
  background: #f6f5f2; border-radius: 10px; border: 1px solid rgba(0,0,0,.06);
}
.ref-stat span { display: block; font-size: 1.125rem; font-weight: 700; color: #111; line-height: 1; }
.ref-stat label { font-size: .6875rem; color: #888; display: block; margin-top: 4px; }
.ref-stat-green { color: #1a7f5a !important; }
.ref-stat-navy  { color: #0C447C !important; }

/* Enter a friend's code */
.ref-enter {
  background: #fffbeb; border: 1.5px solid #d4a017;
  border-radius: 12px; padding: 14px; margin-top: 1rem;
}
.ref-enter-row { display: flex; gap: 8px; }
.ref-input {
  flex: 1; padding: 10px 13px; border: 1.5px solid rgba(0,0,0,.18);
  border-radius: 9px; font-family: inherit; font-size: .9375rem;
  background: #fff; color: #111; outline: none;
  letter-spacing: .06em; font-weight: 600;
}
.ref-input:focus { border-color: #0C447C; box-shadow: 0 0 0 3px rgba(12,68,124,.1); }
.ref-apply-btn {
  padding: 10px 18px; background: #b45309; color: #fff; border: none;
  border-radius: 9px; font-family: inherit; font-size: .875rem;
  font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 42px;
}
.ref-apply-btn:hover { background: #92400e; }
.ref-enter-hint { font-size: .75rem; color: #92580b; margin-top: 8px; line-height: 1.5; }
.ref-msg { margin-top: 9px; padding: 8px 12px; border-radius: 8px; font-size: .8125rem; font-weight: 500; line-height: 1.5; }
.ref-used {
  background: #e3f5ed; border: 1.5px solid #1a7f5a; border-radius: 12px;
  padding: 13px 15px; font-size: .875rem; color: #0f4a30;
  line-height: 1.6; margin-top: 1rem;
}

/* Referral list */
.ref-list { display: flex; flex-direction: column; gap: 7px; }
.ref-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: #f6f5f2; border-radius: 10px; gap: 10px;
}
.ref-row-name { font-size: .875rem; font-weight: 600; color: #111; }
.ref-row-date { font-size: .75rem; color: #aaa; margin-top: 1px; }
.ref-row-right { text-align: right; flex-shrink: 0; }
.ref-row-amt { font-size: .9375rem; font-weight: 700; color: #0C447C; }
.ref-badge {
  display: inline-block; font-size: .625rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; margin-top: 3px;
  text-transform: uppercase; letter-spacing: .04em;
}
.ref-paid { background: #e3f5ed; color: #1a7f5a; }
.ref-qual { background: #fef3cd; color: #b45309; }
.ref-pend { background: #edebe6; color: #888; }
.ref-empty { text-align: center; padding: 1.5rem; color: #aaa; font-size: .875rem; }
.ref-terms {
  font-size: .75rem; color: #888; line-height: 1.65;
  padding-top: 1rem; margin-top: 1.25rem; border-top: 1px solid rgba(0,0,0,.08);
}

/* Nav entry point */
.nav-ref-btn { gap: 5px; }
.nav-ref-label { font-size: .8125rem; }

/* Admin toggle */
.ref-toggle {
  display: flex; align-items: center; gap: 10px;
  font-size: .9375rem; color: #444; cursor: pointer;
  padding: 10px 0;
}
.ref-toggle input { width: 18px; height: 18px; cursor: pointer; accent-color: #0C447C; }

@media (max-width: 640px) {
  .ref-box { padding: 1.5rem 1.25rem 1.25rem; }
  .ref-value-amt { font-size: 1.125rem; }
  .ref-code { font-size: 1.0625rem; }
  .ref-enter-row { flex-direction: column; }
  .ref-apply-btn { width: 100%; }
  .nav-ref-label { display: none; }
  .ref-stats { gap: 6px; }
  .ref-stat span { font-size: 1rem; }
}
@media (pointer: coarse) {
  .ref-copy-btn, .ref-apply-btn { min-height: 44px; }
  .ref-row { min-height: 52px; }
}

/* ── Referral discount shown in the payment header ── */
.pay-strike {
  font-size: 1.125rem; color: #aaa; text-decoration: line-through;
  line-height: 1; margin-bottom: 2px;
}
.pay-saved {
  display: inline-block; margin-top: 8px;
  font-size: .8125rem; font-weight: 600; color: #0f4a30;
  background: #e3f5ed; border: 1px solid #a8dcc6;
  padding: 4px 12px; border-radius: 20px;
}
@media (max-width: 640px) {
  .pay-strike { font-size: 1rem; }
  .pay-saved  { font-size: .75rem; }
}

/* ── Discounted price on trial-results plan cards ── */
.tpc-strike {
  font-size: .9375rem; color: #aaa; text-decoration: line-through;
  line-height: 1; margin-bottom: 2px;
}
.tpc-saved {
  display: inline-block; margin-top: 5px; margin-bottom: 2px;
  font-size: .6875rem; font-weight: 700; color: #0f4a30;
  background: #e3f5ed; border: 1px solid #a8dcc6;
  padding: 2px 9px; border-radius: 20px;
}
@media (max-width: 640px) {
  .tpc-strike { font-size: .875rem; }
  .tpc-saved  { font-size: .625rem; }
}

/* ══════════════════════════════════════════════════
   MOBILE GAPS — components added after the last pass
   ══════════════════════════════════════════════════ */
@media (max-width: 400px) {
  /* Two value cards + a "+" between them is too tight on a 320px screen */
  .ref-value-row  { flex-direction: column; gap: 6px; }
  .ref-value-plus { transform: rotate(90deg); font-size: .875rem; }
  .ref-value-card { width: 100%; padding: 10px; }
  .ref-value-amt  { font-size: 1.125rem; }

  /* Code + Copy side by side can overflow — stack them */
  .ref-code-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .ref-code     { font-size: 1rem; text-align: center; letter-spacing: .05em; }
  .ref-copy-btn { width: 100%; }
}

@media (max-width: 640px) {
  /* Spam-folder warning: tighter, and the icon shouldn't eat the line */
  .msb-warn      { padding: 10px 12px; gap: 8px; }
  .msb-warn strong    { font-size: .8125rem; }
  .msb-warn-sub       { font-size: .75rem; }
  .msb-warn-icon      { font-size: 1rem; }

  /* Long referral codes shouldn't force horizontal scroll */
  .ref-code { word-break: break-all; }
}

/* Nothing on any page may exceed the viewport width */
img, svg, video, table { max-width: 100%; }
.pay-qr, .ps-qr-img, .pay-preview { max-width: 100%; height: auto; }
