/* ─── RESET & BASE ─── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;background:#f5f7fb;color:#1e293b;display:flex;min-height:100vh;line-height:1.6}

/* ─── APP SHELL ─── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 220px;
  background: linear-gradient(175deg, #0f2544 0%, #1a3560 60%, #1e3a5f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sb-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.3rem 1.2rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sb-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}
.sb-logo-accent { color: #60a5fa; }

.sb-nav {
  list-style: none;
  padding: .6rem 0;
  margin: 0;
  flex-shrink: 0;
}
.sb-nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem 1.1rem;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .17s;
  position: relative;
}
.sb-nav-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.sb-nav-item.active {
  background: rgba(255,255,255,.11);
  color: #fff;
  border-left-color: #60a5fa;
  font-weight: 600;
}
.sb-nav-icon { font-size: 1rem; flex-shrink: 0; width: 1.1rem; text-align: center; }
.sb-nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Chapter sub-nav items (appended dynamically by app.js) */
.nav-chapter {
  display: block;
  padding: .5rem 1.1rem .15rem;
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.35);
  font-weight: 700;
  margin-top: .4rem;
  flex: 1;
  text-align: left;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .38rem 1.1rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .79rem;
  border-left: 3px solid transparent;
  transition: all .17s;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.nav-link.active {
  background: rgba(255,255,255,.09);
  color: #fff;
  border-left-color: #60a5fa;
  font-weight: 600;
}

/* ── Collapsible chapter groups ── */
.sb-chapter-group { list-style: none; }
.sb-chapter-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.sb-chapter-toggle:hover .nav-chapter { color: rgba(255,255,255,.55); }
.sb-chapter-arrow {
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  padding-right: 1.1rem;
  flex-shrink: 0;
  transition: transform .22s ease;
  line-height: 1;
}
.sb-chapter-arrow::before { content: '▾'; }
.sb-chapter-group.collapsed .sb-chapter-arrow { transform: rotate(-90deg); }
.sb-chapter-links {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}
.sb-chapter-links.open { max-height: 800px; }

/* Spacer */
.sb-spacer { flex: 1; min-height: .5rem; }

/* Upgrade card */
.sb-upgrade-card {
  margin: .6rem .7rem;
  padding: .9rem .85rem;
  background: rgba(59,130,246,.18);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 10px;
  text-align: center;
  flex-shrink: 0;
}
.sb-upgrade-icon { font-size: 1.3rem; margin-bottom: .25rem; }
.sb-upgrade-text {
  font-size: .74rem;
  color: rgba(255,255,255,.75);
  margin: 0 0 .55rem;
  line-height: 1.4;
}
.sb-upgrade-btn {
  display: block;
  width: 100%;
  padding: .42rem .5rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .79rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.sb-upgrade-btn:hover { opacity: .85; }

/* User section at bottom */
.sb-user {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem .9rem;
  border-top: 1px solid rgba(255,255,255,.09);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.sidebar-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sidebar-avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-user-details { flex: 1; min-width: 0; }
.sidebar-user-name {
  display: block; font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-logout {
  display: block;
  width: 100%;
  background: none; border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.6); font-size: .69rem;
  padding: .18rem .5rem; border-radius: 4px; cursor: pointer; transition: all .2s;
  margin-top: .3rem; text-align: center;
}
.sidebar-logout:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-manage {
  display: block; width: 100%;
  background: none; border: 1px solid rgba(59,130,246,.35);
  color: rgba(255,255,255,.75); font-size: .69rem;
  padding: .18rem .5rem; border-radius: 4px; cursor: pointer; transition: all .2s;
  margin-top: .2rem; text-align: center;
}
.sidebar-manage:hover { background: rgba(59,130,246,.15); color: #fff; }

/* Review badge */
.review-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; margin-left: auto; padding: 0 3px;
}

/* ─── MAIN CONTENT (beside sidebar) ─── */
#content {
  margin-left: 220px;
  flex: 1;
  min-width: 0;
}

/* Non-dashboard pages get standard padding — top accounts for fixed trial banner (~36px) */
#home, #lesson-page, #review-page, #study-plan-page, #progress-page {
  padding: 5.5rem 2.5rem 4rem;
  max-width: 960px;
}

/* ─── MENU TOGGLE (mobile only) ─── */
#menu-toggle {
  display: none;
  position: fixed; top: 0; left: 0;
  z-index: 200; background: #1e3a5f; color: #fff;
  border: none; border-radius: 0 0 8px 0;
  font-size: 1.1rem; padding: .55rem .75rem; cursor: pointer;
  line-height: 1;
}

/* ─── MOBILE ─── */
@media(max-width: 900px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #content { margin-left: 0; }
  #menu-toggle { display: block; }
  /* trial banner: leave room for toggle on the left */
  .trial-banner { padding-left: 3.5rem; }
  #home, #lesson-page, #review-page, #study-plan-page, #progress-page {
    padding: 4.5rem 1.2rem 3rem;
  }
}
@media(max-width: 768px) {
  .sort-columns { flex-direction: column !important; }
  .auth-container { margin: 0 1rem !important; }
  .lp-hero-inner { grid-template-columns: 1fr !important; text-align: center; }
  .lp-hero-sub { margin-left: auto; margin-right: auto; }
  .lp-hero-cta { justify-content: center; }
  .lp-hero-proof { justify-content: center; }
  .lp-hero-mockup { display: none; }
  .lp-pain-inner { grid-template-columns: 1fr !important; }
  .lp-bento-grid { grid-template-columns: 1fr !important; }
  .lp-bento-large,.lp-bento-wide { grid-column: span 1 !important; }
  .lp-steps { flex-direction: column; align-items: center; }
  .lp-step-connector { display: none !important; }
  .lp-pricing-grid { flex-direction: column; align-items: center; }
  .lp-pricing-card { width: 100%; max-width: 340px; }
  .lp-navbar { padding: .8rem 1rem; }
  .lp-sticky-cta { flex-direction: column; gap: .4rem; text-align: center; padding: .8rem 1rem; }
  .onboarding-container { padding: 2rem 1rem !important; }
  .trial-banner { left: 0; }
}
@media(max-width: 480px) {
  .lp-hero { padding: 6rem 1rem 3rem; }
  .lp-hero-h1 { font-size: 2.2rem; }
  .lp-bento-grid { grid-template-columns: 1fr !important; }
  .lp-section-title { font-size: 1.5rem; }
  .lp-faq-inner { max-width: 100%; }
  .lp-proof-bar-grid { gap: .5rem; }
  .lp-proof-stat { padding: 0 .8rem; }
  .lp-proof-divider { display: none; }
  .auth-modal { margin: .5rem; }
}

