/* ════════════════════════════════════════════════════════════════════════════════
   JLEARN ONLINE 2.0 — HIGH-END BESPOKE DESIGN SYSTEM (VERCEL / LINEAR AESTHETIC)
   Engineered for Ultra-Performance, 12-Column Bento Grid, and Mobile Responsiveness
   ════════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Color Palette - Refined Slate / Obsidian & Precision Cobalt */
  --jl-bg: #f8fafc;
  --jl-bg-subtle: #f1f5f9;
  --jl-surface: #ffffff;
  --jl-surface-raised: #ffffff;
  --jl-surface-glass: rgba(255, 255, 255, 0.85);
  
  --jl-border: #e2e8f0;
  --jl-border-subtle: #f1f5f9;
  --jl-border-strong: #cbd5e1;
  --jl-border-highlight: rgba(37, 99, 235, 0.4);

  --jl-text-primary: #0f172a;
  --jl-text-secondary: #475569;
  --jl-text-muted: #64748b;
  --jl-text-inverse: #ffffff;

  --jl-primary: #2563eb;
  --jl-primary-hover: #1d4ed8;
  --jl-primary-subtle: #eff6ff;
  --jl-primary-border: #bfdbfe;

  --jl-accent-emerald: #10b981;
  --jl-accent-emerald-subtle: #ecfdf5;
  --jl-accent-amber: #f59e0b;
  --jl-accent-amber-subtle: #fffbeb;
  --jl-accent-rose: #ef4444;
  --jl-accent-rose-subtle: #fef2f2;
  --jl-accent-indigo: #6366f1;
  --jl-accent-indigo-subtle: #eef2ff;

  /* Shadows - Minimalist layered precision */
  --jl-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --jl-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --jl-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --jl-shadow-glow: 0 0 25px rgba(37, 99, 235, 0.12);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Safe Area Units */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* ══════════════════════════════════════════════════════════════════════
   HIGH-END OBSIDIAN DARK THEME (LINEAR / VERCEL STYLE)
   ══════════════════════════════════════════════════════════════════════ */
[data-theme="dark"], body.dark-mode {
  --jl-bg: #090d16;
  --jl-bg-subtle: #0f172a;
  --jl-surface: #111827;
  --jl-surface-raised: #162032;
  --jl-surface-glass: rgba(17, 24, 39, 0.85);

  --jl-border: rgba(255, 255, 255, 0.08);
  --jl-border-subtle: rgba(255, 255, 255, 0.04);
  --jl-border-strong: rgba(255, 255, 255, 0.16);
  --jl-border-highlight: rgba(59, 130, 246, 0.45);

  --jl-text-primary: #f8fafc;
  --jl-text-secondary: #94a3b8;
  --jl-text-muted: #64748b;
  --jl-text-inverse: #090d16;

  --jl-primary: #3b82f6;
  --jl-primary-hover: #60a5fa;
  --jl-primary-subtle: rgba(59, 130, 246, 0.12);
  --jl-primary-border: rgba(59, 130, 246, 0.3);

  --jl-accent-emerald: #34d399;
  --jl-accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --jl-accent-amber: #fbbf24;
  --jl-accent-amber-subtle: rgba(245, 158, 11, 0.12);
  --jl-accent-rose: #f87171;
  --jl-accent-rose-subtle: rgba(239, 68, 68, 0.12);
  --jl-accent-indigo: #818cf8;
  --jl-accent-indigo-subtle: rgba(99, 102, 241, 0.12);

  --jl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --jl-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --jl-shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
  --jl-shadow-glow: 0 0 35px rgba(59, 130, 246, 0.18);
}

/* ══════════════════════════════════════════════════════════════════════
   GLOBAL RESETS & HIGH-END BASE
   ══════════════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans) !important;
  background-color: var(--jl-bg) !important;
  color: var(--jl-text-primary) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Subtle background illumination mesh */
