/* ============================================================================
   Flexing Data Labs — campus.css  ·  "The Living Campus"
   Warm-light brand system, mobile-first (360px), zero dependencies.
   Matches the site's gradient-button language (fd-shell.css).
   Bump LABS_ASSET_V in config.php after each change.
   ============================================================================ */

/* ── Brand tokens ─────────────────────────────────────────────────────────── */
:root {
  --ink:      #18222F;
  --ink2:     #44515F;
  --blue:     #0A96C7;
  --blue-deep:#0A7BA6;
  --coral:    #FF9D83;
  --cream:    #FFF4E9;
  --paper:    #FFFAF4;
  --navy:     #101820;
  --sky:      #62C1E0;
  --amber:    #FDCD75;
  --teal:     #5AC7A6;
  --violet:   #BFB0FF;
  --muted:    #6B7280;
  --line:     rgba(24,34,47,.10);
  --border:   #ECE2D6;
  --white:    #FFFFFF;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Warm, layered shadows — the signature soft depth */
  --sh-1: 0 1px 2px rgba(24,34,47,.04), 0 2px 8px rgba(24,34,47,.06);
  --sh-2: 0 4px 14px -4px rgba(24,34,47,.12), 0 12px 30px -12px rgba(24,34,47,.14);
  --sh-blue: 0 10px 22px -10px rgba(10,150,199,.6);
  --sh-glow: 0 18px 50px -18px rgba(10,150,199,.45);

  --grad-blue: linear-gradient(135deg, var(--blue), var(--blue-deep));
  --grad-warm: linear-gradient(135deg, var(--coral), var(--amber));

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

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

/* Self-contained horizontal-overflow guard (don't rely on fd-shell.css loading
   first / being un-cached). Nothing on /labs should ever scroll sideways.
   overflow-x only on <html> — on <body> too it turns body into its own scroll
   container and breaks .labs-top's position:sticky. */
html { overflow-x: hidden; max-width: 100%; }
body { max-width: 100%; }
.labs-shell, #labs-main, .labs-top { max-width: 100%; min-width: 0; }
#labs-main, #labs-main * { min-width: 0; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* Subtle warm gradient wash on the page background */
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(98,193,224,.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 5%, rgba(255,157,131,.08), transparent 55%),
    var(--cream);
  background-attachment: fixed;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Focused Labs app header (replaces the marketing nav on /labs) ────────── */
.labs-top {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 clamp(16px, 3vw, 36px);
  background: rgba(255,250,244,.88);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.labs-top-logo-wrap { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.labs-top-logo-exit {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--ink2);
  cursor: pointer; border-radius: 8px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.labs-top-logo-exit:hover { background: var(--paper); color: var(--ink); }
.labs-top-logo-exit:active { background: rgba(10,150,199,.15); }

.labs-top-logo {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding-right: 18px; border-right: 1px solid var(--line);
  cursor: default; color: inherit; text-decoration: none;
}
.labs-top-logo:hover { opacity: 1; }
.labs-top-logo img { height: 34px; width: auto; display: block; }
.labs-top-tag {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: .78rem;
  color: var(--blue-deep); background: rgba(10,150,199,.12); padding: 3px 10px; border-radius: 20px;
}
/* nav: roomy pill buttons spread across the bar */
.labs-top-nav { display: flex; align-items: center; gap: 4px; }
.labs-top-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* centre stat strip — fills the former dead space between nav and login */
.labs-top-stats { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.labs-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .85rem; color: var(--ink2);
  background: var(--paper); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
  transition: border-color .15s, color .15s, background .15s;
}
.labs-chip b { color: var(--ink); font-weight: 800; }
.labs-chip-ico { font-size: .95rem; line-height: 1; }
a.labs-chip { cursor: pointer; }
a.labs-chip:hover { border-color: var(--blue); color: var(--blue-deep); text-decoration: none; }
a.labs-chip:hover b { color: var(--blue-deep); }
/* lessons chip with a slim progress bar */
.labs-chip-prog .labs-chip-bar {
  display: inline-block; width: 56px; height: 6px; border-radius: 999px;
  background: rgba(16,24,32,.10); overflow: hidden; margin-left: 4px;
}
.labs-chip-prog .labs-chip-bar > span { display: block; height: 100%; background: var(--grad-blue); border-radius: 999px; }
/* guest call-to-action in place of the stats */
.labs-stats-cta {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .88rem; color: var(--blue-deep);
  background: rgba(10,150,199,.10); border: 1px solid rgba(10,150,199,.22);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.labs-stats-cta:hover { background: rgba(10,150,199,.18); }
.labs-top-link {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .9rem; color: var(--ink2);
  white-space: nowrap; padding: 9px 15px; border-radius: 11px; transition: background .15s, color .15s;
}
.labs-top-link:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.labs-top-link.active { background: rgba(10,150,199,.12); color: var(--blue-deep); }
.labs-top-btn {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .85rem;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 16px; border-radius: 11px; cursor: pointer; min-height: 40px; transition: all .15s;
}
.labs-top-btn:hover { border-color: var(--blue); color: var(--blue-deep); }
.labs-top-btn.primary { background: var(--grad-blue); color: #fff; border-color: transparent; box-shadow: var(--sh-blue); }

/* ── Announcements bell ───────────────────────────────────────────────────── */
.ann-bell-wrap { position: relative; flex: 0 0 auto; }
.ann-bell-btn {
  position: relative; width: 40px; height: 40px; border-radius: 11px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.ann-bell-btn:hover { border-color: var(--blue); background: var(--paper); }
.ann-bell-btn[aria-expanded="true"] { border-color: var(--blue); background: rgba(10,150,199,.08); }
.ann-bell-dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--coral); border: 2px solid #fff;
}
.ann-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 300;
  width: 340px; max-width: calc(100vw - 24px); background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-2);
  animation: dropIn .18s var(--ease-out);
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ann-drop-head {
  padding: 14px 18px 10px; font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: .9rem; color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.ann-drop-list { max-height: 380px; overflow-y: auto; padding: 8px 0; }
.ann-drop-item { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.ann-drop-item:last-child { border-bottom: none; }
.ann-drop-item h4 { font-size: .88rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.ann-drop-item p { font-size: .82rem; color: var(--ink2); line-height: 1.5; margin-bottom: 4px; }
.ann-drop-item small { font-size: .72rem; color: var(--muted); }
.ann-drop-empty { padding: 24px 18px; font-size: .85rem; color: var(--muted); text-align: center; }

.labs-menu-btn { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; border: none; background: none; cursor: pointer; flex: 0 0 auto; }
.labs-menu-btn span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ── App shell: curriculum rail + main (full width) ───────────────────────── */
.labs-shell {
  max-width: 1640px;
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 32px) 80px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
#labs-main { min-width: 0; } /* lets grid child shrink instead of overflowing */

/* Sidebar rail */
.labs-rail {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  box-shadow: var(--sh-1);
  max-height: calc(100vh - 92px);
  overflow-y: auto;
}
.rail-section {
  font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding: 14px 12px 7px;
}
.rail-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: .9rem;
  color: var(--ink2); cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; transition: background .15s, color .15s;
}
.rail-item:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.rail-item.active { background: rgba(10,150,199,.10); color: var(--blue-deep); }
.rail-ico { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.02rem; }
.rail-ico svg { width: 19px; height: 19px; }

.rail-progress-chip {
  margin-left: auto;
  font-size: .72rem; font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: rgba(10,150,199,.12); color: var(--blue-deep);
  border-radius: 999px; padding: 2px 9px;
  white-space: nowrap;
}
.rail-item:hover .rail-progress-chip,
.rail-item.active .rail-progress-chip {
  background: rgba(10,150,199,.22);
}

/* Uploaded track logos: sit inside the same icon boxes as the SVG icons,
   keeping their own colours (contain = no distortion). Sized per context below. */
.track-img { display: block; object-fit: contain; }
.rail-ico .track-img { width: 19px; height: 19px; }
.track-card-icon .track-img { width: 30px; height: 30px; }
.track-header-icon .track-img { width: 28px; height: 28px; }
.stn-dot .track-img { width: 26px; height: 26px; }
.lesson-video-placeholder .ph-icon .track-img { width: 100%; height: 100%; }
.rail-login { color: var(--blue-deep); margin-top: 4px; }

/* Curriculum tree (Udemy/LinkedIn style) */
.rail-track { align-items: flex-start; }
.rail-track .rail-track-title { flex: 1; white-space: normal; line-height: 1.3; }
.rail-frac { font-size: .7rem; font-weight: 800; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 1px 7px; flex-shrink: 0; }
.rail-chev { color: var(--muted); flex-shrink: 0; transition: transform .22s var(--ease); }
.rail-track-group.is-open > .rail-track .rail-chev { transform: rotate(180deg); }
.rail-track.is-active { background: color-mix(in srgb, var(--tc) 13%, white); color: var(--ink); }
.rail-track.is-active .rail-frac { background: #fff; }
.rail-sub { padding: 2px 0 6px; margin: 0 0 4px 22px; border-left: 2px solid var(--border); }
.rail-module { padding: 2px 0; }
.rail-module-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 4px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rail-lesson {
  display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border-radius: 9px;
  font-size: .84rem; font-weight: 500; color: var(--ink2); min-height: 40px;
  transition: background .15s, color .15s;
}
.rail-lesson:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.rail-lesson .rl-ico { width: 18px; flex-shrink: 0; text-align: center; font-size: .8rem; line-height: 1.4; }
.rail-lesson .rl-title { white-space: normal; line-height: 1.4; }
.rail-lesson.is-done .rl-ico { color: var(--teal); }
.rail-lesson.is-locked { opacity: .55; }
.rail-lesson.is-current { background: rgba(10,150,199,.12); color: var(--blue-deep); font-weight: 700; box-shadow: inset 3px 0 0 var(--blue); }
.rail-loading { padding: 6px; }

/* Mobile drawer scrim */
.rail-scrim { position: fixed; inset: 0; background: rgba(16,24,32,.5); z-index: 190; }


/* Announcements banner */
.announcements-banner {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  animation: slideDown .4s ease;
}
.announcements-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ann-icon { font-size: 20px; flex-shrink: 0; }
.ann-content h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.ann-content p { margin: 0; font-size: 13px; opacity: 0.95; }

/* Announcements section on home */
.announcements-section {
  margin: 40px 0;
  padding: 20px 0;
}
.announcements-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--ink);
}
.announcement-card {
  background: var(--cream);
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  border-left: 4px solid var(--blue);
}
.announcement-card h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
.announcement-card p { margin: 0 0 6px; font-size: 13px; color: var(--ink2); }
.announcement-card small { color: var(--muted); font-size: 12px; }

/* SPA view transition */
.labs-view-enter { animation: viewIn .42s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ── Loading: skeleton-friendly spinner ───────────────────────────────────── */
#labs-main.is-loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.labs-spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(10,150,199,.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skel { background: linear-gradient(100deg, #efe6da 30%, #f7f0e6 50%, #efe6da 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.labs-chip-skeleton { background: linear-gradient(100deg, #ede5da 30%, #f5ede3 50%, #ede5da 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; color: transparent; pointer-events: none; min-height: 28px; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.text-muted { color: var(--muted); font-size: .875rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: 20px; font-size: .72rem; font-weight: 700;
  letter-spacing: .01em;
}
.badge-blue   { background: rgba(10,150,199,.12); color: var(--blue-deep); }
.badge-coral  { background: rgba(255,157,131,.20); color: #c05a40; }
.badge-teal   { background: rgba(90,199,166,.20); color: #1e8a6e; }
.badge-amber  { background: rgba(253,205,117,.28); color: #8a6a00; }
.badge-violet { background: rgba(191,176,255,.28); color: #5d47c6; }
.badge-sky    { background: rgba(98,193,224,.22); color: #1670a0; }

/* ── Buttons (match fd-shell gradient language) ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 13px; font-size: .92rem; font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s;
  min-height: 46px; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { color: #fff; background: var(--grad-blue); box-shadow: var(--sh-blue); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(10,150,199,.7); }
.btn-warm { color: var(--navy); background: var(--grad-warm); box-shadow: 0 10px 22px -10px rgba(255,157,131,.7); }
.btn-warm:hover { color: var(--navy); transform: translateY(-2px); }
.btn-outline { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink2); }
.btn-ghost:hover { background: rgba(24,34,47,.05); color: var(--ink); }
.btn-sm { padding: 8px 15px; font-size: .82rem; min-height: 38px; border-radius: 10px; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
  /* overflow:clip clips painting (so border-radius works) but does NOT create a
     scroll container — child overflow-x:auto wrappers (e.g. leaderboard table)
     remain scrollable. Fallback to hidden for older browsers. */
  overflow: clip;
  overflow: hidden;
}
/* Browsers that support overflow:clip will use this rule (it overrides hidden) */
@supports (overflow: clip) {
  .card { overflow: clip; }
}

/* ── Section heads ────────────────────────────────────────────────────────── */
.labs-section { margin-top: 54px; }
.labs-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.labs-section-head h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 9px; }
.labs-section-head .see-all { font-size: .85rem; font-weight: 700; color: var(--blue-deep); display: inline-flex; align-items: center; gap: 4px; transition: gap .2s; }
.labs-section-head .see-all:hover { gap: 8px; }
.labs-eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }

/* ══════════════════════════════════════════════════════════════════════════
   HERO — animated aurora
   ══════════════════════════════════════════════════════════════════════════ */
.campus-hero {
  position: relative;
  text-align: center;
  padding: 60px 22px 50px;
  margin: 18px 0 8px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(180deg, #fffdfa, #fff6ec);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
}
/* Aurora blobs — GPU-friendly (transform/opacity only) */
.campus-hero .aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; filter: blur(46px); opacity: .55; }
.campus-hero .aurora b { position: absolute; border-radius: 50%; display: block; }
.campus-hero .aurora .a1 { width: 340px; height: 340px; left: -60px; top: -90px; background: radial-gradient(circle, rgba(98,193,224,.9), transparent 70%); animation: drift1 14s var(--ease) infinite alternate; }
.campus-hero .aurora .a2 { width: 300px; height: 300px; right: -50px; top: -60px; background: radial-gradient(circle, rgba(255,157,131,.85), transparent 70%); animation: drift2 17s var(--ease) infinite alternate; }
.campus-hero .aurora .a3 { width: 280px; height: 280px; left: 40%; bottom: -120px; background: radial-gradient(circle, rgba(191,176,255,.8), transparent 70%); animation: drift3 20s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-50px, 50px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(40px, -40px) scale(1.2); } }

.campus-hero > * { position: relative; z-index: 1; }
.campus-hero .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--blue-deep); border-radius: 30px; padding: 6px 16px;
  font-size: .8rem; font-weight: 800; margin-bottom: 20px;
  box-shadow: var(--sh-1);
}
.campus-hero h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); margin-bottom: 14px; }
.campus-hero h1 .grad { background: var(--grad-blue); -webkit-background-clip: text; background-clip: text; color: transparent; }
.campus-hero .lede { color: var(--ink2); max-width: 560px; margin: 0 auto 30px; font-size: clamp(1rem, 2.5vw, 1.18rem); }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Guest value pills under hero */
.hero-pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  border-radius: 30px; padding: 8px 15px; font-size: .82rem; font-weight: 600; color: var(--ink2);
  box-shadow: var(--sh-1);
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ══════════════════════════════════════════════════════════════════════════
   GUEST HERO (inline in center column)
   ══════════════════════════════════════════════════════════════════════════ */
.guest-hero-inline {
  position: relative;
  text-align: center;
  padding: 60px 22px 50px;
  margin: 0 0 28px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(180deg, #fffdfa, #fff6ec);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
}
/* Aurora blobs — GPU-friendly (transform/opacity only) */
.guest-hero-inline .aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; filter: blur(46px); opacity: .55; }
.guest-hero-inline .aurora b { position: absolute; border-radius: 50%; display: block; }
.guest-hero-inline .aurora .a1 { width: 340px; height: 340px; left: -60px; top: -90px; background: radial-gradient(circle, rgba(98,193,224,.9), transparent 70%); animation: drift1 14s var(--ease) infinite alternate; }
.guest-hero-inline .aurora .a2 { width: 300px; height: 300px; right: -50px; top: -60px; background: radial-gradient(circle, rgba(255,157,131,.85), transparent 70%); animation: drift2 17s var(--ease) infinite alternate; }
.guest-hero-inline .aurora .a3 { width: 280px; height: 280px; left: 40%; bottom: -120px; background: radial-gradient(circle, rgba(191,176,255,.8), transparent 70%); animation: drift3 20s var(--ease) infinite alternate; }

.guest-hero-inline > * { position: relative; z-index: 1; }
.guest-hero-inline .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--blue-deep); border-radius: 30px; padding: 6px 16px;
  font-size: .8rem; font-weight: 800; margin-bottom: 20px;
  box-shadow: var(--sh-1);
}
.guest-hero-inline h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); margin-bottom: 14px; }
.guest-hero-inline h1 .grad { background: var(--grad-blue); -webkit-background-clip: text; background-clip: text; color: transparent; }
.guest-hero-inline .lede { color: var(--ink2); max-width: 100%; margin: 0 auto 30px; font-size: clamp(1rem, 2.5vw, 1.18rem); }