/* ─── PAGES ─── */
.page{display:none}
.page.active{display:block;animation:fadeIn .3s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* ─── TYPOGRAPHY ─── */
h1{font-size:1.8rem;margin-bottom:.4rem;color:#1e3a5f}
h2{font-size:1.2rem;margin:1.8rem 0 .6rem;color:#334155;border-bottom:2px solid #e2e8f0;padding-bottom:.3rem}
h3{font-size:1.05rem;margin:.5rem 0;color:#334155}
.subtitle{font-size:1rem;color:#64748b;margin-bottom:1.5rem}
.question-word{font-size:1.05rem;background:#eef4ff;display:inline-block;padding:.4rem .9rem;border-radius:8px;margin-bottom:1rem;color:#1e3a5f;font-weight:600}
.case-tag{display:inline-block;background:#1e3a5f;color:#fff;padding:.2rem .7rem;border-radius:20px;font-size:.8rem;font-weight:600;margin-bottom:.5rem}

/* ─── INFO TABLES (explanations) ─── */
.info-table{width:100%;border-collapse:collapse;margin:.6rem 0 1.2rem;font-size:.88rem}
.info-table th{background:#1e3a5f;color:#fff;padding:.5rem .7rem;text-align:left}
.info-table td{padding:.45rem .7rem;border-bottom:1px solid #e2e8f0}
.info-table tr:nth-child(even) td{background:#f8fafc}

/* ─── TIP BOX ─── */
.tip-box,.tip{background:#fff8e1;border-left:4px solid #f9a825;padding:.8rem 1rem;border-radius:8px;margin:1rem 0;font-size:.9rem;color:#5d4037}

/* ─── CHAPTER GRID (home) ─── */
.chapter-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1rem;margin:1.5rem 0}
.chapter-card{background:#fff;border-radius:12px;padding:1.2rem;box-shadow:0 2px 8px rgba(0,0,0,.06);cursor:pointer;transition:transform .2s,box-shadow .2s;border-left:4px solid #1e3a5f}
.chapter-card:hover{transform:translateY(-3px);box-shadow:0 6px 18px rgba(0,0,0,.1)}
.chapter-card h3{font-size:.95rem;margin-bottom:.3rem}
.chapter-card p{font-size:.85rem;color:#64748b;margin:0}
.section-count{display:inline-block;background:#e0ecff;color:#1e3a5f;padding:.15rem .5rem;border-radius:12px;font-size:.75rem;font-weight:600;margin-top:.4rem}

/* ─── EXERCISE BLOCKS ─── */
.exercises-heading{font-size:1.3rem;margin:2.5rem 0 1rem;color:#1e3a5f}
.exercise-block{background:#fff;border-radius:12px;padding:1.5rem;margin-bottom:1.5rem;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.ex-type-label{font-size:1rem;color:#1e3a5f;margin-bottom:.3rem}
.ex-instruction{font-size:.92rem;color:#475569;margin-bottom:1rem}
.ex-example{background:#f0f7ff;border-left:3px solid #64b5f6;padding:.6rem 1rem;border-radius:6px;margin-bottom:1rem;font-size:.9rem}

/* ─── FILL-IN-BLANK ─── */
.fb-item{margin-bottom:1.2rem;padding-bottom:1rem;border-bottom:1px solid #f1f5f9}
.fb-item:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.fb-prompt{font-size:1rem;margin-bottom:.4rem}
.blank-slot{display:inline-block;width:120px;border-bottom:2px dashed #94a3b8;margin:0 .2rem}
.fb-input-row{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.fb-input{padding:.45rem .7rem;border:2px solid #cbd5e1;border-radius:8px;font-size:.9rem;width:220px;transition:border-color .2s}
.fb-input:focus{outline:none;border-color:#64b5f6}
.input-correct{border-color:#22c55e!important;background:#dcfce7!important}
.input-wrong{border-color:#ef4444!important;background:#fee2e2!important}
.btn-check,.btn-check-all,.btn-show-answers{padding:.45rem 1rem;border:none;border-radius:8px;font-size:.85rem;cursor:pointer;transition:background .2s}
.btn-check{background:#1e3a5f;color:#fff}
.btn-check:hover{background:#2d5f8a}
.btn-check:disabled{opacity:.5;cursor:default}

/* ─── MULTIPLE CHOICE ─── */
.mc-item{margin-bottom:1.2rem;padding-bottom:1rem;border-bottom:1px solid #f1f5f9}
.mc-sentence{font-size:1rem;margin-bottom:.5rem}
.mc-options{display:flex;gap:.5rem;flex-wrap:wrap}
.mc-btn{padding:.45rem 1rem;border:2px solid #cbd5e1;border-radius:8px;background:#fff;font-size:.9rem;cursor:pointer;transition:all .2s}
.mc-btn:hover{border-color:#64b5f6;background:#f0f7ff}
.mc-btn.correct{border-color:#22c55e;background:#dcfce7;color:#166534;font-weight:600}
.mc-btn.wrong{border-color:#ef4444;background:#fee2e2;color:#991b1b}
.mc-btn:disabled{opacity:.6;cursor:default}

/* ─── SORTING ─── */
.sort-wrapper{margin-top:.5rem}
.sort-columns{display:flex;gap:.8rem;margin-bottom:1rem;flex-wrap:wrap}
.sort-column{flex:1;min-width:150px;background:#f8fafc;border:2px solid #e2e8f0;border-radius:10px;padding:.6rem;cursor:pointer;transition:border-color .2s}
.sort-column.selected{border-color:#1e3a5f;box-shadow:0 0 0 2px rgba(30,58,95,.2)}
.sort-column h4{font-size:.8rem;text-align:center;color:#1e3a5f;margin-bottom:.4rem}
.sort-dropzone{min-height:40px}
.sort-dropzone .sort-chip{margin:.2rem;font-size:.78rem;cursor:default}
.sort-bank{display:flex;flex-wrap:wrap;gap:.4rem;padding:.5rem 0}
.sort-chip{padding:.35rem .7rem;border:2px solid #cbd5e1;border-radius:8px;background:#fff;font-size:.85rem;cursor:pointer;transition:all .2s}
.sort-chip:hover{border-color:#64b5f6;background:#f0f7ff}
.sort-correct{border-color:#22c55e!important;background:#dcfce7!important;color:#166534}
.sort-wrong{border-color:#ef4444!important;background:#fee2e2!important;animation:shake .3s}
.sort-chip.placed{cursor:default}
.sort-hint{font-size:.8rem;color:#94a3b8;margin:.5rem 0}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}

/* ─── GAP-FILL STORY ─── */
.gapfill-story{font-size:.95rem;line-height:1.8;background:#fafbfc;padding:1rem;border-radius:8px;margin-bottom:.8rem}
.gf-input{width:100px;padding:.2rem .4rem;border:none;border-bottom:2px solid #94a3b8;background:transparent;font-size:.9rem;text-align:center;transition:border-color .2s}
.gf-input:focus{outline:none;border-bottom-color:#1e3a5f}
.gf-input.input-correct{border-bottom-color:#22c55e;background:rgba(34,197,94,.1)}
.gf-input.input-wrong{border-bottom-color:#ef4444;background:rgba(239,68,68,.1)}
.gf-btns{display:flex;gap:.5rem;margin-top:.5rem}
.btn-check-all{background:#1e3a5f;color:#fff}
.btn-check-all:hover{background:#2d5f8a}
.btn-show-answers{background:#e2e8f0;color:#334155}
.btn-show-answers:hover{background:#cbd5e1}

/* ─── WORD REORDERING ─── */
.reorder-item{margin-bottom:1.5rem;padding-bottom:1.2rem;border-bottom:1px solid #f1f5f9}
.reorder-bank{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.6rem}
.reorder-word{padding:.4rem .8rem;border:2px solid #cbd5e1;border-radius:8px;background:#fff;font-size:.9rem;cursor:pointer;transition:all .2s}
.reorder-word:hover{border-color:#64b5f6;background:#f0f7ff}
.reorder-word.used{opacity:.3;border-style:dashed}
.reorder-result{min-height:40px;padding:.5rem .8rem;background:#f8fafc;border:2px dashed #e2e8f0;border-radius:8px;margin-bottom:.5rem;font-size:.95rem}
.reorder-placeholder{color:#94a3b8;font-size:.85rem}
.reorder-placed{display:inline-block;margin-right:.3rem}
.reorder-btns{display:flex;gap:.5rem}
.btn-undo{padding:.4rem .8rem;border:2px solid #cbd5e1;border-radius:8px;background:#fff;font-size:.85rem;cursor:pointer}
.btn-undo:hover{background:#f1f5f9}

/* ─── ERROR CORRECTION ─── */
.ec-item{margin-bottom:1.2rem;padding-bottom:1rem;border-bottom:1px solid #f1f5f9}
.ec-sentence{font-size:1rem;font-style:italic;margin-bottom:.5rem;color:#334155}
.ec-btns{display:flex;gap:.5rem;margin-bottom:.5rem}
.ec-ok,.ec-fix{padding:.4rem .9rem;border:2px solid #cbd5e1;border-radius:8px;background:#fff;font-size:.85rem;cursor:pointer;transition:all .2s}
.ec-ok:hover{border-color:#22c55e;background:#dcfce7}
.ec-fix:hover{border-color:#ef4444;background:#fee2e2}
.ec-ok:disabled,.ec-fix:disabled{opacity:.5;cursor:default}
.ec-input-row{display:flex;gap:.5rem;align-items:center;margin-bottom:.3rem;flex-wrap:wrap}

/* ─── FEEDBACK ─── */
.feedback{font-size:.85rem;margin-top:.3rem;min-height:1.2em}
.correct-fb{color:#16a34a}
.wrong-fb{color:#dc2626}

/* ─── NAV BUTTONS ─── */
.nav-buttons{display:flex;justify-content:space-between;margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid #e2e8f0}
.btn-prev,.btn-next{padding:.55rem 1.3rem;border:none;border-radius:8px;font-size:.9rem;cursor:pointer;transition:background .2s}
.btn-prev{background:#e2e8f0;color:#334155}
.btn-prev:hover{background:#cbd5e1}
.btn-next{background:#1e3a5f;color:#fff}
.btn-next:hover{background:#2d5f8a}

/* ─── STUDY PLAN PAGE ─── */
.study-plan-container{max-width:900px;margin:0 auto;padding:1rem 0}
.plan-intro{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;padding:1.5rem 2rem;border-radius:12px;margin-bottom:1.5rem}
.plan-intro h1{margin:0 0 .75rem;font-size:1.6rem}
.plan-intro p{margin:.3rem 0;opacity:.95;font-size:.95rem}
.sp-principles{background:#fff5f5;border-left:4px solid #f56565;padding:1.2rem 1.5rem;margin:0 0 1.5rem;border-radius:4px}
.sp-principles h3{margin:0 0 .5rem;color:#c53030;font-size:1.1rem}
.sp-principles ul{list-style:none;padding:0;margin:0}
.sp-principles li{padding:.35rem 0;font-size:.9rem}
.sp-principles li::before{content:"\2713";color:#f56565;font-weight:700;margin-right:.5rem}
.week-card{background:#fff;border:2px solid #e2e8f0;border-radius:12px;padding:1.25rem 1.5rem;margin-bottom:1rem;transition:all .2s}
.week-card:hover{border-color:#667eea;box-shadow:0 4px 12px rgba(102,126,234,.12)}
.week-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}
.week-number{font-size:1.15rem;font-weight:700;color:#2d3748}
.week-badge{padding:.2rem .6rem;border-radius:20px;font-size:.78rem;font-weight:600;color:#fff}
.badge-new{background:#667eea}
.badge-review{background:#ed8936}
.badge-mixed{background:#9f7aea}
.sp-section-title{font-weight:600;color:#4a5568;font-size:.9rem;margin:.5rem 0 .25rem}
.sp-items{margin-left:1.2rem;margin-bottom:.5rem}
.sp-item{padding:.25rem 0;color:#2d3748;font-size:.88rem}
.sp-item::before{content:"\2192";margin-right:.4rem;color:#667eea}
.sp-allocation{font-size:.82rem;color:#64748b;padding:.5rem .75rem;background:#f8fafc;border-radius:6px;margin-top:.5rem}
.sp-pct{font-weight:700;color:#667eea}
@media(max-width:640px){.week-header{flex-direction:column;align-items:flex-start;gap:.4rem}}

/* ─── PROGRESS PAGE ─── */
.progress-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1rem;margin:1.5rem 0}
.progress-card{background:#fff;border-radius:12px;padding:1rem;box-shadow:0 2px 8px rgba(0,0,0,.06);cursor:pointer;transition:transform .2s}
.progress-card:hover{transform:translateY(-2px)}
.progress-card h4{font-size:.95rem;color:#1e3a5f;margin-bottom:.2rem}
.progress-subtitle{font-size:.78rem;color:#94a3b8;margin-bottom:.5rem}
.progress-bar{height:8px;background:#e2e8f0;border-radius:99px;overflow:hidden}
.progress-fill{height:100%;background:linear-gradient(90deg,#22c55e,#16a34a);border-radius:99px;transition:width .4s ease}
.progress-text{font-size:.8rem;color:#64748b;margin-top:.3rem}
.total-progress{text-align:center;margin-top:2rem;padding:1.5rem;background:#fff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.total-progress h2{color:#1e3a5f;margin-bottom:.8rem}
.progress-bar.total{height:12px;max-width:500px;margin:0 auto}
.btn-reset{margin-top:1rem;padding:.5rem 1.3rem;border:2px solid #ef4444;background:#fff;color:#ef4444;border-radius:8px;cursor:pointer;font-size:.85rem;font-weight:600;transition:all .2s}
.btn-reset:hover{background:#fee2e2}

/* ═══════════════════════════════════════════════════
   LANDING / AUTH PAGE
   ═══════════════════════════════════════════════════ */

.auth-page{display:none;flex-direction:column;background:#f5f7fb;min-height:100vh;width:100%}
.auth-page.active{display:flex}

/* ── Utilities ── */
.lp-text-center{text-align:center}
.lp-reveal{opacity:0;transform:translateY(24px);transition:opacity .6s ease,transform .6s ease}
.lp-reveal.visible,.lp-reveal.is-visible{opacity:1;transform:none}

/* ── Sticky CTA bar ── */
.lp-sticky-cta{position:fixed;top:0;left:0;right:0;z-index:300;background:#1e3a5f;color:#fff;display:flex;align-items:center;justify-content:center;gap:1rem;padding:.6rem 1.5rem;transform:translateY(-100%);transition:transform .35s ease;pointer-events:none}
.lp-sticky-cta.visible{transform:translateY(0);pointer-events:auto}
.lp-sticky-cta-text{font-size:.88rem;color:rgba(255,255,255,.85)}
.lp-sticky-cta-btn{padding:.4rem 1rem;background:#3b82f6;color:#fff;border:none;border-radius:8px;font-size:.82rem;font-weight:700;cursor:pointer;white-space:nowrap;transition:opacity .2s}
.lp-sticky-cta-btn:hover{opacity:.85}

/* ── Navbar ── */
.lp-navbar{position:fixed;top:0;left:0;right:0;z-index:200;display:flex;align-items:center;justify-content:space-between;padding:.8rem 2rem;background:rgba(30,58,95,.95);backdrop-filter:blur(8px);transition:box-shadow .3s}
.lp-navbar.scrolled{box-shadow:0 2px 16px rgba(0,0,0,.25)}
.lp-navbar-logo{font-size:1.1rem;font-weight:700;color:#fff;text-decoration:none;letter-spacing:-.02em}
.lp-navbar-logo span{color:#60a5fa}
.lp-navbar-actions{display:flex;gap:.6rem;align-items:center}

/* ── CTA buttons ── */
.lp-btn-signin{padding:.45rem 1.1rem;border:2px solid rgba(255,255,255,.4);border-radius:8px;background:transparent;color:#fff;font-size:.85rem;font-weight:600;cursor:pointer;transition:border-color .2s,background .2s}
.lp-btn-signin:hover{border-color:#fff;background:rgba(255,255,255,.1)}
.lp-btn-trial{padding:.45rem 1.1rem;border:none;border-radius:8px;background:#3b82f6;color:#fff;font-size:.85rem;font-weight:600;cursor:pointer;transition:opacity .2s;display:inline-flex;flex-direction:column;align-items:center;line-height:1.2}
.lp-btn-trial:hover{opacity:.9}
.lp-btn-trial-lg{padding:.9rem 2rem;font-size:1rem;border-radius:12px}
.lp-btn-signin-lg{padding:.9rem 1.6rem;font-size:.95rem;border-radius:12px}
.lp-btn-sub{font-size:.72rem;font-weight:400;opacity:.75;margin-top:.15rem}

/* ── Hero ── */
.lp-hero{width:100%;background:linear-gradient(135deg,#1e3a5f 0%,#2d5f8a 50%,#3b82f6 100%);color:#fff;padding:7rem 2rem 5rem;position:relative;overflow:hidden}
.lp-hero::after{content:'';position:absolute;bottom:-2px;left:0;right:0;height:60px;background:linear-gradient(to top,#f5f7fb,transparent)}
.lp-hero-blob{position:absolute;border-radius:50%;filter:blur(80px);opacity:.25;pointer-events:none}
.lp-hero-blob-1{width:500px;height:500px;background:#60a5fa;top:-100px;right:-120px}
.lp-hero-blob-2{width:350px;height:350px;background:#818cf8;bottom:-80px;left:-60px}
.lp-hero-inner{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center;position:relative;z-index:1}
.lp-hero-eyebrow{display:inline-block;font-size:.78rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#93c5fd;background:rgba(255,255,255,.08);padding:.3rem .8rem;border-radius:20px;margin-bottom:1rem}
.lp-hero-h1{font-size:3rem;font-weight:800;color:#fff;line-height:1.12;margin-bottom:1rem;border:none;padding:0;background:none}
.lp-hero-highlight{color:#60a5fa}
.lp-hero-sub{font-size:1.05rem;color:rgba(255,255,255,.8);margin-bottom:1.6rem;max-width:480px;line-height:1.65}
.lp-hero-proof{display:flex;align-items:center;gap:.8rem;margin-bottom:1.6rem}
.lp-hero-proof-avatars{display:flex}
.lp-hero-avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;color:#fff;border:2px solid rgba(255,255,255,.6);margin-left:-8px}
.lp-hero-proof-avatars .lp-hero-avatar:first-child{margin-left:0}
.lp-hero-proof-text{font-size:.82rem;color:rgba(255,255,255,.7);max-width:200px;line-height:1.4}
.lp-hero-cta{display:flex;gap:.8rem;flex-wrap:wrap;align-items:flex-start}

/* Hero mockup card */
.lp-hero-mockup{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);border-radius:16px;overflow:hidden;backdrop-filter:blur(6px)}
.lp-mockup-chrome{display:flex;align-items:center;gap:.4rem;padding:.6rem 1rem;background:rgba(0,0,0,.2)}
.lp-mockup-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.lp-mockup-chrome-title{margin-left:.4rem;font-size:.75rem;color:rgba(255,255,255,.5);font-weight:500}
.lp-mockup-body{padding:1.5rem}
.lp-mockup-case-tag{display:inline-block;background:rgba(59,130,246,.4);color:#93c5fd;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:.2rem .7rem;border-radius:20px;margin-bottom:.7rem}
.lp-mockup-header{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.5);margin-bottom:.8rem}
.lp-mockup-q{font-size:1rem;font-weight:600;margin-bottom:1rem;color:#fff}
.lp-mockup-opts{display:flex;flex-direction:column;gap:.4rem}
.lp-mockup-opt{padding:.5rem .9rem;border:2px solid rgba(255,255,255,.2);border-radius:8px;font-size:.88rem;color:rgba(255,255,255,.75);cursor:default}
.lp-mockup-opt-correct{border-color:#22c55e;background:rgba(34,197,94,.15);color:#fff}
.lp-mockup-opt-wrong{border-color:#ef4444;background:rgba(239,68,68,.1);color:rgba(255,255,255,.5);text-decoration:line-through}
.lp-mockup-feedback{display:flex;align-items:center;gap:.5rem;background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.3);border-radius:8px;padding:.6rem .9rem;margin-top:.8rem;font-size:.82rem;color:rgba(255,255,255,.85)}
.lp-mockup-feedback-icon{color:#22c55e;font-weight:700;font-size:1rem}
.lp-mockup-progress{display:flex;align-items:center;gap:.7rem;margin-top:1rem}
.lp-mockup-progress-bar{flex:1;height:5px;background:rgba(255,255,255,.15);border-radius:3px;overflow:hidden}
.lp-mockup-progress-fill{height:100%;background:#3b82f6;border-radius:3px;transition:width .4s ease}
.lp-mockup-progress-text{font-size:.72rem;color:rgba(255,255,255,.45);white-space:nowrap}

/* ── Proof / Stats bar ── */
.lp-proof-bar{background:#fff;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;padding:2.5rem 2rem}
.lp-proof-bar-grid{display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap}
.lp-proof-stat{display:flex;flex-direction:column;align-items:center;gap:.2rem;padding:0 2rem;text-align:center}
.lp-proof-num{font-size:2.2rem;font-weight:800;color:#1e3a5f;line-height:1;display:inline}
.lp-proof-unit{font-size:1.5rem;font-weight:800;color:#3b82f6;line-height:1;display:inline}
.lp-proof-label{font-size:.8rem;color:#64748b;font-weight:500;margin-top:.1rem}
.lp-proof-divider{width:1px;height:40px;background:#e2e8f0;flex-shrink:0}

/* ── Pain section ── */
.lp-pain{padding:5rem 2rem;background:#f8fafc}
.lp-pain-inner{display:grid;grid-template-columns:1fr 1fr;gap:4rem;align-items:start}
.lp-pain-text .lp-section-title{text-align:left;margin-bottom:.8rem}
.lp-pain-intro{font-size:.95rem;color:#64748b;line-height:1.7;margin-bottom:1.5rem}
.lp-pain-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.75rem}
.lp-pain-list li{display:flex;gap:.7rem;align-items:flex-start;font-size:.92rem;color:#334155;line-height:1.5}
.lp-pain-x{color:#ef4444;font-size:1rem;font-weight:700;flex-shrink:0;margin-top:.05rem}
.lp-pain-after{display:flex;flex-direction:column;gap:1rem}
.lp-pain-after-card{background:#fff;border:2px solid #22c55e;border-radius:16px;padding:2rem;box-shadow:0 4px 20px rgba(34,197,94,.1)}
.lp-pain-after-label{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#16a34a;margin-bottom:1rem}
.lp-pain-after-list{list-style:none;padding:0;margin:0 0 1.5rem;display:flex;flex-direction:column;gap:.75rem}
.lp-pain-after-list li{display:flex;gap:.7rem;align-items:flex-start;font-size:.92rem;color:#334155;line-height:1.5}
.lp-pain-check{color:#22c55e;font-size:1rem;font-weight:700;flex-shrink:0;margin-top:.05rem}
.lp-pain-cta{width:100%;padding:.8rem;background:linear-gradient(135deg,#16a34a,#22c55e);color:#fff;border:none;border-radius:10px;font-size:.95rem;font-weight:700;cursor:pointer;transition:opacity .2s}
.lp-pain-cta:hover{opacity:.88}

/* ── Section headings ── */
.lp-section-eyebrow{display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#3b82f6;background:#eff6ff;padding:.3rem .8rem;border-radius:20px;margin-bottom:.8rem}
.lp-section-inner{max-width:1100px;margin:0 auto}
.lp-section-title{font-size:2rem;font-weight:700;color:#1e3a5f;margin-bottom:.5rem;border:none;padding:0;background:none}
.lp-section-title-left{text-align:left}
.lp-section-subtitle{font-size:1.05rem;color:#64748b;margin-bottom:3rem}

/* ── Features / Bento Grid ── */
.lp-features{padding:5rem 2rem;background:#f5f7fb}
.lp-bento-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem;margin-top:2.5rem}
.lp-bento-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.8rem;transition:transform .2s,box-shadow .2s;display:flex;flex-direction:column;gap:.6rem}
.lp-bento-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.07)}
.lp-bento-large{grid-column:span 2}
.lp-bento-wide{grid-column:span 2}
.lp-bento-icon{font-size:1.8rem;line-height:1}
.lp-bento-card h3{font-size:1rem;font-weight:700;color:#1e3a5f;margin:0;border:none;padding:0}
.lp-bento-card p{font-size:.88rem;color:#64748b;line-height:1.6;margin:0}

/* SR demo widget */
.lp-bento-sr-demo{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}
.lp-sr-bar{display:flex;align-items:center;gap:.6rem}
.lp-sr-label{font-size:.78rem;color:#334155;width:80px;flex-shrink:0}
.lp-sr-track{flex:1;height:7px;background:#f1f5f9;border-radius:4px;overflow:hidden}
.lp-sr-fill{height:100%;background:#22c55e;border-radius:4px}
.lp-sr-fill-med{background:#f59e0b}
.lp-sr-fill-low{background:#ef4444}
.lp-sr-pct{font-size:.72rem;color:#64748b;width:70px;flex-shrink:0;text-align:right}

/* Exercise type chips */
.lp-bento-ex-types{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.4rem}
.lp-ex-chip{font-size:.72rem;font-weight:600;background:#eff6ff;color:#1d4ed8;padding:.2rem .6rem;border-radius:20px;border:1px solid #bfdbfe}

/* Week pills */
.lp-bento-weeks{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.4rem}
.lp-week-pill{font-size:.75rem;font-weight:600;padding:.3rem .8rem;border-radius:20px;background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0}
.lp-week-done{background:#f0fdf4;color:#15803d;border-color:#bbf7d0}
.lp-week-active{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;font-weight:700}
.lp-week-review{background:#fff7ed;color:#c2410c;border-color:#fed7aa}

/* ── How It Works ── */
.lp-how{padding:5rem 2rem;background:#fff}
.lp-steps{display:flex;justify-content:center;gap:2rem;margin-top:2rem;position:relative;flex-wrap:wrap}
.lp-step{text-align:center;flex:1;max-width:280px;position:relative}
.lp-step-num{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#1e3a5f,#3b82f6);color:#fff;font-size:1.3rem;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto .8rem}
.lp-step h3{font-size:1.05rem;color:#1e3a5f;margin-bottom:.4rem;border:none;padding:0}
.lp-step p{font-size:.88rem;color:#64748b;line-height:1.5}
.lp-step-connector{position:absolute;top:28px;left:calc(50% + 40px);width:calc(100% - 80px);height:2px;background:#e2e8f0}
.lp-step:last-child .lp-step-connector{display:none}

/* ── Testimonials ── */
.lp-testimonials{padding:5rem 2rem;background:#f8fafc}
.lp-testimonials-single{display:flex;justify-content:center}
.lp-tcard{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:2.5rem;box-shadow:0 4px 16px rgba(0,0,0,.06);max-width:640px;width:100%}
.lp-tcard-single{max-width:640px}
.lp-tcard-stars{color:#f59e0b;font-size:1.1rem;letter-spacing:.1rem;margin-bottom:1rem}
.lp-tcard-quote{font-size:1.05rem;color:#334155;line-height:1.7;margin-bottom:1.5rem;font-style:italic}
.lp-tcard-author{display:flex;align-items:center;gap:.8rem}
.lp-tcard-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1rem;font-weight:700;color:#fff;flex-shrink:0}
.lp-tcard-author strong{display:block;font-size:.95rem;color:#1e3a5f}
.lp-tcard-author span{font-size:.8rem;color:#64748b}

/* ── Pricing ── */
.lp-pricing{padding:5rem 2rem;background:#f8fafc}
.lp-pricing-grid{display:flex;gap:1.5rem;justify-content:center;flex-wrap:wrap}
.lp-pricing-card{background:#fff;border:2px solid #e2e8f0;border-radius:16px;padding:2.5rem 2rem;text-align:center;width:280px;position:relative;transition:transform .2s,box-shadow .2s}
.lp-pricing-card:hover{transform:translateY(-4px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.lp-pricing-card.popular{border-color:#3b82f6;box-shadow:0 4px 20px rgba(59,130,246,.15)}
.lp-pricing-badge{position:absolute;top:-14px;left:50%;transform:translateX(-50%);background:#3b82f6;color:#fff;font-size:.75rem;font-weight:700;padding:.3rem 1rem;border-radius:20px;white-space:nowrap}
.lp-pricing-badge-alt{position:absolute;top:-14px;left:50%;transform:translateX(-50%);background:#16a34a;color:#fff;font-size:.75rem;font-weight:700;padding:.3rem 1rem;border-radius:20px;white-space:nowrap}
.lp-pricing-card h3{font-size:1rem;color:#64748b;margin-bottom:.5rem;font-weight:500;border:none;padding:0}
.lp-pricing-amount{font-size:2.5rem;font-weight:800;color:#1e3a5f;margin-bottom:.3rem}
.lp-pricing-amount span{font-size:.9rem;font-weight:400;color:#94a3b8}
.lp-pricing-save{font-size:.82rem;color:#16a34a;font-weight:600;margin-bottom:1.2rem;min-height:1.2em}
.lp-pricing-features{list-style:none;text-align:left;margin-bottom:1.5rem;padding:0}
.lp-pricing-features li{padding:.35rem 0;font-size:.88rem;color:#334155;border-bottom:1px solid #f1f5f9}
.lp-pricing-features li::before{content:'\2713';color:#22c55e;font-weight:700;margin-right:.5rem}
.lp-pricing-cta{display:block;width:100%;padding:.7rem;border:none;border-radius:10px;font-size:.95rem;font-weight:600;cursor:pointer;transition:opacity .2s}
.lp-pricing-cta.primary{background:linear-gradient(135deg,#1e3a5f,#3b82f6);color:#fff}
.lp-pricing-cta.primary:hover{opacity:.9}
.lp-pricing-cta.secondary{background:#f1f5f9;color:#1e3a5f;border:2px solid #e2e8f0}
.lp-pricing-cta.secondary:hover{border-color:#3b82f6;background:#f0f7ff}
.lp-pricing-footnote{text-align:center;font-size:.82rem;color:#94a3b8;margin-top:1.5rem}

/* ── FAQ ── */
.lp-faq{padding:5rem 2rem;background:#fff}
.lp-faq-inner{max-width:760px}
.lp-faq-list{display:flex;flex-direction:column;gap:.5rem;margin-top:2rem}
.lp-faq-item{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff}
.lp-faq-q{width:100%;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.1rem 1.3rem;background:none;border:none;text-align:left;font-size:.97rem;font-weight:600;color:#1e3a5f;cursor:pointer;transition:background .2s;font-family:inherit}
.lp-faq-q:hover{background:#f8fafc}
.lp-faq-q[aria-expanded="true"]{background:#f8fafc}
.lp-faq-chevron{font-size:1.2rem;flex-shrink:0;color:#94a3b8;transition:transform .3s;display:inline-block}
.lp-faq-q[aria-expanded="true"] .lp-faq-chevron{transform:rotate(180deg)}
.lp-faq-a{max-height:0;overflow:hidden;transition:max-height .35s ease}
.lp-faq-a.open{max-height:400px}
.lp-faq-a p{padding:.2rem 1.3rem 1.2rem;margin:0;font-size:.9rem;color:#64748b;line-height:1.7}

/* ── Footer ── */
.lp-footer{background:#1e293b;color:#fff;padding:4rem 2rem 2rem}
.lp-footer-inner{display:flex;flex-direction:column;gap:3rem}
.lp-footer-cta-block{text-align:center}
.lp-footer-cta-block h2{font-size:1.9rem;font-weight:700;color:#fff;margin-bottom:.6rem;border:none;padding:0}
.lp-footer-cta-block p{color:rgba(255,255,255,.6);margin-bottom:1.8rem;font-size:1rem;max-width:500px;margin-left:auto;margin-right:auto}
.lp-footer-trial-btn{background:#3b82f6;border:none}
.lp-footer-bottom{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-top:2rem;border-top:1px solid rgba(255,255,255,.1)}
.lp-footer-logo{font-size:1rem;font-weight:700;color:rgba(255,255,255,.5);letter-spacing:-.01em}
.lp-footer-links{display:flex;gap:1.5rem;flex-wrap:wrap;justify-content:center}
.lp-footer-links a{font-size:.85rem;color:rgba(255,255,255,.45);text-decoration:none;transition:color .2s}
.lp-footer-links a:hover{color:#fff}
.lp-footer-copy{font-size:.78rem;color:rgba(255,255,255,.25)}

/* ── Auth Modal ── */
.auth-modal-overlay{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.6);backdrop-filter:blur(4px);opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s}
.auth-modal-overlay.open{opacity:1;visibility:visible}
.auth-modal{position:relative;transform:translateY(24px) scale(.97);transition:transform .3s ease;max-height:90vh;overflow-y:auto}
.auth-modal-overlay.open .auth-modal{transform:translateY(0) scale(1)}
.auth-modal-close{position:absolute;top:.8rem;right:.8rem;width:32px;height:32px;border:none;background:rgba(0,0,0,.06);border-radius:50%;font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#64748b;transition:background .2s}
.auth-modal-close:hover{background:rgba(0,0,0,.1);color:#1e293b}

/* Auth container */
.auth-container{background:#fff;border-radius:16px;padding:2.5rem;max-width:420px;width:100%;margin:-2rem auto 2rem;box-shadow:0 8px 30px rgba(0,0,0,.12);position:relative;z-index:1}
.auth-container h2{font-size:1.4rem;text-align:center;margin-bottom:.3rem;border-bottom:none}
.auth-subtitle{text-align:center;color:#64748b;font-size:.9rem;margin-bottom:1.5rem}

/* Google button */
.auth-google-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:.6rem;padding:.7rem;border:2px solid #e2e8f0;border-radius:10px;background:#fff;font-size:.95rem;cursor:pointer;transition:all .2s;color:#334155;font-weight:500}
.auth-google-btn:hover{border-color:#cbd5e1;background:#f8fafc}

/* Divider */
.auth-divider{display:flex;align-items:center;gap:1rem;margin:1.3rem 0;color:#94a3b8;font-size:.85rem}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:#e2e8f0}

/* Form */
.auth-field{margin-bottom:1rem}
.auth-field label{display:block;font-size:.85rem;font-weight:600;color:#334155;margin-bottom:.3rem}
.auth-field input{width:100%;padding:.6rem .8rem;border:2px solid #e2e8f0;border-radius:8px;font-size:.9rem;transition:border-color .2s}
.auth-field input:focus{outline:none;border-color:#3b82f6}
.auth-submit-btn{width:100%;padding:.75rem;background:linear-gradient(135deg,#1e3a5f,#3b82f6);color:#fff;border:none;border-radius:10px;font-size:1rem;font-weight:600;cursor:pointer;transition:opacity .2s;margin-top:.5rem}
.auth-submit-btn:hover{opacity:.9}
.auth-submit-btn:disabled{opacity:.6;cursor:default}

/* Error / success */
.auth-error{background:#fee2e2;color:#991b1b;padding:.6rem 1rem;border-radius:8px;font-size:.85rem;margin-top:1rem}
.auth-success{background:#dcfce7;color:#166534;padding:.6rem 1rem;border-radius:8px;font-size:.85rem;margin-top:1rem}

/* Toggle & forgot */
.auth-toggle{text-align:center;margin-top:1rem;font-size:.85rem;color:#64748b}
.auth-toggle a{color:#3b82f6;text-decoration:none}
.auth-toggle a:hover{text-decoration:underline}
.auth-forgot{text-align:center;font-size:.82rem}
.auth-forgot a{color:#3b82f6;text-decoration:none}
.auth-forgot a:hover{text-decoration:underline}

/* ═══════════════════════════════════════════════════
   TRIAL BANNER
   ═══════════════════════════════════════════════════ */

.trial-banner{position:fixed;top:0;left:220px;right:0;z-index:90;display:flex;align-items:center;justify-content:center;gap:1rem;padding:.5rem 1rem;background:linear-gradient(90deg,#3b82f6,#2563eb);color:#fff;font-size:.85rem;font-weight:500}
.trial-banner-urgent{background:linear-gradient(90deg,#f59e0b,#d97706)}
.trial-banner-btn{background:rgba(255,255,255,.2);color:#fff;border:1px solid rgba(255,255,255,.3);padding:.25rem .8rem;border-radius:6px;font-size:.8rem;cursor:pointer;transition:background .2s}
.trial-banner-btn:hover{background:rgba(255,255,255,.3)}

@media(max-width:900px){
  .trial-banner{left:0}
}

/* ═══════════════════════════════════════════════════
   LOADING PAGE
   ═══════════════════════════════════════════════════ */

.loading-page{display:none;min-height:100vh;background:#f5f7fb;width:100%}
.loading-page.active{display:flex;align-items:center;justify-content:center}
.loading-container{text-align:center;padding:3rem}
.loading-container h2{color:#1e3a5f;margin-bottom:.5rem;font-size:1.3rem}
.loading-container p{color:#64748b;font-size:.95rem}
.loading-spinner{width:48px;height:48px;border:4px solid #e2e8f0;border-top-color:#3b82f6;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 1.5rem}
@keyframes spin{to{transform:rotate(360deg)}}

/* ═══════════════════════════════════════════════════
   TRIAL EXPIRED PAGE
   ═══════════════════════════════════════════════════ */

.trial-expired-page{display:none;min-height:100vh;background:#f5f7fb;width:100%}
.trial-expired-page.active{display:flex;align-items:center;justify-content:center}
.trial-expired-container{text-align:center;max-width:480px;padding:3rem;background:#fff;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.1);margin:2rem}
.trial-expired-icon{font-size:3rem;margin-bottom:1rem}
.trial-expired-container h1{font-size:1.6rem;margin-bottom:.8rem}
.trial-expired-container>p{color:#64748b;font-size:.95rem;margin-bottom:1.5rem;line-height:1.5}
.trial-expired-features{text-align:left;margin-bottom:2rem}
.trial-expired-features div{padding:.4rem 0;font-size:.9rem;color:#334155}
/* Pricing cards */
.pricing-cards{display:flex;gap:.8rem;margin-bottom:1.5rem;flex-wrap:wrap;justify-content:center}
.pricing-card{flex:1;min-width:130px;max-width:170px;background:#f8fafc;border:2px solid #e2e8f0;border-radius:12px;padding:1.2rem .8rem;text-align:center;position:relative;transition:all .2s}
.pricing-card:hover{border-color:#3b82f6;transform:translateY(-2px)}
.pricing-card h3{font-size:.9rem;color:#334155;margin-bottom:.4rem}
.pricing-price{font-size:1.6rem;font-weight:800;color:#1e3a5f;margin-bottom:.2rem}
.pricing-price span{font-size:.8rem;font-weight:400;color:#64748b}
.pricing-savings{font-size:.75rem;color:#16a34a;font-weight:600;margin-bottom:.6rem}
.pricing-card-popular{border-color:#3b82f6;background:#eff6ff}
.pricing-badge{position:absolute;top:-.7rem;left:50%;transform:translateX(-50%);background:#3b82f6;color:#fff;font-size:.68rem;font-weight:700;padding:.15rem .6rem;border-radius:10px;white-space:nowrap}
.btn-subscribe{display:block;width:100%;padding:.6rem;background:linear-gradient(135deg,#1e3a5f,#3b82f6);color:#fff;border:none;border-radius:8px;font-size:.85rem;font-weight:600;cursor:pointer;transition:opacity .2s}
.btn-subscribe:hover{opacity:.9}
@media(max-width:768px){.pricing-cards{flex-direction:column;align-items:center}.pricing-card{max-width:100%;min-width:0;width:100%}}
.btn-logout-trial{display:block;width:100%;padding:.6rem;background:none;border:2px solid #e2e8f0;border-radius:10px;color:#64748b;font-size:.9rem;cursor:pointer;transition:all .2s}
.btn-logout-trial:hover{border-color:#cbd5e1;background:#f8fafc}

/* ═══════════════════════════════════════════════════
   ONBOARDING PAGE
   ═══════════════════════════════════════════════════ */

.onboarding-page{display:none;min-height:100vh;background:#f5f7fb;width:100%}
.onboarding-page.active{display:flex;align-items:center;justify-content:center}
.onboarding-container{max-width:520px;width:100%;padding:3rem;background:#fff;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.1);margin:2rem}
.onboarding-container h1{font-size:1.5rem;text-align:center;margin-bottom:2rem}
.onboarding-step{margin-bottom:2rem}
.onboarding-step h2{font-size:1.05rem;border-bottom:none;margin:0 0 .8rem;color:#1e3a5f}
.onboarding-options{display:flex;flex-direction:column;gap:.5rem}
.onboarding-option{display:flex;align-items:center;gap:.7rem;padding:.7rem 1rem;border:2px solid #e2e8f0;border-radius:10px;cursor:pointer;transition:all .2s;font-size:.9rem}
.onboarding-option:hover{border-color:#3b82f6;background:#f0f7ff}
.onboarding-option input[type="radio"]{accent-color:#3b82f6}
.onboarding-option input[type="radio"]:checked+span{font-weight:600;color:#1e3a5f}
.onboarding-submit{width:100%;margin-top:1rem}

/* ═══════════════════════════════════════════════════
   DASHBOARD — REDESIGN
   ═══════════════════════════════════════════════════ */

/* ── Two-column shell ── */
.dash-shell {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  padding: 3.5rem 2rem 3rem;
  align-items: start;
}
.dash-col-main {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 1.8rem;
}

/* ── Header ── */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-header-text { flex: 1; min-width: 0; }
.dash-greeting {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f2544;
  margin: 0 0 .2rem;
  border-bottom: none;
  padding: 0;
  line-height: 1.2;
}
.dash-subheading { font-size: .9rem; color: #64748b; margin: 0; }
.dash-header-right {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
  padding-top: .3rem;
}
/* Language toggle */
.dash-lang-toggle {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: .3rem .5rem;
  display: flex; align-items: center; gap: .25rem;
  cursor: pointer; font-size: .78rem; font-weight: 600;
  transition: border-color .2s; flex-shrink: 0;
}
.dash-lang-toggle:hover { border-color: #94a3b8; }
.dash-lang-opt { color: #94a3b8; transition: color .2s; }
.dash-lang-opt.active { color: #1e3a5f; }
.dash-lang-sep { color: #e2e8f0; font-size: .7rem; }

/* Empty review state */
.dash-empty-review {
  background: #fff;
  border-radius: 14px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border: 1.5px dashed #e2e8f0;
}
.dash-empty-review-icon { font-size: 2rem; margin-bottom: .5rem; }
.dash-empty-review strong { display: block; font-size: 1rem; color: #1e293b; margin-bottom: .3rem; }
.dash-empty-review p { font-size: .84rem; color: #64748b; margin: 0; }
.dash-streak-pill {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  padding: .38rem 1rem;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}

/* ── Stats row ── */
.dash-stats-row-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.dash-stat-card-new {
  background: #fff;
  border-radius: 14px;
  padding: 1.1rem 1rem 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: .18rem;
  transition: transform .2s, box-shadow .2s;
}
.dash-stat-card-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.dash-stat-icon-new { font-size: 1.25rem; margin-bottom: .1rem; }
.dash-stat-value-new {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f2544;
  line-height: 1.1;
}
.dash-stat-value-new span {
  font-size: 1rem;
  font-weight: 500;
  color: #94a3b8;
}
.dash-stat-label-new {
  font-size: .72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.dash-goal-bar-track {
  height: 5px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: .55rem;
}
.dash-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 99px;
  transition: width .4s ease;
}

/* ── Hero lesson card ── */
.dash-hero-card {
  background: linear-gradient(140deg, #0f2544 0%, #1a3a6b 55%, #1e4d82 100%);
  border-radius: 16px;
  padding: 1.6rem 1.8rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.dash-hero-card::before {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.03);
  border-radius: 50%;
}
.dash-hero-label {
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: .65rem;
}
.dash-hero-icon {
  font-size: 2rem;
  position: absolute;
  top: 1.4rem; right: 1.8rem;
  opacity: .35;
}
.dash-hero-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .5rem;
  border-bottom: none;
  padding: 0;
  max-width: 72%;
  line-height: 1.3;
}
.dash-hero-desc {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.dash-hero-meta {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
}
.dash-hero-meta-item { font-size: .78rem; color: rgba(255,255,255,.55); }
.dash-hero-cta {
  display: inline-block;
  padding: .55rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(59,130,246,.4);
}
.dash-hero-cta:hover { background: #2563eb; transform: translateY(-1px); }

/* ── Section titles ── */
.dash-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 .8rem;
  border-bottom: none;
  padding: 0;
}

/* ── Review section ── */
.dash-review-section {
  display: flex;
  flex-direction: column;
}
.dash-empty-state {
  font-size: .88rem;
  color: #94a3b8;
  padding: .4rem 0;
}

/* Mistake cards */
.dash-mistake-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; background: #fff; border-radius: 12px;
  padding: .9rem 1.1rem; margin-bottom: .5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  border-left: 4px solid #f87171;
  transition: transform .15s;
}
.dash-mistake-card:hover { transform: translateX(2px); }
.dash-mistake-info {
  display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0;
}
.dash-mistake-text { display: flex; flex-direction: column; min-width: 0; }
.dash-mistake-text strong {
  font-size: .88rem; color: #1e3a5f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-mistake-text span { font-size: .76rem; color: #94a3b8; margin-top: .1rem; }
.btn-retry {
  padding: .3rem .85rem; background: #fff0f0; color: #ef4444;
  border: 1px solid #fecaca; border-radius: 8px; font-size: .78rem;
  cursor: pointer; white-space: nowrap; transition: all .2s; flex-shrink: 0;
}
.btn-retry:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

/* ── Right column cards ── */
.dash-right-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.dash-right-card-title {
  font-size: .88rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem;
}

/* ── Progress ring ── */
.dash-ring-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.dash-ring-svg { display: block; overflow: visible; }
.dash-ring-track { fill: none; stroke: #e2e8f0; stroke-width: 10; }
.dash-ring-fill {
  fill: none;
  stroke: url(#dash-ring-grad);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease;
}
.dash-ring-center-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.2;
}
.dash-ring-pct {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f2544;
}
.dash-ring-sub {
  display: block;
  font-size: .65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

/* Chapter progress bars */
.dash-chapter-bars { display: flex; flex-direction: column; gap: .4rem; }
.dash-ch-bar-row {
  display: flex; align-items: center; gap: .5rem;
}
.dash-ch-bar-label {
  font-size: .7rem; color: #475569; font-weight: 700;
  width: 24px; flex-shrink: 0; white-space: nowrap;
}
.dash-ch-bar-track {
  flex: 1; height: 6px; background: #e2e8f0;
  border-radius: 99px; overflow: hidden;
}
.dash-ch-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 99px;
  transition: width .4s ease;
}
.dash-ch-bar-pct {
  font-size: .68rem; color: #94a3b8;
  width: 30px; text-align: right; flex-shrink: 0;
}

/* ── Activity bar chart ── */
.dash-activity-bars {
  display: flex;
  gap: .3rem;
  align-items: flex-end;
  height: 72px;
}
.dash-act-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.dash-act-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}
.dash-act-bar {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6 0%, #6366f1 100%);
  border-radius: 3px 3px 0 0;
  min-height: 0;
  transition: height .35s ease;
}
.dash-act-label {
  font-size: .62rem; color: #94a3b8;
  margin-top: .25rem; flex-shrink: 0;
}

/* ── Tip card ── */
.dash-tip-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 100%);
  border: 1px solid #bfdbfe;
}
.dash-tip-text {
  font-size: .84rem;
  color: #1e3a5f;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.dash-tip-more-btn {
  background: none;
  border: 1.5px solid #3b82f6;
  color: #3b82f6;
  border-radius: 7px;
  padding: .35rem .85rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.dash-tip-more-btn:hover { background: #3b82f6; color: #fff; }

/* ── Responsive ── */
@media(max-width: 1024px) {
  .dash-shell { grid-template-columns: 1fr 250px; gap: 1.2rem; padding: 3.5rem 1.5rem 3rem; }
}
@media(max-width: 900px) {
  /* Extra top padding clears the fixed hamburger button */
  .dash-shell { grid-template-columns: 1fr; padding: 3.5rem 1rem 3rem; }
  .dash-col-right { position: static; flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .dash-right-card { flex: 1; min-width: 220px; }
}
@media(max-width: 600px) {
  .dash-greeting { font-size: 1.35rem; }
  .dash-col-right { flex-direction: column; }
  .dash-right-card { min-width: 0; }
}
@media(max-width: 500px) {
  /* Jump straight to single column — avoids 3rd card stranded alone */
  .dash-stats-row-new { grid-template-columns: 1fr; }
  .dash-stat-card-new { flex-direction: row; align-items: center; gap: .8rem; padding: .7rem 1rem; }
  .dash-stat-icon-new { margin-bottom: 0; font-size: 1.5rem; }
  .dash-stat-value-new { font-size: 1.4rem; }
}
@media(max-width: 420px) {
  .dash-shell { padding: 1rem .8rem 2.5rem; }
}

/* ═══════════════════════════════════════════════════
   REVIEW PAGE
   ═══════════════════════════════════════════════════ */

.review-progress{margin-bottom:1.5rem}
.review-progress span{font-size:.85rem;color:#64748b}
.review-progress-bar{height:6px;background:#e2e8f0;border-radius:99px;overflow:hidden;margin-top:.4rem}
.review-progress-fill{height:100%;background:linear-gradient(90deg,#8b5cf6,#6366f1);border-radius:99px;transition:width .3s}

.review-context{margin-bottom:1rem}
.review-section-title{font-size:.9rem;color:#64748b;margin-left:.4rem}

.review-empty{text-align:center;padding:3rem 1rem}
.review-empty-icon{font-size:3rem;color:#22c55e;margin-bottom:.5rem}
.review-empty h3{font-size:1.2rem;margin-bottom:.5rem;color:#1e3a5f}
.review-empty p{color:#64748b;margin-bottom:1.5rem;font-size:.95rem}

.review-next-btn{display:block;margin:1.5rem auto 0;padding:.6rem 2rem}

.review-fallback{text-align:center;padding:1.5rem}
.review-fallback p{color:#64748b;margin-bottom:1rem}