.jl-ambient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  pointer-events: none;
  background: radial-gradient(circle 800px at 50% -120px, rgba(37, 99, 235, 0.14), transparent 75%);
  z-index: 0;
}

[data-theme="dark"] .jl-ambient-mesh {
  background: radial-gradient(circle 900px at 50% -150px, rgba(59, 130, 246, 0.18), transparent 75%);
}

/* ══════════════════════════════════════════════════════════════════════
   FROSTED GLASS NAVIGATION BAR
   ══════════════════════════════════════════════════════════════════════ */
.jl-navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--jl-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--jl-border);
  transition: all 0.25s ease;
}

.jl-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.jl-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--jl-text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  cursor: pointer;
}

.jl-brand-badge {
  width: 32px;
  height: 32px;
  background: var(--jl-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

.jl-nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jl-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--jl-text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.jl-nav-link:hover {
  color: var(--jl-text-primary);
  background: var(--jl-bg-subtle);
}

.jl-nav-link.active {
  color: var(--jl-primary);
  font-weight: 600;
}

.jl-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Edge Status Badge */
.jl-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--jl-accent-emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--jl-accent-emerald);
  font-family: var(--font-mono);
}

.jl-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jl-accent-emerald);
  box-shadow: 0 0 8px var(--jl-accent-emerald);
  animation: jl-pulse 2s infinite ease-in-out;
}

@keyframes jl-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Command Palette Trigger Pill */
.jl-cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  color: var(--jl-text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.jl-cmd-trigger:hover {
  color: var(--jl-text-primary);
  border-color: var(--jl-border-strong);
}

.jl-cmd-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ══════════════════════════════════════════════════════════════════════
   HERO SECTION (BESPOKE HIGH-END SAAS)
   ══════════════════════════════════════════════════════════════════════ */
.jl-hero {
  position: relative;
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  max-width: 1080px;
  margin: 0 auto;
  z-index: 1;
}

.jl-pill-announcement {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--jl-primary-subtle);
  border: 1px solid var(--jl-primary-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--jl-primary);
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease;
}

.jl-pill-announcement:hover {
  transform: translateY(-1px);
}

.jl-hero-title {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--jl-text-primary);
  margin: 0 0 1.25rem 0;
}

.jl-hero-title .jl-highlight {
  color: var(--jl-primary);
}

.jl-hero-subtitle {
  font-size: 1.2rem;
  color: var(--jl-text-secondary);
  line-height: 1.6;
  max-width: 740px;
  margin: 0 auto 2.25rem;
  font-weight: 400;
}

/* Hero Quick Join Classroom Bar */
.jl-quick-join-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 580px;
  margin: 0 auto 2.25rem;
  padding: 0.4rem;
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--jl-shadow-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jl-quick-join-bar:focus-within {
  border-color: var(--jl-primary);
  box-shadow: 0 0 0 3px var(--jl-primary-subtle), var(--jl-shadow-md);
}