/* ══════════════════════════════════════════════════════════════════════════
   CAMPUS DASHBOARD (logged-in greeting)
   ══════════════════════════════════════════════════════════════════════════ */
.campus-card {
  position: relative;
  margin: 18px 0 8px;
  padding: 28px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #15212e, #1d2d3e 60%, #25394d);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--sh-2);
}
.campus-card::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(10,150,199,.5), transparent 70%); filter: blur(20px);
}
.campus-card-in { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.cc-avatar {
  width: 64px; height: 64px; border-radius: 20px; flex-shrink: 0;
  background: var(--grad-warm); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.6rem;
  box-shadow: 0 8px 20px -6px rgba(255,157,131,.5);
}
.cc-greet { flex: 1; min-width: 200px; }
.cc-greet .hi { font-size: .85rem; color: rgba(255,255,255,.6); font-weight: 600; }
.cc-greet h2 { color: #fff; font-size: 1.7rem; margin: 2px 0 6px; }
.cc-rank { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; color: var(--amber); }

/* Level ring */
.cc-level { display: flex; align-items: center; gap: 14px; }
.level-ring { position: relative; flex-shrink: 0; }
.level-ring .lvl-num {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.level-ring .lvl-num .n { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.25rem; color: #fff; line-height: 1; }
.level-ring .lvl-num .lab { font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.cc-level .lvl-meta { font-size: .78rem; color: rgba(255,255,255,.7); }
.cc-level .lvl-meta b { color: #fff; }

/* Stat chips row */
.cc-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; position: relative; z-index: 1; }
.stat-chip {
  flex: 1; min-width: 120px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.stat-chip .ico { font-size: 1.5rem; line-height: 1; }
.stat-chip .v { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.3rem; color: #fff; line-height: 1; }
.stat-chip .l { font-size: .72rem; color: rgba(255,255,255,.6); margin-top: 3px; }

/* Animated streak flame */
.flame { display: inline-block; animation: flicker 1.6s ease-in-out infinite; transform-origin: bottom center; }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(2deg); } }

/* ══════════════════════════════════════════════════════════════════════════
   TRACK CARDS — tilt + shine
   ══════════════════════════════════════════════════════════════════════════ */
.labs-tracks { display: grid; grid-template-columns: 1fr; gap: 18px; }

.track-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
  --tc: var(--blue);
}
.track-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--tc);
  z-index: 2;
}
/* shine sweep on hover */
.track-card::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); transition: left .7s var(--ease); pointer-events: none; z-index: 3;
}
.track-card:hover { transform: translateY(-6px); box-shadow: var(--sh-2); }
.track-card:hover::after { left: 130%; }

.track-card-body { padding: 22px; }
.track-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.track-card-icon {
  width: 50px; height: 50px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tc) 14%, white);
  color: var(--tc);
}
.track-card-icon svg { width: 26px; height: 26px; }
.track-card h3 { font-size: 1.18rem; margin-bottom: 5px; }
.track-card .tagline { font-size: .88rem; color: var(--muted); margin-bottom: 16px; min-height: 2.4em; }
.track-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.track-card-meta .lessons { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }

/* mini progress bar inside card */
.tc-progress { margin-top: 14px; }
.tc-progress .bar { height: 7px; background: #eee5d8; border-radius: 6px; overflow: hidden; }
.tc-progress .fill { height: 100%; border-radius: 6px; background: var(--tc); transition: width .6s var(--ease-out); }
.tc-progress .lab { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* Progress ring (small, on card corner for logged-in) */
.prog-ring circle { transition: stroke-dashoffset .7s var(--ease-out); }
.prog-ring text { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; }

/* ══════════════════════════════════════════════════════════════════════════
   JOURNEY PATH
   ══════════════════════════════════════════════════════════════════════════ */
.journey {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 30px 26px; box-shadow: var(--sh-1);
}
.journey-head { margin-bottom: 24px; }
.journey-head h3 { font-size: 1.15rem; }
.journey-head p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.journey-track {
  display: flex; align-items: flex-start; gap: 0; position: relative;
  overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch;
}
.journey-node {
  flex: 1; min-width: 120px; text-align: center; position: relative; cursor: pointer;
}
.journey-node .connector {
  position: absolute; top: 27px; left: 50%; width: 100%; height: 3px;
  background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 14px);
  z-index: 0;
}
.journey-node:last-child .connector { display: none; }
.journey-dot {
  position: relative; z-index: 1; width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--border); color: var(--ink2);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.journey-node:hover .journey-dot { transform: translateY(-4px) scale(1.05); }
.journey-dot svg { width: 26px; height: 26px; }
.journey-node.is-start .journey-dot { border-color: var(--blue); color: var(--blue); box-shadow: var(--sh-blue); }
.journey-node .j-step { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.journey-node .j-title { font-size: .92rem; font-weight: 700; margin-top: 2px; }
.journey-node .j-flag { display: inline-block; margin-top: 5px; font-size: .68rem; font-weight: 800; color: var(--blue); }

/* ══════════════════════════════════════════════════════════════════════════
   LEADERBOARD
   ══════════════════════════════════════════════════════════════════════════ */
/* The leaderboard table scrolls horizontally inside this wrapper.
   Parent .card has overflow:hidden — override so the scrollbar isn't clipped. */
.labs-lb-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.labs-lb-toggle { display: inline-flex; gap: 4px; margin-bottom: 18px; background: #f1e7da; padding: 4px; border-radius: 30px; }
.labs-lb-toggle button {
  border: none; background: transparent; border-radius: 24px;
  padding: 8px 20px; font-size: .85rem; font-weight: 700; cursor: pointer;
  color: var(--muted); font-family: 'Plus Jakarta Sans', sans-serif; transition: all .2s;
}
.labs-lb-toggle button.active { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }

.labs-lb { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: .9rem; }
.labs-lb th {
  text-align: left; padding: 6px 14px; color: var(--muted); font-weight: 700; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .05em; cursor: pointer; user-select: none; white-space: nowrap;
}
.labs-lb th:hover { color: var(--blue-deep); }
.labs-lb th.sort-asc::after { content: ' ▲'; font-size: .7em; }
.labs-lb th.sort-desc::after { content: ' ▼'; font-size: .7em; }
.labs-lb tbody tr { background: #fff; box-shadow: var(--sh-1); transition: transform .15s, box-shadow .2s; }
.labs-lb tbody tr:hover { transform: translateX(3px); box-shadow: var(--sh-2); }
.labs-lb td { padding: 13px 14px; white-space: nowrap; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.labs-lb td:first-child { border-left: 1px solid var(--border); border-radius: var(--r) 0 0 var(--r); }
.labs-lb td:last-child { border-right: 1px solid var(--border); border-radius: 0 var(--r) var(--r) 0; }
.lb-rank { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; color: var(--muted); width: 44px; font-size: 1rem; }
.lb-medal { font-size: 1.2rem; }
.lb-name { font-weight: 700; }
.lb-name .lvl-tag { font-size: .68rem; font-weight: 700; color: var(--blue-deep); background: rgba(10,150,199,.1); border-radius: 10px; padding: 1px 7px; margin-left: 7px; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.lb-chip { font-size: .64rem; font-weight: 700; color: var(--blue-deep); background: rgba(10,150,199,.08); border: 1px solid rgba(10,150,199,.18); border-radius: 9px; padding: 1px 7px; white-space: nowrap; }
.lb-score { text-align: right; font-weight: 600; }
.lb-xp { font-weight: 800; color: var(--blue-deep); text-align: right; font-family: 'Plus Jakarta Sans', sans-serif; }
.lb-streak { text-align: right; }
.lb-null { color: #cdbfae; text-align: right; }
.lb-you { outline: 2px solid var(--blue); }
.lb-you td:first-child { position: relative; }

/* ── PRIZE BANNER ─────────────────────────────────────────────────────────── */
.lb-prize-banner {
  background: linear-gradient(135deg, rgba(255,157,131,.15) 0%, rgba(90,199,166,.10) 100%);
  border: 2px solid var(--coral);
  border-radius: 12px; padding: 18px 24px; margin-top: 32px; margin-bottom: 28px;
  display: flex; flex-direction: column; gap: 14px;
  font-weight: 700; color: var(--ink);
}
.lb-prize-banner > div:first-child {
  font-size: .95rem; line-height: 1.6; text-align: center; font-weight: 700;
}
.lb-prize-banner strong { color: var(--coral); font-weight: 900; }
.lb-prize-items {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  font-size: .85rem; font-weight: 600; justify-items: center; text-align: center;
}
.lb-prize-referral, .lb-prize-sunday {
  color: var(--ink); line-height: 1.6; padding: 10px; font-weight: 600;
}
.lb-prize-referral strong, .lb-prize-sunday strong { color: var(--blue-deep); font-weight: 800; }

@media (max-width: 680px) {
  .lb-prize-banner {
    padding: 16px 18px; gap: 12px;
  }
  .lb-prize-banner > div:first-child {
    font-size: .9rem;
  }
  .lb-prize-items {
    grid-template-columns: 1fr; gap: 12px;
  }
}

/* ── Refer & Earn: pill CTA (banner + top bar), card + modal ladder ─────────── */
.rf-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: .85rem;
  color: var(--navy); background: var(--grad-warm); border: none;
  padding: 9px 18px; border-radius: 20px; box-shadow: 0 10px 22px -10px rgba(255,157,131,.7);
  transition: transform .15s var(--ease), box-shadow .2s;
}
.rf-pill:hover { transform: translateY(-2px); }
.labs-top-btn.rf-pill { min-height: 40px; padding: 8px 16px; border-radius: 11px; }

.rf-blurb { margin: 0 0 14px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.rf-linkrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rf-link-input {
  flex: 1; min-width: 220px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: .85rem; background: #fff; color: var(--ink);
}
.rf-copy-btn { min-height: 44px; padding: 0 16px; }
.rf-wa {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px;
  border-radius: 10px; background: #25D366; color: #fff; text-decoration: none; font-weight: 700;
}
.rf-stats { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; color: var(--ink2); font-size: .85rem; }

/* reward-ladder badges shown at the top of the "Refer & Earn" modal */
.rf-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.rf-tier {
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px 8px;
}
.rf-tier-emoji { font-size: 1.4rem; }
.rf-tier-xp { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 900; font-size: 1.05rem; color: var(--blue-deep); }
.rf-tier-lbl { font-size: .68rem; font-weight: 700; color: var(--muted); }
@media (max-width: 500px) {
  .rf-tiers { grid-template-columns: 1fr; }
}

/* ── PODIUM ───────────────────────────────────────────────────────────────── */
.lb-podium {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 12px; margin-bottom: 24px; padding: 0 16px;
}
.lb-pod {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative; text-align: center;
}
.lb-pod-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 1.8rem;
  color: #fff; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.lb-pod-avatar--1 { width: 80px; height: 80px; font-size: 2rem; }
.lb-pod-name {
  font-size: .9rem; font-weight: 700; color: var(--ink);
  max-width: 90px; word-break: break-word; line-height: 1.2;
}
.lb-pod-xp {
  font-size: .85rem; font-weight: 800; color: var(--blue-deep);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.lb-pod-stand {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; border-radius: 4px 4px 0 0;
  width: 100%; min-width: 70px; margin-top: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.lb-pod-stand--1 {
  height: 80px; background: linear-gradient(to bottom, rgba(255,157,131,.25), rgba(255,157,131,.08));
}
.lb-pod-stand--2 {
  height: 56px; background: linear-gradient(to bottom, rgba(253,205,117,.25), rgba(253,205,117,.08));
}
.lb-pod-stand--3 {
  height: 40px; background: linear-gradient(to bottom, rgba(191,176,255,.25), rgba(191,176,255,.08));
}

/* ══════════════════════════════════════════════════════════════════════════
   PLAYGROUND CARD
   ══════════════════════════════════════════════════════════════════════════ */
.labs-playground-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #15212e, #243a4f);
  border-radius: var(--r-xl); padding: 38px; color: var(--cream);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--sh-2);
}
.labs-playground-card::before {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(90,199,166,.4), transparent 70%); filter: blur(10px);
}
.labs-playground-card > * { position: relative; z-index: 1; }
.labs-playground-card h3 { font-size: 1.3rem; color: #fff; margin-bottom: 7px; }
.labs-playground-card p { color: rgba(255,244,233,.72); font-size: .92rem; max-width: 440px; }

/* "Sunday with Shashank" — weekly live AI community card on the home view */
.sunday-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1f2b1f, #2c4334);
  border: 1px solid rgba(90,199,166,.35);
  border-radius: var(--r-xl); padding: 26px 28px; margin-bottom: 22px;
  box-shadow: var(--sh-2);
}
.sunday-card::before {
  content: ''; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(253,205,117,.35), transparent 70%); filter: blur(8px);
}
.sunday-card > * { position: relative; z-index: 1; }
.sunday-badge {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  color: var(--navy); background: var(--grad-warm);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}
.sunday-card h3 { font-size: 1.3rem; color: #fff; margin-bottom: 7px; }
.sunday-card p { color: rgba(255,244,233,.78); font-size: .92rem; max-width: 520px; margin-bottom: 16px; }
/* long label → must wrap on phones instead of overflowing the card to the right */
.sunday-cta { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; white-space: normal; text-align: center; }

/* ══════════════════════════════════════════════════════════════════════════
   TRACK PAGE
   ══════════════════════════════════════════════════════════════════════════ */
.track-header { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 26px; box-shadow: var(--sh-1); }
.track-header-bar { height: 7px; }
.track-header-body { background: var(--white); border: 1px solid var(--border); border-top: none; padding: 28px; }
.track-breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.track-breadcrumb a { color: var(--blue-deep); font-weight: 600; }
.track-header-body h1 { font-size: 1.85rem; margin-bottom: 5px; display: flex; align-items: center; gap: 12px; }
.track-header-icon { width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; }
.track-header-icon svg { width: 24px; height: 24px; }
.track-header-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.track-progress-bar-wrap { flex: 1; min-width: 220px; }
.track-progress-bar-wrap .label { font-size: .82rem; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; font-weight: 600; }
.track-progress-bar { height: 10px; background: #eee5d8; border-radius: 6px; overflow: hidden; }
.track-progress-bar-fill { height: 100%; border-radius: 6px; transition: width .6s var(--ease-out); }

/* Accordion modules */
.labs-module { margin-bottom: 12px; border-radius: var(--r); border: 1px solid var(--border); overflow: hidden; background: #fff; box-shadow: var(--sh-1); }
.labs-module-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; user-select: none; transition: background .2s; }
.labs-module-head:hover { background: var(--paper); }
.labs-module-head h3 { font-size: 1rem; }
.labs-module-head .module-meta { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.labs-module-head .chevron { transition: transform .25s var(--ease); color: var(--muted); }
.labs-module.is-open .chevron { transform: rotate(180deg); }
.labs-module-body { display: none; }
.labs-module.is-open .labs-module-body { display: block; animation: viewIn .3s var(--ease-out); }

.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); cursor: pointer; transition: background .15s, padding-left .2s; }
.lesson-row:hover:not(.locked) { background: rgba(10,150,199,.05); padding-left: 26px; }
.lesson-row.locked { opacity: .6; cursor: not-allowed; }
.lesson-row-icon { flex-shrink: 0; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: .95rem; font-weight: 700; }
.lesson-row-icon.done { background: rgba(90,199,166,.2); color: #1e8a6e; }
.lesson-row-icon.watch { background: rgba(10,150,199,.13); color: var(--blue-deep); }
.lesson-row-icon.lock { background: #efe6da; color: var(--muted); }
.lesson-row-title { flex: 1; font-size: .94rem; font-weight: 600; }
.lesson-row-xp { font-size: .74rem; color: var(--muted); flex-shrink: 0; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════════
   LESSON PLAYER
   ══════════════════════════════════════════════════════════════════════════ */

.lesson-breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 16px; }
.lesson-breadcrumb a { color: var(--blue-deep); font-weight: 600; }

.lesson-video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: var(--r-lg); background: var(--navy); margin-bottom: 22px;
  box-shadow: var(--sh-2);
}
.lesson-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── Flexing Data internal player ────────────────────────────────────────────
   Custom brand-themed player wrapping a chromeless YouTube IFrame. The YT iframe
   is fully covered by .fd-player-guard so no YouTube logo/title/end-cards/share
   are clickable or visible; all controls below are ours.                        */
.fd-player {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: var(--navy); border-radius: var(--r-lg); overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
/* Fullscreen mode — fill the entire viewport, no border radius */
.fd-player:fullscreen,
.fd-player:-webkit-full-screen,
.fd-player:-moz-full-screen,
.fd-player:-ms-fullscreen {
  position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important;
  z-index: 999999 !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
}
/* Ensure stage and guard also fill fullscreen */
.fd-player:fullscreen .fd-player-stage,
.fd-player:-webkit-full-screen .fd-player-stage,
.fd-player:-moz-full-screen .fd-player-stage,
.fd-player:-ms-fullscreen .fd-player-stage {
  bottom: 60px !important;
}
/* On mobile landscape in fullscreen, hide any system UI */
@media (max-width: 1024px) and (orientation: landscape) {
  .fd-player:fullscreen,
  .fd-player:-webkit-full-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
}
.fd-player-stage { position: absolute; inset: 0; bottom: 60px; }
.fd-player-yt { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); }
/* The IFrame API REPLACES #fdYT (a div) with an <iframe id="fdYT">, so size by id
   too — a descendant `iframe` selector alone would miss it after replacement. */
.fd-player-yt > #fdYT,
.fd-player-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; pointer-events: none; }
/* Full-surface guard — swallows ALL clicks/right-clicks on the video (kills end-
   cards, logo, double-click-to-YouTube). We translate clicks to play/pause. */
.fd-player-guard { position: absolute; inset: 0; z-index: 4; cursor: pointer; background: transparent; }
.fd-player-center {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  pointer-events: none; transition: opacity .2s;
}
.fd-player-center .fd-bigplay {
  width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(10,150,199,.92); color: #fff; font-size: 30px; padding-left: 5px;
  box-shadow: 0 6px 22px rgba(0,0,0,.4);
}
/* Timeline preview tooltip — shows when hovering over seek bar */
.fd-seek-preview {
  position: absolute; bottom: 70px; left: 0; padding: 4px 8px;
  background: var(--navy); border-radius: 6px; color: #fff; font-size: 12px;
  z-index: 10; pointer-events: none; opacity: 0; transition: opacity .15s;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.fd-seek:hover .fd-seek-preview {
  opacity: 1;
}
.fd-seek-preview-time {
  font-weight: 600;
}
.fd-player.is-playing .fd-player-center { opacity: 0; }
/* Screen recording protection — when detected, show warning state */
.fd-player.sr-detected {
  opacity: 0.15 !important;
  pointer-events: none !important;
  filter: blur(15px) !important;
}
.fd-player.sr-detected .fd-player-bar {
  opacity: 0.2 !important;
}
.fd-player-toast.show {
  display: block !important;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100000 !important;
  background: #d32f2f !important;
  color: #fff !important;
  padding: 16px 24px !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Control bar */
.fd-player-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; height: 60px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 10px 6px; gap: 4px;
  background: linear-gradient(to top, rgba(16,24,32,.92), rgba(16,24,32,.55) 70%, transparent);
}
.fd-seek {
  position: relative; height: 20px; cursor: pointer; display: flex; align-items: center;
  transition: height .1s ease; padding: 0 -2px;
}
.fd-seek:hover { height: 26px; }
.fd-seek::before { content: ''; position: absolute; left: 0; right: 0; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); top: 50%; transform: translateY(-50%); transition: height .1s ease; }
.fd-seek:hover::before { height: 8px; }
.fd-seek-buf  { position: absolute; left: 0; height: 6px; border-radius: 3px; background: rgba(255,255,255,.35); width: 0; top: 50%; transform: translateY(-50%); transition: height .1s ease; }
.fd-seek:hover .fd-seek-buf { height: 8px; }
.fd-seek-play { position: absolute; left: 0; height: 6px; border-radius: 3px; background: var(--blue); width: 0; top: 50%; transform: translateY(-50%); transition: height .1s ease; }
.fd-seek:hover .fd-seek-play { height: 8px; }
.fd-seek-knob {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; transform: translateY(-50%) scale(0);
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.6); left: 0;
  transition: transform .1s ease, box-shadow .1s ease;
}
.fd-seek:hover .fd-seek-knob { transform: translateY(-50%) scale(1); }
/* Timeline preview tooltip */
.fd-seek-preview {
  position: absolute; bottom: 30px; padding: 4px 8px;
  background: var(--navy); border-radius: 6px; color: #fff; font-size: 12px;
  z-index: 10; pointer-events: none; opacity: 0; transition: opacity .15s;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  transform: translateX(-50%);
}
.fd-seek:hover .fd-seek-preview {
  opacity: 1;
}
.fd-seek-preview-time {
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.fd-controls { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.fd-time { flex-shrink: 0; width: 60px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
/* Tighter spacing on mobile */
@media (max-width: 767px) {
  .fd-controls { gap: 0; }
}
.fd-vol {
  flex-shrink: 0; display: flex; align-items: center; gap: 2px; margin-left: 0;
  height: 44px;
}
.fd-vol-range {
  width: 50px; height: 4px; margin: 0; padding: 0;
  -webkit-appearance: none; appearance: none; background: transparent; border: none; cursor: pointer;
}
.fd-vol-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.4);
  margin-top: -4px;
}
.fd-vol-range::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer;
  border: none; box-shadow: 0 1px 3px rgba(0,0,0,.4);
  margin-top: -4px;
}
.fd-vol-range::-webkit-slider-runnable-track {
  height: 4px; background: rgba(255,255,255,.3); border-radius: 2px;
}
.fd-vol-range::-moz-range-track {
  height: 4px; background: rgba(255,255,255,.3); border-radius: 2px; border: none;
}
/* Hide volume slider on mobile, keep only mute button */
@media (max-width: 767px) {
  .fd-vol-range { display: none; }
}
.fd-spacer { flex: 1; flex-shrink: 1; }
.fd-btn {
  background: transparent; border: none; color: #fff; cursor: pointer;
  width: 40px; height: 40px; border-radius: 8px; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: background .2s, transform .1s;
  user-select: none;
}
.fd-btn:hover { background: rgba(255,255,255,.16); }
.fd-btn:active { transform: scale(0.95); }
/* Slightly larger on desktop */
@media (min-width: 768px) {
  .fd-btn { width: 44px; height: 44px; font-size: 19px; }
}
/* YouTube-style skip buttons: circular arrow icon with "10" centred over it */
.fd-seek-btn { position: relative; width: 40px; height: 40px; }
.fd-seek-btn svg { width: 22px; height: 22px; display: block; }
.fd-seek-btn .fd-seek-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800; line-height: 1; padding-top: 2px; pointer-events: none;
}
/* Slightly larger on desktop */
@media (min-width: 768px) {
  .fd-seek-btn { width: 44px; height: 44px; }
  .fd-seek-btn svg { width: 28px; height: 28px; }
  .fd-seek-btn .fd-seek-num { font-size: 10px; padding-top: 4px; }
}
/* When native YouTube controls are shown (fullscreen), hide our overlay + bar and
   let clicks reach the YouTube iframe so its own controls/menus work. */
.fd-player.fd-fs-native .fd-player-bar,
.fd-player.fd-fs-native .fd-player-guard,
.fd-player.fd-fs-native .fd-player-center { display: none !important; }
.fd-player.fd-fs-native .fd-player-stage { bottom: 0; }
.fd-player.fd-fs-native #fdYT,
.fd-player.fd-fs-native iframe { pointer-events: auto !important; }
.fd-btn-text { width: auto; padding: 0 8px; font-size: 12px; font-weight: 700; }
.fd-btn-text.on, #fdCc.on { background: var(--blue); }
.fd-time { color: rgba(255,255,255,.9); font-size: 12px; font-weight: 600; padding: 0 6px; white-space: nowrap; }
.fd-vol { display: flex; align-items: center; gap: 2px; }
.fd-vol-range { width: 70px; accent-color: var(--blue); cursor: pointer; }
.fd-menu { position: relative; }
.fd-menu-pop {
  display: none; position: absolute; bottom: 40px; right: 0; min-width: 88px;
  background: var(--navy); border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(8px); transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.fd-menu.open .fd-menu-pop {
  display: block; opacity: 1; transform: translateY(0); pointer-events: auto;
}
.fd-menu-pop button {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 13px; cursor: pointer;
  transition: background .1s; white-space: nowrap;
}
.fd-menu-pop button:hover { background: rgba(255,255,255,.2); }
/* Anti-copy toast */
.fd-player-toast {
  position: absolute; top: 14px; left: 50%; transform: translate(-50%, -12px); z-index: 9;
  background: rgba(255,157,131,.97); color: var(--navy); font-weight: 700; font-size: 13px;
  padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90%; text-align: center;
}
.fd-player-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Hide YouTube chrome even in fullscreen — the shell fills the screen, bar on top */
.fd-player:fullscreen { border-radius: 0; }
.fd-player:fullscreen .fd-player-stage { bottom: 60px; }
/* Vimeo/Drive fallback keeps a real iframe + a thin top guard */
.fd-player-simple iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.fd-player-guard-top { position: absolute; top: 0; left: 0; right: 0; height: clamp(40px,12%,54px); z-index: 4; }

.lesson-video-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 32px; }
.lesson-video-placeholder .ph-icon { width: 64px; height: 64px; }
.lesson-video-placeholder .ph-icon svg { width: 100%; height: 100%; }
.lesson-video-placeholder p { color: rgba(255,244,233,.72); font-size: .9rem; }

.lesson-lock-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,24,32,.82), rgba(16,24,32,.94)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 32px; }
.lesson-lock-overlay .lock-icon { font-size: 2.8rem; }
.lesson-lock-overlay h3 { color: #fff; font-size: 1.15rem; }
.lesson-lock-overlay p { color: rgba(255,244,233,.72); font-size: .88rem; max-width: 340px; }
.lesson-lock-overlay .lock-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.lesson-body { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 18px; box-shadow: var(--sh-1); }
.lesson-body h1 { font-size: 1.5rem; margin-bottom: 10px; }
.lesson-body .desc { color: var(--ink2); font-size: .98rem; margin-bottom: 22px; }
.lesson-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.xp-badge { display: inline-flex; align-items: center; gap: 5px; background: rgba(253,205,117,.32); color: #6a4f00; border-radius: 22px; padding: 7px 15px; font-size: .82rem; font-weight: 800; }
.xp-badge.earned { background: rgba(90,199,166,.22); color: #1e8a6e; }
.lesson-resources { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.lesson-resources-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6B7280); margin-bottom: 10px; }
.lesson-resource { margin-bottom: 8px; }
.lesson-resource a { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--blue-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lesson-resource a:hover { color: var(--blue); text-decoration-thickness: 2px; }
/* "Resources used" free-text box: author's text with auto-linked URLs */
.lesson-resource-text { font-size: .92rem; line-height: 1.7; color: var(--ink, #18222F); white-space: pre-wrap; word-break: break-word; }
.lesson-resource-text a { color: var(--blue-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lesson-resource-text a:hover { color: var(--blue); text-decoration-thickness: 2px; }
/* ── Lesson quiz (inline MCQ) ───────────────────────────────────────────────*/
.lesson-quiz { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.lesson-quiz-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6B7280); margin-bottom: 16px; }
.lesson-quiz-question { margin-bottom: 22px; }
.lesson-quiz-q-text { font-size: .95rem; font-weight: 600; color: var(--ink, #18222F); margin-bottom: 10px; line-height: 1.45; }
.lesson-quiz-options { display: flex; flex-direction: column; gap: 8px; }
.lesson-quiz-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r, 10px); cursor: pointer; transition: border-color .15s, background .15s; }
.lesson-quiz-option:hover { border-color: var(--blue); background: rgba(10,150,199,.05); }
.lesson-quiz-option.selected { border-color: var(--blue); background: rgba(10,150,199,.10); }
.quiz-opt-label { font-size: .9rem; color: var(--ink, #18222F); line-height: 1.4; }
.lesson-quiz-result { padding: 12px 16px; border-radius: var(--r, 10px); font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.lesson-quiz-result.pass { background: rgba(90,199,166,.18); color: #1e8a6e; }
.lesson-quiz-result.fail { background: rgba(255,100,80,.12); color: #b03020; }
.quiz-pass-badge { background: rgba(90,199,166,.22); color: #1e8a6e; }
#nextLessonBtn:disabled { opacity: .45; cursor: not-allowed; }
.lesson-prev-next { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lesson-prev-next .btn { flex: 1; max-width: 220px; }

/* ── Leaderboard page header ──────────────────────────────────────────────── */
.leaderboard-header { margin-bottom: 26px; }
.leaderboard-header h1 { font-size: 1.9rem; display: flex; align-items: center; gap: 10px; }
.leaderboard-header p { color: var(--muted); margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════════════════
   XP FLY-UP + CONFETTI (celebration)
   ══════════════════════════════════════════════════════════════════════════ */
.xp-fly {
  position: fixed; z-index: 950; pointer-events: none;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.4rem;
  color: var(--teal); text-shadow: 0 2px 8px rgba(0,0,0,.15);
  animation: xpFly 1.3s var(--ease-out) forwards;
}
@keyframes xpFly { 0% { opacity: 0; transform: translateY(0) scale(.7); } 20% { opacity: 1; transform: translateY(-10px) scale(1.1); } 100% { opacity: 0; transform: translateY(-90px) scale(1); } }
.confetti-piece { position: fixed; z-index: 949; width: 10px; height: 14px; pointer-events: none; top: -20px; will-change: transform; }

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.labs-modal-bg { display: none; position: fixed; inset: 0; background: rgba(16,24,32,.55); backdrop-filter: blur(4px); z-index: 900; align-items: center; justify-content: center; padding: 16px; }
.labs-modal-bg.is-open { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.labs-modal { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-2); width: 100%; max-width: 430px; padding: 34px 30px; position: relative; animation: modalIn .28s var(--ease-out); }
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.labs-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.labs-modal-close:hover { color: var(--ink); }
.labs-modal h2 { font-size: 1.4rem; margin-bottom: 6px; }
.labs-modal .modal-sub { color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
.labs-modal .modal-step { display: none; }
.labs-modal .modal-step.active { display: block; animation: viewIn .3s var(--ease-out); }

.labs-field { margin-bottom: 18px; }
.labs-field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.labs-field input[type=email], .labs-field input[type=password], .labs-field input[type=text], .labs-field input[type=number], .labs-field input[type=date] {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: .98rem; font-family: inherit; background: var(--paper); color: var(--ink);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.labs-field input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(10,150,199,.12); }
.labs-field .error { display: none; font-size: .8rem; color: #c0392b; margin-top: 5px; }
.labs-field.has-error input { border-color: #c0392b; }
.labs-field.has-error .error { display: block; }

.otp-boxes { display: flex; gap: 9px; justify-content: center; margin-bottom: 18px; }
.otp-boxes input {
  width: 46px; height: 56px; text-align: center; font-size: 1.4rem; font-weight: 800;
  border: 1.5px solid var(--border); border-radius: var(--r); background: var(--paper);
  font-family: 'Plus Jakarta Sans', sans-serif; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.otp-boxes input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(10,150,199,.12); }
.otp-timer { font-size: .82rem; color: var(--muted); text-align: center; margin-bottom: 14px; }
.modal-link { background: none; border: none; color: var(--blue-deep); cursor: pointer; font-size: .88rem; font-family: inherit; padding: 0; font-weight: 600; }
.modal-link:hover { text-decoration: underline; }

/* ── Flash ────────────────────────────────────────────────────────────────── */
.labs-flash { padding: 13px 18px; border-radius: var(--r); margin-bottom: 18px; font-size: .9rem; font-weight: 600; }
.labs-flash.success { background: rgba(90,199,166,.18); color: #1e6e55; }
.labs-flash.error { background: rgba(192,58,43,.12); color: #c0392b; }
.labs-flash.info { background: rgba(10,150,199,.12); color: var(--blue-deep); }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN PORTAL
   ══════════════════════════════════════════════════════════════════════════ */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; flex-shrink: 0; background: linear-gradient(180deg, #15212e, #101820); color: var(--cream); padding: 28px 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-sidebar .logo { padding: 0 22px 26px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.05rem; }
.admin-sidebar .logo span { color: var(--blue); }
.admin-nav-item { display: flex; align-items: center; gap: 11px; padding: 12px 22px; color: rgba(255,244,233,.72); font-size: .92rem; font-weight: 600; cursor: pointer; border-left: 3px solid transparent; transition: all .2s; }
.admin-nav-item:hover { background: rgba(255,244,233,.06); color: var(--cream); }
.admin-nav-item.active { border-left-color: var(--blue); background: rgba(10,150,199,.14); color: #fff; }
.admin-sidebar .logout-btn { margin-top: auto; padding: 12px 22px; color: rgba(255,244,233,.5); font-size: .85rem; cursor: pointer; border: none; background: none; text-align: left; font-family: inherit; }
.admin-sidebar .logout-btn:hover { color: var(--cream); }
.admin-content { flex: 1; padding: 36px; overflow-y: auto; }
.admin-tab { display: none; }
.admin-tab.active { display: block; animation: viewIn .3s var(--ease-out); }
.admin-tab h2 { font-size: 1.5rem; margin-bottom: 24px; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-1); }
.stat-card .stat-label { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 9px; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; }

.admin-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { text-align: left; padding: 10px 14px; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--border); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover td { background: var(--paper); }
.admin-table select { border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; font-size: .82rem; font-family: inherit; background: var(--paper); cursor: pointer; }

/* ── Engagement tab: grouped, natively-expandable rows ───────────────────────
   Summary rows are <details> elements inside a bordered .eng-group. A shared CSS
   grid (.eng-grid) on both the header bar and each summary keeps columns aligned.
   Expanding a row reveals its detail tables. No JS, no AJAX. */
.eng-group { border: 1px solid var(--border); border-radius: var(--r-lg, 12px); overflow: hidden; background: var(--white); }
.eng-head {
  padding: 10px 14px 10px 32px;          /* left pad clears the chevron column */
  border-bottom: 2px solid var(--border);
  color: var(--muted); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.eng-row { border-bottom: 1px solid var(--border); }
.eng-row:last-child { border-bottom: 0; }
.eng-row > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  padding: 11px 14px; user-select: none;
}
.eng-row > summary::-webkit-details-marker { display: none; }   /* hide default triangle */
.eng-row > summary:hover { background: var(--paper); }
.eng-chevron { flex: 0 0 18px; color: var(--muted); transition: transform .15s ease; }
.eng-row[open] > summary .eng-chevron { transform: rotate(90deg); }
.eng-grid { display: grid; gap: 12px; align-items: center; flex: 1 1 auto; min-width: 0; }
/* Column tracks — identical between the header bar and the summary rows. */
.eng-grid-learner { grid-template-columns: minmax(160px,2fr) 70px 110px 64px 110px 1fr; }
.eng-grid-lesson  { grid-template-columns: minmax(160px,2fr) 80px 64px 110px 110px 1fr; }
.eng-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-muted { color: var(--muted); font-size: .8rem; }
.eng-detail { padding: 4px 14px 16px 32px; background: var(--paper); }
.eng-inner { font-size: .82rem; margin-top: 4px; }
.eng-inner th { padding: 7px 10px; font-size: .7rem; }
.eng-inner td { padding: 8px 10px; }
.eng-inner tr:hover td { background: var(--white); }
.eng-attempt-head { margin: 14px 0 2px; font-size: .8rem; font-weight: 700; color: #c0392b; }
@media (max-width: 640px) {
  .eng-head { padding-left: 14px; }
  .eng-grid { gap: 8px; font-size: .82rem; }
  .eng-grid-learner, .eng-grid-lesson { grid-template-columns: minmax(110px,1.6fr) 48px 56px 56px; }
  /* On phones show name + first three metrics; hide the 5th metric and last-seen. */
  .eng-grid-learner > :nth-child(5), .eng-grid-lesson > :nth-child(5),
  .eng-grid-learner > :nth-child(6), .eng-grid-lesson > :nth-child(6),
  .eng-head.eng-grid-learner > :nth-child(5), .eng-head.eng-grid-lesson > :nth-child(5),
  .eng-head.eng-grid-learner > :nth-child(6), .eng-head.eng-grid-lesson > :nth-child(6) { display: none; }
}

/* ── Floating WhatsApp help button ───────────────────────────────────────────
   Fixed bottom-right. WhatsApp green for instant recognition. The label shows on
   desktop and collapses to just the icon on small screens. */
.labs-wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px; border-radius: 999px;
  background: #25D366; color: #fff; text-decoration: none; font-weight: 700;
  font-size: .92rem; line-height: 1;
  box-shadow: 0 6px 20px rgba(37,211,102,.35), 0 2px 6px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.labs-wa-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,211,102,.45), 0 3px 8px rgba(0,0,0,.16); }
.labs-wa-fab:focus-visible { outline: 3px solid rgba(37,211,102,.5); outline-offset: 2px; }
.labs-wa-fab svg { flex: 0 0 auto; }
.labs-wa-label { white-space: nowrap; }
@media (max-width: 560px) {
  .labs-wa-fab { right: 16px; bottom: 16px; padding: 14px; border-radius: 50%; }
  .labs-wa-label { display: none; }   /* icon-only on phones to save space */
}

.admin-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; margin-bottom: 20px; box-shadow: var(--sh-1); }
.admin-form h3 { font-size: 1.05rem; margin-bottom: 20px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form-row.single { grid-template-columns: 1fr; }
.admin-form textarea { width: 100%; min-height: 86px; padding: 11px 15px; border: 1.5px solid var(--border); border-radius: var(--r); font-size: .92rem; font-family: inherit; resize: vertical; background: var(--paper); color: var(--ink); }
.admin-form textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(10,150,199,.1); }
.admin-form select { width: 100%; padding: 11px 15px; border: 1.5px solid var(--border); border-radius: var(--r); font-size: .92rem; font-family: inherit; background: var(--paper); color: var(--ink); }
.admin-form select:focus { border-color: var(--blue); outline: none; }
.admin-search-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.admin-search-bar input { flex: 1; padding: 11px 15px; border: 1.5px solid var(--border); border-radius: var(--r); font-size: .92rem; font-family: inherit; background: var(--paper); }
.admin-search-bar input:focus { border-color: var(--blue); outline: none; }

.course-tree { display: grid; grid-template-columns: 220px 220px 1fr; gap: 14px; min-height: 420px; }
.tree-col { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1); }
.tree-col-head { padding: 13px 15px; font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.tree-item { padding: 10px 12px; font-size: .86rem; border-bottom: 1px solid var(--border); transition: background .15s; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tree-item:hover { background: var(--paper); }
.tree-item.active { background: rgba(10,150,199,.1); color: var(--blue-deep); font-weight: 700; }
.tree-label { flex: 1; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.tree-count { color: #6B7280; font-size: .72rem; }
.tree-actions { display: flex; gap: 2px; flex-shrink: 0; }
.tree-actions button { border: none; background: none; cursor: pointer; font-size: .82rem; padding: 3px 5px; border-radius: 6px; line-height: 1; color: var(--ink2); }
.tree-actions button:hover { background: rgba(10,150,199,.12); }
.tree-actions button.del:hover { background: rgba(192,58,43,.12); }
.tree-add { color: var(--blue-deep); font-weight: 700; cursor: pointer; justify-content: flex-start; }
.tree-item .drag-handle { cursor: grab; color: #B6BCC4; font-size: .9rem; flex-shrink: 0; user-select: none; line-height: 1; }
.tree-item .drag-handle:active { cursor: grabbing; }
.tree-item.dragging { opacity: .5; background: rgba(10,150,199,.08); }

.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #15212e, #101820); padding: 20px; }
.admin-login-box { background: var(--white); border-radius: var(--r-lg); padding: 42px 34px; max-width: 390px; width: 100%; box-shadow: var(--sh-2); }
.admin-login-box h1 { font-size: 1.5rem; margin-bottom: 6px; }
.admin-login-box .sub { color: var(--muted); font-size: .92rem; margin-bottom: 26px; }

/* tier badges */
.tier-guest { background: #efe6da; color: var(--muted); }
.tier-member { background: rgba(10,150,199,.12); color: var(--blue-deep); }
.tier-recorded { background: rgba(253,205,117,.28); color: #6a4f00; }
.tier-live { background: rgba(90,199,166,.22); color: #1e6e55; }

/* ══════════════════════════════════════════════════════════════════════════
   HOME DASHBOARD (center + right rail)
   ══════════════════════════════════════════════════════════════════════════ */
.home-grid { display: grid; grid-template-columns: minmax(0,1fr) 326px; gap: 28px; align-items: start; }
.home-main > *:first-child { margin-top: 0; }
.home-main .labs-tracks { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.home-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 22px; }
.labs-side-block .labs-section-head { align-items: baseline; }

/* ── Momentum header (home hero) ──────────────────────────────────────────────
   Drives TODAY'S action (daily goal + streak + next level), not static identity
   stats — those live in the right-side profile card, so we don't repeat them. */
.momentum-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, #15212e, #243a4f); color: #fff;
  border-radius: var(--r-lg); padding: 22px 26px; box-shadow: var(--sh-2);
}
.momentum-hero .mh-main { flex: 1 1 280px; min-width: 0; }
.momentum-hero .mh-hi { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.momentum-hero .mh-sub { font-size: .92rem; color: rgba(255,255,255,.7); margin-top: 6px; }
.momentum-hero .mh-streak {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.85);
}
.momentum-hero .mh-flame { font-size: 1rem; display: inline-block; }
.momentum-hero .mh-streak.is-live .mh-flame { animation: mh-pulse 1.6s ease-in-out infinite; }
@keyframes mh-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* Daily goal bar */
.momentum-hero .mh-goal { margin-top: 14px; max-width: 420px; }
.momentum-hero .mh-goal-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.8); margin-bottom: 6px;
}
.momentum-hero .mh-goal-num { color: #FDCD75; }
.momentum-hero .mh-goal.is-done .mh-goal-num { color: #5AC7A6; }
.momentum-hero .mh-goal-bar {
  height: 10px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden;
}
.momentum-hero .mh-goal-fill {
  height: 100%; border-radius: 6px; background: linear-gradient(90deg, #FDCD75, #FF9D83);
  transition: width .6s var(--ease);
}
.momentum-hero .mh-goal.is-done .mh-goal-fill { background: linear-gradient(90deg, #5AC7A6, #62C1E0); }
.momentum-hero .mh-cta { margin-top: 16px; }

/* Next-level ring */
.momentum-hero .mh-ring { flex: 0 0 auto; text-align: center; }
.momentum-hero .mh-ring .prog-ring { display: block; margin: 0 auto; }
.momentum-hero .mh-ring-cap { font-size: .72rem; color: rgba(255,255,255,.65); margin-top: 6px; }

@media (max-width: 560px) {
  .momentum-hero { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 18px; }
  .momentum-hero .mh-goal { max-width: none; }
  .momentum-hero .mh-cta { width: 100%; min-height: 44px; }
  .momentum-hero .mh-ring { order: -1; }
}

/* ── Roadmap: an F1-style race track (Start → checkpoints → Finish = a job) ───
   A dark asphalt track with amber dashes runs left→right and zig-zags down row
   by row (a snake / boustrophedon). Each module is a checkpoint you clear in
   order; a race car 🏎️ marks where you are; a checkered flag 🏁 + trophy waits
   at the finish — landing a job. Each cell draws its own piece of the track
   (straight bar, or an elbow that turns down to the next row); the dots sit on
   top. `--per` (stops-per-row: 4 / 3 / 2) is set inline by JS and re-rendered on
   resize (see buildRoadInner + bindRoadmapResize in course.js). */
.roadmap-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 20px 20px; box-shadow: var(--sh-1); overflow: hidden; }
.roadmap-note { font-size: .9rem; color: var(--ink2); margin-bottom: 16px; line-height: 1.5; }
.roadmap-note b { color: var(--blue); }
.road { position: relative; }
.stations { display: grid; grid-template-columns: repeat(var(--per, 4), 1fr); grid-auto-rows: 134px; --bend: 32px; }

.station { position: relative; cursor: pointer; }

/* ── the asphalt track (drawn per cell) ── */
.station::before, .station::after { content: ''; position: absolute; z-index: 0; background: #2f3945; }
/* horizontal segment: full-width so cells join into one seamless road per row,
   centred on the checkpoint line (~y40) with a dashed amber centre line */
.station::before {
  left: 0; right: 0; top: 29px; height: 22px;
  background-image: repeating-linear-gradient(90deg, var(--amber) 0 14px, transparent 14px 30px);
  background-repeat: no-repeat; background-position: center; background-size: 100% 3px;
}
/* vertical segment: the straight part of the hairpin, run along the OUTER edge
   (clear of the centred labels). It stops short of the track line at each end so
   the curved corners (.bend) fit; runs from below the top bend of this cell to
   just above the bottom bend of the cell directly below. */
.station::after {
  display: none; width: 22px;
  top: calc(29px + var(--bend)); height: calc(100% + 22px - var(--bend) - var(--bend));
  background-image: repeating-linear-gradient(0deg, var(--amber) 0 14px, transparent 14px 30px);
  background-repeat: no-repeat; background-position: center; background-size: 3px 100%;
}
.station.c-down::after { display: block; }
.station.td-right::after { right: 0; }   /* L→R row: hairpin on the right wall */
.station.td-left::after  { left: 0; }    /* R→L row: hairpin on the left wall  */

/* the horizontal road stops a corner-radius short of the wall so the curve fits */
.station.td-right::before, .station.te-right::before { right: var(--bend); }
.station.td-left::before,  .station.te-left::before  { left:  var(--bend); }

/* ── curved corners — a quarter-circle where BOTH road edges are concentric arcs
   (a box with two adjacent 22px "road-width" borders + a rounded shared corner),
   so the track sweeps like an F1 bend instead of a square right-angle. ── */
.bend { position: absolute; z-index: 0; box-sizing: border-box;
  width: var(--bend); height: var(--bend); border: 0 solid #2f3945; }
.bend-tr { top: 29px; right: 0; border-top-width: 22px; border-right-width: 22px; border-top-right-radius: var(--bend); }                 /* enter ← · exit ↓ */
.bend-tl { top: 29px; left: 0;  border-top-width: 22px; border-left-width: 22px;  border-top-left-radius: var(--bend); }                  /* enter → · exit ↓ */
.bend-br { top: calc(51px - var(--bend)); right: 0; border-bottom-width: 22px; border-right-width: 22px; border-bottom-right-radius: var(--bend); }  /* enter ↑ · exit ← */
.bend-bl { top: calc(51px - var(--bend)); left: 0;  border-bottom-width: 22px; border-left-width: 22px;  border-bottom-left-radius: var(--bend); }   /* enter ↑ · exit → */

/* ── checkpoint (the dot + labels) sits ON the track ── */
.station-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 6px 0; }
.stn-dot {
  width: 48px; height: 48px; margin: 0 0 7px;
  border-radius: 50%; background: #fff; border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 3px 8px rgba(24,34,47,.18);
  transition: transform .18s var(--ease), box-shadow .2s;
}
.stn-dot svg { width: 24px; height: 24px; }
.station:hover .stn-dot { transform: translateY(-3px) scale(1.07); box-shadow: var(--sh-2); }
.station.is-here .stn-dot { box-shadow: 0 0 0 4px rgba(10,150,199,.22), 0 3px 8px rgba(24,34,47,.18); }
.stn-step { font-size: .6rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.stn-name { font-size: .82rem; font-weight: 800; margin-top: 1px; line-height: 1.18; color: var(--ink); }
.stn-meta { margin-top: 5px; font-size: .66rem; font-weight: 800; color: var(--ink2);
  background: var(--cream); border: 1px solid var(--border); padding: 2px 9px; border-radius: 20px; }
.station.is-complete .stn-meta { background: rgba(90,199,166,.18); border-color: rgba(90,199,166,.5); color: #2f7d63; }

/* ── the race car marking "you are here" ── */
.race-car { position: absolute; z-index: 3; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 1.5rem; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); animation: carBob 1.1s var(--ease) infinite; }
@keyframes carBob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }

/* ── start & finish signs (sit on the road end at the outer edge of the track) ── */
.race-tag { position: absolute; z-index: 2; top: 9px; display: flex; flex-direction: column; align-items: center; gap: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 4px 7px 5px; box-shadow: var(--sh-1); }
.race-tag .flag { font-size: 1.45rem; line-height: 1.05; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.race-tag .lbl { font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.race-tag .sub { font-size: .54rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.race-tag.start .lbl { color: #2f7d63; }
.race-tag.finish .lbl { color: var(--ink); }
.race-tag.flag-left  { left: 3px; }
.race-tag.flag-right { right: 3px; }

/* ── Profile card ─────────────────────────────────────────────────────────── */
.profile-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); width: 100%; min-width: 0; }
.pf-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pf-name { font-size: 1.15rem; line-height: 1.2; }
.pf-contact { display: flex; flex-direction: column; gap: 9px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pf-row { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.pf-lbl { color: var(--muted); width: 46px; flex-shrink: 0; font-weight: 700; }
.pf-val { flex: 1; font-weight: 600; font-family: 'Plus Jakarta Sans', sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-eye { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 2px; line-height: 1; flex-shrink: 0; }
.pf-xp { padding: 16px 0; border-bottom: 1px solid var(--border); }
.pf-xp-head { display: flex; justify-content: space-between; align-items: baseline; }
.pf-xp-num { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--blue-deep); }
.pf-xp-next { font-size: .78rem; color: var(--muted); font-weight: 700; }
.pf-xp-bar { height: 8px; background: #eee5d8; border-radius: 5px; overflow: hidden; margin: 9px 0 6px; }
.pf-xp-bar div { height: 100%; background: var(--grad-blue); border-radius: 5px; transition: width .6s var(--ease-out); }
.pf-xp-meta { font-size: .74rem; color: var(--muted); }
.pf-sec { padding-top: 16px; }
.pf-sec + .pf-sec { border-top: 1px solid var(--border); margin-top: 4px; }
.pf-sec-h { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.pf-track { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; margin-bottom: 11px; min-width: 0; }
.pf-tk-name { font-size: .85rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pf-tk-pct { font-size: .74rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.pf-tk-bar { grid-column: 1 / -1; height: 6px; background: #eee5d8; border-radius: 4px; overflow: hidden; }
.pf-tk-bar div { height: 100%; border-radius: 4px; transition: width .6s var(--ease-out); }
.pf-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; padding: 5px 11px; border-radius: 20px;
  background: color-mix(in srgb, var(--tc) 16%, white); color: var(--ink); }
.pf-empty { font-size: .82rem; color: var(--muted); }
.pf-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.pf-score + .pf-score { border-top: 1px dashed var(--border); }
.pf-score b { display: block; font-size: .87rem; }
.pf-score span { font-size: .76rem; color: var(--muted); }

/* Guest preview banner */
.pf-preview-banner {
  background: rgba(10,150,199,.10); border: 1px dashed var(--blue);
  color: var(--blue-deep); font-size: .82rem; font-weight: 600;
  padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; text-align: center;
}
.pf-preview-banner a { color: var(--blue-deep); text-decoration: underline; font-weight: 800; }

/* Guest teaser */
.profile-teaser { text-align: center; }
.pf-teaser-ic { font-size: 2.4rem; margin-bottom: 8px; }
.profile-teaser h3 { font-size: 1.1rem; margin-bottom: 6px; }
.profile-teaser p { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }

/* ── Quiz report modal (View Report) ──────────────────────────────────────── */
.labs-modal-wide { max-width: 560px; }
.pf-score-btns { display: flex; gap: 8px; align-items: center; }
.rep-list { max-height: 70vh; overflow-y: auto; margin-top: 6px; }
.rep-card { border: 1px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.rep-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.rep-head b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1rem; }
.rep-head span { font-size: .78rem; color: var(--muted); }
.rep-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rep-score { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--blue-deep); }
.rep-score small { font-size: .8rem; color: var(--muted); font-weight: 700; }
.rep-time { font-size: .82rem; color: var(--muted); font-weight: 600; }
.rep-cats { display: flex; flex-direction: column; gap: 7px; }
.rep-cat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; font-size: .82rem; }
.rep-cat-n { font-weight: 600; }
.rep-cat-v { color: var(--muted); font-weight: 700; }
.rep-bar { grid-column: 1 / -1; height: 6px; background: #eee5d8; border-radius: 4px; overflow: hidden; }
.rep-bar div { height: 100%; background: var(--grad-blue); border-radius: 4px; }
.rep-weak { margin-top: 12px; font-size: .82rem; color: var(--ink2); background: rgba(255,157,131,.12); border-radius: 9px; padding: 9px 12px; }

/* ── Interview Prep page ──────────────────────────────────────────────────── */
.iv-hero { text-align: center; padding: 22px 16px 8px; }
.iv-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 8px 0 10px; }
.iv-hero .lede { color: var(--ink2); max-width: 620px; margin: 0 auto; font-size: 1.02rem; }
.iv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 26px; }
.iv-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-1); }
.iv-card-ic { font-size: 2.2rem; margin-bottom: 10px; }
.iv-card h3 { font-size: 1.15rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iv-card p { color: var(--ink2); font-size: .92rem; margin-bottom: 16px; }
.iv-soon-note { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--muted); background: var(--paper); border: 1px dashed var(--border); border-radius: 10px; padding: 9px 14px; }
.iv-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.iv-level { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.iv-level-h { padding: 20px 22px 16px; border-top: 5px solid var(--tc); background: color-mix(in srgb, var(--tc) 7%, white); }
.iv-level-h h3 { font-size: 1.1rem; }
.iv-level-h p { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.iv-qs { list-style: none; counter-reset: q; padding: 10px 22px 22px; }
.iv-qs li { counter-increment: q; position: relative; padding: 11px 0 11px 34px; border-top: 1px solid var(--border); font-size: .92rem; line-height: 1.5; }
.iv-qs li:first-child { border-top: none; }
.iv-qs li::before { content: counter(q); position: absolute; left: 0; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 16%, white); color: var(--tc); font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: .72rem; display: flex; align-items: center; justify-content: center; }

/* Vertical leaderboard */
.lb-vert { display: flex; flex-direction: column; }
.lbv-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; font-size: .86rem; }
.lbv-row + .lbv-row { border-top: 1px solid var(--border); }
.lbv-rank { width: 24px; text-align: center; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--muted); }
.lbv-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbv-name b { color: var(--coral); }
.lbv-xp { font-weight: 800; color: var(--blue-deep); font-family: 'Plus Jakarta Sans', sans-serif; display: inline-flex; align-items: baseline; gap: 4px; }
.lbv-you { background: rgba(10,150,199,.10); outline: 1.5px solid rgba(10,150,199,.30); }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
.labs-tracks { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1200px) { .labs-tracks { grid-template-columns: repeat(3, 1fr); } }

/* Below 1024px: the curriculum rail becomes an off-canvas drawer (☰ Course menu) */
@media (max-width: 1024px) {
  /* Disable fixed background on mobile — prevents GPU compositing jank on scroll */
  body { background-attachment: scroll; }
  .labs-shell { grid-template-columns: 1fr; gap: 16px; padding: 16px clamp(12px,4vw,20px) 64px; }
  .labs-menu-btn { display: flex; }
  .labs-top-nav { display: none; }               /* header links move into the drawer on mobile */
  .labs-top-link { display: none; }
  /* Collapse the "Refer & Earn" pill to an icon-only 🎁 button so its wide text
     can't push the bell + Login off the right edge (the whole point of this fix).
     Sized to match .ann-bell-btn so the two icon buttons sit side by side neatly. */
  .rf-label { display: none; }
  .labs-top-btn.rf-pill {
    width: 40px; min-width: 40px; height: 40px; min-height: 40px;
    padding: 0; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; line-height: 1; flex: 0 0 auto;
  }
  .labs-top-right { min-width: 0; }              /* belt-and-braces: never force overflow */
  /* keep only the XP chip on mobile; rank/streak/lessons/CTA would crowd the bar */
  .labs-top-stats { justify-content: flex-end; gap: 8px; }
  .labs-top-stats > a.labs-chip,
  .labs-chip-prog,
  .labs-top-stats .labs-stats-cta { display: none; }
  .labs-rail {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 195;
    width: min(86vw, 320px); max-height: 100vh; border-radius: 0;
    transform: translateX(-100%); transition: transform .28s var(--ease-out);
    padding: 76px 14px 16px;   /* clear the fixed header */
  }
  .labs-rail.open { transform: translateX(0); box-shadow: 0 0 60px rgba(16,24,32,.4); }
  /* Dashboard stacks: profile + leaderboard move below the main content */
  .home-grid { grid-template-columns: 1fr; }
  .home-side { position: static; }
}
/* desktop: never show the scrim/menu button */
@media (min-width: 1025px) { .rail-scrim { display: none; } .labs-menu-btn { display: none; } }

@media (max-width: 600px) {
  .labs-tracks { grid-template-columns: 1fr; }
  /* Race track on phones: JS drops to 2 stops per row; give rows room for wrapped names */
  .stations { grid-auto-rows: 152px; }
  .stn-name { font-size: .76rem; }
  .stn-meta { font-size: .62rem; }
  .race-tag .flag { font-size: 1.35rem; }
}

@media (max-width: 767px) {
  .labs-top-tag { display: none; }
  .campus-hero { padding: 44px 18px 38px; }
  .campus-card { padding: 22px; }
  .campus-card-in { gap: 16px; }
  .cc-stats .stat-chip { min-width: calc(50% - 6px); }
  .labs-playground-card { flex-direction: column; text-align: center; padding: 30px 22px; }
  .lesson-prev-next { flex-direction: column; }
  .lesson-prev-next .btn { max-width: 100%; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 12px 0; }
  .admin-sidebar .logo { padding: 8px 16px; flex: 0 0 100%; }
  .admin-nav-item { padding: 9px 16px; border-left: none; border-bottom: 3px solid transparent; font-size: .82rem; }
  .admin-nav-item.active { border-left: none; border-bottom-color: var(--blue); }
  .admin-sidebar .logout-btn { margin: 0; }
  .admin-content { padding: 20px 16px; }
  .course-tree { grid-template-columns: 1fr; }
  .admin-form-row { grid-template-columns: 1fr; }

  /* Section head: let the h2 shrink so the "See all →" link is never pushed off */
  .labs-section-head h2 { min-width: 0; flex: 1 1 auto; }

  /* "Track your XP" guest CTA in header — hide at tablet too, not just ≤480px */
  .labs-stats-cta { display: none; }

  /* Interview prep grid: force 1-col explicitly instead of relying on auto-fit */
  .iv-levels { grid-template-columns: 1fr; }

  /* Lock overlay long CTA buttons must wrap, not blow past the phone screen */
  .lock-btns .btn { white-space: normal; text-align: center; }

  /* Non-video panels (tier-gate lock + "coming soon" placeholder) must NOT be
     clamped to the 16:9 video box on phones — that clips the heading, text and
     CTA. Drop the aspect-ratio trick so the box grows to fit its content. */
  .lesson-video-wrap.is-panel { padding-bottom: 0; height: auto; }
  .lesson-video-wrap.is-panel .lesson-lock-overlay,
  .lesson-video-wrap.is-panel .lesson-video-placeholder {
    position: relative; inset: auto; min-height: 240px;
    padding: 30px 20px; box-sizing: border-box;
  }
  .lesson-lock-overlay h3 { font-size: 1.05rem; }
  .lesson-lock-overlay p { font-size: .9rem; }

  /* inline-upgrade-card: remove left indent on phones — 20px pushes content too narrow */
  .inline-upgrade-card { margin-left: 0; }
}

/* ── Small phones (≤480px): tighten the header so logo + bell + login always fit,
   and stop the announcements dropdown overflowing the viewport ─────────────── */
@media (max-width: 480px) {
  .labs-top { gap: 8px; padding: 0 12px; }
  .labs-top-logo-exit { width: 28px; height: 28px; font-size: 1.2rem; }
  .labs-top-logo { padding-right: 10px; gap: 7px; }
  .labs-top-logo img { height: 28px; }
  .labs-top-right { gap: 7px; }
  .labs-top-btn { padding: 8px 12px; font-size: .8rem; }
  /* hide the XP chip on the smallest screens — the login button needs the room */
  .labs-top-stats { display: none; }
  .ann-bell-btn { width: 38px; height: 38px; }
  /* On small phones the dropdown is position:absolute inside a sticky header
     whose ancestor has overflow-x:hidden — this clips the dropdown on iOS.
     Switch to position:fixed so it escapes all clipping contexts and always
     renders visible below the header. */
  .ann-dropdown {
    position: fixed;
    top: 68px;    /* just below the 64px header */
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .lesson-body { padding: 20px 16px; }
  .lesson-body h1 { font-size: 1.28rem; }
  .labs-modal { padding: 26px 20px; }

  /* Leaderboard: smaller font + padding so columns fit within the scroll box */
  .labs-lb { font-size: .82rem; }
  .labs-lb td, .labs-lb th { padding: 10px 9px; }

  /* OTP boxes: 6 × 46px + 5 × 9px gap = 321px — overflows 320px devices.
     Shrink slightly so they always fit inside the modal on the smallest phones. */
  .otp-boxes { gap: 7px; }
  .otp-boxes input { width: 40px; height: 50px; font-size: 1.2rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LABS HEADER ENHANCEMENTS — data-forward top bar
   ══════════════════════════════════════════════════════════════════════════ */

/* Thin data-line rainbow gradient along the bottom edge of the header */
.labs-top::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(10,150,199,.30) 15%,
    rgba(90,199,166,.40) 40%,
    rgba(98,193,224,.35) 60%,
    rgba(255,157,131,.30) 80%,
    transparent 100%);
  pointer-events: none;
}

/* Tier badge — colour-coded pill next to the Labs tag */
.labs-tier-badge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: .66rem; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}
.labs-tier-guest    { background: #efe6da; color: var(--muted); }
.labs-tier-member   { background: rgba(10,150,199,.14); color: var(--blue-deep); }
.labs-tier-recorded { background: rgba(253,205,117,.28); color: #6a4f00; }
.labs-tier-live     { background: rgba(90,199,166,.22); color: #1e6e55; }

/* Enhanced stat chips — subtle shadow, hover lift */
.labs-chip {
  box-shadow: 0 2px 8px rgba(10,150,199,.08);
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s, transform .15s;
}
.labs-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,150,199,.15); }

/* "20% Free" coral chip for guests */
.labs-chip-free-badge {
  background: rgba(255,157,131,.12); border-color: rgba(255,157,131,.30);
  color: #c05a40;
}
.labs-chip-free-badge b { color: #c05a40; }
.labs-chip-free-badge .labs-chip-ico { color: #c05a40; }

/* Mini sparkline inside the XP chip */
.chip-sparkline {
  display: inline-flex; align-items: flex-end; gap: 2px; height: 14px;
  margin-left: 4px; opacity: .55;
}
.chip-sparkline span {
  width: 3px; border-radius: 2px 2px 0 0;
  background: var(--blue); display: block;
}

/* ══════════════════════════════════════════════════════════════════════════
   GUEST HERO v2 — data & AI thematic
   ══════════════════════════════════════════════════════════════════════════ */
.campus-hero-v2 { padding: 64px 22px 52px; }

/* Floating data viz layer — purely decorative, behind all content */
.hero-dataviz {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}

/* Animated bar chart silhouettes */
.hdv-bars {
  position: absolute; bottom: 28px; left: clamp(20px, 5%, 48px);
  display: flex; align-items: flex-end; gap: 5px;
}
.hdv-bars span {
  width: 10px; border-radius: 4px 4px 0 0;
  background: rgba(10,150,199,.22);
  animation: barRise 3s var(--ease-out) infinite alternate;
}
.hdv-bars span:nth-child(1) { height: 22px; animation-delay: 0s; }
.hdv-bars span:nth-child(2) { height: 38px; animation-delay: .35s; }
.hdv-bars span:nth-child(3) { height: 28px; animation-delay: .7s; }
.hdv-bars span:nth-child(4) { height: 52px; animation-delay: 1.05s; }
.hdv-bars span:nth-child(5) { height: 18px; animation-delay: 1.4s; }
@keyframes barRise {
  0%   { opacity: .12; transform: scaleY(.8); }
  100% { opacity: .28; transform: scaleY(1); }
}

/* Scatter dot constellation */
.hdv-scatter {
  position: absolute; top: 18px; right: clamp(28px, 5%, 64px);
  width: 120px; height: 110px;
}
.hdv-scatter i {
  position: absolute; border-radius: 50%; display: block;
  animation: scatterPulse 3.2s ease-in-out infinite alternate;
}
.hdv-scatter i:nth-child(1) { width:7px;height:7px; top:8%;left:18%;  background:rgba(90,199,166,.55);  animation-delay:0s; }
.hdv-scatter i:nth-child(2) { width:4px;height:4px; top:38%;left:52%; background:rgba(255,157,131,.55); animation-delay:.6s; }
.hdv-scatter i:nth-child(3) { width:8px;height:8px; top:68%;left:28%; background:rgba(10,150,199,.50);  animation-delay:1.1s; }
.hdv-scatter i:nth-child(4) { width:5px;height:5px; top:18%;left:78%; background:rgba(191,176,255,.60); animation-delay:1.5s; }
.hdv-scatter i:nth-child(5) { width:4px;height:4px; top:56%;left:68%; background:rgba(90,199,166,.45);  animation-delay:.9s; }
.hdv-scatter i:nth-child(6) { width:6px;height:6px; top:82%;left:58%; background:rgba(253,205,117,.60); animation-delay:1.3s; }
.hdv-scatter i:nth-child(7) { width:5px;height:5px; top:28%;left:8%;  background:rgba(98,193,224,.50);  animation-delay:.4s; }
@keyframes scatterPulse {
  0%   { opacity: .25; transform: scale(.85); }
  100% { opacity: .65; transform: scale(1.15); }
}

/* Stat counters strip — glassmorphism pill */
.hero-stats-strip {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 50px; padding: 12px 28px;
  margin: 24px auto 26px; max-width: 680px;
  box-shadow: var(--sh-1);
  position: relative; z-index: 1;
}
.hss-stat { text-align: center; }
.hss-num  { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--ink); line-height: 1.1; }
.hss-label { display: block; font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.hss-div  { width: 1px; height: 30px; background: var(--line); flex-shrink: 0; }

/* 3-tier value ladder */
.hero-tier-ladder {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: 20px auto 16px; max-width: 600px;
  position: relative; z-index: 1;
}
.htl-tier {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,.72); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 16px; min-width: 108px;
  transition: transform .2s var(--ease-out), box-shadow .2s; backdrop-filter: blur(4px);
}
.htl-tier:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.htl-badge { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: .82rem; line-height: 1.2; }
.htl-label { font-size: .7rem; color: var(--muted); font-weight: 600; text-align: center; line-height: 1.3; }
.htl-free     .htl-badge { color: var(--blue-deep); }
.htl-recorded .htl-badge { color: #8a6a00; }
.htl-live { border-color: rgba(90,199,166,.40); background: rgba(90,199,166,.10); }
.htl-live .htl-badge { color: #1e6e55; }
.htl-arrow { font-size: 1.1rem; color: var(--muted); flex-shrink: 0; }

@media (max-width: 520px) {
  .hero-stats-strip { border-radius: 18px; padding: 14px 18px; flex-direction: column; max-width: 100%; }
  .hss-div { width: 100%; height: 1px; }
  .hero-tier-ladder { gap: 6px; }
  .htl-arrow { display: none; }
  .htl-tier { min-width: 90px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOMENTUM HERO ENHANCEMENTS (logged-in)
   ══════════════════════════════════════════════════════════════════════════ */
.momentum-hero .mh-motivational {
  font-size: .86rem; color: rgba(255,255,255,.78); margin-top: 4px;
  font-weight: 600; font-style: italic;
}
.momentum-hero .mh-milestone {
  font-size: .82rem; color: rgba(253,205,117,.9);
  margin-top: 10px; font-weight: 600; line-height: 1.4;
}
.momentum-hero .mh-upsell {
  margin-top: 10px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,157,131,.18); border: 1px solid rgba(255,157,131,.30);
  font-size: .82rem; color: rgba(255,255,255,.88); font-weight: 600;
}
.momentum-hero .mh-upsell b { color: var(--coral); }
.momentum-hero .mh-upsell a { color: var(--coral); text-decoration: underline; font-weight: 800; }
.momentum-hero .mh-ring-sub {
  font-size: .68rem; color: rgba(255,255,255,.48); margin-top: 2px; text-align: center;
}

/* Pulsing glow on the level ring */
@keyframes ringGlow {
  0%,100% { filter: drop-shadow(0 0 4px rgba(98,193,224,.35)); }
  50%      { filter: drop-shadow(0 0 10px rgba(98,193,224,.75)); }
}
.momentum-hero .mh-ring .prog-ring { animation: ringGlow 2.6s ease-in-out infinite; }

/* ══════════════════════════════════════════════════════════════════════════
   LOCKED LESSON TREATMENT
   ══════════════════════════════════════════════════════════════════════════ */
.lesson-row.locked { opacity: .75; cursor: pointer; }
.lesson-row.locked:hover { background: rgba(255,157,131,.06); }
.lesson-row-title-locked { color: var(--muted); }
.lesson-lock-badge {
  flex-shrink: 0; font-size: .68rem; font-weight: 800;
  color: var(--muted); background: #efe6da;
  border-radius: 20px; padding: 2px 9px; white-space: nowrap;
}
.lessons-locked { color: var(--muted); }

/* Inline upgrade card — appears below a clicked locked row */
.inline-upgrade-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(255,244,233,.98), rgba(253,205,117,.08));
  border: 1.5px solid rgba(253,205,117,.40);
  border-radius: var(--r); padding: 14px 18px 14px 14px;
  margin: 0 0 2px 20px; position: relative;
  animation: viewIn .28s var(--ease-out);
}
.iuc-icon { font-size: 1.6rem; flex-shrink: 0; }
.iuc-body { flex: 1; min-width: 150px; }
.iuc-body strong { font-size: .9rem; color: var(--ink); display: block; margin-bottom: 3px; }
.iuc-body p { font-size: .8rem; color: var(--muted); margin: 0; line-height: 1.4; }
.iuc-close {
  position: absolute; top: 8px; right: 10px; background: none; border: none;
  font-size: 1.15rem; color: var(--muted); cursor: pointer; line-height: 1; padding: 3px 6px;
  border-radius: 6px; transition: background .15s;
}
.iuc-close:hover { background: rgba(24,34,47,.07); color: var(--ink); }

/* ══════════════════════════════════════════════════════════════════════════
   RECORDINGS SECTION (home page teaser)
   ══════════════════════════════════════════════════════════════════════════ */
.recordings-section {
  display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap;
}
.rec-teasers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; flex: 1;
}
.rec-teaser-card {
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--border);
  background: var(--white); box-shadow: var(--sh-1);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.rec-teaser-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.rec-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.rec-thumb-blur { filter: blur(4px) brightness(.75); width: 100%; height: 100%; }
.rec-thumb-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.rec-thumb-icon { font-size: 2rem; filter: blur(0); }
.rec-lock-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: rgba(255,255,255,.95);
  background: rgba(16,24,32,.46); backdrop-filter: blur(2px);
}
.rec-meta { padding: 8px 10px; }
.rec-track-name { display: block; font-size: .8rem; font-weight: 700; color: var(--ink); }
.rec-lesson-count { display: block; font-size: .7rem; color: var(--muted); margin-top: 2px; }
.rec-cta-block {
  flex: 0 0 230px; border-radius: var(--r-lg); padding: 24px;
  background: linear-gradient(135deg, #15212e, #243a4f);
  display: flex; flex-direction: column; gap: 12px; text-align: center;
}
.rec-cta-copy { font-size: .88rem; color: rgba(255,244,233,.82); line-height: 1.5; }
.rec-price-hint { font-size: .76rem; color: rgba(255,244,233,.50); line-height: 1.4; }
.rec-price-hint a { color: var(--amber); text-decoration: underline; }
@media (max-width: 640px) {
  .recordings-section { flex-direction: column; }
  .rec-cta-block { flex: none; width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LIVE BOOTCAMP CARD (prominent home callout)
   ══════════════════════════════════════════════════════════════════════════ */
.live-bootcamp-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f1c28 0%, #1a3347 60%, #0d2233 100%);
  border-radius: var(--r-xl); padding: 28px 30px;
  display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap;
  border: 1px solid rgba(90,199,166,.30);
  box-shadow: 0 8px 40px -10px rgba(90,199,166,.20), var(--sh-2);
  margin-bottom: 24px;
}
.lbc-pulse {
  position: absolute; top: -70px; right: -70px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(90,199,166,.28), transparent 70%);
  border-radius: 50%; filter: blur(30px);
  animation: lbcPulse 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes lbcPulse {
  0%   { transform: scale(.88); opacity: .55; }
  100% { transform: scale(1.18); opacity: .95; }
}
.lbc-live-badge {
  position: absolute; top: 16px; right: 18px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: .7rem;
  background: rgba(90,199,166,.22); color: #5AC7A6;
  border: 1px solid rgba(90,199,166,.38); border-radius: 20px;
  padding: 4px 12px; letter-spacing: .06em; text-transform: uppercase;
  animation: liveBlink 2s ease-in-out infinite;
}
@keyframes liveBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: .60; }
}
.lbc-body { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.lbc-body h3 { font-size: 1.3rem; color: #fff; margin-bottom: 8px; }
.lbc-body p  { font-size: .88rem; color: rgba(255,244,233,.72); margin-bottom: 14px; line-height: 1.5; }
.lbc-features { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lbc-features li { font-size: .84rem; color: rgba(255,244,233,.84); font-weight: 600; }
.lbc-cta-side {
  flex: 0 0 200px; display: flex; flex-direction: column;
  align-items: center; gap: 10px; text-align: center;
  position: relative; z-index: 1;
}
.lbc-next { font-size: .8rem; color: rgba(255,244,233,.62); font-weight: 600; }
.lbc-next b { color: var(--amber); }
.lbc-btn  { width: 100%; }
.lbc-seats { font-size: .7rem; color: rgba(255,244,233,.40); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 580px) {
  .live-bootcamp-card { padding: 22px 20px; flex-direction: column; }
  .lbc-cta-side { flex: none; width: 100%; }
  .lbc-live-badge { top: 14px; right: 14px; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .campus-hero .aurora { animation: none; }
}

/* ── Lesson tabs ──────────────────────────────────────────────────────────── */
.lesson-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 16px 0 0;
}
.lesson-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--border);
  margin: 18px 0 0; overflow-x: auto;
}
.lesson-tab-btn {
  background: none; border: none; padding: 10px 18px;
  font-size: .88rem; font-weight: 600; color: var(--muted);
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
  font-family: inherit;
}
.lesson-tab-btn:hover { color: var(--ink); }
.lesson-tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }

.lesson-tab-panel { display: none; padding: 22px 0; }
.lesson-tab-panel.active { display: block; }

/* Overview panel */
.lesson-tab-panel[data-panel="overview"] h1 { font-size: 1.4rem; margin: 0 0 10px; color: var(--ink); }
.lesson-tab-panel[data-panel="overview"] .desc { color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.lesson-meta-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lesson-meta-card {
  background: var(--paper); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 6px 14px;
  font-size: .82rem; font-weight: 600; color: var(--ink-dim);
}

/* Assignment panel */
.assignment-cta { padding: 24px 0; }
.assignment-cta p { color: var(--muted); margin-bottom: 16px; }

/* Resources panel */
.lesson-resource-text {
  white-space: pre-wrap; word-break: break-word;
  color: var(--ink-dim); line-height: 1.7; font-size: .9rem;
}
.lesson-resource-text a { color: var(--brand); text-decoration: underline; }
.lesson-resource-text a:hover { opacity: .8; }

/* Doubts panel */
.doubt-post-form { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.doubt-textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 10px 12px; font-family: inherit; font-size: .9rem;
  background: var(--paper); color: var(--ink); resize: vertical;
  box-sizing: border-box;
}
.doubt-textarea:focus { outline: none; border-color: var(--brand); }
.doubt-thread { display: flex; flex-direction: column; gap: 14px; }
.doubt-item {
  border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 14px 16px; background: var(--paper);
}
.doubt-meta { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.doubt-meta strong { color: var(--ink); }
.doubt-body { font-size: .9rem; line-height: 1.6; color: var(--ink-dim); margin-bottom: 10px; white-space: pre-wrap; word-break: break-word; }
.doubt-reply {
  margin: 10px 0 0 18px; padding: 10px 14px;
  border-left: 3px solid var(--border); background: var(--bg);
  border-radius: 0 var(--r) var(--r) 0;
}
.doubt-reply-btn { font-size: .8rem; color: var(--muted); }
.doubt-reply-area { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* ── Celebration animations ──────────────────────────────────────────────────── */
@keyframes celebrateFloat {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
  }
  40% {
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(60px) rotate(360deg) scale(0.2);
  }
}

@keyframes clapBounce {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  40% {
    transform: translateX(-50%) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(0.3);
    opacity: 0;
  }
}

/* ── Leaderboard → member portfolio links ─────────────────────────────────
   Names on the leaderboard link to /portfolio/{slug} when the member has a
   published portfolio (portfolio_slug from the leaderboard API). */
.lb-pf-link {
  color: inherit;
  text-decoration: underline dotted rgba(10, 150, 199, 0.55);
  text-underline-offset: 3px;
}
.lb-pf-link:hover { color: #0A96C7; text-decoration-style: solid; }