.jl-quick-join-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  color: var(--jl-text-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jl-quick-join-input::placeholder {
  color: var(--jl-text-muted);
  font-family: var(--font-sans);
  text-transform: none;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: normal;
}

.jl-quick-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--jl-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.jl-quick-join-btn:hover {
  background: var(--jl-primary-hover);
  transform: translateY(-1px);
}

.jl-quick-join-btn:active {
  transform: scale(0.98);
}

/* Hero Action Buttons */
.jl-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.jl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.jl-btn:active {
  transform: scale(0.98);
}

.jl-btn-primary {
  background: var(--jl-text-primary);
  color: var(--jl-text-inverse);
  border-color: var(--jl-text-primary);
}

.jl-btn-primary:hover {
  background: var(--jl-primary);
  border-color: var(--jl-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.jl-btn-secondary {
  background: var(--jl-surface);
  color: var(--jl-text-primary);
  border-color: var(--jl-border);
  box-shadow: var(--jl-shadow-sm);
}

.jl-btn-secondary:hover {
  background: var(--jl-bg-subtle);
  border-color: var(--jl-border-strong);
}

.jl-btn-apk {
  background: var(--jl-accent-emerald-subtle);
  color: var(--jl-accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.jl-btn-apk:hover {
  background: var(--jl-accent-emerald);
  color: white;
}

/* ══════════════════════════════════════════════════════════════════════
   12-COLUMN ASYMMETRIC BENTO GRID SYSTEM
   Strict Hierarchy, Compartmentalized, Zero Duplication
   ══════════════════════════════════════════════════════════════════════ */
.jl-bento-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  position: relative;
  z-index: 1;
}

.jl-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.jl-section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--jl-primary);
  margin-bottom: 0.5rem;
}

.jl-section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem 0;
  color: var(--jl-text-primary);
}

.jl-section-desc {
  font-size: 1.05rem;
  color: var(--jl-text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

.jl-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* Bento Card Primitive */
.jl-bento-card {
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--jl-shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.jl-bento-card:hover {
  border-color: var(--jl-border-highlight);
  box-shadow: var(--jl-shadow-md), var(--jl-shadow-glow);
  transform: translateY(-2px);
}

/* Spans */
.jl-col-12 { grid-column: span 12; }
.jl-col-8 { grid-column: span 8; }
.jl-col-6 { grid-column: span 6; }
.jl-col-4 { grid-column: span 4; }
.jl-col-3 { grid-column: span 3; }

/* Bento Card Headers */
.jl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.jl-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.jl-icon-blue { background: var(--jl-primary-subtle); color: var(--jl-primary); }
.jl-icon-green { background: var(--jl-accent-emerald-subtle); color: var(--jl-accent-emerald); }
.jl-icon-amber { background: var(--jl-accent-amber-subtle); color: var(--jl-accent-amber); }
.jl-icon-rose { background: var(--jl-accent-rose-subtle); color: var(--jl-accent-rose); }
.jl-icon-indigo { background: var(--jl-accent-indigo-subtle); color: var(--jl-accent-indigo); }

.jl-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem 0;
  color: var(--jl-text-primary);
}

.jl-card-desc {
  font-size: 0.92rem;
  color: var(--jl-text-secondary);
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
}

/* ══════════════════════════════════════════════════════════════════════
   BENTO CELL 1: ANCHOR EXAM ENGINE SIMULATOR (8 Columns)
   ══════════════════════════════════════════════════════════════════════ */
.jl-exam-simulator {
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: auto;
}

.jl-sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--jl-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.jl-sim-shield {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--jl-accent-emerald);
}

.jl-sim-timer {
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--jl-text-primary);
}

.jl-sim-question {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--jl-text-primary);
  margin-bottom: 0.85rem;
}

.jl-sim-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jl-sim-opt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--jl-text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.jl-sim-opt:hover {
  border-color: var(--jl-primary);
  background: var(--jl-primary-subtle);
}

.jl-sim-opt.selected {
  border-color: var(--jl-primary);
  background: var(--jl-primary-subtle);
  font-weight: 600;
}

.jl-sim-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--jl-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jl-sim-opt.selected .jl-sim-circle {
  border-color: var(--jl-primary);
  background: var(--jl-primary);
}

.jl-sim-opt.selected .jl-sim-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

.jl-sim-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--jl-text-muted);
}

/* ══════════════════════════════════════════════════════════════════════
   BENTO CELL 2: CLOUDFLARE EDGE TELEMETRY HUD (4 Columns)
   ══════════════════════════════════════════════════════════════════════ */
.jl-telemetry-hud {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.jl-telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
}

.jl-telemetry-key {
  color: var(--jl-text-secondary);
  font-weight: 500;
}

.jl-telemetry-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--jl-text-primary);
}

/* ══════════════════════════════════════════════════════════════════════
   BENTO CELL 3: ITEM ANALYSIS METER (4 Columns)
   ══════════════════════════════════════════════════════════════════════ */
.jl-meter-box {
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: auto;
}

.jl-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.jl-meter-track {
  height: 8px;
  background: var(--jl-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.jl-meter-fill {
  height: 100%;
  background: var(--jl-accent-emerald);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

.jl-distracter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.jl-distracter-item {
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  padding: 0.4rem 0.2rem;
  border-radius: var(--radius-sm);
}

.jl-distracter-item.key {
  background: var(--jl-accent-emerald-subtle);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--jl-accent-emerald);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════════
   LEARNING MODALITIES INTERACTIVE TABS
   ══════════════════════════════════════════════════════════════════════ */
.jl-tabs-container {
  max-width: 1080px;
  margin: 3rem auto 0;
}

.jl-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.jl-tab-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: var(--jl-text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.jl-tab-btn.active {
  background: var(--jl-surface);
  color: var(--jl-text-primary);
  box-shadow: var(--jl-shadow-sm);
}

.jl-tab-panel {
  display: none;
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--jl-shadow-md);
}

.jl-tab-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.jl-tab-preview {
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ══════════════════════════════════════════════════════════════════════
   MOBILE APP & PWA SHOWCASE SECTION
   ══════════════════════════════════════════════════════════════════════ */
.jl-app-showcase {
  max-width: 1280px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.jl-app-card {
  background: linear-gradient(180deg, var(--jl-surface) 0%, var(--jl-bg-subtle) 100%);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  box-shadow: var(--jl-shadow-lg);
}

.jl-app-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ══════════════════════════════════════════════════════════════════════
   HIGH-END MINIMALIST FOOTER
   ══════════════════════════════════════════════════════════════════════ */
.jl-footer {
  border-top: 1px solid var(--jl-border);
  background: var(--jl-surface);
  padding: 3.5rem 1.5rem 2.5rem;
  color: var(--jl-text-secondary);
  font-size: 0.88rem;
}

.jl-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.jl-footer-links {
  display: flex;
  gap: 1.5rem;
}

.jl-footer-links a {
  color: var(--jl-text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.jl-footer-links a:hover {
  color: var(--jl-text-primary);
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVENESS & MOBILE-FIRST BREAKPOINTS
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .jl-col-8 { grid-column: span 12; }
  .jl-col-4 { grid-column: span 6; }
  .jl-tab-panel.active { grid-template-columns: 1fr; }
  .jl-app-card { grid-template-columns: 1fr; padding: 2rem; }
}

@media (max-width: 768px) {
  .jl-hero { padding: 3rem 1rem 2rem; }
  .jl-hero-title { font-size: 2.5rem; }
  .jl-hero-subtitle { font-size: 1.05rem; }
  .jl-bento-grid { grid-template-columns: 1fr; gap: 1rem; }
  .jl-col-12, .jl-col-8, .jl-col-6, .jl-col-4, .jl-col-3 { grid-column: span 1; }
  .jl-nav-links { display: none; }
  .jl-quick-join-bar { flex-direction: column; gap: 0.5rem; padding: 0.5rem; }
  .jl-quick-join-btn { width: 100%; justify-content: center; }
  .jl-footer-inner { flex-direction: column; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════════════
   CLEAN MODALS & OVERLAYS (NO LOUD GRADIENTS, HIGH CONTRAST)
   ══════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex !important;
}

.modal {
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--jl-shadow-lg);
  color: var(--jl-text-primary);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: none;
  flex-direction: column;
}

.modal.active {
  display: flex !important;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--jl-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--jl-text-primary);
}

.modal-close {
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  color: var(--jl-text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--jl-text-primary);
  border-color: var(--jl-border-strong);
}

.modal-content {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--jl-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--jl-bg-subtle);
}

/* ══════════════════════════════════════════════════════════════════════
   DASHBOARD SIDEBAR & STATS (MODERN MINIMALIST)
   ══════════════════════════════════════════════════════════════════════ */
.dashboard-sidebar {
  background: var(--jl-surface) !important;
  border-right: 1px solid var(--jl-border) !important;
  box-shadow: none !important;
}

.sidebar-menu .menu-item {
  border-radius: var(--radius-md) !important;
  color: var(--jl-text-secondary) !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
  border: 1px solid transparent !important;
}

.sidebar-menu .menu-item:hover {
  background: var(--jl-bg-subtle) !important;
  color: var(--jl-primary) !important;
  border-color: var(--jl-border) !important;
}

.sidebar-menu .menu-item.active {
  background: var(--jl-primary) !important;
  color: white !important;
  border-color: var(--jl-primary) !important;
  box-shadow: var(--jl-shadow-sm) !important;
}

.stat-card {
  background: var(--jl-surface) !important;
  border: 1px solid var(--jl-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--jl-shadow-sm) !important;
  padding: 1.25rem !important;
}

.stat-card:hover {
  border-color: var(--jl-border-highlight) !important;
  box-shadow: var(--jl-shadow-md) !important;
}


/* ══════════════════════════════════════════════════════════════════════
   MOBILE BOTTOM ACTION BAR (RESPONSIVE & CONTEXT-AWARE)
   ══════════════════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--jl-surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--jl-border);
    z-index: 9998;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  }

  /* Don't block exam or active assessment */
  body.in-assessment .mobile-bottom-nav,
  .page.active#assessment-page ~ .mobile-bottom-nav,
  #assessment-instructions-modal.active ~ .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--jl-text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .mobile-nav-item i {
    font-size: 1.15rem;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: var(--jl-primary);
  }

  /* Avoid footer clipping when mobile bottom nav is visible */
  body:not(.in-assessment) {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   GLOBAL COMMAND PALETTE (RAYCAST / LINEAR STYLE)
   ══════════════════════════════════════════════════════════════════════ */
#jl-command-palette {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1.5rem 2rem;
}

.jl-command-box {
  background: var(--jl-surface);
  border: 1px solid var(--jl-border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--jl-shadow-xl), var(--jl-shadow-glow);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  animation: jl-cmd-appear 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes jl-cmd-appear {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.jl-command-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--jl-border);
}

.jl-command-input-wrap i {
  color: var(--jl-text-muted);
  font-size: 1.05rem;
}

.jl-command-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--jl-text-primary);
  font-size: 1.05rem;
  font-family: var(--font-sans);
}

.jl-command-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.jl-command-group-title {
  padding: 0.5rem 0.75rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--jl-text-muted);
}

.jl-command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--jl-text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.jl-command-item:hover,
.jl-command-item.selected {
  background: var(--jl-primary-subtle);
  color: var(--jl-primary);
}

.jl-command-item i {
  width: 22px;
  text-align: center;
  margin-right: 0.6rem;
}

.jl-command-footer {
  padding: 0.6rem 1.25rem;
  background: var(--jl-bg-subtle);
  border-top: 1px solid var(--jl-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--jl-text-muted);
}

/* ══════════════════════════════════════════════════════════════════════
   IOS SAFARI PWA INSTALLATION PROMPT
   ══════════════════════════════════════════════════════════════════════ */
.ios-pwa-banner {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  right: 16px;
  max-width: 440px;
  margin: 0 auto;
  background: var(--jl-surface);
  border: 1px solid var(--jl-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--jl-shadow-xl);
  padding: 1.2rem;
  z-index: 99999;
  display: none;
  animation: jl-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes jl-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ios-pwa-banner-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.ios-pwa-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--jl-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ios-pwa-banner-text h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--jl-text-primary);
}

.ios-pwa-banner-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--jl-text-muted);
}

.ios-pwa-instructions {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--jl-text-secondary);
  background: var(--jl-bg-subtle);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON PRECISION
   ══════════════════════════════════════════════════════════════════════ */
.theme-toggle {
  background: var(--jl-bg-subtle);
  border: 1px solid var(--jl-border);
  color: var(--jl-text-primary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  background: var(--jl-surface);
  border-color: var(--jl-border-strong);
  transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle i.fa-moon::before {
  content: "\f185"; /* fa-sun */
}

